* Background with rounded corners (Metafun) @ 2017-08-22 22:12 Fabrice Couvreur 2017-08-22 22:50 ` Aditya Mahajan 0 siblings, 1 reply; 9+ messages in thread From: Fabrice Couvreur @ 2017-08-22 22:12 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1261 bytes --] Hello, I would like to have three corners rounded as in the figure. Thank you Fabrice \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] \startuseMPgraphic{MyFrame} path b ; picture p ; p := textext.rt("\bf\tfx\white\framedtextparameter{Title}") ; p := p shifted (.3EmWidth,OverlayHeight-.6EmWidth) ; b := boundingbox p enlarged .3EmWidth ; fill OverlayBox withcolor \MPcolor{MyColorA} ; fill b withcolor \MPcolor{MyColorB} ; draw p ; setbounds currentpicture to boundingbox currentpicture enlarged 2mm ; \stopuseMPgraphic \defineoverlay [MyFrame] [\useMPgraphic{MyFrame}] \defineframedtext [MyFrame] [frame=off, foregroundstyle={\switchtobodyfont[10pt]}, background=MyFrame, align={verytolerant}, height=fit] \definefloat [recipe] [figure] \setupfloat [recipe] [default={right,none}] \showframe \starttext \placerecipe{} {\startMyFrame[Title=Info,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}. \stopMyFrame } \input knuth \stoptext [-- Attachment #1.2: Type: text/html, Size: 1651 bytes --] [-- 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Background with rounded corners (Metafun) 2017-08-22 22:12 Background with rounded corners (Metafun) Fabrice Couvreur @ 2017-08-22 22:50 ` Aditya Mahajan 2017-08-22 23:01 ` Fabrice Couvreur 2017-09-08 12:37 ` Meer, Hans van der 0 siblings, 2 replies; 9+ messages in thread From: Aditya Mahajan @ 2017-08-22 22:50 UTC (permalink / raw) To: mailing list for ConTeXt users [-- 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Background with rounded corners (Metafun) 2017-08-22 22:50 ` Aditya Mahajan @ 2017-08-22 23:01 ` Fabrice Couvreur 2017-08-22 23:19 ` Fabrice Couvreur 2017-08-22 23:20 ` Fabrice Couvreur 2017-09-08 12:37 ` Meer, Hans van der 1 sibling, 2 replies; 9+ messages in thread From: Fabrice Couvreur @ 2017-08-22 23:01 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 2164 bytes --] Hi Aditya, Sorry I forgot to attach the image of what I want to do. I know corner=number parameter of framed and framed text but I wanted to do it with Metafun. Thank you Fabrice 2017-08-23 0:50 GMT+02:00 Aditya Mahajan <adityam@umich.edu>: > 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 > ____________________________________________________________ > _______________________ > 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 > ____________________________________________________________ > _______________________ > [-- Attachment #1.2: Type: text/html, Size: 3808 bytes --] [-- Attachment #2: frame1.jpg --] [-- Type: image/jpeg, Size: 24072 bytes --] [-- Attachment #3: 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Background with rounded corners (Metafun) 2017-08-22 23:01 ` Fabrice Couvreur @ 2017-08-22 23:19 ` Fabrice Couvreur 2017-08-22 23:20 ` Fabrice Couvreur 1 sibling, 0 replies; 9+ messages in thread From: Fabrice Couvreur @ 2017-08-22 23:19 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 2361 bytes --] With your solution 'corner=01' 2017-08-23 1:01 GMT+02:00 Fabrice Couvreur <fabrice1.couvreur@gmail.com>: > Hi Aditya, > Sorry I forgot to attach the image of what I want to do. I know corner=number > parameter of framed and framed text but I wanted to do it with Metafun. > Thank you > Fabrice > > 2017-08-23 0:50 GMT+02:00 Aditya Mahajan <adityam@umich.edu>: > >> 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 >> ____________________________________________________________ >> _______________________ >> 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/list >> info/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> ____________________________________________________________ >> _______________________ >> > > [-- Attachment #1.2: Type: text/html, Size: 4499 bytes --] [-- 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Background with rounded corners (Metafun) 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 1 sibling, 1 reply; 9+ messages in thread From: Fabrice Couvreur @ 2017-08-22 23:20 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 2350 bytes --] Sorry 'corner=00' ! 2017-08-23 1:01 GMT+02:00 Fabrice Couvreur <fabrice1.couvreur@gmail.com>: > Hi Aditya, > Sorry I forgot to attach the image of what I want to do. I know corner=number > parameter of framed and framed text but I wanted to do it with Metafun. > Thank you > Fabrice > > 2017-08-23 0:50 GMT+02:00 Aditya Mahajan <adityam@umich.edu>: > >> 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 >> ____________________________________________________________ >> _______________________ >> 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/list >> info/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> ____________________________________________________________ >> _______________________ >> > > [-- Attachment #1.2: Type: text/html, Size: 4492 bytes --] [-- 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Background with rounded corners (Metafun) 2017-08-22 23:20 ` Fabrice Couvreur @ 2017-08-30 16:07 ` Fabrice Couvreur 2017-08-30 20:45 ` Pablo Rodriguez 0 siblings, 1 reply; 9+ messages in thread From: Fabrice Couvreur @ 2017-08-30 16:07 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 2940 bytes --] Hi Aditya, I tried : \defineframedtext [FramedText] [ offset=0.6em, toffset=\lineheight, background=color, backgroundcolor=MyColorA, foregroundstyle={\switchtobodyfont[10pt]}, align=verytolerant, alternative=serried, % text wrapped frame=off, corner=00, ] to have my text wrapped around the ornament as in the figure but it does not work. Thanks Fabrice 2017-08-23 1:20 GMT+02:00 Fabrice Couvreur <fabrice1.couvreur@gmail.com>: > Sorry 'corner=00' ! > > 2017-08-23 1:01 GMT+02:00 Fabrice Couvreur <fabrice1.couvreur@gmail.com>: > >> Hi Aditya, >> Sorry I forgot to attach the image of what I want to do. I know corner=number >> parameter of framed and framed text but I wanted to do it with Metafun. >> Thank you >> Fabrice >> >> 2017-08-23 0:50 GMT+02:00 Aditya Mahajan <adityam@umich.edu>: >> >>> 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 >>> ____________________________________________________________ >>> _______________________ >>> 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/list >>> info/ntg-context >>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> wiki : http://contextgarden.net >>> ____________________________________________________________ >>> _______________________ >>> >> >> > [-- Attachment #1.2: Type: text/html, Size: 6515 bytes --] [-- 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Background with rounded corners (Metafun) 2017-08-30 16:07 ` Fabrice Couvreur @ 2017-08-30 20:45 ` Pablo Rodriguez 2017-08-30 20:53 ` Fabrice Couvreur 0 siblings, 1 reply; 9+ messages in thread From: Pablo Rodriguez @ 2017-08-30 20:45 UTC (permalink / raw) To: ntg-context On 08/30/2017 06:07 PM, Fabrice Couvreur wrote: > Hi Aditya, > I tried : > [...] > to have my text wrapped around the ornament as in the figure but it > does not work. Hi Fabrice, sorry if I’m missing something, but I wonder whether the next sample is what you intend. \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, alternative=serried, % text wrapped frame=off, corner=round, ] \definefloat [recipe] [figure] \setupfloat [recipe] [default={right,none}] \showframe \starttext \placerecipe{} {\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}} \input zapf \stoptext Just in case it helps, Pablo -- http://www.ousia.tk ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Background with rounded corners (Metafun) 2017-08-30 20:45 ` Pablo Rodriguez @ 2017-08-30 20:53 ` Fabrice Couvreur 0 siblings, 0 replies; 9+ messages in thread From: Fabrice Couvreur @ 2017-08-30 20:53 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 2506 bytes --] Hi Pablo, I speak of the text in the frame as in the image https://mail.google.com/mail/u/0/?ui=2&ik=d5d294e54c&view=att&th=15e0c2d8c5b8cf7c&attid=0.1&disp=safe&realattid=f_j6o6zsx20&zw Fabrice 2017-08-30 22:45 GMT+02:00 Pablo Rodriguez <oinos@gmx.es>: > On 08/30/2017 06:07 PM, Fabrice Couvreur wrote: > > Hi Aditya, > > I tried : > > [...] > > to have my text wrapped around the ornament as in the figure but it > > does not work. > > Hi Fabrice, > > sorry if I’m missing something, but I wonder whether the next sample is > what you intend. > > \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, > alternative=serried, % text wrapped > frame=off, > corner=round, > ] > > \definefloat > [recipe] > [figure] > > \setupfloat > [recipe] > [default={right,none}] > > \showframe > > \starttext > \placerecipe{} > {\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}} > > \input zapf > > \stoptext > > Just in case it helps, > > Pablo > -- > http://www.ousia.tk > ____________________________________________________________ > _______________________ > 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 > ____________________________________________________________ > _______________________ > [-- Attachment #1.2: Type: text/html, Size: 4436 bytes --] [-- 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Background with rounded corners (Metafun) 2017-08-22 22:50 ` Aditya Mahajan 2017-08-22 23:01 ` Fabrice Couvreur @ 2017-09-08 12:37 ` Meer, Hans van der 1 sibling, 0 replies; 9+ messages in thread From: Meer, Hans van der @ 2017-09-08 12:37 UTC (permalink / raw) To: NTG ConTeXt > \defineornament > [FrameTitle] > [preset=lefttop] I tried this example and I wonder what the [preset=lefttop] does. Because whatever I fill in for lefttop, the ornament appears always in the topleft corner and nowhere else. Hans van der Meer > On 23 Aug 2017, at 00:50, Aditya Mahajan <adityam@umich.edu> wrote: > > 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___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-09-08 12:37 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-08-22 22:12 Background with rounded corners (Metafun) Fabrice Couvreur 2017-08-22 22:50 ` Aditya Mahajan 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
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).