<$hn> does not work in the Prefix tab

The placeholder <$hn> does not work in the Prefix tab ("<$hn>" appears in the compiled doc). I have to put <$hn> in the Title Options tab. This works but causes undesired returns in my compiled document. Shouldn’t <$hn> work in the prefix tab? If not, how can I get rid of the return appearing after <$hn> when it’s in the Title Options tab?

Check for a typo.
It works both ways for me :
(And I don’t get an extra carriage return either which way.)







I don’t understand that sentence, since the Prefix is part of the Title Options tab.
In the Prefix you may or may not include returns. Don’t include any if you don’t want them.
Also consider the “run-in head” setting in the following (and look it up in the manual). Disregard if Windows doesn’t have that option.

From your own screenshot :

Inked2022-03-22 22_19_15-$hn does not work in the Prefix tab - Scrivener _ Scrivener for Windows - Lite_LI

Okay. Good point, but you don’t need that tab. Use Title Options.

If I am not mistaken, the user doesn’t want the extra line setting it apart from the actual title involves.

My guess is that he/she was then doing :
Title suffix :
Carriage return

Which compiles as :
Body text

And I think
1.1 Body text
is what is wanted here.

I gave a screenshot of the option for that.

You actually gave a screenshot of what I believe the user to not want.

I showed the OPTION and said to look it up and consider it. That means deciding whether to check it or not.

1 Like

I guess that’s another way to do it. Ok.

With the “Insert title as run-in head” checked.

I’ll double-check for typos as recommended. I’ll also look for carriage return options. I’m pretty sure that I held the delete key down for a while at the end of the line(s) where I could do so. It’s almost as if the return is embedded invisibly somehow. I definitely see no paragraph markers anywhere. I’d certainly prefer to enter the code under the prefix tab, not the title options tab. On my reading of the manual, the code should work there.

Any carriage return present should actually be visible.

Yes, the <$hn> tag should work in the section prefix/suffix and anywhere outside the header/footer; the current behaviour is buggy and the placeholder is only compiling properly in those location if it is also used in the title or title prefix/suffix (which is why it works in @Vincent_Vincent’s example above). As part of the bug, seemingly, the unresolved tag in the prefix ends up on its own line, whereas normally the section prefix would not be without manually inserting a carriage return.

Given the bug, the way to do this for now is to enter the placeholder in the title prefix and tick the option there for “Insert title as run-in head”. That will put it on the same line as your following text.

Suffix maybe ?
(With a carriage return between the title and <$hn>.)
. . . . . . . . . . . . . . .

Perhaps, indeed, it is a bug? The compiler seems to have a lot of moving parts. See the pics to double-check my syntax and the results.

You’ve done it just fine.
It is a bug…

You’ll have to do it this way :

InkedInked2022-03-23 12_31_02-Window_LI

Either. I’d assumed from the earlier discussion that the user didn’t have a title included, but yes, if there’s a title that should precede it on a separate line, use the placeholder in the title suffix with a carriage return before it.

Indeed, it is. :smiley:

I want the enumeration right beside the text wothout any interference from the title. Anything done in the title area, including the latest suggestion by V_V, results in a return after the enumeration. I illustrate the suggestion of MM in the image below


Luckily, the title’s prefix/suffix are compiled even though a document’s title itself is set not to be included in compile.

That’d be otherwise a mess.

Please try my way
. . . . . . . . . . .


InkedInked2022-03-23 12_31_02-Window_LI

→ You don’t actually need that carriage return if you don’t compile with the document’s title.