Questions tagged [latex]

Working with LaTeX documents, LaTeX coding, and LaTeX source blocks in other documents.

Filter by
Sorted by
Tagged with
3
votes
1answer
2k views

Org-mode doesn't seem to be exporting listings/minted correctly

Emacs is exporting listings blocks (i.e. #+BEGIN_SRC <lang>) in a strange, incorrect way. Here's an example of what I mean with a simple org file: #+AUTHOR: #+BEGIN_SRC js var dog = "dog!" #+...
5
votes
1answer
161 views

Recompile tex file without modification

I \input{b.tex} in a.tex. I made changes to b.tex, and tried to recompile a.tex by C-c C-c in AUCTeX, but it didn't work since a.tex hadn't been changed. How can I recompile then?
3
votes
2answers
89 views

Make siunitx.el automatically recognize values and unit of unformatted text

I use siunitx to typeset units in LaTeX. This is quite painless when typesetting it directly because of Emacs's siunitx.el (see below). However, sometimes I copy exercises or solutions containing ...
12
votes
1answer
1k views

How to get rainbow-delimiters/rainbow-blocks to highlight in-line math in LaTeX equations

I'm using spacemacs with AUCTeX for LaTeX editing and would like to make rainbow-delimiters and/or rainbow-blocks highlight LaTeX math equations. Unfortunately this only works partly, i.e., some ...
2
votes
1answer
787 views

How to define backslash as keybinding in AUCTeX

I have inserted the following code in my init file. This code insert a space+\ (ie, " \") when typing \ in a buffer. Despite the fact that the function ddd works without problem in any buffer, the ...
5
votes
1answer
273 views

AucTeX: can I hide comments?

Is there a setting in auctex that can hide (fold) comments (paragraphs which start with %)?
5
votes
1answer
972 views

Make org-mode export to Beamer keep temporary files out of the current directory

Exporting to Beamer from org-mode creates a myriad of temporary files (the .tex file + files ending in .aux, .log, .toc, .fls, .nav, .vrb, etc.). Most LaTeX implementations now have an option (-...
13
votes
1answer
566 views

Is it possible to have the entire org-table use math environment?

I have an org-mode table that needs to have some math text in each cell. Wrapping every cell with $ both looks ugly and takes much more space than it deserves. Is there any way to somehow put the ...
3
votes
1answer
277 views

Yasnippet prompt when using commands interactively?

How can I use yasnippet to invoke LaTeX commands interactively? If I use auctex to insert \usepackage it starts a minibuffer which lets me select the desired package (including tab completion). ...
7
votes
1answer
690 views

Select images in auctex with preview

If I insert an image into a latex file (via \includegraphics) auctex lets me select the file and inserts the filename. However using this dialogue, I can only choose the filename and cannot see ...
5
votes
1answer
159 views

Recognize LaTeX partial files (with no preamble) as LaTeX

I installed auto-complete and also auto-complete-latex so to be able to use it with LaTeX files. Because in a document I use an external file with the preamble commands in it, Emacs recognises only ...
2
votes
2answers
192 views

Typing two quote characters in a LaTeX document?

I'm working with a LaTeX document. I want to type "" since I need this for german.sty in LaTeX. Starting some time ago, Emacs thinks this is not a good idea. I do not agree. Right now I have to ...
0
votes
3answers
287 views

How can I bind the Ctrl-} key for a LaTeX command?

When working in LaTeX (specifically, with AUCTeX), I want to bind the following functionality to the C-{ and C-} keys: C-{: insert \begingroup followed by a newline C-}: insert \endgroup followed by ...
11
votes
2answers
1k views

How to enlarge latex fragments in org mode at the same time as the buffer text?

I'm using org-mode in emacs, but I think the question is also relevant for auctex users. In org-mode you can show latex fragments, as the manual demonstrates. But: these fragments (mostly math ...
15
votes
1answer
2k views

How to indent items in LaTeX/AUCTeX itemize environments?

Q: how can I get "proper" indentation of LaTeX itemize environments in auctex? Here's where I'd like to be with an item in an itemize environment: \item line is indented two spaces relative to the ...
8
votes
2answers
125 views

Auto-inserting last used sub-/superscript values in math formulae

I use AUCTeX for type-setting mathematical texts. Often I have to type equations with sums, integrals etc. which all have the same sub- or superscripts. I'd like to autofill the current sub-/...
4
votes
2answers
437 views

apostrophe in org-babel export to latex and beamer

How can I get org-babel to properly render ' and not ’ when exporting to LaTeX and to Beamer? I didn't find any good solution yet, and I would like the code to be copy-pasteable.
9
votes
1answer
706 views

Helm and LaTeX mode

When I run the command LaTeX-environment (bound to C-c C-e by default) Helm properly selects from a list of all relevant environments (i.e. the same list I'd get without Helm turned on). The prompt ...
2
votes
1answer
194 views

How to indent back one level when writing a newline?

I'm using Emacs to write LaTeX. For example, in the following code, I have write to the level 3. When I press C-j, the cursor will indent to the third level. I what the newline to be indent at level 2....
9
votes
3answers
7k views

How should I write inline equations in Org Mode so they export to LaTeX properly?

I have a sentence with the words 42 m s^{-1}. When this is exported to LaTeX it exports as 42 m s$^{\text{-1}}$. How should I write it, or what flags should I set in the #+OPTIONS: line, so that it ...
6
votes
1answer
587 views

How can I have Org use `sidewaysfigure` in LaTeX export?

I am writing an Org document with some large figures (images) which I would like to place on a separate page in landscape orientation when exporting to LaTeX. In LaTeX I can achieve what I want by ...
6
votes
1answer
262 views

Make AUCTeX compile each \include to a separate file

In LaTeX it is customary to put the content of different chapters into different files which are then pulled into a master file using \include{FILENAME} statements. One can then use the \includeonly{...
12
votes
1answer
501 views

how to detect if inside a LaTeX math environment?

Q: is there a way to detect if point is inside a LaTeX math environment? How would one detect whether point is or is not inside a LaTeX math environment, whether delineated inline by $...$ or by ...
27
votes
4answers
2k views

Editing files with one-sentence-per-line

A bit of background. I’m trying to version-control my latex documents, and the effectiveness of this initiative would be greatly improved if I adopt a one-sentence-per-line approach. For instance, ...
27
votes
2answers
4k views

How can I hide/display LaTeX section just like org-mode does with headlines?

When editing org files, I find it extremely convenient how you can hide and display headlines and their content by just hitting TAB on the headline. For instance, consider the following buffer * ...
5
votes
3answers
728 views

TOC of tables for org-mode long tables

Here is a super-short org mode file ready to export to pdf C-c C-e l o. It is a sample file to demonstrate long tables and the issue I am facing with the auto generated index of tables by org-mode. #+...
12
votes
2answers
834 views

Aligning multi-lined equations and tables in latex-mode

Let's say I'm editing a latex in Auctex's latex-mode, and I have the following equation. This is just indented with indent-region. \begin{align} \phi & = a + b + c + d \\ & = a + ...
10
votes
1answer
89 views

Speed up TeX-insert-macro on \input

In latex-mode when I use TeX-insert-macro to type a \input{...} macro, Auctex conveniently offers filename completion, which is great. However, it seems to search a lot of places to compile the ...
5
votes
1answer
709 views

controlling display of latex equations in org-mode

By default org-mode will overlap images of the latex equations for a given section, or for the whole document. If I press C-c C-c on an equation with an image overlay, all the images are removed. Can ...
9
votes
1answer
460 views

Overriding fill-paragraph in LaTeX mode

I would like to change the behavior of fill-paragraph in certain modes (e.g. LaTeX-mode provided by AucTeX). I could just rebind the key M-q, but I am also using evil-mode whose implementation of ...
3
votes
1answer
351 views

Predictive mode, Auctex not playing nicely

I have predictive, auctex installed. I want predictive mode to work with my .tex files but I keep getting a warning of: Warning (emacs): Predictive major-mode setup function predictive-setup-latex ...
6
votes
1answer
1k views

Exporting beamer with org-mode

How do I generate a beamer presentation from an org-mode file? What beamer features can I use in my file?