GNU bug report logs - #25309
11.89.8; multi-level script fontification stacks incorrectly

Previous Next

Package: auctex;

Reported by: Gennady Uraltsev <gennady.uraltsev <at> gmail.com>

Date: Sat, 31 Dec 2016 14:14:01 UTC

Severity: normal

Found in version 11.89.8

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #50 received at 25309 <at> debbugs.gnu.org (full text, mbox):

From: Gennady Uraltsev <gennady.uraltsev <at> gmail.com>
To: Tassilo Horn <tsdh <at> gnu.org>, Uwe Brauer <oub <at> mat.ucm.es>
Cc: 25309 <at> debbugs.gnu.org
Subject: Re: bug#25309: 11.89.8; multi-level script fontification stacks
 incorrectly
Date: Sun, 1 Jan 2017 18:46:38 +0300
[Message part 1 (text/plain, inline)]
Dear Tassilo,

Actually no, the bug appears in all three versions: 24.3 24.4 and 25.1
(current). In the identical manner. You can see the results from the
attached screenshots and the exmaple tex file.

Let me try to explain what I understood of the problem:

The relevant variables with apropriate values are:

font-latex-fontify-script multi-level
font-latex-scipt-display ((raise -0.3) raise 0.3)

and the two faces


Font Latex Superscript Face ((t
  (:height 0.8)))

 Font Latex Subscript Face: ((t
  (:height 0.8)))


What happens is that the font faces always get applied and the compound
(you see the font getting smaller progressively) this is because for
font specifications, specifying a fractional value means taking the
parent font and modifying it by that factor (for hight).


A different behavior happens for
font-latex-scipt-display ((raise -0.3) raise 0.3).
According to manual the first part is relative to subscripts and the
second to superscripts.

Immagine an expression like

base^{u2^{u3_{d1}}}_{d2_{d3^{u4_{d4^{u5}}}}}}

the raising gets applied only if the first consecutive sub or super
script of a series. That means that ^{x} appears raised unless the
containing expression is also a superscript. Similarly lowering a
subscript gets applied only if the containing expression is NOT another
subscript.

In the above example the raising gets applied to u2 u4 u5 and not u3
Lowering (negative raising) gets applied to d1 d2 d4 but not d3

Notice also that the raising gets calculated with respect to the base
line and not the containing level.

Finally the "apparent" going down of the stack
1^{2^{3^{4}}} is due simply to the fact that the font gets smaller

Cheers,

Gena

On 01/01/17 18:28, Tassilo Horn wrote:
> Uwe Brauer <oub <at> mat.ucm.es> writes:
> 
> Hi Uwe & Gennady,
> 
> sadly I'm unable to build emacs 24.3 or 24.4 from the sources and my
> distro doesn't provide binary builds of any emacs version except for the
> current one. :-(
> 
>>    > Some care should be taken! After customizing the variable
>>    > font-latex-fontify-script to value multi-level one should be
>>    > careful to restart fontification (or emacs proper). Otherwise the
>>    > changes doesn't manifest itself.
>>
>> I set it to invisible and confirm what you found out.
> 
> So to be clear: do you say that the feature works for you both with
> emacs 24.3 with the slight complication that you have to toggle
> `font-lock-mode' after setting `font-latex-fontify-script' to
> multi-level or invisible?  If not, what are you doing exactly to get it
> working?
> 
> Bye,
> Tassilo
> 
[Screenshot-Leap42_2-emacs24_3_1.png (image/png, attachment)]
[Screenshot-Leap42_2-emacs25_1.png (image/png, attachment)]
[Screenshot-Ubuntu16_10-emacs24_5.png (image/png, attachment)]
[scripts.tex (text/x-tex, attachment)]
[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 8 years and 187 days ago.

Previous Next


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