GNU Emacs is an extensible, customizable text editor written primarily in Emacs Lisp.

learn more… | top users | synonyms

65
votes
4answers
11k views

A simpleton's guide to (…)TeX workflow with emacs

Progress Report Four months on, I thought it a good idea to "report back" here, and I wrote something. Then, I had better thoughts and turned it into a blog post. You can read it on the TeX.sx blog. ...
65
votes
5answers
14k views

Useful shortcuts or key bindings or predefined commands for emacs+AUCTeX

On of the problems I've encountered with emacs in general, and with the defaults key bindings in particular, is the diversity. There are simply so many of them, that sometimes, at the end of the day, ...
46
votes
2answers
6k views

Org-mode export to LaTeX: temptation or nuisance?

We are talking about Emacs and Org-mode: There are several advantages of drafting papers with Org-mode and to have them transferred later to LaTeX, e.g.: I'd like to avoid »programming while ...
40
votes
1answer
2k views

AucTeX extension for TikZ

Is there an AucTeX extension which supports the TikZ syntax and that one of the tkz-collection as well? In particular I want thinks like: syntax highlighting proper indentation that ...
36
votes
7answers
6k views

What is your favorite Emacs and/or AUCTeX command/trick?

What is your favorite Emacs and/or AUCTeX command/trick? The point here is that I don't know what I don't know. I'm an Emacs and AUCTeX user looking to improve my Emacs & AUCTeX use, especially ...
27
votes
8answers
8k views

Setup SyncTeX with Emacs

I want to setup SyncTeX with Emacs, or, more specifically, with AUCTeX, and Evince in Ubuntu. How can I do that? I would like both forward search (from source to output) and inverse search (from ...
26
votes
2answers
513 views

Click on package name to open corresponding style file?

I think it would be super if, in my LaTeX editor, I could click on the name of package... \usepackage{blob} ... and the corresponding style file, blob.sty, would be opened. Do any LaTeX editors ...
24
votes
1answer
508 views

Folding braces in Emacs/AucTeX

I have some code looking like this: 142 \newcommand*\john[2]{ 143 blah blah blah blah 144 blah blah 145 blah blah blah 146 blah 147 } 148 149 \newcommand*\peter[3]{ 150 blah blah ...
23
votes
2answers
3k views

Customising emacs to use biblatex-biber instead of bibtex

I use biblatex, but I still go through running bibtex on my .bib files, rather than biblatex-biber, which is/will be preferred. How do I arrange for C-c C-c to run the relevant biber command, rather ...
19
votes
1answer
493 views

Editing LuaLaTeX files in emacs

(A follow-up question to Which is the best editor for LuaTeX?) Emacs offers the LaTeX-mode in AUCTeX for editing LaTeX files, while it has the Lua-mode for editing Lua-files. Consider the following ...
19
votes
0answers
832 views

Is there an ebib-like bibliography manager for emacs designed for biblatex? [closed]

I've been using ebib to manage my .bib files, but I've just switched over from using bibtex to using biblatex & biber to actually generate the bibliographies in documents. Obviously the file ...
17
votes
3answers
3k views

RefTeX won't find my .bib file in local library tree

RefTeX gives out the following error when trying to insert a citation: No valid bibliography in this document, and no default available I keep a master .bib file in ...
16
votes
3answers
4k views

Does AucTeX Autocomplete?

The quick start guide for AUCTeX says As nearly everywhere in AUCTeX, you can use the TAB or SPC key to get a list of available level names, and to auto-complete what you started typing. Which ...
16
votes
3answers
2k views

Uninformative error message when using AUCTeX

I often have this error when using AUCTeX: "TeX-error: Error occured after last TeX file closed" However, when running for instance pdflatex on the command line, I have a proper error message. But ...
16
votes
3answers
1k views

Emacs, RefTeX and Cleveref – can they work together?

Trying to look for an answer in the net yielded only one questions and one answer which I could neither understand nor use. On tex.stackexchange I found only this question which was answered but I'm ...
15
votes
3answers
3k views

How to get BibTeX to work with Org mode LaTeX export?

I am trying to get Emacs (24.3.1), Org-mode (8.0.3, from ELPA) and BibTeX (from TeX Live 2012) to work together. I have followed the instructions under the Bibliography section in ...
15
votes
2answers
352 views

How to make AUCTeX ignore syntax highlighting within environment

I have a problem with syntax highlighting in the Emacs editor using AUCTeX. The problem occurs in particular with the Verbatim environment from the fancyvrb package. Consider the following code: ...
15
votes
1answer
2k views

Compile using latexmk in emacs

In the accepted answer in for the question it is suggested how to add latexmk support to emacs. If I get it right, compiling the .tex file should be assigned to C-c C-c. However this doesn't work for ...
14
votes
4answers
4k views

AUCTeX and XeTeX

I use Emacs+AUCTeX to write my *-tex. Using the PDF mode, I can run pdfTeX automatically with the C-c C-c command. However, I don't see a way to run XeTeX automatically, or even set up a command ...
14
votes
3answers
2k views

Setting up RefTeX with biblatex citation commands

How do I setup RefTeX with biblatex's citation commands? In Workflow for managing references? Seamus describes a workflow with RefTeX and mentions that it wouldn't be too tricky to add \autocite ...
14
votes
3answers
9k views

How to preview LaTeX in Emacs?

I want a similar layout as in SO, I use it currently as my editor but I would like to find such tool under my fingers. I am more vi-prone so having hard time to get preview-latex working with emacs. I ...
14
votes
1answer
895 views

How can I make AUCTeX use the spelling dictionary in the same language as babel is loaded with?

Is it possible to setup AUCTeX so that it loads the spelling dictionary in the same language as the language used by babel? For example, is it possible to load the Danish ispell dictionary when a ...
13
votes
5answers
11k views

Mavericks upgrade screwed up my pdflatex (command not found)

so everything was working fine ... until i upgraded to os x mavericks (version 10.9.2) a couple days ago. using emacs version 24.3 (9.0) auctex version 11.87.3 after upgrade, tried to compile and ...
13
votes
1answer
659 views

Getting “You have to run LaTeX again to get the references right ” over and over again

on Ubuntu 10.04 with Emacs 23.1.1 and TexLive, writing a book (scrbook) spread over different files, I have the following problem: Doing C-c C-c in Emacs (the usual cycle LaTeX BibTeX LaTeX LaTeX) I ...
13
votes
4answers
7k views

Launching an external PDF viewer from Emacs/AUCTeX on a Mac OSX fails.

I am trying to set Emacs/AUCTeX to invoke an external PDF viewer so I can view the document output, preferably with source correlation via SyncTeX. AUCTeX, by default, suggested evince file.pdf; ...
13
votes
1answer
240 views

Skip spelling in Emacs for the content of a user macro

In Emacs, in order to skip spelling for the arguments of a user macro, one appends an entry to the ispell-tex-skip-alists variable. For example, to skip parsing the argument of \mycommad, one adds ...
12
votes
3answers
394 views

Click on macro name to jump to its definition?

Encouraged by a super response to my previous question on a similar topic, I shall persevere with a similar line of inquiry. I think it would be super if, in my LaTeX editor, I could click on a macro ...
12
votes
1answer
778 views

Does Emacs support editing bibliography files for biblatex?

Emacs includes bibtex-mode for editing bibliography files used by BibTeX. Is there a way to make it support the bibliography files used by biblatex?
12
votes
2answers
2k views

How to turn on flyspell mode with AucTeX?

I'm using flyspell mode, but unfortunatly I have to M-x flyspell-mode in each AucTeX buffer. Somehow (add-hook 'LaTeX-mode-hook 'flyspell-mode) doesn't work for me. What is the correct flyspell-hook ...
12
votes
1answer
1k views

How can I make AUCTeX spell check in the language specified by babel and csquotes macros?

It is possible to make AUCTeX load the spelling dictionary of the language which babel is loaded with. One further convenience would be for it to appropriately react to changes of language within a ...
11
votes
3answers
733 views

Open included files in emacs+AUCTeX

When working with emacs+AUCTeX I would like to consider a project with one main.tex in which you have many include's. Is it possible somehow to open the included files from within the buffer where ...
11
votes
3answers
4k views

pdflatex fails within Emacs.app, but works in terminal

LaTeX rookie here. I'm running OS X 10.7 with Emacs 24, Auctex 11.86 and TexLive 2011 via MacTex. When i run LaTeX through Emacs in the terminal it outputs my test.tex as test.pdf just fine. ...
10
votes
2answers
362 views

Get emacs to automatically insert \end{} commands after a \begin{} command

I've recently switched from Kile to Emacs/AUCTeX for LaTeX editing. I like AUCTeX a lot more in general, in part because I've put a lot of effort into learning Emacs really well. One feature I really ...
10
votes
1answer
398 views

AUCTeX's csquotes integration does not work together with babel

I use the AUCTeX feature to expand " into csquotes macros. To enable it I have put the following in my .emacs: ;; " expands into csquotes macros (setq LaTeX-csquotes-close-quote "}" ...
10
votes
1answer
1k views

How to make `latexmk` run the appropriate amount of times

System: Ubuntu 13.04, Texlive2012, Emacs 24.something, I run Emacs from the terminal and not the GUI, and I have server mode on in Emacs. When compiling my latex documents, I use AucTeX in emacs to ...
9
votes
2answers
331 views

Matching the delimiters \{ and \} in AUCTeX

I'm using AUCTeX and would like the delimiters \{ and \} to be matched. How can I (permanently) achieve matching of these delimiters? The link I provided indicates that I should edit a syntax table, ...
9
votes
1answer
279 views

How can I make AUCTeX use the spelling dictionary in the same language as polyglossia is loaded with?

Is it possible to setup AUCTeX so that it loads the spelling dictionary in the same language as the language used by polyglossia? For example, is it possible to load the Danish ispell dictionary when ...
9
votes
2answers
1k views

Emacs-org-mode and latexmk

After getting to know org mode here, I tried it out. It seems to be, indeed, very helpful. However, I want it to work smoothly with LaTeX, and as a compiling script I want to use latexmk. I followed ...
9
votes
3answers
206 views

RefTeX: shortcut to open the .bib file of the current document

I would like the have a simple keyboard shortcut/command in emacs that opens the .bib file of the current (possible multifile) document. This should be possible with RefTeX, as it can figure out the ...
9
votes
1answer
623 views

Emacs and latex math delimiters

The forward-sexp command in EMACS can be used to find the $ that closes an inline equation: if the point is before the $ that opens the equation, then forward-sexp moves the point after the closing $. ...
9
votes
1answer
647 views

Referring to specific sections in org-mode latex

I'm currently writing a report in org-mode. I have a couple of sections which have the same names, with the section names appearing both as a subsection of the background section, and as a section in ...
9
votes
3answers
1k views

How to set up forward search: from .tex under Emacs to position .pdf under Okular

I edit .tex file under Emacs and view them with Okular. I have already set up the backward search: from .pdf to .tex by pressing Shift+Left click on the .pdf file. The related part of .emacs file is ...
8
votes
1answer
669 views

Delete comments in tex file with Emacs+Auctex

I am working with other people LaTeX files and sometimes they look very messed up. I am looking for a way to delete all comments without changing the code. The problem is that I want to preserve all ...
8
votes
2answers
442 views

Navigate a TeX code using emacs

Are there useful navigation shortcuts in emacs when editing a TeX source? For example jump to the beginning/end of section, or similar thing for environment, etc. C-v and M-v are two coarse, and I am ...
8
votes
1answer
561 views

get emacs to automatically use biber instead of bibtex

I was reading the question titled Customizing emacs to use biblatex-biber instead of bibtex. In that question, user @PLK mentions that as of auctex 11.87, auctex should automatically check if you are ...
8
votes
4answers
615 views

Auctex: how to cause math mode dollars to be closed automatically with electric-pair

I use electric-pair mode to cause brackets to be automatically closed for me, so that when I enter (, { or [, the closing bracket is automatically also entered into the buffer and the cursor is placed ...
8
votes
3answers
1k views

flyspell, emacs and aspell seem to diverge

I'm using the following configuration for aspell in my .emacs file (setq ispell-program-name "/opt/local/bin/aspell") (setq ispell-list-command "list") (setq ispell-extra-args ...
8
votes
1answer
1k views

How to configure Emacs and AUCTeX to perform Forward and Inverse Search

I have emacs23 and AucTeX installed on my Ubuntu system. I would like to change the default pdf viewer in emacs and enable forward and inverse search. How do I do it? I would like to share my ...
8
votes
1answer
490 views

Annoyance in emacs LaTeX mode involved with syntax highlighting

I'm using the following command in a LaTeX file to explicitly call a style file: \bibliographystyle{$BSTINPUTS/IEEEtran} Unfortunately emacs detects this as me entering math mode, but the latex ...
8
votes
2answers
889 views

Entering math mode in AUCTeX using \( and \)

As pointed out in this answer, using \( and \) in order to enter inline math mode in LaTeX is the recommended practice. However, this takes a bit longer if one compares it to $. Is there a way to ...