Variations

⚙
A Starter Manuscript Built with document-sanity
First Author1 Second Author1,2
  1. 1 Department of Research, Example University
  2. 2 Department of Collaboration, Partner Institute

Introduction

Welcome to the document-sanity starter template. This paragraph demonstrates bold, italic, inline code, and inline math: $E = mc^2$.


Variable substitution happens at build time — we have 1,247 samples in total, achieving an overall R2 of 0.87 ($p = 8.70 \times 10^{-3}$). In the HTML viewer, clicking those values pops up their provenance (source files, command, updated date) because the manifest declares a provenance: block for them.


Cite with [?] — the HTML viewer will number it and link to the rendered <li> in the references section: [1].


Cross-reference with ... — see Figure 1 for the framework overview, and the method details in Section 2.

Background

Lists work as you'd expect:


  • First bullet item.
  • Second item with formatted text and a link.
  • Third item with a reference to [2].

Numbered steps

  1. Install document-sanity (see README).
  2. Edit this file or add new sections.
  3. Run make html to preview, make pdf to export.

Methods

Methods are written in plain markdown with LaTeX pass-through for anything complex — figures, tables, multi-line equations.

Math

Inline math like $\text{Pr}(x \mid \theta)$ uses the \prob macro defined in templates/article.tex. The document-sanity preview command auto-expands such macros inside math when it emits the markdown-preview blocks, so GitHub's KaTeX renders them too.


Display math:


$$ \log \frac{y_i}{1 - y_i} = \sum_j X_{ij} \beta_j + \alpha_i + \log \frac{\pi}{1 - \pi} $$


Or, for fuller control, wrap in a ```latex block:


$$ \Pr(d \mid \mathcal{D}) = \frac{\Pr(\mathcal{D} \mid d)\,\Pr(d)}{\Pr(\mathcal{D})} $$


Reference it with Equation 1.

Figures

Reference manifest-declared figures with XXXX:


Framework overview. Replace this image with your own by dropping a file into src/VERSION/figures/example/example.png (or .pdf, .html, .svg).
Framework overview. Replace this image with your own by dropping a file into src/VERSION/figures/example/example.png (or .pdf, .html, .svg).


Or, for figures you won't reference from other places, inline an image:


![Example caption.](figures/example.svg)

See docs/figures.md for the full figure layout conventions.

Tables

Simple tables — write them in native markdown:


Condition N Mean ± SD
Control 420 1.24 ± 0.18
Treatment 827 1.51 ± 0.22

The builder converts these to \begin{tabular} for LaTeX and <table class="md-table"> for HTML.


Complex tables (multi-column headers, \cmidrule, subtables) belong in a fenced LaTeX block:


(table — Example complex table.)


Reference the table above: Table 1.


Results

Put your findings here. Lean on variable substitution — if every number in the paper comes from manifest.yaml, you update values in one place and everything else stays consistent.

Primary analysis

Our primary test rejected the null with $p = 8.70 \times 10^{-3}$ across 1,247 samples (see Methods, Section 2).


The effect was consistent across subgroups (Table 1). As shown in Figure 1, the framework captures the relationship we expected.

Inline-markdown table

Use a plain markdown pipe table when the values won't change between edits — captions, summary descriptors, presentation-only tables.


Metric Value Notes
Sample size 1,247 Total enrolled
R2 0.87 Primary regression
p-value 8.70e-03 Two-sided, BH-adj

Data-driven table from tables/subgroup_summary.csv

Use a separate data file when the table is generated by an analysis script. Declare it in manifest.yaml under tables:, then reference with a XXXX token. The token expands to a markdown pipe table at build time so PDF, HTML, and Word all render identically:


XXXX


Re-run your analysis, overwrite the CSV, rebuild — every output stays in sync.

Robustness

Follow-up analyses corroborated the primary finding. Replace this paragraph with your own, or add subsections as needed.


Discussion

Summarize the main finding in the first sentence. Use the rest of the paragraph to contextualize against prior work [1, 2].

Limitations

List the main caveats here. Writing them as markdown bullets keeps them easy to rearrange:


  • Limitation one — explain briefly.
  • Limitation two.
  • Limitation three.

Conclusion

End with a one-paragraph conclusion. Cite the specific contributions made by this paper rather than re-summarizing the results.


References

  1. [1]Alice Example, Bob Colleague. An Example Paper about Things. Journal of Example Research 42(3), 123–145 (2024). https://doi.org/10.1234/example.2024.001
  2. [2]Carol Other, Dave Researcher, Erin Team. Another Study with Important Findings. Nature Example Science 7, e12345 (2023). https://doi.org/10.1038/example.2023.002