LaTeX hack: Adding a custom .cls to your search path

comprar viagra na net 86080 viagra erectile function drugs for sale enter site go site essay heroic deed taking clomid when fertile twins abolish penny essay source gaviscon generico do viagra https://www.arvadachamber.org/verified/essay-of-man-by-alexander-pope/49/ phd advisor favoritism http://windmillharbourmarina.org/viagra-etimologa/ https://thejeffreyfoundation.org/newsletter/tell-tale-heart-essay/17/ follow url levitra asthma https://lawdegree.com/questions/college-thesis-cover-page/46/ https://www.psm.edu/package/flu-valtrex/89/ https://hhkidsdentist.com/advising/cialis-bph-efficacy/81/ go here essays on the right stuff by tom wolfe american history x essay questions marine corps plc essay cheap reflective essay editing services usa https://moorelifeurgentcare.com/edtreatment/como-consigo-cialis/84/ http://archive.ceu.edu/store.php?treat=mafiosa-saison-5-generique-viagra https://dnaconnexions.com/last/paxil-theraputic-dose/25/ follow site what is viagra st argumentative essay evaluating the application of film in history canadian clinic and After a few hours of frustrated head bashing against my desk, I’ve finally figured out a way to add a directory containing a custom class file to my TeX search path. So before I forget the vital — yet simple — two steps, I will record them here. (Yep, that’s 4 whole hours for 2 lines of code.)

First let me give credit where credit is due. This page helped me immensely. Thank you, you wonderful LaTeX hackers.

Let’s assume you’ve created an amazingly useful class file that is useful to no one else but you. (This would also apply for a custom style file (.sty) as well.) And say you want to use that class for more than one LaTeX project. It would be easy to just have the .cls file in the same folder as your LaTeX project. But you want to have just the one .cls for multiple LaTeX projects.

For this example, I’m going to call that file syllabus.cls. Let’s put that into its own unusually named folder
~/some/path/syllabus/syllabus.cls

Before we move ahead to the two lines of code, you’ll need to learn a bit about your LaTeX installation. This is the head-bashing part.

(In case you’re curious: I’m on a Mac OSX (Yosemite) with TeX-Live 2015. Also, I use TeX-lipse (with Skim) for my editor.)

Open your Terminal and type

kpsewhich --var-value TEXMFLOCAL

For me, this returns
/usr/local/texlive/texmf-local

From the many posts I read on tex.stackexchange, I expected that it would be enough to place my syllabus folder right here. But it turns out life is not so kind.

One needs to dig a bit deeper to:
/usr/local/texlive/texmf-local/tex/latex/local

I don’t know if this is true for everybody, but that was the case for me.

And now, the moment you’ve all been waiting for:


sudo mv ~/some/path/syllabus/ /usr/local/texlive/texmf-local/tex/latex/local
sudo texhash

And that’s all. Now back to writing up some syllabi.