2

By preview-latex on can render latex formulae inside a tex buffer. The package px package renders latex formular inside an arbitrary buffer (see https://emacs.stackexchange.com/a/219/).

A similar question: How to render latex expressions (not necessarily formulae) inside buffer? For example to render something like \textbf{some text...}.

Name
  • 7,689
  • 4
  • 38
  • 84
  • Turn on tex macros. – Dan Jul 20 '15 at 22:30
  • @Dan How to turn tex macro? I tried `(add-hook 'LaTeX-mode-hook 'turn-on-tex-macros)` with no effect. – Name Jul 21 '15 at 05:22
  • Am away from my computer for a few days so can't check myself, but look in the auctex manual. – Dan Jul 21 '15 at 10:54
  • 1
    @Dan Thanks. I found it! Putting `(require 'tex-fold) (add-hook 'LaTeX-mode-hook 'TeX-fold-mode) ` in .emacs then `M-x TeX-fold-buffer` can do what I was looking for. (Note the command is `M-x TeX-fold-buffer` not `M-x tex-fold-buffer`). – Name Jul 22 '15 at 09:14
  • Great! Go ahead and post that as the answer. – Dan Jul 22 '15 at 10:27

1 Answers1

1

Putting

(require 'tex-fold) 
(add-hook 'LaTeX-mode-hook 'TeX-fold-mode) 

in .emacs then M-x TeX-fold-buffer (or the shortcut C-c C-o C-b) can do what I was looking for.

Name
  • 7,689
  • 4
  • 38
  • 84