Automatic TeX with WWW
N.B. This page is under construction.
(Update 5/24/94: fixed script for some uncooperative tars. )
When the postscript version of a TeX file is not
available on line, you might wish to have your WWW browser
hot-wired to run TeX automatically when it receives
an appropriate paper.
The directions here apply to
Mosaic for X
on any unix system
and are specific to the preprint server at
xxx.lanl.gov.
They obviously could be modified appropriately for other
uses.
MIME settings
The preferred way for your browser to figure out
what kind of file it is fetching is for the
server to specify the MIME type.
For physics preprints, the LANL server designates the types
application/x-eprint and
application/x-eprint-tar.
Accordingly, you should have a file called .mailcap
in your home directory to tell Mosaic what to do
when it sees such file types.
It should contain the following lines:
application/x-eprint; xterm -e texview %s
application/x-eprint-tar; xterm -e texview-tar %s
Note that there should be no blank space at the beginning
and no extra spaces or tabs.
This file tells the browser to run the texview script.
The script
This is a C-shell script which will take a TeX file,
process it, and preview the output on your workstation
or X-terminal. If it fails, it is most likely
- The author messed up
- Your software is not configured as it should be
Here is the texview shell script.
You should:
- Save it as texview and put it in a directory on your path
where it can be executed
- Change the permissions so it is executable (chmod 0755 texview)
- Make a link (or a copy) to the name texview-tar (ln -s texview texview-tar)
- Check to see that the settings are appropriate for your site.
- Restart your browser or in Mosaic select "Reload config files"
from the "Options" mend.
mende@het.brown.edu