# How to store the document's style file in a subdirectory?

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

\documentclass{SVJour3/svjour3}

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?

-
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 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 at 9:31
You can set the environment variable TEXINPUTS to be .:./SVJour3/: –  karlkoeller Jan 9 at 9:40
@karlkoeller, Thanks a lot. Can you add the answer so that I accept? –  user1350992 Jan 9 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 at 9:46

You can set the environment variable TEXINPUTS to be

.:./SVJour3/:

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

-

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.

-