Questions tagged [auctex]

Questions about the AUCTeX package for editing (La)TeX code/documents in Emacs.

The AUCTeX website is at https://www.gnu.org/software/auctex/.

Tex.SE also an auctex tag; the one here on SO is probably more appropriate if you expect the answer to your question to involve programming in lisp, whereas the one on tex.SE might be more appropriate if you expect it to involve tricky option settings, or if you would like to be told you should be using TeX package foo rather than trying to get your editor to deal with the verbosity of bar. (No biggie either way, though.)

171 questions
26
votes
3 answers

How to call latexmk in emacs, and jump to next-error

I would like to use latexmk to compile my LaTeX documents in Emacs. Especially I need the Emacs functionality next-error, which is typically called with C-x `, and jumps to the next LaTeX error in the document. I would like to call latexmk either…
Frank
  • 64,140
  • 93
  • 237
  • 324
20
votes
2 answers

Emacs/AUCTeX: run command on file that is not currently open

I edit my LaTeX files in Emacs using AUCTeX. To compile, I press C-c C-c, which will run pdflatex root, if root.tex is the file displayed in the current buffer. But what if I want it to run pdflatex on a file that is not displayed in the current…
Frank
  • 64,140
  • 93
  • 237
  • 324
16
votes
3 answers

How do I bind latexmk to one key in Emacs and have it show errors if there are any

I'm using AUCTeX and I would like to bind a key, e.g. C-0, that does the following: Saves the active file without prompting me. Runs latexmk on the active file without prompting me. Shows me errors if latexmk encounters any by . My problem is not…
N.N.
  • 8,336
  • 12
  • 54
  • 94
15
votes
5 answers

Suggestion for \cite in Emacs with AUCTeX

I would like to know how can I get the suggestion when I do a \cite in Emacs-AUCTeX. The minibuffer tells me when I do C-c [ that: No valid bibliography in this document, and no default available So how can I set this default? I have a separated…
mjsr
  • 7,410
  • 18
  • 57
  • 83
15
votes
1 answer

Code folding for LaTeX in Emacs

Is there an Emacs minor-mode (or piece of elisp code) that lets you selectively hide/show environments while in LaTeX mode? For instance, I would like to move to the beginning of a long \begin{figure} block, hit a keystroke, and have the contents of…
ShreevatsaR
  • 38,402
  • 17
  • 102
  • 126
13
votes
3 answers

Using minted (source code LaTeX package) with emacs/auctex

As is explained in here, I find minted package is pretty cool for source code listing. My question is how to use minted package with AucTeX/emacs? For command line I can use pdflatex -shell-escape SOURCE, but Q1 : How can I modify the AucTeX to…
prosseek
  • 182,215
  • 215
  • 566
  • 871
13
votes
2 answers

Run TeX-command-master without querying in emacs

The key combination C-c C-c in Emacs/AucTeX runs the function TeX-command-masterwhich decides what command should be run (latex, bibtex, view, or others) and then asks the user for confirmation before running the command. I would like to bind this…
Malabarba
  • 4,473
  • 2
  • 30
  • 49
12
votes
1 answer

Preview in AUCTex problem

I'm trying to use emacs+auctex to write my internship report. But I found that the preview feature doesn't work. In fact I have made it work when using ubuntu 10.04, but now I have a new computer with 11.04 and I have problems with preview. For…
darkjh
  • 2,821
  • 7
  • 35
  • 43
11
votes
1 answer

Emacs auctex inserts line breaks after inline math in an ugly way

I got problems with emacs/auctex fill paragraph which insert linebreaks after each $blabla$ block, resulting in a poorly readable code. For exemple, hitting M-q on the following long line: a $1$ b $2$ c $3$ d $4$ e $5$ f $6$ g $7$ h $8$ i $9$ j $10$…
janou195
  • 1,175
  • 2
  • 10
  • 25
11
votes
2 answers

What is the difference of tex-mode and latex-mode and LaTeX-mode in emacs

I am configuring AUCTeX in emacs. Most of the configurations are put in a LaTeX-mode-hook. When I open a main.tex file, I notice that the major mode is latex-mode and my hooked configurations are not activated. I have to M-x Tex-latex-mode to…
ziyangli
  • 155
  • 1
  • 6
10
votes
2 answers

Emacs latexmk function throws me into an empty buffer

This is a follow up to How do I bind latexmk to one key in Emacs and have it show errors if there are any. I'm using a function in Emacs to compile LaTeX documents with latexmk but it does not behave exactly as I want. The function I use is one…
N.N.
  • 8,336
  • 12
  • 54
  • 94
9
votes
1 answer

Auto labeling environments in AUCTeX

If I insert some environment in AUCTeX by C-c C-e (for example equation or figure) then AUCTeX ask for a label with auto-inserted text eq: or fig:. I would like to add theorem environment to LaTeX environments in AUCTeX. I done this by (add-hook…
xen
  • 233
  • 2
  • 10
8
votes
1 answer

Setting up RefTeX Tab completion in emacs

I am trying to make Tab completion work with RefTeX. When typing C-c [ and selecting the type of reference I have then a prompt in the minibuffer. When I know the beginning of the bib key I want to enter, say for instance Campbell2006, I would like…
M. Toya
  • 615
  • 8
  • 24
8
votes
2 answers

Prevent Emacs from linebreaking in TeX inline math

I use Emacs in combination with AUCTeX to edit manuscripts with a lot of inline maths using $. When automatic filling (e.g., with M-q), Emacs often breaks these inline math environments at positions which disturbs the fluency of reading (e.g., in…
Xlea
  • 495
  • 1
  • 4
  • 14
7
votes
2 answers

Emacs AucTex Latex syntax prevents monospaced font

My emacs (Aquamacs with AucTex) changes font size (in e.g. LaTeX mode) to show the syntax - like this: Unfortunately this ruins the point of a monospaced font - e.g. my comments do not align. How do I solve this problem?
hpekristiansen
  • 1,030
  • 3
  • 17
  • 35
1
2 3
11 12