From: Rudolf Bahr <quasi@quasi.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Passing the parameters of a frame in an environment \startMPcode ... \stopMPcode
Date: Mon, 20 Apr 2020 10:23:57 +0200 [thread overview]
Message-ID: <20200420082356.GB7798@nan> (raw)
In-Reply-To: <4c1415d6-27ce-aece-dcdf-9c67887e82eb@gmail.com>
On Mon, Apr 20, 2020 at 09:21:41AM +0200, Wolfgang Schuster wrote:
> Fabrice Couvreur schrieb am 19.04.2020 um 22:55:
> > Hi,
> > I try to reproduce the figure as faithfully as possible. I tried for the
> > rounded corners to put the key corner = round, but it does not work.
>
> 1. To create a new framed-instance you need \defineframe, \setupframed isn't
> enough to set the values.
>
> I guess you assumed this works similar to xtables but this mechanism sets
> a few values to assure \setupxtable is enough in certain cases but even here
> you need \definextable in certain cases.
>
> When you create a new instance you have to use the name of the new
> instance as command name, e.g. \frameletter or use the \placeframed command
> which takes the name as argument, e.g. \placeframed[frameletter].
>
> 2. You can't pass the name of a framed-instance to \framed (backwards
> compatibility, performance ...), this is only possible with \startframed.
>
> 3. ConTeXt uses different mechanism to draw rectangular (unless you draw a
> closed frame) and rounded frame and the mechanism for rounded frames doesn't
> work with outlinetext.
>
> 4. To achieve the desired result you can now a) use MetaPost to draw the
> complete card (letter plus frame) or b) use only TeX to put the letter in a
> frame and rotate it.
>
> %%%% begin tex example
> \usecolors[svg]
>
> \defineframed
> [frameletter]
> [width=1.25em,
> height=1.75em,
> foregroundstyle=\ssbfc,
> corner=round,
> radius=0.1\bodyfontsize,
> rulethickness=1pt]
>
> \starttext
>
> \startTEXpage[offset=\linewidth]
> \dontleavehmode
> \rotate [rotation=5] {\color[darkred] {\frameletter{A}}}
> \rotate [rotation=-5]{\color[green] {\frameletter{L}}}
> \rotate [rotation=5] {\color[mediumblue]{\frameletter{E}}}
> \rotate [rotation=-5]{\color[darkviolet]{\frameletter{A}}}
> \stopTEXpage
>
> \stoptext
> %%%% end tex example
>
> Wolfgang
Nice Example and good explanation, Wolfgang. But why did you use the command
"dontleavehmode"? It doesn't seem to be necessary in this example.
Rudolf
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2020-04-20 8:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-19 20:55 Fabrice Couvreur
2020-04-20 7:21 ` Wolfgang Schuster
2020-04-20 8:23 ` Rudolf Bahr [this message]
2020-04-20 8:36 ` Wolfgang Schuster
2020-04-20 9:00 ` Fabrice Couvreur
2020-04-20 9:19 ` Wolfgang Schuster
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=20200420082356.GB7798@nan \
--to=quasi@quasi.de \
--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).