I come from the Web Development world, so when I read "Tag" and "Bold", I think "<b>This is a bold text example</b>".
But, in InDesign, even if I read that you were able to make it working with XML, it seems we are not talking about the same thing.
I will give you the context of my asking for more intel :
I'm working with a Merged Data CSV file, so I cant format my text in a "regular" way (WYSIWYG), I need a way to write some words in Bold, some other in Italic, and even return to the line sometimes (or else everything is on the same line xD haha, it's weird 😛 !
Any idea please 😄 ?
Thx you for your time and attention 😉 !
(I tagged this topic as "Type" but I dont know if it's a right choice 😮 )
(Where is the edit button on this forum oO ?)
Usually, you can click the More button to edit - what do you want to edit I can do that for you.
When I click on "more", there is a "white" space 😮 .
Maybe it's the buffer, I will try to reset it.
Hmmmm... I cleat the buffer... Still the same, it's very strange 😮 !
I'm using Chrome, as usual 😮 ...
There might be some useful suggestions on this online video tutorial (you can get 30-days free access):
Coming from the web development world, you're familiar with the HTML tags which are predefined tags within the HTML language. XML has no predefined tags. You can literally invent the tags you need as you go or you can use standard HTML tags. Either way, XML by itself doesn't know what to do with those tags. In InDesign, you'll need to use the "Map Tags to styles feature" or you can use the "aid" attribute in the XML file to tell InDesign how to format those tags. @derek posted a link to my course on LinkedIn Learning that will give you more details on the process. How XML works with InDesign can be tricky at first, but once you get it, magic happens 😉
I watched other tutorials ('cause I cant access to the LinkedIn thing), and... Are you sure we are speaking about the same "tags" ?
Maybe we should take it from the beginning :
1 - I dont want to import or export anything IN "XML" and/or outside of InDesign.
2 - I dont want to "TAG" my final text, nor create structure or math(s) or paragraph or style or anything like that.
3 - I want to "TAG" the text inside my CSV file, and that file must be "interpreted" (like a PHP server which compute the tags and create a result) inside a kind of text box (probably a special one ?), which give me the "final text".
4 - I only need "bold", "italic", "sublined", "return to the line carriage".
I will give an example because I feel we are not understanding each others :
The CSV file contain :
Hi, I'm a <bold>BOLD</bold> word, nice to meet you.
The final text box of InDesign must show :
Hi, I'm a BOLD word, nice to meet you.
I didnt saw it on the web, but I know it's possible.
So you'll need styles built in InDesign - specifically character styles.
When you import your text - it will have to be an XML file that you import using File>Import XML
And then you MAP your <bold> tags to the character styles or relevant styles you want.
CSV files cannot contain formating - they are text only and don't retain bold etc.
So you'll need to work with XML files - or save your CSV files as XML.
I posted links earlier to XML workflows.
It's a bit of a learning curve - but you have the background to follow it
As I said, the content CANT be inside the XML file, since it's inside the CSV file, because InDesign can only work with CSV/TXT file when it's about Data Merging.
What you attribute to PHP is just an accident - PHP outputs the text as is, even if it contains HTML formatting instructions. These instructions then do their thing in the web browser. InDesign is no web browser, so it will render anything including the HTML formatting instructions as plain text.
Beyond Data Merge, InDesign supports various other text formats - tagged text and ICML. These also support text formatting via proprietary tags, but lack some convenience processing that you have seen from Data Merge. Again a script can be used to glue things together.
That is a quandry!
Is it possible to pre-format the merged data.
So your CSV file should contain only the text of the merge, nothing else.
In InDesign, you can set your Data Merge items into the layout, and you can style those anyway you want.
For instance, CSV says -
In InDesign you'd see
<Name> - and you can pre-style this with what you need.
What it won't do is if you have in the CSV file
You can't split
<Name> into two
<Firstname> <Last Name>
If you're introducing a sentence it will be very difficult to split it where you need bold text and italics etc. very hard to do.
But InDesign paragraph styles can contain GREP styles.
So you can make a paragraph style that instructs the text to go something like this.
Hi 😉 ,
Indeed, I used GREP Styles, and, it works !
I even been able to create "autosized text" inside text box 😄 ! (By counting the number of character and changing the size. But I had a dilemma/quandry : autosize, or adding "return to the line" fonction, I chose autosize).
Subject closed 😉 !