magic-latex-bufferMagical syntax highlighting for LaTeX-mode buffers

联合创作 · 2023-10-02 00:33

magic-latex-buffer.el


Magically enhance LaTeX-mode font-locking for semi-WYSIWYG editing.


LaTeX-mode のシンタックスハイライトを激しく


Screencast



Other examples



  • make it readable a mess of commands


  • highlight decorated blocks (note that nested blocks are also highlighted correctly)


  • align centered/flushed blocks




  • inline image preview powered by iimage-mode

  • fix inline-math highlighting for documents with multi-byte characters


Installation



  1. Install an unicode font supporting many symbols (eg. Symbolas, Unifont, etc).

  2. Put magic-latex-buffer.el into a “load-path”ed directory, and load it in your init file:
    (require 'magic-latex-buffer)


You can activate the magic with M-x magic-latex-buffer in a latex-mode buffer. If you want to activate automatically, add the function to the mode hook.


(add-hook 'latex-mode-hook 'magic-latex-buffer)

Customizations


You can disable some features independently, if they’re too fancy.


(setq magic-latex-enable-block-highlight nil
magic-latex-enable-suscript t
magic-latex-enable-pretty-symbols t
magic-latex-enable-block-align nil
magic-latex-enable-inline-image nil
magic-latex-enable-minibuffer-echo nil)

Known Issues



  • Not perfectly compatible with multiple-cursors (but still usable)

浏览 10
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报