) ;
fill SavedShape withcolor red;
setbounds currentpicture to OverlayBox;
\stopuseMPgraphic
\showframe
\defineoverlay[myoverlay][\useMPgraphic{shape:2}]
\setupbackgrounds[text][text][background=myoverlay]
\startsection[title={test}]
\startshapedparagraph[mp=shape:1]%
\setupalign[verytolera
;
build_parshape(p,0,0,0,\baselinedistance,\strutheight,\strutdepth,\topskip) ;
fill p withcolor \MPcolor{tan};
\stopuseMPgraphic
\defineoverlay[myoverlay][\useMPgraphic{mymetafunpath}]
%--
\define[2]\MySubSectionCommand
;
drawoptions (withpen pencircle scaled .25pt withcolor blue) ;
draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h) ;
%draw boundingbox p ; %%%quitamos el frame pequeño
setbounds currentpicture to unitsquare xyscaled(w,h) ;
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame
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
,myheighta) -- (4cm,myheightb) -- (6cm,myheightb)
--
(6cm,myheight) -- (0cm,myheight) -- cycle;
build_parshape(p,0,0,0,\baselinedistance,\strutheight,\strutdepth,\topskip) ;
fill p withcolor \MPcolor{lightyellow};
\stopuseMPgraphic
\defineoverlay[ol1][\useMPgraphic{mp1
fullsquare xscaled r yscaled e shifted (r/2, h/2) withcolor darkred;
\stopuseMPgraphic
\defineoverlay [MonGraphisme_OL] [\useMPgraphic{MonGraphisme_MP}]
\setupbackgrounds [footer] [rightmargin] [background={MonGraphisme_OL}]
\starttext
\dorecurse{10}{\input tufte\page}
\stoptext
Any clue is warmly
darkred;
\stopuseMPgraphic
\defineoverlay [MonGraphisme_OL] [\useMPgraphic{MonGraphisme_MP}]
\setupbackgrounds [footer] [rightmargin] [background={MonGraphisme_OL}]
\starttext
\dorecurse{10}{\input tufte\page}
\stoptext
Any clue is warmly welcome
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}]
\setupwhitespace[medium]
\
tch_amount := 1 + (uniformdeviate 2);
sketch_passes := 3;
sketch_segments := 2 + (uniformdeviate 3);
sketch_length := OverlayWidth / 3;
draw topboundary withpen pensquare withcolor lightgray;
naturalizepaths;
\stopuseMPgraphic
\defineoverlay[sketchylines][\useMPgraphic{mp:sketchy}]
\setupTABLE[
(OverlayBox is the size
of the cell).
begin example
\startuseMPgraphic{dottedborder}
draw OverlayBox withpen pencircle scaled 2 dashed withdots
withcolor "red";
\stopuseMPgraphic
\defineoverlay[dottedborder][\useMPgraphic{dottedborder}]
\starttext
\bTABLE[frame=off,
example
\startuseMPgraphic{dottedborder}
draw OverlayBox withpen pencircle scaled 2 dashed withdots withcolor
"red";
\stopuseMPgraphic
\defineoverlay[dottedborder][\useMPgraphic{dottedborder}]
\starttext
\bTABLE[frame=off,background=dottedborder]
Thank you!
Since I needed only horizo
OverlayBox withpen pencircle scaled 2 dashed withdots withcolor
"red";
\stopuseMPgraphic
\defineoverlay[dottedborder][\useMPgraphic{dottedborder}]
\starttext
\bTABLE[frame=off,background=dottedborder]
\bTR
\bTD Hello Table! \eTD
\eTR
\eTABLE
\stoptext
end example
ed 1mm rightenlarged 1mm; draw topboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;\stopuseMPgraphic\defineoverlay [verticalrule] [\useMPgraphic{verticalrule3}]\setuppagenumbering[state=stop]\setupexternalfigures[location={local,defalut}]\definecolumnset [quiz] [n=2,background=vertic
leftenlarged 1mm rightenlarged 1mm;\stopuseMPgraphic\defineoverlay [verticalrule] [\useMPgraphic{verticalrule3}]\setuppagenumbering[state=stop]\setupexternalfigures[location={local,defalut}]\definecolumnset [quiz] [n=2,background=verticalrule]\setupbodyfont[bonum, rm, 11pt]\starttext %\startcolumns[n=2
themselves.
Basically one can sign (with some certificate) and then validate.
% sign-001.tex
\setupinteraction[state=start]
\definefield[signature][signed]
\defineoverlay[signature][my signature]
\starttext
\startTEXpage[offset=1ts,frame=on,framecolor=darkblue]
sign: \inframed
xyscaled
(OverlayWidth-OverlayLineWidth,OverlayHeight-OverlayLineWidth)
withpen pencircle scaled OverlayLineWidth
withcolor OverlayColor ;
\stopusableMPgraphic
\defineoverlay[MetaCirc][\useMPgraphic{MetaCirc}]
a\dontleavehmode\framed
[background=MetaCirc,
bac
On 11/5/2023 7:23 AM, anton.chig...@mail.com wrote:
I want to use \bigcirc to encircle text.
Is there a way to do it.
if you're wiling to compensate for its depth:
\defineoverlay
[BigCirc]
[{\scale
[width=\overlaywidth]
{\setbox0\hpack{\bigcirc}\raise\dp0\box0}}]
\framed
;
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
ndingbox p enlarged (o/10);
drawoptions (withpen pencircle scaled 1pt withcolor black);
draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner b,h);
draw b;
setbounds currentpicture to OverlayBox;
\stopuseMPgraphic
\defineoverlay
[CountFrame]
[\useMPgraphic{
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
cture cross;
> cross := image(draw (0,0)--(1,1); draw (0,1)--(1,0););
> draw cross xscaled \overlaywidth yscaled \overlayheight withpen pencircle
> scaled .8pt ;
> \stopuniqueMPgraphic
>
> \defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}]
>
> \define[1]\cancel{%
>
;
\stopuniqueMPgraphic
\defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}]
\define[1]\cancel{%
\ifmmode
\mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\else%
\framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\fi%
}
Maybe something else is available nowadays
ter the meeting) but here is one:
>
> \starttext
>
> \defineoverlay
>[test]
>[\color
> [blue]
> {TEST
>\inframed
> [foregroundcolor=red]
> {xxx}
>TEST}]
>
> \fr
Hi,
I uploaded a new lmtx. There are some new features that wil be revealed
in the future (likely after the meeting) but here is one:
\starttext
\defineoverlay
[test]
[\color
[blue]
{TEST
\inframed
[foregroundcolor=red]
{xxx
2)) ...
> endfor
> (OverlayWidth,yoffset)--(OverlayWidth,0)--cycle;
> fill wave withcolor "Sea";
> endfor;
>
> pair pos;
> pos := (OverlayWidth * RealPageNumber/NOfPages, height/2 randomized 2);
> path ship;
> ship := (0,10)---(70,10)...(60,0)---(10,0)...cycle;
&
= (0,10)---(70,10)...(60,0)---(10,0)...cycle;
fill ship xysized (10,5) shifted pos rotatedaround (pos, 15) withcolor red;
\stopuseMPgraphic
\defineoverlay[Waves][\useMPgraphic{Waves}]
\setupbackgrounds[state=repeat]
\setupbackgrounds[page][background={Waves}]
\starttext
\dorecurse{10}{\recurs
\setupbackgrounds[state=repeat].
\setuppapersize[SW]
\startuseMPgraphic{Blocks}
fill unitsquare xysized (OverlayWidth * PageNumber / LastPageNumber,
OverlayHeight) withcolor blue;
%setbounds currentpicture to OverlayBox;
\stopuseMPgraphic
\defineoverlay[Blocks][\useMPgraphic{Blocks}]
\setupbackgrounds[state
tsquare xysized (800 * RealPageNumber/NOfPages, 50) withcolor blue;
\stopuseMPgraphic
\defineoverlay[Blocks][\useMPgraphic{Blocks}]
\setupbackgrounds[footer][background={Blocks}]
\starttext
\dorecurse{10}{\recurselevel\page}
\stopt
r[Gebuesch]
Hier versteckt sich ein Wolf...
\stopviewerlayer
Bäume, Bäume, Bäume...
\viewerlayer[Gebuesch]{... und ein Rotkehlchen}
\startviewerlayer[Versteck]Rumpelwicht\stopviewerlayer
\defineoverlay[MitVersteck]
[{\overlayrollbutton[VideLayer{Versteck}][HideLayer{Versteck}]}]
\framed[
to put large settings into a setups-blocks and
> pass the block to a setup-command.
>
> \startsetups [apage]
> \startMPcode
> StartPage;
> ...
> StopPage;
> \stopMPcode
> \stopsetups
>
> \defineoverlay[apage][\directsetup{apage}]
>
> Wolfgang
>
>
___
,
footer=1cm]
Another useful method is to put large settings into a setups-blocks and
pass the block to a setup-command.
\startsetups [apage]
\startMPcode
StartPage;
...
StopPage;
\stopMPcode
\stopsetups
\defineoverlay[apage][\directsetup{apage}]
Wolfgang
[
backspace = 2.5cm,
margin = 0.5cm,
width = 16cm,
header = 1cm,
footer = 1cm,
]
\setupbackgrounds[state=repeat]
\defineoverlay[apage][
{\startMPcode
StartPage;
definecolor[ name = "MyColor1", r = uniformdeviate(1), g =
uniformdeviate(1), b = uniformdeviate(1) ] ;
definec
ithcolor .625yellow) ;
> draw fullcircle xscaled 1.5cm yscaled 1cm ;
> \stopuseMPgraphic
>
> %\startnotmode[proof]
> % \defineoverlay[circled][\useMPgraphic{circled}]
> %\stopnotmode
>
> \define[1]\Circled%
> {\framed
> [background=circled,frame=off,offset=overlay]
>
ons(withcolor (.6+uniformdeviate.35)*white) ;
fill fullcircle xscaled 1.5cm yscaled 1cm ;
drawoptions(withcolor .625yellow) ;
draw fullcircle xscaled 1.5cm yscaled 1cm ;
\stopuseMPgraphic
%\startnotmode[proof]
% \defineoverlay[circled][\useMPgraphic{circled}]
%\stopnotmode
\define[1]\Circ
;
\stopuniqueMPgraphic
\defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}]
\define[1]\cancel{%
\ifmmode
\mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\else%
\framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\fi%
}
\starttext
\dots E.g
scaled .8pt ;
\stopuniqueMPgraphic
\defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}]
\define[1]\cancel{%
\ifmmode
\mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\else%
\framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\fi%
}
\starttext
led (0,2) shifted ( (i-1)*factor,-diff-0.85cm)
withcolor blue ;
else :
fill p shifted ( (i-1)*factor, 0)
withcolor red ;
fi ;
endfor ;
StopPage ;
\stopuseMPgraphic
\defineoverlay
[Ornament]
[\useMPgraphic{ornament}]
\setupbackgrounds[page]
[state=rep
\startreusableMPgraphic{card}
> StartPage ;
> save p ; path p[] ;
> p[0] = ulcorner Page -- urcorner Page ;
> p[0] := p[0] shifted (0, -0.97cm) ;
> for i = 1 upto 18 :
> p[i] = p[i-1] shifted (0, -14.42pt) ;
> draw p[i] withcolor (0.5,0.5,0.5) ;
> endfor ;
> pick
(0, -14.42pt) ;
draw p[i] withcolor (0.5,0.5,0.5) ;
endfor ;
pickup pencircle scaled 2pt ;
draw p[0] withcolor red ;
StopPage ;
\stopreusableMPgraphic
\defineoverlay[Card][\reuseMPgraphic{card}]
\setupbackgrounds[page]
[state=repeat,
background={Card
ons scaled SCALE;
\stopuseMPgraphic
\startuseMPgraphic{HexGridBgGraphic}
% Define the grid background colour
color gridback;
gridback := (0.15, 0.18, 0.24);
fill unitsquare
xyscaled (OverlayWidth, OverlayHeight)
withcolor gridback;
\stopuseMPgraphic
\defineoverlay[HexGri
I would suggest the approach of Wolfgang because the standard setting of
\framed(texts)’ width is fit and the height setting can be changed to this too.
Further I would suggest to use an overlay and a Metafun graphic for the
cut-indicators.
\defineoverlay[Cutpointstight][\useMPgraphic
leftenlarged 1mm rightenlarged 1mm;
draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
draw rightboundary OverlayBox shifted (1mm,0);
draw leftboundary OverlayBox shifted (-1mm,0);
\stopuseMPgraphic
\defineoverlay
[headerBox]
[\useMPgraphic{squareBox}]
\startuseMPgraphic
Henning Hraban Ramm via ntg-context schrieb am 12.08.2022 um 10:57:
Hi, can ConTeXt make rounded image corners?
Both of my approaches don’t work:
\externalfigure[mill][
width=3cm,
frame=on,
corner=round,radius=1cm,
backgroundcorner=round,backgroundradius=1cm,
]
\defineoverlay[Mill
Hi, can ConTeXt make rounded image corners?
Both of my approaches don’t work:
\externalfigure[mill][
width=3cm,
frame=on,
corner=round,radius=1cm,
backgroundcorner=round,backgroundradius=1cm,
]
\defineoverlay[Mill][{%
\externalfigure[mill][width=\overlaywidth]
}]
\framed[background
ted (i*5pt, 0pt)
withcolor if i < PageNumber : red
else : black
fi ;
endfor ;
StopPage ;
\stopuseMPgraphic
\defineoverlay[background:ornament][\useMPgraphic{MP:ornament}]
\setupbackgrounds[page][background={background:ornament}]
\set
else : black
fi ;
endfor ;
StopPage ;
\stopuseMPgraphic
\defineoverlay[background:ornament][\useMPgraphic{MP:ornament}]
\setupbackgrounds[page][background={background:ornament}]
\setupbodyfont[ss,18pt]
\starttext
\dorecurse{10}{
\strut\par
; exact same dimensions as my page. I'd like to set that graphic as a
> > background. How do I do this?
>
> (Again, untested)
>
> \startuseMPgraphic{background-image}
> input graphic.mp;
> \stopuseMPgraphic
>
> \defineo
{background-image}
input graphic.mp;
\stopuseMPgraphic
\defineoverlay[background-image][\useMPgraphic{background-image}]
\setupbackgrounds[page][background={background-image}]
Aditya
___
If your question is of interest t
. I have an mp graphic defined in the file "graphic.mp
<http://graphic.mp>" which has the exact same dimensions as my page.
I'd like to set that graphic as a background. How do I do this?
\startreusableMPgraphic{backgroundgraphic}
input graphic.mp;
\stopreusableMPgraphic
{transparentred} ;
\stopuseMPgraphic
\defineoverlay[myOL1][\useMPgraphic{mytest1}]
\defineoverlay[myOL2][\useMPgraphic{mytest2}]
%===
\defineframed
[MyBigFrame]
[offset=-0.26pt,
frameoffset=0pt,
frame=off,
strut=yes,
before
,TextHeight+\mygap-\posB*LineHeight) --
(0.0*TextWidth,TextHeight+\mygap-\posB*LineHeight) --
cycle ;
lmt_parshape [path = p] ;
draw p withpen pencircle scaled \mypen ;
endgroup ;
\stopuseMPgraphic
\defineoverlay[myOL1][\useMPgraphic{mytest1}]
\defineoverlay[myOL2
\setupbackgrounds
[page]
[background={backgraphics,foreground,foregraphics}]
\defineoverlay [backgraphics] [\positionoverlay{backgraphics}]
\defineoverlay [foregraphics] [\positionoverlay{foregraphics}]
\setupMPvariables
[mpos:box]
[linecolor=blue,
linewidth=\linewidth,
fillcolor
Hi Bruce,
The Layers page has some examples (
https://wiki.contextgarden.net/Layers#Place_labels_on_pictures) and the
Collectors page as well (https://wiki.contextgarden.net/Collectors).
Some MWE:
\starttext
\definelayer [figure][width=\overlaywidth,height=\overlayheight]
\defineoverlay[figure
).
\defineoverlay[TextBubbleRxOverlay][\useMPgraphic{TextBubble}{side=0}]
\defineframedtext[TextBubbleRxFrame][TextBubbleFrame][
background=TextBubbleRxOverlay,
location=left,
]
% Send text (right-facing).
\defineoverlay[TextBubbleTxOverlay][\useMPgraphic{TextBubble}{side=1}]
\defineframedtext
b := urcorner chap_frame ;
pos := urcorner Field[Text][RightMarginSeparator] - ulcorner chap_frame
- (-1mm,skip) ;
fill chap_frame shifted pos withcolor "chap_frame" ;
draw Chap rotated 90 shifted (xpart pos-4mm,ypart pos) ;
StopPage ;
\stopuseMPgraphic
\defi
wn string ta
%% metafun > log >
%% metafun > log > error: Equation cannot be performed (unknown string=vacuous)
\setupbackgrounds
[page]
[background={foreground,foregraphics}]
\defineoverlay [foregraphics] [\positionoverlay{foregraphics}]
\starttext
\startMPpo
,
height=fit]
\startuseMPgraphic{page}
StartPage;
draw Area[Text][Text]
shifted (InnerMarginWidth,BottomHeight+FooterHeight);
draw Field[Text][Text] withcolor blue;
StopPage;
\stopuseMPgraphic
\defineoverlay[page][\useMPgraphic{page
rt (n/10,(f+sign*12mm,i)) ;
> fi
> elseif (n mod 5) == 0 :
> draw (f,i) -- (f+sign*5mm,i) ;
> else :
> draw (f,i) -- (f+sign*3mm,i) ;
> fi ;
> n := n + 1 ;
> endfor ;
> setbounds currentpicture to Page ;
&
*5mm,i) ;
else :
draw (f,i) -- (f+sign*3mm,i) ;
fi ;
n := n + 1 ;
endfor ;
setbounds currentpicture to Page ;
\stopuniqueMPpagegraphic
\defineoverlay[ruler][\uniqueMPpagegraphic{ruler}]
\setupbackgrounds[page][background=ruler]
\setuppagenumbering[alter
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
ted (-1mm,0); %if CurrentColumn = 2:
shifted(2mm,0) fi ;
draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
\stopuseMPgraphic
\defineoverlay
[headerBox]
[\useMPgraphic{squareBox}]
\startuseMPgraphic{verticalrule3}
draw rightboundary OverlayBox shifted (1m
ted (-1mm,0); %if CurrentColumn = 2:
shifted(2mm,0) fi ;
draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
\stopuseMPgraphic
\defineoverlay
[headerBox]
[\useMPgraphic{squareBox}]
\startuseMPgraphic{verticalrule3}
draw rightboundary OverlayBox shifted (1m
> On 30 Nov 2021, at 19:34, Alexandre Christe via ntg-context
> wrote:
>
> Dear list,
>
>
>
> What I've done is to play with mathalignment and \framed. Here is a MWE:
>
> \starttext
> \defineoverlay[midrule][{\blackrule[height=.02cm,width=5.5cm]}]
>
&g
Dear list,
[image: image.png]
What I've done is to play with mathalignment and \framed. Here is a MWE:
\starttext
\defineoverlay[midrule][{\blackrule[height=.02cm,width=5.5cm]}]
\framed[frame=off,background=midrule,boffset=.65cm]{\startformula
\startmathalignment[n=12,align={middle,middle
> > \startuniqueMPgraphic{concept}
> > draw fullcircle scaled 1cm shifted (10cm,10cm);
> > \stopuniqueMPgraphic
> > \defineoverlay[concept][\uniqueMPgraphic{concept}]
> > \setupbackgrounds[page][background=concept]
> > \starttext
> > .
> > \stoptext
> >
On 9/12/2021 6:54 PM, Sylvain Hubert via ntg-context wrote:
Dear List,
The following code draws a circle at the center of the page, ignoring
the "shifted" part.
\startuniqueMPgraphic{concept}
draw fullcircle scaled 1cm shifted (10cm,10cm);
\stopuniqueMPgraphic
\defineoverl
Dear List,
The following code draws a circle at the center of the page, ignoring the
"shifted" part.
\startuniqueMPgraphic{concept}
draw fullcircle scaled 1cm shifted (10cm,10cm);
\stopuniqueMPgraphic
\defineoverlay[concept][\uniqueMPgraphic{concept}]
\setupbackgrounds[page][backgrou
Pict /2 , (bbheight Pict / -2) ) ;
Pict := Pict rotated 45;
Pict := Pict shifted (.5PaperWidth, .5PaperHeight) ;
draw Pict withcolor darkyellow ;
StopPage ;
\stopuseMPgraphic
%-
\defineoverlay[MonOverlay][\useMPgraphic{MonGraphique}]
\setupbackgrounds[page][background=MonOverlay
setuplayer
[hi]
[width=\wd\scratchbox,height=\htdp\scratchbox]
\setlayer
[hi][preset=middle]
{\color[green]{there}}
\box\scratchbox
\stopTEXpage
\defineoverlay[hi]
\startTEXpage[background=hi]
\defineoverlay
[hi]
[{\framed
[frame=off,offset=ove
color .625red) ;
b := a superellipsed .95 ;
%fill b withcolor .85white ;
draw b ;
b := (boundingbox p) superellipsed .95 ;
fill b withcolor .85white ; %.425green;%.
draw b ;
draw p withcolor black ;
setbounds currentpicture to a ;
\stopuseMPgraphic
\defineoverlay[rFrame][\useMPgraphic{red
leftenlarged (BackSpace + 5mm)
rightenlarged ExHeight
withcolor "lightgray";
setbounds currentpicture to OverlayBox;
\stopuseMPgraphic
\defineoverlay
[acframe]
[\useMPgraphic{acframe}]
\defineframed
[ACFRAME]
[...,
background=acframe,
...]
; > == End of Example
> =
> >
> > That didn't seem to have any effect.
> >
> > Is there a way to have every odd row of every table in my document
> > have color background?
>
> \startuseMPgraphic{xtablerow}
=
That didn't seem to have any effect.
Is there a way to have every odd row of every table in my document
have color background?
\startuseMPgraphic{xtablerow}
fill OverlayBox withcolor "gray";
\stopuseMPgraphic
\defineoverlay
[xtablerow]
]
\startuseMPgraphic{chapterframe}
fill OverlayBox
leftenlarged (BackSpace + 5mm)
rightenlarged (CutSpace + 5mm)
topenlarged (TopSpace + 5mm)
withcolor "lightgray";
setbounds currentpicture to OverlayBox;
\stopuseMPgraphic
\defineoverlay
[ch
1pt withcolor
"blue" ;
draw matrixbox (2, 2) (4, 4) withpen pencircle scaled 1pt withcolor
"red" ;
% drawdot anchorxy("matrix", 3, 4) withpen pencircle scaled 4pt
withcolor "green";
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic
\d
withcolor "blue" withtransparency (1,.75) ;
drawarrow
anchorxy("two", 0, 1) { down } ..
anchorxy("two", 0, 2)
withcolor "blue" withtransparency (1,.75) ;
drawarrow
anchorxy("two", 0, 1) { dir 30 } ..
anchorxy(
1,.75) ;
drawarrow
anchorxy("two", 0, 1) { down } ..
anchorxy("two", 0, 2)
withcolor "blue" withtransparency (1,.75) ;
drawarrow
anchorxy("two", 0, 1) { dir 30 } ..
anchorxy("three", 0, 1)
withcolor &quo
,OverlayHeight) -- (OverlayWidth,OverlayHeight) --
(OverlayWidth,0) -- cycle ;
pickup pencircle scaled .5pt ;
for i=1 upto 20 :
draw p enlarged -5pt randomized 15pt withcolor blue ;
endfor ;
\stopuseMPgraphic
\defineoverlay [Fuzzy] [\useMPgraphic{fuzzy}]
\startTEXpage
\framed [height=20cm,width
[\setups{page:header}]%
\startsetups page:header
\setupMPvariables[hdrPgs]
[curr=\pagenumber,
first={\ref[page][\headerfirst]},
next={\ref[page][\headernext]}]
\framed[
frame=off,
background={hdrPgs}
]{}% all to be done in MP
\stopsetups
\defineoverlay[hdrPgs
;
draw p ;
setbounds currentpicture to boundingbox currentpicture enlarged 2mm ;
\stopuseMPgraphic
\defineoverlay
[MyFrame]
[\useMPgraphic{MyFrame}]
\starttext
\MyFrame[Title=Algorithme]{%
\m{a\gets 2x-1}
\m{b\gets a²-1}
\m{c\gets b\div 4}
\m{d\get
;
# \stopuseMPgraphic
#
#\defineoverlay
# [DiagonalRule]
# [\useMPgraphic{DiagonalRule}]
#
#\define[2]\DiagonalLabel{%
# \setuptabulate [after={\blank[\frameddimension{offset}]}]
# \starttabulate [|p|r|]
# \NC \NC \bf #2 \NC\NR
# \NC \bf #1 \NC
);
draw leftcorner -- rightcorner;
draw Leftcorner -- Rightcorner;
\stopuseMPgraphic
\defineoverlay
[DiagonalRule]
[\useMPgraphic{DiagonalRule}]
\define[2]\DiagonalLabel{%
\setuptabulate [after={\blank[\frameddimension{offset}]}]
\starttabulate [|p|r|]
\NC\NC \bf #2 \NC\NR
It works fine now. Thank you a lot for the fix.
Cordially,
Jairo :)
El mié, 17 de feb. de 2021 a la(s) 06:09, Hans Hagen (j.ha...@xs4all.nl)
escribió:
> On 2/17/2021 12:18 AM, Jairo A. del Rio wrote:
> > I've copied the following example from the ConTeXt archive:
> >
> >
On 2/17/2021 12:18 AM, Jairo A. del Rio wrote:
I've copied the following example from the ConTeXt archive:
\defineoverlay[frames][\positionoverlay{frames}]
\setupbackgrounds[text][background=frames]
\startMPpositiongraphic{frame}
if unknown context_apos : input mp-apos.mpiv ; fi
I've copied the following example from the ConTeXt archive:
\defineoverlay[frames][\positionoverlay{frames}]
\setupbackgrounds[text][background=frames]
\startMPpositiongraphic{frame}
if unknown context_apos : input mp-apos.mpiv ; fi ;
\MPgetposboxes{\MPvar{self}}{\MPanchorid}
if nofposboxes
(0,1)
withshadecolors (red, blue) ;
\stopuseMPgraphic
\defineoverlay[MyShade][\useMPgraphic{MyShade}]
\setupbackgrounds[page][background=MyShade]
\startmakeup
\definedfont[SerifBold*default @ 50pt] \setupinterlinespace
\defineeffect[MyOutline][alternative=outer,rulethickness
,backgroundcolor=blue]
},
after={\stopbackground
},
]
- which creates a rectangular backround to the text, and the text may
spread over pages;
2. or this:
\defineoverlay[AnOverlayDefinition][]
\definetyping[Test]
[before={\startframedtext[background=AnOverlayDefinition
t; \dorecurse {5} {Before #1\page}
>
> \getfiguredimensions[oeps.pdf]
>
> \startsetups SomeNumber
> \vbox to \overlayheight \bgroup
> \vss
> \hbox to \overlaywidth \bgroup
> \hss
> \bfd \red You can figure it out: \pagenumber
>
dimensions[oeps.pdf]
\startsetups SomeNumber
\vbox to \overlayheight \bgroup
\vss
\hbox to \overlaywidth \bgroup
\hss
\bfd \red You can figure it out: \pagenumber
\hss
\egroup
\vss
\egroup
\stopsetups
\defineoverlay[
entpicture to OverlayBox;
\stopuseMPgraphic
\defineoverlay[booktabs_bottom] [\uniqueMPgraphic{booktabs_bottom}]
\installbottomframerenderer{booktabs}{\uniqueMPgraphic{booktabs_bottom}}
\startsetups booktabs
\setupTABLE[each][each][frame=off, rulethickness=1.2bp]
\setupTABLE[row][first][topframe=
not find one. But I'd be quite prepared to 'have a go' at this, if I had
some pointers of just where to start! I assume I would have to
\defineoverlay[number] and then add text on top \framed (but without the
frame borders). Am I at least correct about this?
You don't need metafun for something
> manual and elsewhere, in terms of ConTeXt/Metafun commands, but could
>>> not find one. But I'd be quite prepared to 'have a go' at this, if I had
>>> some pointers of just where to start! I assume I would have to
>>> \defineoverlay[number] and then
to
\defineoverlay[number] and then add text on top \framed (but without the
frame borders). Am I at least correct about this?
You don't need metafun for something this simple. Here is a crude
implementation:
\setuphead[chapter]
[
numberstyle={\switchtobodyfont[48pt
looking for one in the
manual and elsewhere, in terms of ConTeXt/Metafun commands, but could
not find one. But I'd be quite prepared to 'have a go' at this, if I had
some pointers of just where to start! I assume I would have to
\defineoverlay[number] and then add text on top \framed (but without
rs of just where to start! I assume I would have to
> \defineoverlay[number] and then add text on top \framed (but without the
> frame borders). Am I at least correct about this?
You don't need metafun for something this simple. Here is a crude
implementation:
\setuphead[chapter]
was keenly looking for one in the
manual and elsewhere, in terms of ConTeXt/Metafun commands, but could
not find one. But I'd be quite prepared to 'have a go' at this, if I had
some pointers of just where to start! I assume I would have to
\defineoverlay[number] and then add text on top \framed
, \overlayheight-rulethickness);
rightcorner := (\overlaywidth-rulethickness, rulethickness);
draw leftcorner -- rightcorner;
\stopuseMPgraphic
\defineoverlay
[DiagonalRule]
[\useMPgraphic{DiagonalRule}]
\define[2]\DiagonalLabel{%
\setuptabulate [after={\blank[\frameddimension{offset
a background to a framed text. —
>>> I can not make it working though…
>>>
>>> \startuniqueMPgraphic{Markings}
>>> %{Markings:\overlaywidth:\overlayheight} fill OverlayBox enlarged
>>> 5mm withcolor blue; \stopuniqueMPgraphic
>>>
>>&
ngs}
> > %{Markings:\overlaywidth:\overlayheight} fill OverlayBox enlarged
> > 5mm withcolor blue; \stopuniqueMPgraphic
> >
> > \defineoverlay[Marks]{\useMPgraphic{Markings}}
>
> \defineoverlay[Marks][{\useMPgraphic{Markings}}]
1 - 100 of 772 matches
Mail list logo