2

now I have a question about the MacTex, I have a cls file, and according to other post, I have put it in the path ~/Library/texmf/tex/latax and sudo texhash it, but when I try to use \documentclass of my cls in texshop, and compile, it will report error like the cls is not found, anyone has any ideas of it? Thank you very much!

  • Except for the fact that the last directory should better be named latex (;-) , that should be fine (you don’t even need to run mktexlsr). What’s the exact error message that you get? – GuM Jun 02 '17 at 17:40
  • @GustavoMezzetti I got ! Latex Error : File 'liuthesis.cls' not found.(liuthesis.cls is the one I put in the .../latex path) – sunboy612 Jun 02 '17 at 17:57
  • @Tiuri Haha no, I mean I misspell here, I do create .../latex – sunboy612 Jun 02 '17 at 17:59
  • If you open a Terminal window and type kpsewhich liuthesis.cls what do you get? – Alan Munn Jun 02 '17 at 18:01
  • @AlanMunn I do like the post that you mention, and I put cls file in /usr/local/texlive/texmf-local/tex/latex/local and texhash, it seems wroking now! Thank you so much! – sunboy612 Jun 02 '17 at 18:08
  • But that's not what you should have done (although it does work that way too.) It's much simpler to put things in your ~/Library/texmf folder. – Alan Munn Jun 02 '17 at 18:10
  • @GustavoMezzetti Thank you so much, I follow the post Alan mention, now it seems working! – sunboy612 Jun 02 '17 at 18:10
  • @AlanMunn OK, I try this, if I put the cls into /usr/local/texlive/texmf-local/tex/latex/local and kpsewhich liuthesis.cls, it will show the exact directory, but if I put it into the ~/Library/texmf, it will show nothing – sunboy612 Jun 02 '17 at 18:13
  • @sunboy612: It looks like you are the only user of your computer, aren’t you? (Or, at least, you have system administration priviledges…) – GuM Jun 02 '17 at 18:14
  • That's very odd. Are you sure you have installed MacTeX and not a version via MacPorts or brew? What does kpsewhich --var-value TEXMFHOME return? – Alan Munn Jun 02 '17 at 18:14
  • @GustavoMezzetti Yes, I am the only user! – sunboy612 Jun 02 '17 at 18:18
  • @AlanMunn I downloaded and installed MacTex from their official website, and I run kpsewhich --var-value TEXMFHOME, it will show /Users/bo/Library/texmf (Sorry first time to use Latex) – sunboy612 Jun 02 '17 at 18:19
  • That's the correct path. So the fact that kpsewhich doesn't find liuthesis.cls when it's in ~/Library/texmf/tex/latex is really surprising. – Alan Munn Jun 02 '17 at 18:21
  • @sunboy612: In that case, I’d say that placing your personal files inside /usr/local/texlive/texmf-local/tex/latex/local is even batter than placing them in your personal texmf tree, since they will be available to other users as well (should you ever have a guest!). Yet the fact that they are not found when you put them inside ~/Library/texmf/tex/latex/ remains mysterious. – GuM Jun 02 '17 at 18:24
  • @AlanMunn I think I found the reason, because I just open Finder, and it shows the Macintosh HD, and I open it has a folder called Library, I think I create the /texmf here. Right now I go to the directory ~/Library and create again, and it's working! But thank you very much! – sunboy612 Jun 02 '17 at 18:39
  • @GustavoMezzetti I think I found the reason, because I just open Finder, and it shows the Macintosh HD, and I open it has a folder called Library, I think I create the /texmf here. Right now I go to the directory ~/Library and create again, and it's working! But thank you very much! – sunboy612 Jun 02 '17 at 18:39
  • That makes sense. Yes, it's ~/Library not /Library that should contain the local files. – Alan Munn Jun 02 '17 at 18:41

0 Answers0