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

buy book report go site source url creative writing letters click cialis 5mg and viagra is viagra safe for people without ed danksagung dissertation vorlage how to write essays for secondary school english students sample expository essay for state of georgia click here essay in sanskrit on my garden free abilify trial joke generic name for viagra https://www.arvadachamber.org/verified/example-of-research-papers/49/ citalopram 20 mg viagra para 30 a os https://carlgans.org/report/project-research-paper/7/ click https://awakenedhospitality.com/buy/age-viagra-prescribed/30/ enter site scientific research on lipitor essay topics on paradise lost phd thesis in history get link https://ramapoforchildren.org/youth/admission-essay-proofreading-site-online/47/ source site no ovulation clomid https://iat.iupui.edu/advisor/how-to-write-an-essay-about-my-work-experience/43/ the essential reinhold niebuhr selected essays and addresses https://aaan.org/indications/lipitor-case/27/ 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.