caled \overlaywidth yscaled \overlayheight ;
> pickup pencircle scaled 1mm ;
> linecap := squared ;
> drawoptions(withcolor \MPcolor{darkred}) ;
> draw ulcorner p -- urcorner p ;
> setbounds currentpicture to p ;
> \stopuniqueMPgraphic
>
> \defineoverlay[titled
caled \overlaywidth yscaled \overlayheight ;
> pickup pencircle scaled 1mm ;
> linecap := squared ;
> drawoptions(withcolor \MPcolor{darkred}) ;
> draw ulcorner p -- urcorner p ;
> setbounds currentpicture to p ;
> \stopuniqueMPgraphic
>
> \defineoverlay[titled
scaled 1mm ;
linecap := squared ;
drawoptions(withcolor \MPcolor{darkred}) ;
draw ulcorner p -- urcorner p ;
setbounds currentpicture to p ;
\stopuniqueMPgraphic
\defineoverlay[titled][\uniqueMPgraphic{titled}]
\startuseMPgraphic{triangledone}
fill lltriangle scaled 4cm withcolor darkred
On Sun, Aug 6, 2017 at 4:11 PM, Hans Hagen <pra...@wxs.nl> wrote:
> in next beta
>
> % \setuphead[chapter][after={\markpage[chapter][+1]}]
> \setuphead[chapter][after={\markpage[chapter]\blank[2*big]}]
>
> \defineoverlay
> [whatever]
> [\doife
in next beta
% \setuphead[chapter][after={\markpage[chapter][+1]}]
\setuphead[chapter][after={\markpage[chapter]\blank[2*big]}]
\defineoverlay
[whatever]
[\doifelsemarkedpage{chapter}{CHAPTER}{}]
\setupbackgrounds
[page]
[background=whatever]
\starttext
test \page test \page test
> on chapter pages?
>
> one of the many ways ...
>
> \definelayer
> [chapter]
> [width=\paperwidth,
>height=\paperheight]
>
> \defineoverlay
> [pagebackground]
> [\directsetup{pagebackground}]
>
> \setupbackgrounds
> [page]
> [background=pageb
=\paperheight]
\defineoverlay
[pagebackground]
[\directsetup{pagebackground}]
\setupbackgrounds
[page]
[background=pagebackground]
\startsetups pagebackground
\doifelsemode {chapterpage} {
\setlayer
[chapter]
[preset=middle]
{\scale[width=\textwidth
...
\setuppagenumbering[alternative=doublesided]
\defineoverlay[mymargin][{\framed[frame=off,width=0.8in,height=0.8\textheight,offset=overlay,align={top}]{\doifrightpageelse{{\startalignment[flushleft]\getmarking[chapter]\stopalignment}}{{\startalignment[flushright]\getmarking[section]\stopalignment
rc := fullsquare xyscaled (50mm, 50mm);
color col; col := (1.,.1,.1);
drawoptions(withcolor \MPcolor{tred}) ;
draw rc withpen pencircle scaled (2.5mm) ;
label(textext("\setupbodyfont[sans,35mm] \color[tred]{Test}"), (80mm,
50mm)) ;
\stopuseMPgraphic
\defineoverlay[T][\useMPgrap
;
label(textext("\setupbodyfont[sans,35mm] \color[tred]{Test}"), (80mm,
50mm)) ;
\stopuseMPgraphic
\defineoverlay[T][\useMPgraphic{T}]
\setupbackgrounds[page][background={foreground,T}]
\startTEXpage[width=200mm,height=200mm]
\stopTEXpage
See ch. 8.2 of the metafun
);
draw thelabel(btex\setupbodyfont[sans,35mm] Test etex, (80mm, 50mm))
withcolor %col
transparent(1, .4, col)
;
\stopuseMPgraphic
\defineoverlay[T][\useMPgraphic{T}]
\setupbackgrounds[page][background={foreground,T}]
\startTEXpage[width=200mm,height=200mm]
\stopTEXpage
encircle withcolor \MPcolor{red}) ;
>> draw .5[llcorner p, lrcorner p]--.5[ulcorner p, urcorner p] ;
>> setbounds currentpicture to p ;
>>
>> \stopuniqueMPgraphic
>>
>> \defineoverlay[Vertical][\uniqueMPgraphic{Vertical}]
>>
>> \startsetups[table:initi
t; linecap:=squared ;
> path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
> drawoptions (withpen pencircle withcolor \MPcolor{red}) ;
> draw .5[llcorner p, lrcorner p]--.5[ulcorner p, urcorner p] ;
> setbounds currentpicture to p ;
>
>\stopuniqueMPgraphic
[llcorner p, lrcorner p]--.5[ulcorner p, urcorner p] ;
setbounds currentpicture to p ;
\stopuniqueMPgraphic
\defineoverlay[Vertical][\uniqueMPgraphic{Vertical}]
\startsetups[table:initialize]
\setupTABLE[start]
[align={middle,lohi},offset=0.5ex,width=1.5cm,
foregroundstyle
Pcolor{\overlaycolor} ;
> draw p withcolor \MPcolor{\overlaylinecolor} ;
> \stopuniqueMPgraphic
> \setuplayout[grid=yes]
> \defineoverlay[MyBackgroundLayer][\uniqueMPgraphic{MyShape}]
>
> \define[1]\MyExoCommand{%
> \lower\strutdepth\hbox{\startframed
> [backgroun
pencircle scaled \overlaylinewidth ;
fill p withcolor \MPcolor{\overlaycolor} ;
draw p withcolor \MPcolor{\overlaylinecolor} ;
\stopuniqueMPgraphic
\setuplayout[grid=yes]
\defineoverlay[MyBackgroundLayer][\uniqueMPgraphic{MyShape}]
\define[1]\MyExoCommand{%
\lower\strutdepth
}
path p ;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
pickup pencircle scaled \overlaylinewidth ;
fill p withcolor \MPcolor{\overlaycolor} ;
draw p withcolor \MPcolor{\overlaylinecolor} ;
\stopuniqueMPgraphic
\defineoverlay[MyBackgroundLayer
\startreusableMPgraphic{header:background}
> fill OverlayBox
>leftenlarged BackSpace
>rightenlarged CutSpace
>topenlarged TopSpace
>withcolor OverlayColor ;
> setbounds currentpicture to OverlayBox
>enlarged max(BackSpace,CutSpace) ;
> \stopreusab
r
\startreusableMPgraphic{header:background}
fill OverlayBox
leftenlarged BackSpace
rightenlarged CutSpace
topenlarged TopSpace
withcolor OverlayColor ;
setbounds currentpicture to OverlayBox
enlarged max(BackSpace,CutSpace) ;
\stopreusableMPgraphic
\defineoverlay[header:ba
darkred;
setbounds currentpicture to unitsquare xyscaled (OverlayWidth,OverlayHeight);
\stopuseMPgraphic
}
\defineoverlay[chapnum][\useMPgraphic{chapnum}]
\define[1]\mychaptext{%
\startcolumnsetspan[intro]
\startframedtext[align={middle,lohi},background=chapnum,frame=on,framecolor=darkyellow
text
> >> > [MyFrame]
> >> > [before={\blank},
> >> >after={\blank},
> >> >frame=off,
> >> >background=MyFrame,
> >> >width=6cm,
> >> >height=fit]
> >> >
> >> > \startuseMPg
\tfx\white\framedtextparameter{Title}");
>> > p := p shifted (2BodyFontSize,OverlayHeight-ypart center
>> > p+.25ExHeight);
>> > b := boundingbox p enlarged .3EmWidth ;
>> > fill OverlayBox withcolor \MPcolor{MyColorA};
>> > fill b withcolor \MPcol
oundingbox p enlarged .3EmWidth ;
> > fill OverlayBox withcolor \MPcolor{MyColorA};
> > fill b withcolor \MPcolor{MyColorB} ;
> > draw p ;
> > setbounds currentpicture to boundingbox currentpicture enlarged 2mm ;
> > \stopuseMPgraphic
> >
> > \defineoverl
e,OverlayHeight-ypart center p+.25ExHeight);
> 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
t center p+.25ExHeight);
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}]
y=0.20, k=0.00]
>
>
> \defineframedtext
> [MyDefinition]
> [before={\blank[line,halfline]},
>after={\blank},
>frame=off,
>background=MyFrame,
>width=\textwidth,
>height=fit,
>location=left,
>style=italic]
>
> \defineoverlay
&
I make a C-c C-c, all I get is the text in italics, the macro is not
>>> compiled.
>>> Thanks,
>>> Fabrice
>>>
>>> % macros=mkvi
>>>
>>> \setupcolors[state=start]
>>> \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
>&
t; % macros=mkvi
>
> \setupcolors[state=start]
> \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
> \definecolor[MyColorA][c=0.00, m=0.10, y=0.20, k=0.00]
>
>
> \defineframedtext
> [MyDefinition]
> [before={\blank[line,halfline]},
>after={\blank},
is the text in italics, the macro is
>not
>>> compiled.
>>> Thanks,
>>> Fabrice
>>>
>>> % macros=mkvi
>>>
>>> \setupcolors[state=start]
>>> \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
>>> \definecolor[MyColorA][c=0.00,
color[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
>> \definecolor[MyColorA][c=0.00, m=0.10, y=0.20, k=0.00]
>>
>>
>> \defineframedtext
>> [MyDefinition]
>> [before={\blank[line,halfline]},
>>after={\blank},
>>frame=off,
>&g
efore={\blank[line,halfline]},
> after={\blank},
> frame=off,
> background=MyFrame,
> width=\textwidth,
> height=fit,
> location=left,
> style=italic]
>
>\defineoverlay
> [MyFrame]
> [\useMPgraphic{MyFrame}]
>
>\definelabel
> [Définition]
&
=\textwidth,
height=fit,
location=left,
style=italic]
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\definelabel
[Définition]
[headstyle=\bf\smallcaps]
\startuseMPgraphic{MyFrame}
path b ;
picture p ;
p := textext.rt("\white\Définition") ;
p :=
ntpicture
enlarged 2mm ;
\stopuseMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\starttext
\startlinecorrection[blank]
\startmidaligned
\startcombination[2*2]
{\startMyFr
shifted (2BodyFontSize,OverlayHeight-ypart center
>>> p+.25ExHeight);
>>> b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
>>> fill OverlayBox withcolor \MPcolor{MyColorA};
>>> fill b withcolor darkred ;
>>> draw p;
>>> se
itle}");
>> p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight);
>> b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
>> fill OverlayBox withcolor \MPcolor{MyColorA};
>> fill b withcolor darkred ;
>> draw p;
>> setbounds
eMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\starttext
\startlinecorrection[blank]
\startmidaligned
\startcombination[2*2]
{\startMyFrame[Title=ALGO A]
One
\stopMyFrame}{}
{\startMyFrame[Title=ALGO B]
Two
\stopMyFrame}{}
{\startMyFrame[Title=ALGO C]
Three
\stopMyFrame}{}
{\st
t center p+.25ExHeight);
b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
fill OverlayBox withcolor \MPcolor{MyColorA};
fill b withcolor darkred ;
draw p;
setbounds currentpicture to boundingbox currentpicture enlarged 2mm ;
\stopuseMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraph
layBox withpen pencircle scaled 1pt withcolor
darkred;
draw topboundary OverlayBox withpen pencircle scaled 1pt withcolor
darkred;
draw p;
setbounds currentpicture to boundingbox currentpicture enlarged 2mm;
\stopuseMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
% Fin de la définitio
to boundingbox currentpicture enlarged 2mm;
\stopuseMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
% Fin de la définition d'un texte encadré en rouge
\starttext
\dorecurse{4}{
\input ward
\startMyFrame[Title=Avertissement]
La plupart des termes et des expressions qui doivent attirer l'
or
darkred;
draw topboundary OverlayBox withpen pencircle scaled 1pt withcolor
darkred;
draw p;
setbounds currentpicture to boundingbox currentpicture enlarged 2mm;
\stopuseMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
% Fin de la définition d'un texte encadré en rouge
\startte
ox currentpicture enlarged 2mm;
\stopuseMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
% end framed text settings
___
If your question is of interest to others as well, please add an entry to the
Wiki!
mailli
lightgray; %\MPcolor{
fill b withcolor darkred;
draw bottomboundary OverlayBox withpen pencircle scaled 1pt withcolor
darkred;
draw topboundary OverlayBox withpen pencircle scaled 1pt withcolor
darkred;
draw p;
setbounds currentpicture to boundingbox currentpicture enlarged 2mm;
\stopuseMPgra
> fill b withcolor darkred;
> draw bottomboundary OverlayBox withpen pencircle scaled 1pt withcolor
> darkred;
> draw topboundary OverlayBox withpen pencircle scaled 1pt withcolor
> darkred;
> draw p;
> setbounds currentpicture to boundingbox currentpicture enlarged 2mm;
>
kred;
draw p;
setbounds currentpicture to boundingbox currentpicture enlarged 2mm;
\stopuseMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\starttext
\startMyFrame
\input knuth
\stopMyFrame
\startMyFrame
\input knuth
\stopMyFrame
\startMyFrame[Title=Hans]
\input knuth
\stopMy
entpicture to boundingbox currentpicture enlarged 2mm;
\stopuseMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\starttext
\startMyFrame
\input knuth
\stopMyFrame
\startMyFrame
\input knuth
\stopMyFrame
2016-07-26 16:15 GMT+02:00 Hans Hagen <pra...@wxs.nl>:
> On 7/26/20
picture enlarged 2mm;
\stopuseMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\starttext
\startSomeText{SomeText1}
\input knuth
\stopSomeText
\startSomeText{SomeText2}
\input knuth
\stopSomeText
\stoptext
Thanks
Fabrice
2016-07-26 12:34 GMT+02:00 Hans Hagen <pra...@wxs.nl
<mailto:pra
mboundary OverlayBox withpen pencircle scaled 1pt withcolor
darkred;
draw topboundary OverlayBox withpen pencircle scaled 1pt withcolor
darkred;
draw p;
setbounds currentpicture to boundingbox currentpicture enlarged 2mm;
\stopuseMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraphic{M
ingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth;
>> fill OverlayBox withcolor \MPcolor{lightgray};
>> fill b withcolor darkred;
>> draw bottomboundary OverlayBox withpen pencircle scaled 1pt withcolor
>> darkred;
>> draw topboundary Overl
r
darkred;
draw p;
setbounds currentpicture to boundingbox currentpicture enlarged 2mm;
\stopuseMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\starttext
\showframe
\startMyDefinition
\input knut
OverlayBox withpen pencircle scaled 1pt withcolor
darkred;
draw p;
setbounds currentpicture to boundingbox currentpicture enlarged 2mm;
\stopuseMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\starttext
\showframe
\startMyDefinition
\input knuth
\stopMyDefinition
4
withcolor \MPcolor{\overlaycolor} ;
\stopreusableMPgraphic
\defineoverlay [star] [\reuseMPgraphic{star}]
\starttext
\startframed
[frame=off,background=star,backgroundcolor=lightgray,align=text] Wow\\
a star!
\stopframed
\stoptext
You get the idea... (but keep in mind Edward Tufte
mbering[location=footer]
>>
>> \startusableMPgraphic{NumberHead}
>> picture r ;
>> r := image ( graphictext
>> \MPstring{chapter}
>> scaled 4pt
>> withfillcolor \MPcolor{lightgray}
>> withpen pencircle scal
ad}
> picture r ;
> r := image ( graphictext
> \MPstring{chapter}
> scaled 4pt
> withfillcolor \MPcolor{lightgray}
> withpen pencircle scaled 1pt ; ) ;
> draw r ;
> \stopusableMPgraphic
>
> \defineoverlay[NumberHead
footer]
\startusableMPgraphic{NumberHead}
picture r ;
r := image ( graphictext
\MPstring{chapter}
scaled 4pt
withfillcolor \MPcolor{lightgray}
withpen pencircle scaled 1pt ; ) ;
draw r ;
\stopusableMPgraphic
\defineoverlay[NumberHead][\uniqueMPg
\defineoverlay[NumberHead][\uniqueMPgraphic{NumberHead}]
\def\processMPheadnumber#1%
{\setMPtext{chapter}{\bf#1}
\useMPgraphic{NumberHead}}
\unexpanded\def\HeadTitle#1#2%
{\framed
[frame=off,
bottomframe=on,
width=broad,
align={broad,nothyphenated,left}]
{#1\blank
1cm smoothed 1.2 ;
\stopuseMPgraphic
\defineoverlay[head][\uniqueMPgraphic{head}]
\def\Headed#1%
{\framed
[background=head,frame=off,offset=overlay]
{\color[white]{#1}}}
\unexpanded\def\HeadTitle#1#2%
{\framed
[frame=off,
bottomframe=on,
width=broad,
align={broad
] withpen pencircle scaled 2bp ;
\stopMPpositiongraphic
\startpositionoverlay{arrow}
\setMPpositiongraphic{X-1}{mypos:arrow}{to=X-2}
\setMPpositiongraphic{X-2}{mypos:arrow}{to=X-3}
\stoppositionoverlay
\defineoverlay[arrow][\positionoverlay{arrow}]
\setupbackgrounds[page][background=arrow]
\starttext
box(\MPpos{\MPvar{to}});
>c[2] := cxy ;
>drawarrow c[1] -- c[2] withpen pencircle scaled 2bp ;
> \stopMPpositiongraphic
> \startpositionoverlay{arrow}
> \setMPpositiongraphic{X-1}{mypos:arrow}{to=X-2}
> \setMPpositiongraphic{X-2}{mypos:arrow}{to=X-3}
> \stopposition
\startpositionoverlay{arrow}
\setMPpositiongraphic{X-1}{mypos:arrow}{to=X-2}
\setMPpositiongraphic{X-2}{mypos:arrow}{to=X-3}
\stoppositionoverlay
\defineoverlay[arrow][\positionoverlay{arrow}]
\setupbackgrounds[page][background=arrow]
\starttext
\section {Anchors and layers}
In a previous section
; anchors.
>
> \startpositionoverlay{arrow}
> \setMPpositiongraphic{X-1}{mypos:arrow}{to=X-2}
> \setMPpositiongraphic{X-2}{mypos:arrow}{to=X-3}
> \stoppositionoverlay
>
>
> 3. Define an overlay that is mapped to MP position overlay.
>
> \defineoverlay[arrow][\positionoverl
but you can do a lot when you use Metapost to
draw the background.
\startuniqueMPgraphic{TextBackground}
path p ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
draw p topenlarged 5mm ;
setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic
\defineoverlay[Te
htenlarged CutSpace
topenlarged TopSpace
withcolor OverlayColor ;
setbounds currentpicture to OverlayBox
enlarged max(BackSpace,CutSpace) ;
\stopreusableMPgraphic
\defineoverlay[header:background][\reuseMPgraphic{header:background}]
\define[2]\MySlide{\framed[
frame=off,
nnotationcontent` way, but there I get the
>>>> same error. Here's the full example:
>>>>
>>>> \starttext
>>>>
>>>> \definelayer [pagenumber][width=\overlaywidth,height=\overlayheight]
>>>> \defineoverlay[pagenumber][{\dire
tried it the `\placeannotationcontent` way, but there I get the
same error. Here's the full example:
\starttext
\definelayer [pagenumber][width=\overlaywidth,height=\overlayheight]
\defineoverlay[pagenumber][{\directsetup{pagenumber}\tightlayer[pagenumber]}]
\startsetups pagenumber
\setlayerframed
[pagenumber]
[
contents of the annotation. I've
>> also tried it the `\placeannotationcontent` way, but there I get the
>> same error. Here's the full example:
>>
>> \starttext
>>
>> \definelayer [pagenumber][width=\overlaywidth,height=\overlayheight]
>> \defineoverlay[pagenu
rttext
\definelayer [pagenumber][width=\overlaywidth,height=\overlayheight]
\defineoverlay[pagenumber][{\directsetup{pagenumber}\tightlayer[pagenumber]}]
\startsetups pagenumber
\setlayerframed
[pagenumber]
[preset=rightbottom]
{\getvariable{table}{p}}
\stopsetups
\define[2]\PageWrapper{\setgvariable{table}
gt; Best for me would be if I could define the text directly within the
>>>> cell. I'm surely open to a completely different solution that has the
>>>> same outcome.
>>>>
>>>> Here's the minimal example of what I currently have.
>>
ently have.
\starttext
\definelayer [pagenumber][width=\overlaywidth,height=\overlayheight]
\defineoverlay[pagenumber][{\directsetup{pagenumber}\tightlayer[pagenumber]}]
\startsetups pagenumber
\setlayerframed
[pagenumber]
[preset=rightbottom]
{p}
\stopsetups
\bTABLE
\
t;>
>> Here's the minimal example of what I currently have.
>>
>> \starttext
>>
>> \definelayer [pagenumber][width=\overlaywidth,height=\overlayheight]
>> \defineoverlay[pagenumber][{\directsetup{pagenumber}\tightlayer[pagenumber]}]
>>
>>
rlayheight]
\defineoverlay[pagenumber][{\directsetup{pagenumber}\tightlayer[pagenumber]}]
\startsetups pagenumber
\setlayerframed
[pagenumber]
[preset=rightbottom]
{p}
\stopsetups
\bTABLE
\setupTABLE[each][each][background=pagenumber]
\bTR
\bTD multiline \par text \eTD
\bTD
uld define the text directly within the
cell. I'm surely open to a completely different solution that has the
same outcome.
Here's the minimal example of what I currently have.
\starttext
\definelayer [pagenumber][width=\overlaywidth,height=\overlayheight]
\defineoverlay[pagenumber][{\directsetup{
black ;
setbounds currentpicture to a ;
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[Thm]
[frame=off,
background=FunnyFrame,
offset=\bodyfontsize,
%increment=yes,
width=\textwidth,
before={\blank[big]},
after={\incrementnumber[ThmNumber]\blank
) ;
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[Thm]
[frame=off
to a ;
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][frame=off,background=FunnyFrame,
offset=\bodyfontsize, width=\textwidth]%\overlaywidth]%
\def\StTheorem{\startFunnyText\startTheorem}
\def\SpTheorem {\stopTheorem\stopFunnyText }
\def
currentpicture to OverlayBox ;
\stopuseMPgraphic
\defineoverlay[Title][\useMPgraphic{Title}]
\defineframedtext
[MyTitle]
[before={\blank[line,halfline]},
after={\blank},
frame=off,
background=Title,
width=\textwidth,
height=fit,
]
\starttext
\startMyTitle
\startMPcode
seMPgraphic{Title}
>>
>>path p ; p := OverlayBox ;
>>fill OverlayBox withcolor pagecolor ;
>>setbounds currentpicture to OverlayBox ;
>>
>> \stopuseMPgraphic
>>
>> \defineoverlay[Title][\useMPgraphic{Title}]
>>
>> \defineframedtext
>&g
gecolor} ;
>>>>color textcolor ; textcolor := \MPcolor{textcolor} ;
>>>> \stopMPinclusions
>>>>
>>>> \setMPtext{title}{Serie statistiques à deux variables}
>>>>
>>>> \startuseMPgraphic{Title}
>>>>
>>>&
olor := \MPcolor{pagecolor} ;
>>>color textcolor ; textcolor := \MPcolor{textcolor} ;
>>> \stopMPinclusions
>>>
>>> \setMPtext{title}{Serie statistiques à deux variables}
>>>
>>> \startuseMPgraphic{Title}
>>>
>>>path
\defineoverlay[Title][\useMPgraphic{Title}]
\defineframedtext
[MyTitle]
[before={\blank[line,halfline]},
after={\blank},
frame=off,
background=Title,
width=\textwidth,
height=fit,
]
\starttext
\startMyTitle
\startMPcode
numeric k ; k :=0 ;
string s ; s := \MPstring{title} ;
picture r
0.3, m=0.00, y=0.00, k=0.05]
>
> \definecolor[MyColorD][c=0.6, m=0.00, y=0.00, k=0.10]
>
>
> \defineframedtext
> [MyDefinition]
> [before={\blank},
>after={\blank},
>frame=off,
>background=MyFrame,
>width=\textwidth,
>height=fit,
>loca
]
\definecolor[MyColorD][c=0.6, m=0.00, y=0.00, k=0.10]
\defineframedtext
[MyDefinition]
[before={\blank},
after={\blank},
frame=off,
background=MyFrame,
width=\textwidth,
height=fit,
location=left,
style=italic]
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\definelabel
on]
> [before={\blank},
>after={\blank},
>frame=off,
>background=MyFrame,
>width=\textwidth,
>height=fit,
>location=left,
>style=italic]
>
> \defineoverlay
> [MyFrame]
> [\useMPgraphic{MyFrame}]
>
> \definelabel
> [Défini
defineframedtext
[MyDefinition]
[before={\blank},
after={\blank},
frame=off,
background=MyFrame,
width=\textwidth,
height=fit,
location=left,
style=italic]
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\definelabel
[Définition]
[headstyle=\bf\smallcaps]
\startuseM
]
\definecolor[MyColorA][.75(MyColorB,white)]
\definecolor[MyColorC][c=0.3, m=0.00, y=0.00, k=0.05]
\defineframedtext
[MyDefinition]
[before={\blank},
after={\blank},
frame=off,
background=MyFrame,
width=\textwidth,
height=fit,
location=left,
style=italic]
\defineoverlay
Hi,
I want to draw the left border of the rectangle, but it is drawn in the
middle.
Why ?
Thank you,
Fabrice
\setupcolors[state=start]
\definecolor[MyColorA][c=0.3, m=0.00, y=0.00, k=0.05]
\defineoverlay
[Funny]
[\useMPgraphic{Funny}]
\startuseMPgraphic{Funny}
interim linecap
in the
middle.
Why ?
Thank you,
Fabrice
\setupcolors[state=start]
\definecolor[MyColorA][c=0.3, m=0.00, y=0.00, k=0.05]
\defineoverlay
[Funny]
[\useMPgraphic{Funny}]
\startuseMPgraphic{Funny}
interim linecap := butt ;
path p ;
p := unitsquare xyscaled
2015, at 10:56, Fabrice Couvreur fabrice1.couvr...@gmail.com
wrote:
Hi,
I want to draw the left border of the rectangle, but it is drawn in the
middle.
Why ?
Thank you,
Fabrice
\setupcolors[state=start]
\definecolor[MyColorA][c=0.3, m=0.00, y=0.00, k=0.05]
\defineoverlay
[state=start]
\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=\textwidth,
height=fit,
location=left,
style=italic]
\defineoverlay
[MyFrame
scaled 8pt withcolor darkcolor ;
endfor ;
endfor ;
\stopuseMPgraphic
\defineoverlay[CoverPage][\useMPgraphic{CoverPage}]
\setupbackgrounds
[rightpage]
[background=CoverPage]
\starttext
\stoptext
[MyText]
[frame=off,
background=MyFrame,
width=\textwidth,
height=fit,
location=left,
style=italic]
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\definelabel
[Définition]
[headstyle=\bf\smallcaps]
\startuseMPgraphic{MyFrame}
path b ;
picture p ;
p
]
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\definelabel
[Définition]
[headstyle=\bf\smallcaps]
\startuseMPgraphic{MyFrame}
path b ;
picture p ;
p := textext.rt(\white\Définition) ;
p := p shifted (2BodyFontSize,OverlayHeight-ypart center
p+.25ExHeight
[MyColorA][.75(MyColorB,white)]
\defineframedtext
[MyText]
[frame=off,
background=MyFrame,
width=\textwidth,
height=fit,
location=left,
style=italic]
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\definelabel
[Définition]
[headstyle=\bf\smallcaps]
\startuseMPgraphic
currentpicture to p ;
\stopuniqueMPgraphic
\defineoverlay[titled][\uniqueMPgraphic{titled}]
\define[2]\ChapterCommand
{\setbox\scratchbox\hbox to \leftmarginwidth{#1\hss}%
\hskip-\dimexpr\leftmarginwidth+\leftmargindistance\relax
\framed
[background=titled,frame=off,offset=0pt]
{\box
:= unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
pickup pencircle scaled 1mm ;
drawoptions(withcolor .625yellow) ;
draw llcorner p--lrcorner p ;
setbounds currentpicture to p ;
\stopuniqueMPgraphic
\defineoverlay[titled][\uniqueMPgraphic{titled}]
\def\ChapterCommand#1#2
\defineoverlay[titled][\uniqueMPgraphic{titled}]
\def\ChapterCommand#1#2%
{\setbox0=\hbox to \leftmarginwidth{#1\hss}%
\hskip-\leftmarginwidth
\hskip-\leftmargindistance
\framed
[background=titled,frame=off,offset=0pt]
{\box0
\hskip\leftmargindistance
#2}}
\setuphead
currentpicture to p ;
\stopuniqueMPgraphic
\defineoverlay[titled][\uniqueMPgraphic{titled}]
\def\ChapterCommand#1#2%
{\setbox0=\hbox to \leftmarginwidth{#1\hss}%
\hskip-\leftmarginwidth
\hskip-\leftmargindistance
\framed
[background=titled,frame=off,offset=0pt]
{\box0
)]
\defineframedtext
[MyText]
[frame=off,
background=MyFrame,
width=\textwidth,
location=right]
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\definelabel
[Définition]
[headstyle=\bf\smallcaps]
\startuseMPgraphic{MyFrame}
path b ;
picture p
,
location=right]
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\definelabel
[Définition]
[headstyle=\bf\smallcaps]
\startuseMPgraphic{MyFrame}
path b ;
picture p ;
p := textext.rt(\white\Définition) ;
p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight
Définition 1, Définition 2 ...
Thank you,
Fabrice
\setupbodyfont [palatino,11pt]
\setupcolors[state=start,cmyk=yes]
\definecolor[MyColor][c=0.00, m=0.10, y=0.20, k=0.00]
\definecolor[myColor][c=0.00, m=0.62, y=1.00, k=0.00]
\defineoverlay[MyFrame][\useMPgraphic{MyFrame
, k=0.00]
\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]
\defineframedtext
[MyText]
[frame=off,
background=MyFrame,
width=\textwidth,
location=right]
\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]
\def\StartFrame{\startMyText}
\def\StopFrame{\startMyText}
\def\FrameTitle
201 - 300 of 788 matches
Mail list logo