LaTeX Authoring
Write source that expresses the document's structure and mathematics clearly.
Choose the document class and bibliography backend before adding packages;
follow a venue template when one is required. The source change is complete
only when the relevant build and rendered pages have been checked with
latex-build-diagnostics or the repository's publication skill.
Choose the source structure
| Document |
Starting point |
| Article or preprint |
article, unless the venue requires its class |
| Book or thesis |
The existing institutional class; otherwise book, memoir, or KOMA-Script |
| Letter |
scrlttr2 |
| Slides |
latex-beamer-presentations |
| Standalone figure |
tikz-figure-engineering |
Use a small preamble. mathtools, amssymb, amsthm, microtype,
booktabs, siunitx, graphicx, and hyperref have distinct jobs; add each
only when the source uses it. Load hyperref near the end and cleveref
after it. The current article skeleton is templates/article.tex.
Mathematics
- Use
\[...\] for display math, align for aligned derivations, gather
for separate centered equations, and multline for one long equation.
- Put words in math with
\text{...} and define repeated operators with
\DeclareMathOperator. Define semantic macros once in the preamble.
- Put units through
siunitx and distinguish a differential from a variable,
for example \,\mathrm{d}x.
- Avoid
$$...$$, eqnarray, and manual line breaks to end paragraphs.
Read references/math-typesetting.md for theorem environments, equations,
and common math-mode errors.
Tables and figures in prose
Use booktabs rules without vertical grid lines. Use siunitx S columns
for comparable numeric values and tabularx when width is constrained.
Captions normally precede tables and follow figures. Size included figures
relative to \linewidth inside columns or minipages. Use vector output for
plots and raster output for photographs. For a figure drawn in TikZ, hand off
to tikz-figure-engineering; choose the semantic form before coordinates.
Bibliography
| Context |
Backend |
Venue supplies .bst or requires natbib |
BibTeX and natbib |
| New document with a controlled toolchain |
biblatex and Biber |
| Repository has an established inline bibliography |
Follow that repository convention |
Never mix natbib and biblatex in one document. Keep citation keys stable,
check that each cited source supports its sentence, and follow the venue's
bibliography instructions. Read references/bibliography.md for backend
options and .bib hygiene.
Source review
- Every label and citation has a matching definition or entry.
- Every macro name describes a role, not a one-off visual tweak.
- Package order is deliberate; avoid obsolete
epsfig, subfigure, and
eqnarray patterns.
- Tables and math can be read at final page width.
- Pass the source to the build skill or repository pipeline and inspect the
rendered pages that changed.
References
references/math-typesetting.md: load for equations and theorem structure.
references/bibliography.md: load for citation backend and entries.
templates/article.tex: starting article source.
1---2name: latex-authoring3description: >-4 Write or revise LaTeX source for articles and technical documents: document class,5 math, tables, citations, semantic macros, and package selection. Use when the6 requested change is in .tex content or preamble. NOT for compiling or diagnosing7 build failures (latex-build-diagnostics), Beamer slides8 (latex-beamer-presentations), TikZ figures (tikz-figure-engineering), or9 repository PDF publication (latex-whitepaper-engineering).10license: Apache-2.011metadata:12 source: https://skillmd.com/skills/curiositech/latex-authoring13 category: Writing14 tags: [latex, typesetting, math, tables, bibliography]15 pairs-with: [latex-build-diagnostics, latex-beamer-presentations, tikz-figure-engineering]16---1718# LaTeX Authoring1920Write source that expresses the document's structure and mathematics clearly.21Choose the document class and bibliography backend before adding packages;22follow a venue template when one is required. The source change is complete23only when the relevant build and rendered pages have been checked with24`latex-build-diagnostics` or the repository's publication skill.2526## Choose the source structure2728| Document | Starting point |29|---|---|30| Article or preprint | `article`, unless the venue requires its class |31| Book or thesis | The existing institutional class; otherwise `book`, `memoir`, or KOMA-Script |32| Letter | `scrlttr2` |33| Slides | `latex-beamer-presentations` |34| Standalone figure | `tikz-figure-engineering` |3536Use a small preamble. `mathtools`, `amssymb`, `amsthm`, `microtype`,37`booktabs`, `siunitx`, `graphicx`, and `hyperref` have distinct jobs; add each38only when the source uses it. Load `hyperref` near the end and `cleveref`39after it. The current article skeleton is `templates/article.tex`.4041## Mathematics4243- Use `\[...\]` for display math, `align` for aligned derivations, `gather`44 for separate centered equations, and `multline` for one long equation.45- Put words in math with `\text{...}` and define repeated operators with46 `\DeclareMathOperator`. Define semantic macros once in the preamble.47- Put units through `siunitx` and distinguish a differential from a variable,48 for example `\,\mathrm{d}x`.49- Avoid `$$...$$`, `eqnarray`, and manual line breaks to end paragraphs.5051Read `references/math-typesetting.md` for theorem environments, equations,52and common math-mode errors.5354## Tables and figures in prose5556Use `booktabs` rules without vertical grid lines. Use `siunitx` `S` columns57for comparable numeric values and `tabularx` when width is constrained.58Captions normally precede tables and follow figures. Size included figures59relative to `\linewidth` inside columns or minipages. Use vector output for60plots and raster output for photographs. For a figure drawn in TikZ, hand off61to `tikz-figure-engineering`; choose the semantic form before coordinates.6263## Bibliography6465| Context | Backend |66|---|---|67| Venue supplies `.bst` or requires `natbib` | BibTeX and `natbib` |68| New document with a controlled toolchain | `biblatex` and Biber |69| Repository has an established inline bibliography | Follow that repository convention |7071Never mix `natbib` and `biblatex` in one document. Keep citation keys stable,72check that each cited source supports its sentence, and follow the venue's73bibliography instructions. Read `references/bibliography.md` for backend74options and `.bib` hygiene.7576## Source review7778- Every label and citation has a matching definition or entry.79- Every macro name describes a role, not a one-off visual tweak.80- Package order is deliberate; avoid obsolete `epsfig`, `subfigure`, and81 `eqnarray` patterns.82- Tables and math can be read at final page width.83- Pass the source to the build skill or repository pipeline and inspect the84 rendered pages that changed.8586## References8788- `references/math-typesetting.md`: load for equations and theorem structure.89- `references/bibliography.md`: load for citation backend and entries.90- `templates/article.tex`: starting article source.