GNU bug report logs -
#31722
12.1.1; TeX Fold fontification problem
Previous Next
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
Message #8 received at 31722 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.png (image/png, inline)]
[Message part 3 (text/plain, inline)]
Here is the code of the file:
--8<---------------cut here---------------start------------->8---
\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}
--8<---------------cut here---------------end--------------->8---
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'.
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.