STTeX (sttex)
A pip-installable LaTeX paper build and template manager, built on the official publishers' TeX packages rather than replacing TeX or modifying journal styles.
v0.4.2: modular manuscripts
paper/workflow.tex is the author-controlled outline. paper/main.tex is the generated compilable wrapper. Edit the outline and metadata files, not the wrapper. sttex build regenerates the wrapper and installs bundled styles before invoking latexmk.
paper/
workflow.tex
main.tex # generated
title.tex
authors.tex
abstract.tex
introduction.tex
references.bib
figures/
paper/workflow.tex:
\input{title.tex}
\input{authors.tex}
\input{abstract.tex}
\input{introduction.tex}
\bibliography{references}
paper/title.tex contains raw title text (including nested LaTeX commands), not a \title declaration. paper/abstract.tex contains abstract text without an environment. paper/authors.tex uses:
\sttexauthor{Alice Example}{1}
\sttexauthor{Bob Example}{1,2}
\sttexaffiliation{1}{First Institution}
\sttexaffiliation{2}{Second Institution}
\sttexemail{alice@example.org}
One optional corresponding-author email is assigned to the first author. Author and affiliation declarations are translated to venue-specific native commands. Incognito suppresses the author block, not all identifying manuscript content. Legacy manuscripts with standalone section inputs, literal balanced titles and simple \author, \affiliation, \email declarations (including in authors.tex) remain supported; complex publisher-specific author syntax and custom preambles may require migration. Do not expect arbitrary TeX macro expansion or preservation of arbitrary inline document-body commands. The title, author and abstract files are optional. Missing metadata uses the placeholders Research Manuscript, Author Name and Abstract goes here, respectively, with warnings. Incognito uses Anonymous Authors. Invalid author declarations and missing scientific section files remain errors. Metadata files are picked up automatically when present, even if their input lines are omitted from the outline.
sttex build . --venue iclr --mode preprint --theme light
sttex build . --venue basic --mode print --theme light --arxiv
Explicit build overrides create a temporary prepared copy, fetch missing official assets, and copy the PDF/ZIP back to the source root. The existing prepare / fetch / build workflow remains supported. Without overrides, a configured modular project regenerates paper/main.tex in place. Legacy projects without workflow.tex are prepared in a temporary directory to avoid overwriting their original main.tex. To compile manually after preparation, use latexmk -pdf main.tex from the prepared paper/ directory. The arXiv ZIP exports the generated wrapper as main.tex and its bibliography as main.bbl and validates the archive independently.
Supported venues and publication modes
| Venue |
preprint |
print |
incognito |
basic |
One-column author-visible article |
Two-column article |
Two-column anonymous article |
physrev |
REVTeX preprint |
REVTeX reprint |
REVTeX preprint, anonymized author placeholder |
jhep |
Official JHEP layout, named authors |
Same official layout |
Anonymous author placeholder (not official blind mode) |
neurips |
Official [main,preprint] |
Official [main,final], accepted papers only |
Official anonymous review [main] |
icml |
Official [preprint] |
Official [accepted], accepted papers only |
Official anonymous review (no option) |
iclr |
Official \iclrfinalcopy, author-visible reading copy |
Official \iclrfinalcopy, accepted papers only |
Official anonymous review (no final-copy command) |
The modes express intent, not a guarantee of submission eligibility. See the current venue rules before submitting. For example, print for NeurIPS / ICML / ICLR should not be used to imply acceptance when a manuscript is still under review. incognito for JHEP/REVTeX only masks the generated author block; it is not a full metadata, acknowledgments, figures, or self-citation anonymizer.
Independent appearance: light (default, submission-oriented) and night (personal reading copy). The night overlay does not modify official .sty files and changes colors but not venue layout. Explicitly colored images or artwork may still need adjustments.
Install and use
pip install . # in this repository (before PyPI publishing)
sttex list
sttex sources
sttex new my-paper --venue iclr --mode incognito --theme light
sttex fetch my-paper # publisher-owned styles downloaded on demand
sttex doctor my-paper
sttex build my-paper
Use pip install sttex after the project is published to PyPI.
Reuse an existing paper without editing its source
If xgemm-paper/paper/workflow.tex inputs the section files introduction.tex, xgemm.tex, fung.tex, etc.:
sttex prepare xgemm-paper --venue physrev --mode preprint --theme night \
--output /tmp/xgemm-physrev-night
sttex build /tmp/xgemm-physrev-night
Output: /tmp/xgemm-physrev-night/paper-physrev-preprint-night.pdf. Copy the result to your repository root or upload it from Actions. The source outline and sections remain unchanged. prepare reads standalone \input{...} directives in workflow.tex (or legacy main.tex) and copies the files in paper/ to a build copy. More complex custom document-class macros may need an extra adapter later.
Style layout within the installed wheel
src/sttex/resources/styles/
sttex-common.sty # math, graphics, TikZ, PGFPlots; avoids geometry changes
sttex-theme.sty # light/night color handling
sttex-basic.sty
sttex-physrev.sty
sttex-jhep.sty
sttex-neurips.sty
sttex-icml.sty
sttex-iclr.sty
src/sttex/resources/bib/
sttex.bst # LPPL-modified plainnat: optional linked metadata
sttex-links.sty
The sttex-<venue>.sty adapter files load the common science packages and optional night overlay. Original official publisher files are not modified or bundled into the PyPI wheel. REVTeX is provided by TeX Live; other assets are downloaded by sttex fetch and recorded in sttex-official-assets.json with SHA-256 hashes.
Official asset sources
Sources and archive filenames are codified in src/sttex/assets.py. Official sources must be available on the machine running sttex fetch; checksums are created after downloading rather than falsely asserting predetermined hashes.
GitHub Actions
Use the existing manuscript workflow with sttex prepare, sttex fetch, and sttex build. Pin the desired STTeX release. No Modal GPU is needed for TeX compilation.
Notes
The basic bibliography sttex.bst is derived from plainnat.bst and retains its LPPL notice; the other original Python and TeX adapter files are MIT-licensed. Official venue bibliography styles always take precedence when the target is not basic.
Version 0.2.0 was tested offline for generated wrappers and for basic/REVTeX compilation. Downloading and building all four external venue archives is not validated in this environment; run sttex fetch and sttex doctor in an environment with internet access before relying on the resulting PDFs.
STTeX themes and notes migration (v0.2)
Your original dacnotes.sty became three layers:
sttex-common.sty imports safe math/graphics packages, without changing page layout.
sttex-theme.sty handles light/night colors, neon PGFPlots cycle, captions, hyperlinks, headers, and footnotes. Night mode uses background #1C1F24, foreground #D6D9DE, and cyan links #7FB4E6.
sttex-theorems.sty provides your semantic theorem/lemma/definition/corollary boxes; it is opt-in for publisher templates to avoid conflicting with venue theorem environments.
sttex-notation.sty provides your common mathematics macros.
sttex-notes.sty mirrors dacnotes for ordinary notes, accepting night, nothms, and nogeometry. Do not use it with official journal classes; prefer sttex-physrev, sttex-iclr, etc.
% Generic notes (geometry and theorem boxes included):
\usepackage[night]{sttex-notes}
% Physical Review (theme only; no venue layout override):
\documentclass[aps,preprint]{revtex4-2}
\usepackage[night]{sttex-physrev}
% Optional theorem boxes in venue papers when not already defined:
\usepackage{sttex-theorems}
In night mode, PGFPlots adopts a cyan/magenta/lime/amber/violet cycle unless you set explicit plot colors. The author identity mode is chosen by the CLI and venue wrapper, not by the palette package. --mode incognito is an optional anonymized draft for Physical Review, not a publisher-required blind review setting; it masks generated author blocks and metadata but cannot remove identifying references, acknowledgments, and user-supplied graphics.
Source distribution for arXiv (v0.3.0)
sttex build my-paper --arxiv
sttex build my-paper --arxiv --keep-comments
The optional flag produces the ordinary PDF and a sibling *-arxiv.zip with
main.tex at its root. Packaging requires a light, non-incognito configuration.
Only local recorder inputs and local BibTeX dependencies are collected; standard
TeX distribution packages are not copied. Custom style files and the STTeX
license are retained. Ordinary manuscript comments are conservatively removed
from the copied .tex sources, keeping % whitespace semantics. Files with
recognized verbatim or unusual tokenization constructs are left unchanged;
review the resulting archive for private material before uploading. Styles and
bibliographies are not sanitized. The archive is tested by compiling a fresh
copy with cleared TeX search overrides. This does not guarantee compatibility
with arXiv's TeX version or submission rules. Original manuscript sources are
not modified. The ordinary build still writes TeX auxiliary files in paper/.
The build must be performed on the final author-visible manuscript. In particular,
prepare currently generates placeholder author metadata: check and replace
that metadata before publishing any archive.