LaTeX Help

Christina Thiele cthiele at ccs.carleton.ca
Tue Jan 6 13:32:41 CET 2004


Mimi Burbank writes:
>
> On Jan06 10:04AM, Frank Ganz wrote:
> > Dear Saravanan,
> >
> > This works but is not necessary. When you run your book from your
> > working directory c:\mydir\book, LaTeX will use the .cls file stored
> > in that directory even when you just type \documentclass{book}. In
> > other words, book.cls that you have stored in any other path, such as
> > c:\yandy\... won't be used but the one in c:\mydir\book. Check your
> > .log file to confirm my statement.
>
>
> there is also one other thing you can do - which is what is done
> on large mainframe systems.    in the   yandy\tex\latex  folder
> you can always put a folder called  "MyStuff"  or something similar ;-)
> and put things that you develop yourself in there...
>
> If you create a path elsewhere on your system, you'd need to add
> that folder to the path that   Winedt or DVIWINDO searches...
> by actually editing the .ini files ....
>
> one thing you should remember though is the first instance of
> a file called xyz.tex (or .sty or .cls)  is what will be loaded,
> so if you have two files of the same name, with different contents,
> then the first file found is the one that will be used.   I've
> had this happen a couple of times - some obsolete files were used
> instead of the most recent ones   ;-)
>
> hope this helps...
>
>
> mimi
>


Frank's suggestion -- that you keep ALL your customised versions in
the same folder as your .tex source files -- is a pretty standard way
of doing things. But it become very unwieldy  -- what if you have a
new project that also needs a version of the same book.cls file? You'd
have to copy it into that new project's folder ... same file, stored
twice. This starts to take up space, if you keep on doing this.

Mimi's is a more economic method -- store the customised stuff in a
separate folder for all your customised (but not renamed) class/style
files.

I'm just adding the full-blown details to her suggestion ;-)

First, all the controlling of where TeX and related programs look for
their class/style files is detailed in the dviwindo.ini file, which is
NOT in the c:\yandy tree but outside it, in either c:\winnt or
c:\windows.

Using use any ASCII_based editor -- even Notepad will do -- go down a
few screen-fulls and find these lines, which direct the various TeX
programs to where they'll find their necessary files:

     TEXINPUTS=
     PLAIN=
     AMSTEX=
     ...
     LPLAIN=
     LATEX=
     BIBINPUT=
     BSTINPUT=
     CSFINPUT=

The last 3 lines, for BibTeX stuff, don't have to have `MyStuff' (your
custom folder of stuff) specified, but you may want to do it, while
you're editing the file. You never know when you want to customise a
bibliography style file or whatever. [However, I must way that
_normally_, one doesn't customise a standard file without then
renaming it. You can cause massive headaches if you call your variant
book class `book.cls' -- hence the oft-seen naming trick `mybook.cls'
or `sarav-book.cls' or some such. But, there may be reasons one wants
to keep standard names ... ]

Anyways, back to the paths in the dviwindo.ini file. Here's what my
lines look like: I want TeX and Co. to first look in c:\thiele before
they go to the c:\yandy tree, and then, failing that, I want them to
look in e:\work. Which means, roughly, that c:\thiele holds variants
-- or even upgrades -- of stuff in the main c:\yandy tree, while
e:\work is where project-specific class files for project files also
on the e-drive reside.

It ends up looking like this (forgive the upper/lowercase mish-mash):

TEXINPUTS=C:\CTHIELE\\;C:\YANDY\TEXINPUT;C:\YANDY\TEX\BASE\\;e:\work\\
PLAIN=C:\CTHIELE\\;C:\YANDY\TEXINPUT;C:\YANDY\TEX\BASE\\;e:\work\\
AMSTEX=C:\CTHIELE\\;C:\YANDY\TEXINPUT;C:\YANDY\TEX\BASE\\;e:\work\\
...
LPLAIN=C:\CTHIELE\\;C:\YANDY\TEXINPUT;C:\YANDY\TEX\BASE\\;C:\YANDY\TEX\LATEX209\\;e:\work\\
LATEX=C:\CTHIELE\\;C:\YANDY\TEXINPUT;C:\YANDY\TEX\BASE\\;C:\YANDY\TEX\LATEX\\;e:\work\\
...

So, in summary, it's a `cleaner approach' to keep path-specific
references out of the .tex source file and instead, spell them out in
the .ini file, which directs TeX traffic to the necessary folders (via
explicit pathnames), which in turn are listed in the search order you
want/need.

Just keep in mind that should you ever ship your files out to someone
else, you need to do two things:

   a. remember to send them YOUR version of book.cls
   b. point out that your `book.cls' is NOT the standard
      version ... which again kind of argues for giving
      your version its own unique name, to avoid confusion.

Let us know how you end up resolving your path issues -- the above is
the theory and _one_ version of its being applied to a real machine
;-) But you know how these things are -- so user-specific sometimes
you wonder if it'll work for you ;-)

Ch.





More information about the yandytex mailing list