# Setting up BasicTex (Homebrew)

Just getting started with TeX and I think I'm missing something...

I've installed BasicTex via Homebrew Cask (brew cask install basictex) which supposedly includes pdfTeX and a bunch of other tools (MetaFont, dips, MetaPost, etc.), but when I run pdflatex I get 'Command Not Found'.

Is there additional setup required here? (tlmgr?)

(On Mac OS X 10.11.4)

• Do yourself a favour and install BasicTeX or MacTeX 'directly' (no Homebrew involvement). – Joseph Wright May 2 '16 at 16:33
• Welcome! I thought Homebrew had sensibly decided not to provide TeX packages any more, but it appears that's unfortunately not so. – cfr May 2 '16 at 16:36
• Install the whole thing directly from tug.org -- it's 2.5G bytes but it's worth it. – Thruston May 2 '16 at 17:07
• @cfr For the most part, that's true, but it's still available through Homebrew Cask - which downloads the package anyway. They still have one, but it's patched to hell and only 32-bit, so there's that – Chris May 2 '16 at 17:29
• @JosephWright I'm leaning in that direction. Even trying things out for ~30 minutes proves to me that unless you're really familiar with how the TeX environment works, a GUI for configuration is a really good idea – Chris May 2 '16 at 17:33

Update:

As noted by Dorian, brew cask is now smart enough to run the installer:

$brew cask install basictex ==> Downloading http://mirror.ctan.org/systems/mac/mactex/mactex-basictex-20180417.pkg ==> Downloading from http://ctan.math.washington.edu/tex-archive/systems/mac/mactex/mactex-basictex-20180417.pkg ######################################################################## 100.0% ==> Verifying SHA-256 checksum for Cask 'basictex'. ==> Installing Cask basictex ==> Running installer for basictex; your password may be necessary. ==> Package installers may write to any location; options such as --appdir are ignored. Password: <prompts for password> installer: Package name is BasicTeX-2018 installer: Installing at base path / installer: The install was successful. 🍺 basictex was successfully installed! Again, however, the newly installed binaries won't be in your$PATH until you open a new terminal window or new login shell.

$which pdflatex$ pdflatex
$bash --login Restored session: Thu Nov 29 10:19:33 PST 2018$ which pdflatex
/Library/TeX/texbin/pdflatex

brew cask install basictex just downloads the .pkg installer, which you then need to open so it can install itself.

$brew cask install basictex ==> Tapping caskroom/cask Cloning into '/usr/local/Library/Taps/caskroom/homebrew-cask'... remote: Counting objects: 3781, done. remote: Compressing objects: 100% (3728/3728), done. remote: Total 3781 (delta 73), reused 627 (delta 32), pack-reused 0 Receiving objects: 100% (3781/3781), 6.51 MiB | 666.00 KiB/s, done. Resolving deltas: 100% (73/73), done. Checking connectivity... done. Tapped 1 formula (3,747 files, 15.4M) ==> Creating Caskroom at /usr/local/Caskroom ==> Downloading http://mirror.ctan.org/systems/mac/mactex/mactex-basictex-20160523.pkg ######################################################################## 100.0% ==> Verifying checksum for Cask basictex ==> Running installer for basictex; your password may be necessary. ==> Package installers may write to any location; options such as --appdir are ignored. Password:⚿ ==> installer: Package name is BasicTeX-2016 ==> installer: Installing at base path / ==> installer: The install was successful. 🍺 basictex staged at '/usr/local/Caskroom/basictex/20160523' (105M) You can see where it was download ("staged") at the end of the brew cask output (as above); locate in the Finder and double-click, or just use open.$ ls /usr/local/Caskroom/basictex/20160523
mactex-basictex-20160523.pkg
$open /usr/local/Caskroom/basictex/20160523/mactex-basictex-20160523.pkg If you now try to find, say, pdflatex in the same Terminal window, it won't be in your$PATH:

$which pdflatex$ pdflatex
$which pdflatex /Library/TeX/texbin/pdflatex And you're good to go. • if you found this - like me - because you are trying to generate pdf with pandoc, you need to also run sudo tlmgr install collection-fontsrecommended, and maby several more tlmgr commands to install all the packages your specific template needs – bjelli Jul 30 '17 at 14:23 Only brew cask install basictex is needed: ==> Satisfying dependencies ==> Downloading http://mirror.ctan.org/systems/mac/mactex/mactex-basictex-201706 ######################################################################## 100.0% ==> Verifying checksum for Cask basictex ==> Installing Cask basictex ==> Running installer for basictex; your password may be necessary. ==> Package installers may write to any location; options such as --appdir are i Password: ==> installer: Package name is BasicTeX-2017 ==> installer: Installing at base path / ==> installer: The install was successful. 🍺 basictex was successfully installed! I installed BasicTex but it was not added to the PATH file in macOS. I use zsh so i added the following to ~/.zshrc # pdftex export PATH=“/Library/TeX/texbin/:$PATH”