2

I have a feeling that the version of pdflatex that I'm using is not seeing the packages installed by tlmgr, though it might also be that tlmgr is not installing packages correctly. I don't know how to point pdflatex to the correct path, so help with that would be really welcome!

Currently, when I check the paths of pdflatex and tlmgr, I get:

Agness-MacBook-Pro-1166:thesis-latex agnes$ which pdflatex
/opt/local/bin/pdflatex
Agness-MacBook-Pro-1166:thesis-latex agnes$ which tlmgr
/usr/local/texlive/2018/bin/x86_64-darwin//tlmgr

When I run pdflatex test.tex, I get:

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/MacPorts 2018.47642_8) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 3 language(s) loaded.

! LaTeX Error: File `tufte-handout.cls' not found.

And when I run tlmgr install tufte-latex (tufte-handout.cls is a file within that repository), I get:

tlmgr: package repository http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.ctan.org/systems/texlive/tlnet (verified)
tlmgr install: package already present: tufte-latex

I've tried multiple variations on

$ export PATH=$PATH:/usr/local/texlive/2018/bin/x86_64-darwin//tlmgr
$ export PATH=$PATH:/usr/local/texlive/2018/bin

etc, and followed the install instructions (+ path-adding) on the texLive website. None seem to work!

I also read the solution in this question but, while this might be the issue, there was no clue as to how to configure pdflatex itself, as that person was struggling with TexWorks. Even when I manually paste the package into the folder and add it to the path, pdflatex doesn't see it: it works when i copy-paste individual files into the same repository, but this is silly!

The only thing that makes me think it might be a tlmgr not a path problem is that when I search my computer (for e.g. tufte-handout.cls), it returns no results (this is with hidden files showing, searching the whole computer).

Any help very welcome!

  • the .cls file should be in the master system ~wherever/ texmf/tex/latex/tufte-latex folder along with the other cls bst and .def so if it is there then perhaps it is the texmf root not set right but ensure running texhash gets it registered first what looks odd to me is the //before tlmgr in most sytems that path to binaries would be unterminated for a single slash to be apended –  Apr 13 '19 at 13:03
  • ah -- somewhat mysteriously solved by adding the same path I'd tried to add in the cli directly to ~/.bash_profile. If anyone's having the same issue, I added the line export PATH="/usr/local/texlive/2018/bin/x86_64-darwin:$PATH" directly to the end of ~/.bash_profile. It might be that I had a typo when I tried it in the command line. Thanks for your help KJO! It does indeed look mysterious, though, now it works so less concerned. – Agnes Cameron Apr 13 '19 at 14:20

1 Answers1

3

I fixed this issue by adding the line export PATH="/usr/local/texlive/2018/bin/x86_64-darwin:$PATH" directly to the end of ~/.bash_profile. It might be that I had a typo when I tried it in the command line.

  • 2
    If you installed the TeX Live 2018 Distribution using the MacTeX installer prepend the PATH variable with /Library/TeX/texbin rather than the direct path to the TeX Live 2018 binaries. That way if you install TeX Live 2019, once it comes out, via the MacTeX-2019 installer package it will automatically have that on you default PATH. You will also easily be able to switch between TeX Live 2018 and 2019 if you run into a problem using the TeX Live Utility supplied with MacTeX (in /Applications/TeX). – Herb Schulz Apr 13 '19 at 14:43
  • 1
    really helpful, thanks! – Agnes Cameron Apr 13 '19 at 14:52
  • 1
    If only 900 other posts on the internet talked about PATH instead of indicating the need to install packages with tlmgr this would have save me 20 minutes. Thanks for this. Please accept this answer. – Brian Wiley Feb 12 '21 at 08:56
  • ah! I think when i made this post I didn't have enough reputation to do that. glad it helped :) – Agnes Cameron Feb 13 '21 at 09:09
  • This saved my day, thanks! – Mike Mar 11 '22 at 17:56