ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] # verbatim typesetting
@ 2023-09-07 12:47 Marcus Vinicius Mesquita
  2023-09-07 17:34 ` [NTG-context] " Hans Hagen via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Marcus Vinicius Mesquita @ 2023-09-07 12:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear List,

The MWE below gives a pdf with two #'s instead of only one. Why is that?

\starttext

\startluacode
    context.type("#")
\stopluacode

\stoptext

-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o
corpo nem seus membros, por ser descanso da alma, primavera do
coração, distração do aflito, entretenimento do solitário, e viático
do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: # verbatim typesetting
  2023-09-07 12:47 [NTG-context] # verbatim typesetting Marcus Vinicius Mesquita
@ 2023-09-07 17:34 ` Hans Hagen via ntg-context
  2023-09-07 18:16   ` Marcus Vinicius Mesquita
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen via ntg-context @ 2023-09-07 17:34 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

On 9/7/2023 2:47 PM, Marcus Vinicius Mesquita wrote:
> Dear List,
> 
> The MWE below gives a pdf with two #'s instead of only one. Why is that?
> 
> \starttext
> 
> \startluacode
>      context.type("#")
> \stopluacode
> 
> \stoptext
because by default tex loves to duplicate hashes when it serializes 
token lists

as this seems to be "the month of the duplicate hashes" i looked it what 
we did so far can also work here and i sort of managed although there 
might be more cases (when im done with this we probably "have it the 
other way around" which could mean adapting some code in the tex-lua 
context system that actually depends on duplication or where we work 
around it and no longer need to)

the complication is mostly in moving token lists around, them beign 
serialized and deserialized etc but i guesa at some point we'll get 
there (original tex doesn't really have this problem because there 
serialization hashes will triggere errors in cases where they are not 
permitted anyway)

no upload as i need to test more

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: # verbatim typesetting
  2023-09-07 17:34 ` [NTG-context] " Hans Hagen via ntg-context
@ 2023-09-07 18:16   ` Marcus Vinicius Mesquita
  0 siblings, 0 replies; 3+ messages in thread
From: Marcus Vinicius Mesquita @ 2023-09-07 18:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Hans,

Thank you for your detailed answer. I'll wait then the next upload.

Kind regards

Marcus Vinicius

On Thu, Sep 7, 2023 at 2:36 PM Hans Hagen via ntg-context
<ntg-context@ntg.nl> wrote:
>
> On 9/7/2023 2:47 PM, Marcus Vinicius Mesquita wrote:
> > Dear List,
> >
> > The MWE below gives a pdf with two #'s instead of only one. Why is that?
> >
> > \starttext
> >
> > \startluacode
> >      context.type("#")
> > \stopluacode
> >
> > \stoptext
> because by default tex loves to duplicate hashes when it serializes
> token lists
>
> as this seems to be "the month of the duplicate hashes" i looked it what
> we did so far can also work here and i sort of managed although there
> might be more cases (when im done with this we probably "have it the
> other way around" which could mean adapting some code in the tex-lua
> context system that actually depends on duplication or where we work
> around it and no longer need to)
>
> the complication is mostly in moving token lists around, them beign
> serialized and deserialized etc but i guesa at some point we'll get
> there (original tex doesn't really have this problem because there
> serialization hashes will triggere errors in cases where they are not
> permitted anyway)
>
> no upload as i need to test more
>
> 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 / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : https://contextgarden.net
> ___________________________________________________________________________________



-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o
corpo nem seus membros, por ser descanso da alma, primavera do
coração, distração do aflito, entretenimento do solitário, e viático
do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-07 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-07 12:47 [NTG-context] # verbatim typesetting Marcus Vinicius Mesquita
2023-09-07 17:34 ` [NTG-context] " Hans Hagen via ntg-context
2023-09-07 18:16   ` Marcus Vinicius Mesquita

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).