unofficial-uoregon-dissertation-formats / unofficial-uoregon-grad-school-dissertation-latex-markdown-apa-format

A dissertation LaTeX stylesheet with Markdown support for the University of Oregon using APA format (This repository is not officially associated with the University of Oregon).
Other
24 stars 18 forks source link

Section numbers? #6

Open shaomeng opened 6 years ago

shaomeng commented 6 years ago

Hello,

I'm using this template for my dissertation right now. I'm wondering if there's a way to turn on the section numbers, since there's currently only chapter numbers. I did try to add numsections in my \documentclass settings, but it doesn't seem to help...

Thanks for advance for any tips.

Sam

jglev commented 6 years ago

Hello,

Thank you for posting here!

This repository is primarily for tracking changes that people have made and submitted back to the repo.; I'm not able to do development work for specific cases. Thus, if you figure this out, or speak with another grad. student who figures it out, please do submit the changes here!

If anyone else sees this issue, this ticket is also a good space to discuss and collaborate on solutions for this request.

My very best, Jacob

zalsaeed commented 3 years ago

@shaomeng, did you figure this out. I see that numsections use is suppressed by the other explicit command \setcounter{secnumdepth}{0} found in 0_uothesisapa_preamble.tex. However, even after removing \setcounter{secnumdepth}{0} the sections numbering is not working as expected (e.g. 1-level numbering although it was set to be 2 in cls). Double-checking to avoid unnecessary deep dives into this.

shaomeng commented 3 years ago

Hi @zalsaeed , I eventually got it right, but cannot remember which magic command did the trick. I attached my configuration files here so maybe you can take a look and figure it out too!

barebone.tar.gz

zalsaeed commented 3 years ago

Thanks @shaomeng for sharing your config files. This saved me a lot of time. The solution is simple now so I'm going to document this here for anyone who might need it in the future.

Simple Fix (full section numbering in both ToC and body)

To get the section numbing for all levels in both ToC and body of the document you only need to add the tocloft package \usepackage{tocloft} to your 0_uothesisapa_preamble.tex file. Also, you need to remove the command \setcounter{secnumdepth}{0} at line 79 in 0_uothesisapa_preamble.tex which reset the numbering level in the original version of the file to chapters only.

I personally think that L79 in 0_uothesisapa_preamble.tex should not be enabled by default as it creates some confusion.

Possible Source of Confusion

Somewhere in the documentation, you are advised to use the option numsections in defining the document class to enable section numbering. So instead of

\documentclass[dissertation, copyright, approved, final]{uothesisapa}

You do

\documentclass[dissertation, copyright, approved, final, numsections]{uothesisapa}

The option naming hints that you will get the full section numbering while in the class file uothesisapa.cls you can see that it is defined to enable a two-level (chapter and section) numbering only.

However, the fact that the section numbering was suppressed in L79 of 0_uothesisapa_preamble.tex is the only reason you don't get full section (chapter, section, subsection, and subsubsection) numbering out of the box. The use of package tocloft is only to fix the indentation of the ToC.

shaomeng commented 3 years ago

Hi @zalsaeed , glad you figured it out! I'm wondering if you can submit a pull request so the next person doesn't need to come to the issue list anymore?

zalsaeed commented 3 years ago

I can, but not sure if this would be considered a styling change. If I don't hear otherwise from @publicus in the upcoming few days I will create a PR.

jglev commented 3 years ago

If I don't hear otherwise from @publicus in the upcoming few days I will create a PR.

@zalsaeed, go for it! Thank you for your work! This very much sounds like a substantive change to me.