[tex-live] Kpathsea in TL2007

Reinhard Kotucha reinhard.kotucha at web.de
Mon Feb 19 23:15:25 CET 2007

>>>>> "George" == George N White <gnwiii at gmail.com> writes:

  > On some *x systems you can get a complete list using a process
  > trace tool -- is there a similar capability for Windows?

There is even a portable tool:  KPATHSEA_DEBUG=4

  > ---- but some don't make it easy for to capture the output without
  > using emacs (they seem to write to the raw tty so redirection
  > fails).

But if emacs can capture stderr it should be possible for other
programs too.  The question is how this can be achieved.  This is an
interesting question because "gs -sDEVICE=bbox" writes output to
stderr.  It's a well known bug and Ghostscript developers have this on
their TODO list for many years.  I suppose that we will have LaTeX3
and Omega2 before it will be fixed.  On the other hand it's annoying
that Microsoft steals concepts from other operating systems and does
not implement them properly. 

Emacs can also be run in batch-mode, so you can use Emacs-Lisp like
any other programming language to process files.  It's probably not
easy to read arbitrary stuff (like "pdftex myfile.tex") from the
command-line because the command line had been interpreted by emacs
before the elisp script is executed.  TeX has the same problem. 

In most cases the -recorder option is sufficient.  The first file
which appears in the output is the format file.  KPATHSEA_DEBUG starts
a bit earlier: it also displays ARGV[0], texmf.cnf, and ls-R files.

KPATHSEA_DEBUG is not a replacement for a tool like strace.  However,
I rarely used strace for anything else but tracing fopen() calls.  And
the big advantage of KPATHSEA_DEBUG is that it works with all programs
which are using kpathsea, also on Windows.

BTW, KPATHSEA_DEBUG is described in the kpathsea texinfo manual.

There _is_ something like strace for Windows.  Thomas Esser mentioned
it some time ago but unfortunately I forgot its name.


Reinhard Kotucha			              Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the tex-live mailing list