[tex-live] Shell script for xdvi-xaw3dxft

Jean-Pierre Demailly demailly at ujf-grenoble.fr
Sat May 10 17:30:33 CEST 2014

And here is the shell script I am using to launch xdvi-xaw3dxft - it could
of course be improved in many ways.

Best wishes,
Jean-Pierre Demailly
-------------- next part --------------

# This is the xdvi wrapper script for teTeX, version 0.2.
# Copyright Thomas Esser, 1998. Permission to distribute under the terms
# of the GNU general public license version 2 or later.

# This script sets some environment variables to make sure that xdvi's
# ressource file in $XDVIINPUTS/xdvi is read by xdvi.bin.
# Special care was taken to make this work for old R3, too. Therefore,
# we need to modify XAPPLRESDIR. If you are running R4 or later, you
# can set XUSERFILESEARCHPATH for user specific application default
# files. You cannot use XAPPLRESDIR for user specific application default
# files.

# -help and -version only work if they are the only options. Therefore,
# we cannot give the "-name xdvi" parameter in that case.
case "$#:$1" in
    NAMEOPT='-name xdvi';;

export XDVI_PS_VIEWER="gv"
export XDVI_PDF_VIEWER="mupdf"
export XDVI_PRINT_TOOL="xdvips %s &"
export XDVI_HYPHEN_TOOL="hyphen_show %s | \
  xmessage -geometry 400x320 -title \"List of hyphenations\" -file -"

XDVIINPUTS="$XDVIINPUTS":'$TEXMF/{xdvi//,web2c,dvips//}'; export XDVIINPUTS
xdviappfile=`kpsewhich -progname=xdvi --format='other text files' XDvi`
if test -n "$xdviappfile"; then
  xdviappdir=`dirname "$xdviappfile"`

  # For R3, we have to set XAPPLRESDIR.
  XAPPLRESDIR="$xdviappdir"; export XAPPLRESDIR

  # For R4 or later, we have to set XFILESEARCHPATH, since XAPPLRESDIR might
  # be ignored (if XUSERFILESEARCHPATH is set)

xdvi-xaw3dxft \
-xrm "*horizontal*background: grey80" \
-xrm "*vertical*background: grey80" \
-xrm "*Command*background: grey80" \
-xrm "*Scrollbar*background: grey80" \
-xrm "*MenuButton*background: lavender" \
-xrm "*Toggle*background: grey80" \
-xrm "*panel.background: bisque" \
-xrm "*box.background: bisque" \
-xrm "*beNiceToColormap: false" \
-xrm "*shadowWidth: 1" \
-xrm "*MenuButton.borderWidth: 1" \
-xrm "*useRight: False" -xrm "*useBottom: False" \
-xrm "*textSink*background: white" \
-xrm "*selFileForm.background: bisque" \
-xrm "*selFileLabel.background: bisque" \
-xrm "*save_or_print_form.background: bisque" \
-xrm "*print_to.background: bisque" \
-xrm "*range_lab.background: bisque" \
-xrm "*range_of_lab.background: bisque" \
-xrm "*range_to_lab.background: bisque" \
-xrm "*dvips_options_name.background: bisque" \
-xrm "*paned*Form.background: bisque" \
-xrm "*topic_pane*Form.background: bisque" \
-xrm "*topic_pane*action_area.background: bisque" \
-xrm "*textSink*background: white" \
-paper A4 \
-rulecolor purple -cr red -hl green \
-pause -allowshell -editor emacsclient \
-halfpage -s 4 \
$NAMEOPT ${1+"$@"}

More information about the tex-live mailing list