After close to three years working with Scrivener+LaTeX, I’ve become more familiar with the software and my focus is gradually shifting toward formatting. The Scrivener+LaTeX combination of software has proved exceedingly flexible, and has greatly facilitated my limited writing skills.
My current interest is to implement two LaTeX features as to:
1) How titles appear in the Table Of Contents (TOC) and
2) How titles are displayed in the TOC versus how they appear in the Body of the document.
For those less familiar with the Scrivener → LaTeX workflow, there are a few work-flow terms I use:
pre-Scrivener-complied code → Scrivener compiler → post-Scrivener-complied code ( = pre-LaTeX-complied code )
with the next step being:
pre-LaTeX-complied code → LaTeX compiler → post-LaTeX-complied code
1) On page 863 of the Mac Scrivener User Manual, regarding Unnumbered Chapters and Unnumbered Sections, it states:
I experimented with two separate approaches to implement Unnumbered Chapters and Unnumbered Sections.
First, in Scrivener I manually added an asterisk (*) inside the pre-Scrivener-compiled Chapter and a Section Titles. My goal was to see if Scrivener magically would add an asterisk to the \chapter{ and \section{ commands in the post-Scrivener-complied code (e.g. change the LaTeX commands to \chapter*{ and \section*{ respectively in the pre-LaTeX-compiled code).
In the resulting post-Scrivener-compiled output, Scrivener did not add an asterisk to either of the \chapter{ or \section{ commands in the post-Scrivener-compiled (pre-LaTeX-compiled) code! (No surprise there…) (See Footnote below)
Just to check, I then manually added an asterisk inside the \chapter{ and \section{ commands in the post-Scrivener-compiled (pre-LaTeX-compiled) code. In each case, I wanted to see if the resulting post-LaTeX-complied titles were UNnumbered, as they should be. Scrivener did in fact create an UNnumbered Chapter and Section, thus confirming the LaTeX option to generate UNnumbered Chapters and UNnumbered Sections by inserting the asterisk (*) inside the \chapter{ and \section{ commands.
Second, after poking around a bit, I also checked to see if there was a Scrivener option to assign an Unnumbered Chapter and an Unnumbered Section to a Chapter and Section from within Scrivener.
In the Scrivener Project Format screen, I noticed there were options for both Unnumbered Chapter and Unnumbered Section Layouts:
However, the same options did not exist in the Project → Project Settings... → Section Types screen:
So, I manually added both an Unnumbered Chapter and an Unnumbered Section to the Section Types hoping that would allow me to create an Unnumbered Chapter and an Unnumbered Section:
I proceeded to assign the Unnumbered Chapter and Unnumbered Section Section Types to a Scrivener Chapter and a Section respectively. I then compiled the Scrivener project and checked the post-Scrivener-compiled output to see if it had added an asterisk toward the end of either the \chapter{ or \section{ commands in the post-Scrivener-compiled (pre-LaTeX-complied) code! Scrivener did not.
So I am back at square one with regards to implementing the LaTeX Unnumbered Chapter and Unnumbered Section from within Scrivener. ;-(
2) As outlined in a message posted on SE: LaTeX - Different section names in TOC from body, there exists a LaTeX option to specify separate titles for the TOC versus the Body of the document for the same Chapter and Section by adjusting each LaTeX command code as follows:
\chapter[<Title-in-the-ToC-for-the-Chapter>]{<Title-in-the-Body-for-the-same-Chapter>}
\section[<Title-in-the-ToC-for-the-Section>]{<Title-in-the-Body-for-the-same-Section>}
As a test, I entered the above code changes for a Chapter title and a Section title from within Scrivener to see if the post-Scrivener-compiled code would result in separate titles for the TOC verses the body of the document (I was doubtful). The Scrivener compiler did not make the hoped-for adjustment to the code.
Note: I of course could have manually made the above changes to the post-Scrivener-compiled (pre-LaTeX-complied) code that is generated after I compile my Scrivener project file. I am, however, throughly averse to doing so as it would represent a significant change to the workflow that sustains Scrivener as the original, and only, source document. I could also have implemented a Scrivener Replacement scheme whereby I include a unique code within Scrivener to indicate the presence of [<Title-in-the-ToC-for-the-Chapter>] {<Title-in-the-Body-for-the-same-Chapter>} coding in order to have Scrivener then create separate TOC versus Body titles, but my failing memory would likely forget what I did, resulting in mass confusion and delirium on my part as a result. Not a good option.
Instead, I’m listing these two items here for possible consideration as a possible feature for Scrivener+LaTeX users like myself to have the added degree of flexibility when working with Scrivener+LaTeX to:
-
Access the
Unnumbered ChapterandUnnumbered Sectionfeatures within LaTeX, and -
Access the separate
[<Title-in-the-ToC>]versus{<Title-in-the-Body}features within LaTeX.
Thanks for reading,
scrive
![]()
Footnote: In a posting on L&L on Aug '12 by AmberV, they mention that:
While there, you might notice that Fletcher has coded in what appears to be, preliminary support for an automatic switch to \chapter*{etc}. If the chapter name “Ends With an Asterisk*”, then it triggers the part of the rule that uses \chapter* instead of \chapter.
I realize that the above statement was made in conjunction with the MultiMarkdown-Support-Mac package from GitHub, (which I am not inclined to incorporate into my existing project). However, as it has been over a decade since AmberV’s post, I thought perhaps the feature to recognize an asterisk toward the end of a Scrivener Chapter and/or Section Title might have been incorporated into the most current version of Scrivener. It apparently has not.









