ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: Mikael Sundqvist via ntg-context <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@freedom.nl>
Subject: Re: C with macron
Date: Wed, 24 Aug 2022 09:35:49 +0200	[thread overview]
Message-ID: <c73f2950-e9e4-556b-cfb9-d2f14cccc7b9@freedom.nl> (raw)
In-Reply-To: <CAHy-LL_JphfdJUsHQobE4-g_+o5R1nLoQRiGPCZmePuShSvJKA@mail.gmail.com>

On 8/24/2022 8:47 AM, Mikael Sundqvist via ntg-context wrote:
> Hi,
> 
> On Wed, Aug 24, 2022 at 2:23 AM Thangalin via ntg-context
> <ntg-context@ntg.nl> wrote:
>>
>> Hi again,
>>
>> Re: https://tex.stackexchange.com/q/364024/2148
>>
>> How do you typeset a C with a macron below?
>>
>> \starttext
>> M\withmacron{c}Anulty
>> \stoptext
>>
>> Thank you.
> 
> It seems that you can use "0331 for this:
> 
> Mc\char"0331 Anulty
> 
> There also is a built-in command \buildtextmacron:
> 
> M\buildtextmacron{c}Anulty
> 
> (Not sure if it uses the "0331.)
> 
> This does not give any "fancy" raised c̱ though. Maybe someone else
> has better ideas.
An early morning exercise:

\setupbodyfont[pagella]

\startTEXpage [offset=1dk]

     \def\MacScale{.7}%
     \def\MacRule {.1}%
     \def\MacKern {0}%

     \protected\def\Mac
       {\dontleavehmode \showglyphs
        \begingroup
        \scratchwidth   \fontcharwd\font`M\relax
        \scratchdistance\MacScale\fontcharwd\font`c\relax
        \scratchoffset  \dimexpr\fontcharht\font`M 
-\MacScale\fontcharht\font`c \relax
        \scratchdepth   \MacRule\exheight
        \kern\scratchwidth
        \vrule
          width  \scratchdistance
          height \dimexpr \scratchoffset- \scratchdepth\relax
          depth  \dimexpr-\scratchoffset+2\scratchdepth\relax
        \relax
        \kern-\dimexpr\scratchwidth+\scratchdistance\relax
        M%
 
\glyphscale\numexpr\numericscale\MacScale*\glyphyscale/\plusthousand\relax
        \glyph
          yoffset \scratchoffset `c
        \kern\MacKern\emwidth
        \endgroup}

     \dostepwiserecurse{5}{8}{1}{
         \def\MacScale{.#1}%
         \Mac Anulty
         \par
     }
     \def\MacScale{.6}
     \def\MacKern {-.1}
     \Mac Anulty
\stopTEXpage

After all, we want to be able to cut'n'paste the name.

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:[~2022-08-24  7:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  0:23 Thangalin via ntg-context
2022-08-24  6:47 ` Mikael Sundqvist via ntg-context
2022-08-24  7:35   ` Hans Hagen via ntg-context [this message]
2022-08-24  7:49     ` Thangalin via ntg-context
2022-08-24  8:01       ` Thangalin via ntg-context
2022-08-24  8:30         ` Hans Hagen via ntg-context
2022-08-24 15:42 ` Pablo Rodriguez via ntg-context
2022-08-24 16:11   ` Thangalin via ntg-context
2022-08-24 18:45     ` Pablo Rodriguez via ntg-context
2022-08-24 19:07       ` Hans Hagen via ntg-context
2022-08-25  1:11         ` Thangalin via ntg-context
2022-08-25 17:00         ` Pablo Rodriguez via ntg-context
2022-08-25 17:04           ` Hans Hagen via ntg-context
2022-08-25 18:01             ` Pablo Rodriguez via ntg-context
2022-08-25 18:17               ` Hans Hagen via ntg-context

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=c73f2950-e9e4-556b-cfb9-d2f14cccc7b9@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).