bug#25309: 11.89.8; multi-level script fontification stacks incorrectly

2017-01-12 Thread jfbu

Le 12/01/2017 à 20:40, Mosè Giordano a écrit :

2017-01-12 20:08 GMT+01:00 jfbu :

I get the script raising to work fine, but under the condition
of typing explicitely braces, i.e.

\( x^{y^{z^a_b}} \)

does the expected thing from the docs after having set to
multi-level the ‘font-latex-fontify-script’, but the thing
about electric scripts does not seem to work

\( x^y_z \) does not insert the braces while typing
even with

% Local variables:
% TeX-electric-sub-and-superscript: t
% End:


Does the equation "\( x^y_z \)" start at the beginning of the buffer?
`texmathp' cannot recognize math mode \(...\) starting at bob.  In any
other place it should work fine.  If this is not the culprit, please
open a new issue.



Mystery solved. (I had to cook dinner and then I paid my dues
to politicians on TV -- for a short while)

Looking again at your message the `texmathp' rang a bell

(some problem we discussed here months ago, which I have forgotten
now)

turns out I had this setting:

texmathp-search-n-paragraphs is a variable defined in ‘texmathp.el’.
Its value is 0
Original value was 2

setting it back to 2 solves the issue.

Best wishes,

Jean-François






___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#25309: 11.89.8; multi-level script fontification stacks incorrectly

2017-01-12 Thread jfbu

Le 12/01/2017 à 21:43, jfbu a écrit :

(some problem we discussed here months ago, which I have forgotten
now)



the problem was about use in .dtx file which will never have empty
line in the implementation section due to % prefix.

in my dtx, the documentation section has no % prefix (it has I
think in most other people's dtx's) but nevertheless it may happen
that the dtx is very long and this caused problem from inside the
code section (you can not allow empty lines in code sections
because this create \par tokens that may not be important in LaTeX
context if located in preamble, but may be annoying in TeX
contexts where one can \input style file anywhere), hence I had to
set texmathp-search-n-paragraphs to 0.

I would not need it to be 0 in .tex files.

Best,

Jean-François





___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#25309: 11.89.8; multi-level script fontification stacks incorrectly

2017-01-12 Thread jfbu

Le 12 janv. 2017 à 20:40, Mosè Giordano  a écrit :

> 2017-01-12 20:08 GMT+01:00 jfbu :
>> I get the script raising to work fine, but under the condition
>> of typing explicitely braces, i.e.
>> 
>> \( x^{y^{z^a_b}} \)
>> 
>> does the expected thing from the docs after having set to
>> multi-level the ‘font-latex-fontify-script’, but the thing
>> about electric scripts does not seem to work
>> 
>> \( x^y_z \) does not insert the braces while typing
>> even with
>> 
>> % Local variables:
>> % TeX-electric-sub-and-superscript: t
>> % End:
> 
> Does the equation "\( x^y_z \)" start at the beginning of the buffer?
> `texmathp' cannot recognize math mode \(...\) starting at bob.  In any
> other place it should work fine.  If this is not the culprit, please
> open a new issue.
> 

no it did not start at beginning of buffer but was rather
located at its end. I will open a new issue
(a bit later)
after having looked if something in my .emacs setup causes conflict.

may it have something to do with keyboard input? wait.. I usually
type ^ then SPACE then another char ... no typing x^y directly
without hitting the space bar does not change anything
(the ^ is waiting to see if it will be ê, or ô etc...)

all works fine, but this electric thing.

Best,
Jean-François





___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#25309: 11.89.8; multi-level script fontification stacks incorrectly

2017-01-12 Thread Mosè Giordano
2017-01-12 20:08 GMT+01:00 jfbu :
> I get the script raising to work fine, but under the condition
> of typing explicitely braces, i.e.
>
> \( x^{y^{z^a_b}} \)
>
> does the expected thing from the docs after having set to
> multi-level the ‘font-latex-fontify-script’, but the thing
> about electric scripts does not seem to work
>
> \( x^y_z \) does not insert the braces while typing
> even with
>
> % Local variables:
> % TeX-electric-sub-and-superscript: t
> % End:

Does the equation "\( x^y_z \)" start at the beginning of the buffer?
`texmathp' cannot recognize math mode \(...\) starting at bob.  In any
other place it should work fine.  If this is not the culprit, please
open a new issue.

Bye,
Mosè



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#25309: 11.89.8; multi-level script fontification stacks incorrectly

2017-01-12 Thread Mosè Giordano
2017-01-12 20:01 GMT+01:00 jfbu :
> Le 12/01/2017 à 19:57, Mosè Giordano a écrit :
>>
>> 2017-01-12 19:50 GMT+01:00 jfbu :
>>>
>>> Hi Mosè,
>>
>>
>> What is "^" bound to?  Issue
>>
>> C-h k ^
>>
>
> ^ runs the command TeX-insert-sub-or-superscript (found in LaTeX-mode-map),
> which is an interactive compiled Lisp function in ‘tex.el’.
>
> It is bound to _, ^.
>
> (TeX-insert-sub-or-superscript ARG)
>
> Insert typed key ARG times and possibly a pair of braces.
> Brace insertion is only done if point is in a math construct and
> ‘TeX-electric-sub-and-superscript’ has a non-nil value.

Uh, I don't know what's happening here.  Could you please open a new ticket?

> try \input xintexpr.sty\relax\xinttheexpr 2^3^4\relax ;-)

Cool!

Bye,
Mosè



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#25309: 11.89.8; multi-level script fontification stacks incorrectly

2017-01-12 Thread jfbu
I get the script raising to work fine, but under the condition
of typing explicitely braces, i.e. 

\( x^{y^{z^a_b}} \)

does the expected thing from the docs after having set to
multi-level the ‘font-latex-fontify-script’, but the thing
about electric scripts does not seem to work

\( x^y_z \) does not insert the braces while typing
even with 

% Local variables:
% TeX-electric-sub-and-superscript: t
% End:

and reloading the file

Best,

Jean-François


___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#25309: 11.89.8; multi-level script fontification stacks incorrectly

2017-01-12 Thread jfbu

Le 12/01/2017 à 19:57, Mosè Giordano a écrit :

2017-01-12 19:50 GMT+01:00 jfbu :

Hi Mosè,


What is "^" bound to?  Issue

C-h k ^



^ runs the command TeX-insert-sub-or-superscript (found in LaTeX-mode-map),
which is an interactive compiled Lisp function in ‘tex.el’.

It is bound to _, ^.

(TeX-insert-sub-or-superscript ARG)

Insert typed key ARG times and possibly a pair of braces.
Brace insertion is only done if point is in a math construct and
‘TeX-electric-sub-and-superscript’ has a non-nil value.

[back]


Bye,
Mosè

PS: double super- subscripts are not allowed in TeX ;-)



try \input xintexpr.sty\relax\xinttheexpr 2^3^4\relax ;-)



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#25309: 11.89.8; multi-level script fontification stacks incorrectly

2017-01-12 Thread Mosè Giordano
2017-01-12 19:50 GMT+01:00 jfbu :
> Hi Mosè,
>
> thanks but regarding
>
> Le 12/01/2017 à 19:37, Mosè Giordano a écrit :
>>
>> In any case I strongly suggest you to set
>> `TeX-electric-sub-and-superscript' to t, I always find it very useful
>> also for single character script (in that case braces are redundant,
>> of course, but they improve readability, IMHO).
>
>
> it does not work for me (the stuff on top of screenshot was typed
> in after having set the variable, and no braces appeared, did I miss
> something ?)

What is "^" bound to?  Issue

C-h k ^

Bye,
Mosè

PS: double super- subscripts are not allowed in TeX ;-)



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#25309: 11.89.8; multi-level script fontification stacks incorrectly

2017-01-12 Thread jfbu

Hi Mosè,

thanks but regarding

Le 12/01/2017 à 19:37, Mosè Giordano a écrit :

In any case I strongly suggest you to set
`TeX-electric-sub-and-superscript' to t, I always find it very useful
also for single character script (in that case braces are redundant,
of course, but they improve readability, IMHO).


it does not work for me (the stuff on top of screenshot was typed
in after having set the variable, and no braces appeared, did I miss
something ?)

but maybe it is time I read the doc first ... ;-)

best,

Jean-François
___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#25309: 11.89.8; multi-level script fontification stacks incorrectly

2017-01-12 Thread Mosè Giordano
Hi Jean-François,

2017-01-12 8:38 GMT+01:00 jfbu :
> Hi All,
>
> in the attached screenshot with newly released 11.90, one sees
> a feature which I find a bit disturbing: all the subscripts look
> like they have a leading minus sign, where in fact it is the underscore
> character.
>
> Have you discussed that in the thread already ?
> (I read it back then but did not follow all details)
>
> I suppose this is expected result, and as my memory reboots
> on each 24h cycle, it may even have nothing to do with this thread
> and was like this for ages, but I come asking nevertheless.
>
> The foo^{\psi_n} is ok but all foo_{bar} get the underscore aligned
> with exact middle of brace which creates (from a distance and with an
> ageing user) this impression about minus signs everywhere.

Yes, the discussion about this issue started with this message:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25309#127  Indeed the
change of the face of caret and underscore was meant to address this
issue.

In any case I strongly suggest you to set
`TeX-electric-sub-and-superscript' to t, I always find it very useful
also for single character script (in that case braces are redundant,
of course, but they improve readability, IMHO).

Bye,
Mosè



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#25309: 11.89.8; multi-level script fontification stacks incorrectly

2017-01-12 Thread jfbu

Le 12/01/2017 à 08:38, jfbu a écrit :

The foo^{\psi_n} is ok but all foo_{bar} get the underscore aligned
with exact middle of brace which creates (from a distance and with an
ageing user) this impression about minus signs everywhere.



1. my screenshot is possibly dependent on the font, DejaVu Sans Mono


2. by the way with foo_{bar},  having the _ at the main baseline and the
{bar} with its top at the level of the _, which perhaps is not the
thing one would do a priori, looks like a good option to me. Better
than moving deep down the _ so that it looks like _{bar}, and better
(to me) than having as in my screenshot the _{bar} look like -{bar}

is there a way I can configure the Tassilo's variables so that it looks like


A_
  B_
C

sort of ? (with smaller typefaces)

Best,

Jean-François
   





___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex