ismayc/thesisdown

How do I include external `00--prelim.Rmd` file in the `yaml` header?

atanasj opened this issue · 8 comments

The 00--prelim.Rmd file has a number of headers. How is this called in the yaml header?

I have tried to put it under a heading e.g., acknowledgements, but then all the subheadings included in the document are printed in the final output i.e., Acknowledgements>Preface, Acknowledgements>Acknowledgements, etc. They way I interpreted the commented instructions I thought something along the lines of:

acknowledgements: |
  '`r if(knitr:::is_latex_output()) paste(readLines(here::here("prelims", "00--prelim.Rmd")), collapse = "\n  ")`'

Although the all the content is printing, it is all under the acknowledgements heading.

Thanks in advance for your help.

Can you provide some screenshots to explain what you are seeing a little further?

The 00--prelim.Rmd file is not called at all in YAML. It is only included if you don't want to use the YAML like here.

If you are using readLines() it is going to remove much of the formatting, which may be leading to this.

Thanks for that. That works well, however is there a way to insert those sections before the Contents as they appear in the main body now…

You should be able to create individual files for each heading and use code similar to the code shown for the abstract in the YAML.

Okay, great. I got that working by adding latex commands for the toc etc to specific docs, so I could make them appear where I wanted.

Apologies that I am turning this into a help thread, however where would I set the font size of the headers and paragraph indentation. I need to format this as APA v7, and they have specific formatting requirements for header levels and paragraph indentation.

Thanks in advance.

You'll need to look through either template.tex or reedthesis.cls to change those settings. Unfortunately, I'm not able to support LaTeX help at this time.

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org whenever possible) and link to this issue. If a reprex is not applicable, recording a short Loom video showing what you are seeing can go a long way in helping to diagnose problems.