[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-AUCTeX] 11.83; Wrong intendation and vertical shifting in math
From: |
Frank Küster |
Subject: |
Re: [Bug-AUCTeX] 11.83; Wrong intendation and vertical shifting in math mode display |
Date: |
Tue, 25 Jul 2006 10:44:12 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Ralf Angeli <address@hidden> wrote:
> * Frank Küster (2006-07-24) writes:
>
>> In the following equation code, some things go wrong:
>
> Here is the equation for reference:
>
> P(r) = 2 \int_0^{\pi} \frac{1}{2\pi} d\phi \cdot
> 2 \int_0^{\pi} \frac{1}{2\pi}
> \frac{
> 4 \pi \left(
> \frac{
> r - r_0
> }{
> \cos\theta
> }\right)^2
> }{
> \left(
> \nicefrac{2}{3}\pi \langle r^2\rangle
> \right)^{\nicefrac{3}{2}}
> }
> e^{
> -\frac{
> 3\left(
> \frac{r-r_0}{\cos\theta}
> \right)^2
> }{
> 2\langle r^2\rangle
> }
> }
>
>> - the closing brace for the exponent that is started by `e^{' in the
>> ninth-last line is wrongly indented,
>
> If I hit TAB with point in that line it is indented by two more spaces
> (CVS Emacs, CVS AUCTeX). The resulting position (as shown above)
> looks correct to me.
Oops, I now see that the closing brace is indented one step more - but
not enough, as on your system. But it is even more strange and might
have to do something with tab settings. If I copy the lines from
e^... to the closing brace and yank them in the mail buffer, I get
correct indentation:
e^{
-\frac{
3\left(
\frac{r-r_0}{\cos\theta}
\right)^2
}{
2\langle r^2\rangle
}
}
However, in the TeX buffer it looks like this (now manually adjusted:
e^{
-\frac{
3\left(
\frac{r-r_0}{\cos\theta}
\right)^2
}{
2\langle r^2\rangle
}
}
The only difference to the screenshot is that the last line is indented
only 2 columns too less, not four.
>> and the `-\frac' in the line
>> following `e^{' should be indented by two more places, too.
>
> Why? There is one level of parenthetical grouping which means it is
> indented (compared to indentation of the line before) the amount
> specified in `TeX-brace-indent-level' which is 2 by default. That
> means indentation in the example is correct.
No, in the screenshot as well as in the manually adjusted code above the
e and the minus are in the same column, not indented by 2.
>> - The index zero two lines later looks weird - the underscore is in the
>> middle of the `0' instead near its bottom where it should be
>
> The 0 is displayed as subscript because of the underscore in front of
> it.
Yes, but the underscore which makes it a subscript is higher than the
0's baseline, or the 0 is not shifted downwards enough.
>>> - in the two occurences of `^2' below, the digit is shifted below the
>> baseline instead above.
>
> No, it's not shifted at all compared to the text it appears in. It's
> just made a little bit smaller.
No, look at the screenshot. Or look at
http://www.kuesterei.ch/auctex2.png where I magnified the screenshot,
scrolled it so that the lower border works as a ruler, and took a new
screenshot. You can see that the 2 extends below the baseline of the
word "right" on the left of it.
> The last two peculiarities will not appear in the next version of
> AUCTeX because font locking of subscript and superscript will be
> limited to one level.
Hm, I think that makes sense. However, I insist that there is a bug in
the placement of these sub- and superscripts, and if the code is not
completely removed, we'd rather find the culprit.
Regards, Frank
--
Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)