Hi, I noticed that in the latest LMTX version, ^^ (with ^ of catcode 7) is no longer interpreted inside csnames. Is this intentional? (Example: \starttext \catcode\circumflexasciicode=\superscriptcatcode% Ensure correct catcodes \show ^^41 % This still works and shows "> the letter A" \show^^41 % This used to be an error "Undefined control sequence \showA", % now show "> The letter A" \show\^^41 % Used to show "> \A=undefined", now shows "> \^=macro:->\enco_handle_accent {^}" % and "! Missing $ inserted" \stoptext ) Best regards, Marcel
On 6/11/2020 4:06 AM, Marcel Fabian Krüger wrote:
Hi,
I noticed that in the latest LMTX version, ^^ (with ^ of catcode 7) is no longer interpreted inside csnames. Is this intentional?
(Example:
\starttext \catcode\circumflexasciicode=\superscriptcatcode% Ensure correct catcodes
\show ^^41 % This still works and shows "> the letter A"
\show^^41 % This used to be an error "Undefined control sequence \showA", % now show "> The letter A"
\show\^^41 % Used to show "> \A=undefined", now shows "> \^=macro:->\enco_handle_accent {^}" % and "! Missing $ inserted" \stoptext
) Indeed that is intentional because in lmtx we disable them (partially). You have to say:
\normalsupmarkmode\zerocount % we use 1 as default in lmtx This is because in lmtx we have native prescript support, as in: $ x^{rt}_{rb}^^{lt}__{lb} $ so, double _ ^ can have a different meaning there. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On Thu, Jun 11, 2020 at 10:07:34AM +0200, Hans Hagen wrote:
On 6/11/2020 4:06 AM, Marcel Fabian Krüger wrote:
Hi,
I noticed that in the latest LMTX version, ^^ (with ^ of catcode 7) is no longer interpreted inside csnames. Is this intentional?
(Example:
\starttext \catcode\circumflexasciicode=\superscriptcatcode% Ensure correct catcodes
\show ^^41 % This still works and shows "> the letter A"
\show^^41 % This used to be an error "Undefined control sequence \showA", % now show "> The letter A"
\show\^^41 % Used to show "> \A=undefined", now shows "> \^=macro:->\enco_handle_accent {^}" % and "! Missing $ inserted" \stoptext
) Indeed that is intentional because in lmtx we disable them (partially). You have to say:
\normalsupmarkmode\zerocount % we use 1 as default in lmtx
Hi, shouldn't \supmarkmode=1 only disable these in math mode? In any case, \normalsupmarkmode\zerocount doesn't make a difference here: \starttext \normalsupmarkmode\zerocount \catcode\circumflexasciicode=\superscriptcatcode% Ensure correct catcodes \show ^^41 % This still works and shows "> the letter A" \show^^41 % This used to be an error "Undefined control sequence \showA", % now show "> The letter A" \show\^^41 % Used to show "> \A=undefined", now shows "> \^=macro:->\enco_handle_accent {^}" % and "! Missing $ inserted" \stoptext shows exactly the same behavior. Best regards, Marcel
This is because in lmtx we have native prescript support, as in:
$ x^{rt}_{rb}^^{lt}__{lb} $
so, double _ ^ can have a different meaning there.
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 6/11/2020 12:24 PM, Marcel Fabian Krüger wrote:
shows exactly the same behavior. Looks like i don't catch the case where a cs is constructed, so i'll add some checking there too (it is tempting to remove all that ^^ stuff).
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On Thu, Jun 11, 2020 at 07:51:56PM +0200, Hans Hagen wrote:
On 6/11/2020 12:24 PM, Marcel Fabian Krüger wrote:
shows exactly the same behavior. Looks like i don't catch the case where a cs is constructed, so i'll add some checking there too (it is tempting to remove all that ^^ stuff).
Thanks. I think "the ^^ stuff" is actually quite useful, especially when debugging international documents. Especially when the glyphs come from a language you are not used to, it is quite nice to just have a hex representation without needing pecial editors and ^^ is the only way to get that without introducing actual changes to behavior. I had another issue with the latest luametatex: The following document: \starttext \def\mymacro#1 bc{} {\mymacro a b bc} \stoptext used to work and lead to no output. But in the new luametatex version, it complains about "! Argument of \mymacro has an extra }" as if it doesn't see the " bc" argument delimiter. Marcel
Hans
On 6/11/2020 10:47 PM, Marcel Fabian Krüger wrote:
The following document:
\starttext \def\mymacro#1 bc{} {\mymacro a b bc} \stoptext
used to work and lead to no output. But in the new luametatex version, it complains about "! Argument of \mymacro has an extra }" as if it doesn't see the " bc" argument delimiter. ah, i see, i forget to update a variable
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hi, thank you for fixing this in the latest version. I found another problem with ^^, this time when followed by hexadecimal digits: \starttext \normalsupmarkmode\zerocount \catcode\circumflexasciicode=\superscriptcatcode% Ensure correct catcodes \let\ß\relax \show\ß % Shows "> \ß=\relax", no surprise here \show\^^df % Should be the same, but actually shows "> \� %=undefined" \show ß % Shows "> the letter ß" \show ^^df % Should be the same, but actually shows "> the character " % and "luatex warning > print: bad string offset" \showthe\numexpr`\ß % Shows "> 223" \showthe\numexpr`\^^df % Gives an error "! Improper alphabetic constant" \stoptext Best regards, Marcel
participants (2)
-
Hans Hagen
-
Marcel Fabian Krüger