I’m creating a book of poems. To create a TOC in Word I need to have the title of each poem as a word style Heading 1. I’ve seen multiple posts in the forum saying it just works, but in my particular case it doesn’t seem to - probably my misunderstanding.
The title of each poem is in the custom metadata field “Title”
To apply it to each poem when compiled I make the text section (my poem) prefix <$custom:Title>.
I apply the Heading 1 style to that placeholder in Scrivener.
When I compile
The appearance of the poem’s title is what I want, but the Word style “Heading 1” is NOT applied.
Question: What must I change so that the Scrivener “Heading 1” style is applied in the compiled Word document?
Is it possible that there’s something unique about styles to the Prefix that’s causing my problem?
Not sure that if you are applying the style from within your compile format you get the same result as a style that is applied from within the editor… (I’m not a Word user.)
You should run a test where you’d insert the placeholder at the top of a document instead.
Then apply the Header 1 style.
Compile.
If that works, voilà, it’ll only take you a few minutes to copy that styled and functional placeholder to the rest of your documents.
And then remove it from your compile format.
I tried this reasonable-sounding solution and found that it did not work for me.
I conclude there’s something I don’t understand about being sure Scrivener Heading Styles are converted to Word Heading styles.
If you want to investigate, next step would be to then replace the placeholder with plain text.
Just a word; to see if in this case it’ll work.
If it does, you’ll know that it is a placeholder thing, and will proceed accordingly.
That’s what I’d do.
Also note that some users prefer to compile to RTF (rather than Docx) and let Word adapt the text to its proprietary format.
(But then again, as I said, I am not a Word user.)
Realize Editor Styles are different from Compile Styles. Insert the Editor Style ‘Header 1’ into the Compile Styles list in the Compile Format Designer’s Styles tab.
A small button at the top of the window lets you import Editor Styles into the Compile format.
Hope this Helps
1 Like
Thank you. That worked!
Weirdness - I had actually already done that, but was misled in Word because “Heading 1” did not appear in the usual location. It was actually present, but appeared not to be. In any case it is now working as I’d hoped, with a good TOC.
1 Like