Question: In a table of contents, is it possible, perhaps via a script, to append content from a second paragraph style directly after the first?
Image captions in my book of orchid photos consist of a shorter image title (style ImageID) for use directly within or below the image, followed by a hidden, longer explanation of growing habits, other taxonomic data of interest, etc., as style ImageDesc. In the back of the book will be something like a table of contents, listing, in each entry, in order, without line breaks, text beginning with style ImageID followed by a visible descendant of ImageDesc, "ImageDescTOCEntry".
Each entry of ImageDescTOCEntry now appears as a new paragraph after ImageID, and that works fine. However, the book design requires that each table entry flow smoothly from ImageID to the rest of the text for that image. Each instance of ImageDesc content begins with a leading dot-space for this purpose.
At present, a human editor is obliged to go chasing through the table, removing the unwanted line-feeds to make the text flow as designed.
If possible, I would like to have a scripted or other solution to fix this. I anticipate publishing a number of books of this type. Any ideas appreciated.
Found a partial solution: Duplicate the ImageID text within ImageDesc. While not perfect, it allows me to move forward.
A new question arises from this move: Is it possible to write a script which adds a copy of the ImageID text to the beginning of the ImageDesc text?