Skip to content

Instantly share code, notes, and snippets.

@jj1bdx
Last active July 29, 2021 03:20
Show Gist options
  • Save jj1bdx/1cb98843a894d0cc9e861617517a6eea to your computer and use it in GitHub Desktop.
Save jj1bdx/1cb98843a894d0cc9e861617517a6eea to your computer and use it in GitHub Desktop.
MacTeX BasicTeX config example with homebrew
#!/bin/sh
## remove TeX directories if needed
#sudo /bin/rm -rf /usr/local/texlive
#sudo /bin/rm -rf /Library/TeX
##
umask 022
brew install --cask basictex
#
sudo zsh
umask 022
# fix permission as root
cd /usr/local/texlive
find . -type d -not -perm -001 -print0 | xargs -0 chmod go+rx
find . -type l -not -perm -001 -print0 | xargs -0 chmod -h go+rx
find . -type f -and -not -perm -444 -print0 | xargs -0 chmod go+r
cd /Library/TeX
find . -type d -not -perm -001 -print0 | xargs -0 chmod go+rx
find . -type l -not -perm -001 -print0 | xargs -0 chmod -h go+rx
find . -type f -and -not -perm -444 -print0 | xargs -0 chmod go+r
#
# default repository path:
# http://mirror.ctan.org/systems/texlive/tlnet
# for Japan
tlmgr repository set https://ftp.jaist.ac.jp/pub/CTAN/systems/texlive/tlnet
#
# still as root
tlmgr update --self --all
tlmgr paper a4
tlmgr install collection-langjapanese
tlmgr install collection-latexextra
tlmgr install latexmk collection-luatex collection-fontsrecommended
tlmgr install collection-fontsextra
# back to normal user
exit
umask 077
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment