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,
> >location=right]
> >
> > \defineov
efinecolor[MyColorA][.75(MyColorB,white)]
>
> \defineframedtext
> [MyText]
> [frame=off,
>background=MyFrame,
>width=\textwidth,
>location=right]
>
> \defineoverlay
> [MyFrame]
> [\useMPgraphic{MyFrame}]
>
> \definelabel
>
,
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+.
... \stopMyText, \startMyText ...
>> \stopMyText... this return Définition 1, Définition 2 ...
>>
>> Thank you,
>> Fabrice
>>
>>
>> \setupbodyfont [palatino,11pt]
>>
>> \setupcolors[state=start,cmyk=yes]
>>
>> \definecolor[MyC
, 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
, \startMyText ... \
stopMyText ... this return 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
or} ;
> draw p withcolor white ;
> setbounds currentpicture to OverlayBox ;
> \stopuseMPgraphic
>
>
>
> Thank you,
>> Fabrice
>>
>> \showframe
>>
>> \setupcolors[state=start,cmyk=yes]
>>
>> \definecolor[MyColor][c=0.00, m=0.10, y=0.
\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]
\setupbodyfont[11pt]
\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]
\defineframedtext
[MyText]
[frame=off,
background=MyFrame,
width=0.9
=0.62, y=1.00, k=0.00]
\setupbodyfont[11pt]
\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]
\defineframedtext
[MyText]
[frame=off,
background=MyFrame,
width=0.9\textwidth,
location=right]
\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]
\def\StartFrame{\startMyText}
\def
path p, q;
h := \overlayheight;
w := \overlaywidth;
% imagine this is more complex
p = (0, 0) -- (w, .5h);
q = (0, h) -- (w, 0);
draw p;
draw q;
z0 = p intersectionpoint q;
% btex \def\Z{ ypart z0 } etex;
\stopuniqueMPgraphic
\defineoverlay[canon][\uniqueMPgr
text]
[x=3cm,
y=8cm]
[frame=off]
{#1 – #2}}
\definemakeup[chapterpage][page]
\setupmakeup
[chapterpage]
[pagestate=start,
before={\setupbackgrounds[page][background=chapterimage]},
bottom={\placelayer[chaptertext]}]
\defineoverlay[chapterimage][\overlayfigure{\str
withcolor
\MPcolor{green} ;
clip currentpicture to OverlayBox leftenlarged 1pt rightenlarged 1.5pt
bottomenlarged 0.5pt ;
\stopuseMPgraphic
\defineoverlay[ACFRAME][\useMPgraphic{ACFRAME}]
\defineframed
[ACFRAME]
[frame=off,
background=ACFRAME]
\starttext
\ACFRAME{ Example }
\sto
d not bother to set the style of the boxes and arrows. So it
looks a bit dry.
\startMPdefinitions
% I don't know why this does not get loaded automatically.
input mp-abck.mpiv;
\stopMPdefinitions
\defineoverlay[highlight] [\positionoverlay{highlightoverlay}]
\startpositionoverlay{highli
s and arrows. So it looks
a bit dry.
\startMPdefinitions
% I don't know why this does not get loaded automatically.
input mp-abck.mpiv;
\stopMPdefinitions
\defineoverlay[highlight] [\positionoverlay{highlightoverlay}]
\startpositionoverlay{highlightoverlay}
\setMPposition
= (-71,-1125) ;
z22 = (-97,-1106) ;
z23 = (-143,-1031) ;
z24 = (-199,-673) ;
z25 = (-155,-211) ;
z26 = (-220,-22) ;
fill z1 for i=2 upto 14: .. z[i] endfor & z14 for j=15 upto 26: .. z[j]
endfor .. z1 & cycle withcolor red ;
\stopuseMPgraphic
\defineoverlay[leftbrace] [\leftaligned
{\scal
=lightgray]
\definecolor[Border][c=0.00, m=0.00, y=0.00, k=0.25]
\startuniqueMPgraphic{borderline}
path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
draw p withcolor \MPcolor{Border} dashed evenly withpen pencircle scaled
1.2pt ;
\stopuniqueMPgraphic
\defineoverlay[borderline
=0.00, y=0.00, k=0.25]
\startuniqueMPgraphic{borderline}
path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
draw p withcolor \MPcolor{Border} dashed evenly withpen pencircle scaled
1.2pt ;
\stopuniqueMPgraphic
\defineoverlay[borderline][\uniqueMPgraphic{borderline
erlaywidth yscaled \overlayheight ;
draw p withcolor \MPcolor{Border} dashed evenly withpen pencircle scaled
1.2pt ;
\stopuniqueMPgraphic
\defineoverlay[borderline][\uniqueMPgraphic{borderline}]
\startxtable[frame=off]
\startxrow
\startxcell[align=normal]
Compléter chacun des algorithm
;
draw p withcolor \MPcolor{Border} dashed evenly withpen pencircle scaled
1.2pt ;
\stopuniqueMPgraphic
\defineoverlay[borderline][\uniqueMPgraphic{borderline}]
\placefigure[right,none]{}{
\start
\switchtobodyfont[7pt]
\startMPcode
numeric u;
u=0.7cm;
z0=(0,0) ;
z1=(2.5u,0) ;
z2=(2.5u,2.5u) ;
z3
currentpicture to p ;
draw p withcolor \MPcolor{\overlaylinecolor} ;
\stopuniqueMPgraphic
\defineoverlay[funny][\uniqueMPgraphic{funny}]
\define[2]\MySectionCommand
{\framed
[background=funny,
frame=off,
width=fit,
align={right},
framecolor
\MPcolor{\overlaylinecolor} ;
\stopuniqueMPgraphic
\defineoverlay[funny][\uniqueMPgraphic{funny}]
\define[2]\MySectionCommand
{\framed
[background=funny,
frame=off,
width=0.5\textwidth,
align={right},
framecolor=mycolor
} ;
\stopuniqueMPgraphic
\defineoverlay[funny][\uniqueMPgraphic{funny}]
\define[2]\MySectionCommand
{\framed
[background=funny,
frame=off,
width=0.5\textwidth,
align={right},
framecolor=mycolor,
rulethickness=1.5pt,
backgroundcolor=white
withcolor \MPcolor{\overlaycolor} ;
draw p withcolor \MPcolor{\overlaylinecolor} ;
draw (20,0)--(20,h) withcolor red ;
\stopuniqueMPgraphic
\defineoverlay[funny][\uniqueMPgraphic{funny}]
\define[2]\MySectionCommand
{\framed
[background=funny,
frame=off,
width=0.5
quare scaled 1cm xshifted i*cm;
> endfor;
> \stopMPcode
> \stoptext
>
> How can a line be drawn connecting the right edges of the rectangles? I have
> played with:
>
> \startuniqueMPgraphic{line}
> path a;
> a:=(0,0)--(0,3cm);
> draw a withpen pencircle
yed with:
>>
>> \startuniqueMPgraphic{line}
>> path a;
>> a:=(0,0)--(0,3cm);
>> draw a withpen pencircle scaled 3pt withcolor green;
>> \stopuniqueMPgraphic
>>
>> \defineoverlay[line][{\uniqueMPgraphic{line}}]
>>
a:=(0,0)--(0,3cm);
> draw a withpen pencircle scaled 3pt withcolor green;
> \stopuniqueMPgraphic
>
> \defineoverlay[line][{\uniqueMPgraphic{line}}]
>
>
> and using it in \framed, but placing the line correctly is elusive.
>
>
Just a quick and dirty so
the rectangles? I have
played with:
\startuniqueMPgraphic{line}
path a;
a:=(0,0)--(0,3cm);
draw a withpen pencircle scaled 3pt withcolor green;
\stopuniqueMPgraphic
\defineoverlay[line][{\uniqueMPgraphic{line}}]
and using it in \framed, but placing the line correctly is elusive
Hi,
Macro written by Hans does not work.
Best regards,
Fabrice
% macros=mkvi
\starttext
\starttexdefinition MyOtherHeader #where #day #month #year #title
\defineoverlay[whatever][\useMPgraphic{whatever}]
\startuseMPgraphic{whatever}
path p;
p:=fullsquare xyscaled (\overlaywidth
t I want to
> have my cake and eat it too ;)
You can test if the layers are hidden when you print the following example, I
tried the Adobe Reader on my Mac and they where still visible.
\setupinteraction[state=start]
\defineoverlay[PageBackground] [\startMPcode fill fullsquare
xysca
humbs]
\defineoverlay
[thumbs]
[\setups{thumbs}]
\def\NOfChapters{4} % i need to make this one available
\startsetups thumbs
\definemeasure[thumbheight][\dimexpr\paperheight/\NOfChapters\relax]
\vbox to \paperheight \bgroup
\vskip \rawsectionnumber{section-2}
\measure{thumbh
setbounds currentpicture to OverlayBox
> enlarged max(BackSpace,CutSpace) ;
> \stopuniqueMPgraphic
>
> \defineoverlay[whatever][\uniqueMPgraphic{whatever}]
>
> \framed
> [background=whatever,
>backgroundcolor=green,
>frame=off,
OverlayBox
leftenlarged BackSpace
rightenlarged CutSpace
withcolor OverlayColor ;
setbounds currentpicture to OverlayBox
enlarged max(BackSpace,CutSpace) ;
\stopuniqueMPgraphic
\defineoverlay[whatever][\uniqueMPgraphic{whatever}]
Pcolor{background:light};
50 StopPage;
51 \stopreusableMPgraphic
52
53 \defineoverlay [page:background][\reuseMPgraphic{page:background}]
54
55 \setupbackgrounds[page][background={page:background}]
56
57 %\usemodule[visualcounter]
58
59 >> \definevisualcounter
60
On 3/28/2014 11:30 AM, Michael Guravage wrote:
The Stepper example on the wiki, <http://wiki.contextgarden.net/Stepper>
from which the following snippet comes,
\usemodule[pre-60] % use the stepper
\setuppapersize[S6][S6]
\defineoverlay[invoke] [\overlaybutton{InvokeS
The Stepper example on the wiki,
<http://wiki.contextgarden.net/Stepper>from which the following
snippet comes,
\usemodule[pre-60] % use the stepper
\setuppapersize[S6][S6]
\defineoverlay[invoke] [\overlaybutton{InvokeStepper}]
\setupbackgrounds[text] [background=invoke]
\setupinteraction
enter currentpicture
withcolor red
withtransparency (1,0.4) ;
\stopMPcode
\stoptext
or
\starttext
\defineoverlay
[page]
[\overlayfigure{mill.png}]
\setupbackgrounds
[page]
[background=page]
\definecolor[myred][a=1,t=.4,r=.4]
{\color[myred]{\definedfont[Bold*
title #number
\defineoverlay[whatever][\useMPgraphic{whatever}]
\startuseMPgraphic{whatever}
path p;
p:=fullsquare xyscaled (\overlaywidth,\overlayheight) squeezed 1pt;
fill p withcolor white ;
draw p withpen pencircle scaled 2pt withcolor 0.625white ;
picture d ;
d :=
textext("\quad#w
es[location={local,global,default}]
>>
>> \starttext
>>
>> \defineoverlay[muh][{\externalfigure[cow][width=\overlaywidth,
>> height=\overlayheight]}]
>>
>> \startframed[width=max,height=0.4\textheight,background=muh,align=right,foregroundcolor=darkred]%
>>
On Thu, Feb 13, 2014 at 10:52:44AM +0100, Wolfgang Schuster wrote:
>
> You have to use boxedcolumns environment because the normal columns
> environment doesn’t work in a frame.
>
> \setupexternalfigures[location={local,global,default}]
>
> \starttext
>
> \defineov
You have to use boxedcolumns environment because the normal columns environment
doesn’t work in a frame.
\setupexternalfigures[location={local,global,default}]
\starttext
\defineoverlay[muh][{\externalfigure[cow][width=\overlaywidth,
height=\overlayheight]}]
\startframed[width=max,height=0.4\t
\stopcolumns
\stopnarrower
}
\starttext
\vbox to .4\textheight{\externalfigure[moe]}
\vskip-.35\textheight
\txt
%---2. example-
\vskip.3\vsize
\useexternalfigure[muh][cow.pdf][width=\overlaywidth, height=\overlayheight]
\setupframed[height=.4\vsize, width=\hsize]
\defineoverlay
obably an obvious and silly mistake but I can't find it:
for me it's quite similar to the examples in metafun-p.pdf, p. 127:
"\framed[background=demo circle]{This text is overlayed.}", but mine
refuses to work.
you need to anchor the graphic:
\starttext
\defineoverlay[my f
x file with this line:
% macros=mkvi
\starttext
\starttexdefinition MyOtherHeader #where #day #month #year #title
#number
\defineoverlay[whatever][\useMPgraphic{whatever}]
\startuseMPgraphic{whatever}
draw OverlayBox withpen pencircle scaled .5pt da
x27;t work anymore if I comment the
%% indicated line below.
\defineoverlay[my first overlay][\uniqueMPgraphic{first demo}]
\defineoverlay[my fourth overlay][\positionoverlay{my backgraphics}]
\startpositionoverlay{my backgraphics}
\setMPpositiongraphic{three}{mypos:circle}{mypos:circle
x to
.5\wd\scratchbox{\hss\raise\dp\scratchbox\box\scratchbox}}}
\defineoverlay[linkeklammer] [\linkeklammer]
\defineoverlay[rechteklammer][\rechteklammer]
\starttext
\bTABLE
\bTR[align={middle,middle},frame=off,offset=1ex]
\bTD[background=linkeklammer] text \eTD
\bTD text\\text\\tex
dth ;
draw (0,0) -- (0, OverlayHeight) -- (OverlayWidth, OverlayHeight)
-- (OverlayWidth, 0) -- cycle withcolor OverlayLineColor;
\stopuniqueMPgraphic
%% Define Overlay for NassiSimpleFrameBox
%%
\defineoverlay[NassiSimpleFrameBox][\uniqueMPgraphic
hcolor red ;
\stopuniqueMPgraphic
\defineoverlay[mytest][\uniqueMPgraphic{mytest}]
\startMPpage[offset=1pt]
fill fullcircle scaled 10cm withcolor red ;
draw textext("\framed[background=mytest]{bla}") ;
draw textext("test 1.1") xsized 8cm
height ;
fill p withcolor green ;
\stopuniqueMPgraphic
\defineoverlay[mytest][\uniqueMPgraphic{mytest}]
\starttext
\framed[background=mytest]{this works}
\startFLOWchart[test]
\startFLOWcell
\name{test}
\text{test}
\connection[lr]{test}
% \comment[t:0.5]{\framed{this works}}
\c
raphic
\defineoverlay[mytest][\uniqueMPgraphic{mytest}]
\starttext
\framed[background=mytest]{this works}
\startFLOWchart[test]
\startFLOWcell
\name{test}
\text{test}
\connection[lr]{test}
% \comment[t:0.5]{\framed{this works}}
\comment[t:0.5]{\framed[background=mytes
)
\defineoverlay [myoverlay] [\ssd Foo]
\definetextbackground [mybackgroundColour] [background=color,
backgroundcolor=gray]
\definetextbackground [mybackgroundOverlay] [background=myoverlay]
\starttext
%% overlay works
\framed [background=myoverlay, align=normal] {\input knuth\par}
%% background
aphic
\defineoverlay[OL:thickBtm][\useMPgraphic{MP:thickBtm}]
\starttext
\bTABLE
\setupTABLE[align=middle]
\setupTABLE[header][background={foreground,OL:thickBtm}]
%
\bTABLEhead\bTR\dorecurse{3}{\bTH#1\eTH}\eTR\eTABLEhead
\bTABLEbody\dorecurse{6}{\bTR\dorecurse{3}{\bTD#1-##1\eTD
Hi,
overlays are not displayed when used as a background for
textbackground. Is this a bug or are overlays not supported?
\defineoverlay [myoverlay] [\ssd Foo]
\definetextbackground [mybackgroundColour] [background=color,
backgroundcolor=gray]
\definetextbackground [mybackgroundOverlay
:\rightorleftpageaction rl]
[]
[width=\marginwidth,
align={lohi,middle},
foregroundstyle=\tx]
{\floatuserdataparameter{text}}
\flushlayer
[extrafiguretextlayer:\rightorleftpageaction rl]
\stopsetups
\defineoverlay
the cell?
For testing:
%***
\defineoverlay[eslami][{\externalfigure[eslamivorlage.pdf]}]
\def\esl[#1][#2][#3][#4][#5][#6][#7]{%
\page
\startframed[frame=off,width=fit,offset=overlay,align=middle]%
\bTABLE[width=4.55cm,align={middle,lohi
Am 21.05.2013 um 07:38 schrieb H. Özoguz :
> Hi there,
>
> for a card game I have this macro:
>
> \defineoverlay[eslami][{\externalfigure[somepicture.pdf]}]
> \def\esl[#1][#2][#3]{%
> \startframed[frame=on,width=4.75cm,offset=overlay,align=middle,background=eslami]%
Hi there,
for a card game I have this macro:
\defineoverlay[eslami][{\externalfigure[somepicture.pdf]}]
\def\esl[#1][#2][#3]{%
\startframed[frame=on,width=4.75cm,offset=overlay,align=middle,background=eslami]%
\offinterlineskip
\framed[width=4.75cm,frame=off,height=2cm]{\blank[-3mm]#1
ackgroundcolor=white,%
strut=no,%
heigth=fit,%
offset=0pt,
frameoffset=0pt,
depth=0pt,
top=,
backgroundoffset=0pt%
]
\defineoverlay[MyBoxit][MyBoxit]
\starttext
Here is the First Problem\par
\MyBoxit[width=10cm]
{
\Statement{First Statement}
\Statement{Second Statement}
}
\crlf
With a
, % height of a line
\strutdepth, % depth of a line
\strutheight % height of the first line
) ;
% For visualization purposes only
draw p ;
\stopuseMPgraphic
% For visualization purposes only
\defineoverlay[shape][\useMPgraphic{shape}]
\setupshapetexts
ceRULE
\definelayer[rule][state=repeat]
\setlayer[rule][x=.5\textwidth]{\blackrule[width=1pt,height=\textheight]}
\defineoverlay[rule][{\ifconditional\placeRULE\placelayer[rule]\fi}]
\setupbackgrounds[text][background=rule]
\starttext
\input knuth
\page \settrue\placeRULE
\input tufte
\page
ture > sectioning > chapter @ level 2 : 0.1 -> This is a chapter
! Undefined control sequence.
system > tex > error on line 19 in file custo.tex: Undefined control sequence ...
9 \stopuseMPgraphic
10
11 \defineoverlay[pagenumber][\useMPgraphic{pagenumber
startuseMPgraphic{pagenumber}
draw fullcircle xyscaled(OverlayWidth,OverlayHeight) withcolor \MPcolor{blue}
;
\stopuseMPgraphic
\defineoverlay[pagenumber][\useMPgraphic{pagenumber}]
\define[1]\PagenumberCommand
{\framed[frame=off,background=pagenumber]{#1}}
\setuppagenumbering[command=\P
color
OverlayLineColor ;
\stopuniqueMPgraphic
\defineoverlay[LabelA][\uniqueMPgraphic{LabelA}]
\defineoverlay[LabelB][\uniqueMPgraphic{LabelB}]
\def\VariantA{\mframed[foregroundstyle=\tfc,frame=off,background=LabelA,backgroundoffset=3pt,backgroundcolor=red]}
\def\VariantB{\mframed[foregroundstyle=\tfc,
thpen pencircle scaled 1pt dashed withdots;
setbounds currentpicture to boundingbox OverlayBox;
\stopuniqueMPgraphic
\defineoverlay[Label][\useMPgraphic{Label}]
\def\dottext#1%
{ \mframed[frame=off, background=Label, location=low]
{ #1 }
}
\setupcolors[state=start]
\def\rndgraymath{\mframed[
> \startfoo [backgroundoffset=0cm, loffset=1cm]
>\input ward
> \stopfoo
> \stopnarrower
>
> \stoptext
\startuseMPgraphic{framed:background}
fill unitsquare xyscaled(OverlayWidth,OverlayHeight) leftenlarged 1cm
withcolor \MPcolor{lightgray};
setbounds currentpicture to Ov
(topboundary Page --cycle) enlarged(0,5mm) shifted (0,-5mm)
withcolor
\MPcolor{color:background:\namedstructureuservariable{chapter}{mycolor}} ;
StopPage ;
\stopuseMPgraphic
\defineoverlay
[background:normal]
[\useMPgraphic{background:normal}]
\startuseMPgraphic
topuseMPgraphic
\defineoverlay [background:normal] [\useMPgraphic{background:normal}]
\startuseMPgraphic{background:title}
StartPage ;
numeric h ; h = 10mm ;
z[1] = ulcorner Page shifted (0, -1.5*h) ;
z[2] = urcorner Page shifted (0, -1.5*h);
z[3] = z[2] shifted (0, -h) ;
z[4] = z[1] shifted (0, -h) ;
path p
On 3/5/2013 11:21 AM, Alexandre Gerussi wrote:
Hi there,
i'm having problems with metapost and positional graphics in mkIV.
Here is a small test file that compiles OK with texexec but fails to
compile with context:
% the beginning
\defineoverlay[frames][\positionoverlay{f
Hi there,
i'm having problems with metapost and positional graphics in mkIV.
Here is a small test file that compiles OK with texexec but fails to
compile with context:
% the beginning
\defineoverlay[frames][\positionoverlay{frames}]
\setupbackgrounds[page][background=f
0.3white);
draw p; draw p';
draw q; draw q';
pair A; A:=q'intersectionpoint p';
pair B; B:=q intersectionpoint p';
pair C; C:=p intersectionpoint q;
pair D; D:=q'intersectionpoint p;
path s; s:= A--B--C--D--cycle;
fill s withcolor .8white;
\stopuniqueMPgraph
3white);
draw p; draw p';
draw q; draw q';
pair A; A:=q'intersectionpoint p';
pair B; B:=q intersectionpoint p';
pair C; C:=p intersectionpoint q;
pair D; D:=q'intersectionpoint p;
path s; s:= A--B--C--D--cycle;
fill s withcolor .8white;
\stopuniqueMPgraphic
\defineove
q'intersectionpoint p;
path s; s:= A--B--C--D--cycle;
fill s withcolor .8white;
\stopuniqueMPgraphic
\starttext
\defineoverlay[encadrement][\uniqueMPgraphic{essai}]
\framed[frame=off,background=encadrement]{\it\tfb\color[darkred]{Devoir de
mathématiques}}
\stoptext
___
.7white;
StopPage;
\stopuniqueMPgraphic
\defineoverlay[figram][\uniqueMPgraphic{figram}]
\setupbackgrounds[page][background=figram]
\starttext
\dorecurse{10}{\input knuth}
\stoptext
___
If your question is of interest to
overlay setups
(beforetext: preset=righttop)? - Related code given before:
\starttext
\definelayer [beforetext][width=\overlaywidth,height=\overlayheight]
\defineoverlay[beforetext][{\setups[beforetext]\tightlayer[beforetext]}]
\startsetups[beforetext]
\setlayer[beforetext][
we can simplify to:
\setupbodyfont[30pt]
\starttext
A
\definelayer [beforetext][width=\overlaywidth,height=\overlayheight]
\defineoverlay[beforetext][{\setups[beforetext]\tightlayer[beforetext]}]
\startsetups[beforetext]
\setlayer[beforetext][preset=righttop]
{\framed
·
> Now, I have a code which does much expected, but I'm not able to pass the
> desired content to setups/layer:
>
>
> \setupbodyfont[30pt]
>
> \starttext
> A
>
> \definelayer [beforetext][width=\overlaywidth,height=\overlayheight]
>
ttext
A
\definelayer [beforetext][width=\overlaywidth,height=\overlayheight]
\defineoverlay[beforetext][{\setups[beforetext]\tightlayer[beforetext]}]
\startsetups[beforetext]
\setlayer[beforetext][preset=righttop]{\framed[width=2in]{\directlua{context(userdata.LPr.text)}}}
\stops
... Thanks again.
On Tue, 15 Jan 2013 11:09:48 +0100, Wolfgang Schuster
wrote:
\setupbodyfont[30pt]
\starttext
A
\definelayer [beforetext][width=\overlaywidth,height=\overlayheight]
\defineoverlay[beforetext][{\setups[beforetext]\tightlayer[beforetext]}]
\startsetups[beforetext
(given by
> \pagewidth which was 21 cm at the moment of definition).
>
> I would probably need a way to alter the layer size to the current content...
>
> Or any other way to place something to the top right corner of the page from
> within \start/stop-TEXpage, where page
horizontal and vertical centered.
\setupbodyfont[40pt]
\starttext
\startoverlay
{\strut\red m}
{\strut\green a}
{\strut\blue l}
\stopoverlay
\stoptext
After you do know now what overlays are I come to the real overlay mechanism.
Overlays are created with the \defineoverlay command which t
\starttext
\startoverlay
{\strut\red m}
{\strut\green a}
{\strut\blue l}
\stopoverlay
\stoptext
After you do know now what overlays are I come to the real overlay mechanism.
Overlays are created with the \defineoverlay command which takes a name for the
overlay and its content. The
u remove the
\strut in the argument you would also notice that each argument is placed
horizontal and vertical centered.
\setupbodyfont[40pt]
\starttext
\startoverlay
{\strut\red m}
{\strut\green a}
{\strut\blue l}
\stopoverlay
\stoptext
After you do know now what overlays are I c
ncircle scaled 3pt ;
path p ; p := unitsquare
xscaled OverlayWidth yscaled OverlayHeight ;
fill p withcolor .8white ;
draw p withcolor .625red ;
\stopuseMPgraphic
\defineoverlay[button][\useMPgraphic{wrong or right}]
\setupbuttons[background=button,frame=off]
\se
= r,
xresolution = nx,
yresolution = ny,
}
end
\stopluacode
\defineoverlay
[BitMess]
[{\scale
[width=\dimexpr\overlaywidth+2ex,height=\dimexpr\overlayheight+2ex]
{\ctxlua{document.TestBitmap(\number\dimexpr\overlaywidth,\number\dimexpr\overlayheight)}}
square
xyscaled (\overlaywidth, \overlayheight)
withcolor (uniformdeviate 1, uniformdeviate 1, uniformdeviate 1);
\stopuseMPgraphic
\defineoverlay
[alpha]
[\useMPgraphic{alpha}]
\startreusableMPgraphic{beta}
fill unitsquare
xyscaled (\overlaywidth, \overlayheight)
withcolor (unif
laywidth,0) --
(\overlaywidth,\overlayheight) -- (0,\overlayheight) -- cycle;}
\stoptikzpicture}
\defineoverlay[decoration][\TIKZdecorationoverlay]
\setupframed
[decoration=snake]
\starttext
\framed[frame=off, rulethickness=3bp, background=decoration,
backgroundoffset=3mm, framecolor=
this wiki page:
http://wiki.contextgarden.net/Layers#Use_dynamic_content
here is another variant:
\defineoverlay[pagenumber:preset][\texsetup{pagenumber:preset}]
\startsetups pagenumber:preset
PRESET
\stopsetups
\defineoverlay[pagenumber:action][\texsetup{pagenumber:action}]
\startsetups
quot;Rogers, Michael K"
> To: mailing list for ConTeXt users
> Subject: Re: [NTG-context] TABLE: header with a thick bottom line
> Message-ID:
> <
> 1e5a50c784a8ad44b420ef5a1e9b2806afc33...@e14mbx20n.enterprise.emory.net>
>
> Content-Type: text/plain; charset="iso-
, but it's
kludgy.
Perhaps there is a better way...
Michael
\startuseMPgraphic{MP:thickBtm}
draw bottomboundary OverlayBox withpen pensquare scaled
\frameddimension{bottomrulethickness};
clip currentpicture to OverlayBox;
setbounds currentpicture to OverlayBox;
\stopuseMPgraphic
OverlayBox;
\stopuseMPgraphic
\defineoverlay[OL:thickBtm][\useMPgraphic{MP:thickBtm}]
\starttext
\bTABLE
\setupTABLE[align=middle]
\setupTABLE[header][background={OL:thickBtm},bottomrulethickness=3mm]
\setupTABLE[row][4][background={OL:thickBtm},bottomrulethickness=1.5mm]
%
\bTABLEhead\bTR
fill b withcolor .425green;%.85white ;
draw b ;
draw p withcolor black ;
setbounds currentpicture to a ;
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][frame=off,background=FunnyFrame,
offset=\bodyfontsize, width=\overlaywidth]%.8\tex
{offset}) ;
draw textext.urt ("\strut\getvariable{table:diagonal}{second}")
shifted (\frameddimension{offset},\frameddimension{offset}) ;
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic
\defineoverlay[table:line:diagonal][\useMPgraphic{table:line:diagonal}]
\st
\overlaywidth-rulethickness, rulethickness);
draw leftcorner -- rightcorner;
\stopuseMPgraphic
\defineoverlay
[DiagonalRule]
[\useMPgraphic{DiagonalRule}]
\define[2]\DiagonalLabel{%
\setuptabulate [after={\blank[\frameddimension{offset}]}]
\starttabulate [|p|r|]
\NC\NC #2 \NC\
OverlayBox withpen pencircle scaled 1pt withcolor green;
draw (currentpicture enlarged 2cm) withcolor red withpen pencircle
scaled 2pt;
\stopusableMPgraphic
\defineoverlay[myOverlay][\useMPgraphic{myFrame}]
\defineframedtext[myStatement][frame=off]
\setupframedtexts[myStatement][background=myOverlay
green;
draw (currentpicture enlarged 2cm) withcolor red withpen pencircle scaled
2pt;
\stopusableMPgraphic
\defineoverlay[myOverlay][\useMPgraphic{myFrame}]
\defineframedtext[myStatement][frame=off]
\setupframedtexts[myStatement][background=myOverlay,offset=overlay,autowidth=force]
\starttext
) withcolor red withpen pencircle
scaled 2pt;
\stopusableMPgraphic
\defineoverlay[myOverlay][\useMPgraphic{myFrame}]
\defineframedtext[myStatement][frame=off]
\setupframedtexts[myStatement][background=myOverlay,offset=overlay,autowidth=force]
\starttext
\framed[strut=no]{\startmyStatement FIRST
scaled 1pt withcolor
green;
You could also use
draw OverlayBox withpen ...
draw (d enlarged 2cm) withcolor red withpen pencircle scaled 2pt;
draw boundingbox currentpicture withpen pencircle scaled .1mm dashed
evenly withcolor blue ;
\stopusableMPgraphic
\defineoverlay[myOverlay][\
OverlayWidth,OverlayHeight) shifted
(-OverlayWidth/2,-OverlayHeight/2)) withpen pencircle scaled 1pt
withcolor green;
draw (d enlarged 2cm) withcolor red withpen pencircle scaled 2pt;
draw boundingbox currentpicture withpen pencircle scaled .1mm dashed
evenly withcolor blue ;
\stopusable
OverlayBox ;
\stopuseMPgraphic
that (experimental) mechanism has been removed (maybe something else get
in place, like regions we have already elsewhere)
\defineoverlay [verticalline] [\useMPgraphic{verticalline}]
\setupbackgrounds [text] [background=verticalline]
\definecolumnset [example] [n=2]
oesn't make sense any longer. Older betas
work perfectly.
\startuseMPgraphic{verticalline}
for i=1 upto NOfTextColumns-1 :
draw (rightboundary TextColumns[i]) shifted (2.5mm,0) shifted
-\MPxy\textanchor;
endfor ;
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic
\de
ra
braces:
\defineoverlay
[simpleslides:background:horizontal]
[{\externalfigure[/Users/graph/Documents/figures/background/ssuwave1][]}]
And I would advice to have a look at the directory key of
\setupexternalfigures. It is almost always a mistake to have a hard
coded path in the cod
301 - 400 of 858 matches
Mail list logo