Saturday, July 23, 2016

LaTeX -- updating the 2015 installation (TexLive)

TexLive is a large install, typically 4 GB. I keep mine in a home directory folder (easier to update and back up - no root privileges necessary). Between 2015 and 2016 however, the internal structure of the update database apparently changed.

So, in 2016, sometimes tlmgr update is finnicky. A common fail is to see:
Unknown directive ...containerchecksum [etc]
This is a slight pain, so I've written the steps (for future reference). There are five:

1) DO
2) A
3) CLEAN
4) 2016
5) INSTALL

Then update one's path statement in ~/.bashrc

Steps (1 hr, excluding download and burn)

  • Create some home directory, eg, ~/latex and delete the one with the last install. Frees about 4 GB.
  • Delete old ~/texmf and any ~/.tex* files
  • Download the latest torrent from TexLive, about 3.5GB
  • $ md5sum [nameofiso].iso
  • $ growisofs -speed=2 -dvd-compat -Z /dev/sr0=nameofiso.iso
  • Put DVD in, install
    $ cat /etc/mtab |grep "TexLive"
    /dev/sr0 /run/media/foo/TeXLive2016 iso9660...
    $ cd /run/media/foo/TeXLive2016
    $ ./install-tl -no-verify-downloads



  • select item "D" and give the home directory folder to all variables: eg ~/foo/latex
  • select item "O" and give letter paper size, as opposed to A4, if desired
  • Wait an hour or two while all 3500 files are installed.
Below, some features of these two methods of install, DVD and Internet...

DVD (1 hr)

Not verifying the downloads ("no-verify-downloads") is important even when installing offline with a DVD. Otherwise random checksum failures will likely occur installing one of the ~3500 packages, at which time the entire installation will dump without recovery options. There is nothing in the crude installer to, say, skip one or another package(s) and try it later. After install, the tlmgr can of course ignore specified packages but... that's after the installation is complete.

A second potential problem is heat from high CPU usage. For example, my 2008 Toshiba laptop would fail around 2000/3500 packages with an overheat lock-up. I tried it also on a 3.4 GHz i7, and it maxed that processor throughout the install as well, although it could remain cool since it was a desktop with fans. Why the maxing of CPU in a simple install? LaTeX is great but it's a coding kludge. My guess is the TexLive installer is probably c. 1995 coding, with a lot of subsequent bolt-ons, in such a way that the kernel can't smoothly allocate resources. Just a guess.

Internet (2 hrs)

An Internet install runs cooler because it has installation pauses between each package -- each package takes a few moments to download, as opposed to the near-instant draw from a DVD. The Internet install is launched from a small "tl-install" file. The file initiates a download (TUG site) and installs the packages in sequence.

Post install

  • update PATHs in /etc/profile or, as I prefer, in~/.bashrc (user permissions), eg.
    $ nano .bashrc
    export PATH=/home/foo/latex/bin/x86_64-linux/:$PATH
    export INFOPATH=/home/foo/latex/texmf-dist/doc/info:INFOPATH
    export MANPATH=/home/foo/latex/texmf-dist/doc/man:MANPATH
  • Logout, and log back in
  • $ tlmgr update --self
  • $ tlmgr update --all
  • $ texhash # typically only necessary following an installation of a non-repo package, etc, but I prefer to be certain
  • Verify with a complex .tex file compile, eg the .tex for a book.
  • Smile. Go outside in the sun. Arguably, read the New Yorker.
If one has the time, one can also keep tabs on various fonts (scroll down to "updmap"), or install non-repo packages.

1 comment:

Cecille Boman said...

I think I'm gonna take the plunge and write math solutions and technical papers and all in.. MS-Word. It's finally there. Well, it was three years ago but I've been skeptical and maybe even a bit nostalgic. And I hate MS and loved Latex. But the pro con is too compelling now for me. You probably have different preferences for each pro/con on the list and I would guess still prefer Latex, but I don't know? Art