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: \inch not doing the expected thing (what I expect, anyway).
Date: Wed, 13 Nov 2024 15:09:30 +0100 [thread overview]
Message-ID: <1319ccfc-2fdb-48f1-829c-8e7b567ee10f@freedom.nl> (raw)
In-Reply-To: <20241113110318.2fbe58b6@homerow>
On 11/13/2024 11:03 AM, Marco Patzer wrote:
> On Mon, 11 Nov 2024 21:30:15 +0100
> Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:
>
>> \unit{2 arcsecond}
>
> Arcseconds might print the correct glyph, but would be semantically
> wrong. I believe the correct approach would be:
>
> \unit{2 inch}
>
> The question then remains how to configure \unit{2 inch} to produce
> (depending on the requirements):
>
> 2 in or
> 2"
After 25 hours of discussion and 18 attempts the math team (whoever that
is) has decided that this is good enough:
\permanent\protected\def\fakeminute
{\dontleavehmode
\begingroup
\doifelseitalic
{\scratchwidth\fontcharwd\font\singlequoteasciicode
\hpack \s!to 1.2\scratchwidth \bgroup
\glyphslant\plustwohundred
\glyph \s!xoffset -0.6\scratchwidth\singlequoteasciicode
\egroup}%
{\scratchwidth\fontcharwd\font\singlequoteasciicode
\hpack \s!to 1.1\scratchwidth \bgroup
\glyphslant\plusfivehundred
\glyph \s!xoffset -\scratchwidth\singlequoteasciicode
\egroup}%
\endgroup}
\permanent\protected\def\fakesecond
{\dontleavehmode
\begingroup
\doifelseitalic
{\scratchwidth\fontcharwd\font\singlequoteasciicode
\hpack \s!to 1.7\scratchwidth \bgroup
\glyphslant\plustwohundred
\glyph \s!xoffset -0.6\scratchwidth\singlequoteasciicode
\glyph \s!xoffset -1.1\scratchwidth\singlequoteasciicode
\egroup}%
{\scratchwidth\fontcharwd\font\singlequoteasciicode
\hpack \s!to 1.6\scratchwidth \bgroup
\glyphslant\plusfivehundred
\glyph \s!xoffset -\scratchwidth\singlequoteasciicode
\glyph \s!xoffset -1.5\scratchwidth\singlequoteasciicode
\egroup}%
\endgroup}
\permanent\protected\def\minute{\iffontchar\font\textminute\textminute\else\fakeminute\fi}
\permanent\protected\def\second{\iffontchar\font\textsecond\textsecond\else\fakesecond\fi}
\aliased\let\inch\second
-----------------------------------------------------------------
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
___________________________________________________________________________________
next prev parent reply other threads:[~2024-11-13 14:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-11 18:34 [NTG-context] " Jim
2024-11-11 20:30 ` [NTG-context] " Wolfgang Schuster
2024-11-11 21:49 ` Jim
2024-11-11 22:36 ` Wolfgang Schuster
2024-11-11 22:50 ` Jim
2024-11-12 6:52 ` Mikael Sundqvist
2024-11-12 14:18 ` Jim
2024-11-13 8:27 ` Hans Hagen
2024-11-13 10:03 ` Marco Patzer
2024-11-13 14:09 ` Hans Hagen via ntg-context [this message]
2024-11-14 19:35 ` Keith McKay
2024-11-15 18:23 ` Jim
2024-11-15 23:50 ` Bruce Horrocks
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=1319ccfc-2fdb-48f1-829c-8e7b567ee10f@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).