Roussanka Loukanova
rlouk****@stp*****
Sat Jan 20 22:04:28 JST 2007
Hi, On Fri, 19 Jan 2007, Javier Elizondo wrote: ... > I am trying to run the preview for pdf and dvi files. I read your emails > and I still have some questions and doubts of how to do it. The easy > question is if the preview (pdf files) reloads after running latex in > emacs?. Unfortunately, it does not *automatically*. I am using the following suggestion given to me by folks of this list: In the Preview's Menu -> File -> Revert Unfortunately, there is no key combination for this, or I do not know how to get such. (As I recall, in xpdf, the Reload is by hitting the key "r" or "R".) > The hardest question is if I should follow the indications that > you wrote in your mail to the list on the 14th of January. They work, at least for me, for now. I'll use them, until some conflict or something better shows up, in which case, I'll post to the list (as I got all this help from the folks of the list). There have been suggestions for using Texniscope. Also, Peter Dyballa gave very valuable advises. I haven't had yet time to try them. Regards, Roussanka > I am copying > the instructions I read in your mail down this email. I would appreciate > your help a lot!, and hope you can do it. > Javier Elizondo The buffer "Customize group: Tex Command" can be opened by selecting from the menu bar of Emacs the following: Latex -> Customize Auctex -> Browse options -> Tex Command group: [Go to Group] Clicking on [Go to Group] opens the customization buffer for {Tex Command}. In it, there is a customization item {Tex Output View Style}. Clicking over [Show Value] expands declarations for various groups of commands, incl. for viewing the output of (pdf)(la)tex. There is a long list of xdvi and other commands, which I do not dare to touch (by not knowing their syntax): apparently they are responsible for the default View command with xdvi? I have selected up the first available for expansion INS button at the beginning of the first occurrence of the xdvi command. (It seems to me that the order does not influence the priority of the viewing, perhaps set up somewhere?) I expanded this INS button by clicking over it and filling up the following declaration: INS DEL Extension: ^dvi$ Choice: Value Menu List: ;; I'm not sure what is this? INS Command: open -a TeXShop %s.dvi The command for the default View of pdf files with xpdf is at the end of the list in {Tex Output View Style}. In the original Carbon Emacs.app download, this is the declaration INS DEL Extension: ^pdf$ Choice: Value Menu Regexp: . Command: xpdf -remote "%s" -raise %o %(outpage) I've replaced the above declaration with the following (I do not know if it would be good or not to keep both): INS DEL Extension: ^pdf$ Choice: Value Menu Regexp: . ;; I'm not sure what is this? Command: open -a Preview %o %(outpage) (In both declarations above, I tried alternatively with: Command: open -a Preview %s.pdf Command: open -a TeXShop %o %(outpage) I am not sure what would be better choice. Something left me with the above, hard-set-up, constraint for the specific .dvi extension with TeXShop.) These two declarations seem to trigger the default viewing: - pdf files with Preview, when a tex file (for ex., test.tex) has been typeset with PDFLaTeX - dvi files with TeXShop, when a tex file (for ex., test.tex) has been typeset with TeXShop For ex., I do the following: C-c C-t C-p => Tex-Pdf mode enabled C-c C-c to invoke the pdflatex command: Command: (default LaTeX) RET Command: (default View) RET View command: open -a Preview test.pdf RET However, this does not always work, in particular: I have some tex files with dvips specialties, which require latexing via the commands dvips + ps2pdf, or simpdftex. With the help of Gerben Wierda, I included simpdftex as a command in the AUCTeX/Emacs Command list (thanks Gerben, if you read or not this). After latexing with simpdftex command, Preview is not invoked as the default viewer. I.e., here is what I get: C-c C-c Command: (default LaTeX) simpdftex RET Command: (default View) RET View command: xdvi test-dvips.dvi To avoid the xdvi, I do the following C-c C-c Command: (default LaTeX) simpdftex RET Command: (default View) Pre TAB Command: (default View) Preview RET Preview command: open -a Preview test-dvips.pdf After saving the above declarations in the "Customize..." buffer with {Save for Future Sessions}, AUCTeX/Emacs saves appropriate statements in ~/.emacs. ____________________________________________________________________________________ We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265 -- ------------------------------------------------ Roussanka Loukanova Computational Linguistics Dept. of Linguistics and Philology Uppsala University P.Box 635, Uppsala 751 26, Sweden Tel: +46 18 471 1342 (office) +46 18 750 0340 Email: rlouk****@stp***** URL: http://stp.ling.uu.se/~rloukano/ --------------------------------------------------