my own macros to do this but I hoped you have already
something available to do this.
hm, i thought that you knew all those things -)
wikifyable ...
\definelayer[figure][width=\overlaywidth,height=\overlayheight]
\defineoverlay[figure][{\directsetup{figure}\tightlayer[figure]}]
\setupcolors
,
style=\bfd,
color=pagecolor]
\setuppapersize
[S6][S6]
\setuppagenumbering
[location=]
\definelayer
[page]
[width=\paperwidth,
height=\paperheight]
\setupbackgrounds
[page]
[background=bubble]
\defineoverlay
[bubble]
[\useMPgraphic{bubble}]
\startMPinclusions
picture last_picture
]
\but [CloseDocument] Close \\
\stopinteractionmenu
\setupwhitespace[big]
\setupblank[big]
%\defineoverlay[NextPage][\overlaybutton{forward}]
\def\StartTitlePage%
{
\setupbackgrounds[text][text][background=]
% \setupinteraction[menu=off]
\setupinteraction[menu=on]
%\setupinteractionbar
= unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
q= fullcircle scaled 3cm shifted (12cm,10cm) ;
fill p--reverse q--cycle withcolor \MPcolor{tgray} ;
\stopuseMPgraphic
\defineoverlay[image][\overlayfigure{hacker}]
\defineoverlay[shade][\useMPgraphic{highlighted}]
\setupbackgrounds[page][background
\uniqueMPgraphic{foo}
\stopTEXpage
\stoptext
hmm this is actually undefined behaviour since there is no background
hmmm, another try (but same result)
% engine=luatex
\startuniqueMPgraphic {foo}
fill OverlayBox;
\stopuniqueMPgraphic
\defineoverlay[foo][\uniqueMPgraphic{foo
to unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
\stopuseMPgraphic
\defineoverlay[headerrule][\useMPgraphic{headerrule}]
\starttext
\bTABLE[split=repeat,frame=off,background=color]
\bTABLEhead
\bTR[bottomframe=on]
\bTR[background=headerrule,backgroundoffset=-\linewidth]
\bTH A \eTH \bTH B
scaled 1pt ;
\stopuseMPgraphic
\defineoverlay[test 1][\useMPgraphic{test 1}]
\defineoverlay[test 2][\useMPgraphic{test 2}]
\defineoverlay[test 3][\useMPgraphic{test 3}]
\defineoverlay[test 4][\useMPgraphic{test 4}]
\startshapetext[test 1,test 2,test 3,test 4]
\input douglas % Douglas R. Hofstadter
[visual]
\definecolumnset[example][n=4,distance=5mm]
\startuseMPgraphic{columnrule}
path p ; p := unitsquare xyscaled (OverlayWidth+5mm,OverlayHeight) ;
draw lrcorner p -- urcorner p ;
setbounds currentpicture to p ;
\stopuseMPgraphic
\defineoverlay[columnrule][\useMPgraphic{columnrule
currentpicture to p ;
\stopuseMPgraphic
\defineoverlay[columnrule][\useMPgraphic{columnrule}]
\setupcolumnset[example][1,2,3][background=columnrule]
\starttext
\startcolumnset[example]
\dorecurse{30}{\fakewords{50}{100}}
\stopcolumnset
\stoptext
]
\startuniqueMPgraphic{test}
save p,q; picture p; path q;
q:= unitsquare xyscaled (OverlayWidth,.5OverlayHeight);
p:= image(linear_shade(q,6,red,green));
addto currentpicture also p;
addto currentpicture also (p yshifted .5OverlayHeight);
\stopuniqueMPgraphic
\defineoverlay
-- (xpart lxyb , ypart bxya) -- lxyb --
center pb;
pickup pencircle scaled 1pt ;
draw pab withcolor transparent(1,.5,.625yellow) ;
anchor_box(\MPanchor{\MPvar{from}}) ;
fi ;
\stopMPpositiongraphic
\defineoverlay [margingraphics] [\positionoverlay{margingraphics
withcolor transparent(1,.5,.625yellow) ;
anchor_box(\MPanchor{\MPvar{from}}) ;
fi ;
\stopMPpositiongraphic
\defineoverlay [margingraphics] [\positionoverlay{margingraphics}]
\setupbackgrounds
[page]
[background=margingraphics]
\starttext
\setupinmargin[stack=yes]
\defineframedtext
withcolor transparent(1,.5,.625yellow) ;
anchor_box(\MPanchor{\MPvar{from}}) ;
fi ;
\stopMPpositiongraphic
\defineoverlay [margingraphics] [\positionoverlay{margingraphics}]
\setupbackgrounds
[page]
[background=margingraphics]
\starttext
\setupinmargin[stack=yes
]
# \definemeasure
# \defineoutput[name][specials]
\defineoverlay[names][command]
# \definepagebreak
\definepalet[name][name]
\definepapersize[name][dimenstions]
\defineparagraphs[name][options and settings]
\defineprofile[names][names]
\defineprogram[name][text][text]
# \definepushbutton
# \definepushsymbol
;
macouleur = .7(green+blue);
% beginfig(1);
papiercinq((-5,-5),(5,5),macouleur);
% endfig;
% end
\stopuseMPgraphic
\defineoverlay[Papier5trait][\useMPgraphic{Papier5trait}]
%
\defineframedtext[Papier5trait][background=Papier5trait,width=fit,offset=2ex,frame=on,framecolor=red,rulethickness=3pt,corner=round
I have prepared a movie in one of the presentation styles and set
this ready in the followwing way:
\defineoverlay
[name]
[{\framed[height=\overlayheight, width=\overlaywidth,%
background=color, backgroundcolor=yellow]%
{\midaligned{title text
?
something like
\startuniqueMPgraphic{transp:dim}
fill OverlayBox withcolor transparent(1,.25,white); % mode,transp.,color
\stopuniqueMPgraphic
\defineoverlay[transp:dim]
[\uniqueMPgraphic{transp:dim}]
\framed[background=transp:dim]{your text}
There are some problems with transparency
I create the semi-transparent elements?
Hi John,
you can define a color for the transparent background of the text and
place it with the cover text at the background.
\setupcolors[state=start]
\setupexternalfigures[location=global]
\definecolor[coverred][r=1,a=1,t=.5]
\defineoverlay
horizontal and
vertical and not streched in both directions.
\defineoverlay[image][\backgroundimage1\overlaywidth\overlayheight{\externalfigure[\framedparameter{backgroundimage}]}]
\framed[width=15cm,height=25cm,backgroundimage=cow.pdf,background=image]{test}
Wow, I never thought of this before
and
vertical and not streched in both directions.
\defineoverlay[image][\backgroundimage1\overlaywidth\overlayheight{\externalfigure[\framedparameter{backgroundimage}]}]
\framed[width=15cm,height=25cm,backgroundimage=cow.pdf
,background=image]{test}
Hi Hans,
nearly perfect but can I also test
ConTeXt loop macros.
Best wishes, Peter
Hi,
there is smarter and better solution than loop for doing this work,
you can use leaders. I prefer myself xledaers in this example (alternative b).
\defineoverlay[PageGrid][\PageGrid]
\setupbackgrounds[page][background=PageGrid,offset=5mm]
\starttext
Hi Hans,
can you provide a backgroundimage key for localframed (ot use it in framed)
and fastlocalframed (to use it in \setupbackgrounds) to create something like:
\setupexternalfigures[location=global]
\setupcolors[state=start]
\starttext
\defineoverlay
[Wallpaper]
[\backgroundimage{1
Wolfgang Schuster wrote:
Hi Hans,
can you provide a backgroundimage key for localframed (ot use it in framed)
and fastlocalframed (to use it in \setupbackgrounds) to create something like:
\setupexternalfigures[location=global]
\setupcolors[state=start]
\starttext
\defineoverlay
[state=start]
\starttext
\defineoverlay
[Wallpaper]
[\backgroundimage{1}{\paperwidth}{\paperheight}{\externalfigure[cow]}]
\setupbackgrounds
[page]
[background={color,Wallpaper},
backgroundcolor=orange]
\startstandardmakeup
\stopstandardmakeup
\stoptext
.
\defineoverlay[image][\backgroundimage1\overlaywidth\overlayheight{\externalfigure[\framedparameter{backgroundimage}]}]
\framed[width=15cm,height=25cm,backgroundimage=cow.pdf,background=image]{test
and not streched in both directions.
\defineoverlay[image][\backgroundimage1\overlaywidth\overlayheight{\externalfigure[\framedparameter{backgroundimage}]}]
\framed[width=15cm,height=25cm,backgroundimage=cow.pdf,background=image]{test}
Wow, I never thought of this before. This is a really nice
Placing a movie with the following code places the static overlay a
bit (too far) to the right, spilling it on the right side out of the
frame:
\useexternalrendering[sharkfilm][video/quicktime][shark.mp4]
\defineoverlay
[shark][{\externalfigure[shark-film][width=\overlaywidth,type
=tmava,framecolor=svetla]%
\placecontent}
\stopframedtext
}
%
\setupbackgrounds
[text]
[%backgroundoffset=10pt,%.5cm,
background={contentmenu,nextpage}]
%
\defineoverlay
[ContentOnOff]
[{\goto{\framed[width=\overlaywidth,height=\overlayheight,frame=off]{\hss
}]
%
\defineoverlay
[ContentOnOff]
[{\goto{\framed[width=\overlaywidth,height=\overlayheight,frame=off]{\hss}}%
[JS(Toggle_Hide{Content})]}]%\overlaybutton{JS(Toggle_Hide{Content})}]
%
\startinteractionmenu[bottom]
\setupinteraction
[color=svetla,
contrastcolor=black]
\hbox
(BodyFontSize/2);
fill b withcolor yellow;
draw b;
draw pic withcolor black;
setbounds currentpicture to a;
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext
[FunnyText]
[background=FunnyFrame,
frame=off
the boundingbox sets the final size of the gfx. if your gfx is larger
than the bb, things will overlap. just enlarge the bb, so that it fits
the gfx.
Peter
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext
[FunnyText]
[background=FunnyFrame,
frame=off
2007/7/15, WolfgangZ [EMAIL PROTECTED]:
Hello,
how can I use a the background of a framed for a hyperlink? I wan't to
achive that the area (of a colored box) is handled as link.
Many thanks
Wolfgang
\setupinteraction[state=start]
\defineoverlay[knuthref][\overlaybutton{sec:knuth
Wolfgang Schuster schrieb:
2007/7/15, WolfgangZ [EMAIL PROTECTED]:
Hello,
how can I use a the background of a framed for a hyperlink? I wan't to
achive that the area (of a colored box) is handled as link.
Many thanks
Wolfgang
\setupinteraction[state=start]
\defineoverlay[knuthref
{linewidth} ;
draw unitsquare xyscaled(OverlayWidth-lw,OverlayHeight-lw)
smoothed \MPvar{radius}
withpen pencircle scaled lw
withcolor c ;
endgroup ;
\stopuniqueMPgraphic
\defineoverlay[fancyframe]
[\uniqueMPgraphic{fancyframe}{linewidth=4pt,radius=5pt,color=MyFrameColor
; and it is not parametrized.
Someone knows the trick?
perhaps with an overlay?
--
\def\TightFrame
{\startoverlay
{\framed[width=\overlaywidth,height=\dimexpr(\overlayheight -
5ex)]{}}{}\stopoverlay} \defineoverlay[TightFrame][\TightFrame
with an overlay?
--
\def\TightFrame
{\startoverlay
{\framed[width=\overlaywidth,height=\dimexpr(\overlayheight -
5ex)]{}}{}\stopoverlay}
\defineoverlay[TightFrame][\TightFrame]
\starttext
\startframedtext [background=TightFrame,frame=off]
Hallo
; and it is not parametrized.
Someone knows the trick?
perhaps with an overlay?
--
\def\TightFrame
{\startoverlay
{\framed[width=\overlaywidth,height=\dimexpr(\overlayheight -
5ex)]{}}{}\stopoverlay} \defineoverlay[TightFrame][\TightFrame
][text][background=whatever]
\defineoverlay[whatever][{\framed[width=\overlaywidth,height=\overlayheight]{}}]
\couplepage[chapter][before={\defineoverlay[whatever][]}]
\setuphead[chapter][before={\pagetype[chapter]}]
\starttext
\chapter{First} \page test \chapter{second} \page test
Aditya
[state=start]
\defineoverlay
[colorrule]
[{\color[blue]{\vrule width2\hsize height\headerheight\relax}}]
\setupbackgrounds
[header]
[background=colorrule]
\starttext test \stoptext
Wolfgang
___
If your question
\setupcolors[state=start]
\setupbackgrounds
[header]
[leftedge,leftmargin,text,rightmargin,rightedge]
[background=color,backgroundcolor=blue]
\starttext test \stoptext
This works, but I need a non-zero margin distance.
Variant 2:
\setupcolors[state=start]
\defineoverlay
[bild][]{\externalfigure[cover4a1.pdf][]}
\defineoverlay[cover][{\placelayer[bild]}]
\setupcolors[state=start]
\starttext
\setuppagenumbering[alternative=singlesided]
\setupnumbering[place=]
\setupbackgrounds[page][background=cover]
\startstandardmakeup[doublesided=no]
Gerhard
--
Gerhard
, width=\paperwidth,
height=\paperheight]
\setlayer[bild][]{\externalfigure[cover4a1.pdf][]}
\defineoverlay[cover][{\placelayer[bild]}]
\setupcolors[state=start]
\starttext
\setuppagenumbering[alternative=singlesided]
\setupnumbering[place=]
\setupbackgrounds[page][background=cover
=middle]
\definelayer[bild][x=0mm, y=0mm, width=\paperwidth,
height=\paperheight]
\setlayer[bild][]{\externalfigure[cover4a1.pdf][]}
\defineoverlay[cover][{\placelayer[bild]}]
\setupcolors[state=start]
\starttext
\setuppagenumbering[alternative=singlesided]
\setupnumbering[place
On 5/11/07, Bert Trüger [EMAIL PROTECTED] wrote:
Hi,
I have two problems. Firstly, I'd like to insert a headrule in textwidht
under the headertext
maybe this can help you:
%\showframe
\setupcolors[state=start]
\defineoverlay[HeadBack][{%
\vbox
,
inbetween=,
header=,
textstyle=,
style=]
\def\TITLE#1%
{#1\setMPtext{titleentry}{#1}}
\setupbackgrounds
[page]
[background=page]
\defineoverlay[page] [\useMPgraphic{page}]
\startuseMPgraphic{page}
StartPage;
save r;
picture r;
r := textext.rt(\MPstring{titleentry});
r := r
{titleentry}{xxx}
\setuphead
[title]
[textcommand=\TITLE,
page=right,
before=,
after=\blank,
inbetween=,
header=,
textstyle=,
style=]
\def\TITLE#1%
{#1\setMPtext{titleentry}{#1}}
\setupbackgrounds
[page]
[background=page]
\defineoverlay[page] [\useMPgraphic{page
}]
\processaction[\currentmoduleparameter{Info}]
[yes= \def\InfoMark{Info},
no= \def\InfoMark{},
\v!unknown= \def\InfoMark{},
\v!default= \def\InfoMark{}]
\setupbackgrounds[page][background={\CropMark,\InfoMark}]
% We define names for the elements of our cropmarks.
\defineoverlay[Cross
;
drawoptions (withpen pencircle scaled 1pt withcolor .625red) ;
draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h) ;
draw boundingbox p ;
setbounds currentpicture to unitsquare xyscaled(w,h) ;
\stopuseMPgraphic
defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
defineframedtext
to unitsquare xyscaled(w,h) ;
\stopuseMPgraphic
defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
defineframedtext[FunnyText][frame=off,background=FunnyFrame]
\def\StartFrame{\startFunnyText}
\def\StopFrame {\stopFunnyText }
\def\FrameTitle#1%
{\setMPtext{FunnyFrame}{\hbox spread 1em
);
\stopuseMPgraphic
\defineoverlay
[headerrule]
[\useMPgraphic{headerrule}]
\defineoverlay
[headerrule]
[\vrule height\headerheight width0pt%
\vrule width\paperwidth height 0.4pt\relax]
\defineoverlay
[headerrule]
[{\framed[width=\paperwidth,height
}
setbounds currentpicture to unitsquare xyscaled (\the\paperwidth,\the
\headerheight); draw (0,0)--(\the\paperwidth,0);
\stopuseMPgraphic
\defineoverlay
[headerrule]
[\useMPgraphic{headerrule}]
\defineoverlay
[headerrule]
[\vrule height\headerheight width0pt%
\vrule width
]}
\scratchcounter=\totalnumberofpages
\advance \scratchcounter by -\realpageno
\vskip 0pt plus \scratchcounter fil
\fi}
\egroup}
\defineoverlay[MoveDown][\Gag]
\setupbackgrounds[state=repeat]
\setupbackgrounds
[page]
[background=PageBackground
(\the\paperwidth,\the
\headerheight); draw (0,0)--(\the\paperwidth,0);
\stopuseMPgraphic
\defineoverlay
[headerrule]
[\useMPgraphic{headerrule}]
\defineoverlay
[headerrule]
[\vrule height\headerheight width0pt%
\vrule width\paperwidth height 0.4pt\relax]
\defineoverlay
[headerrule]
[{\framed
:
\definecolor[outer][r=0,g=0,b=.92]
\definecolor[current][r=0,g=0,b=.4]
\definecolor[inner][s=.98]
\defineoverlay[mybackground][\useMPgraphic{left}]
\startuseMPgraphic{left}
StartPage ;
fill Page withcolor \MPcolor{inner} ;
z1 = ulcorner Page ;
z5 = llcorner Page ;
path q ;
q = z1 -- z5 ;
t = arclength
=???], and
I can
use \defineoverlay[page][\useMPgraphic{page}], then use
MetaPost to
draw the
page background. But I also use something like
\setuppapersize[A7][A3]
to
compose the output, and it seems that the \setupbackgrounds command
only
affect on A7 sub-paper. I also noticed
in
\defineoverlay[Draft][{\blue
\scale[factor=max]{\rotate[rotation=60]{~DRAFT~}}}]
\setupbackgrounds[page][background=Draft]
%% End watermark
}
And I normally invoke it by
\enablemode[Draft]
\setupcolors[state=start]
\defineoverlay[Draft][{\blue
\scale[factor=max
}{
%% Put a DRAFT watermark in
\defineoverlay[Draft][{\blue
\scale[factor=max]{\rotate[rotation=60]{~DRAFT~}}}]
\setupbackgrounds[page][background=Draft]
%% End watermark
}
And I normally invoke it by
\enablemode[Draft]
\setupcolors[state=start]
\defineoverlay[Draft
/local/bin.
that test should go into the test repos (which btw we should get running
now that it gets filled up); i have to look into that asap
Hans
\defineoverlay [foregraphics] [\positionoverlay{foregraphics}]
\setupbackgrounds
.
\defineoverlay [foregraphics] [\positionoverlay{foregraphics}]
\setupbackgrounds
[page]
[background={foreground,foregraphics}]
\starttext
\hpos{r23}{7} \quad \hpos{r24}{8}
\startMPpositiongraphic{mypos:line}
mpprocset := 0; % context doesn't yet
q -- leftboundary p -- cycle ;
fill reverse rightboundary q -- rightboundary p -- cycle ;
setbounds currentpicture to Page ;
\stopuseMPgraphic
\defineoverlay[coverpage][\useMPgraphic{bg}]
\starttext
\setupbackgrounds[page]
[background=coverpage]
\centerline
Here is a simple example
\setupcolors[state=start]
\defineoverlay[WatermarkOverlay]
[{\framed[frame=off,foregroundcolor=gray]
{\scale[sx=12,sy=12]
{\rotate[rotation=20.0]{Draft]
\setupbackgrounds[page][background=WatermarkOverlay]
\starttext
-- bottomboundary p -- cycle ;
drawoptions(withcolor .65white) ;
fill reverse leftboundary q -- leftboundary p -- cycle ;
fill reverse rightboundary q -- rightboundary p -- cycle ;
setbounds currentpicture to Page ;
\stopuseMPgraphic
\defineoverlay[coverpage][\useMPgraphic{bg
) 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]
\def\StartFrame{\startFunnyText}
\def
. Mozem poprosit o nakopnutie? Je dost mozne, ze
sa uberam uplne zlym smerom?
Thanks for your help,
Marcel
\setupoutput[pdf]
\setupcolors[state=start]
\setupinteraction[state=start]
\defineoverlay[TheoremFrame][\useMPgraphic{TheoremFrame}]
\defineframedtext[TheoremText][frame=off,background
--
\def\MPclipFourR#1#2#3%
{\startreusableMPgraphic{clip:fourR:#1#2#3}{}
draw fullcircle;
\stopreusableMPgraphic
\reuseMPgraphic{clip:fourR:#1#2#3}{}}
\defineoverlay
[StatusAchtergrondR]
[\MPclipFourR{\overlaywidth}{\overlayheight
[WatermarkLayer][hoffset=-4cm,voffset=12cm]{\setups{WatermarkSetup}}
\defineoverlay[WatermarkOverlay][{\placelayer[WatermarkLayer]}]
\starttext
\framed[height=\textheight, width=\textwidth,
background={WatermarkOverlay}, frame=on]{overlay frame}
\chapter{first} \dorecurse{10}{\input tufte }
\chapter
\stopsetups
\definelayer[WatermarkLayer]
\setlayer[WatermarkLayer][hoffset=-4cm,voffset=12cm]{\setups{WatermarkSetup}}
\defineoverlay[WatermarkOverlay][{\placelayer[WatermarkLayer]}]
\starttext
\framed[height=\textheight, width=\textwidth,
background={WatermarkOverlay}, frame=on]{overlay frame
,\strutheight,\strutdepth,\strutheight) ;
%draw p withpen pencircle scaled 1pt ;
\stopuseMPgraphic
\defineoverlay[test 1][\useMPgraphic{test 1}]
\defineoverlay[test 2][\useMPgraphic{test 2}]
\startuseMPgraphic{CDShape}
draw fullcircle scaled 12cm;
draw fullcircle scaled 4cm;
\stopuseMPgraphic
][{\processMPbuffer[stack1]}]
\definesymbol[step 2][{\processMPbuffer[stack1,stack2]}]
\definesymbol[step 3][{\processMPbuffer[stack1,stack2,stack3]}]
\definefieldstack
[stack]
[step 1,step 2,step 3]
[frame=off]
\defineoverlay[cowbg][{\externalfigure[cow][width=10cm]}]
\framed[background="">
\definesymbol[step 1][{\processMPbuffer[stack1]}]
\definesymbol[step 2][{\processMPbuffer[stack1,stack2]}]
\definesymbol[step 3][{\processMPbuffer[stack1,stack2,stack3]}]
\definefieldstack
[stack]
[step 1,step 2,step 3]
[frame=off]
\defineoverlay[cowbg][{\externalfigure[cow
FrameTitle macro. But I
don't have much experience with random stuff, so there maybe better ways.
Greetings, Peter
Renaud
PS: Thanks to Peter, Andrea and Hans for the thread absolute positioning
of figures ;)
\setupcolors[state=start]
\usemodule[pre-original]
\defineoverlay[FunnyFrame
]
\usemodule[pre-original]
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][frame=off,background=FunnyFrame]
\def\StartFrame{\startFunnyText}
\def\StopFrame {\stopFunnyText }
\def\FrameTitle#1%
{\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss
]
{\externalfigure[layTest][]}
\setlayer [layer3]
[x=.5\paperwidth, y=.5\paperheight]
{\color[darkred]{ \bf This is a text}}
\defineoverlay[overlay1][{\placelayer[layer1]}]
\defineoverlay[overlay2][{\placelayer[layer2]}]
\defineoverlay[overlay3
]
{\color[darkred]{ \bf This is a text}}
\defineoverlay[overlay1][{\placelayer[layer1]}]
\defineoverlay[overlay2][{\placelayer[layer2]}]
\defineoverlay[overlay3][{\placelayer[layer3]}]
% end of first
% second approach
\definelayer[layer1b][] % just one
\setlayer
to obtain a deterministic random-like shapes, i.e. to get
always the same shape for Overlay1...
Renaud
PS: Thanks to Peter, Andrea and Hans for the thread absolute positioning
of figures ;)
\setupcolors[state=start]
\usemodule[pre-original]
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame
Hi all,
I would use fieldstack with \getbuffer and overlays... Why the
following code doesn't work ? Is there another way to do that ?
TIA
Renaud
%%% stack.tex
\setupcolors[state=start]
\usemodule[pre-original]
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext
[EMAIL PROTECTED] wrote:
Hi,
I am going to write a slides with a picture as background. I have
googled but got no hints.
Can someone recommend how to achieve this?
Thanks in advance!
ah .. an easy one
\defineoverlay[nice][\overlayfigure{something.pdf}]
\setupbackgrounds[page
One of the approaches is to use things like
\defineoverlay [TitleGraphic]
[{\externalfigure[picture-A][width=\overlaywidth,height=\overlayheight]}]
\setupbackgrounds[page][background={TitleGraphic}] %
Yet another way is using layers. For details please refer to the
details manual
=start]
\definetextbackground[foo]
[backgroundcolor=lightgray,
frame=off,
level=-1, % -3,-2,-1,+1,+2
]
\startuniqueMPgraphic{bar}
fill OverlayBox withcolor red ;
\stopuniqueMPgraphic
\defineoverlay[bar][\uniqueMPgraphic{bar}]
\starttext
An example of a \starttextbackground[foo
{test}
circular_shade(OverlayBox,2,red,green) ;
\stopuniqueMPgraphic
\defineoverlay[test][\uniqueMPgraphic{test}]
\starttext
\framed[background=test, width=40mm, height=20mm]{Broken}
\stoptext
___
ntg-context mailing list
ntg-context@ntg.nl
http
=start]
\defineoverlay[test][{\bgroup\color[red]\blackrule[height=\paperheight,width=\paperwidth]\egroup}]
\setupbackgrounds[paper][background=test]
\starttext
\null
\stoptext
Thanks anyway,
Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
]
\defineoverlay[test][{\bgroup\color[red]\blackrule[height=\paperheight,width=\paperwidth]\egroup}]
\setupbackgrounds[paper][background=test]
\starttext
\null
\stoptext
Your example works, but the following doesn't:
\setupcolors[state=start]
\defineoverlay[test][{\bgroup\color[red]\blackrule[height
ConTeXt version 2006.08.30 9:28)
\startuseMPgraphic{TitleGraphic}
draw unitsquare xyscaled (\overlaywidth-5mm,\overlayheight-5mm);
\stopuseMPgraphic
\defineoverlay [TitleGraphic] [\useMPgraphic{TitleGraphic}]
\setupbackgrounds[page][background={TitleGraphic,page}]
\starttext
\startcolumns[n=3
- sometimes it's OK and sometimes it's
pretty much shifted to the left).
(Using ConTeXt version 2006.08.30 9:28)
\startuseMPgraphic{TitleGraphic}
draw unitsquare xyscaled (\overlaywidth-5mm,\overlayheight-5mm);
\stopuseMPgraphic
\defineoverlay [TitleGraphic] [\useMPgraphic{TitleGraphic
(\overlaywidth-5mm,\overlayheight-5mm);
\stopuseMPgraphic
\defineoverlay [TitleGraphic] [\useMPgraphic{TitleGraphic}]
\setupbackgrounds[page][background={TitleGraphic,page}]
\starttext
\startcolumns[n=3]
\dorecurse{3}{\input tufte $$a^2+b^2=c^2$$}
\stopcolumns
\stoptext
[bluntorange] [r=.9373, g=.6471]
\setupcolors[state=start]
\definelayer[Test]
\setupbackgrounds[text]
[background=Test]
\defineoverlay[BAR][{\bgroup\color[bluntorange]\blackrule[width=\overlaywidth,height=\overlayheight]\egroup}]
\def\FOO{\dosingleempty\doFOO}
\def\doFOO[#1]#2{% very simplified macro
\startuseMPgraphic{My_SquareA}
begingroup
if (\DbgFill=0) :
fill OverlayBox withcolor green ;
fi
endgroup ;
\stopuseMPgraphic
\defineoverlay[MySquareA]
[\useMPgraphic{My_SquareA}]
\startuseMPgraphic{My_SquareB}
begingroup
dbg_fill(OverlayBox withcolor yellow) ;
endgroup ;
\stopuseMPgraphic
All,
I have an error here:
\setupcolors[state=start]
\startuniqueMPgraphic{demo circle}
path p;
p:=fullcircle xscaled \overlaywidth yscaled \overlayheight;
fill p with color .85whwite;
draw p withpen pencircle scaled 2pt withcolor .625red;
\stopuniqueMPgraphic
\defineoverlay[demo circle
The Wizard wrote:
All -
I have a small block which creates a DRAFT watermark as the page
background:
% Create Draft watermark for later use
\doifmode{draft}{
% Put a DRAFT watermark in Sun Blue
\defineoverlay[Draft][{\sunbluet
\scale[factor=max]{\rotate[rotation=60]{~DRAFT
All -
I have a small block which creates a DRAFT watermark as the page
background:
% Create Draft watermark for later use
\doifmode{draft}{
% Put a DRAFT watermark in Sun Blue
\defineoverlay[Draft][{\sunbluet
\scale[factor=max]{\rotate[rotation=60]{~DRAFT~}}}]
\setupbackgrounds[page
spacing and can fix the problem)
Here is a nice alternative:
\starttext
\margintext {some text in margin}
\setupframedtexts[background={YourTrick,MyTrick}]
\definelayer[MyTrick]
\startsetups MyTrick
\setlayer[MyTrick]{\placemargintexts}
\stopsetups
\defineoverlay[YourTrick][\setups
like only the last overlayseries is kept.Why is this and how to remedy this?Like this with several names overlay names: \def\startoverlaygraphics#1{% \startpositionoverlay{#1}% } \def\stopoverlaygraphics#1{% \stoppositionoverlay \defineoverlay[#1][\positionoverlay{#1}] \setupbackgrounds[page][
1pt;
StopPage;
\stopuseMPgraphic
\defineoverlay
[PageFrame][\useMPgraphic{PageFrame}]
\setupbackgrounds
[page]
[background=PageFrame]
The trird solutions is probably the way to go, but it influences only
a single page and \getmarking[chapter] has no influence. I guess
to set the layer each page
\setuppagenumbering[location=]
\definelayer
[mypagenumber]
[width=\paperwidth,
height=\paperheight]
\defineoverlay
[mypagenumber]
[\setups{mypagenumber}]
\setupbackgrounds
[page]
[background=mypagenumber]
\startsetups mypagenumber
\setlayerframed
]
\defineoverlay[pagebg][\useMPgraphic{pagebg}]
\setupbackgrounds[page][background=pagebg]
\startuseMPgraphic{pagebg}
StartPage ;
fill Page withcolor \MPcolor{red} ;
fill Field[Text][Text] withcolor \MPcolor{trwhite} ;
StopPage ;
\stopuseMPgraphic
\starttext
\dorecurse{10}{\input tufte}
\stoptext
--
Johan
]
\setupbackgrounds[state=repeat]
\defineoverlay[pagebg][\useMPgraphic{pagebg}]
\setupbackgrounds[page][background=pagebg]
\startuseMPgraphic{pagebg}
StartPage ;
fill Page withcolor \MPcolor{red} ;
fill Field[Text][Text] withcolor \MPcolor{trwhite} ;
StopPage ;
\stopuseMPgraphic
\starttext
=5cm, height=4cm]
\definelayer[wr-layer]
\defineoverlay[wr-overlay][\composedlayer{wr-layer}]
\setupbackgrounds[page][background={wr-overlay}]
\starttext
\setlayer[wr-layer][x=-0.1cm,y=-0.1cm]{\externalfigure[wr]}
Blablabla
\stoptext
=start]
\setuppagenumbering[location=, alternate=singlesided]
\usetypescript[sans][12pt]
\setupbodyfont[helvetica,ss,12pt]
\definelayer[s1]
\defineoverlay[s1][\composedlayer{s1}]
\setupbackgrounds[page][background=s1]
\def\OCustomer{Test Customer}
\def\OProject{KM4 - MCC}
\def\ODate{2006-04-04}
\def
will see, that one cubicle is missing!
i run out of tex memory (8 meg) while converting the big last one
btw:
\definelayer[s1]
\defineoverlay[s1][\composedlayer{s1}]
\setupbackgrounds[page][background=s1]
you can omit the second lin ethere (automatically done)
\definelayer[s1
][a4]
\useexternalfigure[wr][dpm][type=png, width=5cm, height=4cm]
\definelayer[wr-layer]
\defineoverlay[wr-overlay][\composedlayer{wr-layer}]
\setupbackgrounds[page][background={wr-overlay}]
\setupbackgrounds[page][background={foreground,wr-overlay}]
Cheers, Vit
\starttext
\setlayer[wr
601 - 700 of 788 matches
Mail list logo