[texworks] Message from TeXworks user
John Hughes
jfhext at gmail.com
Fri Sep 28 18:47:38 CEST 2012
Vladimir Lomov <lomov.vl at ...> writes:
>
> 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/.
I'm sure that this is a fine solution for some folks, and I'm glad you suggested
it and appreciate your time/effort.
In this case (multiple co-authors, many different machines, etc.,) it makes
sense to keep all the materials associated with the book under a single
hierarchy. In short: in my world, the "book" hierarchy matters more than the
"LaTeX" one. Perhaps that's the wrong attitude for a Tex user, but it's a fact.
I'm following up, at this late date, in hopes that someone else who really DOES
want to use something like TEXINPUTS, can do so. Here's the secret that worked
for me:
In my TeXworks preferences, in the typesetting tab, my default
processing tool is: pdfLaTeX+MakeIndex+BibTeX
Associated with that particular tool is this configuration:
--pdf
--tex-option=-synctex=1
--tex-option=-include-directory={PATHBLAHBLAHBLAH}\book\LATEX
$fullname
In fact, it's more like
--pdf
--tex-option=-synctex=1
--tex-option=-include-directory="C:\BOOK FILES\book\LATEX"
$fullname
where you should note the double-quotes around the filename, because it happens
to have a "space" in it.
I do WISH that I could have this aspect of the configuration be stored in the
book's directory as well, so that for each windows machine on which I do the
"build," I'd not have to include this tex-option, but that's for another life.
(In Linux, it's part of my big auto-generated makefile!) Anyhow, for now, this
works, and I hope it benefits someone else as well.
--John
> 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.
>
> ---
> WBR, Vladimir Lomov.
>
More information about the texworks
mailing list