[NTG-context] metafun paralleled does not give a parallel path

2022-08-24 Thread fv leung via ntg-context
The following used to produce three parallel lines.
Now it produces one straight line and two arcs.

\starttext

\startMPcode
  z0 = origin;
  z1 = 72dir(45);
  dotlabel.bot("z0", z0);
  draw z0--z1;
  draw (z0--z1) paralleled -15 withcolor red;
  draw (z0--z1) paralleled 15 withcolor blue;
\stopMPcode

\stoptext
___
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
___


Re: [NTG-context] C with macron

2022-08-24 Thread Thangalin via ntg-context
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!
___
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
___


[NTG-context] No error when loading a non-existent module

2022-08-24 Thread Max Chernoff via ntg-context
Hi all,

If you load a non-existent module, ConTeXt issues a minor warning, but
otherwise proceeds as normal:

MWE:

   \usemodule[doesnt-exist]
   
   \starttext
   Hello world!
   \stoptext
   
I think that this behaviour should be changed so that a fatal error is
issued when a loaded module cannot be found. Plain TeX, LaTeX, and OpTeX
all throw an error whenever their versions of modules cannot be found, so
ConTeXt is the odd one out here.

There are 3 scenarios that I can think of for when you attempt to load a
module, but it cannot be found:

1. A module provides some new command "\somecommand"

   In this case, loading the module will quietly fail, but an undefined
   control sequence error will be issued whenever you use
   "\somecommand". This disguises the root problem, which is that the
   module was never loaded, potentially confusing users.
   
2. A module changes the layout of a document

   In this case, the layout of the document would be unchanged by the
   module. If you're looking at every document, then this would be
   obvious; however, if you're using some batch processing system, you
   could unknowingly send out incorrectly-styled documents quite easily.
   
3. You load a module that provides some command, then never use it

   This is the only case where the new error would break any documents.
   However, this case should hopefully be pretty rare since it's
   pointless to load a module then never use any of its features.
   
Making this change could potentially break some documents that currently
work, but I think that this change is worth it, since I'd rather have
something break loudly (throwing an error) rather than silently (producing
a semi-corrupt document).

Thanks,
-- Max
   
___
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
___


Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-24 Thread Michal Vlasák via ntg-context
On Wed Aug 24, 2022 at 11:32 PM CEST, Hans Hagen wrote:
> On 8/24/2022 10:21 PM, Michal Vlasák via ntg-context wrote:
>
> > Or rather no solution would be needed at all, since the "mtxrun" and
> > "context" wrapper commands and "texmfcnf.lua" files will be probably
> > specific for each packaging target (different directories on different
> > distros, and Unix vs Windows), and thus the matter of packagers. And
> > copying a binary and a directory with runtime files is the usual task of
> > an install step of "package descriptions", so maybe even a Makefile like
> > I had wouldn't be needed.
>
> just a note: the mtxrun[.exe] and context[.exe] commands are not really 
> wrappers but symlinks to the binary luametatex[.exe]  (i didn't test if 
> mtxrun.lua and context.lua can be symlinks but that are to be in the 
> same path in order to be seen)

Yes, sorry I should have been clearer. What is necessary for luametatex
to run a Lua script is to run it with another name (argv[0]). This can
be done with symlinks, or with `exec -a mtxrun luametatex`. And even
mtxrun.lua and context.lua can be symlinks, it works, I used it.

> one can actually use the default texmf.cnf if one sets TEXMF or one of 
> its companions .. they default to be autoparent which is natural for tds

Thanks, indeed the config file sets the paths nicely, so it isn't
necessary to have another file if one sets TEXMF, very nice!

One addition I had was the use of $TEXMFDOTDIR instead of "." as the
first path in most variables, e.g.:

TEXINPUTS = "$TEXMFDOTDIR;$TEXMF/tex/{context,plain/base,generic}//",

instead of

TEXINPUTS = ".;$TEXMF/tex/{context,plain/base,generic}//",

I quite like it for adding directories with my macros / bib files etc.
that are not structured as TDS tree, but rather are "flat".

It's originally from TeX Live:


https://github.com/TeX-Live/texlive-source/commit/f1dfa7b7670fa28451c386fb08e2b32d293741ab

It lists ".//" as another possible use. Could you also add it?

I updated the repo:

https://github.com/vlasakm/context

Now also `context` is an executable (two more symlinks, so now 4
symlinks and one binary in total). There is no longer a configuration
file by me (the fallback contextcnf.lua gets used or user provides one),
the drawback being that I set some variables in the environment and the
user now can't override them from config file only from environment,
AFAIK. Also

 mtxrun --variables

doesn't work now (maybe other things) though I won't investigate further
for now.

Anyway, thanks for the clarifications and suggestions!

Michal
___
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
___


Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-24 Thread Hans Hagen via ntg-context

On 8/24/2022 10:21 PM, Michal Vlasák via ntg-context wrote:


Or rather no solution would be needed at all, since the "mtxrun" and
"context" wrapper commands and "texmfcnf.lua" files will be probably
specific for each packaging target (different directories on different
distros, and Unix vs Windows), and thus the matter of packagers. And
copying a binary and a directory with runtime files is the usual task of
an install step of "package descriptions", so maybe even a Makefile like
I had wouldn't be needed.


just a note: the mtxrun[.exe] and context[.exe] commands are not really 
wrappers but symlinks to the binary luametatex[.exe]  (i didn't test if 
mtxrun.lua and context.lua can be symlinks but that are to be in the 
same path in order to be seen)


one can actually use the default texmf.cnf if one sets TEXMF or one of 
its companions .. they default to be autoparent which is natural for tds


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
___


Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-24 Thread Michal Vlasák via ntg-context
On Tue Aug 23, 2022 at 3:11 AM CEST, Max Chernoff wrote:
> > On Sunday, August 21st, 2022 at 7:13 PM, Michal Vlasák  > gmail.com> wrote:
> > >
> > > There is documentation about how it can be used. I hope its obvious how
> > > I got "texmf" (texmf-context.zip, unzip, delete some files I didn't want
> > > to take up space), 
>
> One suggestion: instead of unpacking and committing "texmf-context.zip",
> I'd recommend adding 
>
>https://github.com/contextgarden/context-mirror/
>
> as a git submodule. That way, it's easy to keep the files up-to-date, your
> repo will use less space, and there's a clearer separation between your
> package files and ConTeXt itself.

Yes, you are right that would be much better.

Unfortunately it seems that git submodules are not included in archives
created by `git archive` (which is also what Github uses for the
automatic release zip / tars that I have linked above). As I wanted the
published tarballs / zips self-contained ("offline only"), I would need
to use some script to generate custom archives that I would upload to
Github as release assets. This would require special care both from me
and the hypothetical packagers who would have to use the less
discoverable asset instead of the standard "git(hub) archive" way.

Anyway I think that a much better solution can be made once luametatex
source code becomes available - then there wouldn't be a reason to
resort to commiting binaries into version control and/or unnecessarily
restrict to Linux only.

Or rather no solution would be needed at all, since the "mtxrun" and
"context" wrapper commands and "texmfcnf.lua" files will be probably
specific for each packaging target (different directories on different
distros, and Unix vs Windows), and thus the matter of packagers. And
copying a binary and a directory with runtime files is the usual task of
an install step of "package descriptions", so maybe even a Makefile like
I had wouldn't be needed.

> > > A bit of a disclaimer: I don't really recommend pursuing this further.
> > > Some time ago I was also that foolish to try to package TeX for Linux
> > > distributions. Unfortunately I think that the result will never by
> > > optimal - as demonstrated by the previous discussions, the usual
> > > purposes of packages (to integrate software into the system) don't apply
> > > much to TeX / ConTeXt - there one wants something more or less self
> > > contained (so that updates are under control, no random non-essential
> > > libraries brake things, etc.).
>
> Well packaging the files into .rpm/.deb isn't really a bad idea; what's
> bad is the weird modifications that distros make, plus the fact that
> nearly every distro delays updates by quite some time. I generally agree
> that installing TeX straight from the source is better, although I can
> see why some users prefer to install from their distro repos.

One benefit of the fact that ConTeXt LMTX is not packaged anywhere came
to my mind: when someone has a problem with ConTeXt there is a very high
chance that it isn't because they are using a very old version. In
contrast to MkIV where one can imagine up to 4 year old installs (say up
to 1 year delay in TeX Live and 3 years in the distro for the "stable"
ones).

Michal
___
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
___


Re: [NTG-context] C with macron

2022-08-24 Thread Hans Hagen via ntg-context

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
-%D \module
%D   [   file=m-gimmicks,
%Dversion=2022.07.25
%D  title=\CONTEXT\ Extra Modules,
%D   subtitle=Whatever comes up,
%D author=Hans Hagen,
%D   date=\currentdate,
%D  copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\def\MacScale{.7}%
\def\MacRule {.05}%
\def\MacDistance {.05}%
\def\MacKern {0}%

\protected\def\Mac
  {\dontleavehmode
   \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-\MacDistance\exheight\relax
 depth  \dimexpr-\scratchoffset+2\scratchdepth+\MacDistance\exheight\relax
   \relax
   \kern-\dimexpr\scratchwidth+\scratchdistance\relax
   M%
   \glyphscale\numexpr\numericscale\MacScale*\glyphyscale/\plusthousand\relax
   \glyph
 yoffset \scratchoffset `c
   \kern\MacKern\emwidth
   \endgroup}

\continueifinputfile{m-gimmicks.mkxl}

\setupbodyfont[pagella]

\startTEXpage [offset=1dk]
\def\Test#1{%
\begingroup
#1%
\dostepwiserecurse{5}{8}{1}{
\def\MacScale{.##1}%
\Mac Anulty
\par
}
\endgroup
}
\Test\tf
\Test\bf
\Test\it
\Test\sl
\Test\bfb
\def\MacScale{.6}
\def\MacKern {-.1}
\Mac Anulty
\stopTEXpage
___
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
___


Re: [NTG-context] C with macron

2022-08-24 Thread Pablo Rodriguez via ntg-context
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
___
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
___


Re: [NTG-context] C with macron

2022-08-24 Thread Thangalin via ntg-context
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
___
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
___


Re: [NTG-context] C with macron

2022-08-24 Thread Pablo Rodriguez via ntg-context
On 8/24/22 02:23, 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?

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
___
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
___


Re: [NTG-context] Curling straight quotation marks

2022-08-24 Thread Thangalin via ntg-context
>
>
> Just use \quotation and \quote, then you have the right settings for
> many languages and can also be sure that quotes get closed and are
> consistent over the whole document.
>

Thanks Hraban.

That won't work with my workflow. I edit in Markdown (plain text),
transform to XML, then pass the XML to ConTeXt. When I edit the document, I
want to use ' and " without tying the document to TeX. This gives me a
complete separation of content from presentation logic.

Figured it might be helpful if others have the same workflow.

Cheers!
___
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
___


Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?

2022-08-24 Thread amano.kenji via ntg-context
That's great, bro.

--- Original Message ---
On Tuesday, August 23rd, 2022 at 7:13 PM, Aditya Mahajan via ntg-context 
 wrote:


> On Mon, 22 Aug 2022, amano.kenji via ntg-context wrote:
> 
> > Wuh. That's a bit complex.
> 
> 
> If you are packaging any flavor of TeX, you need to understand TDS (TeX 
> Directory Structure):
> 
> https://tug.org/tds/
> 
> ConTeXt distributions are TDS compatible, but simplify certain aspects. 
> Essentially, context LMTX is distributed as a collection of TDS trees (texmf, 
> texmf-context, texmf-linux, etc.) which separate the files according to their 
> role. The purpose of texmfcnf.lua is to tell the binary about the location of 
> the different trees.
> 
> Aditya
> ___
> 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
> ___
___
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
___


Re: [NTG-context] Curling straight quotation marks

2022-08-24 Thread Henning Hraban Ramm via ntg-context

Am 24.08.22 um 02:13 schrieb Thangalin via ntg-context:

Hey folks,

I re-wrote the algorithm KeenWrite uses for curling straight quotes. The 
new algorithm is fairly robust with respect to North American and 
British English. Could use help finding edge cases:


https://whitemagicsoftware.com/keenquotes/ 



I use it for preprocessing documents prior to passing them to ConTeXt.


Just use \quotation and \quote, then you have the right settings for 
many languages and can also be sure that quotes get closed and are 
consistent over the whole document.


Hraban
___
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
___


Re: [NTG-context] C with macron

2022-08-24 Thread Hans Hagen via ntg-context

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
-
___
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
___


Re: [NTG-context] C with macron

2022-08-24 Thread Thangalin via ntg-context
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  wrote:

> 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!
>
>
___
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
___


Re: [NTG-context] C with macron

2022-08-24 Thread Thangalin via ntg-context
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!
___
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
___


Re: [NTG-context] C with macron

2022-08-24 Thread Hans Hagen via ntg-context

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
-
___
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
___


Re: [NTG-context] C with macron

2022-08-24 Thread Mikael Sundqvist via ntg-context
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.

/Mikael
___
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
___