# anuopensci/quarto-anu-thesis architecture

> Architecture diagram of the GitHub repository anuopensci/quarto-anu-thesis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anuopensci/quarto-anu-thesis
- Repository: https://github.com/anuopensci/quarto-anu-thesis

## Overview

1. **Repository purpose**
   - This is a **Quarto project template for an ANU thesis**, not an application with runtime business logic.
   - The architecture centers on **source documents and rendering configuration** that produce two outputs: **HTML site** and **PDF thesis**.

2. **Primary source content layer**
   - The thesis content is split across standalone **`.qmd` files**: `index.qmd`, `abstract.qmd`, `acknowledgements.qmd`, `disclaimer.qmd`, `chapter1.qmd`, `chapter2.qmd`, `tools.qmd`, and `references.qmd`.
   - These files are the main authored content units and form the document structure rendered by Quarto.

3. **Project-level configuration**
   - `_quarto.yml` is the central build definition: it controls project metadata, output formats, site behavior, and which templates/extensions are applied.
   - `_variables.yml` likely holds shared text/metadata variables used across multiple `.qmd` files and templates.
   - `ref.bib` is the bibliography source for citations and reference generation.

4. **Template and styling extension boundary**
   - The `_extensions/anu-thesis` directory is the main customization layer that adapts Quarto to the ANU thesis format.
   - This extension is the boundary between generic Quarto rendering and thesis-specific branding, layout, and document structure.

5. **HTML presentation subsystem**
   - HTML output is styled by the extension assets under `_extensions/anu-thesis/assets/css/all.css` and `custom.scss`.
   - HTML title/page structure is customized through templates such as `title-block.html`.
   - The generated site includes Quarto runtime libraries under `docs/site_libs`, plus navigation/search support.

6. **PDF / LaTeX rendering subsystem**
   - PDF output is driven by LaTeX templates and style files in `_extensions/anu-thesis/assets/latex` and related files such as `header.tex`, `_titlepage.tex`, and `anuthesis.sty`.
   - These files define the thesis title page, document class behavior, table-of-contents formatting, and other print-specific layout rules.
   - `latex-environment.lua` is a Quarto extension hook used to integrate custom LaTeX environment behavior during rendering.

7. **Shared assets and branding**
   - Branding assets are stored in `images/` and `_extensions/anu-thesis/assets/latex/`, including ANU logo artwork.
   - Web fonts and other front-end assets live under `_extensions/anu-thesis/assets/webfonts`, supporting the HTML visual identity.
   - These assets are reused across both output formats where applicable.

8. **Rendered outputs are checked in**
   - The `docs/` directory contains the **published/generated artifacts**: rendered HTML pages, `thesis.pdf`, images, search index, and site libraries.
   - From an architecture perspective, `docs/` is the output layer, not the source-of-truth layer.
   - This indicates the repo is designed for publishing via a static site host, with `docs/` as the deployable site root.

9. **Information flow through the system**
   - Content flows from the `.qmd` chapter files and bibliography into Quarto.
   - Quarto applies `_quarto.yml`, shared variables, and the ANU extension templates/styles.
   - The build then emits two parallel products: **HTML pages for web reading** and a **single PDF thesis** for print/download.

10. **Tooling/runtime dependencies**
   - The core build tool is **Quarto**, which orchestrates Markdown-to-HTML and Markdown-to-PDF generation.
   - PDF generation implies a **LaTeX toolchain** behind the scenes.
   - The presence of `quarto-anu-thesis.Rproj` suggests an RStudio-compatible project setup, but the repo itself is template/content focused rather than R-application code.

11. **Practical architectural takeaway**
   - For diagramming, treat this repo as a **document publishing pipeline** with three layers:
     - **Source content**: `.qmd`, bibliography, and shared variables
     - **Presentation/configuration**: `_quarto.yml` plus `_extensions/anu-thesis`
     - **Generated deliverables**: `docs/` HTML site and `docs/thesis.pdf`

Main entry points: [`_extensions/anu-thesis`](https://github.com/anuopensci/quarto-anu-thesis/tree/master/_extensions/anu-thesis) (ANU thesis), [`_variables.yml`](https://github.com/anuopensci/quarto-anu-thesis/blob/master/_variables.yml) (Shared vars), [`ref.bib`](https://github.com/anuopensci/quarto-anu-thesis/blob/master/ref.bib) (Bibliography), [`index.qmd`](https://github.com/anuopensci/quarto-anu-thesis/blob/master/index.qmd) (Front matter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_source["Source content"]
  node_shared_vars["Shared vars<br/>metadata<br/>[_variables.yml]"]
  node_bibliography["Bibliography<br/>citation data<br/>[ref.bib]"]
  node_index["Front matter<br/>qmd source<br/>[index.qmd]"]
  node_abstract["Abstract<br/>qmd source<br/>[abstract.qmd]"]
  node_acknowledgements["Thanks<br/>qmd source"]
  node_disclaimer["Disclaimer<br/>qmd source<br/>[disclaimer.qmd]"]
  node_chapter1["Chapter 1<br/>qmd source<br/>[chapter1.qmd]"]
  node_chapter2["Chapter 2<br/>qmd source<br/>[chapter2.qmd]"]
  node_tools["Tools<br/>qmd source<br/>[tools.qmd]"]
  node_references["References<br/>qmd source<br/>[references.qmd]"]
end

subgraph group_build["Build and extension"]
  node_quarto_config["Quarto config<br/>project config<br/>[_quarto.yml]"]
  node_anu_extension["ANU thesis<br/>quarto extension"]
  node_html_theme["HTML theme<br/>html assets<br/>[all.css]"]
  node_html_layout["HTML layout<br/>scss/template<br/>[custom.scss]"]
  node_title_block["Title block<br/>html template<br/>[title-block.html]"]
  node_latex_hook["LaTeX hook<br/>lua filter"]
  node_pdf_header["PDF header<br/>latex template<br/>[header.tex]"]
  node_title_page["Title page<br/>latex template<br/>[_titlepage.tex]"]
  node_thesis_style["Thesis style<br/>latex style<br/>[anuthesis.sty]"]
  node_quarto_engine(("Quarto<br/>render engine"))
  node_latex_toolchain(("LaTeX<br/>pdf engine"))
end

subgraph group_output["Generated output"]
  node_docs_site["Published site<br/>generated site"]
  node_docs_pdf["Thesis PDF<br/>generated pdf<br/>[thesis.pdf]"]
  node_site_libs["Site libs<br/>runtime assets"]
end

node_quarto_config -->|"drives"| node_quarto_engine
node_shared_vars -->|"feeds"| node_quarto_engine
node_bibliography -->|"feeds"| node_quarto_engine
node_index -->|"renders via"| node_quarto_engine
node_abstract -->|"renders via"| node_quarto_engine
node_acknowledgements -->|"renders via"| node_quarto_engine
node_disclaimer -->|"renders via"| node_quarto_engine
node_chapter1 -->|"renders via"| node_quarto_engine
node_chapter2 -->|"renders via"| node_quarto_engine
node_tools -->|"renders via"| node_quarto_engine
node_references -->|"renders via"| node_quarto_engine
node_anu_extension -->|"extends"| node_quarto_engine
node_anu_extension -->|"includes"| node_html_theme
node_anu_extension -->|"includes"| node_html_layout
node_anu_extension -->|"includes"| node_title_block
node_anu_extension -->|"includes"| node_latex_hook
node_anu_extension -->|"includes"| node_pdf_header
node_anu_extension -->|"includes"| node_title_page
node_anu_extension -->|"includes"| node_thesis_style
node_quarto_engine -->|"emits"| node_docs_site
node_quarto_engine -->|"emits"| node_site_libs
node_quarto_engine -->|"invokes"| node_latex_toolchain
node_latex_toolchain -->|"emits"| node_docs_pdf

click node_quarto_config "https://github.com/anuopensci/quarto-anu-thesis/blob/master/_quarto.yml"
click node_shared_vars "https://github.com/anuopensci/quarto-anu-thesis/blob/master/_variables.yml"
click node_bibliography "https://github.com/anuopensci/quarto-anu-thesis/blob/master/ref.bib"
click node_index "https://github.com/anuopensci/quarto-anu-thesis/blob/master/index.qmd"
click node_abstract "https://github.com/anuopensci/quarto-anu-thesis/blob/master/abstract.qmd"
click node_acknowledgements "https://github.com/anuopensci/quarto-anu-thesis/blob/master/acknowledgements.qmd"
click node_disclaimer "https://github.com/anuopensci/quarto-anu-thesis/blob/master/disclaimer.qmd"
click node_chapter1 "https://github.com/anuopensci/quarto-anu-thesis/blob/master/chapter1.qmd"
click node_chapter2 "https://github.com/anuopensci/quarto-anu-thesis/blob/master/chapter2.qmd"
click node_tools "https://github.com/anuopensci/quarto-anu-thesis/blob/master/tools.qmd"
click node_references "https://github.com/anuopensci/quarto-anu-thesis/blob/master/references.qmd"
click node_anu_extension "https://github.com/anuopensci/quarto-anu-thesis/tree/master/_extensions/anu-thesis"
click node_html_theme "https://github.com/anuopensci/quarto-anu-thesis/blob/master/_extensions/anu-thesis/assets/css/all.css"
click node_html_layout "https://github.com/anuopensci/quarto-anu-thesis/blob/master/_extensions/anu-thesis/custom.scss"
click node_title_block "https://github.com/anuopensci/quarto-anu-thesis/blob/master/_extensions/anu-thesis/assets/title-block.html"
click node_latex_hook "https://github.com/anuopensci/quarto-anu-thesis/blob/master/_extensions/anu-thesis/_extensions/quarto-ext/latex-environment/latex-environment.lua"
click node_pdf_header "https://github.com/anuopensci/quarto-anu-thesis/blob/master/_extensions/anu-thesis/header.tex"
click node_title_page "https://github.com/anuopensci/quarto-anu-thesis/blob/master/_extensions/anu-thesis/_titlepage.tex"
click node_thesis_style "https://github.com/anuopensci/quarto-anu-thesis/blob/master/_extensions/anu-thesis/assets/latex/anuthesis.sty"
click node_docs_site "https://github.com/anuopensci/quarto-anu-thesis/tree/master/docs"
click node_docs_pdf "https://github.com/anuopensci/quarto-anu-thesis/blob/master/docs/thesis.pdf"
click node_site_libs "https://github.com/anuopensci/quarto-anu-thesis/tree/master/docs/site_libs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_shared_vars,node_bibliography,node_index,node_abstract,node_acknowledgements,node_disclaimer,node_chapter1,node_chapter2,node_tools,node_references toneBlue
class node_quarto_config,node_anu_extension,node_html_theme,node_html_layout,node_title_block,node_latex_hook,node_pdf_header,node_title_page,node_thesis_style,node_quarto_engine,node_latex_toolchain toneAmber
class node_docs_site,node_docs_pdf,node_site_libs toneMint
```

## Components

### Source content

Authored thesis chapters, shared variables, and bibliography.

- [Shared vars](https://github.com/anuopensci/quarto-anu-thesis/blob/master/_variables.yml): metadata · Reusable text and metadata shared across documents. · `_variables.yml`
- [Bibliography](https://github.com/anuopensci/quarto-anu-thesis/blob/master/ref.bib): citation data · BibTeX source for citations and references. · `ref.bib`
- [Front matter](https://github.com/anuopensci/quarto-anu-thesis/blob/master/index.qmd): qmd source · Main entry and thesis front matter. · `index.qmd`
- [Abstract](https://github.com/anuopensci/quarto-anu-thesis/blob/master/abstract.qmd): qmd source · Standalone abstract page. · `abstract.qmd`
- [Thanks](https://github.com/anuopensci/quarto-anu-thesis/blob/master/acknowledgements.qmd): qmd source · Acknowledgements section. · `acknowledgements.qmd`
- [Disclaimer](https://github.com/anuopensci/quarto-anu-thesis/blob/master/disclaimer.qmd): qmd source · Project or thesis disclaimer page. · `disclaimer.qmd`
- [Chapter 1](https://github.com/anuopensci/quarto-anu-thesis/blob/master/chapter1.qmd): qmd source · Main thesis chapter content. · `chapter1.qmd`
- [Chapter 2](https://github.com/anuopensci/quarto-anu-thesis/blob/master/chapter2.qmd): qmd source · Main thesis chapter content. · `chapter2.qmd`
- [Tools](https://github.com/anuopensci/quarto-anu-thesis/blob/master/tools.qmd): qmd source · Methods, tooling, or appendix-style content. · `tools.qmd`
- [References](https://github.com/anuopensci/quarto-anu-thesis/blob/master/references.qmd): qmd source · Bibliography rendering and reference list page. · `references.qmd`

### Build and extension

Quarto project settings and the ANU thesis extension layer.

- [Quarto config](https://github.com/anuopensci/quarto-anu-thesis/blob/master/_quarto.yml): project config · Central build definition for site and PDF rendering. · `_quarto.yml`
- [ANU thesis](https://github.com/anuopensci/quarto-anu-thesis/tree/master/_extensions/anu-thesis): quarto extension · Thesis-specific layout, branding, and format customization. · `_extensions/anu-thesis`
- [HTML theme](https://github.com/anuopensci/quarto-anu-thesis/blob/master/_extensions/anu-thesis/assets/css/all.css): html assets · Web styling and title-block customization for HTML output. · `_extensions/anu-thesis/assets/css/all.css`
- [HTML layout](https://github.com/anuopensci/quarto-anu-thesis/blob/master/_extensions/anu-thesis/custom.scss): scss/template · Custom web styling and page structure overrides. · `_extensions/anu-thesis/custom.scss`
- [Title block](https://github.com/anuopensci/quarto-anu-thesis/blob/master/_extensions/anu-thesis/assets/title-block.html): html template · HTML title/page header customization. · `_extensions/anu-thesis/assets/title-block.html`
- [LaTeX hook](https://github.com/anuopensci/quarto-anu-thesis/blob/master/_extensions/anu-thesis/_extensions/quarto-ext/latex-environment/latex-environment.lua): lua filter · Extension hook for custom LaTeX environment handling. · `_extensions/anu-thesis/_extensions/quarto-ext/latex-environment/latex-environment.lua`
- [PDF header](https://github.com/anuopensci/quarto-anu-thesis/blob/master/_extensions/anu-thesis/header.tex): latex template · Shared LaTeX preamble and document setup. · `_extensions/anu-thesis/header.tex`
- [Title page](https://github.com/anuopensci/quarto-anu-thesis/blob/master/_extensions/anu-thesis/_titlepage.tex): latex template · Thesis title page and front-matter layout. · `_extensions/anu-thesis/_titlepage.tex`
- [Thesis style](https://github.com/anuopensci/quarto-anu-thesis/blob/master/_extensions/anu-thesis/assets/latex/anuthesis.sty): latex style · ANU thesis LaTeX style and formatting rules. · `_extensions/anu-thesis/assets/latex/anuthesis.sty`
- **Quarto**: render engine · Orchestrates Markdown-to-HTML and Markdown-to-PDF rendering.
- **LaTeX**: pdf engine · Backend toolchain used to build the thesis PDF.

### Generated output

Rendered site and PDF deliverables checked into the repo.

- [Published site](https://github.com/anuopensci/quarto-anu-thesis/tree/master/docs): generated site · Checked-in HTML output root for the thesis site. · `docs`
- [Thesis PDF](https://github.com/anuopensci/quarto-anu-thesis/blob/master/docs/thesis.pdf): generated pdf · Rendered thesis document for print and download. · `docs/thesis.pdf`
- [Site libs](https://github.com/anuopensci/quarto-anu-thesis/tree/master/docs/site_libs): runtime assets · Generated Quarto runtime libraries used by the HTML site. · `docs/site_libs`

## Connections

- Quarto config → Quarto: drives · Project settings determine how Quarto renders the thesis.
- Shared vars → Quarto: feeds · Shared variables are substituted into documents during rendering.
- Bibliography → Quarto: feeds · Citation data powers reference generation.
- Front matter → Quarto: renders via · Front matter is rendered by Quarto.
- Abstract → Quarto: renders via · Abstract page is rendered by Quarto.
- Thanks → Quarto: renders via · Acknowledgements page is rendered by Quarto.
- Disclaimer → Quarto: renders via · Disclaimer page is rendered by Quarto.
- Chapter 1 → Quarto: renders via · Chapter content is rendered by Quarto.
- Chapter 2 → Quarto: renders via · Chapter content is rendered by Quarto.
- Tools → Quarto: renders via · Supporting content is rendered by Quarto.
- References → Quarto: renders via · Reference list page is rendered by Quarto.
- ANU thesis → Quarto: extends · Thesis extension customizes the standard Quarto pipeline.
- ANU thesis → HTML theme: includes · Extension supplies web styling assets.
- ANU thesis → HTML layout: includes · Extension supplies HTML presentation overrides.
- ANU thesis → Title block: includes · Extension customizes the rendered title block.
- ANU thesis → LaTeX hook: includes · Extension adds custom LaTeX environment behavior.
- ANU thesis → PDF header: includes · Extension provides shared LaTeX preamble content.
- ANU thesis → Title page: includes · Extension defines the thesis title page.
- ANU thesis → Thesis style: includes · Extension provides thesis-specific LaTeX styling.
- Quarto → Published site: emits · Quarto generates the HTML site into the checked-in docs root.
- Quarto → Site libs: emits · Quarto generates runtime assets for the site.
- Quarto → LaTeX: invokes · PDF rendering is delegated to LaTeX.
- LaTeX → Thesis PDF: emits · LaTeX produces the thesis PDF artifact.
