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

naturale0 commented Mar 12, 2021

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

@kevingoh
Copy link

kevingoh commented Mar 16, 2021

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

naturale0 commented Mar 16, 2021

@kevingoh Yes I did. Did everything on Rosetta.

@shivammehta25
Copy link

shivammehta25 commented Jun 1, 2021

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

@tbrodbeck
Copy link

tbrodbeck commented Jul 23, 2021

Thanks

@akashlevy
Copy link

akashlevy commented Jul 25, 2021

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

fedormatantsev commented Aug 2, 2021

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

akashlevy commented Aug 16, 2021

Cool, thanks! :)

@shenoy-anurag
Copy link

shenoy-anurag commented Sep 23, 2021

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

mschrader15 commented Nov 18, 2021

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

@tamet83
Copy link

tamet83 commented Dec 22, 2021

Thank you very much :)

@jonmarty
Copy link

jonmarty commented Jan 19, 2022

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

oliveiralfl commented Feb 26, 2022

Thank you!

@kathgironpe
Copy link

kathgironpe commented Mar 17, 2022

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

@ashwanthkumar
Copy link

ashwanthkumar commented May 12, 2022

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

wusphinx commented Sep 21, 2022

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

Icedtea-dev commented Nov 16, 2022

Nice

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