[tex-live] sharing packages between texlive and miktex?

George N. White III gnwiii at gmail.com
Sun Aug 19 15:08:48 CEST 2007

On 8/19/07, Thanh Han The <hanthethanh at gmail.com> wrote:

> since many of miktex and texlive packages are
> platform-independent (ie most of them contain only macros +
> fonts + doc), I wonder would it be useful to build a package
> repository that miktex and texlive can share?

There can also be platform neutral packages (oberdiek package
provides pdfatfi.pl) containing scripts.  Some may require a simple
platform dependent addition to the bin directory.   If you install
the oberdiek package with mpm on linux, any existing pdfatfi
(normally, a copy of pdfatfi.pl put in the bin directory) is not
updated.  It is possible to get around this on *X by using a
symbolic link to the following script:

#! /bin/sh
what=`echo $0 | sed 's at .*/@@'`
p=`kpsewhich -format=texmfscripts $what.pl`
{ test -n "$p" && test -f "$p"; } \
  || { echo "\`$what.pl' not found."; exit 1; }
exec perl "$p" ${1+"$@"}

This, however, may not be acceptable for security reasons.
I'm not near a WIn32 machine, so I'm not sure how MiKTeX handles
this, but it points to a key problem -- for a package manager to
be effective, the distribution needs to have some mechanism to
ensure that the "right" versions of scripts are being used.
Perhaps the best approach is to add some post-install message
reminding the user to install the scripts (e.g,, by updating a
wrapper or copying to a bin directory).

One of the major criticisms of TL has been the lack of package
manager support for updates.   Some people who use *X for
most of their work continue to use MiKTeX on Win32 because
they find it too difficult to (convince the sys admin) to install updates
on the *X machine.

I'm not sure that sharing needs to be a priority.  The first step
should be to add mpm to texlive as an experiment (or just
convince enough people to start using it with TL2007) and to
gain experience that will help going forward with package
management.  I'd suggest adding a texmf-mpm tree that is
managed by mpm.   This would provide a way for users to
install current versions of platform-neutral packages.

> First let me describe briefly the main components of miktex
> and their counterpart in texlive:
> [...]
> I have no intention to say that texlive should follow miktex
> or learn something from that. However, it seems a pity to me
> that the enormous effort to maintain those
> platform-indenpendent packages is duplicated.
> I did a small experiment on linux powerpc as follows:
> - build pdftex + kpsewhich + kpseaccess for linux powerpc
>   (using cross-compiler)
> - build miktex tools for unix (the relevant tool is mpm)
> - setup a proper texmf.cnf
> then I can use tex with the packages managed by mpm. And mpm
> can install packages from any CTAN site, since miktex package
> repository is part of CTAN. In short, mpm is something very
> much like an apt/jum (a linux package manager) for tex,
> which allows us to install a very small tex installation and
> add needed packages on-demand.

For those not familiar with miktex, it has the ability to install missing
packages while formatting a document.  I assume this means installing
a copy of some master file list that is consulted when a file can't be found
on the local system.   This is a bit problematic where texmf trees are
shared, as you may want some updated packages available to all users
and others only to a few.

> So, in summary, I think it would be a great improvement if:
> - the effort to maintain platform-indenpendent packages can
>   be put together to build a package repository that can be
>   used by both miktex and texlive. It would be something
>   like the miktex repository at the moment, but with more
>   packages (and more up-to-date) like in texlive.

There are two types of resources: human inputs needed to
put whatever an author decides to provided into a package,
and machine resources (disk space, processing to create
and serve out packages).

I think the human inputs are the limiting factor, and I worry that
they require experience and expertise that will be difficult to
maintain over the long run.

> - texlive can come up with something similar as mpm to have
>   finer control on package management. mpm can be used for
>   linux, but I assume it's not trivial to get it work for
>   all unix systems that texlive support.

I like to think in terms of "core" platforms where everything in
TL is expect to work: linux 2.6 kernels, WinXP, OS X (both
flavours), solaris (recent versions).   For non-core platforms
only tetex functionality (basic tex and pdftex) would be expected
to work, but some utilities and latex packages that rely on other
binaries may not be available simply because the 3rd party
tools (appropriate versions of perl, gs, libraries, etc. aren't readily

It doesn't make sense to insist that every TL tool work on every
platform.  In the case of package managers, most sites that rely
on some legacy platform can get a TL core machine to maintain
texmf trees, either shared via NFS or copied (rsync, etc.) to the
non-core machines.

George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia

More information about the tex-live mailing list