GNU bug report logs - #31722
12.1.1; TeX Fold fontification problem

Previous Next

Package: auctex;

Reported by: Marco Falconi <marco.falconi <at> gmail.com>

Date: Tue, 5 Jun 2018 11:54:01 UTC

Severity: normal

Tags: notabug

Found in version 12.1.1

Done: Arash Esbati <arash <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: Marco Falconi <marco.falconi <at> gmail.com>
Cc: 31722 <at> debbugs.gnu.org
Subject: bug#31722: 12.1.1; TeX Fold fontification problem
Date: Mon, 04 Mar 2024 23:39:28 +0100
Arash Esbati <arash <at> gnu.org> writes:

> Marco Falconi <marco.falconi <at> gmail.com> writes:
>
>> I have a custom definition of math macros to be folded. It is the
>> following (taken from .emacs in the customize part, I have set it
>> using customize):
>>
>> '(LaTeX-fold-math-spec-list
>>    (quote
>>     (("[{1}/{2}]"
>>       ("frac" "tfrac"))
>>      ("[{1}⇣{2}]"
>>       ("underset"))
>>      ("[{1}⇡{2}]"
>>       ("overset"))
>>      ("︷[{1}]"
>>       ("underbrace"))
>>      ("√[{1}]"
>>       ("sqrt")))))
>>
>> In the ones with two arguments (frac, tfrac, underset, overset), the
>> first argument gets fontified in the folded string, but the second one
>> is not fontified (in the unfolded string, everything is fontified
>> correctly). This macro for example has such behavior:
>>
>> \underset{\hslash\to 0}{ \longrightarrow}
>>
>> The macros with just one argument are fontified correctly also when folded.
>
> Hi Marco,
>
> I can't reproduce what you're describing.  For me, a minimal .tex file
> looks like this:
>
> x
>
>
> Here is the code of the file:
>
> \documentclass[10pt]{article}
>
> \usepackage{amsmath}
>
> \begin{document}
>
> \begin{verbatim}
> (setq LaTeX-fold-math-spec-list
>       (append '(("[{1}/{2}]"
>                  ("frac" "tfrac"))
>                 ("[{1}⇣{2}]"
>                  ("underset"))
>                 ("[{1}⇡{2}]"
>                  ("overset"))
>                 ("√[{1}]"
>                  ("sqrt")))
>               LaTeX-fold-math-spec-list))
> \end{verbatim}
>
> $\frac{1}{2} \tfrac{1}{2} \overset{1}{2}
> \underset{\hslash\to 0}{ \longrightarrow}
> \sqrt{9}$
>
> \end{document}
>
> What I did was:
> 1) Open a new tex file
> 2) Eval the setq form (put cursor after the last parenthesis and hit
> `C-x C-e'
> 3) Hitting `M-x TeX-fold-mode RET' and `C-c C-o C-b'.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

More information was requested which was not provided.  Therefore I'm
closing this report.

Best, Arash




This bug report was last modified 1 year and 72 days ago.

Previous Next


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