This content has been marked as final. Show 3 replies
A Paragraph is a stretch of text between two returns (paragraph marks).
A Word is something that InDesign is sometimes confused about: in the interface, double-clicking selects a word
This content has been marked as final. Show 3 replies
A Paragraph is a stretch of text between two returns (paragraph marks).
A Word is something that InDesign is sometimes confused about: in the interface, double-clicking selects a word and selects all consecutive letters. In scripting, when you place the cursor somewhere in a word and run app.selection.words.contents you'll see that Word means "anything between two spaces, two em-dashes, or two en-dashes (or a combination of these)".
A Text is anything that's not a Paragraph, Word, or Character. Select half a paragraph and you'll get a Text; select several paragraphs and you'll get Paragraphs or Text, depending on how you select them: if the first and/or the last paragraph in the selection are not completely selected, you end up with a Text; if they are completely selected, you get Paragraphs.
As to hierarchy, a Story contains Paragraphs, which contain Words, which contain Characters. A Story also contains Text (or TextStyleRange, if there's any formatting present). A Text can contain Paragraphs (and therefore Words), and a single Paragraph can contain Text. So the hierarchy is clear and simple, apart from Text, which has a variable relationship with other text objects.
Some playing around with selections and running the single line app.selection in the ESTK console is instructive.
and there is also Line - as "line of text" - and TextColumn
Thanks for all the useful information!
Are you going to use the Niemann-Ross WIKI to document such things or is there another place where you (I) could paste this?
@Peter: I bought your TecFeed about InDesign Scripting and it helps a lot but I am still searching for something that covers all this "general" information as well - is there anything?