[tex-live] Patch for an enhanced version of xdvik

Jean-Pierre Demailly demailly at ujf-grenoble.fr
Fri Jul 19 21:20:23 CEST 2013


Hi:

If there are still people interested in the Xaw version of xdvik (which, 
I believe, is the fallback for the Linux/Unix version of TeXlive), 
I enclose a patch which helps in obtaining a prettier and substantially
more powerful version - up to my taste, at least ...

In fact the X Athena widgets look very old, and they don't offer antialiased 
fonts in the menus. However, some years ago, a clone of Xaw3d has been
developed to overcome a few limitations, e.g. to use modern font technology
with UTF8 support. It is named libxaw3dxft, and you'll find it 
on 
http://sourceforge.net/projects/sf-xpaint/files/ 
(last version is libXaw3dXft-1.6.2b.tar.bz)

Now, xdvik can be  easily modified to use libxaw3dxft instead of old Xaw.
Then the look and feel can be made close to the look and feel of more
modern widget sets (and it is easier as well to use fancy colors in the
widgets).

I have taken the liberty to add a number of small other enhancements
in the default menu, in the printing widget (there are also hooks for
using GraphicsMagick and JPEG/PNG image handling, but the latter stuff is
essentially independent from the above...)

To compile this stuff, apply the enclosed patch to the original
  xdvik-22.86.tar.gz
from
http://sourceforge.net/projects/xdvi/files/xdvik/22.86/

and compile the resulting package with the script
  sh build-xdvi-enhanced
from top of the directory.

The enclosed 'xdvi-enhanced' script shows how this stuff can be used,
after renaming the resulting xdvi-bin as xdvi-xaw3dxft, to avoid 
overwriting the standard version. As set, it invokes 'gv', 'mupdf' and
'hyphen_show', but these tools are just optional.

Either, it would not be very hard or costly to avoid a permanent installation 
of libxaw3dxft : as the library is quite small, linking statically xdvik
with it would increase the binary size probably by less than 200kB.

Best,
Jean-Pierre Demailly

PS. I'll soon also put a copy of these files in
http://sourceforge.net/projects/sf-xpaint/files/xaw3dxft-progs/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xdvik-22.86-xaw3dxft.patch.bz2
Type: application/octet-stream
Size: 24896 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-live/attachments/20130719/84087aee/attachment-0001.obj>
-------------- next part --------------
#!/bin/sh

# 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
  1:-help|1:-version)
    NAMEOPT=;;
  *)
    NAMEOPT='-name xdvi';;
esac

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"`
  xdviapppath="${xdviappdir}/%N"

  # 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)
  XFILESEARCHPATH="$xdviapppath:${XFILESEARCHPATH-%D}"; export XFILESEARCHPATH
fi

xdvi-xaw3dxft \
-xrm "*horizontal*background: #dcdad5" \
-xrm "*vertical*background: #dcdad5" \
-xrm "*Command*background: #dcdad5" \
-xrm "*Scrollbar*background: #dcdad5" \
-xrm "*MenuButton*background: #dcdad5" \
-xrm "*Toggle*background: #dcdad5" \
-xrm "*panel.background: bisque" \
-xrm "*box.background: bisque" \
-xrm "*beNiceToColormap: false" \
-xrm "*shadowWidth: 1" \
-xrm "*SimpleMenu*SmeBSB*shadowWidth: 0" \
-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" \
-rulecolor purple -cr red -hl green \
-pause -allowshell -editor emacsclient \
-halfpage -s 4 \
$NAMEOPT ${1+"$@"}


More information about the tex-live mailing list