Skip to content

Modernize LaTeX template into Nature-styled manuscript#4

Merged
medewitt merged 3 commits into
mainfrom
v1.1.2
Jul 5, 2026
Merged

Modernize LaTeX template into Nature-styled manuscript#4
medewitt merged 3 commits into
mainfrom
v1.1.2

Conversation

@medewitt

@medewitt medewitt commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Modernizes the ptmp latex template into a Nature-styled single-column manuscript and makes the emitted project build on the first run.

Changes

  • src/templates/main.tex — rewritten from the bare article skeleton into a modern manuscript: natbib with [numbers,sort&compress,super] + \bibliographystyle{unsrtnat} for sorted, superscript numeric citations; modern preamble (microtype, siunitx, booktabs, caption, cleveref + hyperref loaded last, parskip, xcolor); Nature manuscript structure (abstract, Introduction/Results/Discussion, unnumbered Methods, and back matter for data availability, acknowledgements, author contributions, competing interests).
  • src/components.rs — the latex command now prompts for email (correspondence line) and ships references.bib alongside main.tex.
  • src/templates/references.bib — removed the literal {{ title }} placeholder (was written un-rendered) and added a sample entry so the first build resolves.
  • src/render.rs — added tests rendering MAIN_TEX with full and empty-optional contexts; these caught two LaTeX/Tera collisions (\graphicspath{{figures/}} and \author{%), both fixed.
  • README.md — updated the ptmp latex description.

Verification

  • cargo fmt, cargo clippy (clean), cargo test (26 passed).
  • Rendered output compiled end to end with latexmk: PDF builds, BibTeX resolves, references render with DOI, zero undefined citations on the final pass.

Follow-up

@medewitt
medewitt merged commit 6c0c699 into main Jul 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant