quarto use template jallow-code/jku-quarto-thesis
Introduction
Writing a Bachelor’s or Diploma thesis at JKU involves not only research but also formatting requirements. Managing citations, ensuring consistent layout, and integrating code or data analysis can quickly become overwhelming, especially using traditional tools like Microsoft Word.
To help streamline this process, I’ve adapted a Quarto thesis template specifically tailored to meet JKU’s formal criteria for diploma and bachelor theses. This template lets you focus purely on your research and writing, while Quarto handles the complexities of formatting, citation management, and document structure.
This template builds upon the excellent Masters/Doctoral Thesis, LaTeX Template, Version 2.5, which was first adapted for Quarto by Eli Holmes.
Why use Quarto for your thesis?
- Reproducibility: Seamlessly integrate R or Python code and data analysis directly into your document.
- Consistency: Ensure uniform formatting for headings, figures, tables, and citations throughout.
- Version Control: Works perfectly with tools like Git, making collaboration and tracking changes easy.
- Focus: Spend less time wrestling with layout and more time on your content.
Getting Started
Ready to use the template? You’ll need Quarto installed first. Then, follow these steps:
- Open your Terminal or Command Prompt. Navigate to the directory where you want to create your thesis project folder.
- Use the Quarto Template: Run the following command. Quarto will download the template and ask you to provide a name for your new thesis directory.
- Enter Your Project Directory: Once the download is complete, change into the newly created directory:
cd <your-new-thesis-directory-name>
- Render the Example: To generate the sample PDF document and check if everything is working, run:
quarto render
This will create a PDF file based on the example content included in the template.
Troubleshooting Common Rendering Errors
If you encounter an error message like this during rendering:
ERROR:
compilation failed - missing packages (automatic install disabled)
LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.872 \end{CSLReferences}
This usually indicates issues with your LaTeX distribution or Quarto version. Try these steps:
Update TinyTeX: Ensure your LaTeX distribution is up-to-date. If using TinyTeX (common with RStudio/Quarto), update it via your R console (
tinytex::tlmgr_update()
) or follow instructions on the TinyTeX website.Update Quarto: Make sure you have the latest version of Quarto installed from the official Quarto website.
Using the Template with an Existing Quarto Project
If you’ve already started writing your thesis in a Quarto document (.qmd) and want to apply this template’s formatting and structure:
- Ensure you are inside your existing project directory in the terminal.
- Run the following command to add the template’s resources (like LaTeX settings and front matter files) to your project:
quarto install extension jallow-code/jku-quarto-thesis
- You will likely need to manually copy or adjust settings from the template’s
_quarto.yml
file into your own project’s_quarto.yml
file.
Customizing Your Thesis
The template is designed to be easily customized through the _quarto.yml configuration file located in the main directory.
Thesis Details (_quarto.yml)
Open _quarto.yml
in a text editor. You’ll find a thesis: block where you can set crucial information:
thesis:
type: Bachelor Thesis # Change to "Master Thesis", "Diploma Thesis", etc.
degree-name: Bachelor of Science # e.g., Master of Science, Diplom-Ingenieur
group: Biological Chemistry # Your specific JKU study program
supervisor:
primary: "Assoz. Univ.-Prof. Dr. Ian Teasdale" # Primary supervisor's full title and name
co: "Dipl.-Ing. Michael Kneidinger" # Co-supervisor (optional, remove if not needed)
university: Johannes Kepler Universität Linz
department: Institute of Polymer Chemistry # Your institute
faculty: Faculty of Engineering and Natural Sciences # Your faculty (TNF, SOWI, MED)
Front Matter Customization
The _quarto.yml
file also links to LaTeX files (.tex
) located in the Frontmatter/ sub-directory for sections like the Abstract, Acknowledgements, and Dedication.
- To modify content: Edit the corresponding .tex file (e.g.,
Frontmatter/acknowledgements.tex
). - To exclude a section: Comment out the line in
_quarto.yml
by adding a#
at the beginning. For example, to remove the dedication:
# dedication: "Frontmatter/dedication.tex"
Adding Lists of Symbols or Abbreviations
The Frontmatter/ directory contains templates for abbreviations (abbreviations.tex
) and symbols (symbols.tex
).
- Edit these files directly using standard LaTeX syntax.
- If you’re unsure about specific LaTeX commands (e.g., for mathematical symbols), searching online for “LaTeX [your need]” (e.g., “LaTeX degree symbol”, “LaTeX align equations”) is usually very helpful.
Citation Styling
The template defaults to the nature-chemistry.csl
citation style. To use a different style (e.g., APA, IEEE, or another chemistry journal):
- Find and download the desired
.csl
file from the Zotero Style Repository. - Place the downloaded
.csl
file in the same directory as your_quarto.yml
file. - Update the
_quarto.yml
file to point to your new style:
bibliography: [references.bib] # Make sure this points to your bibliography file
csl: your-preferred-style.csl # Update this line
Additional Resources & Final Tips
- The best way to understand the structure is to look at the included example .qmd files and the rendered
thesis_template.pdf
(linked at the bottom of this post or generated when you run quarto render). - Check out Eli Holmes’s Youtube channel for practical data science and Quarto tutorials.
- Always double-check the latest official JKU guidelines for thesis formatting to ensure this template still meets all requirements.
Additional Resources
I hope this template proves useful for your thesis writing journey at JKU! Feel free to raise issues or suggest improvements on the GitHub repository.
Sample Document
Citation
@online{jallow2024,
author = {Jallow, Abdoulie},
title = {A {Quarto} {Thesis} {Template} for {Bachelor} and {Diploma}
{Projects} at {JKU}},
date = {2024-11-17},
url = {https://jallow-code.github.io/posts/jku-thesis-template/},
langid = {en}
}