* Re: Re[2]: Broken catcodes
[not found] ` <200205271544.RAA15353@lps.univ-lille1.fr>
@ 2002-05-27 16:44 ` Hans Hagen
0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2002-05-27 16:44 UTC (permalink / raw)
Cc: ntg-context
At 05:44 PM 5/27/2002 +0200, you wrote:
>Thanks, it works again now
>(it worked before the change without \unprotect ... \protect though).
then that was a bug (probably a forgotten \protect
>Where can I read about \protect \unprotect in ConTeXt? the mechanism
>looks very different from the \protect I know in LaTeX, I did not try
>to understand this bit of ConTeXt (and many other ;-) up to now...
ah, in context \protect does something like \makeatletter in latex (only in
context ! and ? are also used for protection purposes)
[afaik in latex there is a \protect that has to do with preventing
expansion in toc entries; context does not need this since normally toc
entries are not expand them at all; in context expansion only can be
problematic in tests, which is why some commands are defined with
\unexpanded\def, which actually in etex is equivalent to \protected \def,
which clashes with my own \protected, and (lucky me) \unexpanded is also an
etex primitive with a complete different meaning; lesson: don't confuse
\protect with latex \protect and don't mix up \unexpanded with etex's
\protected]
anyhow, not something for users to bother about
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re[2]: Broken catcodes
2002-05-27 15:27 ` Daniel Flipo
@ 2002-05-27 15:32 ` Hans Hagen
0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2002-05-27 15:32 UTC (permalink / raw)
Cc: Giuseppe Bilotta, ntg-context, Daniel.Flipo
At 05:27 PM 5/27/2002 +0200, Daniel Flipo wrote:
>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>%interface=en output=pdftex
>
>\definepapersize [P6] [\c!breedte=520pt,\c!hoogte=450pt]
>
>\starttext
>Text
>\stoptext
beware \c! is not valid here,
use
\unprotect
\define..
\protetc
instead
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re[2]: Broken catcodes
[not found] ` <pragma@wxs.nl>
@ 2002-05-27 15:27 ` Daniel Flipo
2002-05-27 15:32 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Flipo @ 2002-05-27 15:27 UTC (permalink / raw)
Cc: Giuseppe Bilotta, ntg-context, Daniel.Flipo
Hans Hagen wrote:
« The problem was introduced when adding support for french active : ; etc.
« The reset code was generated under an unprotected regime, so the patch goes
« into lang-spe.tex;
«
« \protect % added
«
« \deactivatelanguagespecific "
« \deactivatelanguagespecific /
« \deactivatelanguagespecific :
« \deactivatelanguagespecific ;
« \deactivatelanguagespecific ?
« \deactivatelanguagespecific !
«
« \unprotect % added
This correction does not seem to be the right one yet :-(
Check this file:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%interface=en output=pdftex
\definepapersize [P6] [\c!breedte=520pt,\c!hoogte=450pt]
\starttext
Text
\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Log file :
! Missing \endcsname inserted.
<to be read again>
\unhbox
\leavevmode ->\unhbox
\voidb@x
\bottomaccent #1#2#3#4#5->\leavevmode
\vtop {\forgetall \baselineskip \zerop...
\dohandleaccent ...acterencoding #1\endcsname {#2}
\else \csname \nocharacter...
<argument> \c !
breedte
\dosetvalue ...!internal!n \ifcsname \k!prefix! #2
\endcsname \let \c!interna...
...
l.3 ...ize [P6] [\c!breedte=520pt,\c!hoogte=450pt]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[In fact the definition of papersize takes place in a module
for presentations I derived from pre-05, but this does not make
any difference]
When I comment out the lines
\protect
\unprotect
in lang-spe.tex and rebuild the format, my files compile again :-)
I am working with the version of ConTeXt that is on the TL7
as of last night (20020527), this correction included...
==========================================================================
Daniel Flipo Courriel : Daniel.Flipo@univ-lille1.fr
UFR de Mathématiques -- Bâtiment M2 Tél : (33/0) 3 20 43 67 75
Université des Sciences et Technologies Fax : (33/0) 3 20 43 67 74
F-59655 Villeneuve d'Ascq Cedex France
==========================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re[2]: Broken catcodes
2002-05-25 21:46 ` Re[2]: " Giuseppe Bilotta
@ 2002-05-26 17:39 ` Hans Hagen
[not found] ` <pragma@wxs.nl>
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2002-05-26 17:39 UTC (permalink / raw)
Cc: ntg-context
At 11:46 PM 5/25/2002 +0200, Giuseppe Bilotta wrote:
>Saturday, May 25, 2002 Hans Hagen wrote:
>
>HH> At 08:14 PM 5/25/2002 +0200, Giuseppe Bilotta wrote:
> >>Hello,
> >>
> >>I'm testing ConTeXt 2002.05.17 and found out that even at
> >>protection-level 0 ! ? and @ have catcode 11 instead of 12. I
> >>wasn't able to see where the messing up occurred, though.
>
>HH> can you test the current version?
>
>Still bugged in 2002.05.24 --to be precise, @ has catcode 12, but
>! and ? have catcode 11.
Well, this one took me a while to uncover (btw, one can trace these things
by setting \protectionthreshold to zero)
The problem was introduced when adding support for french active : ; etc.
The reset code was generated under an unprotected regime, so the patch goes
into lang-spe.tex;
\protect % added
\deactivatelanguagespecific "
\deactivatelanguagespecific /
\deactivatelanguagespecific :
\deactivatelanguagespecific ;
\deactivatelanguagespecific ?
\deactivatelanguagespecific !
\unprotect % added
Hans
========
For Oblomov's eyes only:
I also took the opportunity to extend the protection report code a bit
\def\reportunprotection {\message{<unprotect \protectionstate>}}
\def\reportprotection {\message{<protect \protectionstate>}}
\def\protectionstate
{\the\protectionlevel
\ifcase\protectionthreshold=0\else
:\space
@=\the\catcode`@\space\space
!=\the\catcode`!\space\space
?=\the\catcode`?%
\fi}
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re[2]: Broken catcodes
2002-05-25 20:17 Hans Hagen
@ 2002-05-25 21:46 ` Giuseppe Bilotta
2002-05-26 17:39 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Giuseppe Bilotta @ 2002-05-25 21:46 UTC (permalink / raw)
Cc: ntg-context
Saturday, May 25, 2002 Hans Hagen wrote:
HH> At 08:14 PM 5/25/2002 +0200, Giuseppe Bilotta wrote:
>>Hello,
>>
>>I'm testing ConTeXt 2002.05.17 and found out that even at
>>protection-level 0 ! ? and @ have catcode 11 instead of 12. I
>>wasn't able to see where the messing up occurred, though.
HH> can you test the current version?
Still bugged in 2002.05.24 --to be precise, @ has catcode 12, but
! and ? have catcode 11.
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-05-27 16:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <Your message of "Mon, 27 May 2002 17:32:51 +0200." <5.1.0.14.1.20020527173210.03bb2ea8@server-1>
[not found] ` <200205271544.RAA15353@lps.univ-lille1.fr>
2002-05-27 16:44 ` Re[2]: Broken catcodes Hans Hagen
2002-05-25 20:17 Hans Hagen
2002-05-25 21:46 ` Re[2]: " Giuseppe Bilotta
2002-05-26 17:39 ` Hans Hagen
[not found] ` <pragma@wxs.nl>
2002-05-27 15:27 ` Daniel Flipo
2002-05-27 15:32 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).