In an Indesign project I'm tagging a book consisting of spreads of similar layout. Each spread has some text on the left and a photo on the right page. The text usually consists of two or more paragraphs. Those are not marked in the export XML, but the paragraph breaks appear just as space characters. When I edit the XML and insert paragraphs (0A) and re-import the text, those inserted paragraphs show up as intended, while the original formatting is lost. How would I export tagged text containing paragraphs and re-importing it without losing the original formatting?
-
For XHTML to InDesign see http://stackoverflow.com/a/20264198/214446 – mb21 Nov 28 '13 at 10:58
1 Answers
I'm not precisely certain of why you are trying to accomplish via the export and re-import, but hopefully this can help. I'm working in CS6, but if you're in a different version, this should still get you at least closer even if it isn't an exact match to your process.
Tagged Text
If you're just wanting to take a bit of text, export it, and re-import it with all of the original formatting, then you'll be wanting to utilize InDesign Tagged Text. Be aware that this method does not import any columns, text frames or graphic elements, even if they are inline with the text body.
To accomplish this, place the cursor inside the text frame that contains the text you want exported. Make sure the text cursor is actually inside the text frame as if you were going to type something, and that you don't simply have the text frame as a whole selected (Hint: use the Type tool, not the Selection arrow). Now if you go to File > Export you should have an option at the top of the Save as type pull-down for Adobe InDesign Tagged Text. Choosing this will create a TXT file that can be File > Place'd into any other InDesign document. It will bring in all the necessary swatches, paragraph styles, and character styles.
If you're relatively familiar with XML type structure, you should be able to even look into this TXT file, and see how they're applying and defining styling for all of the text.
Snippets
If you're instead trying to bring a larger layout of graphic elements and text as well as their colors, styling, and relative positions to each other then you'd want to use Snippets.
In this case, you can select the objects and text frames that you want to be able to import later, and once again go to File > Export. From that Save as type pull-down, select InDesign Snippet, and export the IDMS file. The import process is identical to that of the tagged text, simply go to File > Place, and then choose an insertion point.
I find this IDMS file to be a much better representation of the page content than the XML exports. I believe the XML export is much more useful if you've taken advantage of actually setting up an XML structure inside your document.
If I've missed your goal in this, please feel free to clarify your question, and I'll do my best to help.

- 271
- 1
- 6
-
Thank you for your input. As for my motives: I'm exploring how InDesign fits in a data-based workflow for a large book-publishing project (with about 80 similarly designed titles and about 40 foreign language editions). The first question is if I could tag a whole book design, export it to XML and use this as a template into which the database export would go. - Snippets don't seem to be available in CS5 (which is the version I'm working with), but there is format called IDML which seems to contain all necessary information in a structured, yet accessible XML format. Let's see how this works.. – Alex Monthy Sep 20 '13 at 11:14
-
I would definitely recommend IDML instead, we tried using InDesign's XML tools, but they are very buggy and slow. Better to do it outside InDesign where you can control the construction of the document yourself. – Josh Voigts Sep 20 '13 at 13:27
-
IDML seems to be quite complete, but also quite cryptic in referencing and positioning xml files and blocks. Just now I'm trying an alternative approach: scripting the whole layout process from scratch to the finished book, using database input for the content. – Alex Monthy Sep 20 '13 at 15:04