Mobile app version of vmapp.org
Login or Join
Annie732

: Column align text (InDesign) Not sure exactly how to describe this, but here goes... I have some key/value pairs that I want to display separated by a colon: Name : Some Person

@Annie732

Posted in: #AdobeIndesign #Xml

Not sure exactly how to describe this, but here goes...

I have some key/value pairs that I want to display separated by a colon:

Name : Some Person
Description : A description that
can span multiple lines
Department : D1


The values will be imported from XML at some point. The description value can be short, but also long enough to break into multiple lines. Important is that I don't know how long the description will be up front.

How can I make the description to align with the colons? At this moment this is what I get:

Name : Some Person
Description : A description that
can span multiple lines
Department : D1


I'm using Adobe InDesign CS6.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Annie732

3 Comments

Sorted by latest first Latest Oldest Best

 

@Gail6891361

Make a new Paragraph Style. Set tab positions to align the labels, colons and start of the contents of the field. Set the Paragraph Indent and First Line Indent so that the first line of an entry (starting with the label) begins at the left, and any subsequent lines start indented. (The First Line Indent with be the negative of the Paragraph Indent.)

To make the indentation quickly appear in your imported text. Do the following:


Select Edit -> Find/Change

Set find what fields value to " : "
Set change to fields value to"^t:^t"
Press Change All



Some finesse, if your text can contain many colons then use grep match for anything except : starting form the beginning of paragraph, and than colon. The GREP expression would look like this:

(^[^:]*?)s*:s*


and replace by:

t:t


Now it can handle possibility of already tabulated text and many other problem variations (but not all).

10% popularity Vote Up Vote Down


 

@Speyer780

Assuming that your description is one paragraph, set up your style so that the indents force the text to align with the colon. Once you import the text, apply the paragraph style, and everything should line up nicely.

10% popularity Vote Up Vote Down


 

@Fox8063795

Looks like you need an 'indent to here' character. Not sure how your artwork is set up, but you could add it to that. There may be a code you could add to the XML to do the same thing.

CTRL- or CMD- depending on your platform, insert it before the first character of the description.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme