# [texworks] Message from TeXworks user

Vladimir Lomov lomov.vl at gmail.com
Sun Oct 16 16:34:57 CEST 2011

```Hello,
** John F. Hughes [2011-10-15 18:26:33 -0400]:

> Hi.

> I'm trying to use TeXworks with TeXLive on a windows box. I'm stuck trying
> to set the TEXINPUTS variable.

> I have a large project (a book), each chapter in its own directory, and all
> my latex stuff in a LATEX dir. Short picture:

> book/
>    Jmaster.tex

>    LATEX/
>      siunitx.tex
>      graphicsbook.cls
>      ...

>    chapter1/
>      chap1.tex
>    chapter2/
>      chap2.tex
>    ...

> I've got TeXworks installed, and the file "Jmaster.tex" loaded. I try to
> process it with pdfLaTeX, and I get the following:

> This is pdfTeX, Version 3.1415926-2.3-1.40.12 (Web2C 2011)
>  restricted \write18 enabled.
> entering extended mode
> (./Jmaster.tex
> LaTeX2e <2011/06/27>
> Babel <v3.8m> and hyphenation patterns for [...]

> ! LaTeX Error: File `graphicsbook.cls' not found.

> ==============
> On my Linux system, where I use this a lot, I have set TEXINPUTS=.:./LATEX:,
> and everything works fine.
> I'd like to do that under windows as well. I've tried putting a texmf.cnf
> file in the "book" directory, but it seems to be ignored. In it, I put

> TEXINPUTS                 = .;./LATEX;

> and

> TEXINPUTS                 = .;.\LATEX;

> but neither one seemed to have any effect -- I got the same error.

> I'd rather NOT set an environment variable if I can help it -- I'd rather
> that this particular path was a property of this particular project.

> Any suggestions? I have a feeling I need to set SOMETHING under
> Edit/preferences/Typesetting. A friend, who is using miktex, sent me his
> settings, which are

> Prog: miktex-pdftex.exe
> Args:
> -synctex=1
> -undump=pdflatex
> -include-directory=C:\Users\David\[...]\book\LATEX

> where I've elided about 4 levels of directories with long names. I tried
> just changing the miktex-pdftex to 'pdftex', but it appears that pdftex from
> texlive doesn't understand the -include-directory flag (I *did* reset it to
> point to ./LATEX !)

> Thanks in advance for any help you can provide.
> --John

Simply, don't use TEXINPUT! If you use TeX Live as your TeX distribution
it is very easy to set up personal (=private) styles, classes, etc.
So, instead putting all stuff under LATEX in "project" directory put all
LaTeX files in \$HOME/texmf/tex/latex/YOUR_NAME/YOU_PROJECT/.

Then in both Linux and Windows any latex engine can find all
relevant files.

P.S. In Windows \$HOME = %USERPROFILE%, just open command prompt
(cmd.exe) and run `echo %USERPROFILE%' to find out there is \$HOME in
Windows.

---