[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rainbow-delimiters highlighting { and } for tex and latex
From: |
Arash Esbati |
Subject: |
Re: Rainbow-delimiters highlighting { and } for tex and latex |
Date: |
Fri, 09 Sep 2022 21:36:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 |
Christopher Dimech <dimech@gmx.com> writes:
> For instance, tex-mode and latex-mode do provide a preview tool that uses
> "prettify-symbols".
I don't understand how the sentence above fits to the next one. The
feature "prettify-symbols" is there and working, so what do you want to
change?
> Being able to introduce keywords rapidly (more efficiently than can be
> achieved with text completion) is also valuable for users, currently
> provided by cdlatex. The problem with cdlatex is that it also depends
> upon texmathp which currently forces users to either pick the file and
> add it to their emacs configuration or install auctex. Which
> immediately makes the various CamelCase version of modes and hooks
> come up.
This is admittedly a nuisance: If you want to use the stock tex-mode
with cdlatex and you install AUCTeX via ELPA, AUCTeX will take over.
Maybe the solution is to provide texmathp.el as an ELPA-package without
AUCTeX.
> The cdlatex functionality can be introduced into tex-mode and
> latex-mode. Getting the community to improve it would be highly
> beneficial if the possibilities are included as emacs built-in.
You want to duplicate the code and/or functionality?
> Auctex and Cdlatex could continue seperately, for more exotic features
> like as today.
I can't tell for cdlatex since I've never used it, but I don't consider
many features provided by AUCTeX as exotic.
> For auctex, the recommendation is to reject TeX-mode and LaTeX-mode
> (and related hooks), using instead auctex-tex-mode and
> auctex-latex-mode (and corresponding hooks).
Personally, I think that ship has sailed; one could define some aliases,
but I'm not sure if that is going towards a replacement.
> In summary, the focus is on these things
>
> 1. Improve design of tex-mode and latex-mode such that common structures
> are separated into a "core-file" applicable to both, with some minor
> tweaks in tex-mode and latex-mode if requires.
This is what AUCTeX does with tex.el and plain-tex.el, latex.el,
context.el etc.
> 2. Reevaluate the preview tool that uses prettify-symbols, to see whether
> there exists possibility of improvement by looking how auctex does
> things.
AUCTeX is really dumb in this regard. From tex.el:
;; Prettify Symbols mode
(require 'tex-mode)
(setq-local prettify-symbols-alist tex--prettify-symbols-alist)
(add-function :override (local 'prettify-symbols-compose-predicate)
#'TeX--prettify-symbols-compose-p)
and
(defun TeX--prettify-symbols-compose-p (start end match)
(and (tex--prettify-symbols-compose-p start end match)
(not (let ((face (get-text-property end 'face)))
(if (consp face)
(memq 'font-latex-verbatim-face face)
(eq face 'font-latex-verbatim-face))))))
Best, Arash
- Re: Rainbow-delimiters highlighting { and } for tex and latex, (continued)
- Re: Rainbow-delimiters highlighting { and } for tex and latex, Alessandro Bertulli, 2022/09/08
- Re: Rainbow-delimiters highlighting { and } for tex and latex, Christopher Dimech, 2022/09/08
- Re: Rainbow-delimiters highlighting { and } for tex and latex, Alessandro Bertulli, 2022/09/08
- Re: Rainbow-delimiters highlighting { and } for tex and latex, Christopher Dimech, 2022/09/08
- Re: Rainbow-delimiters highlighting { and } for tex and latex, Alessandro Bertulli, 2022/09/08
- Re: Rainbow-delimiters highlighting { and } for tex and latex, Arash Esbati, 2022/09/09
- Re: Rainbow-delimiters highlighting { and } for tex and latex, Christopher Dimech, 2022/09/09
- Re: Rainbow-delimiters highlighting { and } for tex and latex,
Arash Esbati <=
- Re: Rainbow-delimiters highlighting { and } for tex and latex, Christopher Dimech, 2022/09/09
- Re: Rainbow-delimiters highlighting { and } for tex and latex, Christopher Dimech, 2022/09/09
- Message not available
- Re: Rainbow-delimiters highlighting { and } for tex and latex, wilnerthomas, 2022/09/07
- Re: Rainbow-delimiters highlighting { and } for tex and latex, tomas, 2022/09/07
- Re: Rainbow-delimiters highlighting { and } for tex and latex, wilnerthomas, 2022/09/07
- Re: Rainbow-delimiters highlighting { and } for tex and latex, tomas, 2022/09/07
- Re: Rainbow-delimiters highlighting { and } for tex and latex, Stefan Monnier, 2022/09/07
- Message not available
- Re: Rainbow-delimiters highlighting { and } for tex and latex, wilnerthomas, 2022/09/08