Gsd-skill-creator latex-authoring
LaTeX document authoring with arXiv submission best practices, Overleaf patterns, and academic publishing conventions.
git clone https://github.com/Tibsfox/gsd-skill-creator
T=$(mktemp -d) && git clone --depth=1 https://github.com/Tibsfox/gsd-skill-creator "$T" && mkdir -p ~/.claude/skills && cp -r "$T/examples/skills/media/latex-authoring" ~/.claude/skills/tibsfox-gsd-skill-creator-latex-authoring && rm -rf "$T"
examples/skills/media/latex-authoring/SKILL.mdLaTeX Authoring Skill
Expert-level LaTeX document authoring following arXiv submission best practices and Overleaf conventions. Produces accessible, semantic, publication-ready documents.
Core Principle
"Use macros according to their meaning, not because of the way they appear visually." — arXiv Best Practices
Semantic markup over visual formatting. Always.
Document Structure
Standard Article
\documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath,amssymb,amsthm} \usepackage{graphicx} \usepackage{hyperref} \usepackage[numbers]{natbib} \usepackage{booktabs} % Professional tables \usepackage{microtype} % Typography improvements \usepackage{cleveref} % Smart cross-references \title{Article Title} \author{Author One\thanks{affiliation} \and Author Two\thanks{affiliation}} \date{\today} \begin{document} \maketitle \begin{abstract} Concise summary of the work. \end{abstract} \section{Introduction} \section{Related Work} \section{Method} \section{Results} \section{Discussion} \section{Conclusion} \bibliographystyle{plainnat} \bibliography{references} \end{document}
Front Matter (arXiv requirement)
Always use semantic front matter commands:
\title{...} \author{Author One \AND Author Two} \begin{abstract} ... \end{abstract}
Never simulate titles with
\textbf{\Large Title} — this breaks HTML conversion.
Semantic Markup Rules
DO (semantic)
\emph{key phrase} % Emphasis with meaning \textbf{important term} % Bold with purpose \section{Introduction} % Structural heading \begin{theorem} ... \end{theorem} % Named environment \label{eq:energy} % Reference target \cref{eq:energy} % Smart cross-reference
DON'T (visual-only)
{\it key phrase} % Visual italic, no semantics {\bf important} % Visual bold, no semantics {\Large\bfseries Introduction} % Fake heading, breaks structure \vspace{1em} % Manual spacing hack \\[1em] % Line break as spacing
Mathematics
Inline vs Display
% Inline math The energy $E = mc^2$ is fundamental. % Display (numbered) \begin{equation} E = mc^2 \label{eq:energy} \end{equation} % Display (unnumbered) \begin{equation*} F = ma \end{equation*} % Multi-line aligned \begin{align} \nabla \cdot \mathbf{E} &= \frac{\rho}{\epsilon_0} \label{eq:gauss} \\ \nabla \times \mathbf{B} &= \mu_0 \mathbf{J} + \mu_0 \epsilon_0 \frac{\partial \mathbf{E}}{\partial t} \end{align}
Common Math Patterns
% Matrices \begin{pmatrix} a & b \\ c & d \end{pmatrix} % Cases f(x) = \begin{cases} 1 & \text{if } x > 0 \\ 0 & \text{otherwise} \end{cases} % Operators \DeclareMathOperator{\argmax}{arg\,max} \DeclareMathOperator{\softmax}{softmax} % Fractions (prefer \frac for display, \nicefrac for inline) \frac{\partial L}{\partial \theta} % Bold math vectors \mathbf{x}, \boldsymbol{\theta}
Tables
Professional Tables (booktabs)
\begin{table}[htbp] \centering \caption{Model comparison on benchmark tasks.} \label{tab:results} \begin{tabular}{lrrr} \toprule Model & Accuracy & F1 & Latency (ms) \\ \midrule Baseline & 0.842 & 0.831 & 12.3 \\ Our Method & \textbf{0.917} & \textbf{0.904} & 14.1 \\ \bottomrule \end{tabular} \end{table}
Never use
\hline — always \toprule, \midrule, \bottomrule from booktabs.
Figures
With Alt Text (arXiv accessibility requirement)
\begin{figure}[htbp] \centering \includegraphics[width=0.8\textwidth, alt={Bar chart showing accuracy improvements from 84% baseline to 92% with our method across three benchmarks}]{figures/results.pdf} \caption{Accuracy comparison across benchmark tasks.} \label{fig:results} \end{figure}
Subfigures
\usepackage{subcaption} \begin{figure}[htbp] \centering \begin{subfigure}[b]{0.48\textwidth} \includegraphics[width=\textwidth]{fig-a.pdf} \caption{Training loss} \label{fig:loss} \end{subfigure} \hfill \begin{subfigure}[b]{0.48\textwidth} \includegraphics[width=\textwidth]{fig-b.pdf} \caption{Validation accuracy} \label{fig:acc} \end{subfigure} \caption{Training dynamics over 100 epochs.} \end{figure}
Bibliography
BibTeX Entry Types
@article{vaswani2017attention, title = {Attention Is All You Need}, author = {Vaswani, Ashish and others}, journal = {NeurIPS}, year = {2017} } @inproceedings{devlin2019bert, title = {{BERT}: Pre-training of Deep Bidirectional Transformers}, author = {Devlin, Jacob and Chang, Ming-Wei and Lee, Kenton and Toutanova, Kristina}, booktitle = {NAACL-HLT}, year = {2019} } @misc{anthropic2026claude, title = {Claude 4.6 Model Card}, author = {Anthropic}, year = {2026}, howpublished = {\url{https://www.anthropic.com}}, note = {Accessed: 2026-04-08} }
Citation Commands
% natbib \citet{vaswani2017attention} → Vaswani et al. (2017) \citep{vaswani2017attention} → (Vaswani et al., 2017) \citep[see][]{vaswani2017attention} → (see Vaswani et al., 2017) % biblatex \textcite{vaswani2017attention} \parencite{vaswani2017attention}
arXiv Submission Checklist
- Single directory — all files in one flat directory (no subdirectories for figures)
- Main file — must be compilable with
(or xelatex/lualatex)pdflatex main.tex - References — include
file (pre-compiled bibliography), not just.bbl.bib - Figures — PDF/PNG/JPG only. EPS accepted but PDF preferred. Include alt text.
- No absolute paths — use
not\includegraphics{figure1}\includegraphics{/home/user/fig/figure1} - Package compatibility — check LaTeXML supported packages for HTML conversion
- Compiler — use most recent TeX Live. Set Overleaf to "stop on errors" mode.
- Font encoding — use
for proper glyph support\usepackage[T1]{fontenc} - No custom styles — avoid
and\def
that redefine standard commands\newcommand - Comments — remove
sections before submission\usepackage{comment}
Common Mistakes
| Mistake | Fix |
|---|---|
| or |
| |
| or env |
in tables | , , |
Manual spacing | Proper environments and sparingly |
for figures | inside float |
Missing after | Always in that order |
without natbib | Use / for author-year styles |
| Bitmap figures at low DPI | Vector PDF or 300+ DPI PNG |
| Hardcoded cross-references | Use , , or |
Document Classes
| Class | Use Case |
|---|---|
| Journal papers, short reports |
| Longer documents with chapters |
| Books, theses |
| Presentations |
| Single figures/diagrams for inclusion |
| Flexible book/report class |
| IEEE conference/journal papers |
| ACM publications |
| APS/Physical Review journals |
| AAS/Astrophysical Journal |
| Monthly Notices of the Royal Astronomical Society |
Essential Packages
| Package | Purpose |
|---|---|
| Math environments (align, equation, etc.) |
| Additional math symbols |
| Theorem environments |
| Image inclusion with alt text |
| Clickable cross-references and URLs |
| Smart cross-references () |
| Professional table rules |
| Author-year citations |
| Microtypographic improvements |
| Color support |
| Programmatic diagrams |
| Algorithm pseudocode |
| Code listings |
| Syntax-highlighted code (requires ) |
| SI units () |
| Subfigures and subtables |
Package Load Order
Load in this order to avoid conflicts:
\usepackage[utf8]{inputenc} % 1. Input encoding \usepackage[T1]{fontenc} % 2. Font encoding \usepackage{amsmath,amssymb} % 3. Math \usepackage{graphicx} % 4. Graphics \usepackage{xcolor} % 5. Colors (before tikz) \usepackage{tikz} % 6. Diagrams \usepackage{booktabs} % 7. Tables \usepackage{algorithm2e} % 8. Algorithms \usepackage{listings} % 9. Code \usepackage[numbers]{natbib} % 10. Citations \usepackage{hyperref} % 11. Hyperlinks (LAST or near-last) \usepackage{cleveref} % 12. Smart refs (AFTER hyperref)
ORCID Integration
ORCID (Open Researcher and Contributor ID) is the standard persistent identifier for researchers. Format:
0000-0002-1825-0097 (16 digits, hyphenated groups of 4).
Including ORCID in LaTeX Documents
\usepackage{orcidlink} % Provides \orcidlink command % In author block \author{ Jane Researcher\orcidlink{0000-0002-1825-0097} \and John Scholar\orcidlink{0000-0001-5109-3700} }
Manual ORCID (without orcidlink package)
\usepackage{hyperref} \newcommand{\orcid}[1]{\href{https://orcid.org/#1}{\includegraphics[height=1em]{orcid.png} #1}} % Usage \author{Jane Researcher\thanks{\orcid{0000-0002-1825-0097}}}
ORCID in BibTeX
@article{researcher2026, author = {Researcher, Jane}, title = {Important Discovery}, journal = {Nature}, year = {2026}, note = {ORCID: 0000-0002-1825-0097} }
ORCID Record Data Types
ORCID tracks: works (papers, books, preprints), employment, education, funding, peer review, research resources, invited positions, distinctions, memberships, qualifications.
ORCID API Integration
- Public API: Read-only access to public researcher data. No auth required.
- Member API: Read/write with OAuth 2.0 permission. Post works, affiliations, funding.
- Sandbox:
for testing (use before production).sandbox.orcid.org - iD Format: Always display as full URL:
https://orcid.org/0000-0002-1825-0097 - Schema: v3.0 current. Supports DOI, arXiv ID, PubMed ID, ISBN cross-linking.
Best Practices
- Always collect ORCID iD via authenticated OAuth (never manual entry — prevents typos)
- Display the green ORCID icon alongside the iD per brand guidelines
- Link ORCID to arXiv submissions (arXiv supports ORCID in author metadata)
- Include ORCID in all journal submissions, grant applications, and institutional profiles
- Use the ORCID sandbox (
) for development/testingsandbox.orcid.org
When This Skill Activates
- Writing LaTeX documents or templates
- Preparing arXiv submissions
- Formatting mathematical expressions
- Creating publication-ready tables and figures
- Managing bibliographies
- Troubleshooting LaTeX compilation errors
- Converting documents between formats
- Creating Beamer presentations
- Integrating ORCID identifiers into papers
- Academic publishing workflow questions