---
# Document Metadata
title: Example Document Template
shorttitle: Template Guide     # Used for running headers/footers
shortauthors: Author et al.    # Short author list for headers

# Author Information
authors:
  - name: Primary Author
    affiliations:
      - Department Name
      - Institution Name
  - name: Second Author
    orcid: 0000-0000-0000-0000     # Optional ORCID
    corresponding: true             # Marks corresponding author
    email: author@institution.edu
    affiliations:
      - Department Name
      - Institution Name

# Document Properties
keywords: 
  - Keyword One
  - Keyword Two
  - Keyword Three

# Abstract Configuration
abstract-title: "Summary:"          # Custom abstract header
abstract: |
  This template demonstrates the capabilities of Quarto for academic writing. 
  It shows how to create complex documents with figures, tables, citations, 
  and specialized formatting. The template supports multiple output formats 
  including HTML, Word, and PDF via Typst.

# Publication Information
date: 2024-12-20
number-sections: true              # Enable section numbering
section-numbering: 1.1.1          # Numbering format
bibliography: references.bib       # Bibliography file
citation: 
  title: Full Document Title for Citations
  type: report                    # Publication type
  container-title: Series or Journal Name
  issued: last-modified
  doi: 10.0000/zenodo.0000000
---

# Key findings

- This template demonstrates effective academic document structure. Key findings should 
  summarize main points in clear, concise language. Each bullet point should be 
  substantive and typically 2-3 sentences long.

- Complex features can be demonstrated throughout, such as cross-references (see @fig-example), 
  citations [@capitals_coalition_2024], and footnotes[^1]. These features work across all 
  output formats including HTML, Word and PDF.

- Multi-level bullets work as follows:
  - Sub-points should provide supporting detail
  - They can include citations [@tnfd_2024]
  
  - Second-level points with spacing between them are also possible:
    - Third level bullets demonstrate deeper hierarchy
    - With multiple points as needed

[^1]: Footnotes can be placed inline or collected at the end.

![Example figure showing conceptual relationships. Place figures in the media/ folder.](media/picture%201.png){#fig-example}

# Introduction {#sec-introduction}

1. This template uses numbered paragraphs for the main sections. Paragraphs should be 
   concise and focused on a single main point or idea. Citations can be included 
   [@gri2021; @tnfd_2024] and will be rendered according to the specified citation style.

2. Images can be included as either figures with captions (as above) or inline.
   Code blocks and other technical content can be included:

   ```python
   def example_function():
       """Demonstrates code inclusion."""
       return "Hello world"
   ```

3. Tables can be included in several ways. Here's an R-generated table:

```{r echo = FALSE}
#| label: tbl-example
#| tbl-cap: Example table showing data organization

data <- data.frame(
  Category = c("A", "B", "C"),
  Value = c(10, 20, 30),
  Description = c("First", "Second", "Third")
)
library(knitr)
kable(data, format = "simple", align = 'l')
```

# Advanced Document Features

## Complex Tables and Formatting {#sec-tables}

1. Complex tables can include multiple header levels, custom formatting, and footnotes. 
   Here's an example using the `kable` function with custom CSS:

```{css echo = FALSE}
.small .table {font-size: 11px;}
```

::: small
```{r echo = FALSE}
#| label: tbl-complex
#| tbl-cap: Demonstration of Complex Table Formatting

complex_data <- data.frame(
  Category = c("Type A", "Type B", "Type C"),
  Description = c("Complex description with details", 
                 "Another detailed description", 
                 "Third detailed element"),
  Value1 = c(10.5, 20.3, 15.7),
  Value2 = c(45.2, 33.1, 28.9),
  Notes = c("Special case*", "Standard", "Modified†")
)

kable(complex_data, 
      format = "simple",
      booktabs = TRUE,
      align = 'l')
```
:::

* Indicates special condition
† Modified calculation applied

## Callout Boxes and Special Content {#sec-callouts}

1. Callout boxes can highlight important information:

::: {.callout-note}
## Important Note Title

This is an example note callout. It can contain:

- Bullet points
- *Formatted text*
- Even `code snippets`
:::

::: {.callout-warning}
## Caution
Warning callouts use different styling and icons.
:::

::: {.callout-tip}
## Suggestion
Tips use a different style and icon.
:::

## Multi-Panel Figures {#sec-figures}

1. Complex figures can combine multiple panels with individual captions:

```{r echo=FALSE}
#| label: fig-panels
#| fig-cap: "Multi-panel figure demonstration"
#| fig-subcap: 
#|   - "Panel A shows first element"
#|   - "Panel B shows second element"
#| layout-ncol: 2

# Example plot 1
plot(1:10, main="Panel A")

# Example plot 2
plot(10:1, main="Panel B")
```

## Advanced Cross-Referencing {#sec-cross-ref}

1. Cross-references can be used for various elements:
   - Figures: See @fig-panels for a multi-panel example
   - Tables: As shown in @tbl-complex
   - Equations: Reference equation @eq-example below
   - Sections: Refer to earlier section on tables (#sec-tables)

2. Mathematical equations can be numbered and referenced:

$$
\begin{equation}
f(x) = ax^2 + bx + c
\end{equation}
$$ {#eq-example}

3. Inline mathematics can use single dollar signs: $E = mc^2$

## Document Infrastructure {#sec-infrastructure}

1. This template supports:
   - Automatic table of contents generation
   - List of figures and tables
   - Custom header and footer content
   - Bibliography management
   - Multiple citation styles [@gri2021; @tnfd_2024]

2. Example of a complex citation block:

::: {.callout-note}
## Citation Example
According to @capitals_coalition_2024 [p. 23], this specific method has several advantages.
Multiple citations can be combined [@tnfd_2024; @tcfd_2024], and page numbers can be 
included [@gri2021, pp. 15-17].
:::

## Interactive Elements {#sec-interactive}

1. When outputting to HTML, interactive elements can be included:

```{r echo=FALSE}
#| label: fig-interactive
#| fig-cap: "Interactive plot example (HTML only)"

if (knitr::is_html_output()) {
  # Example interactive plot
  library(plotly)
  plot_ly(data = data.frame(x = 1:10, y = 1:10), 
          x = ~x, y = ~y, type = 'scatter', mode = 'lines+markers')
}
```

## Appendix {#sec-appendix}

Additional tables and supplementary information can be included here. The template supports 
multiple appendices and complex table layouts:

::: small
```{r echo = FALSE}
#| label: tbl-appendix
#| tbl-cap: Example Appendix Table

appendix_data <- data.frame(
  Category = c("Type 1", "Type 2", "Type 3"),
  Description = c("Detailed example text", 
                 "More example content", 
                 "Final example entry"),
  Value = c("High", "Medium", "Low")
)

kable(appendix_data, 
      format = "simple",
      booktabs = TRUE,
      align = 'l')
```
:::

# Appendix {.unnumbered}

Note that references need to be included in BibTex format in the relevant file (references.bib)

::: {#refs}
:::