LaTeX forum ⇒ TeXShopWhere are the class files stored?

Information and discussion about TeXShop, an integrated LaTeX environment for Mac OS X
BraveRobot
Posts: 6
Joined: Fri Dec 30, 2011 1:46 am

Where are the class files stored?

Postby BraveRobot » Tue Jan 10, 2012 11:45 pm

I want to create a custom class for a document I'm making. I plan to copy my current class (amsbook) and copy it to a new file with some small modifications. However, I haven't been able to find the class files. Does anyone know where they are on my computer?

Thanks!

User avatar
Stefan Kottwitz
Site Admin
Posts: 8736
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Wed Jan 11, 2012 1:04 am

You could use kpsewhich on the command prompt:

  1. kpsewhich amsbook.cls


On my system, this prints

  1. /usr/local/texlive/2011/texmf-dist/tex/latex/amscls/amsbook.cls


Stefan
Site admin

BraveRobot
Posts: 6
Joined: Fri Dec 30, 2011 1:46 am

Postby BraveRobot » Wed Jan 11, 2012 2:36 am

Thanks. I never would have found that. Now where do I put my custom style so that it's picked up by texshop? I tried googling it, but because I'm new to latex, it's hard to figure out which information applies just to latex or which applies to texshop or if it will work on my system at all.

Can I just make a new folder called Example123 in

  1. /usr/local/texlive/2011/texmf-dist/tex/latex/


and then declare Example123 as a class in my document?

User avatar
Stefan Kottwitz
Site Admin
Posts: 8736
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Wed Jan 11, 2012 9:15 am

I would not put a self-made class into the TeX distribution folder. It's hard to find, and could get lost when you reinstall your system.

Have a look what's your personal TeX home directory, you could use that:

  1. kpsewhich -var-value=TEXMFHOME


Stefan
Site admin

BraveRobot
Posts: 6
Joined: Fri Dec 30, 2011 1:46 am

Postby BraveRobot » Thu Jan 12, 2012 12:10 am

Ok, I put my custom class file (Example123.cls) into my personal texhome directory but texshop can't find it when I compile. Do I need to do something else?

User avatar
Stefan Kottwitz
Site Admin
Posts: 8736
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Thu Jan 12, 2012 12:18 am

Some TeX installations always look for file in the TeX home directory. Others may need to be refreshed using mktexlsr or texhash.

Try
  1. sudo mktexlsr

in the terminal.

Stefan
Site admin

BraveRobot
Posts: 6
Joined: Fri Dec 30, 2011 1:46 am

Postby BraveRobot » Thu Jan 12, 2012 1:08 am

I ran both of those and it still doesn't recognize my class. I just added it to the main distribution and it worked. Thanks for helping me with that. I never would have figured that out.

holene
Posts: 1
Joined: Wed Oct 17, 2012 7:48 pm

Postby holene » Wed Oct 17, 2012 7:55 pm

Hi!

So, I have the same problem, only my TeX-distribution doesn't find my .cls-files wherever I put them. I'm writing at some standardized document and are bound to use a custom cls. My document won't compile even if I put the .cls-file in the same folder as my tex-document. I've copied a folder with the .cls-files in to

  1. /users/username/Library/texmf/

  1. /usr/local/texlive/2012/texmf-dist/tex/latex/


and update both

  1. sudo -s texhash

  1. sudo -s mktexlsr


The
  1. kpsewhich -var-value=TEXMFHOME
command returned
  1. /Users/username/Library/texmf/


So now I'm about to turn completely mad here... Any help out there? =)


Return to “TeXShop”

Who is online

Users browsing this forum: No registered users and 1 guest