Qlingo rule for formatting a centered tab position for a field

76 views
Skip to first unread message

Scott Evans

unread,
Sep 15, 2021, 5:50:41 PM9/15/21
to XMPie Interest Group
How can I script a field to return at a given tab position?

Say I want to return a field Addr1 at a centered tab position of 6 picas. Can I do this with QLingo instead of InDesign?

couch

unread,
Sep 15, 2021, 6:29:38 PM9/15/21
to XMPie Interest Group
The tab position is defined in InDesign - either by overriding the selected paragraph setting, or by defining a paragraph style.
You can add the tab character to your address ADOR using qlingo:    \t & |->[address]
I am not sure that you really want to "script" the position?  Are you saying that you want the address of record 1 centered at 6 pica, and record 2 at 7 pica?
If this is what you want, you can use Adobe Tagged Text - this will give you the opportunity to change the tab position in the text file. 
For example, this qlingo:

"<UNICODE-WIN>\r\n" &
"<Version:15.1><FeatureSet:InDesign-Roman><ColorTable:=<Black:COLOR:CMYK:Process:0,0,0,1>>\r\n" &
"<DefineParaStyle:centered=<Nextstyle:centered><pTabRuler:72\,Center\,.\,0\,\;>>\r\n" &
"<ParaStyle:centered>\t" & |->[address]

defines the font face, size, color and tab position (in pts).

Scott Evans

unread,
Sep 15, 2021, 7:08:35 PM9/15/21
to xmpie...@googlegroups.com
My problem is that I need to eliminate tabs for unpopulated fields so that the last text line flows up under the last populated field. So my document has a maximum of 28 fields in 3 tabbed columns but if the record has only 7 of them populated then I want a line of static text to be centered under the last populated field but I can’t because the tabs for all 28 separate it. 

On Sep 15, 2021, at 5:29 PM, couch <sco...@gmail.com> wrote:

The tab position is defined in InDesign - either by overriding the selected paragraph setting, or by defining a paragraph style.
--
You received this message because you are subscribed to the Google Groups "XMPie Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmpie-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xmpie-users/b8f9d57d-94db-4f6d-8c23-e2e1e227177fn%40googlegroups.com.

couch

unread,
Sep 15, 2021, 7:14:40 PM9/15/21
to XMPie Interest Group
So, you're putting all the fields together into a text box and putting a tab in between in the document design?

Then why not test if the field has values before adding the tab? Like this:

if (IsNullOrEmpty(|->[address]))
{ "" } else { "\t" & |->[address] }

Naturally, you do that for all 28 ADOR objects and remove the manually entered tabs in the design.

Scott Evans

unread,
Sep 15, 2021, 7:29:51 PM9/15/21
to xmpie...@googlegroups.com
Thanks so much, I’ll try this and let you know how it works. 

On Sep 15, 2021, at 6:14 PM, couch <sco...@gmail.com> wrote:

So, you're putting all the fields together into a text box and putting a tab in between in the document design?
Reply all
Reply to author
Forward
0 new messages