Copy link to clipboard
Copied
I'm a software developer working on an InDesign-to-web integration for a publishing company.
The first step of the integration is to tag the contents of an .indd file, then export the tagged structure as XML. Each column (or flowing columns) of text is tagged as a paragraph. For example, an article with 3 columns of flowing text is tagged as a "paragraph". Inside of a column tagged as "paragraph", there are multiple groupings of text.
In the screenshot below, the blue outline represents the element tagged as "paragraph". The yellow highlights represent where one group of text ends and the next begins.
When I export the tagged content, I need to include line breaks (denoted by the yellow highlight) so I can properly distinguish one group of text from another as I translate it into HTML code. Currently, the export doesn't include line breaks, so the text is converted to the web as a single blob of text.
In the screenshot below, the red lines represent where one group of text ends and the next begins. Ideally, the export would include a new line character in that position.
Is it possible to add a carriage return/line break character between each block of text?
Notes
I understand a HTML export exists, but we chose to go with the XML export instead for many reasons:
Control over the order of placement of text & image content.
Copy link to clipboard
Copied
Hi,
A true surprise to me but indeed if you tag a story (or its container by extension), the carriage returns won't appear in the exported XML ! Once that said, your options aren't that numerous. Either you tag paragraph themselves (you can later remove the extra tags with XSLY on export if needed) or add a tag (think of a dummy <br/>) at the end of every single paragraph.
Unless I am wrong…
Copy link to clipboard
Copied
That is consistent with what I've found. Unfortunately, it would be difficult to convince the designers to tag every individual paragraph for every magazine. It becomes more difficult when considering text content which flows across multiple columns (paragraphs split between pages).
It seems only hard-tab characters will appear in the XML document.
Copy link to clipboard
Copied
MParsons095 a écrit
it would be difficult to convince the designers to tag every individual paragraph for every magazine
They don't have to. They can either map styles to tag (see tags panel flyout menu); that consists in asking inDesign to autotag any contents where the style is applied (but yes, it has to be done for every single paragraph style applied).
Or you can create a startup script based on beforeExport event so you would add br tags on the fly, do export, remove br tags.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now