Hello,
I’m having some trouble getting the numbering in my document right. I suspect that the issue is in the Latex world, but I’m wondering if there is something I can set in the compile format to fix this.
I have my document setup in a Chapter/Section/subsection structure. The Project setup seems to work, the tex file structures the sections how I want them.
But the numbering I get from running it through TexShop results in Chapters and sections numbered, subsections at the right level, but left without numbers.
I know there are some posts on this forum about this, but somehow I can’t get the numbering to come out.
So I would like it to be
N. Chapter
N.N. Section
N.N.N. Subsection
My document correctly assigns Chapter, Section and subsection, but this is the numbering I get:
The subsections are left without further numbering.
I tried to put in \setcounter{secnumdepth}{3} in my mmd leader, but it won’t change the result (also tried to set the level to 4 and 5, just in case, but nothing changed)
So I wonder if it is the right command to use, and if I’m putting it in the right place. Where should it go? Is there something in the compile settings in Scrivener that I can set this with instead?
Thank you!
What LaTeX class are you using? If the class is memoir
(which I think MMD mostly uses) then the correct commands are these into your frontmatter or template:
\setsecnumdepth{subsection}
\settocdepth{subsection}
See section 9.2 of the memoir manual: https://sg.mirrors.cicku.me/ctan/macros/latex/contrib/memoir/memman.pdf
And subsubsection
if you have a level 4 etc. For other classes the commands should be \setcounter{tocdepth}{N}
to set the TOC visibility and \setcounter{secnumdepth}{N}
for numbers themselves but again it depends on the class.
This is really why I dislike LaTeX, each class has some “better” way to do something and it isn’t always easy to find the right answer…
2 Likes
Thank you so much, that’s solved it. I’m using the memoir class, I adapted a leader file a few years ago to make it work for my layout settings. Just added your commands in the layout configuration in the leader and it worked.
In case it’s of interest, I use MacTex for the compilation workflow, so MMD → Latex out of Scrivener, then run the “Bibliography” Applescript Macro that comes with the TexShop software to generate a pdf.
Thanks to this forum and some of the Latex community ones, I’ve been able to make it work with my very limited Latex knowledge.
Thank you!
2 Likes