0

I would like my Table of Contents to look as follows:

Attachment 1      Attachment Name    (Para Style: "Att Lvl 1")

Attachment 2      Attachment Name    (Para Style: "Att Lvl 1")
   Section 2.1    Section Name       (Para Style: "Sec Lvl 2")
   Section 2.2    Section Name       (Para Style: "Sec Lvl 2")

Attachment 3      Attachment Name    (Para Style: "Att Lvl 1")
   Section 3.1    Section Name       (Para Style: "Sec Lvl 2")

My OpenType Figure Style is set to Tabular, so each number is the same width. However, unlike the snippet above, the text is not monospaced.

My ToC currently does not look like the above however. It currently looks like this:

  Attachment 1    Attachment Name    (Para Style: "Att Lvl 1")

  Attachment 2    Attachment Name    (Para Style: "Att Lvl 1")
   Section 2.1    Section Name       (Para Style: "Sec Lvl 2")
   Section 2.2    Section Name       (Para Style: "Sec Lvl 2")

  Attachment 3    Attachment Name    (Para Style: "Att Lvl 1")
   Section 3.1    Section Name       (Para Style: "Sec Lvl 2")

The only difference is there is a misalignment with the "Attachment #" above.

These are the current Numbered List settings for "Attachment Level 1":

  • Number: Attachment^>^#^.^/^t
  • Number Alignment: Right

These are the current Numbered List settings for "Section Level 2":

  • Number: Section^>^1.^#^t
  • Number Alignment: Right

Note that in "Attachment Level 1," I set placeholder spaces for the section numbering (^. being a punctuation space and ^/ being a figure space). Again, as my figures are set to Tabular, a figure space is the same width as a figure (theoretically).

It looks like InDesign is ignoring these placeholder whitespace, which is causing the misalignment as seen in how my table currently looks.

I also tried changing the number alignment from "Right" to "Left". But as the text is not monospaced and the words "Attachment" and "Section" are different widths, getting the proper left-indent of "Section" to align the numbers involves a lot of meticulous work to still be unsure it's actually aligned perfectly...

To get around this, currently I've set the Number to Attachment^>^#.0^t:

Attachment 1.0    Attachment Name    Para Style: "Att Lvl 1"

Attachment 2.0    Attachment Name    Para Style: "Att Lvl 1"
   Section 2.1    Section Name       Para Style: "Sec Lvl 2"

But this is less than ideal.

So my question is, how to get InDesign to stop ignoring the placeholder whitespace between ^# and ^t in "Attachment Level 1?"

If this is actually impossible (it probably falls under the category of "trailing whitespace"), then I will need to probably left align the numbered list and figure out a precision method of aligning the numbers after the words "Attachment" and "Section" on a non-monospace font using left-align. Which I believe is a completely different topic to what I am asking in this question. So to appease the Stack Overflow best practices guidelines, I am refraining from asking about this.

Thank you.

1
  • I don't think you need to narrow down your question that much. If I were you I would do a few edits to open up for any answer that leads you towards the wanted result. On this stack that's not a problem. You don't have to go down to atom level like on Stack Overflow. Actually it can be counter productive to do so since you then have to keep asking about different methods until you by chance choose the right one.
    – Wolff
    Commented May 23 at 20:30

1 Answer 1

0

InDesign always ignores trailing whitespace on right aligned text. It's not isolated to numbered lists. So the proposed method won't work, I'm afraid.

It took me a while to understand that you are applying the numbering in the Paragraph Styles you use for the TOC and don't include them from the actual headings. I think I would've done the latter and manually done a few edits to the TOC in the end.

But you seem to be set on keeping the TOC fully dynamic, so I'll explain how I would do the styling with left aligned numbers, as you suggest yourself. It's not very complicated actually.

  • Make a text frame with the word "Attachment" and another with the word "Section". Both set with the same styling as in the TOC of course (but without automatic numbering).

  • Select both text frames and press Ctrl / Cmd + Alt + C to Fit Frame to Content.

  • Right (or left) align the two text frames.

  • Draw a rectangle that snaps to the gap between the two text frames to find the difference in width.

  • Copy the width of that rectangle and paste it into the Left Indent setting of your "Section Level 2" Paragraph Style.

It seems to be precise, at least for the naked eye.

The downside of this method is obviously that if you decide to change either of the words "Attachment" or "Section" to something else or change the styling, you have to do this measurement once again. A smaller nuisance in my opinion. It's not uncommon in typesetting for things not to be completely dynamic.

There is an inherent limitation in your design idea though: What happens when you get to two-digit numbers? Only solution I can see would be to introduce a space before the one-digit numbers to keep things aligned. That extra space could maybe look a bit weird, but what other options are there?

To achieve that, I can't really see any other solution than to edit the TOC after creation by adding tabs manually (or by using Find/Change) and meticulously calculating their positions. These tabs would have to be added every time the TOC is updated. But that's for another question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.