t work, but
> being a bit surprised by the margins I printed a copy of the page
> and still worse...
Hi Miguel,
this should work (also in the sense of a minimal sample):
\showframe\showgrid
\defineframedtext[FunnyText]
[frame=on, align=flushright,location=right]
\def\FrameTi
}]
\defineframedtext[FunnyText][width=.85\textwidth, height=20mm, frame=off,
background=FunnyFrame, align=flushright,location=right,
after={\blank[2*big]}]%foregroundsytel amplía la palabra Apartado
\def\FrameTitle#1%
{\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut \color[blue]{\tfx Apartado
urcorner p,h) ;
%draw boundingbox p ; %%%quitamos el frame pequeño
setbounds currentpicture to unitsquare xyscaled(w,h) ;
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][width=.85\textwidth, height=20mm, frame=off,
background=FunnyFrame, align
,outer,none]
1. You can't pass assignments and keywords to the same argument.
2. The \setupfloat command accepts only assignments as arguments, this
means "outer" and "none" are ignored.
To set a default location for the float use
\setupfloat[...][default={outer,none}]
]
defineframedtext [sidebartext]
[width=.4textwidth,bodyfont=small,corner=round,background=color,backgroundcolor=lightgray,align=flushleft]
starttext
This is a bit of text
placefloat[newsidebar][leftmargindistance=-.25in,rightmargindistance=-.25in,outer,none]{}{
startsidebartext
This is a short
4 um 19:54 schrieb urba...@ca.rr.com:
I swear I used to understand this stuff. I plead old age. Why do I
get two different results from the float placements here:
\definefloat[mysidebar][mysidebars]
\setupfloat[mysidebar][leftmargindistance=-.25in,rightmargindistance=-.25in,outer,none]
\define
I swear I used to understand this stuff. I plead old age. Why do I get
two different results from the float placements here:
definefloat[mysidebar][mysidebars]
setupfloat[mysidebar][leftmargindistance=-.25in,rightmargindistance=-.25in,outer,none]
defineframedtext [sidebartext]
[width=.4textwidth
bachotex:naglowek:columns
\defineframedtext [Dane]
\setupframedtext
[Dane]
[width=18cm ,
align=normal,
frame=no]
\definenarrower
[Streszczenia]
[2*middle]
\startplacefigure [location={here,none}]
{\startDane
{\tfa
] [sans] [FreeSans] [rscale=0.7]
\definefontfamily[mainface] [serif] [GFS Didot]
\setupbodyfont[mainface]
\setupindenting[1.5em]
\setupindenting[yes]
\setupcolors[state=start]
\defineframedtext
[MyFrame]
[before={\blank},
after={\blank},
frame=off,
background=MyFrame,
%width=\textwidth
[MyColorA][.75(MyColorB,white)]
\defineframed
[FrameTitle]
[frame=off,
foregroundstyle=\bfx\ss,
foregroundcolor=white,
background=color,
backgroundcolor=MyColorD,
location=depth]
\defineframedtext
[FramedText]
[offset=0.25em,
style=\ss
;
draw b;
setbounds currentpicture to OverlayBox;
\stopuseMPgraphic
\defineoverlay
[CountFrame]
[\useMPgraphic{CountFrame}]
\defineframedtext
[CountFramedText]
[frame=off,
background=CountFrame,
offset=\bodyfontsize,
width=\textwidth,
% style={\switchtobodyfont[11pt,tt]}]
bod
CountFrame}]
\defineframedtext
[CountFramedText]
[frame=off,
background=CountFrame,
offset=\bodyfontsize,
width=\textwidth,
% style={\switchtobodyfont[11pt,tt]}]
bodyfont=11pt,
style={\tt},
]
\def\FrameTitle#1%
{\setMPtext{CountFrame}
{\hbox spread 1em{\hss\strut#1\hss}}}\setMPtext{
boundingbox p ;
setbounds currentpicture to unitsquare xyscaled(w,h) ;
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][frame=off,background=FunnyFrame]
\def\FrameTitle#1%
{\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}}
\setMPtext{FunnyFrame
b/mdframed/mdframed.pdf)
> >
> > I have searched in the wiki and found \defineenumeration:
> > This is near of that what I need. However I explicitly does not need an
> > enumeration (so no number or counter). Also I am not sure if I can set a
> > background
s not need an
enumeration (so no number or counter). Also I am not sure if I can set a
background and so on.
The other possibility is \defineframedtext. For example this goes much
in the direction that I want:
\definecolor[gbackground][s=0.98]
\defineframedtext[gtk][frame=on,
e if I can set a
background and so on.
The other possibility is \defineframedtext. For example this goes much
in the direction that I want:
\definecolor[gbackground][s=0.98]
\defineframedtext[gtk][frame=on,
offset=5pt,
backgr
; [location=default]
>
> \setupindenting
> [yes, small]
>
> \setupwhitespace
> [small]
>
> \defineframedtext
> [prettyblock]
> [width=10cm,
> indenting={yes, small},
> background=color, backgroundcolor=lightgreen,
> foreground=color, foregroundcolor=b
Dear Oliver,
maybe something like this?
This is my example:
\starttext
\setuppapersize
[A5]
\setupexternalfigures
[location=default]
\setupindenting
[yes, small]
\setupwhitespace
[small]
\defineframedtext
[prettyblock]
[width=10cm,
indenting={yes, small},
background
Pablo Rodriguez via ntg-context schrieb am 24.04.2022 um 20:56:
Dear list,
I have the following sample:
\defineframedtext[backcover]
\setupframedtext[backcover]
[frame=off,
offset=overlay,
width=\textwidth]
\starttext
\startframedtext[backcover]
\input
Dear list,
I have the following sample:
\defineframedtext[backcover]
\setupframedtext[backcover]
[frame=off,
offset=overlay,
width=\textwidth]
\starttext
\startframedtext[backcover]
\input zapf
\stopframedtext
\stoptext
Using current LMTX (2022.04.20 19:18
;
draw p withpen pencircle scaled 0.75 ;
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic
\defineframedtext[TextBubbleFrame][
style=TextFontEmoji,
frame=off,
width=.618\textwidth,
autowidth=force,
offset=.75em,
after={\blank[2*big]},
]
% Receive text (left-facing
ross pages. So, if you have long answers, a different
> mechanism is needed.
> >
> > \definemode[solution][no]
> >
> > \doifmodeelse{solution}
> > {\defineframedtext[solution][empty=no]}
> > {\defineframedtext[solution][empty=yes]}
> >
&
> doesn't break across pages. So, if you have long answers, a different
> mechanism is needed.
>
> \definemode[solution][no]
>
> \doifmodeelse{solution}
> {\defineframedtext[solution][empty=no]}
> {\defineframedtext[solution][empty=yes]}
>
> % Doesn't wor
answers, a different mechanism
is needed.
\definemode[solution][no]
\doifmodeelse{solution}
{\defineframedtext[solution][empty=no]}
{\defineframedtext[solution][empty=yes]}
% Doesn't work. Why?
% \expanded{\defineframedtext[solution][empty=\doifmodeelse{solution}{no}{yes}]}
\setupf
r}
>{\framed
> [offset=overlay,
> align=normal,
> width=\textwidth,
> height=2cm]{foo}}
>
> works but maybe you want this instead:
>
> \defineoverlay
>[MyOrn]
>[\MyOrn
> {\framedtextparameter{MyTitle}}
> {\novrule wi
}
{\framed
[offset=overlay,
align=normal,
width=\textwidth,
height=2cm]{foo}}
works but maybe you want this instead:
\defineoverlay
[MyOrn]
[\MyOrn
{\framedtextparameter{MyTitle}}
{\novrule width \overlaywidth height \overlayheight}]
\defineframedtext
[MyText
Frame}]
\defineframedtext[rfText]
[frame=off,
background=rFrame,
offset=\bodyfontsize,
width=\textwidth,
before=\blank,
after=\blank]
\def\StartFrame{\blank\startrfText}
\def\StopFrame {\stoprfText\blank}
\starttext
\StartFrame
This is a test for the frame.
This is a test for the frame.
This is a
apterframe]
[\useMPgraphic{chapterframe}]
\defineframedtext
[ChapterFrame]
[frame=off,
background=chapterframe,
width=max,
height=6cm,
after={\blank[2*line]},
offset=0pt]
\setuphead
[chapter]
[align=flushright,
textcommand=\groupedcommand{\blank[medium]}{},
numbercolor=darkgray,
.
Thanks.
Fabrice
###
\definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
\defineframedtext
[FramedText]
[
offset=0.6em,
style=,
toffset=\lineheight,
background=color,
backgroundcolor
gt;
> \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
> \defineframedtext
> [FramedText]
> [
> offset=0.6em,
> style=,
> toffset=\lineheight,
> background=color,
> backgroundcolor=MyCo
in the body of the text.
Thanks for your help.
Fabrice
\definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
\defineframedtext
[FramedText]
[
offset=0.6em,
style=,
toffset=\lineheight,
background=color,
backgroundcolor=MyColorA
ou
Fabrice
\definecolor[MyBlue][c=0.2 , m=0.03, y=0.00, k=0.00]
\definecolor[maincolor] [b=.5]
\defineframedtext
[MyFrame]
[frame=off,
background=MyFrame,
width=fit,
height=fit,
style=small]
\startuseMPgraphic{MyFrame}
path b;
picture p;
p := textex
00, k=0.00]
\definecolor[maincolor] [b=.5]
\defineframedtext
[MyFrame]
[frame=off,
background=MyFrame,
width=fit,
height=fit,
style=small]
\startuseMPgraphic{MyFrame}
path b;
picture p;
p := textext.rt("\tfx\bf\white\framedtextparameter{Title}");
I have found this, that works, buy I don't know if there's a possibility of
using less code:
% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = ConTeXt-MkIV
% questo codice centra il blocco dei versi sulla pagina
\defineframedtext
[poemframed]
[width=\textwidth,
autowidth=force
=0.11, b=0.84]
\definecolor [darkgreen] [g=0.7]
\definecolor [lightblue] [h=87cefa]
\definecolor [lightgreen] [g=0.95,b=0.8,r=0.8]
\defineframedtext
[leftbartext]
[
width=local,
frame=off,
framecolor=darkblue,
leftframe=on,
rulethickness=1ex,
offset=0.25ex,
loffset=3ex
] [r=0.1, g=0.11, b=0.84]
> \definecolor [darkgreen] [g=0.7]
> \definecolor [lightblue] [h=87cefa]
> \definecolor [lightgreen] [g=0.95,b=0.8,r=0.8]
>
> \defineframedtext
> [leftbartext]
> [
>width=local,
>frame=off,
>framecolor=darkblue,
>leftframe=
inecolor [lightblue] [h=87cefa]
\definecolor [lightgreen] [g=0.95,b=0.8,r=0.8]
\defineframedtext
[leftbartext]
[
width=local,
frame=off,
framecolor=darkblue,
leftframe=on,
rulethickness=1ex,
offset=0.25ex,
loffset=3ex,
background=color,
backg
se where I use the
vim module to do the typesetting:
\usemodule[filter]
\usemodule[vim]
\definecolor [darkblue] [r=0.1, g=0.11, b=0.84]
\definecolor [darkgreen] [g=0.7]
\definecolor [lightblue] [h=87cefa]
\definecolor [lightgreen] [g=0.95,b=0.8,r=0.8]
\defineframedtext
[l
icture to OverlayBox ;
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext
[FunnyFramedText]
[
frame=off,
background=FunnyFrame,
offset=\bodyfontsize,
width=\textwidth,
]
\defineenumeration[Counter]
[
title=yes,
alternati
it?
Best wishes,
Tomáš
\setupstartstop[DefaultSnippet][before=,after=,style=]
\defineframedtext[MPtyping][background=color,backgroundcolor=gray,width=\makeupwidth,offset=2dd,loffset=6dd,roffset=6dd,frame=on,]
\setuptyping[MP][before=\startMPtyping,after=\stopMPtyping,indentnext=auto,]
search
[DefaultSnippet][before=,after=,style=]
\defineframedtext[MPtyping][background=color,backgroundcolor=gray,width=\makeupwidth,offset=2dd,loffset=6dd,roffset=6dd,frame=on,]
\setuptyping[MP][before=\startMPtyping,after=\stopMPtyping,indentnext=auto
:
# >Hi all,
# >
# >if I compile the following (minimised) code with ConTeXt from TL2017,
# >I receive expected result -- one framed gray box with correct width.
# >
# >\starttext\showframe
#
>\defineframedtext[MPT][background=color,backgroundcolor=gray,width=\makeupwidt
wframe\defineframedtext[MPT][background="" class="">\setuptyping[MP][before={\startMPT},after={\stopMPT},]\startMP bla \stopMP\stoptextNow I tried it with ConTeXt from TL2019 (TL2018 produces the same result as TL2019)and I have got _two_ boxes -- the outer one is correct and fr
Tomas Hala schrieb am 17.01.2020 um 15:18:
Hi all,
if I compile the following (minimised) code with ConTeXt from TL2017,
I receive expected result -- one framed gray box with correct width.
\starttext\showframe
\defineframedtext[MPT][background=color,backgroundcolor=gray,width=\makeupwidth
Hi all,
if I compile the following (minimised) code with ConTeXt from TL2017,
I receive expected result -- one framed gray box with correct width.
\starttext\showframe
\defineframedtext[MPT][background=color,backgroundcolor=gray,width=\makeupwidth,frame=on,offset=1cc,]
\setuptyping[MP][before
> headstyle={\em},
> titlestyle=,
> indentnext=no,% another way to get indentation is to comment this line
> indenting={yes,medium},
> ]
>
> \defineframedtext[anmärkningsbakgrunden][
> width=\textwidth,
> background=color,
> backgroundcolor=gray,
> ]
>
> \de
what lines to comment to avoid the problem).
%%%
\defineenumeration[losning][
text=Lösning,
title=yes,
alternative=serried,
width=fit,
number=no,
headstyle={\em},
titlestyle=,
indentnext=no,% another way to get indentation is to comment this line
indenting={yes,medium},
]
\defineframedtext
Hi Wolfgang,
Why in the first example, the indentation of my Python code that I wish is
not respected and that I have to do as the second example to have what I
want ?
Thank you.
Fabrice
\defineframedtext
[algorithmframe]
[width=fit,
location=middle,
foregroundstyle={\tt
,
backgroundcolor=MyColorD,
location=depth]
\defineframedtext
[FramedText]
[offset=0.25em,
style=\ss,
toffset=\zeropoint,
background=color,
backgroundcolor=MyColorC,
foregroundstyle={\switchtobodyfont[10pt]},
align={right, broad
nce=0.1em]
\bTR
\bTD[width=.2\textwidth]Small \eTD
\bTD[width=0.05\textwidth] \eTD
\eTR
\eTABLE
\setupexternalfigures
[location=default]
\setupindenting
[yes, small]
\setupwhitespace
[small]
\definecolor [rosybrown:1][h=FFBCB3]
\defineframedtext
[prettyblock]
[
\textwidth]Small \eTD
\bTD[width=0.05\textwidth] \eTD
\eTR
\eTABLE
\setupexternalfigures
[location=default]
\setupindenting
[yes, small]
\setupwhitespace
[small]
\definecolor [rosybrown:1][h=FFBCB3]
\defineframedtext
[prettyblock]
[width=10cm,
indenting={yes, small
]
\bTR
\bTD[width=.2\textwidth]Small \eTD
\bTD[width=0.05\textwidth] \eTD
\eTR
\eTABLE
\setupexternalfigures
[location=default]
\setupindenting
[yes, small]
\setupwhitespace
[small]
\definecolor [rosybrown:1][h=FFBCB3]
\defineframedtext
[prettyblock]
[width=10cm,
indenting
style with a left border in the margin.
>>
>> I want the border to start and stop with the text. For the bottom I used
>> framedepth but the bar still goes too far on the top?
>>
>> \showframe
>> \showboxes
>> \defineframedtext[leftb
ugh hooks to control the spaces. For something
> like this, you can also use metapost to draw the background:
>
> \showframe
> \showboxes
> \defineframedtext[leftbartext][
> width=broad,
> frame=off,
> rulethickness=.5ex,
> background=mp:
On Sat, 20 Apr 2019, Gilles Waeber wrote:
Hi,
I'm trying to create a style with a left border in the margin.
I want the border to start and stop with the text. For the bottom I used
framedepth but the bar still goes too far on the top?
\showframe
\showboxes
\defineframedtext[leftbartext
Hi,
I'm trying to create a style with a left border in the margin.
I want the border to start and stop with the text. For the bottom I used
framedepth but the bar still goes too far on the top?
\showframe
\showboxes
\defineframedtext[leftbartext][
width=broad,
frame=off
Am Fri, Mar 08, 2019 at 03:43:20PM + schrieb Ursula Hermann:
> Dear List!
>
> I have the following example:
>
> \defineframedtext
> [prettyblock]
> [width=10cm,
>indenting={yes, small},
>background=color, backgroundcolor=lightgreen,
>foregroun
Dear List!
I have the following example:
\defineframedtext
[prettyblock]
[width=10cm,
indenting={yes, small},
background=color, backgroundcolor=lightgreen,
foreground=color, foregroundcolor=black ,
offset=2mm,
align=flushleft]
My problem is now:
how can I write, if I have
High list!
Another example, instead oft he cow, I took another figure:
\setuppapersize
[A5]
\setupexternalfigures
[location=default]
\setupindenting
[yes, small]
\setupwhitespace
[small]
\defineframedtext
[prettyblock]
[width=10cm,
indenting={yes, small},
background=color
the fact.
I'd write your example as follows.
\setuppapersize
[A5]
\setupexternalfigures
[location=default]
\setupindenting
[yes, small]
\setupwhitespace
[small]
\defineframedtext
[prettyblock]
[width=10cm,
indenting={yes, small},
background=color, backgroundcolor
to read and
easier to change the layout after the fact.
I'd write your example as follows.
\setuppapersize
[A5]
\setupexternalfigures
[location=default]
\setupindenting
[yes, small]
\setupwhitespace
[small]
\defineframedtext
[prettyblock]
[width=10cm,
indenting={yes, small},
le). Nothing wrong with mixing it, but
it's easier to read and easier to change the layout after the fact.
I'd write your example as follows.
\setuppapersize
[A5]
\setupexternalfigures
[location=default]
\setupindenting
[yes, small]
\setupwhitespace
[small]
\defineframedtext
[prettybloc
efineoverlay[MyFrame][\useMPgraphic{MyFrame}]
\defineframedtext
[MyText]
[frame=off,
background=MyFrame,
before={\blank[line,halfline]},
after={\blank[line]},
offset=\bodyfontsize,
width=\textwidth]
\defineenumeration[Theorem]
[alternative=empty,
title=yes,
titleleft=,
titleri
MyColorB][m=0.27,y=1]
\defineframed
[FrameTitle]
[frame=off,
foregroundstyle=\bfx\ss,
foregroundcolor=white,
background=color,
backgroundcolor=MyColorB,
location=depth]
\defineframedtext
[FramedText]
[offset=0.5em,
style=\ss,
toffset=.25\lineheight,
very well because the withdrawal of the text no
longer exists.
Thank you
Fabrice
\defineframedtext
[algorithmframe]
[width=fit,
background=color,
backgroundcolor=lightgray,
framecolor=darkred,
corner=round]
\definelines
[algorithm]
[space=on,
before=\startalgorithmframe
Hi Wolfgang,
You offered me the following code to write algorithms. It seems that this
does not function very well because the withdrawal of the text no longer
exists.
Thank you
Fabrice
\defineframedtext
[algorithmframe]
[width=fit,
background=color,
backgroundcolor=lightgray
]
[text={Question},
after={\blank[2*big]},
inbetween={\blank[nowhite]},
way=bychapter,
prefixsegments=chapter,
prefix=yes]
Put your questions in a framedtext environment.
\defineframedtext
[questionframe]
[before=\blank,
after=,
offset=none,
frame=off
h frames).
> \definecolor[MyColorA][s=0.8784]
> \definecolor[MyColorB][m=0.27,y=1]
>
> \defineframed
>[FrameTitle]
>[frame=off,
> foregroundstyle=\bfx\ss,
> foregroundcolor=white,
> background=color,
> backgroundcolor=MyColorB,
> location=dept
that (if that is possible with frames).
\definecolor[MyColorA][s=0.8784]
\definecolor[MyColorB][m=0.27,y=1]
\defineframed
[FrameTitle]
[frame=off,
foregroundstyle=\bfx\ss,
foregroundcolor=white,
background=color,
backgroundcolor=MyColorB,
location=depth]
\defineframedtext
[FramedText]
[offset
ote:
> > Hi Pablo,
> > These options are to be added to \defineframedtext [] [] ?
> > Without success at home !
>
> Hi Fabrice,
>
> your sample should read:
>
> \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
> \definecolor[MyColorB][c=0.00,m=0.27,
On 08/18/2018 11:11 AM, Fabrice Couvreur wrote:
> Hi Pablo,
> These options are to be added to \defineframedtext [] [] ?
> Without success at home !
Hi Fabrice,
your sample should read:
\definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
\definecolor[MyColorB][c=0.00,m=0.
Hi Pablo,
These options are to be added to \defineframedtext [] [] ?
Without success at home !
Fabrice
Le sam. 18 août 2018 à 10:17, Pablo Rodriguez a écrit :
> On 08/18/2018 01:08 AM, Fabrice Couvreur wrote:
> > Hello,
> > That's true Wolfgang, I just checked right now, sorry!
&
,
background=color,
backgroundcolor=MyColorB,
]
\defineframedtext
[FramedText]
[
offset=0.6em,
toffset=\lineheight,
background=color,
backgroundcolor=MyColorA,
foregroundstyle={\switchtobodyfont[10pt]},
align=verytolerant,
alternative=serried, % text
]
\defineornament
[FrameTitle]
[preset=lefttop]
[
frame=off,
foregroundstyle=\bfx,
foregroundcolor=white,
background=color,
backgroundcolor=MyColorB,
]
\defineframedtext
[FramedText]
[
offset=0.6em
filled in black !
> Thank you
> Fabrice
>
> \setupbodyfont [palatino,11pt]
>
> \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
> \definecolor[MyColorA][.75(MyColorB,white)]
>
> \defineframedtext
>[MyText]
>[frame=off,
> background=My
ColorB][c=0.00, m=0.62, y=1.00, k=0.00]
> \definecolor[MyColorA][.75(MyColorB,white)]
>
> \defineframedtext
>[MyText]
>[frame=off,
> background=MyFrame,
> width=\textwidth,
> location=right]
>
> \defineoverlay
>[MyFrame]
>[\useMPgra
Good evening,
In the code below, I get frames filled in black
!
Thank you
Fabrice
\setupbodyfont [palatino,11pt]
\definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
\definecolor[MyColorA][.75(MyColorB,white)]
\defineframedtext
[MyText]
[frame=off,
background=MyFrame,
width
d after don’t work with
framed texts.
Pablo
> In the following example it seems both keys are ignored:
>
>
> \defineframedtext[AddressBox][before=\red,after=\small]
>
> \starttext
>\green A
>\AddressBox{\cldcontext{"Hele"}}
>B
>
rawoptions (withpen pencircle scaled 1pt withcolor .625red) ;
b := a superellipsed .95 ;
draw b ;
b := (boundingbox p) superellipsed .95 ;
fill b withcolor .85white ;
draw b ;
draw p withcolor black ;
setbounds currentpicture to a ;
\stopuseMPgraphic
\defineoverlay[MyFrame][\u
ndingbox p) superellipsed .95 ;
fill b withcolor .85white ;
draw b ;
draw p withcolor black ;
setbounds currentpicture to a ;
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext
[FunnyText]
[frame=off,
background=FunnyFrame,
before={\blank[lin
le scaled 1pt withcolor .625red) ;
b := a superellipsed .95 ;
draw b ;
b := (boundingbox p) superellipsed .95 ;
fill b withcolor .85white ;
draw b ;
draw p withcolor black ;
setbounds currentpicture to a ;
\stopuseMPgraphic
\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]
\
b := a superellipsed .95 ;
draw b ;
b := (boundingbox p) superellipsed .95 ;
fill b withcolor .85white ;
draw b ;
draw p withcolor black ;
setbounds currentpicture to a ;
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext
[F
;
draw p withcolor black ;
setbounds currentpicture to a ;
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext
[FunnyText]
[frame=off,
background=FunnyFrame,
before={\blank[line,halfline]},
%before={\blank[line]},
after={\
aw p withcolor black ;
> setbounds currentpicture to a ;
> \stopuseMPgraphic
>
>
> \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
>
> \defineframedtext
> [FunnyText]
> [frame=off,
> background=FunnyFrame,
> before={\blank[line,halflin
eMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext
[FunnyText]
[frame=off,
background=FunnyFrame,
before={\blank[line,halfline]},
after={\blank[line]},
offset=\bodyfontsize,
width=\textwidth]
\defineenumeration[Theorem]
[title=no,
text=Theorem,
ipsed .95 ;
fill b withcolor .85white ; %.425green;%.
draw b ;
draw p withcolor black ;
setbounds currentpicture to a ;
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][frame=off,background=FunnyFrame,
offset=\bodyfontsize, width=\
}]
\defineframedtext[FunnyText][frame=off,background=FunnyFrame,
offset=\bodyfontsize, width=\textwidth]%\overlaywidth]%
\def\FrameTitle #1%
{\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut\ss\bf #1\hss}}}
\defineenumeration[Thm]
[%text=\thm,
style=,
title=yes,
prefix=yes
and, inside the body of your text, when you want \startMyFrame[Title=A
Title], and when to stop the frame with the \stopMyFrame command.
Have a look to the code below and test it (note that the frame is red in this
sample).
% Début de la définition d'un texte encadré en rouge
% Defining a f
o the code below and test it (note that the frame is red in this
sample).
% Début de la définition d'un texte encadré en rouge
% Defining a framed text
\defineframedtext
[MyFrame]
[before={\blank[3*big]},
after={\blank[5*big]},
frame=off,
backgrou
Hello,
Wolfgang offered me a way to present an algorithm.
Can not I center it ?
Thank you.
Fabrice
\definecolor[MyBlue][c=0.06 , m=0.03, y=0.00, k=0.00]
\defineframedtext
[algorithmframe]
[width=fit,
background=color,
foregroundstyle={\tt},
backgroundcolor=MyBlue
lorB][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,
>]
>
regroundcolor=white,
> background=color,
> backgroundcolor=MyColorB,
> ]
>
>
> \defineframedtext
> [FramedText]
> [
> offset=0.6em,
> toffset=\lineheight,
> background=color,
> backgroundcolor=MyColorA,
>
ackground=color,
backgroundcolor=MyColorB,
]
\defineframedtext
[FramedText]
[
offset=0.6em,
toffset=\lineheight,
background=color,
backgroundcolor=MyColorA,
foregroundstyle={\switchtobodyfont[10pt]},
align=verytolerant,
alte
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
apost).
>>
>> \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,
>> foregroundsty
e 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,
>> foregroundsty
[preset=lefttop]
> [
> frame=off,
> foregroundstyle=\bfx,
> foregroundcolor=white,
> background=color,
> backgroundcolor=MyColorB,
> ]
>
> \defineframedtext
> [FramedText]
> [
> offset=0.6em,
> toffset=\lineheight,
>
=\bfx,
foregroundcolor=white,
background=color,
backgroundcolor=MyColorB,
]
\defineframedtext
[FramedText]
[
offset=0.6em,
toffset=\lineheight,
background=color,
backgroundcolor=MyColorA,
foregroundstyle={\switchtobodyfont[10pt]},
align=verytolerant
eMPgraphic
\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}]
[MyFrame]
[\useMPgraphic{MyFrame}]
\defineframedtext
[MyFrame]
[frame=off,
foregroundstyle={\switchtobodyfont[8pt]},
background=MyFrame,
align={verytolerant},
height=fit]
\definefloat
[recipe]
[figure]
\setupfloat
[recipe]
[default={right,none}]
\showframe
\starttext
\p
1 - 100 of 348 matches
Mail list logo