SuperAPI AI Directory

light-typesetting

Coding & development

View repository

Updated 10-16 00:00

About this skill

LaTeX / Word Typesetting and Export

Before Starting

Confirm the target venue's official template and requirements (db01: template_url, reference_style, single/double column, page limit). Prefer the official template; do not create your own. Template priority: venue official website author kit > Overleaf official template page (overleaf.com/gallery/tagged/… or "Open as Template") > CTAN package. Note that conference templates have annual versions (e.g., NDSS bare_conf_LAST-X2026.tex); be sure to use the version specified for the current edition, as old versions will be desk-rejected. Modify from the official skeleton file (IEEE bare_conf.tex、ACM sample-*.tex), do not start from an empty file.

LaTeX Route

Apply the official cls; key starting points:

  • IEEEtran:\documentclass[conference]{IEEEtran}(conference double-column), author block \IEEEauthorblockN/A, keywords IEEEkeywords environment,\bibliographystyle{IEEEtran}. For wide figures use figure* to span columns at the top of the page.
  • acmart:\documentclass[sigconf]{acmart}(conference)/acmsmall(journal)/manuscript(review); for double-blind add [review,anonymous]; fill in \acmConference、\setcopyright、CCS \ccsdesc(generated from dl.acm.org/ccs),\keywords; missing copyright will produce a red box.
  • llncs:\documentclass{llncs}, for institutions use \inst{} numbering, required \titlerunning/\authorrunning,\bibliographystyle{splncs04}。
  • elsarticle: submission [preprint,review,12pt](wide line spacing with line numbers), put front matter in frontmatter, references according to the journal-specified elsarticle-num/-harv。
  • Chinese:ctex document class/package + XeLaTeX or LuaLaTeX. Structural elements: abstract, keywords, section hierarchy, equations (amsmath/mathtools), figures and tables (graphicx + booktabs three-line tables + subcaption), algorithms (algorithm2e or algpseudocode), references, appendices. For cross-references use \label+cleveref 's \cref(automatically adds Fig./Eq. prefixes); load hyperref first, cleveref after. The two reference systems must not be mixed: traditional bibtex + venue .bst, or modern biblatex + biber. For Chinese national standard use the gbt7714 package (\bibliographystyle{gbt7714-numerical} numeric citation / gbt7714-author-year), entries must have langid to distinguish Chinese and English, otherwise "等/et al." and the document type identifier[C]/[J]will be wrong.

Compilation and Environment

  • Use latexmk to automatically converge over multiple compilation rounds:latexmk -pdf file.tex(pdflatex); for Chinese/special fonts use -xelatex or -lualatex; for minted/TikZ externalization add -shell-escape; for CI use -interaction=nonstopmode;-pvc for continuous preview; clean -c(keep PDF)/-C(delete all). You can use latexmkrc to set $pdf_mode(1=pdflatex/4=lualatex/5=xelatex)。
  • Missing packages: for TeX Live use tlmgr install <pkg>(first tlmgr update --self), check ownership with tlmgr search --global --file <name.sty>; for lightweight environments use TinyTeX,tinytex::latexmk() automatically detects and installs missing packages during compilation.
  • Troubleshoot errors/warnings one by one: missing packages, undefined references (run enough rounds/bibtex), overfull/underfull hbox, image not found; keep fonts and math fonts consistent.

Word Route

  • Apply the official .docx template; use Styles rather than manual formatting to control hierarchy.
  • Captions and cross-references, automatic numbering, references (Zotero/EndNote plugin fields), headers and footers, page numbers, columns.
  • Check: consistent fonts, consecutive numbering, figure/table placement, field updates.
  • Generation/conversion: Pandoc md→docx applying styles pandoc in.md -o out.docx --reference-doc=ref.docx(ref.docx provides heading/body/caption styles), references --citeproc --bibliography=refs.bib --csl=style.csl(CSL system, not .bst). To edit an existing docx, unpack and modify word/document.xml/styles.xml then repack (preserve the original structure, no reordering); revision marks use OOXML <w:ins>/<w:del>. Complex formulas converted to docx via OMML may be distorted.
  • Content extraction (not layout restoration): MarkItDown converts pdf/docx/pptx to markdown to feed downstream; python-docx for batch processing.
  • See the detailed actionable checklist in references.md the "Word Academic Typesetting" major section: core checklist (styles/multilevel lists/caption cross-references/field F9 refresh/section breaks/automatic TOC/plugins/document inspector), a 22-item common-error comparison table (symptom→cause→fix), and Chinese thesis template discipline (based on your graduate school's official .docx).

End-to-end walkthrough (content + citations + figures → template → compile → precheck → PDF)

Using IEEE conference two-column as an example, for other venues just replace the template file names:

  1. Choose template skeleton: start by copying the official skeleton from templates/ , do not write from an empty file.
    • IEEE→ieee_bare_conf.tex,ACM→acm_sigconf.tex,Springer LNCS→springer_llncs.tex,Elsevier→elsevier_elsarticle.tex, Chinese→ctex_chinese.tex。
    • All five skeletons are structurally complete and directly compilable (see the compile commands in each file header's comments).Compile verification (2026-06-12, Tectonic): All five tectonic <f>.tex exit 0 producing PDF (IEEE/ACM/Springer/Elsevier use the pdflatex path, ctex_chinese uses the XeLaTeX path with automatic Chinese font installation); trail _verification_log/R7-tex-compile.md。
  2. Fill in content: fill in title/author/abstract/keywords, section body text (from m07/m08), formulas (amsmath), three-line tables (booktabs), algorithms (algorithm2e/algpseudocode). Figures (from m11) use \includegraphics to replace the \rule{} placeholder boxes in the skeleton; wide figures use figure* to span both columns and be placed at the top of the page.
  3. Attach citations: citations (from m10) are written into refs.bib, body text \cite{key}, enable the \bibliographystyle{IEEEtran}+\bibliography{refs}commented out in the skeleton (replace the demo thebibliography). Use cross-references with \label+\cref。
  4. Compile to convergence:latexmk -pdf -interaction=nonstopmode file.tex(for Chinese use -xelatex). latexmk automatically runs enough passes + bibtex/biber until citations/TOC converge. Missing packages: TeX Live tlmgr install、MiKTeX miktex packages install <pkg> and initexmf --update-fndb。
  5. precheck:python scripts/precheck_log.py file.log(add --json for structured output). A non-zero exit code = fatal errors. Check the "symptom→root cause→fix" table in references/latex_errors.md by output category and fix them one by one.
  6. Review and produce PDF: go through the checklist below, confirm page count/layout/anonymity compliance, then deliver the PDF + compilable source project + compliance checklist.

Word route: use assets/docx_template.js(docx-js) to generate a .docx with styles/TOC/headers footers page numbers via code (npm install docx && node docx_template.js), A4 and US Letter switch via the PAGE constant; or Pandoc md→docx --reference-doc。

Checklist (before export)

□ Compile/open without errors (run precheck_log.py with exit code 0) □ All \ref/captions resolve correctly □ Figures and tables clear and reasonably placed □ Reference format matches the venue □ Page count/margins/font size compliant □ Formula numbering consecutive □ Algorithm format correct □ Abstract and keywords complete □ Fonts consistent □ Anonymity requirements (double-blind, remove author information).

Output

Final PDF (+ Word version if needed) + compilable source project + a "format compliance checklist".

This skill asset

  • scripts/precheck_log.py: scan LaTeX .log to catch undefined refs/citations, multiply-defined labels, overfull/underfull hbox, missing figure/file, undefined control sequence, fatal LaTeX/TeX error, and summarize the report by severity (--json/--max), with exit code 1 for fatal items. Run the built-in sample self-test with no arguments.
  • templates/: five minimal compilable skeletons—ieee_bare_conf.tex/acm_sigconf.tex/springer_llncs.tex/elsevier_elsarticle.tex/ctex_chinese.tex, with the compilation command and venue notes stated in the file header.
  • assets/docx_template.js: complete docx-js template, including Document/Packer boilerplate, DXA size conversion table, Heading styles + outlineLevel, TableOfContents, headers/footers + page numbers, explicit page setup for A4 vs US Letter, and booktabs-style three-line tables.
  • references/latex_errors.md: a reference table of common compilation errors (five major categories: fatal errors/warnings/bibtex/Chinese, symptom log -> root cause -> fix).
  • references.md: real endpoints/options/configurations and known pitfalls for each tool, one by one.

Interfaces

Figures come from m11, citations come from m10, content comes from m07/m08, and targets come from m13. Submission anonymization/page-count risks are flagged to the user. Version goes into db09. Before delivery, pass the a08 (light-self-review) self-check gate.


For real endpoints/options/configurations and known pitfalls for each tool, see the same directory references.md。