Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [latex]

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

12
votes
1answer
452 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 ...
24
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 * ...
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 ...
26
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, ...
10
votes
1answer
314 views

Can emacs close open LaTeX tags automatically?

When using web-mode, typing a </ will autocomplete with the highest level open tag name. For example, if I have an open <div>, </ will be autocompleted to </div>. Is it possible to ...
5
votes
1answer
877 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 (-...
5
votes
1answer
1k views

How do I configure class options for latex export in my .emacs?

By default org mode seems to configure 8x11 as the paper type when I export to latex. I always print to A4, so I would like all of my exports to specify a4 as the paper type -- e.g.: \documentclass[...
3
votes
1answer
671 views

how to modify default command for TeX-command-master (ie, C-c C-c)?

Q: how can I get TeX-command-master (C-c C-c) to default to LaTeX rather than View? TeX-command-master dispatches to various commands, such as LaTeX, BibTeX, View, etc., almost none of which I use ...
12
votes
3answers
2k views

Exporting unicode characters to pdf using latex from org mode

Hello Good people of Emacs! I'm having trouble exporting unicode math symbols from buffer (org-mode) to pdf file. 1. Problem Description: Symbols are inserted to the buffer as unicode characters (...
11
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 ...
9
votes
1answer
2k views

How do I limit the width of a table or columns in org-mode PDF export?

I'd like to format a table with a wide column nicely in PDF export from org-mode. Ideally it would be with a wrap on that column, but I can deal with a manual character or fraction of \textwidth for ...
4
votes
1answer
876 views

org-mode different latex document class

I am trying to use tufte-book document class in org-mode. But for some reason, org-mode doesn't let me use it and says it is unrecognized. So I am going to the resulting .tex file and manually ...
6
votes
1answer
634 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 ...
4
votes
1answer
685 views

Math autocompletion in org mode

What is the easiest way to get autocompletion for math symbols when I write latex formulas between \(..\) or \[...\] in org-mode? Could packages like company-math or ac-math be used in org-mode, for ...
3
votes
2answers
4k views

How to install Auctex

This is how I attempted to install the package: I ran the command list-packages and then tried to install the auctex package in package mode. This was the line showing auctex entry in package mode: ...
6
votes
1answer
346 views

Table cell alignment breaks when using latex inside org table

Let's assume we have a table that looks like this: After running org-preview-latex-fragment command I get this: As you can see the top row is not aligned with the other rows. How can one view ...
5
votes
1answer
1k views

AUCTeX/Preview PDF2DSC sentinel error

I normally use OS X, and have recently decided to start using Emacs, and specifically AUCTeX based on myriad recommendations. I downloaded the current version for OS X and tried to preview a very ...
3
votes
2answers
119 views

External links to figures in org-mode

I would like to be able to link specific figures from other documents. Basically the function of the xr package in LaTeX where it doesn't necessarily give you an actual link that will take you outside ...
2
votes
1answer
544 views

Rich Text Format for LaTeX in Emacs

I have seen that the online LaTeX editor Overleaf has a nice Rich Text format so instead of this: you see this: You can also see it for yourselves without any login required if you go in the website ...
2
votes
1answer
194 views

Make reftex-toc work with multiple files

I'm using Emacs 24.5 with AUCTeX and RefTex to edit a multi-file project. It consists of one main file with %%% TeX-master: t to mark as master. The 'slave' files all have %%% TeX-master: main to link ...
1
vote
0answers
199 views

How to disable DocView as default command in AUCTeX?

When I'm writing a .tex file on emacs, I like to compile with pdflatex and then see the result on an external pdf viewer. The emacs manual says that I can use C-c C-c to launch any compilation method ...
0
votes
3answers
830 views

Making pdf-tools work after successful compiling on mac os x

After installing the required dependencies with homebrew, I was able to compile pdf-tools . But I cannot make it work (I cannot see the pdf on emacs after compiling) I would like to know if somebody ...
5
votes
1answer
378 views

LaTeX Mode and Listings with $-signs?

I am using LaTeX-Mode and need to include some listings which contain dollar-signs: \begin{lstlisting}[caption=Meteor Server: Bereitstellen einer entfernten Prozedur,label=lst:meteor-server-publish-...
4
votes
1answer
765 views

org-mode quote block environment

Is there a way in org-mode to setup #+begin_quote my quote here #+end_quote to be expanded in latex export as \begin{quoting} ... \end{quoting} I want to use quoting latex package to style quote ...
3
votes
1answer
61 views

Change overlaid text of an outline header?

Q: how do I add a new outline header regexp but change the overlaid text? I often write presentations with Beamer in LaTeX. As such, there are a lot of frame (ie, "slide") environments: \begin{...
3
votes
2answers
187 views

How does AUCTeX determine the documentclass?

It's clear that AUCTeX has some way of determining the documentclass, since some functions behave differently depending on which documentclass is selected. For example, LaTeX-insert-item behaves ...
3
votes
1answer
238 views

Installing Auctex from Package Manager: Scan error

When install auctex from the Package manager using GNU Archive, I get this error: forward-sexp: Scan error: "Unbalanced parentheses", 18984, 38451 This always happens to me when I install it using ...
3
votes
1answer
144 views

cycling through latex math mode and equation

Is there a way to cycle through \( x=1 \), \[ x=1\] and \begin{equation} x=1 \end{equation} in any latex package? I find this function practical but I didn't know how to implement using elisp or ...
2
votes
2answers
215 views

Keeping track of a pdf viewer spawned via AUCTeX?

When using AUCTeX with pdflatex, one can run C-c C-c (TeX-command-master) or C-c C-v (TeX-view) to spawn a PDF viewer. I use Evince on Debian Wheezy, in case it's relevant. This might sound a ...
2
votes
1answer
49 views

detect if inside a LaTeX footnote and get its bounds?

Q: how do I get the bounds of a LaTeX footnote? I'd like to be able to detect, programmatically, if point is inside a LaTeX footnote environment. Ideally, I'd like to be able to extract the ...
2
votes
1answer
177 views

Ways to open the compiled pdf file of the current tex file

I would like to define a customized function to open the complied pdf file of the current tex file in the default pdf viewer of the system (say SumatraPDF.exe). I am primarily interested to a ...
1
vote
1answer
65 views

How to hide frame environment in outline minor mode?

I am using AUCTex and outline-minor-mode to produce Latex presentations with beamer. I wonder how I could tell the outline-minor-mode to hide the content of a frame. I am not into LISP by now, so ...
1
vote
1answer
38 views

Change escape behavior when inside LaTeX equations

I recently wrote a function which could cycle through LaTeX math delimiters. It relies on the texmathp function, built into AucTeX, which will return t if the point is inside an equation region. In ...
1
vote
1answer
232 views

prettify-symbols-mode and multi-character replacements?

With ``prettify-symbols-mode'' it is possible to replace strings by a character, or a character composition, e.g. ;; \lambda → λ (push '("\\lambda" . ?λ) prettify-symbols-alist) Optionally, it ...
1
vote
1answer
84 views

Detection inside general LaTeX (not necessarily Math) commands

This question is related to how to detect if inside a LaTeX math environment?. How to do the correct settings in .emacs in such a way that the variable texmathp takes the value t (like in math ...
1
vote
0answers
51 views

LaTeX highlighting: Dollar expressions across lines

I'm having some trouble with LaTeX math expressions between (single) dollar signs. Specifically, syntax highlighting breaks across lines. Things looks something like this: if there exists $\alpha&...
0
votes
0answers
376 views

How do I do Live-preview of LateX while editing in Emacs?

I am looking for something similar to what is done using NeoVim in this video: https://www.youtube.com/watch?v=zCdDgtlBaTU
0
votes
1answer
425 views

Why is Org adding a label in custom Babel environment?

I can't tell in what update exactly did this happen but since not so long ago Org adds a label{orgsrcblock#} to custom listings environments. Unfortunately, I can't find a way to tell listings to ...