Roussanka Loukanova
rlouk****@stp*****
Thu Dec 21 06:12:55 JST 2006
On Tue, 19 Dec 2006, Peter Dyballa wrote: > > Am 19.12.2006 um 22:10 schrieb Roussanka Loukanova: > >>>> 2. Then, Ctrl-c Ctrl-c runs latex successfully but without creating >>>> pdf, >>>> i.e. it does not get the sequence of commands: dvips + ps2pdf. >> >> If right after the 1st Command (in Carbon Emacs, 1.6.0) Ctrl-c Ctrl-c, >> I confirm Latex, it creats a good dvi file. Then if I try, with >> another >> Ctrl-c Ctrl-c, to type dvips in the Command minbuffer-line, Emacs >> responds >> with [No match]. > > That's the wrong way! You have to choose one of the commands from the > Commands menu! Everything else AUCTeX does not understand. If you > want to use dvips you would need to add a dvips command first. This > might work from LaTeX -> Customize AUCTeX -> Browse Options (this way > I added XeTeX commands, one sort to use dvipdfmx and another one to > use the Mac OS X default xdv2pdf). > > Again, since you need to add a command to the Commands menu, think of > adding a shell script as a PSTricks command. Herb Schulz' ps4pdf > engine script goes (a bit edited by me): [...] Here is what I tried with ps4pdf.sh ~/bin rosi$ ls -l total 40 -rwxr-xr-x 1 rosi rosi 417 Dec 20 19:52 ps4pdf.sh -rwxr-xr-x 1 rosi rosi 6418 Dec 20 20:47 texdoc The content of ps4pdf.sh is exactly as you gave it: #!/bin/sh basefname=`basename "$1" .tex` # process the figures latex --shell-escape "$1" dvips -Ppdf -o "${basefname}-pics.ps" "${basefname}.dvi" ps2pdf -dAutoRotatePages=/None "${basefname}-pics.ps" "${basefname}-pics.pdf" pdfcrop "${basefname}-pics.pdf" mv "${basefname}-pics-crop.pdf" "${basefname}-pics.pdf" # remove intermediate files rm "${basefname}-pics.ps" "${basefname}.dvi" # process the file pdflatex "$1" But bash does not see the command: $ ps4pdf.sh lec2.tex -bash: ps4pdf.sh: command not found (ps4pdf works) Roussanka