[OS X Emacs] synctex in Aquamacs
Joseph C. Slater PE, PhD
joseph.slater at wright.edu
Thu Aug 14 11:35:55 EDT 2008
On Jul 29, 2008, at 11:29 AM, M A wrote:
> On Mon, Jul 28, 2008 at 2:54 PM, Joseph C. Slater PE, PhD
> <joseph.slater at wright.edu> wrote:
> As Peter says going the customization route is better than editing
> elisp files. Unfortunately, this is itself not always easy for a
> non-expert. I would suggest doing the following:
> 1. Open a latex file in aquamacs.
> 2. Under the Latex menu item go to Customize Auctex.
> 3. Select Expand this menu.
> 4. Go back to Latex>Customize Auctex and select Tex Command>Tex
> Command List....
> 5. You should now have a buffer open which a bunch of entries under
> Tex Command List. Look for the one that starts with "Name: LaTeX". The
> line under this should say something like "Command: %`%l%(mode)%' %t".
> This, believe it or not, is the command that auctex executes when you
> have it latex your file. All those %... get substituted with something
> before the command is executed. If you want to figure out what go to
> the bottom of the buffer where there is documentation about each
> element, find the second element documentation and click on
> "TeX-expand-list". After thoroughly satisfying yourself that this is
> just as confusing go back to "Command: %`%l%(mode)%' %t".
> 6. Replace the command so it now reads "Command: pdflatex --synctex
> %t" or whatever it should look like based on what is successful on the
> command line (maybe -interaction=nonstopmode also?). This will
> eliminate some of the nifty automatic things auctex can do like change
> the command based on whether you want dvi or pdf output, etc. Elisp
> gurus will create a new substitution to include in Tex-expand-list
> include that in the Command and create a synctex mode to determine
> whether to run it with synctex. Knock yourself out with that if you
> 7. Near the top of the buffer click on the "Set for Current Session"
> button. If you want to save it for future sessions click on "Save for
> Future Sessions".
> 8. Go back to the buffer with you tex file and latex it.
> 9. If it fails go back to the Tex Command List buffer, edit the
> command until it works or click the "Erase Customiztion" button to go
> back to original defaults (this may erase any other customizations in
> Tex Command List done previously.
I never did say thank you for this. I did slightly different from
this. I used the
Customize AUCTeX:teX Command:Latex Command
menu item after noting that there were a lot of '%' signs that I
didn't understand (and didn't feel like disturbing after my first
attempts didn't work). All I had to do there was change
Thanks for guiding me through. It had been a while.
More information about the MacOSX-Emacs