Re: TeX and Afterstep Revisited

Doug Alcorn (doug@lathi.net)
03 Aug 2000 15:04:31 -0400


Patrick Brewer <brewer@lvc.edu> writes:

> Unfortunately, I'm not familiar with lisp. All I know is that it has too
> many parentheses for its own good!

Heh

> 
> But I think you're right about the Dvi being the biggest problem.
> 

After I posted that stuff to as-users, I started looking for some good
source for dvi previewing.  Of course, xdvi source is part of the
tetex package.  I don't think there would be any licensing issues with
grabbing it and putting a new interface on it (in C, Guile, Perl,
etc).  I also found something called TkDVI.  It is a new dvi previewer
implementation using Tcl/Tk as the interface.  The actual dvi stuff is
done in C and the GUI is Tcl/Tk.  

I'm not a real Tcl fan.  I though briefly of re-doing the UI in a
language better suited for the task.  The only real option I keep
coming up with is Python.  It has a sufficiently low learning curve
yet a powerful feature set.

Another problem I'm not sure how to fix is the relationship between
the .tex and .dvi files.  I don't think the dvi format has anything to
specify the which .tex was used to generate it with.  I may be wrong
on that.

> What is interesting is that DropExec seems to understand input. I've tried
> to wiggle Exec to see if I can make it do the same. But no luck, yet.

Fundamentally, you still have to have some dvi previewer.  Any old
file manager will work as long as it supports OffiX drag'n'drop
protocol.  Wharf also supports OffiX; that's how it handles DropExec.
The problem is that you need something to exec.  I suppose you could
use xdvi for the time being.  Because you are using Wharf to support
D'n'D, your actual previewer doesn't need to have anything for D'n'D.
The trick is to figure out how to pass a filename on the command line
to xdvi and how to represent that command line in the Wharf.  This
might work:

*Wharf tex tex.png DropExec "" xdvi %s

If you had some little applet that allowed you to graphically choose a
file and then print it to standard output, then you could do something
like this:

$ cat gfile_xdvi.sh
#!/usr/bin/sh
FILE=`gfileselector` # fictitious program that returns file to stdout
xdvi $FILE

$ grep tex ~/G/L/A/Wharf
*Wharf tex tex.png DropExec "" xdvi %s
*Wharf tex - Exec "" gfile_xdvi.sh

Sorry, all this is untested; YMMV
-- 
 (__)  Doug Alcorn (mailto:doug@lathi.net http://www.lathi.net)
 oo /  Unix Hacker
 |_/   "It's too late for paradise"

--------------------------------------------------------------------
To unsubscribe from this mailing list, simply type the following at #
echo "unsubscribe as-users <your_email>" | mail majordomo@afterstep.org