[AUCTeX] Link to PDFs in Reftex?
Hi there There are some BibTeX frontends that can be used to open PDF files of a certain title. For example, JabRef uses a non-BibTeX fiels "file" where a path leads to a PDF of the respective title. I wonder if Emacs/Reftex can do this. Maybe this could be done via reftex-cite-format. Hitting "o" for "open" does not insert a cite-command but calls an external viewer (or docview-mode) to open a PDF (or URL, ePUB whatever) of the publication, the path (or url) could be given in the bib-file itself as: @Article{tanabe03, author = {Katsumi Tanabe}, title ={The Earliest Pāramitā Imagery of Gandhāran Buddhist Reliefs}, journal = {Silk Road Art and Archaeology}, year = 2003, volume = 9, pages ={87--105}, file = {~/ebooks/tanabe/tanabe2003.pdf} } Would that be possible? Does such a solution already exist? Thanks, Sven ___ auctex mailing list auctex@gnu.org https://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] Compilation stops after 0 pages [solved]
"Sven Bretfeld" writes: > Hello > > I've just installed emacs-snapshot (23.1.91.1) under elive (i.e. Debian > Lenny). Compiling a LaTeX document is not working. The minibuffer > returns: 'Latex: Problems after 0 pages'. The output buffer says: > > , > | Running `LaTeX' on `test' with ``%`latex \nonstopmode%' test.tex'' > | /bin/sh: -c: line 0: unexpected EOF while looking for matching `'' > | /bin/sh: -c: line 1: syntax error: unexpected end of file > | > | LaTeX exited abnormally with code 2 at Fri Jan 22 02:19:47 > ` Ok. Installing a new version of auctex helped. Seemingly the Debian package is incompatible with Emacs-snapshot. Bye, Sven ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
[AUCTeX] Compilation stops after 0 pages
Hello I've just installed emacs-snapshot (23.1.91.1) under elive (i.e. Debian Lenny). Compiling a LaTeX document is not working. The minibuffer returns: 'Latex: Problems after 0 pages'. The output buffer says: , | Running `LaTeX' on `test' with ``%`latex \nonstopmode%' test.tex'' | /bin/sh: -c: line 0: unexpected EOF while looking for matching `'' | /bin/sh: -c: line 1: syntax error: unexpected end of file | | LaTeX exited abnormally with code 2 at Fri Jan 22 02:19:47 ` LaTeXing the same document in a shell works fine, so it must be an Emacs problem. What can be wrong? Help is much appreciated, I have no idea what to do. Thanks Sven ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] reftex-view-crossref-extra and biblatex
Matthew Lundin writes: > Also I would be eager to learn if there any current plans to add > biblatex support to reftex. I realize that biblatex is still in beta, so > I can certainly understand that there are good reasons *not* to > implement support just yet. It's as stable as can be. I'm working with BibLaTeX productively since three years now. Please go on with your project. I wish that many helping hands can be found to support you. It's a pity that my poor elisp skills don't allow me to do so. Best, Sven -- Sven Bretfeld \ CEntrum für CERES \ REligionswissenschaftliche \_Studien__ Ruhr-Universität Bochum Universitätsstraße 150 D-44780 Bochum http://www.ruhr-uni-bochum.de/relwiss/ ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] Forcing "View" to run xdvi.
Hello gerald.j...@dgag.ca writes: > 1.-- The first time xdvi starts it is very slow, 30 sec. or more. If I > leave it open between runs and use source specials it is then very fast and > I find it very very convenient to go back and forth between the source and > its display. Why is it so slow the first time it starts? I can think of two possibilities: 1. It is a fresh installation, so xdvi has to produce the fonts before it can display anything. Does it also happen if you re-open the very same file? 2. Something with the TeX-installation is wrong so that xdvi doesn't find the already created fonts and has to build them anew. I have seen such a thing some years ago on an Ubuntu system. You can check if font-crating is really the problem if you open the dvi-file in a shell and watch what happens: $ xdvi foo.dvi > 2.-- When I include graphics via EPS files in my documents then "View" > wants to be nice to me and it runs dvips and pipes its output to ggv. But > this is not what I want and I find xdvi much more convenient when writing a > document, it makes it so much easier to go back and forht to correct > errors. How can I force "View" to run xdvi with all the necessary > parameters to allow forward and inverse search, yes I have "source > specials" enabled? Insert the following line to the local variables near the end of your tex-file and re-open the file again: %%% TeX-output-view-style: (("^dvi$" "." "xdvi -s 4 -watchfile 1 %dS %d")) Maybe Emacs asks you if you really want to evaluate the line. Just say yes. The '-s 4' is the initial zoom-factor, you can set it to another value. Greetings Sven -- Sven Bretfeld \ CEntrum für CERES \ REligionswissenschaftliche \_Studien__ Ruhr-Universität Bochum Universitätsstraße 150 D-44780 Bochum http://www.ruhr-uni-bochum.de/relwiss/ ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] AucTeX and BibLaTeX
Ralf Angeli writes: >> Is there a possibility to make Auctex aware of BibLaTeX? I think it's a >> matter of making Emacs probe for the existence and timestamps of >> BibLaTeX's temporary files. > > One would have to extend `TeX-LaTeX-sentinel', I guess. We already have > a check for .bbl files in there. A check for BibLaTeX files would > likely look similar. I fear, this is far beyond my skills. I can see no way to customize this function. Hopefully somebody implements it in AucTeX. Biblatex deserves to be implemented, as Leo has already said. Thank you Sven -- Sven Bretfeld \ CEntrum für CERES \ REligionswissenschaftliche \_Studien__ Ruhr-Universität Bochum Universitätsstraße 150 D-44780 Bochum http://www.ruhr-uni-bochum.de/relwiss/ ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
[AUCTeX] AucTeX and BibLaTeX
Hello to all Auctex doesn't recognize if one uses Biblatex instead of Bibtex. The key-combination C-c C-c therefore suggests: 1. Latex 2. Bibtex 3. View Convenient would be: 1. Latex 2. Bibtex 3. Latex 4. View Is there a possibility to make Auctex aware of BibLaTeX? I think it's a matter of making Emacs probe for the existence and timestamps of BibLaTeX's temporary files. Thanks Sven -- Sven Bretfeld \ CEntrum für CERES \ REligionswissenschaftliche \_Studien__ Ruhr-Universität Bochum Universitätsstraße 150 D-44780 Bochum http://www.ruhr-uni-bochum.de/relwiss/ ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] The View command under TeXlive.
gerald.j...@dgag.ca writes: > If I do the same thing (latex and then view) on one of my own file I get: > > dvips quick.dvi -o && gv quick.ps I guess that you have a \usepackage command in the preamble of your file that demands a pdf or postscript output. Maybe beamer or pgf or something like that. Emacs recognizes this when it parses the file during the find-file process. To find out if this is the case, you can comment (delete) all \usepackage commands and then open (find) the file again. Probably the problem is gone then. (You should of course reduce the actual text to a minimum, in order to get an uninterrupted LaTeX run, because of the missing packages). If it works properly you can systematically add the packages again one by one, to see which one causes the problem. You have to kill the buffer and find the file again each time. If the problem is what I think, you can either switch to pdf-mode manually (C-c C-t C-p) and hope that the installed Windows pdf-viewer (prob. Acrobat) is already known to Emacs as the standard pdf-viewer. You can also let Emacs automatically turn on pdf-mode when finding the file by inserting %%% TeX-PDF-mode: t to the 'local variables' section of the file. The other way is just to let Emacs do the dvips run and to open its output with gv (ghostview). Ghostview has to be installed of course. If it's not, you can ask your admin to do it. There is yet another way. You can insert the following line to the 'local variables' of your file: %%% TeX-output-view-style: (("^dvi$" "." "xdvi %dS %d")) Oh, I guess under Windows our dvi-viewer is not xdvi. Then you have to change the command accordingly. The problem with this approach is that the features that have caused your initial problem -- namely the demand of a pdf/ps output -- will, then, cause problems when you view your dvi file. Some pages will not be displayed. Hope that helps. Greetings Sven ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] The View command under TeXlive.
gerald.j...@dgag.ca writes: > If I do the same thing (latex and then view) on one of my own file I get: > > dvips quick.dvi -o && gv quick.ps I guess that you have a \usepackage command in the preamble of your file that demands a pdf or postscript output. Maybe beamer or pgf or something like that. Emacs recognizes this when it parses the file during the find-file process. To find out if this is the case, you can comment (delete) all \usepackage commands and then open (find) the file again. Probably the problem is gone then. (You should of course reduce the actual text to a minimum, in order to get an uninterrupted LaTeX run, because of the missing packages). If it works properly you can systematically add the packages again one by one, to see which one causes the problem. You have to kill the buffer and find the file again each time. If the problem is what I think, you can either switch to pdf-mode manually (C-c C-t C-p) and hope that the installed Windows pdf-viewer (prob. Acrobat) is already known to Emacs as the standard pdf-viewer. You can also let Emacs automatically turn on pdf-mode when finding the file by inserting %%% TeX-PDF-mode: t to the 'local variables' section of the file. The other way is just to let Emacs do the dvips run and to open its output with gv (ghostview). Ghostview has to be installed of course. If it's not, you can ask your admin to do it. There is yet another way. You can insert the following line to the 'local variables' of your file: %%% TeX-output-view-style: (("^dvi$" "." "xdvi %dS %d")) Oh, I guess under Windows our dvi-viewer is not xdvi. Then you have to change the command accordingly. The problem with this approach is that the features that have caused your initial problem -- namely the demand of a pdf/ps output -- will, then, cause problems when you view your dvi file. Some pages will not be displayed. Hope that helps. Greetings Sven ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] Beamer
Hi "Salvatore Enrico Indiogine" <[EMAIL PROTECTED]> writes: > Are there any features for beamer, such as commands that can insert a > frame in text without having to type it all out? Any other beamer > suggestions? There are some latex-beamer specific pieces of code I gathered from different places in my .emacs. Here is a copy. Greetings Sven ;; ;; LaTeX-Beamer ;; (eval-after-load "tex" '(TeX-add-style-hook "beamer" 'my-beamer-mode)) (setq TeX-region "regionsje") (defun my-beamer-mode () "My adds on for when in beamer." ;; when in a Beamer file I want to use pdflatex. ;; Thanks to Ralf Angeli for this. (TeX-PDF-mode 1) ;turn on PDF mode. ;; Tell reftex to treat \lecture and \frametitle as section commands ;; so that C-c = gives you a list of frametitles and you can easily ;; navigate around the list of frames. ;; If you change reftex-section-level, reftex needs to be reset so that ;; reftex-section-regexp is correctly remade. (require 'reftex) (set (make-local-variable 'reftex-section-levels) '(("lecture" . 1) ("frametitle" . 2))) (reftex-reset-mode) ;; add some extra functions. (define-key LaTeX-mode-map "\C-cf" 'beamer-template-frame) (define-key LaTeX-mode-map "\C-\M-x" 'tex-frame) (define-key LaTeX-mode-map "\C-cn" 'beamer-make-note) ) (defun tex-frame () "Run pdflatex on current frame. Frame must be declared as an environment." (interactive) (let (beg) (save-excursion (search-backward "\\begin{frame}") (setq beg (point)) (forward-char 1) (LaTeX-find-matching-end) (TeX-pin-region beg (point)) (letf (( (symbol-function 'TeX-command-query) (lambda (x) "LaTeX"))) (TeX-command-region)) ) )) (defun beamer-template-frame () "Create a simple template and move point to after \\frametitle." (interactive) (LaTeX-environment-menu "frame") (insert "\\frametitle{}") (backward-char 1)) (defun beamer-make-note () "Create a note template and move point to the first item." (interactive) (insert "\\note[itemize]{ \\item % }") (backward-char 4)) pgpsTa22LWzN9.pgp Description: PGP signature ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] input encoding, unicode, multi-byte with tex
"Ed C." <[EMAIL PROTECTED]> writes: > \documentclass[11pt, a4paper]{article} > \pagestyle{empty} > \usepackage{ucs} ^^^ You don't need this package. It's outdated AFAIK. > \usepackage[utf8x]{inputenc} This should be enough for your purpose. You have to take care that the file you are writing is saved in utf-8. You can change the encoding of the buffer with: C-x RET f utf-8-dos RET Then save it, then latex it. Greetings Sven pgpJT97t7CbhP.pgp Description: PGP signature ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] templates for different documents
[EMAIL PROTECTED] writes: > Hi all, is it possible to start auctex with a blank letter|article| > whatever template, with the typical stuff in the preamble? It seems > clunky to make templates of my own and start off with one of them each > time... I simply start a new empty buffer and load a template with insert-file (C-x i). Greetings Sven pgp02LLBYbg7r.pgp Description: PGP signature ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] setting PDFLaTeX-mode on a per-file basis?
Hi Joost On Thu, Sep 20, 2007 at 11:45:03PM +0200, Joost Kremers wrote: > > is it possible to activate/deactive PDFLaTeX mode based on a file's local > variables? in some of my latex files i use pstricks, so that i need to go > latex-->dvips-->ps2pdf, on other files i prefer to use pdflatex. i'd be > nice not to have to type C-c C-t C-p each time when i load a file that uses > pdflatex. Yes, you can do that by adding the line: %%% TeX-PDF-mode: t to your Lacal Variables block. Greetings, Sven signature.asc Description: Digital signature ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] getting auctex working right
Hello I'm not working under Windows, so I have no answer for your first question, and my other answers might not be correct. But I hope not to say anything wrong. On Tue, Jul 24, 2007 at 11:37:35AM -0400, Wilson, Bruce wrote: > 2) How to I get ctrl-c ctrl-c view to use the yap program in MikTeX > and not xdvi? (View command: xdvi "todo.dvi" is what appears in the > command line) This can be set by: M-x customize-variable RET TeX-view-style I don't know the shell command for yap (it should perhaps be simply yap) or its parameters. But you can try or refer to MikTeX's documentation. After you replaced xdvi by yap, you have to hit the button "State" which asks you if you want to set the settings only for the current session (0) or for all future sessions (1). The latter means that the customization will be written to your init file. > 3) How do I get pdflatex in MikTeX to run from within emacs/auctex? This is normally done with: C-c C-t C-p which toggles between latex and pdflatex. If you always want to compile a certain file with pdflatex, you can set this at the bottom of the file: %%% Local Variables: %%% mode: latex %%% TeX-PDF-mode: t %%% End: Greetings, Sven ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] Defining new entry types in bibtex mode
On Sat, May 05, 2007 at 04:57:32PM +0200, Ralf Angeli wrote: > Please keep the mailing list copied. > > * Rainer Thiel (2007-05-05) writes: > > > 2007/5/5, Ralf Angeli <[EMAIL PROTECTED]>: > >> * Sven Bretfeld (2007-05-05) writes: > >> Anyways, `bibtex-entry-field-alist' was turned into a customizable > >> user option three weeks ago in Emacs' CVS repository. > > > > I think I was the one who asked three weeks ago. Is there an easy way > > Windows users unfamiliar with the CVS can access the relevant file > > (bibtex.el, I's assume), or will we have to wait for the next > > Emacs-AuCTeX bundle which I hope will include the new bibtex.el? > > The Emacs project page on savannah.gnu.org has a link to a web-based > interface to the CVS repository. From there files can be downloaded > with a web browser. Thanks for the information. And sorry, I should have remembered that posting some weeks ago. I remember now that I've read it, but I didn't have this problem at that time, so I forgot about it. Bye, Sven ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
[AUCTeX] Defining new entry types in bibtex mode
Hello list Can anybody give me a hint? I want to define some new entry types, so that I can create templates by hitting a key combination in bibtex mode similar to hitting C-c C-e b for a book. For example, by hitting C-c C-e C-r @customa{, author = {}, sortkey = {}, ... } should appear. I cannot find an explanation in the AucTex manual. Thanks for help. Greetings, Sven ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] setting face color for a newcommand
Hi Seweryn On Sun, Apr 29, 2007 at 03:55:42PM +0200, Seweryn Kokot wrote: > Hello, > > I created a newcommand with the syntax > \mycommand{}{}{} > What I have to do to make the command highlighted together with the > three curly braces? I had the same problem two weeks ago. The best way seems to be: M-x customize-variable --> font-latex-user-keyword-classes It's a little tricky in case you have never used the customize function. You create new entries and values by placing the cursor on INS and hitting enter. Below is a copy how it should look like, given your command is called "mycommand". The "Name" can be anything. "Keywords" is the name of your command without backslash. "Number of arguments" should be 3 in your case. In the face attributes you define how Emacs displays the command and the text within the three arguments. In the example I used only colors: black for the font, a pale yellow (khaki) for the background (if you are under GNU/Linux the shell-command showrgb gives you a list of the available colors). It's important that you hit the button "State" after you have finished. Hit "1" (save for future sessions) to insert the new hilighting function to your .emacs. Greetings, Sven Font Latex User Keyword Classes: Hide INS DEL List: Name: the-name-of-my-new-command Keywords: INS DEL Keyword: mycommand INS Choice: Value Menu Face attributes: [ ] Font family: Value Menu * [ ] Width: Value Menu * [ ] Height: Value Menu * [ ] Weight: Value Menu * [ ] Slant: Value Menu * [ ] Underline: Value Menu * [ ] Overline: Value Menu * [ ] Strike-through: Value Menu * [ ] Box around text: Value Menu * [ ] Inverse-video: Value Menu * [X] Foreground: Value Menu Color: black (sample) [X] Background: Value Menu Color: khaki2 (sample) [ ] Stipple: Value Menu * [ ] Inherit: INS Type: Value Menu Command with arguments: command Number of arguments: 3 INS State: this option has been set and saved. User-defined keyword classes and specifications for font locking. Hide > regards, > Seweryn Kokot > > > > ___ > auctex mailing list > auctex@gnu.org > http://lists.gnu.org/mailman/listinfo/auctex -- PS: Bitte schicken Sie mir reine Text-Nachrichten. Bitte schicken Sie mir keine Word-, PowerPoint- oder Excel-Dateien. Sehen Sie dazu bitte auch http://www.gnu.org/philosophy/no-word-attachments.de.html. ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] Highlighting user-defined macros
Hello Ralf On Mon, Apr 16, 2007 at 07:01:17PM +0200, Ralf Angeli wrote: > * sven bretfeld (2007-04-15) writes: > > > Can anybody show me how I can define highlighting rules for my own > > LateX macros in my .emacs. I hate this customize-group thing, since I > > don't understand it anyway (I've tried it for an hour now). > > What did you try exactly? I've found what I need in the meantime (yesterday late night). My problems with customize seem to have resulted from a defective installation of AucTeX. A re-installation fixed things. Now, my changes get saved in the .emacs file, what was not the case before. Thanks for your help Sven ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
[AUCTeX] Highlighting user-defined macros
Hello list Can anybody show me how I can define highlighting rules for my own LateX macros in my .emacs. I hate this customize-group thing, since I don't understand it anyway (I've tried it for an hour now). For example, I have two self-defined functions I want to highlight in .tex-files: \mybox{text} \agendum{text1}{text2} How can I, for example, give "text" in the mybox-argument a red color, and the "text1" of \agendum a red color and "text2" a yellow background? Maybe somebody can sent me a coding example from his/her own .emacs. I will find out the rest. Thank you for help Sven ___ auctex mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] where can i find .emacs file
On Fri, Feb 02, 2007 at 11:20:51AM +0800, xiaopeng hu wrote: > in my main fold of ubuntu,i can not find the file . > but my emacs can aware of tex file. You know that files begining with a dott are invisible by default? You can see them by typing "ls -a" in a shell or by activating "view invisible files" (or something like this) in Konqueror. Anyway, you can just "find" the file with Emacs. If an empty document opens, you don't have this file yet. When you save this buffer the file will be created. I think it's normal that Ubuntu doesn't automatically create a .emacs file for the users when you install Emacs. Sven ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
Re: [AUCTeX] Defining new citation formats with natbib
Ralf Angeli writes: Hi Rald, hi list > > I'm not sure if you are using the code like cited above. If you do > this won't work because part of it is commented. Try the following > reformatted version instead (which is working fine with my > installation): No, that was an error produced by my MUA. I've found the correct code in the meantime. It is a little different from the one I tried first. This entry to .emacs works: (defun my-LaTeX-mode-setup () (add-hook 'find-file-hooks '(lambda () (when (and (fboundp 'reftex-set-cite-format) (member "natbib" (TeX-style-list))) (reftex-set-cite-format '((?\C-m . "\\cite{%l}") (?t. "\\citealt{%l}") (?T. "\\citet{%l}") (?s. "\\citealtse{%l}") (?S. "\\citetse{%l}") (?p. "\\citealtpr{%l}") (?P. "\\citetpr{%l}") (?n. "\\nocitese{%l}") (?N. "\\nocite{%l}") t)) (add-hook 'LaTeX-mode-hook 'my-LaTeX-mode-setup) Thanks for your help Sven ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex
[AUCTeX] Defining new citation formats with natbib
Hello to all I use the natbib package with multibib for a book project and I mostly need the commands \citealtse{} \citetse{} \citealtpr{} \citetpr{} (where se and pr stand for secondary resp. primary literature). I've tried to make RefTeX providing these citation formats as options when I hit C-c [. After experimenting in vain for a while, I put the following code, which I found via Google, in my .emacs file: (defun my-LaTeX-mode-setup () ;; Set up my own cite format for natbib. (when (and (fboundp 'reftex-set-cite-format) (member "natbib" (TeX-style-list))) (reftex-set-cite-format '((?\C-m . "\\cite{%l}") (?s . "\\citealtse{%l}") (?S . "\\citetse{%l}") (?p . "\\citealtpr{%l}") (?P . "\\citetpr{%l}") (?e . "\\citep[e.g.][]{%l}") (?s . "\\citep[see][]{%l}") (?a . "\\citeauthor{%l}") (?A . "\\citeauthor*{%l}") (?y . "\\citeyear{%l}") (?Y . "\\citeyearpar{%l}") (?n . "\\nocite{%l}") (add-hook 'LaTeX-mode-hook 'my-LaTeX-mode-setup) But still RefTeX presents only the default list of citation formats when I hit C-c [. Can anybody see the mistake? Thanks for help Sven ___ auctex mailing list auctex@gnu.org http://lists.gnu.org/mailman/listinfo/auctex