Mixed formatting in document titles

I know that you can set up consistent formatting for document titles using Compile. However, I want to mix bold and italics in the same document title. I use Scrivener to draft legal memos, and a section title will look something like: Admitting Character Evidence using the R v Handy Criteria.

How can I do this?

I’m afraid that isn’t possible if you want to have the compiler generate the titles. You would need to print the titles in the documents, and leave that option off in the Compiler. Look into the Format/Formatting/Preserve Formatting tool. You may want to add that to your title preset, as it will protect the formatting of the title if you otherwise use the compiler to clean up the formatting in the document text area.

I’m not sure I understand — could you spell out a little more clearly how I could achieve the same or a similar result by putting titles in the document? And is this something you’re planning on fixing in future updates?

No problem. Here is a screenshot showing two editors side-by-side. Both have the title typed into the document (much like you would do in a normal word processor):

In the left editor, we just have standard rich text formatting. If when you compile the fonts and formatting of your text is exported as you see it in the editor, then this method is fine. If however when you compile, the fonts and formatting change, then you’ll want to use something as shown in the right editor. The blue box indicates that the area will not be changed by the compiler. This is applied with the [b]Format/Formatting/Preserve Formatting[/b] menu command on the currently selected text. As noted, this can be saved into a preset so that you can achieve the title look and preservation of its formatting in one step in the future.

Now, in the Formatting pane of the compiler, you’re going to want to disable the checkmarks in the “Title” column, so that you don’t get double titles.

This process should give you maximum flexibility. It’s a perfect viable way of working. The title generation in the compiler is convenient, and handles the large majority of what people need, but if you need a little more, this is the route to take. Some people prefer it as it leaves the binder titles for internal usage.

It would be difficult for us to change how this works because the title field in Scrivener is plain-text. It cannot hold formatting like italics.

Thanks for your answer! I’ll give this a try. In the meantime I’m wondering about the relationship between document titles and Multimarkdown support, but I’ll post it as a new question here: [url]https://forum.literatureandlatte.com/t/markdown-conversion-doesnt-work-with-document-titles/24359/1]

I’m asking this for a friend who needs to use italics in his document titles.

Is it still possible to utilise <$hn> numbering in titles if you print the titles within the document and use preserve formatting? I presume that Scrivener doesn’t interpret it as a title and so wouldn’t necessarily count the <$hn> placeholder tag properly on compile.

Is it possible to have a mix of document titles coming from the binder and coming from within the document itself and still have appropriate numbering?

By and large it doesn’t matter too much if you spread your title out so that some is coming from Formatting and the rest from elsewhere. The following pointers may be helpful in choosing the best route to take:

  • The <$hn> tag will work no matter where you put it, as will all placeholder tags, but especially that one. It isn’t a counter so much as a generated number from the binder hierarchy.
  • You can have a mix of styles in the title field. The Prefix, Title and Suffix are all considered separate in regards to formatting. They will all share paragraph formatting, unless you insert a paragraph break into the prefix/suffix fields. In that case, you could even change alignment and other spacing attributes, never mind the font itself or its variants. So in many cases, where the font variation is procedural (such as the chapter label and number in one font and the descriptive name in another) the Formatting pane can produce that look.
  • If you don’t need the title to “be” something you have a lot of flexibility as it just needs to end up looking right. If part of the title is coming from the Formatting pane and the other part the editor, so long as the spacing and everything looks good then run with it. Where that may get a little confusing is when you rely on bookmark names to be meaningful in a word processor, for cross-reference purposes, e-book ToC generation, or desire proper <h#> levelled output for e-book and HTML. Some of that may not matter, some of that can be worked around, but it’s something to consider if you plan on breaking the semantic title into multiple pieces.

Thanks for the info, Amber. We’ve managed to come to a nice workaround by doing the following:

  • Replicate the title prefix and suffix and title in the document itself, with all formatting (including the italics where needed), and the <$hn> tag wherever it needs to go,
  • Turn on preserve formatting for the title section (is this even necessary if formatting is not overwritten anywhere during compile?)
  • Check the ‘as-is’ checkbox (to turn off the title) in the relevant document in the compile settings
  • Compile

The document comes out with the intended formatting and numbering.

Great! That should work fine.

No, but it doesn’t hurt to have it either, so if you ever change your mind on override it’s one less thing to worry about.