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
2 views

itemize shortcut environment in emacs

I know that M-RET creates a \item in emacs (latex mode) even if there is no \begin{itemize} \end{itemize} around. In the case we are not within such environment I am wondering if it is possible to ...
0
votes
0answers
18 views

I'm having difficulty using Latex preview in org mode

I have GNU Emacs 27.2 on MacOS 11.6. I have MacTex 2021 installed. I have a simple Latex equation in between $ and $. When I do C-C C-X C-L (Latex preview) I get this message: Creating LaTeX preview.....
0
votes
1answer
25 views

reftex does not recognize references even though default bibliography file is defined

reftex-citep does not suggest any possible completions, even though the variable reftex-default-bibliography is set to the correct bibtex file. What else do I need to do to get reftex to detect the ...
0
votes
1answer
19 views

Can I export conf source code in org-mode to aconf in LaTeX/pdf/minted?

Emacs org-mode source-code blocks (between #+begin_src conf and #+end_src) support the conf "language"/style with syntax highlighting, but this is not supported when exporting to LaTeX/pdf, ...
3
votes
1answer
59 views

How to find the matching environment command in tex mode?

A latex environment looks like this: \begin{envName} body \end{envName} Is there a command to jump back-and-forth between matching \begin and \end commands? (One cannot simply use a regex search ...
0
votes
1answer
19 views

When exporting to Latex from Org, how do I stop equations from breaking my paragraphs apart

When working with mathematics in Latex, if I add a percent sign between my previous textb block and my \begin{equation} block, and another percentage sign between my \end{equation} block and my next ...
0
votes
1answer
67 views

Org publish does not load Latex packages

I need the following two packages and I add them to my org file like this, #+LATEX_HEADER: \usepackage{siunitx} #+LATEX_HEADER: \usepackage{cancel} but this does not work. How can I fix this? I tried ...
0
votes
0answers
20 views

How to deal with "No TeX trees available; configure ‘TeX-tree-roots’" error?

When I open a new tex file and hit C-c C-e <RET> to create document environment, the message buffer shows TeX-search-files-by-type: No TeX trees available; configure ‘TeX-tree-roots’. It will ...
0
votes
0answers
23 views

How to highlight certain symbols only inside math environment?

I'd like to have certain math symbols highlighted. I checked AUCTeX manual but there does not seem to be a built-in way to do that. They are not folded forms or anything, but the real glyphs, which I ...
0
votes
1answer
22 views

Avoid `\begin{center}` environment when including external PDF image

By default a code such as this in org-mode [[foo.pdf]] will produce the following code in the exported .tex document \begin{center} \includegraphics[width=.9\linewidth]{foo.pdf} \end{center} How can ...
2
votes
0answers
49 views

Org-mode: custom syntax for smallcaps, like *bold* and /italic/

I use org-mode a lot to export PDFs through LaTeX. How can I define a custom syntax for org-mode to mark small caps—so, for example, ^this^ gets translated to \textsc{this}, the way *this* gets ...
1
vote
1answer
34 views

Key sequence to automatically make math-mode fragments in org-mode?

My hands are getting lazier every day. Is there a key sequence to automatically type \(_\), where _ just denotes the position of my cursor, when I'm in org-mode? (Or \[_\], of course: same question.)
0
votes
0answers
30 views

Alternatives to auctex for font locking latex code

From time to time I experience hard to debug color bleeding in auctex. That leads me to the question if there are any reasonable alternatives to auctex, when it comes to the part of syntax ...
1
vote
0answers
52 views

How can I generate images from LaTeX without using ghostscript/ImageMagick?

My question here is about generating images from LaTeX source blocks in .org files The following source block (edited down to a simple use case) works fine and produces a .pdf, but this does not ...
0
votes
1answer
28 views

Cannot define custom latex class in org-mode [duplicate]

This is the code I tried: (after! ox-latex (add-to-list 'org-latex-classes '("deeparticle" (concat "\\documentclass[11pt]{article}\n" "\\usepackage{...
0
votes
1answer
27 views

Changing the file name of the pdf generated by emacs in Latex/AUCTeX mode

I'm using AUCTeX mode in emacs, and I want the generated pdf (after I run C-c C-c) to be in the parent directory instead of the current one. In other words, I want to be able to change the filename of ...
1
vote
1answer
29 views

How do I Include plain text file org-mode as is for LaTeX export?

I'm using #+INCLUDE: "./file.txt" to organize documents but including files this way is messing with linefeeds on org-mode export to LaTeX/Pdf. Is there a property or attribute that could ...
0
votes
1answer
37 views

(Org-Beamer Exporter) I would like to have a LaTeX snippet inbetween frames

I would like to change the beamer presentation background. To that end, I have to issue the following command between two frames (that is, outside any frame) \usebackgroundtemplate{\includegraphics[...
0
votes
1answer
53 views

(Org) TikZ for exporting both LaTeX and HTML/MathJax

I'm exporting an Org Mode project both to LaTeX and to HTML (with MatJax). Now I need to add a TikZ picture which can be exported nativelly on LaTeX and must be rendered in svg for HTML. Writing the ...
0
votes
1answer
26 views

How to suppress `Type ‘C-c C-l’ to display results of compilation.` after compiling LaTeX file

I am using following solution (https://emacs.stackexchange.com/a/65076/18414) to compile a LaTeX file: (defun my-run-latex () "Save all buffers and run LaTeX on the current master." (...
0
votes
0answers
11 views

org-babel: How do I make tex source blocks show images of the pages produced as their output?

I am thinking of sth like https://xenodium.com/previewing-swiftui-layouts-in-emacs-revisited/ , but for tex source blocks:
1
vote
1answer
54 views

How to search for words separated by arbitrary whitespace?

The question is general, but here's a specific case: In LaTeX source files, it doesn't matter if two words are separated by one space character, multiple space characters, or even a linebreak - in the ...
0
votes
1answer
87 views

Emacs Org mode export to PDF headines become bold

Good day! New emacs user here. I am writing a contract in org mode and exporting it to PDF (assume that currently no latex plugins or settings are applied(in my org file heading) to the document as ...
0
votes
0answers
27 views

How to align blocks of texts in org mode to be export to latex/pdf?

I am trying to create a template for a simple letter. This template would be saved as a snippet and then I will expand it with a keyword,which is easily done with yas-new-snippet. The problem now is ...
0
votes
1answer
59 views

Setting latex compiler

I was happily running emacs with a locally installed texlive in ~/texlive/2021 on manjaro KDE. But I decided to switch to Gnome. So, installed necessary packages, removed the ones I did not need and ...
1
vote
1answer
32 views

bug in the CTAN version of aux-renum.el

Emacs has been my LaTex editor for several years. Along with AucTex, I have been using the label/ref management utility for emacs supplied by aux-renum.el. It's available on the CTAN archive at aux-...
0
votes
0answers
28 views

Is there the possibility of customizing the level names of org-latex-classes?

I tried to export from org to pdf with: (add-to-list 'org-latex-classes '("thesis" "\\documentclass{thesis} [NO-DEFAULT-PACKAGES] [PACKAGES] [EXTRA]&...
3
votes
0answers
73 views

Export an org-mode table to pdf/png image

I've started using org-roam more often recently, and I use LaTeX a lot in my workflow. What I want to do is this: Create a table in an org file with some LaTeX math symbols, using the org-mode table ...
0
votes
1answer
27 views

Export as nested lists instead of (sub)sections with org mode

If I export an org file, like * Item ** Subitem *** Subsubitem and export it to latex it is converted to something like [...] \section{Item} \label{sec:org1a2bb17} \subsection{Subitem} \label{sec:...
1
vote
0answers
42 views

How to perform query-replace excluding LaTeX math?

I have this test code: foo \begin{equation} foo \end{equation} foo $foo$ foo I want to replace "foo" with "bar" everywhere but LaTeX math, so I have written these functions: ...
0
votes
0answers
33 views

Can you use both imagemagick and dvipng for previewing LaTeX in Org Mode?

I need imagemagick for tikz previews, but it's a lot slower than dvipng. When I try to render out all of the previews at once Emacs hangs for quite a while before showing the generated previews, while ...
0
votes
1answer
82 views

Org-mode LaTeX previews image size too large

SOLVED: REMOVE #+SETUPFILE: HEADER. SORRY FOR WASTING YOUR TIME I am having the same issue as described in this Reddit post from a few weeks ago: basically the preview images generated for a given ...
0
votes
0answers
12 views

Tone down the bracket match highlighting in LaTeX mode

The LaTeX highlighting is great, but I don't like the way every bracket pair is highlighted — and in such a garish colour. Any thoughts on how to tone this down a bit?
0
votes
0answers
26 views

Shortcut to toggle Tex and LaTex modes

When I edit .tex files, I sometimes accidentally switch from LaTex mode to Tex mode. I guess I am accidentally hitting some shortcut, but am unable to figure out which one is it. I know I can switch ...
0
votes
0answers
26 views

Custom folding citations in AUCTeX

By default, only \cite is folded by AUCTeX. If you want other citation commands to be folded as well, you have to add them to LaTeX-fold-macro-spec-list manually. For example, with (push '("[nc]&...
0
votes
0answers
37 views

siunitx, org-mode html export with correct equation numbering display

Using org-mode 9.4.6 and emacs 26.3 I am trying to export a org-mode subtree which contains LaTeX code into html. Without any additional configuration, equations and their numbering are displayed ...
0
votes
0answers
34 views

Include LaTeX code blocks from another file to generate a "main" file (similar to using \input{} in .tex)

I have a .org file (say exercises.org) in which I put LaTeX exercises in the form of code blocks. The file looks something like this: #+NAME: ex1 #+BEGIN_EXPORT latex Compute $2\cdot 2$. #+END_EXPORT ...
0
votes
2answers
159 views

Setting a default page margin for org latex export

So far, I have set org-latex-packages-alist to '(("margin=2cm" "geometry")), but if the geometry-package is explicitly loaded in a document, I get a clash. I can use \newgeometry{...
0
votes
1answer
56 views

org mode export to latex a backslash followed by ordinary text

The following org-mode MCE points out a problem when one wants to export a backslash immediately followed by ordinary text (e.g. ~\~foo is exported to \textasciitilde{}$\backslash$~foo where one ...
2
votes
1answer
52 views

Flyspell: Ignore comments in LaTeX-documents

Whenever I run flyspell-buffer (using hunspell) in a LaTeX-document, my comments marked with % are spell-checked aswell, although I don't want them to be spell-checked. The simplest solution (setq ...
0
votes
0answers
12 views

Flyspell won't show suggestions in LaTeX [process ispell not running]

I have decided to use aspell as a spell-checker and installed it via msys2 (Windows). The command flyspell-buffer works without a problem for all file types. The weird thing is, though, that I only ...
0
votes
0answers
58 views

Unable to activate expl3 syntax highlighting for LaTeX mode

I have read that expl3 highlighting is already integrated in AUCTeX (see here), but I haven't been able to make it effective. Being fairly new to emacs, after browsing the web for solutions I still ...
2
votes
1answer
83 views

Display LaTeX-Quotation marks as unicode characters

When quoting in auctex, I use the strings "` and "' to typeset „ and “, respectively. Now, I want emacs to display the corresponding unicode characters to these strings. I've tried it with ...
1
vote
0answers
31 views

Org mode to latex exports themes or templates

Where can i find some good org to latex export templates, for example, i found some good ones for HTML exports see fniessen excellent work here is there any similar projects for org-to-latex export?
1
vote
1answer
165 views

How to add -shell-escape option to latex compile command

Background story: I have to compile my LaTeX document with the -shell-escape command line option because the pgfplots library I am using calls gnuplot. This was necessary to get a plot of a recursive ...
0
votes
0answers
20 views

multiple previews of the same equation

I'm using auctex with texlab as a language server for latex, the problem i have is that i get multiple previews of the same equation my question is how to get only one preview?
3
votes
1answer
49 views

How to automatically accept: Please answer y or n. Process `LaTeX' for document `program' running, kill it? (y or n)

When I save a LaTeX file, I want to compile it as well on the background. In order to achieve it I have done following module: (defun my-run-latex () (interactive) (save-all) (setq TeX-command-...
0
votes
0answers
28 views

Show all (or some) markup in current line in Org-mode

I want to unhide/show all the markup of the line my cursor is on. For example: If the image is in preview mode, when I put my cursor on the line the image is in, I want it to show the full link e.g. [...
1
vote
2answers
127 views

How can I use the physics package in mathjax for org-mode HTML export?

I’m trying to use org-mode to export something as an HTML document, with MathJax equations. I know that MathJax supports the physics package, so it seems like it should be possible to tell emacs to ...
1
vote
1answer
86 views

Tex indentation with TAB

Recently, when editing files in LaTex, upon pressing TAB, I get a huge indentation. Instead, the default behavior used to be to align with respect to previous environment definition. : I start with ...

1
2 3 4 5
14