Skip to content

Latex (Math) highlight is broken when auctex is installed #21

@milanglacier

Description

@milanglacier

two versions of minimal config (one with auctex installed and one without auctex installed)

the first is without auctex installed:

(require 'package)
(setq package-user-dir "~/Downloads/emacs-package-dir")

(setq package-list '(poly-markdown))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)

(unless package-archive-contents
  (package-refresh-contents))

(dolist (package package-list)
  (unless (package-installed-p package)
    (package-install package)))

(setq markdown-enable-math t)
(setq warning-minimum-level :error)

emacs -Q -l minimal-config.el opens the following rmd file: test.md

$$y = \sum_{i=1}^n sin5x^3 + 2$$

the rendering is the following:

Screen Shot 2022-11-23 at 01 32 26

and if with auctex installed:

(require 'package)
(setq package-user-dir "~/Downloads/emacs-package-dir")

(setq package-list '(poly-R poly-markdown ess))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)

(unless package-archive-contents
  (package-refresh-contents))

(dolist (package package-list)
  (unless (package-installed-p package)
    (package-install package)))

(setq markdown-enable-math t)
(setq warning-minimum-level :error)

emacs -Q -l minimal-config.el opens the same file, will see that math (latex) highlight is broken:

Screen Shot 2022-11-23 at 01 33 08

It is clearly that the keyword \sum highlight is broken, and variable pitch for superscript and subscript is also broken
polymode/poly-R#35 these two might be actually the same issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions