Skip to main content

TeX

Table of Contents

How can I insert LaTeX formula in inkscape?

How can I install and uninstall TeXLive in Ubuntu?

How can I update my TeXLive installation?

How can I install vanilla TeXLive to satisfy APT dependencies?

How can I install hevea on top of vanilla TeXLive?

How can I generate a LaTeX diff of two LaTeX files?

How can I insert LaTeX formula in inkscape?

09 Feb 2014 - tex

Install ps2edit.

Relaunch inkscape and go to “Extensions > Render > LaTeX formula…”

References

How can I install and uninstall TeXLive in Ubuntu?

06 Mar 2013 - linux, tex

Installation

sudo apt-get install perl-tk
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar xvfz install-tl-unx.tar.gz
sudo ./install-tl<tab>/install-tl -gui

Select the following two options:

The installer asks about the following directories. Leave the default settings.

TEXDIR=/usr/local/texlive/<year>
TEXMFLOCAL=/usr/local/texlive/texmf-local
TEXMFSYSVAR=/usr/local/texlive/<year>/texmf-var
TEXMFSYSCONFIG=/usr/local/texlive/<year>/texmf-config
TEXMFHOME=~/texmf

The installer says the following, but the symlinks are enough.

Add /usr/local/texlive/20xy/texmf/doc/man to MANPATH.

Add /usr/local/texlive/20xy/texmf/doc/info to INFOPATH.

Most importantly, add /usr/local/texlive/20xy/bin/x86_64-linux.

Uninstallation

sudo tlmgr uninstall
rm -rf /usr/local/texlive

References

How can I update my TeXLive installation?

05 Mar 2013 - linux, tex

Updating the updater itself

sudo tlmgr update --self

Updating the updater itself and all the packages

sudo tlmgr update --self --all

Updating the TeXLive distribution

sudo tlmgr -gui

You can check if a package is installed by using the locate command. Sometimes, a package is installed but the symlink to it in system directories is missing. You can update the symlinks through the tlmgr program.

How can I install vanilla TeXLive to satisfy APT dependencies?

04 Mar 2013 - linux, tex

I used texlive.ctl to create a vanilla TexLive package. I removed tex-common from texlive.ctl because the original texlive.ctl file didn’t have it and I had to remove it to install hevea. The hevea package is not included in TeXLive. And, I had to install tex-common in order to install hevea. Also, to let my own installation of TeXLive locate the style files of the hevea package installed through Ubuntu, I had to set the following environment variable.

export TEXMFHOME=/usr/share/texmf/

I used the following command to set the “Standards-Version” field in texlive.ctl.

apt-cache show debian-policy | grep Version

Then, I executed the following commands to create and install my vanilla package.

equivs-build texlive.ctl sudo dpkg -i texlive-vanilla_2010-1~1_all.deb

Finally, I used the following command to install kile.

sudo apt-get --no-install-recommends install kile

See http://manpages.ubuntu.com/manpages/maverick/man5/deb-control.5.html to learn more about the format of Ubuntu package control files. Specifically, the “Provides” section lists virtual packages that could be provided by the normal package.

References

How can I install hevea on top of vanilla TeXLive?

03 Mar 2013 - linux, tex

I installed texlive-vanilla (2010-1~1). And, tried to install hevea with the following command.

sudo apt-get --no-install-recommends install hevea

But, I got the following message.

The following NEW packages will be installed:

  hevea ocaml-base-nox tex-common

So, I checked the dependencies of the hevea in Ubuntu. The hevea package requires “tex-common (>=2.00)”. The “provides” section of the control file of vanilla-texlive doesn’t specify the versions of the virtual packages. So, I thought all of the virtual packages get the version number 2010-1~1 automatically. Then, I used the following command to verify that “2010-1~1” is indeed greater than “2.00” according to Ubuntu package formate rules.

dpkg --compare-versions 2010-1~1 gt 2.00 ; echo $?

And, I got the value “0” on the console, which confirms that 2010-1~1 is greater than 2.00. At this point, I concluded that the version number of the virtual packages is unspecified. So, I decided to create my own version of tex-common. I created a control file for my tex-common package called tex-common.ctl and executed the following commands.

equivs-build tex-common.ctl sudo dpkg -i tex-common_2010-1~1_all.deb

Having installed my own tex-common package, I was able to successfully install hevea using the following command.

sudo apt-get --no-install-recommends install hevea

How can I generate a LaTeX diff of two LaTeX files?

27 Feb 2013 - linux, tex

Make sure old.tex and new.tex have a place to insert the preamble.

latexdiff --type=UNDERLINE --subtype=SAFE --floattype=FLOATSAFE old.tex new.tex > difference.tex