I have some files such as IEEEtran.cls, IEEEtranS.bst in my working
directory (i.e., the directory where the .tex files are located), and
it is working well this way. But I want to put these files into a sub-
directory of the current working directory, is it possible? How can I
specify these files' paths in the preamble? The following example
illustrates what I am currently doing and what I want to do:
Currently, my working directory is WD which contains
WD\main.tex
WD\IEEETran.cls
WD\IEEETranS.bst
...
I want to put the .cls and .bst files into a sub-directory, say, MISC.
So my working directory looks like this
WD\main.tex
WD\MISC\IEEETran.cls
WD\MISC\IEEETranS.bst
...
The problem is that latex compiler cannot find the .cls and .bst
files. I understand that here is a latex command line to specify these
files' paths. But, can I specify these files' pahts in the preamble of
main.tex? (This way, if others want to compile my source files, they
don't need to know the specific command line.)
Thanks,
Dillon
Hi,
> The problem is that latex compiler cannot find the .cls and .bst files.
LaTeX can find the list of files available in the File name data base,
if you want to include your templates within the file name data base,
then work based on the TeX Directory Structure (TDS). Otherwise, you
should to specify the template path in your main file. You can find
the below method to do that.
In main.tex:
\def\templatepath{MISC}%Here you can specify your template path%
\documentclass{\templatepath/IEEETran}
&
\bibliographystyle{\templatepath/IEEETranS}
kumaresh has provided a good answer, but it's not the "official line".
it would be good to provide the "official line", but...
unfortunately, you don't say what tex system you're using on your
computer (could be miktex or tex live or something i've not thought
of). the systems all have slightly different slants on how the tex
file hierarchy is stored, so one would need to know what system is
involved.
--
Robin Fairbairns, Cambridge
It's possible, but the preferred way is to put them in your personal TeX
tree (or in a shared-local tree if you are working on a multi-user system).
You don't say what operating system and TeX distribution you are using,
so it's impossible to give a concrete example for you, but on a
Unix-based system running TeX Live, your default personal TeX tree would
be in ~/texmf and your shared-local tree would be in
/usr/local/share/texmf, so the files would be
/home/dillon/texmf/tex/latex/IEEEtrans/IEEEtrans.cls
/home/dillon/texmf/tex/bibtex/bst/IEEEtrans/IEEEtranS.bst
or
/usr/local/share/texmf/tex/latex/IEEEtrans/IEEEtrans.cls
/usr/local/share/texmf/tex/bibtex/bst/IEEEtrans/IEEEtranS.bst
You must then run your TeX system indexer to [re]build the ls-R
databases: under Unix-based systems this is the program texhash or mktexlsr.
///Peter
On 27 Nov 2009 10:54:22 GMT, rf...@cl.cam.ac.uk (Robin Fairbairns)
wrote:
why then don't you just ask package manager to install the package
ieeetran?
--
Robin Fairbairns, Cambridge