This repository holds reusable LaTeX building blocks shared across papers:
custom.sty— checklist symbols, framed quotes, and AI-collaboration comment macros (\ai,\todo,\wei).figstyle/— the figure style kit: one Okabe-Ito palette plus TikZ and matplotlib conventions so diagrams and plots look consistent across every project. Seefigstyle/README.md.
A shared "house style" for figures, split into two layers: appearance (the
palette, fonts, line weights, TikZ styles, and an icon library) lives globally
in this kit; meaning (which concept gets which color, column widths) lives
per-paper in a small theme.tex / theme.py you copy and edit. Figures
reference colors by meaning (draw=ours), never by hue (wgTeal), so one
palette edit reflows every paper.
Vendor it by copying figstyle/ into a project root, then \usepackage{figstyle/wgstyle} and \input{theme}. The palette is generated from figstyle/palette.toml via python figstyle/gen.py. Full reference and examples: figstyle/README.md.
- Copy
custom.styinto your project folder (the same folder asmain.tex) or install it into your local texmf tree. - In your document preamble add:
\documentclass{article}
% (optional) if you need specific xcolor options, load xcolor before custom:
% \usepackage[dvipsnames]{xcolor}
\usepackage{custom}
\begin{document}
...
\end{document}- If you need to pass package-specific options (for example color name sets for
xcolor), load that package with options before\usepackage{custom}so the options take effect.
If you put custom.sty in the same folder as your main.tex, LaTeX will find it automatically when you write \usepackage{custom} in the preamble. No installation into texmf is required for local project use.
If you put it in a subfolder which is in the same folder with your main.tex, then you need to specify the relative path to the style file, like this:
\usepackage{subfolder/custom}custom.sty loads the following packages internally:
xcolorpifontfontawesome5(chat-bubble icons for\ai)enumitemamssymbxparseifthenmdframedsiunitxxfphyperrefcleveref
You generally do not need to \usepackage these yourself — custom.sty loads them — but if you need to set options for any of them, load that package first in your preamble. Note: because custom.sty loads hyperref and cleveref, do not load hyperref yourself; apply options via \hypersetup{...} after \usepackage{custom}.
.vscode/settings.json recolors the custom/generic LaTeX commands (e.g. \wei, \skp, \cnd, \ph) so they no longer blend into body text in the editor. It targets the shared TextMate scope support.function.general.{tex,latex} used by LaTeX Workshop; built-in commands like \ref, \cite, and \emph keep their own theme colors. Change the foreground hex value to pick a different color, or remove the file to opt out.
- Review/collaboration macros —
\wei(an author comment),\mynote,\todo(an inline action item), and\ai(hand a span to an AI with a prompt, rendered as a chat bubble) — all honor theshowcommentstoggle, so they disappear in camera-ready output (set\setboolean{showcomments}{false}). \todo[label]{text}always leads its tag withTODOand appends a non-default label (e.g.TODO·FIXME), then colors itself by priority from that label:FIXME/BUGare high (red),TODO(the default) is normal (orange), andNOTE/LATER/HOLDare low (gray); any other label uses the normal color. Label matching is case-insensitive, so[fixme],[FixMe], and[FIXME]are equivalent.\ai{quoted text}{instruction}carries an action state in its optional argument: by default the AI should apply the instruction now; use\ai[hold]{...}{...}to park a request for later instead of acting on it.- Macro names are short and may collide with other packages (notably
\todofromtodonotes); consider renaming or namespacing if you reusecustom.styalongside such packages.