# Gummi Not Using TexLive 2012

I use Gummi was LaTeX document editing.

I recently installed TeX Live 2012 as per instructions here. Also I previously had TeX Live installed from Ubuntu Software Center which I uninstalled.

Now, when I start Gummi and load some old LaTeX documents, it seems Gummi doesn't know anything about new TeX Live 2012 installation and uses old TeX program (I don't understand where it loads this old program from since I uninstalled TeX Live from Software Center).

This is the first line in Gummi's build log:

This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)

Does it come with its own TeX Live? How do I make it use TeX Live 2012?

In fact when I type in command pdflatex in the terminal, I get:

This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)

where as when I cd /usr/local/texlive/2012/bin/i386-linux and type in ./pdflatex, I get:

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
restricted \write18 enabled.

I had properly exported PATH variable after installing TeX Live 2012 by adding following entry in my ~/.pam_environment file:

PATH            DEFAULT=\${PATH}:/usr/local/texlive/2012/bin/i386-linux

When I echo \$PATH above directory can be seen added to PATH.

Looks like some old TeX Live program is taking preference over TeX Live 2012.

-
Did you add TeX Live 2012 to your path? – Joseph Wright Aug 4 '12 at 18:14
@JosephWright: I just edited my question. I have added details regarding exporting location of Tex Live 2012 in PATH variable. – abhinavkulkarni Aug 4 '12 at 18:15
You have added TeX Live to the end of your path, so the managed one will come first. What happens if you have DEFAULT=/usr/local/texlive/2012/bin/i386-linux:\${PATH}? – Joseph Wright Aug 4 '12 at 18:24
@JosephWright: I added the TeX Live 2012 directory in front to the PATH and now Gummi uses 2012 installation. However, where did it find TeX Live 2009 installation when I had it uninstalled from software center? – abhinavkulkarni Aug 4 '12 at 18:29

you must change the order in the PATH-variable: Instead of

PATH            DEFAULT=\${PATH}:/usr/local/texlive/2012/bin/i386-linux

It should be

PATH            DEFAULT=/usr/local/texlive/2012/bin/i386-linux:\${PATH}

Because the Operating system uses the first command it finds in the PATH, it will use the latex/pdflatex which are installed by Debian, and not of your installation.

Out of topic: You can use "which latex" to find which comand is used. (Type it in the shell.)

-
If I switch the paths, system uses TeX Live 2012. However using command which latex I found out that otherwise system uses latex in /usr/bin/latex. When I try to remove this using apt-get remove command I get Virtual packages like 'latex' can't be removed. What is the meaning of this message? And how can I remove latex? – abhinavkulkarni Aug 5 '12 at 4:41
Virtual package is a generic name that applies to any one of a group of packages, all of which provide similar basic functionality. ([link]debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html) You can remove the latex installation from debian by removing the package texlive-base, texlive-binaries, an so on. But you should'n because apt-get will remove other packages, which need tex. – lazyboy Aug 5 '12 at 5:25