Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to install latex and xelatex on Mac so that Jupyter "Download as PDF" will work
brew install pandoc
brew tap homebrew/cask
brew install --cask basictex
eval "$(/usr/libexec/path_helper)"
# Update $PATH to include `/usr/local/texlive/2022basic/bin/universal-darwin`
sudo tlmgr update --self
sudo tlmgr install texliveonfly
sudo tlmgr install xelatex
sudo tlmgr install adjustbox
sudo tlmgr install tcolorbox
sudo tlmgr install collectbox
sudo tlmgr install ucs
sudo tlmgr install environ
sudo tlmgr install trimspaces
sudo tlmgr install titling
sudo tlmgr install enumitem
sudo tlmgr install rsfs
@naturale0
Copy link

Works like a charm on M1 mac (Rosetta enabled). Thanks!

@kevingoh
Copy link

Works like a charm on M1 mac (Rosetta enabled). Thanks!

@naturela0 did you use the rosetta brew to install basictex as well?

thanks

@naturale0
Copy link

@kevingoh Yes I did. Did everything on Rosetta.

@shivammehta25
Copy link

Homebrew has removed cask in the latest updates , the command can now just be brew install basictex

@tbrodbeck
Copy link

Thanks

@akashlevy
Copy link

sudo tlmgr install xelatex
tlmgr: package repository https://mirrors.concertpass.com/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr install: package xelatex not present in repository.
tlmgr: action install returned an error; continuing.
tlmgr: An error has occurred. See above messages. Exiting.

Anyone seeing above issue?

@fedormatantsev
Copy link

sudo tlmgr install xelatex
tlmgr: package repository https://mirrors.concertpass.com/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr install: package xelatex not present in repository.
tlmgr: action install returned an error; continuing.
tlmgr: An error has occurred. See above messages. Exiting.

Anyone seeing above issue?

Yeah, it seems xetex/xelatex is now a part of basic installation, so no additional package is required anymore.

@akashlevy
Copy link

Cool, thanks! :)

@shenoy-anurag
Copy link

Worked like a charm!

Latest commands (for M1):
brew install basictex
sudo tlmgr update --self
sudo tlmgr install texliveonfly
sudo tlmgr install adjustbox
sudo tlmgr install tcolorbox
sudo tlmgr install collectbox
sudo tlmgr install ucs
sudo tlmgr install environ
sudo tlmgr install trimspaces
sudo tlmgr install titling
sudo tlmgr install enumitem
sudo tlmgr install rsfs

@mschrader15
Copy link

This works great on M1 (without Rosetta), thanks!

@tamet83
Copy link

tamet83 commented Dec 22, 2021

Thank you very much :)

@jonmarty
Copy link

Had to replace brew cask install basictex with brew install --cask basictex, as the first command gives Error: Unknown command: cask. Seems like a recent change.

@oliveiralfl
Copy link

Thank you!

@kathgironpe
Copy link

This doesn't quite work. I ended up downloading the 4G package.

@ashwanthkumar
Copy link

Works like a charm, thank you!

@jzhang38
Copy link

jzhang38 commented Jun 6, 2022

thanks!

@arkov
Copy link

arkov commented Aug 17, 2022

cheers!

@wisetc
Copy link

wisetc commented Sep 16, 2022

sudo tlmgr install wrapfig
sudo tlmgr install capt-of

Do you need these packages to output pdf using emacs

@wusphinx
Copy link

You may encounter errors such as below

tlmgr: package repository https://mirrors.bfsu.edu.cn/CTAN/systems/texlive/tlnet (not verified: gpg unavailable)

just run this command, and then continue

$ sudo tlmgr --repository http://www.texlive.info/tlgpg/ install tlgpg

@Icedtea-dev
Copy link

Nice

@lukejanicke
Copy link

I had to add sudo tlmgr install latexmk for the LaTeX Workshop extension to work in VS Code.

@IreneJeong
Copy link

sudo tlmgr install rsfs

This works perfectly on my Mac! Thanks

@deepnz
Copy link

deepnz commented Mar 2, 2023

I had some issues for missing packages or not the latest version for some (siunitx) for my tex file. I just downloaded Mactex, whopping file, but it seemed to plug in the holes to run xelatex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment