Questions tagged [latex]

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

Filter by
Sorted by
Tagged with
2
votes
2answers
280 views

Org latex exports $ … $ math as \( … \) : can this be avoided?

As the title says, inline math snippets such as $x+1$ are replaced during org latex export by \(x+1\). But, no one is writing inline math in LaTex files like this. Is there a way to tell Org to leave ...
2
votes
1answer
174 views

Fix indentation of LaTeX code without wrapping lines

If I select everything in LaTeX-mode (AUCTeX) and auto-fill the region, the indentation of all lines is corrected. This is the part I like. However, it also breaks all long lines (which I think is ...
2
votes
1answer
450 views

Symbol’s value as variable is void: last-command-char when trying to insert bracket

I am using aquamacs and latex mode, 'Symbol’s value as variable is void: last-command-char when trying to insert bracket' occurs when I am trying to insert a bracket. How could I do, thank you
2
votes
1answer
485 views

Opening latex files works on one computer but not the other

On my primary computer, I have the following set up for emacs and everything works like a charm. I use emacs cvs, auctex cvs, and latexmk on a Ubuntu 14.04. However, I just put the same set up on ...
2
votes
2answers
42 views

Shortcut to put the selected region in an ordinary LaTeX environment (not with begin-end style) using auctex

In auctex if one has a selected region and then apply the command c-c c-e (LaTeX-environment) then by selecting an environment, the selected region will be folded between that environment. Is there a ...
2
votes
1answer
463 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 ...
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 ...
2
votes
2answers
72 views

Org-mode: How to LaTeX export “$n$-” correctly?

I have notes containing many of the following type of LaTeX fragments $p$-adic ... $n$-th ... But org-mode exports them as literal dollar sign instead of math. The problem seems to be the - ...
2
votes
1answer
106 views

How can I position \label outside \caption in LaTeX export of figures?

Say you have a figure in your org-mode file like the following one: #+NAME: fig:first-figure #+CAPTION: Some caption #+BEGIN_figure This is a figure. #+END_figure This is exported to LaTeX code ...
2
votes
1answer
51 views

Add expressions to LaTeX-electric-left-right-brace

I would want to "electrically" insert | or \right| when typing | or \left| in AucTeX and can't quite figure out how to add characters to AucTex-electric. A list of already defined completions can be ...
2
votes
1answer
512 views

DBus error when running TeX-evince-sync-view

I am trying to get my LaTeX View command to work properly in Emacs, but for some reason I just can make it happen. Whenever I hit C-CC-C and enter the View command, Emacs automatically suggests TeX-...
2
votes
1answer
125 views

Removing a latex command (by matching braces)

In LaTeX, I sometime define a command of the type \tmpcmd{TEXT\cmd{MORE TEXT}}. After I am done, I want to remove all instances of this command, so I usually do a replace-string of \tmpcmd with an ...
2
votes
2answers
1k views

Ways to render latex-like formula like mathjax in Emacs

Assume one has a latex-like formula as the following which is usually rendered by mathjax in webpages supporting it (like wordpress): For all positive integers {n} one has \displaystyle \frac{1}{n+1} ...
2
votes
2answers
364 views

How center #+BEGIN_EXAMPLE on org-mode LaTeX export?

I have a verbatim/monospaced block that way: #+BEGIN_EXAMPLE _ / \ T H ...
2
votes
1answer
252 views

Latex equation numbering on left instead of right with org-mode output

I've got this \begin{align} n &= 0 \\ n &= m + 1 \end{align} in an org-mode buffer. When I produce a Latex output, the numbering n = 0 (1) etc. is properly placed on the right. But an ...
2
votes
1answer
272 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 ...
2
votes
2answers
417 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 \...
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
222 views

Inserting electric braces in AUCTeX

This is a question a friend of mine had; figured posting here might give quick responses. Old version in new language, après Name How do I define the mapping ^ |--> ^ while ^^ |--> ^{}. ...
2
votes
1answer
40 views

Promote a major mode kbd to a higher priority than the same ones used by a minor mode

I am using emacs to write LaTeX documents with AucTeX and cdlatex. Both of them have the same feature of automatically closing parens and dollar sign symbols. However, AucTeX obviously did a better ...
2
votes
1answer
83 views

AUCTeX: only use monospace for rendering macros?

I've been using the fontify features of AUCTeX, as well as magic-latex-buffer, to display my TeX code in a more readable way. But I'm wondering if I can crank this up to 11: is there a way to render ...
2
votes
2answers
291 views

Emacs Org-mode + Letter class = Unknown latex class 'letter'

I want to use Emacs with org-mode to export notes using 'letter' class. Texlive is installed in a Mac, and have many classes to export. But Emacs in org-mode only work with: article, report and book: ...
2
votes
1answer
142 views

org-mode tikz drawing behavior abnormal

In below example, the text should be show on the right side if compile the latex code with pdflatex command. but in org-mode, the right side text missed: #+HEADER: :fit yes :imagemagick yes :...
2
votes
1answer
52 views

Emphasize (make bold) texts within a subscript for LaTeX exports?

There are some mathematical equations in the form of: G_{u} which I enter in org-mode as $G_{*u*}$ or $G_{ *u* }$ It gets displayed correctly in org-mode, but when exported to LaTeX, the asterisks ...
2
votes
2answers
1k views

OrgMode, how to pass options to LaTex listings?

When I export an Emacs OrgMode buffer like: #+LATEX_HEADER: \usepackage{listings} * How to pass options to LaTex listings? #+ATTR_LATEX: :options [numbers=left] #+BEGIN_SRC sh echo "hello world" #+...
2
votes
1answer
32 views

Prevent AucTeX from changing font within some tags

When I'm using AucTex, I tend to have problems with how the package formats the fonts I use within tags such as \textit{}. It appears that AucTeX wants to display an italicized version of the buffer's ...
2
votes
1answer
153 views

How to set field separators in bibtex-mode's autokey generator?

Q: how do I set a specific separator in bibtex-mode's autokey generator? Background I am working with bibtex-mode. It has a feature to auto-generate the entry key, which is customizable. Goal My ...
2
votes
1answer
93 views

Perform-replace only on text (no comments, no math) in latex-mode?

I need to write some Emacs-Lisp code that uses the perform-replace function, limiting its range of action only on text (ignoring comments, in-line math and math ambients) on LaTeX documents (in latex-...
2
votes
1answer
144 views

Don't fill minted environments in AUCTex

When running M-x LaTeX-fill-environment I don't want code in a minted environments to be formatted. I tried adding minted to LaTeX-fill-excluded-macros but that didn't have any effect on the filling. ...
2
votes
1answer
109 views

Narrow and move between latex environments

When writing LaTeX presentations with the beamer class in emacs+auctex I would like to have a function (and keybinding) that does the following three things: narrow to the next frame environment if ...
2
votes
1answer
81 views

Ways to automatically insert a space after a LaTeX command (inserted by an AucTeX shortcut, e.g. `g) if the next keystroke is a letter

With AucTeX, one can insert many LaTeX commands using shortcuts. For example in a math environment (e.g., between $ $), the shortcut `g insert \gamma. Normally right after \gamma if I would like to ...
2
votes
1answer
86 views

Taking action depending on the presence of particular message in the echo area

I have my proper function to run latex, say my-tex. Sometimes one should run latex two times to get references right. A message like below in the echo area appears to tell this. How to identify ...
2
votes
2answers
195 views

Org-mode \ang from siunitx is overruled by the \angle symbol on pdf export

I'm trying to use the package siunitx to format my scientific notations/values more nicely, but I can't get one thing to work, possibly due to my pdf-process. I type in my orgfile something like this:...
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
2answers
841 views

Org mode export to Latex: #+CAPTION: not working as plantUML inserts \includegraphics

How to disable plantUML inserting the images automatically? Code block inside a org file: #+NAME: fig:1 #+CAPTION: IETF-draft [[./draft.png]] #+begin_src plantuml :file draft.png Alice -> Bob: ...
2
votes
1answer
458 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
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 ...
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
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
1answer
219 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....
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)? ...
2
votes
1answer
55 views

AUCTeX fontification for any command: overkill?

Reading the AUCTeX manual I see that it is possible to add expressions to those one wants to highlight in a .tex file. There are also many specific suggestions around for how to add specific commands ...
2
votes
1answer
65 views

Yasnippets: How to add if statements that check for regex?

I would like to replicate some of the snippets shown in this blog post Some of the snippets shown in that post involved if statements that check for regexp in snippet fields as well as checking for ...
2
votes
1answer
232 views

Manual indentation in LaTeX mode

I'm new to Emacs, and dislike the default indentation in LaTeX mode. I want the indentation to do the following: insert a \t character (not spaces) be completely manual (I want to have to press Tab ...
2
votes
1answer
652 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 ...
2
votes
1answer
84 views

How can I navigate through errors after compilation in `latex-mode`?

What I mean by debugging is the ability to navigate through errors after compilation. I read that this can be done in AUCTeX with the command C-c [backtick]. I was wondering if there was a similar ...
2
votes
1answer
91 views

Custom ID is rendered in LaTex with org mode

I'm a noob in Emacs org mode. I convert a note of my friend's from .lyx to .tex with lyx then I use pandoc to convert it into .org. As default under heading I find: :PROPERTIES: :CUSTOM_ID: title-of-...
2
votes
1answer
406 views

org-mode XeLaTeX export to pdf: define font color for different structure levels

I would like to set the colors for a pdf export of an org-mode file based on the structural elements. That is something like * This Headline Should Be Blue ** This subheadline should be green - ...
2
votes
1answer
1k views

Defining custom latex class for org-mode export

I an trying to define a custom latex class, I will use it to export my org files to PDF. I found information about this on internet and I tried to implement the proposed solution, I wrote this in my ....

1
3 4
5
6 7
12