[texworks] Inclusion paths for TeXworks

Vladimir Lomov lomov.vl at gmail.com
Thu Jan 24 02:31:59 CET 2013


Hello,

** John F. Hughes [2013-01-22 12:41:48 -0500]:

>  Hi.

> I'm trying to set up a standard LaTeX environment for assignments in a
> class I'm teaching. The directory structure is roughly this:

> asgn:
>   LATEX
>        assignment.cls
>   asgn1:
>       hw1.tex
>   asgn2:
>       hw2.tex
>   ...

> I'd like the first line of each assignment.tex file to be

> \documentclass{assignment}

> and have TeXworks somehow find the class definition in
> ../LATEX/assignment.cls

First of all, the problem you try to solve doesn't related to TeXworks,
but how latex engine finds files.

> I suspect that I either have to do something with environment variables, or
> some TeXworks startup file that I don't know about, or SOMEthing, but
> frankly, after some digging around through the documentation, I'm at a
> loss.

> Any suggestions?

Yes, if you don't like to set up personal TEXMF tree then you have to
set up environment variable TEXINPUTS. How to set up env. variable on
Windows depends on version Windows.

> I'd rather NOT put the class file into some miktex-specific location, which
> seems like the obvious solution: I think of it as associated to the
> assignments rather than to "doing LaTeX stuff", so it should be in a
> directory near the assignments.

Why not? It is associated with you, your work not with MiKTeX. There is
such thing as 'personal' TEXMF tree. You can put your files there and
any latex engine (latex, pdflatex, xelatex, lualatex) can find them.
See
http://docs.miktex.org/2.9/manual/localadditions.html

For example, create directory (tree)
%USERPROFILE%/texmf/tex/latex/jhughes
and add it as "User-Managed TEXMF Directory" (MiKTeX term). Put there
your LaTeX files, e.g. 'assignment.cls'.

%USERPROFILE% on Windows plays the same role as $HOME on Linux. Run it
terminal (Command Prompt)
echo %USERPROFILE%
to find out that is your '%USERPROFILE%'.

> On Linux, I'd do something with TEXINPUTS, as I recall, but on windows...I
> have no idea.

> Thanks in advance,

> John

---
WBR, Vladimir Lomov

-- 
I already have too much problem with people thinking the efficiency of
a perl construct is related to its length.  On the other hand, I'm
perfectly capable of changing my mind next week...  :-) --lwall


More information about the texworks mailing list