From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Background with rounded corners (Metafun)
Date: Tue, 22 Aug 2017 18:50:01 -0400 (EDT) [thread overview]
Message-ID: <alpine.LNX.2.20.1708221845570.11177@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <CACyK-epZsPm1s+-LnLHpkKi4ur73d6QzxFJReDxgQsyQYUGxxw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1309 bytes --]
On Wed, 23 Aug 2017, Fabrice Couvreur wrote:
> Hello,
> I would like to have three corners rounded as in the figure.
Not sure if you had simplified your example or not. But if all you want is
a rounded corner, you can consider using corner=number parameter of framed
and framed text:
http://wiki.contextgarden.net/Framed#Rounded_Corners
Here is an example (that does not use metapost).
\definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
\definecolor[MyColorB][c=0.00,m=0.27,y=1.00,k=0.00]
\defineornament
[FrameTitle]
[preset=lefttop]
[
frame=off,
foregroundstyle=\bfx,
foregroundcolor=white,
background=color,
backgroundcolor=MyColorB,
]
\defineframedtext
[FramedText]
[
offset=0.6em,
toffset=\lineheight,
background=color,
backgroundcolor=MyColorA,
foregroundstyle={\switchtobodyfont[10pt]},
align=verytolerant,
frame=off,
corner=01,
]
\showframe
\starttext
\FrameTitle{Info}{\startFramedText[width=10cm]
L'équivalent vingt pieds (EVP) est une unité de mesure de conteneurs
(de longueur courante 20 pieds, soit environ \unit{6,1 meter}).
1 EVP représente environ \unit{38,5 cubic meter}.
\stopFramedText}
\stoptext
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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:[~2017-08-22 22:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 22:12 Fabrice Couvreur
2017-08-22 22:50 ` Aditya Mahajan [this message]
2017-08-22 23:01 ` Fabrice Couvreur
2017-08-22 23:19 ` Fabrice Couvreur
2017-08-22 23:20 ` Fabrice Couvreur
2017-08-30 16:07 ` Fabrice Couvreur
2017-08-30 20:45 ` Pablo Rodriguez
2017-08-30 20:53 ` Fabrice Couvreur
2017-09-08 12:37 ` Meer, Hans van der
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=alpine.LNX.2.20.1708221845570.11177@ybpnyubfg.ybpnyqbznva \
--to=adityam@umich.edu \
--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).