Underline extends into preceding white space in heading title

I’m trying to make a heading layout that indents and underlines the title. However, I don’t want the indentation to be underlined and I’m having problems preventing this. I’d appreciate any help.

In pseudocode, I’m trying to get

TAB <$aon> TAB my_title <\underline>

So the first tab is not underlined, but the title number, the title itself and the tab in between are underlined. I have to export to Word for Mac 16.13.

In my experiments, I set up the tabs and title numbering as a title prefix
TAB<$aon>TAB
so both the preceding tab and the in-between tab are created there. I’ve experimented with several approaches to controlling the formatting, but they all result in the same problem - I can’t keep the preceding tab from being underlined.

When I export to rtf and open in Textedit the preceding tab does not appear underlined, but unfortunately when I export directly to Word or open the rtf with Word, the preceding tab is underlined. I’m sorry to say that the consumers of my output require docx.

As a workaround, I can repair the problem in Word. I’d appreciate any help with this technical problem.

thanks,
John

Hi John,

The problem here is that you can only apply a single format to the title prefix, and the tab is part of that prefix, so the underline style will get applied to it. (The NSText system that TextEdit and Scrivener uses may not show that underline on a tab at the start of a line, but it is there.)

This should be easily solved if you use a paragraph indent instead of a tab, though. Is there any reason you are using a tab here instead of indenting using the ruler?

All the best,
Keith

Thanks Keith,

this solves the problem nicely.

John