ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Hans Hagen <j.hagen@freedom.nl>
Subject: [NTG-context] Re: # verbatim typesetting
Date: Thu, 7 Sep 2023 19:34:58 +0200	[thread overview]
Message-ID: <d94acb69-f18f-45df-1107-981275ae452b@freedom.nl> (raw)
In-Reply-To: <CAK9ODgTX+yMwrHv+J5V_Tv3U8J_Pzi+9Kye7gTmxq-RvgVguOg@mail.gmail.com>

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
___________________________________________________________________________________

  reply	other threads:[~2023-09-07 17:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07 12:47 [NTG-context] " Marcus Vinicius Mesquita
2023-09-07 17:34 ` Hans Hagen via ntg-context [this message]
2023-09-07 18:16   ` [NTG-context] " Marcus Vinicius Mesquita

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d94acb69-f18f-45df-1107-981275ae452b@freedom.nl \
    --to=ntg-context@ntg.nl \
    --cc=j.hagen@freedom.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).