[tex-live] [texworks] Set path for libraries in linux

Zdenek Wagner zdenek.wagner at gmail.com
Fri Oct 21 20:31:37 CEST 2016


As Philip wrote, it is not a problem of TeXworks but ox *LaTeX binaries.
First you should preferably install LaTeX packages by your packaging
manager, i.e. apt-get if you have Debian TeX Live packages, or tlmgr if you
have TeX Live from TUG. These managers will automatically put the files to
the correct places and do all other important actions. It may occasionally
happen that you need a file which is not available from the packaging
system. In such a case you can:

1. If you intend to use the file with one document only, the best way is to
put it to the working directory of your document
2. If you plan to use it in several documents, put it to a directory under
$TEXMFLOCAL/tex/latex and then run mktexlsr. You will find the real
location of $TEXMFLOCAL by
kpsewhich --var-value TEXMFLOCAL

The most frequent problem of people having TeX Live from TUG is setting of
PATH. Linux usually installst its own TeX distribution based on
dependencies. Both distributions may then conflict. If you have TeX Live
from TUG and want to use it, you _must_ have its binary directory at the
_beginning_ of PATH. And this is not the only requirement, it must be set
properly. If you run tex from a terminal, the setting is read from
~/.bashrc but if rou invoke tex from a GUI such as TeXworks, the setings is
read from ~/.bash_profile (it is not a matter of TeX Live, it is defined
this way in UNIX systems). You can make a simple document hello.tex
containing:

\documentclass{article}
\begin{document}
Hello
\end{document}

Now run pdflatex hello from the terminal and save the log file. The compile
the same file from TeXworks. Compare the location of article.cls in these
two log files. If they are different, you have this very problemm, GUI does
not use the same PATH as the terminal. I solve the problem by setting
everything in ~/.bashrc only and my ~/.bash_profile contains:

if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

Remember, if you change ~/.bashrc, you must reopen the terminal window. If
you change ~/.bash_profile, you must logout and login.

Hope this helps.


Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz

2016-10-21 18:13 GMT+02:00 Philip Taylor <P.Taylor at rhul.ac.uk>:

>
>
> Simone Mosciatti wrote:
>
> Hi Everybody,
>
> I have this fresh installation of TeXworks, version 0.6.1 from the apt
> repos.
>
> When I try to compile a simple letter examples it complains that some .sty
> are not present, stuff like:
>
> "booktabs.sty" or "paralist.sty", fair enough.
>
>
> I then proceded installing TexLive that should include pretty much
> everything.
>
> Since TexLive is way too huge, I decide to install everything in a /media
> partition.
>
> (My HD is divide in two, one part for routine stuff that I use day by day
> -> "/" and another part for the movies, pictures or old backups -> "/media")
>
>
> How do I tell TeXworks to looks for eveything it is looking for also in
> the "/media" partition?
>
> TeXworks (/qua/ TeXworks) will not complain that files such as
> "booktabs.sty" or "paralist.sty" are not present, since TeXworks is
> concerned primarily with the location of executable images, not style
> files.  It will be LaTeX (or one of its successors -- PdfLaTeX, XeLaTeX,
> LuaLaTeX, ...) that complains about such things.  Therefore since you are
> using TeX Live, the question would be better put on the TeX Live list --
> tex-live at tug.org (cc'd).
>
> Philip Taylor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex-live/attachments/20161021/d1567697/attachment.html>


More information about the tex-live mailing list