* \asciimode and \type{%%}
@ 2020-06-24 16:33 Wolfgang Schuster
2020-06-24 17:06 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2020-06-24 16:33 UTC (permalink / raw)
To: NTG-Context ConTeXt users
Hi,
when asciimode is enabled the \type command ignores double comment symbols.
\starttext
\quotation{\type{%}}
\quotation{\type{%%}}
\asciimode
\quotation{\type{%}}
\quotation{\type{%%}}
\stoptext
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \asciimode and \type{%%}
2020-06-24 16:33 \asciimode and \type{%%} Wolfgang Schuster
@ 2020-06-24 17:06 ` Hans Hagen
2020-06-24 17:59 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2020-06-24 17:06 UTC (permalink / raw)
To: mailing list for ConTeXt users, Wolfgang Schuster
On 6/24/2020 6:33 PM, Wolfgang Schuster wrote:
> Hi,
>
> when asciimode is enabled the \type command ignores double comment symbols.
>
> \starttext
>
> \quotation{\type{%}}
>
> \quotation{\type{%%}}
>
> \asciimode
>
> \quotation{\type{%}}
>
> \quotation{\type{%%}}
>
> \stoptext
It's actually a feature: in ascimode double % is the comment and content
is preprocessed. originally asciimode was just for math and we still
wanted a way to have comments.
But ... we can have
\unexpanded\def\literalmode{\setcatcodetable\txtcatcodes}
and then:
\starttext
\quotation{\type{%}}
\quotation{\type{%%}}
\literalmode
\quotation{\type{%}}
\quotation{\type{%%}}
test 10% test
\stoptext
I'll add that command, assuming that someone will document it somewhere.
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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \asciimode and \type{%%}
2020-06-24 17:06 ` Hans Hagen
@ 2020-06-24 17:59 ` Wolfgang Schuster
2020-06-24 19:03 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2020-06-24 17:59 UTC (permalink / raw)
To: Hans Hagen; +Cc: mailing list for ConTeXt users
Hans Hagen schrieb am 24.06.2020 um 19:06:
> On 6/24/2020 6:33 PM, Wolfgang Schuster wrote:
>> Hi,
>>
>> when asciimode is enabled the \type command ignores double comment
>> symbols.
>>
>> \starttext
>>
>> \quotation{\type{%}}
>>
>> \quotation{\type{%%}}
>>
>> \asciimode
>>
>> \quotation{\type{%}}
>>
>> \quotation{\type{%%}}
>>
>> \stoptext
>
> It's actually a feature: in ascimode double % is the comment and
> content is preprocessed. originally asciimode was just for math and we
> still wanted a way to have comments.
I can't remember the details when the command was added (I know there
was \nonknuthmode) but in this example it works in a unexpected way (the
% are removed but the following text is kept).
There is no need for \asciimode in my document but I use it sometimes
when I have symbols I don't want to replace.
> But ... we can have
>
> \unexpanded\def\literalmode{\setcatcodetable\txtcatcodes}
>
> and then:
>
> [...]
>
> I'll add that command, assuming that someone will document it somewhere.
Not really needed in this case but I'm going to document it.
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \asciimode and \type{%%}
2020-06-24 17:59 ` Wolfgang Schuster
@ 2020-06-24 19:03 ` Hans Hagen
2020-06-27 7:09 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2020-06-24 19:03 UTC (permalink / raw)
To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users
On 6/24/2020 7:59 PM, Wolfgang Schuster wrote:
> Hans Hagen schrieb am 24.06.2020 um 19:06:
>> On 6/24/2020 6:33 PM, Wolfgang Schuster wrote:
>>> Hi,
>>>
>>> when asciimode is enabled the \type command ignores double comment
>>> symbols.
>>>
>>> \starttext
>>>
>>> \quotation{\type{%}}
>>>
>>> \quotation{\type{%%}}
>>>
>>> \asciimode
>>>
>>> \quotation{\type{%}}
>>>
>>> \quotation{\type{%%}}
>>>
>>> \stoptext
>>
>> It's actually a feature: in ascimode double % is the comment and
>> content is preprocessed. originally asciimode was just for math and we
>> still wanted a way to have comments.
>
> I can't remember the details when the command was added (I know there
> was \nonknuthmode) but in this example it works in a unexpected way (the
> % are removed but the following text is kept).
>
> There is no need for \asciimode in my document but I use it sometimes
> when I have symbols I don't want to replace.
It's a side effect of buffers: each \type ends up in a buffer and that
actually is a file on its own.
>> But ... we can have
>>
>> \unexpanded\def\literalmode{\setcatcodetable\txtcatcodes}
>>
>> and then:
>>
>> [...]
>>
>> I'll add that command, assuming that someone will document it somewhere.
>
> Not really needed in this case but I'm going to document it.
I already bet on that -)
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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \asciimode and \type{%%}
2020-06-24 19:03 ` Hans Hagen
@ 2020-06-27 7:09 ` Wolfgang Schuster
0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2020-06-27 7:09 UTC (permalink / raw)
To: Hans Hagen; +Cc: mailing list for ConTeXt users
Hans Hagen schrieb am 24.06.2020 um 21:03:
>>> But ... we can have
>>>
>>> \unexpanded\def\literalmode{\setcatcodetable\txtcatcodes}
>>>
>>> and then:
>>>
>>> [...]
>>>
>>> I'll add that command, assuming that someone will document it
>>> somewhere.
>>
>> Not really needed in this case but I'm going to document it.
> I already bet on that -)
The command is only in buffer-ver.mkiv but not buff-ver.mkxl.
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-06-27 7:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24 16:33 \asciimode and \type{%%} Wolfgang Schuster
2020-06-24 17:06 ` Hans Hagen
2020-06-24 17:59 ` Wolfgang Schuster
2020-06-24 19:03 ` Hans Hagen
2020-06-27 7:09 ` Wolfgang Schuster
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).