Questions tagged [latex]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
549 views

Poem in org-mode #+VERSE environment mangled by LaTeX export

I'm using org-mode to create a handout for a poetry class in which I want to include John Hollander's "Swan and Shadow." It looks great in emacs, but when it's exported to PDF through LaTeX, it no ...
4
votes
2answers
862 views

how to start outline-minor-mode with latex-mode?

I have the following in my .emacs: (add-hook 'latex-mode-hook #'outine-minor-mode) (add-hook 'latex-mode-hook (lambda () (outline-minor-mode 1))) (I am aware this redundant, I am ...
4
votes
1answer
82 views

Query-replace with some context checking?

(query-replace "foo" "bar") shows you all occurrences of foo and offers to replace them by bar. I would love to have a version of query-replace that only picks the occurrences of foo that are "in ...
3
votes
1answer
81 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{...
8
votes
1answer
266 views

Formulas in plain text export

I am trying to find a way to export an Org document with lots of formulas in plain text, but the results aren't great so far. What I tried: pandoc - basically keeps all math in LaTeX unchanged, ...
2
votes
1answer
447 views

Vim-LaTeX-Suite Macros in AucTeX / Emacs

I am a long term Vim user but I consider switching to Emacs + EVil-mode. However, there is one major obstacle. I most frequently use Vim to edit LaTeX files and I have grown quite accustomed to the ...
2
votes
0answers
322 views

use org-mode to manage latex templates

I currently have a few latex templates stored in a folder. Then I copy and paste to create a new document. I want to streamline this process because, well, I am lazy and I like to play. Preferably, ...
1
vote
1answer
179 views

Automization of preview-latex

The preview-latex package behaves in the following manner: it shows you an image of a formula / section header / etc. When the cursor gets "into" the image it is automatically replaced by the latex ...
4
votes
1answer
141 views

Use command other than \item to render lists in LaTeX export

I am trying to come up with a template for moderncv package. I would like to be able to render org-mode lists using \cvitem for example. Better yet, if I could choose the LaTeX command for rendering ...
0
votes
1answer
550 views

Org-export: LaTeX--->PDF with multipage #+INCLUDE

I'm new to the #+INCLUDE command, and am using it to assemble a book of sheet music. At the top of the file I've placed a #+LaTeX_HEADER to use the \fancyhdr package for footers for all the pages in ...
0
votes
1answer
617 views

How can I add the pdflatex binary to my path to make it visible to emacs, specifically LaTeXPreviewPane?

Solved: See my answer below. It seems like emacs can't always see what you can see in the terminal. The package mentioned in my answer below solved this issue. I'm trying to make LaTeXPreviewPane ...
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+...
3
votes
1answer
2k views

How to control newline and indent when export to LaTeX from org-mode file?

I have a test org-mode file as below: #+OPTIONS: ':nil *:t -:nil ::nil <:nil H:3 \n:nil ^:{} arch:headline #+OPTIONS: author:nil c:nil creator:nil d:(not "LOGBOOK") date:t e:t #+OPTIONS: email:nil ...
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[...
7
votes
1answer
707 views

Setting #+ATTR_LATEX for all images of a document

I am currently adding an #+ATTR_LATEX before every image in my org-file to center it in the produced LaTeX beamer slides. That is slightly annoying and clutters up the document. Is there a way to set ...
2
votes
0answers
554 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 ...
1
vote
0answers
78 views

Is it possible in org-mode to export a * heading to a \begin{heading} \end{heading} block construct?

I'm trying to export a heading as a block construct. Something like * heading Content * Another Heading gets exported to \begin{heading} Content \end{heading} \section{Another Heading} Using ...
6
votes
1answer
56 views

How to check with regular expressions or another way if some package is used in a LaTeX document?

How to check if a specific package is used by a LaTeX document. For example in the below document (intentionally written in an ugly but technically correct format), the packages fontenc, inputenc, ...
9
votes
2answers
778 views

How can I write [0,1) in LaTeX mode without breaking indentation?

When writing LaTeX using latex-mode, I often want to write "half-open intervals" in my text. For instance, [0,1), which refers to the set of all numbers x with 0 <= x < 1. Unfortunately, ...
15
votes
3answers
7k views

Label and reference LaTeX equations in org-mode

This is similar to Org export to latex and HTML references, but for equations. I like to use LaTeX math snippets in my org-files, as in * The Quadratic Equation The roots of $ax^2 + bx + c$ are ...
5
votes
2answers
1k views

How do I insert resizebox code in org-mode tables when exporting to latex?

I'm trying to figure out how to insert a resize command inside a table environment in org-mode that exports to latex, Here is my minimal example of raw latex source vs org-mode tables: #+LATEX_CLASS:...
6
votes
1answer
5k views

Exporting org to pdf: LaTeXerror [closed]

When I try to export a .org or .tex file to pdf with the command org-latex-export-to-pdf, I get the following error in *Messages* buffer: Processing LaTeX file ./test.tex... org-latex-compile: PDF ...
2
votes
1answer
327 views

How to render latex expressions (not necessarily formula) inside buffer?

By preview-latex on can render latex formulae inside a tex buffer. The package px package renders latex formular inside an arbitrary buffer (see https://emacs.stackexchange.com/a/219/). A similar ...
1
vote
1answer
44 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 ...
3
votes
1answer
351 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
161 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 ...
8
votes
3answers
979 views

How to make a shell command totally silent (preventing it to split window or to open a new frame/window etc)

Is it possible to run a shell command silently (in background)? When I use async-shell-command, emacs split the windows. I would like that an specific shell command to be totally in background (...
2
votes
2answers
410 views

AucTeX: Disable electric-pair-mode in minibuffer during Macro definition?

I use Emacs 24.3.1 and AUCTeX. I switched on the electric-pair-mode in LaTeX-buffers. The only time I would really like to disable it in the minibuffer while inserting math-mode parentheses via the \...
1
vote
0answers
28 views

Emacs- visual-line-mode and latex tabular environment [duplicate]

I am using GNU Emacs 24.4.1 with visual-line-mode turned on for LaTeX editing. This works great, except in tabular environments, where it would be nice to have the word-wrapping turned off. Is this ...
2
votes
1answer
168 views

How can I make imenu work with complex LaTeX documents?

I discovered a short time ago that M-x imenu plays nice with LaTeX documents – mostly. With a master/slave document setup (one file inputs another), imenu will not pick up on the structural elements ...
2
votes
1answer
1k views

How to use a custom export font for a section of text in org-mode?

I am writing in org-mode and exporting to pdf via LaTeX. I am quite new to Emacs and org-mode, and not familiar with LaTeX, so I am flailing about on the following: I would like for a small section ...
5
votes
1answer
1k views

“Error running timer `font-latex-jit-lock-force-redisplay'” in LaTeX mode

Since an upgrade to GNU Emacs 24.4.1, I Error running timer `font-latex-jit-lock-force-redisplay': (wrong-number-of-arguments (2 . 2) 3) [N times] where N in my observations ranges from single ...
3
votes
1answer
877 views

Blank lines after org-mode code block results in LaTeX export

Context I am embedding org-mode source code blocks and their results into my document and am exporting it to LaTeX. I usually wrap the output of my code into helper functions that generate formatted ...
10
votes
1answer
378 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 ...
6
votes
1answer
465 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 ...
1
vote
0answers
79 views

Add commands after custom LaTeX split window view

I use (setq TeX-view-program-list (quote (("Emacs" "emacsclient -e '(split-window-horizontally 88) 'emacsclient -e '(other-window 1)'; emacsclient %o;")))) (setq TeX-view-program-selection (quote (((...
3
votes
2answers
221 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 ...
1
vote
1answer
813 views

Why doesn't C-c C-c compile my LaTeX document? Did I set up AUCTeX correctly?

This may seem like an odd question but I believe there absolutely should be a standard or most common way to use LaTeX on emacs, and that this community would benefit from owning a complete answer to ...
0
votes
1answer
463 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 ...
2
votes
2answers
422 views

Demoting sections on org-export

Context Last weekend I had some discussion with a friend about how I could improve my writing skills. As a result I would like to experiment with a new document structure to guide the process of ...
2
votes
1answer
459 views

in org-mode, how to change the formatting of timestamps in export to LaTeX?

In org-mode, how can I change the formatting of timestamps exported to LaTeX PDF? In the generated .tex file, I see that my timestamps are rendered in LaTeX as \textit. How can I modify this? I ...
8
votes
4answers
1k views

Show math formula in emacs when coding

Is it possible that emacs shows real formulas in the editor if they are written in Latex or similiar? I am asking because it would be much more readable if you are coding (in lets say python or C++) ...
6
votes
1answer
957 views

Org-mode export to Latex error with footnotes

Whenever I write, in my org-mode file, \footnote{bla bla bla $\whatever_{something}$} I get an error in the .tex file generated. What it exports to the tex file is \footnote\\{bla bla bla \whatever_{...
0
votes
1answer
88 views

Set LaTeX version to use when exporting using org-mode

In my .emacs, I have the following: (setq org-latex-to-pdf-process (list "latexmk -f -pdf %f")) However, when exporting an org it uses the "wrong" version of latexmk. More precisely, from my shell (...
1
vote
1answer
304 views

Latex failing with Cygwin

I'm on Windows 7, running GNU Emacs 24.4.1, and I have also installed Cygwin and I am trying to use Cygwin as the shell in Emacs. I followed the answer here: https://stackoverflow.com/questions/...
2
votes
1answer
642 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 ...
0
votes
0answers
94 views

Finding proper hook for a major mode

So this is some elisp code I have in my init.el file: (defun complete-dollar () (interactive) (insert "$$") (backward-char 1)) (defun my-latex-keys () "Modify keymaps by latex-mode" (...
11
votes
2answers
865 views

RefTex searching for multiple articles with Helm

I recently started using Helm and am really enjoying it. However, I use emacs to write a lot of LaTeX. When I cite articles, I often need to cite several in the same cite macro - I could search my ...
2
votes
1answer
1k views

Specifying version when using extra latex packages with org mode

Somewhere long ago I read I could use additional latex packages in org-mode using: (setq org-latex-packages-alist '()) (add-to-list 'org-latex-packages-alist '("" "color" t)) (add-to-list 'org-latex-...
0
votes
1answer
240 views

Dollar symbol inside lstlisting block turns on font-latex-math-face

I am using lstlisting to add shell code into my tex document. The shell code contains special character, $. Emacs assumes it as a Math mode mark & all characters that come after dollar symbol are ...

1
8 9
10
11 12