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.
Hi,
On Wed, Aug 24, 2022 at 2:23 AM Thangalin via ntg-context
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. /Mikael
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
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 -----------------------------------------------------------------
Nice! I had gotten as far as: \starttext M{\dontleavehmode{\raisebox{.55ex}\hbox{c}}}\hskip-1ex {\dontleavehmode{\raisebox{.25ex}\hbox{\hl[.45]}}Anulty \stoptext It looks pretty close to the LaTeX version. Fixing the name in situ is much better. Thank you!
Are the c and _ supposed to be separated like that?
https://i.ibb.co/0DsPK1P/mc.png
What would I have to change to put the c above the _?
On Wed, Aug 24, 2022 at 12:49 AM Thangalin
Nice!
I had gotten as far as:
\starttext M{\dontleavehmode{\raisebox{.55ex}\hbox{c}}}\hskip-1ex {\dontleavehmode{\raisebox{.25ex}\hbox{\hl[.45]}}Anulty \stoptext It looks pretty close to the LaTeX version. Fixing the name in situ is much better.
Thank you!
On 8/24/2022 10:01 AM, Thangalin via ntg-context wrote:
Are the c and _ supposed to be separated like that?
https://i.ibb.co/0DsPK1P/mc.png
What would I have to change to put the c above the _? Are you using lmtx? are you sure your mail agent didn't introduce an empty line?
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 -----------------------------------------------------------------
On 8/24/22 02:23, Thangalin via ntg-context wrote:
Hi again,
Re: https://tex.stackexchange.com/q/364024/2148 https://tex.stackexchange.com/q/364024/2148
How do you typeset a C with a macron below?
According to https://en.wikipedia.org/wiki/Macron_below, this works in ConTeXt: \starttext \doloopoverlist{\tf,\ss,\tt} {\bgroup\recursestring\doloopoverlist{\tf,\it,\bf,\bi,\sc} {\bgroup\recursestring a̱ḇc̱ a̲b̲c̲\quad\egroup}\egroup\par} \stoptext Just in case it helps, Pablo
Another nice solution, Pablo, thank you. The macron is shifted a little too far to the left and needs a raisebox to align the top of the C with the M. https://tex.stackexchange.com/a/364027/2148 Hans' solution is pretty close. Here's what the LaTeX folks made: https://i.stack.imgur.com/CRaam.png I've tweaked some numbers to get a pretty decent result for this particular font: \starttext M{\dontleavehmode{\raisebox{.45ex}\hbox{\scale[sx=1.1,sy=1.1]{c}}}}\hskip-1ex {\dontleavehmode{\raisebox{0ex}\hbox{\hl[.4]}}Anulty Mc̲Anulty \stoptext
On 8/24/22 18:11, Thangalin via ntg-context wrote:
Another nice solution, Pablo, thank you.
The macron is shifted a little too far to the left
I don’t know how ConTeXt handles it internally, but placement to main character differs with each letter: \starttext \doloopoverlist{\tf,\ss,\tt} {\bgroup\recursestring\doloopoverlist{\tf,\it,\bf,\bi,\sc} {\bgroup\recursestring\dorecurse{26} {\character{\recurselevel}̱ }\par}\egroup} \stoptext Pablo
On 8/24/2022 8:45 PM, Pablo Rodriguez via ntg-context wrote:
On 8/24/22 18:11, Thangalin via ntg-context wrote:
Another nice solution, Pablo, thank you.
The macron is shifted a little too far to the left
I don’t know how ConTeXt handles it internally, but placement to main character differs with each letter:
\starttext \doloopoverlist{\tf,\ss,\tt} {\bgroup\recursestring\doloopoverlist{\tf,\it,\bf,\bi,\sc} {\bgroup\recursestring\dorecurse{26} {\character{\recurselevel}̱ }\par}\egroup} \stoptext just run the attached
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Here's an attempt with dynamic kerning based on the font, which eliminates some of the tweaking needed. It's not perfect and, depending on the font, a little work is needed. For pagella, scholas, termes, and a few other default fonts, the results are decent. %\setupbodyfont[pagella] %\setupbodyfont[scholas] \setupbodyfont[termes] \starttext \newbox\MacMBox \setbox\MacMBox\hbox{M} \newbox\MacCBox \setbox\MacCBox\hbox{c} \newbox\MacKernBox \setbox\MacKernBox\hbox{\inframed[offset=\zeropoint, width=fit]{Mc}} \def\MacDelta{\dimexpr\wd\MacKernBox-\wd\MacMBox-\wd\MacCBox\relax} \def\MacUWidth{\dimexpr\wd\MacCBox-.75\MacDelta\relax} \def\MacRule{\vrule width \MacUWidth height .03em depth \zeropoint \relax} \def\MacKern{\dimexpr\wd\MacKernBox-\wd\MacMBox-\wd\MacCBox\relax} \def\Mac{% M{% \dontleavehmode{\raisebox{\dimexpr\ht\MacMBox-\ht\MacCBox}\hbox{c}}% \kern-1.04\MacUWidth \MacRule \kern.08\MacUWidth }% } \scale[scale=5000]{\Mac Anulty} \Mac Anulty \stoptext Thanks everyone!
On 8/24/22 21:07, Hans Hagen via ntg-context wrote:
On 8/24/2022 8:45 PM, Pablo Rodriguez via ntg-context wrote:
On 8/24/22 18:11, Thangalin via ntg-context wrote:
Another nice solution, Pablo, thank you.
The macron is shifted a little too far to the left
I don’t know how ConTeXt handles it internally, but placement to main character differs with each letter:
\starttext \doloopoverlist{\tf,\ss,\tt} {\bgroup\recursestring\doloopoverlist{\tf,\it,\bf,\bi,\sc} {\bgroup\recursestring\dorecurse{26} {\character{\recurselevel}̱ }\par}\egroup} \stoptext just run the attached
Many thanks, it works fine. Pablo
On 8/24/22 21:07, Hans Hagen via ntg-context wrote:
On 8/24/2022 8:45 PM, Pablo Rodriguez via ntg-context wrote:
On 8/24/22 18:11, Thangalin via ntg-context wrote:
Another nice solution, Pablo, thank you.
The macron is shifted a little too far to the left
I don’t know how ConTeXt handles it internally, but placement to main character differs with each letter:
\starttext \doloopoverlist{\tf,\ss,\tt} {\bgroup\recursestring\doloopoverlist{\tf,\it,\bf,\bi,\sc} {\bgroup\recursestring\dorecurse{26} {\character{\recurselevel}̱ }\par}\egroup} \stoptext just run the attached
Many thanks, it works fine.
On 8/25/2022 7:00 PM, Pablo Rodriguez via ntg-context wrote: the one in the update is more interesting ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 8/25/22 19:04, Hans Hagen via ntg-context wrote:
On 8/24/22 21:07, Hans Hagen via ntg-context wrote: [...]
just run the attached
Many thanks, it works fine.
On 8/25/2022 7:00 PM, Pablo Rodriguez via ntg-context wrote: the one in the update is more interesting
I tried, but I get the following error:
modules > 'gimmicks' is loaded
fonts > 'fallback modern-designsize rm 12pt' is loaded
tex error > tex error on line 24 in file ./a.tex:
Undefined control sequence \undefined
On 8/25/2022 8:01 PM, Pablo Rodriguez via ntg-context wrote:
On 8/25/22 19:04, Hans Hagen via ntg-context wrote:
On 8/24/22 21:07, Hans Hagen via ntg-context wrote: [...]
just run the attached
Many thanks, it works fine.
On 8/25/2022 7:00 PM, Pablo Rodriguez via ntg-context wrote: the one in the update is more interesting
I tried, but I get the following error:
modules > 'gimmicks' is loaded fonts > 'fallback modern-designsize rm 12pt' is loaded tex error > tex error on line 24 in file ./a.tex: Undefined control sequence \undefined
\MacAnulty \par 23 \definedfont[Serif*whatever] McAnulty\quad 24 >> \MacAnulty\par 25 \definedfont[SerifBold*whatever] McAnulty\quad
The control sequence at the end of the top line of your error message was never \def'ed. You can just continue as I'll forget about whatever was undefined. mtx-context | fatal error: return code: 1
I don’t know what I may be missing. you need to process the module itself as it's just an examaple
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 -----------------------------------------------------------------
participants (4)
-
Hans Hagen
-
Mikael Sundqvist
-
Pablo Rodriguez
-
Thangalin