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.

0
votes
1answer
56 views

org-babel uses wrong directory during execution of source blocks (org-compile-file error)

I'm experiencing a strange error when trying to execute/compile a LaTeX source block in org-babel. A simple example looks like this: #+NAME: latex1802142321 #+BEGIN_SRC latex :results raw :file ...
3
votes
0answers
393 views

orgmode image export side by side to both latex and html

In org export, I want to place two images side by side. I want them to be side by side in both LaTeX export and HTML export. In the example below, the first pair works for LaTeX and the second pair ...
3
votes
1answer
373 views

org Images in LaTeX export set default width

By default these org lines: my image: [[./figure1.png]] are exported into these ones in latex: \includegraphics[width=.9\linewidth]{./figure1.png} How can I change the default value of width \...
0
votes
0answers
74 views

How to specify a color theme specifically for Latex editing (the buffers with .tex files)?

I am using Emacs and there are various 'themes', eg. link to examples, but they do not appear to be dedicated to Latex. Some have modes for Latex, but I am wondering if there are theme files that can ...
0
votes
2answers
109 views

Editing equations as in lyx

I'd like to be able to edit equations as it is done in Lyx, that is, for example, being able to change a sub- or superscript without losing the rendering of the equation (even if it's a mid-low ...
1
vote
1answer
157 views

Yasnippets: loading two major modes (`org-mode` and `LaTeX`)

I'm trying to load the yasnippets for the LaTeX mode every time I open an org file. Is it possible? How can this be achieved?
2
votes
1answer
48 views

How to customize face when use 'org-edit-latex-environment?

When use org-edit-latex-environment(which opens another buffer so latex source code can be edited in more sophiscated environment, e.g. LaTeX) in org-mode, the source block will be highlight as yellow ...
0
votes
0answers
77 views

Equations in org-reveal presentation

I've installed reveal.js and org-reveal, and they are working as expected. Even, I'm getting the equations! However, the point with the equations is the following: If I introduce directly the LaTeX ...
2
votes
0answers
63 views

org-latex-fragment gets cutoff

I use dvisvgm to generate latex fragments. However, some of my equations seem to be cut off. One example is below The svg file generated does not have the cutoff but the image as displayed in emacs ...
6
votes
1answer
111 views

Close latex compilation window when successful

I like having TeX-show-compilation in LaTeX for large documents. However, if the compilation completed successfully, I would like the windows to be reverted or the compilation buffer to be killed. I ...
1
vote
0answers
99 views

`<dead-grave> is undefined`

for a few month, I use Emacs for Latex, and I am French. today (for the first time) when I use C-c ` to see my errors, Emacs answers <dead-grave> is undefined I try to add in my .emacs (...
1
vote
1answer
79 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 ...
0
votes
1answer
66 views

Why can't I bind tab to multiple spaces? [duplicate]

I'm trying to bind tab to either a tab or multiple spaces in Latex/ESS-noweb mode but I can't get it to work. I tried (local-set-key (kbd "<tab>") 'self-insert-command) which didn't work, and ...
4
votes
4answers
873 views

org-mode ignore heading when exporting to latex

I have a problem where I want to structure my document visually with a heading but do not want it to actually execute a \section{Fake Heading} for the latex export. I imagine this would be ...
0
votes
1answer
76 views

Use picinpar instead of wrapfigure for LaTeX-export

Org-mode exports to wrapfigure with ATTR_LATEX: :float wrap. https://tex.stackexchange.com/questions/47674/wrapfig-positioning-footer-is-overlapping-figure?noredirect=1&lq=1 recommends to use ...
0
votes
1answer
69 views

opening brace alignment/indentation problem in LaTeX mode

I have an alignment/indentation problem in LaTeX mode. Every time I begin a line with an opening brace and I hit <TAB> or run an indentation command on the region, the brace becomes aligned with ...
0
votes
1answer
42 views

Searching for space in LaTeX mode

In Emacs 25.3 (but not 22.3, for example), the search string " " (space) in LaTeX mode is matched by the carriage return character as well as the space character. I can understand why Emacs has been ...
1
vote
2answers
343 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} ...
1
vote
1answer
134 views

How to separate normal text from the frame block?

I just want to make the text appear separate from the above frame box in beamer export C-c C-e l O as in the MWE below. MWE: #+TITLE: Frame or Text? #+AUTHOR: Casual Author #+DATE: #+OPTIONS: H:2 ...
1
vote
1answer
133 views

What is the easiest way to detect if an `\includegraphics{*.eps}` has been used in a `TeX` document?

What is the easiest way to detect if one has used an \includegraphics{*.eps} in a tex document? (motivation: When I have used this I would like to not use pdflatex and instead use the combination of ...
2
votes
2answers
193 views

Replacing string in a region and conditional replace

My goal is to write a simple function that can do the following: Staring with an expression that looks like $$ x = y $$ $$ y = z $$ $$ z = x $$ (There can more lines of such equations) I want to ...
1
vote
0answers
159 views

Cleanup org-mode export intermediary directories

I am trying to delete extraneous files and directories generated during the export of a latex file from orgmode. I followed the instructions in a similarly named stackexchange post to delete extra ...
2
votes
1answer
831 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
vote
1answer
109 views

Basic AUCTeX Setup Issue in macOS and Linux

I'm trying to get AUCTeX up and running in macOS and linux and have followed the steps here. (The site has a separate guide for GNU/Linux.) My problem remains invariant between OSes, so I'm asking ...
7
votes
4answers
345 views

How to replace matching parentheses?

I write (and rewrite) a lot of mathematical formulas in LaTeX with Emacs. I frequently run into situations where I want to change a pair of matching parentheses, to improve readability. My Emacs is ...
1
vote
1answer
220 views

LaTeX tags autocomplete in org-mode

Absolute beginner with Emacs and Emacs Lisp. I am using spacemacs and have been trying to get autocompletion of matching delimiters commonly used in LaTeX in Org-mode. My requirements are just ...
1
vote
1answer
40 views

Switching » and « in tex-mode

In tex-mode, the font lock mechanism treats characters between « and » as quoted text. This is fine for French and Norwegian, which use the quotation marks «thus». But in German and Danish the ...
3
votes
0answers
61 views

Is org-mode compatible with Plain TeX?

Being an old timer used to Plain TeX, I'd like to be able to add Plain TeX portions to an org-mode file and have them be nicely displayed when exported. Is it possible to configure org-mode for this ...
6
votes
1answer
98 views

Don't complain about unmatching parenthesis and brackets in latex math mode

In mathematical notation, parenthesis and brackets have overloaded meaning, and when it comes to represent intervals, the parenthesis/brackets don't have to match. For example, (1, 2] means an ...
2
votes
1answer
270 views

org-mode setting to preserve spacing in SRC code, with verbatim latex output to pdf

Like this post, when I indent within a SRC code block in org-mode, 8 consecutive spaces are converted to a tab. Moreover, when I export to LaTeX 8 consecutive spaces are converted to tabs in the ...
1
vote
1answer
108 views

outline mode: Fold everything when loading file (specifically LaTeX mode)

I am using outline minor mode for LaTeX mode and would like emacs to automatically hide all section environments when opening a .tex file. How could I do that?
1
vote
0answers
43 views

AUCTeX folding: don't display error

Here is a common beamer slide: \begin{frame} \frametitle{Test} \begin{itemize} \item \textbf<1>{Item one} \item \textbf<2>{Item two} \end{itemize} \end{frame} This is what it ...
0
votes
1answer
96 views

AUCTeX set LaTeX-default-tabular-environment back to “tabular”

When I use the package tabularx in a tex file, if I insert table environment, the inner environment will be given as tabularx instead of tabular when the package tabularx is not used. Normally this ...
0
votes
0answers
189 views

Displaying Org file equations on Github

The latex equations i write in org files are not correctly displayed in the github webpage. I tried \begin{equation} .. \end{equation} , $$ .. $$,\( ..)\ None of them are displaying the equations. ...
3
votes
0answers
367 views

Exporting Org in Landsacpe

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 ...
1
vote
1answer
114 views

OrgMode, Is it possible to group options and pass them to LaTeX listings?

I have got an Org buffer like #+LaTeX_CLASS_OPTIONS: [a4paper] #+LATEX_HEADER: \usepackage{listings} * How to group ATTR_LATEX options? #+ATTR_LATEX: :options language=bash,basicstyle=\small\ttfamily,...
1
vote
2answers
600 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" #+...
4
votes
1answer
435 views

How to define LaTeX document class for org-mode export (other than default)?

I want to add to org-latex-classes new class, namely "exam" (as described here: https://www.sharelatex.com/templates/exams/exam), here's a preview of an example document beginning: \documentclass[...
2
votes
1answer
29 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 ...
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 ...
2
votes
0answers
37 views

Remove surrounding markup when prettifying symbols

Is there any way to get Emacs to hide surrounding markup when prettifying? That's a feature I really miss from Vim. For example, when editing LaTeX in Vim, the conceal feature can be made to replace ...
3
votes
1answer
228 views

Org Mode and cdlatex

I am trying to use org mode to take notes in my math classes. It is awesome that org mode is integrated with LaTeX and partially with cdlatex. However, in a pure math class, the board is covered with ...
1
vote
1answer
176 views

Font lock of inline code in org-mode?

When using org-mode as a front-end to LaTeX, I'm making heavy use of inline code like @@latex:\textit{something italic}@@. Right now, this is mainly displayed as normal text (with proportional font ...
1
vote
1answer
215 views

Is there a simple way to create a custom LaTeX environment template?

I'm writing lots of LaTeX beamer slides with AUCTeX. Each slide starts as follows: \begin{frame} \frametitle{\secname} \framesubtitle{\subsecname} \end{frame} Is there a simple way to bind this ...
3
votes
1answer
94 views

disable strange comment behavior in AUCTeX

When I have a commented line in my TeX file, eg some text that is not commented |%% here is a comment followed by more uncommented text (the | represents point), and I hit RET, point is moved past ...
2
votes
1answer
105 views

Org-mode Table, No export Latex column

Is there a way to have a column of a table not export, specifically in latex? I want to have an extra column for personal notes but when I export I don't want the table there.
2
votes
0answers
72 views

AUCTeX auto parse class file in same directory as TeX file

I have a class file hmcpset.cls which defines some macros and environments. If I have it in the same directory as a TeX file, which uses \documentclass{hmcpset}, I would like AUCTeX to parse the ...
3
votes
1answer
244 views

How to change the appearance of list bullets in LaTeX/beamer exports?

It's very neat that simple org-mode lists get exported to itemize (or enumerate) environments in LaTeX. Yet I would like also to be able to change the face of an \item bullet using square brackets, as ...
1
vote
1answer
213 views

Nested smart quotes in org-mode

I have found that the smart-quotes option of org-mode does not export properly the quotes when they are nested (single quotes inside double quotes), but only when they coincide at the start or the end ...
1
vote
0answers
34 views

Tab or auto completion of command while editing a .tex file

Seeing if there is a way for auto or tab complete specifically while editing a .tex file. For example \text.... (tab or autocomplete) in some editors will allow you to quickly choose from '\textbf'...