[Mac OS X TeX] tetex, xdvi, emacs under X11 et al.
Enrico Franconi
franconi at cs.man.ac.uk
Sun May 13 23:50:28 EDT 2001
Content-Type: text/plain; charset=us-ascii
Content-Description: message body text
Content-Transfer-Encoding: 7bit
This is what I have done to have a complete environment with tetex,
emacs under X11, xdvi, pdf viewer, ispell etc:
1) install XFree86 4.0.2 + update 4.0.3 (delete first XTools with its
/usr/X11R6 if you have it)
2) download fink from fink.sourceforge.net, and install it (on /sw)
3) as root, not with sudo (use sudo -s):
> fink install emacs
> fink install tetex
> fink install ghostscript
> fink install ispell
(it takes ages!)
4) Have your local texmf, say, in /usr/local/lib/texmf;
add in your .cshrc:
setenv TEXMFMAIN /sw/share/texmf
setenv TEXMFLOCAL /usr/local/lib/texmf
setenv TEXMF '{'\!\!"$TEXMFLOCAL":\!\!"$TEXMFMAIN"'}'
setenv DICTIONARY /sw/lib/english.hash
5) run 'source ~/.cshrc;sudo texhash'
6) save the dvipdf script I'm attaching in a visible path. It is
simply a sequence of dvips (with pdf option) and gs (as pdf
converter). The dvipdf is my definitive alternative to pdftex: it
works with the dvi generated by any standard latex file, while
pdftex does not work with most of my files.
7) Download the new Acrobat Reader for MacOSX.
8) install auctex for emacs; in tex-site add the entries:
(list "View" "dvipdf %d;open -a 'Acrobat Reader' %s.pdf " 'TeX-run-command t nil)
(list "Postscript" "dvips -ta4 %d -o %f " 'TeX-run-command t nil)
(list "PDF" "dvipdf %d " 'TeX-run-command t nil)
The view command under auctex-emacs will automatically preview the
dvi file using acrobat reader. The apple Preview has problems with
fonts.
9) at this point everything works, under standard Aqua. The only point
is that your emacs is the "poor" one: no mouse, no frames, no
colour. In order to have an X11 environment, you can additionally
install XonX (i.e., the modified XDarwin) from sourceforge. Do NOT
install XTools which rewrites on top of the standard XFree86
libraries. I find XonX still unreliable (in particular on a
powerbook, where the keyboard disappears from time to time...). xdvi
and ghostscript work well under X11, but I believe that the dvipdf
alternative is preferable also under X11.
If you have suggestions on how to do it in a better way, let me know.
cheers
-- e.
Enrico Franconi - franconi at cs.man.ac.uk
University of Manchester - http://www.cs.man.ac.uk/~franconi/
Department of Computer Science - Phone: +44 (161) 275 6170
Manchester M13 9PL, UK - Fax: +44 (161) 275 6204
Content-Type: text/plain
Content-Description: DVIPDF script
Content-Disposition: inline;
filename="dvipdf"
Content-Transfer-Encoding: 7bit
#!/bin/sh
# Convert DVI to PDF, based on ps2pdf
# Modified by Enrico Franconi <franconi at cs.man.ac.uk>
OPTIONS=""
while true
do
case "$1" in
-*) OPTIONS="$OPTIONS $1" ;;
*) break ;;
esac
shift
done
if [ $# -lt 1 -o $# -gt 2 ]; then
echo "Usage: `basename $0` [options...] input.dvi [output.pdf]" 1>&2
exit 1
fi
infile=$1;
if [ $# -eq 1 ]
then
case "${infile}" in
*.dvi) base=`basename ${infile} .dvi` ;;
*) base=`basename ${infile}` ;;
esac
outfile=${base}.pdf
else
outfile=$2
fi
dvips -ta4 -Ppdf -G0 -f $infile -o $base.ps
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$outfile -sPAPERSIZE=a4 $base.ps
More information about the MacOSX-TeX
mailing list