GNU bug report logs - #77381
[PATCH] extend tex--prettify-symbols-alist

Previous Next

Package: emacs;

Reported by: "Paul D. Nelson" <ultrono <at> gmail.com>

Date: Sun, 30 Mar 2025 11:42:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Arash Esbati <arash <at> gnu.org>
To: "Paul D. Nelson" <ultrono <at> gmail.com>
Cc: 77381 <at> debbugs.gnu.org
Subject: bug#77381: [PATCH] extend tex--prettify-symbols-alist
Date: Mon, 31 Mar 2025 19:58:44 +0200
"Paul D. Nelson" <ultrono <at> gmail.com> writes:

> This patch adds symbols to tex--prettify-symbols-alist.  The new symbols
> include math symbols, accented characters, quotes and fractions.
>
> From 7c9d1dea0e9b4b7b61df3c60b05badca11aa24bc Mon Sep 17 00:00:00 2001
> From: Paul Nelson <ultrono <at> gmail.com>
> Date: Sun, 30 Mar 2025 13:31:58 +0200
> Subject: [PATCH] Extend tex--prettify-symbols-alist
>
> * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Add
> further math symbols, accented characters, quotes and fractions.
> ---
>  lisp/textmodes/tex-mode.el | 183 +++++++++++++++++++++++++++++++++++--
>  1 file changed, 176 insertions(+), 7 deletions(-)
>
> diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
> index ad1d4fa1f88..73f634b7282 100644
> --- a/lisp/textmodes/tex-mode.el
> +++ b/lisp/textmodes/tex-mode.el
> +    ;; Accented characters
> +    ("{\\'a}" . ?á)
> +    ("{\\'e}" . ?é)
> +    ("{\\'i}" . ?í)
> +    ("{\\'o}" . ?ó)
> +    ("{\\'u}" . ?ú)
> +    ("{\\'A}" . ?Á)

Hi Paul,

I suggest to drop this part.  This notation kills kerning (due to
braces) and hyphenation when characters are constructed.  The modern way
is to use a font which contains these chars (e.g., lmodern), set the
buffer encoding to UTF-8 and just enter the char.  UTF-8 is standard for
LaTeX input since April 2018.  I admit, this is LaTeX and not plain TeX,
but `tex--prettify-symbols-alist' deals mostly with LaTeX.

Best, Arash




This bug report was last modified 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.