Skip to content

Group I: LaTeX stack (opt-in, heavy) #36

@thompsonson

Description

@thompsonson

Standalone, cross-platform, opt-in only. LaTeX toolchain is ~1–2 GiB (basictex) to 5 GiB+ (full texlive/MacTeX) and only relevant on machines doing document/paper work. Matches the #31 (Group F: Android) pattern — opt-in with a data flag, default off.

Changes

.chezmoi.toml.tmpl — new data flag

[data]
install_latex = false

Default off everywhere. Flip to true per-machine.

Linux: gated packages

Under {{ if .install_latex }} in $linuxSpecific / $linuxWithDocker / $linuxWithoutDocker:

  • biber
  • latexmk
  • texlive-latex-base
  • texlive-fonts-recommended
  • texlive-science
  • texlive-xetex

macOS: gated cask

Under {{ if .install_latex }} in $macosSpecific:

  • basictex (brew cask)

Prefer basictex over full MacTeX — ~100 MiB vs ~5 GiB, and tlmgr install can pull missing packages on first use. Document the upgrade path in the issue comments or docs/latex.md.

dot_local/bin/executable_sysup — doctor entries

New tools_docs array, gated on installed presence (not the data flag — so a machine that has LaTeX but forgot to flip the flag still gets honest reporting):

  • pdflatex
  • xelatex
  • biber
  • latexmk

get_version() cases:

  • pdflatex --version | head -1
  • xelatex --version | head -1
  • biber --version
  • latexmk --version | head -1

sysup upgrade (ties to #32, Group G)

Add handler:

if command -v tlmgr >/dev/null 2>&1; then
  echo "==> tlmgr (LaTeX)"
  sudo tlmgr update --self --all
fi

Only meaningful on macOS where basictex ships tlmgr as the upgrade path. On Linux, texlive updates come via apt and are already covered by the apt upgrade step.

(Optional) docs/latex.md

Short usage note covering tlmgr install <pkg> on macOS for missing LaTeX packages, and where texlive lands on Linux. Only worth it if anyone other than the author touches this.

Verification checklist

  • chezmoi execute-template renders cleanly with install_latex=true and =false.
  • Default (install_latex=false): no texlive/basictex references in rendered output.
  • install_latex=true on Linux: pdflatex --version + biber --version + latexmk --version all work.
  • install_latex=true on macOS: brew list --cask basictex shows installed; pdflatex on PATH after shell restart.
  • sysup doctor does not warn about missing LaTeX tools when flag is off and the tools genuinely aren't installed.
  • sysup doctor reports LaTeX tools honestly when they are installed, regardless of flag state.

Explicit non-goals

  • No VS Code LaTeX Workshop extension wiring — belongs in VS Code extensions config, separate concern.
  • No Overleaf CLI, no Pandoc-with-LaTeX filters (pandoc is tracked separately in the base-packages issue).
  • No full MacTeX by default — basictex is the right default; machines that need the full 5 GB can brew install --cask mactex manually.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions