latex-authoring
Skill8 starsChanged 9 days agoMITView on GitHub
Write, structure and compile LaTeX papers and reports (NeurIPS, ICML, ICLR, IEEE, ACM), including Persian and English XeLaTeX. Use for TeX manuscripts, LaTeX/XeLaTeX build errors, BibTeX checks or TikZ diagrams.
In this repository17 other files it gives its agents.
- app-controlSkill
- artifactSkill
- clean-systemSkill
- contribution-checklistSkill
- debuggingSkill
- doc-styleSkill
- experiment-workflowSkill
- first-principlesSkill
- logoSkill
- multi-agentSkill
- product-designSkill
- project-docsSkill
- reference-driven-productSkill
- specSkill
- tddSkill
- test-auditSkill
- word-farsi-docxSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Write, compile, debug and check LaTeX manuscripts with a modular layout, a clean build and verified citations.
- Very specific: line 22
Put a blank line before every LTR environment (\begin{otherlanguage}{english}, \begin{LTR}) so the RTL paragraph ends first.
- Very specific: line 28
When editing .tex files from Python, never write \b in a normal string: "\babelfont" becomes a backspace plus abelfont, and XeLaTeX draws …
- Very specific: line 63
Use full fields: author, title, booktitle or journal, volume, pages, year, doi.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
LaTeX authoring
Write, compile, debug and check LaTeX manuscripts with a modular layout, a clean build and verified citations.
Layout and style
- Split the paper:
main.tex(class, packages,\inputof sections),macros.tex(notation, defined once),references.bib,sections/,figures/,tables/(one file per table). Never one big.tex. - Load
hyperreflate, thencleverefright after it. align/align*for multi-line equations, never$$oreqnarray; number only equations the text cites.booktabstables with no vertical rules; numbers right-aligned.- Floats
[t!], and\FloatBarrierat section ends so figures stay in their section.
Persian and English with XeLaTeX
For Babel Farsi (RTL) with English (LTR):
- Put a blank line before every LTR environment (
\begin{otherlanguage}{english},\begin{LTR}) so the RTL paragraph ends first; this prevents the\endL or \endRerror. - Define the English typewriter font in the preamble:
\babelfont{tt}[]{DejaVu Sans Mono} \babelfont[english]{tt}[]{DejaVu Sans Mono} - When editing
.texfiles from Python, never write\bin a normal string:"\babelfont"becomes a backspace plusabelfont, and XeLaTeX draws empty boxes. User"\babelfont"or"\\babelfont". - B Nazanin cannot draw the text bullet (U+2022), so redefine list bullets as math symbols, which use the math fallback font:
\renewcommand{\labelitemi}{$\bullet$} \renewcommand{\labelitemii}{$-$} \renewcommand{\labelitemiii}{$\ast$} \renewcommand{\labelitemiv}{$\cdot$} - Wrap every English word inside Persian text in
\eng{...}(for example\newcommand{\eng}[1]{\foreignlanguage{english}{#1}}), and every Latin name or word in math in\mathrm{...}or\text{\eng{...}}; otherwise it falls back to the Persian font and renders as empty squares. - B Nazanin draws the zero-width non-joiner (U+200C) as a square; replace each ZWNJ with a space.
Compile
latexmk -pdf -synctex=1 -interaction=nonstopmode -halt-on-error main.tex # pdfLaTeX
latexmk -xelatex -synctex=1 -interaction=nonstopmode -halt-on-error main.tex # XeLaTeX, Persian and EnglishA clean build has no undefined references (??) and no missing citations. When it fails, filter the log instead of reading it:
rg -A 3 -B 1 '^!|LaTeX Warning|Package.*Warning' main.log | rg -v 'fontspec' | head -n 40| Log message | Cause | Fix |
! Undefined control sequence. | Macro typo or missing package | Check macros.tex or load the package |
Reference '...' undefined | Missing \label or second pass | Add the label; rerun latexmk |
Citation '...' undefined | Key missing from references.bib | Fix the key spelling; rerun the build |
Overfull \hbox (X pt too wide) | Equation, table or word wider than the column | Split with split or multline; narrow the table |
\endL or \endR (XeLaTeX, RTL) | No paragraph break before an LTR block | Add a blank line before the LTR block |
Citations
- Give every entry a
doi, aneprintor its exact venue. Never invent authors, titles or entries. - Use full fields:
author,title,booktitleorjournal,volume,pages,year,doi. - Find duplicate keys:
rg -o '^@[a-zA-Z]+\{[^,]+' references.bib | sort | uniq -d. - After a successful build, compare bibliography keys with the keys cited in all
.auxfiles (or the.bcffile for Biber), counting\nocite. Report unused keys; remove them only when cleanup is in scope. A syntax check does not prove usage, and failed checks stay visible in the report.
Render and open
- Render pages and inspect them for overfull boxes, float collisions and missing glyphs:
mkdir -p /tmp/paper_renders && pdftoppm -png -r 150 -f 1 -l 3 main.pdf /tmp/paper_renders/page - Open the PDF for the user with the environment's opener and confirm the viewer started.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

