texdoc
Reinhard Kotucha <[email protected]>
| Newsgroups | gmane.comp.tex.tetex.beta |
|---|---|
| Message-ID | <[email protected]> |
Hi,
"texdoc grfguide" issued the error message "ghostview: command not found".
I do not have ghostview installed but gv. texdoc offers me to set an
environment variable, such as TEXDOCVIEW_ps='gv %s &'.
It works as expected but I prefer to have this variable set in texmf.cnf.
The following patch calls kpsewhich --expand-var to determine the
viewer, if this fails it uses the default values defined at the top of
the script.
Regards,
Reinhard
--- texdoc-orig Mon May 10 21:43:34 2004
+++ texdoc Sun Aug 22 00:25:55 2004
@@ -90,7 +90,9 @@
echo $filename
else
ext=`echo $filename | sed -n 's%.*\.\([^/]*\)$%\1%p'`
- viewer=\$"TEXDOCVIEW_$ext"
+ default_viewer="\$TEXDOCVIEW_$ext"
+ viewer=`kpsewhich --expand-var="\\$TEXDOCVIEW_$ext"`
+ test -n "$viewer" || viewer=$default_viewer
viewer=`eval echo $viewer | sed -e "s|%s|$filename|g"`
if test -z "$viewer"
then
--
----------------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover mailto:[email protected]
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------