[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#93781: More Bug Cleanup



retitle 93781 texdoc prefers compressed over uncompressed documents
thanks

Still true in tetex-bin 1.0.7+20001218-3.

texdoc also prefers DVI over PDF or PS documentation.  Thus, on my
system, texdoc would open

diziet% texdoc -v -l usrguide
/usr/share/texmf/doc/latex/base/usrguide.dvi.gz
/usr/local/lib/texmf/doc/latex/base/usrguide.ps.gz

Another example: I have newer versions of the AMS packages
installed in my local texmf tree.  texdoc prefers the older docs
to the newer docs:

diziet% texdoc -l -v technote
/usr/share/texmf/doc/latex/amsmath/technote.dvi.gz
/usr/local/lib/texmf/doc/latex/amsmath/technote.dvi

If I compress the local tree doc (and run mktexlsr), texdoc
prefers the local doc:

diziet% texdoc -l -v technote
/usr/local/lib/texmf/doc/latex/amsmath/technote.dvi.gz


The problem appears to be down to the following chunk of code,
which hardcodes the order in which extensions should be preferred:

#listext=`kpsewhich --expand-brace='$TEXDOCEXT'`
#: ${listext=':.gz'}
listext='.dvi.gz:.pdf.gz:.ps.gz:.txt.gz:.dvi:.pdf:.ps:.txt:.html:""'

The script then calls kpsewhich on each extension, and stops at
the first match unless the ``-l'' (list) flag is used.

A workaround is to require that users compress docs in local texmf
trees.  A real fix would require adding code to the texdoc script
to prefer local docs over standard docs (or, better, to pay
attention to the order of directories in TEXMF).


[My initial stab at the last, by adding a list of suffixes to the
``TeX system documentation'' definition, doesn't appear to have
worked.  I'm not that surprised.

--- texk/kpathsea/tex-file.c.orig	Thu May  6 02:38:17 1999
+++ texk/kpathsea/tex-file.c	Thu May 24 17:15:22 2001
@@ -508,6 +508,8 @@
       break;
     case kpse_texdoc_format:
       INIT_FORMAT ("TeX system documentation", DEFAULT_TEXDOCS, TEXDOC_ENVS);
+#define TEXDOC_SUFFIXES ".dvi" ".dvi.gz" ".html" ".pdf" ".pdf.gz" ".ps" ".ps.gz" ".txt" ".txt.gz" "" 
+      SUFFIXES (TEXDOC_SUFFIXES);
       break;
     case kpse_texpool_format:
       INIT_FORMAT ("texpool", DEFAULT_TEXPOOL, TEXPOOL_ENVS);
]


   CMC

+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
 Behind the counter a boy with a shaven head stared vacantly into space, 
 a dozen spikes of microsoft protruding from the socket behind his ear.
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
   C.M. Connelly               c@eskimo.com                   SHC, DS
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 



Reply to: