Here's my rule for manpages:

data matches (.+)\(([0-9])\)
arg isfile /sys/man/$2/$1
plumb start rc -c 'man -t '$2' '$1' | plumb -id image'

which replumbs the cmd output to the image port; then:

dst is image
plumb to image
plumb client rc -c 'window -r 380 0 1600 900 ''echo -n page >/dev/label; bind 
/dev/mordor /dev/label; page -i -p180 -m64'''

either sends it to any existing page instance
or else starts a new one to send it to.
Worth noting I am using 9front's version of page,
which listens on the image port; can't recall if the original
listens on the postscript port in a similar way: probably.
If you just want to pop open a new window with
your dvi each time you can use a plumb start rule
that does whatever you want; something like:

data matches '([a-zA-Z¡-�0-9_\-.,/]+)\.(dvi|DVI)'
arg isfile $0
plumb start window kertex/dvips $0 '|' page

There are other workflows too, if what you want is a tight
loop for editing a document and seeing the new version.
Some people use a watch(1) program that runs a command
whenever a given file changes. I prefer to tie the file write
and doc gen to a single command using (9front) sam's ^ cmd,
which sends its output to sam's command window:

^echo w; window troff $% '|' page

The last shell command is remembered, so subsequent
write'n'reviews are a simple ^ thereafter.

umbraticus

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tce7385fe52c532d6-Me347adb350456cff65756620
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to