Questions tagged [latex]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

Error when exporting to pdf in org-mode

I get the following error when exporting to pdf directly in org-mode (C-c C-e l o), but conversion using pandoc with the exported tex document (C-c C-e l l) works fine. What went wrong? Latex ...
2
votes
1answer
39 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 ...
4
votes
1answer
60 views

AUCTeX command for Make and View

I sometimes use Makefiles with LaTeX documents, and so I'd like to define a command that does something similar to AUCTeX's C-c C-a (TeX-command-run-all) but using make. I tried creating a function ...
0
votes
1answer
37 views

Org-ref not communicating with Tex-live?

Org-ref cannot tell that I have biblatex-caspervector installed. Is this because of some packages that I missed?
0
votes
0answers
15 views

Compile multiple Rnw files

If we divide our Rnw file into multiple files, is it possible to create the whole document using knitr and LaTeX in Emacs by pressing M-n e on a child file? I guess the process above should be ...
0
votes
0answers
31 views

Preview LaTeX doesn't work when I delete the _region_.prv folder

Suppose I create a latex document in ~/junk/text.tex with the following conent: \documentclass{article} \begin{document} $x$ \end{document} %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% ...
2
votes
1answer
75 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 :...
0
votes
0answers
18 views

How to setup Emacs for live editing of ConTeXt documents?

I haven't found anything on how to set this up, such that latex-preview-pane works as expected, and I also couldn't find how to get the preview-latex working. It's mentioned in online docs but there's ...
0
votes
0answers
43 views

Proper syntax highlighting of $…$ in org-mode

I've put (setq org-highlight-latex-and-related '(latex script entities)) in my emacs config and yet $..$ that contain more than one symbol aren't highlighted properly: How to fix?
1
vote
1answer
48 views

Latex compilation message in the echo area dissapears too soon

The outcome (success/error) of a Latex compilation (TeX-command-run-all) is printed in the echo area. Once you press a key, however, the echo area is cleared and the message is gone. I usually look at ...
1
vote
0answers
49 views

AUCTeX: 'reftex-cleveref-cref' inserts '\eqref' instead of '\cref' for equations

When I run 'reftex-cleveref-cref', which is supposed to insert a '\cref' command in my LaTeX file, I get the expected behaviour for figures and sections, but not for equations: I get the '\eqref' ...
0
votes
1answer
29 views

AUCTeX: Command 'reftex-cleveref-cref' not recognized before 'reftex-reference' is run

I have a strange behavior in AUCTeX with RefTeX: the command 'reftex-reference' (C-c )) needs to be run before the command 'reftex-cleveref-cref' gets recognized, on a newly-started emacs session. In ...
0
votes
0answers
33 views

Auctex doesn't show the preview pictures, while no error output

When using the preview command in the auctex editor on a latex file, no pictures are actually displayed, and no error output in the log. I checked that there does exists the "_region_.pdf" file, ...
0
votes
0answers
32 views

org-mode table/matrix in latex export

I have an issue when exporting a table using *matrix environments. The align string appears in the cell content, whatever it is specified or not #+CAPTION: my matrix #+ATTR_LATEX: :mode displaymath :...
0
votes
0answers
14 views

`(setq org-latex-listings 'minted)` file local

After trying quite a bit I could not find a way to set (setq org-latex-listings 'minted) file local. I tried putting it in a source block and as a file local variable, both did not work. The only ...
0
votes
1answer
20 views

What does it mean in ebib when a field of an entry is preceeded with an asterisk '*'?

When viewing entries in a database in ebib, some fields of some entries are marked with an asterisk (*). In my case, these are usually year or month field. I don't see a rhyme or reason to the types ...
0
votes
1answer
56 views

Org-mode export to PDF not highlighting code blocks

I am trying to use org-mode export through LaTex to get a nice PDF of my documents, but I can't get it to show highlighted code blocks through Pygments. The following is a snapshot of my configuration....
0
votes
0answers
24 views

Is it possible to export R code within Latex code in an org-mode document?

I am trying to evaluate R code within LaTeX code in an org-mode document. The objective is to export the org-mode document to a .tex document and, ultimately, to a nice pdf document. My problem is ...
0
votes
0answers
19 views

How to pass noweb variables to latex blocks

I need to tangle a LaTeχ file from code blocks in an org file. How do I pass variables to the SRC block? In theory I should use :var var1=value, but is there any way to reference var1 in the LaTeχ ...
2
votes
2answers
38 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 ...
0
votes
1answer
28 views

What's the org-mode syntax that tells LaTeX to place a float /here/

My images are floating much more than I'd like. I'd like to force them to be where I tell them to be more like \begin{figure}[!htb] \centering \includegraphics[width=0.75\textwidth, ...
2
votes
1answer
67 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 ...
0
votes
0answers
25 views

How to prevent preview-latex to manipulate and delete the pdf created by latex

Running latex-preview manipulates and then deletes the pdf created by latex. If skim is open as pdf-viewer the pdf gets sliced into the images created by latex-preview. Running latex again doesn't ...
3
votes
0answers
61 views

How to align latex tables when using macro folding

I have a latex table which contains some long commands like includegraphics or href which makes the table very nasty to read. To get a better view I fold all macros in the table and want to use ...
0
votes
1answer
171 views

LaTeX mode: How to select “pdflatex” instead of “latex” for a file automatically?

I have a LaTeX file using lots of PDF figures (mostly because converting figures to EPS is a waste of disk space), so it requires to use pdflatex. I added there lines to the end of my main file: %% ...
1
vote
0answers
174 views

Letter in .org mode

.Org mode is very good in writing the outlined text . I use it routinely. But I have to fall back on wordpad or latex when I have to write a letter. Is there any available templates for letter using ...
5
votes
1answer
357 views

LaTeX closing $ signs makes cursor jump

I'm in LaTeX/PS mode and whenever I close my $ math statements the cursor jumps to the first $ and back to the closing $. How can I disable this?
1
vote
2answers
42 views

Include special (LaTeX) symbols in verbatim/code?

I wonder if it is possible to include special symbols within verbatim delimiters, e.g. =\alpha 6=, although displayed correctly in a prettified buffer, actually exports the literal words \alpha 6 ...
1
vote
0answers
53 views

How to (mostly) get rid of doc-view?

Since I moved to emacs 25 (25.3.2 at the moment) in every context (org-mode, gnus, latex, browsing url, direct access to file) I access pdf-files in emacs, they are displayed in doc-view. I basically ...
0
votes
1answer
33 views

Indentation broken with all \input{files.tex}

Everything is in the title : a master.tex file contains several \input{subfileXX.tex} ; the indentation works in the master file but not in the subfiles. The TAB key acts like in LibreOffice.
4
votes
3answers
76 views

Search and replace TeX \over with LaTeX \frac

I have a source file that was originally coded in TeX (well, this is actually a conTeXt file). A fraction like 1/(2/x^2) is coded as {1 \over {2 \over x^2}}. I'd like to convert to LaTeX syntax, that ...
2
votes
1answer
29 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 ...
1
vote
1answer
45 views

Compile Latex without Saving, and without Query

I know that I can disable the save query that comes after running TeX-run-TeX with LaTeX, TeX or actually probably any other NAME parameter (this is what happens when you invoke TeX-command-master, ...
0
votes
2answers
148 views

Add dotted line in org-mode for export to latex and ODT

I can get the desired result consumable1........................................month/year consumable2........................................month/year consumable3.....................................
2
votes
0answers
67 views

How to Add Document Class to AucTeX

I have a .cls LaTex template I would like to use regularly. Where/how should I save it so that AucTeX is aware of it? How does one set up LaTeX templates in Emacs/Spacemacs in general? I find very few ...
0
votes
1answer
32 views

Org-mode not exporting frames correctly using beamer

I'm writing a presentation using Org-mode and beamer. The problem is that all the frames are putted into a single one. I have the following code: #+TITLE: \textbf{example} #+AUTHOR: \large{sdjfioa} #+...
0
votes
1answer
46 views

texmathp in isearch-filter-predicate breaks query-replace's match highlighting

I tried to use texmathp with iserch-filter-predicate to let query-replace function skipping maths in my LaTeX code. I wrote this code: (defun skip-math (beg end) "Return nil if some text BEG to ...
3
votes
1answer
65 views

Check latex \left \right balance

I've found a function for checking parenthesis/brackets balance. Full code is in the bottom. I wanted to use it to check LaTeX commands like \left(/\right), \[/\] etc. How can I modify this function ...
2
votes
0answers
51 views

Use org-ref to add citations in theorem titles

I am experimenting with writing a manuscript in org-mode and wondering if this is something org-ref can do In org-mode I have #+ATTR_LATEX: :options [Homeslice's Theorem] #+BEGIN_theorem latex blah ...
0
votes
0answers
18 views

Listings' morekeywords attribute doesn't work in Org mode

I have defined a custom listings style in the header of my org mode file: #+LATEX_HEADER: \usepackage{listings} #+LATEX_HEADER: \usepackage{color} #+LATEX_HEADER: \definecolor{codegreen}{rgb}{0,0.6,0}...
0
votes
0answers
50 views

Spacemacs keeps installing and uninstalling auctex-latexmk

Running spacemacs 0.200.13. Everytime I start spacemacs, it either installs auctex-latexmk or deletes it saying that it is an orphan package. Here is some more information: I have latex layer ...
1
vote
0answers
43 views

Add custom parenthesis before and after selection

I use emacs to write latex and I need to enclose a lot of small expression in braces ( \{ and \} for latex) I would like to select the text to enclose and have some command that would add { before the ...
2
votes
1answer
56 views

Org Mode. Set separation length between elements of a list

I have noticed there is a big gap between the elements of a list when exporting to PDF. Is there a way to modify it?
1
vote
2answers
141 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 ...
1
vote
1answer
58 views

comment causes [package error]

I want to export an org file containing a tikz diagram to pdf. I've read the manual. This is the most minimal example I could come up with: #+LATEX_HEADER: \usepackage{tikz} #+begin_src emacs-lisp :...
0
votes
1answer
28 views

How to get error messages for org-preview-latex-fragment?

(This took a long time to research, so I'm answering my own question, hoping to save others some time) Let's say I have a file like this: one by two is $\froc1{2}$ When I run M-x org-preview-latex-...
1
vote
1answer
91 views

Labelling LaTeX sub-equations in org-mode

How to achieve subequation numbering a,b,etc like https://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics#Subordinate_equation_numbering in org-mode. I tried using the LaTeX snippet as it is and ...
0
votes
1answer
65 views

Definitive answer to org-mode export HTML versus LaTeX

I keep being stymied by the apparent incompatibility of HTML and LaTeX export. Here's what I have in my .org file header: #+LATEX_CLASS: article #+LATEX_CLASS_OPTIONS: [american] #+LATEX_HEADER: \...
0
votes
1answer
217 views

Customizing org-latex-title-command to edit title page

I would like to know how to go about editing and understanding org-latex-title-command. So far it is set to \maketitle but the documentation just has this: The command used to insert the title ...
0
votes
0answers
166 views

Org Export Latex: Defining Custom Classes for a Title Page From #+TITLE, etc keywords

I stumbled upon this archived email: https://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01281.html and a suggestion is to create a custom title page that picks up the title, author, and date ...