[texworks] Set path for libraries in linux

Reinhard Kotucha reinhard.kotucha at web.de
Sat Oct 22 01:33:44 CEST 2016


On 2016-10-21 at 14:39:04 +0200, 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?

The TeX Live installer tells you how to set paths properly after a
successful installation.  You probably overlooked it.

You don't have to specify where the libraries are but you have to add
the bin directory to PATH.  Since you obviously can run *tex programs
I suppose that you already have a minimal TeX system installed on your
system, a good opportunity to try

  texdoc texlive

In order to activate the installation on your /media partition, add
the lines [please verify the location of the texlive directory]

  export PATH=/media/texlive/2016/bin/x86_64-linux:$PATH
  export MANPATH=/media/texlive/2016/texmf-dist/doc/man:$MANPATH
  export INFOPATH=/media/texlive/2016/texmf-dist/doc/info:$INFOPATH

to

  ~/.bashrc

and then execute (ignore the comments)

  source ~/.bashrc   # execute ~/.bashrc in the current shell
  hash -r            # clear the cache, Bash remembers paths to programs
  which tex          # tell the path to a particular program

The last command hopefully shows you the path to the tex program on
the /media partition.

If you omit "$PATH" after the colon, you are lost.  Be careful.

BTW, unlike Debian, Ubuntu provides a ~/.bashrc file which is a copy
of /etc/bashrc for no apparent reason.  It's clearly a stupid bug.
Whenever you start a new shell, the same code is executed twice.
Thus, before adding anything to ~/.bashrc you can remove everything
from this file you didn't add yourself.

Let me summarize:

The programs provided by TeX Live have to be in PATH as any other
programs too, of course.

The files in the TEXMF tree (you called them libraries) are found in a
directory structure relative to the location of a particular program
(pdftex in your case).  Hence it's not necessary to specify the
location of these files at all.

You have two TeX Live distributions installed, one in /usr and one in
/media.  The former is incomplete.  Currently the one in /usr is found
because it's the only one in PATH.  In order to use the one in /media
it's necessary to _prepend_ its bin directory to PATH as described
above.

See also (if "texdoc texlive" doesn't work):

  https://www.tug.org/texlive/doc/texlive-en/texlive-en.pdf

If you have further questions, don't hesitate to ask.

Regards,
  Reinhard

-- 
------------------------------------------------------------------
Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de
------------------------------------------------------------------


More information about the texworks mailing list