Hot answers tagged

7 votes

Inserting unicode symbol for rational numbers ℚ using TeX input method

The character set used is in the ISO 10646 encoding, which includes the following double stroked letters C H N P Q R Z and no others. Unfortunately the TeX input method only defines shortcuts for ...
Andrew Swann's user avatar
  • 3,456
6 votes
Accepted

Looking for a way to have LaTeX source code and its real-time rendering in side-by-side Emacs windows

latex-preview-pane on melpa can do that. You can enable it in a file being edited with AUCTeX by M-x latex-preview-pane RET or for any LaTeX file opened in this mode by placing (add-hook 'LaTeX-mode-...
gigiair's user avatar
  • 2,134
5 votes
Accepted

Search and replace TeX \over with LaTeX \frac

The command my-replace-over-with-frac defined in the following Elisp code assumes that \over arguments are always delimited by braces. There are more constructs that limit the arguments of \over like ...
Tobias's user avatar
  • 32.8k
4 votes

How to convert the emacs manual to org format?

Download the Emacs source from a GNU mirror and unpack it with tar xf. Run makeinfo --docbook doc/emacs/emacs.texi -o emacs.docbook to create an intermediate DocBook. Run pandoc --from docbook --to ...
Zeta's user avatar
  • 1,065
3 votes

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

One problem is the syntax: the value is a string so you need to say so by surrounding it with double quotes. However I could not get this to work with the latex-run-command variable. However tex-...
NickD's user avatar
  • 28.1k
3 votes

How to type superscript Roman numeral in Emacs, e.g., by using TeX input method?

Apparently, you are asking for a way to insert a superscript Roman numerals as raw text. Let's first find out whether such characters exist. Note that not all characters have a superscript or ...
rdrg109's user avatar
  • 408
3 votes
Accepted

AUCTeX: only use monospace for rendering macros?

You can make the face used for math and the so-called sedate face used for macro names inherit from fixed-pitch, and activate variable-pitch-mode in the LaTeX mode hook: (set-face-attribute 'font-...
Omar's user avatar
  • 4,742
2 votes
Accepted

How to convert the emacs manual to org format?

...only keep what's important to remember... This doesn't answer your question directly, but it suggests some alternatives you might want to consider. If you use library Info+ then you can easily ...
Drew's user avatar
  • 76.3k
2 votes

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

OK, so here is what I have done that seems to have resolved the issue. Let me add the disclaimer that I tried a lot of things, so it is possible that I did something else that affected the outcome, ...
Sándor Kovács's user avatar
2 votes
Accepted

LaTeX-environment inserts unwanted empty line

You can try the following lisp code. Put it into your init file and restart emacs. The function auctex+-insert-environment-avoid-empty-line kills the emtpy line after \end{...} if there is one. (...
Tobias's user avatar
  • 32.8k
2 votes
Accepted

Switching » and « in tex-mode

Setting the variable font-latex-quotes to the symbol german should do the trick (unless this is too new for your emacs). The standard value, auto, should work too, however, if the document language ...
Harald Hanche-Olsen's user avatar
2 votes
Accepted

Compile Latex without Saving, and without Query

The following advice makes TeX-check-files believe that no buffer is modified in TeX-command-master: (defun ad-TeX-command-master-wo-check (fun &rest args) "Deactivates `buffer-modified-p` in `...
Tobias's user avatar
  • 32.8k
2 votes
Accepted

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

I had a similar problem with AUCTeX and fic-mode. It's caused by the style-hooks executed by AUCTeX after loading the file. You can enable your minor mode in the TeX-update-style-hook, see. this TeX ...
matteol's user avatar
  • 1,908
2 votes

AUCTeX: only use monospace for rendering macros?

Alternatively, you can use the mixed-pitch-mode package to do precisely this. If you don't like the presets, you can remove/add faces to mixed-pitch-fixed-pitch-faces. For example, if you want to ...
Richard Border's user avatar
2 votes

Tex indentation with TAB

Looks like I somehow managed to switch to Tex mode, instead of LaTex mode. Changing to LaTex mode is easy: M-x latex-mode. Many thanks to @vonbrand for telling me to check the mode!
Yair Daon's user avatar
  • 131
1 vote
Accepted

Switch a TeX \macro and a script on a region of text

Use regexp replacement (M-x replace-regexp or C-M-%) to replace a pattern with holes. Assuming that foo and bar do not themselves contain braces or line breaks, replace \\macro{\(.*?\)}_{\(.*?\)} by \\...
Gilles 'SO- stop being evil''s user avatar
1 vote

Don't replace " in LaTeX Mode

You can try setting the following variables, which are defined in tex.el. (setq TeX-open-quote "\"" TeX-close-quote "\"") This allows me to enter " literally ...
Swarnendu Biswas's user avatar
1 vote

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

It turns out that the issue is, as @ArashEsbati suggested, that Emacs is not able to find kpsewhich in GUI. It is a macOS specific issue, as discussed in this problem. We may set the environment PATH ...
1615244's user avatar
  • 23
1 vote

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

The question is: do you want hl-todo-mode to be turned on for every mode that is allowed by hl-todo-include-mode (by default that is prog-mode and text-mode) except for the excluded modes in hl-todo-...
NickD's user avatar
  • 28.1k
1 vote

Add compiling option to tex engine

Add the following line to the list of local variables of the source file: %%% TeX-command-extra-options: "-shell-escape" Then you need to do M-x revert-buffer to make it applied. AUCTeX 12.2: 4.1.3 ...
Ynjxsjmh's user avatar
  • 283
1 vote

How to open a PDF after running tex-file?

you can use the latex-preview-pane-mode included in the auctex package. start it whenever you want to see the pdf generated, and then as you type latex and save it you see in the other pane the result
drizzt13's user avatar
  • 113
1 vote

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

Your Test 1 code has no iteration. It does one search and then terminates. Here is a modification with an iteration: (defun test () (interactive) (save-excursion (goto-char (point-min)) (...
StarBug's user avatar
  • 479
1 vote

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

The documentation does not match the implementation, or the implementation is broken: The variable latex-run-command was changed from "latex" to "pdflatex", but command tex-file (found in latex-mode-...
U. Windl's user avatar
  • 193
1 vote

Search and replace TeX \over with LaTeX \frac

The following code replaces {1 \over {2 \over x^2}} with \frac{1}{\frac{2}{x^2}}. (save-excursion (goto-char (point-min)) (while (re-search-forward "{\\([0-9]*\\)\s\\\\over\s{\\([0-9]*\\...
jagrg's user avatar
  • 3,854
1 vote
Accepted

typesetting matrix output from maxima using org-mode

I found the following comment about loading the maxima package mactex-utilities on http://maxima-discuss.narkive.com/fenby68e/export-tex-format Post by Paul RIVIER I take this opportunity ...
Tobias's user avatar
  • 32.8k
1 vote

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

By typing C-c ? you can activate the CDLaTeX Help, in which you will see TEXT/MATH, TEXT/, or MATH. This means that the function or abbreviation can only activated in the text mode, math mode or both ...
dragon's user avatar
  • 23
1 vote
Accepted

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

I found a solution to my problem here: https://stackoverflow.com/questions/23021875/wait-on-shell-command-to-finish-before-executing-another-elisp-command I resolved by using: (call-process-shell-...
Gabriele Nicolardi's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible