Questions tagged [tex]

Working with TeX documents

Filter by
Sorted by
Tagged with
14
votes
2answers
2k views

How can I preview TeX formulas inline in arbitrary modes?

How can I get TeX previews inside modes other than AUCTeX or org-mode? I'd love to see TeX equations in jabber, erc and markdown. If I ever switch to Emacs for email, I'd presumably like to see ...
12
votes
1answer
247 views

Auto-Indenting \if statements with AUCTeX

The current AUCTeX behaviour for primitive tex code involving if-like statements is to indent the conditional statement at the same level as the surrounding condition. I.e. code such as \if@...
11
votes
2answers
5k views

How to call pdflatex under TeX-PDF-mode?

I am already in TeX-PDF-mode. When C-c C-c and type in pdflatex, it doesn't run. How can I run pdflatex in TeX-PDF-mode? Note: I don't change my emacs configuration file. Thanks.
5
votes
1answer
250 views

Inserting unicode symbol for rational numbers ℚ using TeX input method

Hello good people of Emacs! To insert unicode math symbols I use TeX input method. This way I get unicode character ℝ by typing \Bbb{R}, ℕ by typing \Bbb{N}, ℤ by typing \Bbb{Z}, etc... I'm unable ...
4
votes
3answers
104 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 ...
3
votes
2answers
154 views

How to convert the emacs manual to org format?

I like to read the Emacs manual on a hard copy but I would like to have a copy in org format to kill parts that I have understood and so to only keep what's important to remember (titles, functions ...
3
votes
1answer
34 views

LaTeX-environment inserts unwanted empty line

When I'm editing a LaTeX document and I'm using C-c C-e for LaTeX-environment, I often get a blank line after the newly-inserted environment. This is never what I want and sometimes even plainly ...
2
votes
2answers
62 views

I have to enable `hl-todo-mode` in LaTeX-mode?

Currenty I am on LaTeX-mode-hook and added following line global-hl-todo-mode into .emacs file to use hl-todo. On its readme it says: To highlight keywords turn on hl-todo-mode in individual ...
2
votes
1answer
86 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
1answer
280 views

Emacs26 — (1) view PDF with Okular; (2) compile TEX file silently

I am running Emacs 26 built with GTK toolkit. AUCTeX has been successfully installed. 1) How to force Emacs to open an Okular session to view the PDF file, instead of opening another window within ...
2
votes
0answers
49 views

Indenting LaTeX code for \if \else \fi statements

This is related to this Emacs.SE question. I use the code from the answer: (setq LaTeX-begin-regexp "\\(?:begin\\|if@\\)\\b") (setq LaTeX-end-regexp "\\(?:end\\|else\\|fi\\)\\b") (defun LaTeX-indent-...
1
vote
2answers
894 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
1answer
73 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, ...
1
vote
1answer
54 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 ...
1
vote
1answer
48 views

Search strings, do a list with first occurences and use elements of that list

I have a LaTeX source, call it main.tex. Suppose it contains one or more of the classical groups, like "GL", "SL", "SO", "U", "SU", "Sp", "USp" or the spin group "Spin". I want to write a script ...
1
vote
1answer
60 views

Wait for (tex-file) to execute before go on with an elisp script

I wrote a script that reads the .aux and .log files after some replacements in the ·tex file (LaTeX). To achieve this i did: (tex-file) (read-string "Wait to tex-file to complete, then press ENTER:") ...
1
vote
1answer
49 views

How to keep keyboard focus on terminal after compiling tex?

My operation system is macOS Catalina. I am using iTerm2 in order to interact with emacs and my default pdf viewer is PDF Pro Reader Light. When a pdf file is updated, PDF Pro Reader Light ...
1
vote
0answers
185 views

Match data clobbered by buffer modification hooks in tex files

I run into the error Match data clobbered by buffer modification hooks when editing tex files. The way to reproduce is as follows. In terminal, cd mkdir tèst/ cd tèst/ touch test.tex echo "\input ./...
1
vote
0answers
118 views

Distinct compile defaults for .tex and .Rnw files

I would like the default compile command for .tex files to be different than the default for .Rnw (knitr) files. Here is a minimal example to illustrate my current .emacs file: (defvar TeX-command-...
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 ...
0
votes
1answer
91 views

How to run iso-tex2iso in batch mode?

Main question: In order spell checkers can apply, M-x iso-tex2iso is nice for converting TeX-encoded files to e.g. UTF-8 encoded ones. But, in case a numerous files to convert, running this command in ...
0
votes
1answer
31 views

Add compiling option to tex engine

I want to use minted package in my tex file. It needs the command-line option --shell-escape to allow external pygmentize program execution. How can I add that option to the tex engine? My related ...
0
votes
1answer
227 views

typesetting matrix output from maxima using org-mode

How can I make org-mode typeset matrices output from maxima? For example, the following code produces tex output that display #+BEGIN_SRC maxima :results raw m: matrix([1, 2], [3, 4]); tex(m); #+...
0
votes
1answer
139 views

fr<TAB> is not inserting \frac{}{} in CDLaTeX

I typed fr<TAB> as is written in the manual but got only a fr and a tab. The \frac{}{} is not correctly inserted and so does sq. Why is this happening?
0
votes
1answer
60 views

How to open a PDF after running tex-file?

I am able to run pdflatex via tex-file, and the PDF generates just fine. How would I go about automatically opening the resultant PDF file after generation?
0
votes
0answers
88 views

TeX-evince-sync-view locking up with this file

This file when I compile it with AUCTeX, and then try to view it, using TeX-evince-sync-view, shows that one page has been compiled, but then shows a blank view. After I kill it, TeX-evince-sync-view ...
0
votes
0answers
225 views

TeX input mode and subscript

I'm a bit lost on what I can use the TeX input mode for. What I'd like to achieve is a mathematical notation like ∑ᵢ₌₁ᴺ ∑ⱼ₌₁ᴹ in pure UTF text and it seems to mostly work, i.e. \sum _ i _ = _ 1 works, ...