# Tag Info

12

Just type latex instead of pdflatex at the C-c C-c prompt. TeX-PDF-mode sets the TeX-engine to pdflatex automatically. The command you are entering at the prompt is only representative of what you want emacs to do i.e compile with latex, view the pdf file with view and so on. The actual commands the prompt can accept is given in the variable TeX-command-list....

9

I've tried to re-use AUCTeX preview-latex but failed and gave up. Org-mode also provide the same feature. Turns out weechat managed to re-use it to automatically show latex preview. I've extracted the preview part from weechat in a separate file which you can get on this repo. It's also available as the px package on MELPA (I've just submited it). There ...

7

It's possible: (setq LaTeX-begin-regexp "\$$?:begin\\|if@\$$\\b") (setq LaTeX-end-regexp "\$$?:end\\|else\\|fi\$$\\b") (defun LaTeX-indent-level-count () "Count indentation change caused by all \\left, \\right, \\begin, and \\end commands in the current line." (save-excursion (save-restriction (let ((count 0)) (narrow-to-region (point) ...

5

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 N P R Z as describe-input-encoding will tell you. However, How can I add characters to an input method? shows you how to add extra sequences to this input ...

3

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 $a \over b$ $c \over d$ or $\matrix{ a \over b & c \over d }$. In each of those cases a \over b and c \over d are rendered as separate fractions. If ...

3

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 org --out emacs.org emacs.docbook to create your org file. Note that you really should add the document types explicitly, at least for the input type. Otherwise ...

3

Thanks to wvxvw's comment, I can answer my own (main) question: in order to convert a TeX-encoded file, say foo.tex, into an UTF-8 encoded one, it is enough to run (no need to open the file in emacs): emacs -batch foo.tex -f mark-whole-buffer -f iso-tex2iso -f save-buffer -kill

2

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. (defun auctex+-insert-environment-avoid-empty-line (_name _start end) "Avoid insertion of empty line after environment." (save-excursion (goto-char end) ...

2

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 can be somehow inferred automatically. See the doc string for font-latex-quotes. For example, put this after \end{document}: Local Variables: font-latex-quotes: ...

2

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 TeX-check-files'." (cl-letf* ((old-TeX-check-files (symbol-function 'TeX-check-files)) ((symbol-function 'TeX-check-files) (...

1

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)) (while (re-search-forward (rx (group (or "\\GL" "\\SL" "\\SO"))) nil t nil) (setq gstring (match-string 1)) ;; this is group with backslash (setq ...

1

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]*\$$\s\\\\over\s\$$[^}]*\$$}}" nil t) (replace-match "\\\\frac{\\1}{\\\\frac{\\2}{\\3}}")))

1

...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 create a virtual manual of nodes you want "save". In Info mode: . (Info-save-current-node) adds the name of the current node to the list value of option Info-...

1

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, but is not listed here, but I am trying to include all the relevant steps. All of this is for emacs 26.1 2) was the easier, including the line (add-hook 'TeX-...

1

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 to ask you if there is a work in progress to include a latex export as well. I don't know of anybody that is working on this. To generate LaTeX ...

1

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 of them of latex. Insert the desired command between  to activate it. This is pretty much a LaTeX problem than an Emacs problem.

1

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-command (concat "latex " (buffer-file-name)) nil nil) that does almost the same and that doesn't use sentinels.

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