TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a journal specific document style as two files svglov3.clo and svjour3.cls. I don't want to install them, so I keep them in the article's current directory. But I like to keep only the files that I can edit in the current directory. So I would prefer to put them in a sub-directory ./SVJour3 and use


This would actually work, but svjour3.cls has this command \input{svglov3.clo}. So I can put svjour3.cls in a separate dir, but I have to keep svglov3.clo in current dir. Is there a workaround for this? Some variable that I can set in a Makefile?

share|improve this question
Have you considered installing the sv*.* files in a directory that's searched automatically by your TeX distribution? That way, you wouldn't have to concern yourself with the precise locations of the files in question. Which TeX distribution do you use, incidentally? – Mico Jan 9 '14 at 9:27
I have TEXLive, the issue is that I don't want to be looking for these specific style files when I change the computer. They belong exactly with this single document. – user1350992 Jan 9 '14 at 9:31
You can set the environment variable TEXINPUTS to be .:./SVJour3/: – karlkoeller Jan 9 '14 at 9:40
@karlkoeller, Thanks a lot. Can you add the answer so that I accept? – user1350992 Jan 9 '14 at 9:46
\documentclass{SVJour3/svjour3} is always an error even though sometimes latex does not catch it. The argument to documentclass and usepackage are names not file paths. If the class has a \ProvidesClass line then you get an error warning you that the name is wrong, even though the file may load an otherwise appear to work. – David Carlisle Jan 9 '14 at 9:46
up vote 7 down vote accepted

You can set the environment variable TEXINPUTS to be


In this way the directory SVJour3 is searched after the current directory and before texmf.

share|improve this answer

create in the documents directory a new one called texmf. And then put the class file into texmf/tex/latex/. Before you run your document define

export TEXMFHOME=texmf

assuming that you are already in the documents directory. Then TeX searches for the files recursively in the texmf directory. Another possibility is to save the class file into the default users local one which is ~/texmf. Then you do not need the export command.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.