1 diff -up texlive-2007/texk/tetex/texdoc.man.texdoc texlive-2007/texk/tetex/texdoc.man
2 --- texlive-2007/texk/tetex/texdoc.man.texdoc 2008-01-22 09:34:54.000000000 +0100
3 +++ texlive-2007/texk/tetex/texdoc.man 2008-01-22 09:37:03.000000000 +0100
4 @@ -28,28 +28,37 @@ distribution\&.
10 Display a brief summary of options\&.
14 List matching files\&. Does not start a viewer\&.
18 +Search the disk. From all documentation files found by texdoc, the
19 +ones whose names match the remaining arguments (as egrep pattern) will
22 Sets verbose mode\&. Shows the command being used to
23 display the documentation\&.
27 .IP "\fB$TEXDOCVIEW_dvi\fP"
28 -DVI viewer\&. Defaults to \fBxdvi\fP(1)\&.
29 +DVI viewer\&. The default is to use the program specified
30 +by the freedesktop standard\&.
31 .IP "\fB$TEXDOCVIEW_pdf\fP"
32 -PDF viewer\&. Defaults to \fBacroread\fP(1)\&.
33 +PDF viewer\&. The default is to use the program specified
34 +by the freedesktop standard\&.
35 .IP "\fB$TEXDOCVIEW_ps\fP"
36 -PostScript viewer\&. Defaults to
37 -\fBghostview\fP(1)\&.
38 +PostScript viewer\&. The default is to use the program specified
39 +by the freedesktop standard\&.
40 .IP "\fB$TEXDOCVIEW_html\fP"
41 -HTML viewer\&. Defaults to \fBnetscape\fP(1)\&.
42 +HTML viewer\&. The default is to use a program through
44 .IP "\fB$TEXDOCVIEW_txt\fP"
45 -Text viewer\&. Defaults to \fB$PAGER-more\fP\&.
46 +Text viewer\&. Defaults is to use the program specified
47 +by the freedesktop standard\&.
49 The environment variables should be set with a ``%s\&'\&' as a placeholder
50 for the name of the file\&. For example,
51 @@ -66,10 +75,18 @@ hostname$ TEXDOCVIEW_html="mozilla %s"
52 hostname$ export TEXDOCVIEW_html
55 +.SH "SPECIFIC TO DEBIAN AND FEDORA"
57 +The Debian and Fedora TeX Live packages texdoc use the mime-support package to determine
58 +the appropriate viewer for the respective file type except for
59 +\fIdvi\fP. texdoc of Debian and Fedora is able to handle gzip- and
60 +bzip2-compressed files. If texdoc finds more than on file for a string
61 +the first hit is displayed. The file extensions are regarded and the
62 +search order can be configured in \fItexmf.cnf\fP (\fI90TeXDoc.cnf\fP).
66 -\fBacroread\fP(1), \fBgv\fP(1), \fBkpsewhich\fP(1),
67 -\fBless\fP(1), \fBmore\fP(1), \fBxdvi\fP(1)
70 Web page: <http://tug\&.org/teTeX/>
72 diff -up texlive-2007/texk/tetex/texdoc.texdoc texlive-2007/texk/tetex/texdoc
73 --- texlive-2007/texk/tetex/texdoc.texdoc 2006-01-17 22:41:51.000000000 +0100
74 +++ texlive-2007/texk/tetex/texdoc 2008-01-22 09:39:17.000000000 +0100
77 # Support for compressed documentation implemented by adopting changes
78 # made by debian. Thomas Esser, Dec. 2004.
80 +# Debian specific changes:
81 +# Denis Barbier <barbier@imacs.polytechnique.fr>, Feb 15 2000
82 +# * accept gzipped files on input
83 +# * temporary directory set according to TMPDIR
85 +# Frank Küster <frank@debian.org>, 2004-11-23
86 +# * do not uncompress dvi.gz, xdvi can handle this
87 +# * go to background with uncompressed files
89 test -f /bin/sh5 && test -z "$RUNNING_SH5" \
90 && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \
91 @@ -30,22 +39,22 @@ unset RUNNING_BSH
98 -tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$
99 +# tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$
101 ###############################################################################
103 # set up a temp directory and a trap to remove it
104 ###############################################################################
107 - $needsCleanup && return
110 +# $needsCleanup && return
112 - trap 'cleanup --force' 1 2 3 7 13 15
114 - mkdir "$tmpdir" || abort "could not create directory \`$tmpdir'"
116 +# trap 'cleanup --force' 1 2 3 7 13 15
118 +# mkdir "$tmpdir" || abort "could not create directory \`$tmpdir'"
121 ###############################################################################
123 @@ -65,15 +74,21 @@ abort()
124 ###############################################################################
129 - $needsCleanup && test -n "$tmpdir" && test -d "$tmpdir" \
130 - && { rm -f "$tmpdir"/*; cd /; rmdir "$tmpdir"; }
132 - *) # directory might not be empty if some other viewer is still
133 - # running, so be quiet about it
134 - rmdir $tmpdir >/dev/null 2>&1;;
138 +# $needsCleanup && test -n "$tmpdir" && test -d "$tmpdir" \
139 +# && { rm -f "$tmpdir"/*; cd /; rmdir "$tmpdir"; }
141 +# *) # directory might not be empty if some other viewer is still
142 +# # running, so be quiet about it
143 +# rmdir $tmpdir >/dev/null 2>&1;;
145 + # is the temporary directory empty? If not, texdoc was called with
146 + # two or more arguments, and one viewer is still running
147 + if test "`echo $tmpdir/*`" = $tmpdir/'*'
154 @@ -91,13 +106,12 @@ case `(uname -s) 2>/dev/null` in
155 extlist='.pdf .ps .txt .dvi .html'
158 - : ${TEXDOCVIEW_dvi='(xdvi %s) &'}
159 - : ${TEXDOCVIEW_pdf='(acroread %s) &'}
160 - : ${TEXDOCVIEW_ps='(gv %s) &'}
161 - : ${TEXDOCVIEW_html='mozilla -remote openURL'"'(%s)'"' 2>/dev/null || mozilla %s &'}
162 - : ${TEXDOCVIEW_txt="${PAGER-more} %s"}
163 - : ${TEXDOCVIEW_="${PAGER-more} %s"} # no extension, default to pager
164 - extlist='.dvi .dvi.gz .dvi.bz2 .pdf .pdf.gz .pdf.bz2 .ps .ps.gz .ps.bz2 .txt .txt.gz .txt.bz2 .html'
165 + : ${TEXDOCVIEW_dvi='(xdg-open %s) &'}
166 + : ${TEXDOCVIEW_pdf='(xdg-open %s) &'}
167 + : ${TEXDOCVIEW_ps='(xdg-open %s) &'}
168 + : ${TEXDOCVIEW_html='(xdg-open %s) &'}
169 + : ${TEXDOCVIEW_txt='(xdg-open %s) &'}
170 + : ${TEXDOCVIEW_='(xdg-open %s) &'}
172 # Commands run to uncompress files, according to filename extension.
173 : ${TEXDOCUNZIP_gz='gzip -d -c'}
174 @@ -105,6 +119,10 @@ case `(uname -s) 2>/dev/null` in
178 +extlist=`kpsewhich --expand-brace='$TEXDOCEXT' | tr ':' ' '`
179 +test -z "$extlist" && \
180 +extlist='.dvi .dvi.gz .dvi.bz2 .pdf .pdf.gz .pdf.bz2 .ps .ps.gz .ps.bz2 .txt .txt.gz .txt.bz2 .html'
183 help='Usage: texdoc [OPTION]... [NAME]...
184 Search for NAME in the TeX documentation and start a viewer.
185 @@ -136,11 +154,14 @@ case $# in
189 +tmpdir=`mktemp -d -t texdoc.XXXXXXXX`
190 +trap 'rc=$?; cleanup; exit $rc' 1 2 6 13 15
196 - find `kpsewhich --expand-path='$TEXMF/doc' | tr : ' '` -type f -print |
197 + find `kpsewhich --expand-path='$TEXDOCS' | tr : ' '` -follow -type f -print |
201 @@ -153,7 +174,6 @@ do
204 for ext in "" $extlist; do
206 filename=`kpsewhich -format='TeX system documentation' $name$ext 2>/dev/null`
207 test -z "$filename" && continue
209 @@ -177,7 +197,6 @@ do
211 test -f "$tmpdir/$src" && break
214 eval "$uncompress $filename > $tmpdir/$src"
215 filename=$tmpdir/$src
216 viewer=`eval echo $viewer | sed -e "s|%s|$filename; rm -f $filename; cleanup|"`