Questions tagged [latex]

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

Filter by
Sorted by
Tagged with
19
votes
2answers
4k views

how to setup Knitr workflow in Emacs?

RStudio provides a one-button way for produce PDF file from LaTeX+R source with Knitr. It looks great for doing reproducible research. And I am trying to configure my Emacs for: at left buffer LaTeX+...
12
votes
1answer
618 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 ...
28
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, ...
29
votes
2answers
6k 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 * ...
17
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 ...
4
votes
1answer
956 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 ...
4
votes
1answer
1k 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 ...
10
votes
1answer
386 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
1k 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 (-...
2
votes
1answer
46 views

How to perform incremental search inside math environments in tex/latex documents

Is there a way to perform incremental search that filters out all non-math environments (i.e., only searches within $...$, $$...$$, and if possible other relevant \begin{..}..\end{..} environments)? ...
5
votes
1answer
2k 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[...
12
votes
4answers
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 ...
11
votes
1answer
3k 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 ...
15
votes
3answers
3k 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 (...
8
votes
2answers
3k views

How to reference source blocks in org text

I want to create source blocks (in any language including LaTeX), then refer to these in the text using internal links, with descriptions as shown below. This similar post is not working for me. I ...
4
votes
2answers
6k 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: ...
7
votes
1answer
808 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
658 views

How to cite author-date including page number in org-mode?

I am using org-ref in org-mode. I want to cite a book like this: \citep[p. 1445]{Fong:2006} but I am only getting citep:Fong:2006. How can I include page number?
4
votes
1answer
1k 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
1answer
969 views

org-mode latex and pdf export custom title

I'm using the latest org-plus-contrib package from the org ELPA archive under emacs 24.5 (Linux and OSX). I needed to have a custom title which includes a logo PNG in documents I export from org to ...
3
votes
1answer
904 views

Exporting Org in Landscape

I have an org document I'd like to export to PDF - with several wide tables columns in it - so much so that it makes sense to export the whole document in A4 landscape to keep the orientation ...
2
votes
1answer
271 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 ...
11
votes
1answer
431 views

Arara integration in Emacs?

Is there a way to integrate Arara as a way to automate the building process of a LaTeX document in Emacs/AUCTex?
6
votes
1answer
471 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
2k 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 ...
4
votes
1answer
529 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 allows ...
3
votes
2answers
238 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 ...
3
votes
2answers
386 views

Is there a way to export latex template to scimax template?

Scimax has already some templates for various journals. However, is there a way to convert latex templates of some specific journals (like nuclear physics A, European physical journal etc.) to org-...
2
votes
1answer
646 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
649 views

Is there a way to suggest label names in org-mode latex export?

In the org-mode example below, I would like to be able to specify the label name to be used by the latex export back-end. Is there such a way? I have two reasons: To be able to mix org-style ...
1
vote
3answers
1k 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 ...
1
vote
0answers
259 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 ...
5
votes
1answer
492 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
1k 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
347 views

Disable flycheck for LaTeX

I use emacs with AUCTeX for editing tex files. I also use flycheck for some other programming language. How to disable flycheck in TeX mode ? I tried called flycheck-mode nil in the latex hook but ...
3
votes
1answer
235 views

How to perform a search for a string inside math environments in a tex/latex document

I have a long tex document and I would like to perform a search for finding some string inside math environments. Is there a search function already provided by auctex to do this? Other solutions are ...
3
votes
1answer
82 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
223 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
359 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
165 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 ...
3
votes
1answer
775 views

org-mode special blocks latex attribute

I am using special blocks to create myself a theorem environment so that I can style it in both HTML and Latex output. For this I do; #+BEGIN_theorem ---Theorem goes here---- #+END_theorem and this ...
2
votes
1answer
280 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 ...
2
votes
3answers
1k views

Background color of LaTeX fragments in Org mode

How can I control the background color of my LaTex fragments in Org-mode? I am using the badwolf-theme package, and this is what I get: I would like the background color of my formulas to match the ...
2
votes
1answer
53 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
0answers
562 views

How to disable doc-view in AUCTex

I'm using Emacs 24.3.1 on Ubuntu 14.04 with AUCTex for LaTeX editing. The command C-c C-c allows me to easily compile the document with pdflatex. However, the second time I'm running C-c C-c, instead ...
2
votes
2answers
256 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 ...
1
vote
1answer
47 views

Em dash before italic in org export

In my document, I have an em dash that needs to be followed by italics. Here's a minimal example: He was surprised—/excuse me/? The LATEX/PDF output includes the slashes and the text is not ...
1
vote
0answers
64 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&...
1
vote
1answer
45 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
92 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 ...