[NTG-context] updating context on Ubuntu 6.06

Sanjoy Mahajan sanjoy at mrao.cam.ac.uk
Mon Jul 24 22:24:21 CEST 2006

Here's what I had to do to update to the latest Context (2006.07.14) on
Ubuntu 6.06 (i.e. 2006.06) distribution of Linux.  It comes with tetex
3.0.  The commands below assume a working Context already installed in
your ~/texmf, and the commands use bash syntax, which is almost like
'sh' but has the ~ idiom for $HOME.  

Beforehand I had been using the 2006.04.17 beta and had put off
upgrading because I was scared of the change from perl texexec to ruby

1. (optional cleanup) Delete the old Context-installed files in
   ~/texmf/.  This step is optional, but I do it so that I can track the
   versions using an SCM.  I use mercurial (hg is the program name), but
   it could have been svn, cvs, etc.  The command (done in ~/texmf):

      hg locate -0 | xargs rm -0

2. (download, unpack) Download cont-tmf.zip, cont-fnt.zip, and
   cont-img.zip.  Probably you need only the first zip file, but I'm
   reporting exactly what I did just in case any substep is the crucial
   one.  The command:

      cd /tmp/  # no need to save them long-term
      wget http://www.pragma-ade.nl/context/current/cont-{tmf,fnt,img}.zip

   Unzip the zip archives into ~/texmf, appending the giant
   list of files to /tmp/a.log:

      cd ~/texmf
      for f in /tmp/cont-{tmf,fnt,img}.zip ; do unzip $f >> /tmp/a.log ;done

3. (stubs, part 1) Create ~/bin/texmfstart containing two lines:

~/texmf/scripts/context/ruby/texmfstart.rb "$@"

   Then make it executable with 

      chmod +x ~/bin/texmfstart

   From what I can tell from reading the ruby code, using the full path
   to texmfstart.rb helps texmfstart.rb find the other .rb programs,
   like texexec.rb.  (texmfstart.rb uses the path it was called with and
   looks in that directory, but Hans can correct me if I'm wrong here.)

4. (stubs, part 2) texmfstart will run texexec, so create texexec as a
   symlink to ~/texmf/scripts/context/stubs/unix/texexec:

      cd ~/bin
      ln -s ~/texmf/scripts/context/stubs/unix/texexec
      chmod +x texexec

   Hans: Could texexec be made executable in the distribution's zip
   file, to avoid the chmod?

5. (test 1) A first check is that texexec works.  So change to a random
   directory, e.g. where you keep some Context files:
       cd ~/tmp/xy  ; texexec --version

   That produces:

TeXExec | version 6.2.0 - 1997-2006 - PRAGMA ADE/POD      

   which looks good

6. (formats) Remake the formats with

      texexec --make --all

7. (test 2) Try a simple file.  I use ~/tmp/xy/t.tex containing one
   line, "\starttext abc \stoptext".  Here goes:

      texexec t

   fails with

! Font \*12ptrmtf*=ec-lmr12 not loadable: Metric (TFM) file not found.

8. (dreaded lmodern) Ack, it's the dreaded lmodern problem.  I thought I
   had avoided this issue on my previous laptop, which ran Debian
   testing/unstable and got reincarnated as an Ubuntu laptop.  And I had
   fixed it, by installing the 'lmodern' package.  But Ubuntu lmodern is
   v0.92, at least as of Ubuntu 6.06, and Debian unstable uses v1.00,
   which includes the necessary .tfm files for ec-lmr*.  The beta Ubuntu
   ('edgy eft') uses the new version, so I downloaded its .deb via
   http://packages.ubuntu.com, which eventually pointed me to a monster
   url and I did:

     cd /tmp
     wget http://ubuntu.mirrors.tds.net/ubuntu/pool/universe/l/lmodern/lmodern_1.00-2_all.deb

   Note that the package version may change, so the easiest way is to
   download the latest .deb from

   Installing it is a bit painful.  The first try (done as root) of

      dpkg -i /tmp/lmodern_1.00-2_all.deb

   complains with

Usage error: unrecognized option
Usage: update-fonts-dir DIRECTORY ...

   'update-fonts-dir' is some X program that updates X's ideas of where
   its fonts are, and the package isn't calling it correctly.  But I
   don't care whether X knows about the lmodern fonts, since I'm using
   them for documents viewed with gv or xpdf, not directly as an X font.
   So I shut up update-fonts-dir for the moment, installed, and undid
   the shutting up (all as root):

      chmod -x /usr/bin/update-fonts-dir
      dpkg -i /tmp/lmodern_1.00-2_all.deb
      chmod +x /usr/bin/update-fonts-dir      

9. (test 2 again, not as root) Now 'texexec t' works fine, as does
   'texexec --check'

So I think all is well, and I didn't need to set RUBYLIB.  Let me know
of any corrections or improvements; if there's interest I'll wikifi.

>From now on, I hope I can update using

  texmfstart ctxtools --updatecontext 


`A society of sheep must in time beget a government of wolves.'
   - Bertrand de Jouvenal

More information about the ntg-context mailing list