Skip to content

Instantly share code, notes, and snippets.

@martialboniou
Last active April 17, 2026 14:06
Show Gist options
  • Select an option

  • Save martialboniou/da042e362442a1214f7464b03e8bf8fe to your computer and use it in GitHub Desktop.

Select an option

Save martialboniou/da042e362442a1214f7464b03e8bf8fe to your computer and use it in GitHub Desktop.
Reinstalling locally XeLatex/pdflatex on macbook
#!/usr/bin/env bash
# goal: compile ~/Documents/Administration/CV locally
# with a minimalist modern TeX setup
# no texlive package here
brew install basictex
# restart terminal
if [[ "`echo $PATH | tr ':' "\n" | rg TeX`" == "/Library/TeX/texbin" ]]; then echo good; else echo bad; fi
# MUST PRINT good, otherwise stop here!!
# add CTAN packages
sudo tlmgr update --self
# check: tlmgr info --only-installed
# 1/2 - vitae AKA cv
sudo tlmgr install pdfx
sudo tlmgr install xmpincl
sudo tlmgr install accsupp
sudo tlmgr install fontawesome5
sudo tlmgr install tcolorbox
sudo tlmgr install tikzfill
sudo tlmgr install enumitem
sudo tlmgr install adjustbox # for trimclip.sty
sudo tlmgr install dashrule
sudo tlmgr install ifmtarg
sudo tlmgr install multirow
sudo tlmgr install changepage
sudo tlmgr install paracol
# 2/2 - letters AKA courriers
sudo tlmgr install lettre
sudo tlmgr install cm-super # scalable fonts
# bonus
## \today => display the datetime of today (\usepackage{datetime})
sudo tlmgr install datetime
sudo tlmgr install fmtcount
## meta compiler
sudo tlmgr install latexmk
# fixes iff your umask is 027 (no permissions for other than `root/wheel` in `/usr/local`)
# option 1/2 w/ reboot (enable permissions globally):
sudo launchctl config system umask 022
# option 2/2 (manual update):
cd /usr/local/texlive/2026basic/texmf-dist/tex/latex
sudo chmod o+rx pdfx xmpincl accsupp fontawesome5 tcolorbox environ trimspaces
sudo chmod o+rx tikzfill enumitem adjustbox collectbox dashrule ifmtarg
sudo chmod o+rx multirow changepage paracol lettre cm-super
sudo chmod o+rx datetime fmtcount
cd /usr/local/texlive/2026basic/texmf-dist/fonts/opentype/public
sudo chmod o+rx fontawesome5
cd /usr/local/texlive/2026basic/texmf-dist/scripts
sudo chmod o+rx fmtcount latexmk
# generate or update `pdftex.map` for fonts with auto expansion (mandatory for `courriers/*.tex`)
sudo updmap
sudo chmod o+r /usr/local/texlive/2026basic/texmf-var/fonts/map/pdftex/updmap/pdftex.map # iff your umask is 027; check the previous comments
# !!! fonts: ensure Roboto_Slab & Lato are installed for CVs
# tests
# 1/2 - CV
cd ~/Documents/Administration/CV
xelatex cv-2025.tex
# 2/2 - courriers
cd ../courriers
xelatex ldm-pausecafe.tex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment