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
220 stars 80 forks source link

mintoc: triple spacing between lines on second page #49

Closed jadebarclay closed 2 years ago

jadebarclay commented 2 years ago

One chapter has a long TOC, and the minitoc goes onto the second page. The spacing is perfect on the first page, then the minitoc continues with enormous spaces between lines.

How can I fix the minitoc spacing issue, when it's only different on the second page? Also, how can you insert a manual page break inside a long minitoc like this?

Thanks!

ulyngs commented 2 years ago

Can you give a reproducible example and a couple of screenshots, then I'll have a look? :)

jadebarclay commented 2 years ago

Thank you. I've made almost no changes to the raw oxforddown template. Here goes....

image image

output:
  #bookdown::html_document2: default
  #bookdown::word_document2: default
  bookdown::pdf_document2:
    template: templates/brief_template.tex
    citation_package: biblatex
bib-humanities: true
documentclass: book
#bibliography: [bibliography/references.bib, bibliography/additional-references.bib]
---
# Results {#results}
\chaptermark{Results}
\minitoc <!-- this will include a mini table of contents-->

## Descriptive Stats {#descr}
.
.
.
jadebarclay commented 2 years ago

What I'm trying to do:

  1. Single line spacing on the second page
  2. Insert a manual page break before item 3.6 (optional, but preferred)

I've been toying with splitting the content of chapter 3 into two chapters to work around this. But I'd really rather not do that! Thanks so much for looking into this :)

ulyngs commented 2 years ago

Can you provide me some raw markdown content I can copy-paste into a chapter to reproduce this issue myself? :)

jadebarclay commented 2 years ago

Here's the whole 03-results.Rmd

---
output:
  #bookdown::html_document2: default
  #bookdown::word_document2: default
  bookdown::pdf_document2:
    template: templates/brief_template.tex
    citation_package: biblatex
bib-humanities: true
documentclass: book
#bibliography: [bibliography/references.bib, bibliography/additional-references.bib]
---
# Results {#results}
\chaptermark{Results}
\minitoc <!-- this will include a mini table of contents-->

## Descriptive Stats {#descr}

#### Entire Sample

#### Patient Sample

#### Clinican Sample

#### Patient Subgroups

## sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

## sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

## sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

## sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

## sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

## sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf
ulyngs commented 2 years ago

Thanks!

Do you get the issue both when compiling the entire thesis and when you knit a single chapter?

jadebarclay commented 2 years ago

I haven't tried to knit a single chapter... let me check

ulyngs commented 2 years ago

Ah wait I think just knitting a single chapter doesn't include a minitoc, nevermind!

jadebarclay commented 2 years ago

Yeah, I can't get the minitoc to show up on a single chapter. If I add the scripts_and_filters/knit-functions.R to yaml/knit, it just makes the entire thesis.

ulyngs commented 2 years ago

Is there a particular need for you to only have the headings in there and nothing else?

The issue disappears for me when I start filling in even just some minimal content to make the situation a bit more realistic, like so:

---
output:
  #bookdown::html_document2: default
  #bookdown::word_document2: default
  bookdown::pdf_document2:
    template: templates/brief_template.tex
    citation_package: biblatex
bib-humanities: true
documentclass: book
#bibliography: [bibliography/references.bib, bibliography/additional-references.bib]
---

# Results {#results}
\minitoc <!-- this will include a mini table of contents-->

Here's an intro.
It's really great.

## Descriptive Stats {#descr}

There's mores tuff here.

### Entire Sample

### Patient Sample

### Clinican Sample

### Patient Subgroups

## sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

## sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf
Lorem ipsum.

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

## sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf
More lorem ipsum.

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

## sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf
Much more lorem 

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

## sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf
Some more lorem ipsum.

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

## sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf
And yet more lorem lirum larum.

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf

### sdfklsdfjds sdfljksdl sdlfkjsljf sdlkfjsdldkjf
image
jadebarclay commented 2 years ago

That worked! I was just setting up the TOC before writing it. :) Thanks so much 🎉

Any tips for setting the manual page break inside the minitoc?

ulyngs commented 2 years ago

it's certainly possible, but I haven't had the need to do this myself: https://tex.stackexchange.com/questions/587801/how-to-insert-a-page-break-in-a-minitoc-but-not-in-toc

ulyngs commented 2 years ago

I'm gonna close this for now; if you later on face a practical need to insert a line break in the minitoc and can't get the online latex instructions to work with oxforddown, just open a new issue :)