ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: \inch not doing the expected thing (what I expect, anyway).
Date: Wed, 13 Nov 2024 09:27:05 +0100	[thread overview]
Message-ID: <d28573f7-57a6-487d-9e5b-e65880709db4@xs4all.nl> (raw)
In-Reply-To: <CAHy-LL_DMW+OgvbYg8jG3XHwMyn6mrEiGzmwWBF_av2hzkTDHw@mail.gmail.com>

On 11/12/2024 7:52 AM, Mikael Sundqvist wrote:
> Hi,
> 
> On Tue, Nov 12, 2024 at 12:20 AM Jim <zlists+context@jdvb.ca> wrote:
>>
>> On Mon, Nov 11, 2024 at 23:36 (+0100), Wolfgang Schuster wrote:
>>
>>> Jim schrieb am 11.11.2024 um 22:49:
>>>> On Mon, Nov 11, 2024 at 21:30 (+0100), Wolfgang Schuster wrote:
>>
>>>>> Jim schrieb am 11.11.2024 um 19:34:
>>>>>> Hi,
>>>>>>
>>>>>> I would expect (*cough*)
>>>>>>
>>>>>> \starttext
>>>>>> 2\inch
>>>>>> \stoptext
>>>>>>
>>>>>> to output something like
>>>>>>
>>>>>> 2"
>>>>>>
>>>>>> with some appropriate typographic symbols following the 2.  Instead, I get
>>>>>> a 2 with a large prime symbol down lower than a prime symbol should be, and
>>>>>> then a second prime symbol at about the correct size and at about the right
>>>>>> distance up from the baseline.
>>
>>>>> \setupbodyfont[pagella]
>>
>>>>> \starttext
>>
>>>>> \unit{2 arcminute}
>>>>> \unit{2 arcsecond}
>>
>>>>> \blank
>>
>>>>> 2\utfchar{0x2032}
>>>>> 2\utfchar{0x2033}
>>
>>>>> \blank
>>
>>>>> 2′ 2″
>>
>>>>> \stoptext
>>
>>>> Wolfgang,
>>
>>>> thanks very much for that example.
>>
>>>> However, while it does show me how to get the glyph I am looking for, I am
>>>> left wondering whether there is any way to do it without switching my font
>>>> from the default.  (And whether \inch is broken, or whether there is an
>>>> implicit assumption about font characteristics when using that macro.)
>>
>>>> I hate to go to the well too often, but would you care to comment
>>>> specifically about \inch and the default font?
>>
>>>> (If there is some document whose contents would enlighten me about this,
>>>> I'd be happy to get a pointer to it.)
>>
>>
>>> This is a problem for the math team.
>>
>>> The default font "Latin Modern" fakes the symbol with primes but the output
>>> with LMTX is wrong here (old MkIV has the correct symbol) as can be seen
>>> below.
>>
>>> \starttext
>>
>>> % Latin Modern uses \def\inch{\mathematics{\prime\prime}}
>>
>>> 2\m{\prime\prime}
>>
>>> % 2\m{^\doubleprime}
>>
>>> \stoptext
>>
>> Thanks for confirming that there is a problem.
>>
>> Is it safe to assume that this thread will get the attention of the math
>> team, so that they will put the issue on their To-Do list?  If not, I will
>> cheerfully file a bug report (at least if/when I find out where such a
>> report should be sent).
>>
>>                                 Jim
> 
> I will talk to Hans about it. The funny thing is that \m
> {f\prime\prime} works as expected. So, it is puting primes "on
> nothing" that needs to be considered. It seems to work in (many) other

Are inches still used? Anyway, I suppose no mathematician will put a 
prime on nothing.

> fonts, so, we'll have to look at modern and what is special there.

Does this work ?

\permanent\protected\def\inch
   {\iffontchar\font`″″\else
      \mathematics
        {\mathsurround\zeropoint
         \mathatom\mathunspacedcode
         {\strut}″}%
    \fi}


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-11-13  8:31 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 [this message]
2024-11-13 10:03   ` Marco Patzer
2024-11-13 14:09     ` Hans Hagen via ntg-context
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=d28573f7-57a6-487d-9e5b-e65880709db4@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.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).