ulyngs / oxforddown

Template for writing an Oxford University thesis in R Markdown; uses the OxThesis LaTeX template and was inspired by thesisdown.
https://ulyngs.github.io/oxforddown/
MIT License
221 stars 81 forks source link

Modify chapter numbering format #8

Closed gsarti closed 3 years ago

gsarti commented 4 years ago

I am using an adapted version of this project for my master thesis.

I tried to fiddle with the latex templates but I didn't manage to change the huge grey numbers that appear as defaults at the beginning of each chapter. Moreover, I wasn't able to identify the package responsible for their rendering.

I tried the titlesec approach, as suggested by many on StackOverflow, but it doesn't seem to work. Can you provide me with a minimal example that makes the format of chapter names editable?

Thank you in advance for your time!

ulyngs commented 3 years ago

Hi @gsarti ,

I never looked into how the huge grey numbers are generated, so don't know the answer unfortunately - as a starting point, see if you can find guidance on the GitHub repo for the OxThesis LaTeX template: https://github.com/mcmanigle/OxThesis

Ulrik

ulyngs commented 3 years ago

I just looked into this, you can change it easily yourself by adding something like this to template.tex after \usepackage{titlesec}:

(I took this example from here)

\titleformat{\chapter}[display]
  { \normalsize \huge  \color{black}}
  {\flushright \normalsize \color{red} \MakeUppercase { \chaptertitlename } \hspace{1 ex} { \fontsize{60}{60}\selectfont \color{red}  \thechapter }} {10 pt}{\huge}

This will override oxforddown's default chapter style and give you this:

Screenshot 2021-05-24 at 09 48 47
gsarti commented 3 years ago

Thank you for your answer and for the incredible work! I solved the problem during last year and I managed to publish my MSc thesis last December! :smile:

If you'd like to link to it in the examples section, you can find it here: https://gsarti.com/thesis/introduction.html

The edited source files are on Github, if you want to take a look: https://github.com/gsarti/masters-thesis.

ulyngs commented 3 years ago

added to the readme, thanks Gabriele!

ulyngs commented 2 years ago

And the answer provided in #52 for how to move the chapter title to the left: Add the following to template.tex after \usepackage{titlesec}:

\titleformat{\chapter}[display]
  { }
  {\flushleft { \fontsize{60}{60}\selectfont  \thechapter }} 
  {10 pt} % spacing before chapter title
  { \huge } % command after chapter number (this will make the chapter title size huge) 

This will give you

image