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: dimen 100.0pt not 100.0pt?
Date: Mon, 10 Jun 2024 16:38:00 +0200	[thread overview]
Message-ID: <3c30310b-9fee-4bc9-8c51-e3f54c8e899e@freedom.nl> (raw)
In-Reply-To: <9A5FEABB-7506-4C51-98B4-7CDBE32FCCC2@ziggo.nl>

On 6/10/2024 3:46 PM, Hans van der Meer via ntg-context wrote:
> The I do not understand. I am testing if a dimension set can be checked 
> against the expected value.
> It looks like 100.0pt is not really 100.0pt. Why? And how can I do this 
> test properly with true as result?
> 
> \scratchdimen=100pt\relax
> \iftok{\the\scratchdimen}{100.0pt}true\else false\fi
> Screenshot 2024-06-10 at 15.37.32.png
> 
> printing \the\scratchdimen results in 100.0pt
> 
> while \meaning\scratchdimen results in: constant dimension 100.0pt

It has to do with catcodes (of p and t) so you need this:

\iftok{\the\scratchdimen}{\detokenize{100.0pt}}true\else false\fi

But ... you should do it the way Wolfgang pointer out

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

      parent reply	other threads:[~2024-06-10 14:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-10 13:46 [NTG-context] " Hans van der Meer via ntg-context
2024-06-10 13:58 ` [NTG-context] " Wolfgang Schuster
2024-06-10 14:38 ` Hans Hagen via ntg-context [this message]

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=3c30310b-9fee-4bc9-8c51-e3f54c8e899e@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).