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
=footer]
\setupheadertexts[\CONTEXT\ imposition test]
\showframe
\setupbackgrounds [text][text][background=color,backgroundcolor=lightgray]
% Where the block of pages is placed on the sheet
% (relevant if there is space left over.)
\setuplayout [location=middle,marking=on]
\startbuffer[Fakepage
noticed a thin white line on the right side.
>
> Here is a Minimal Working Example:
>
> ConTeXt ver: 2023.09.26 18:19 LMTX
>
> \setupbackgrounds[page][background=color,backgroundcolor=black]
> \setuppagenumbering[alternative=doubles
Hi,
I was using \setuppagenumbering[alternative=doublesided] to get double
sided pages.
After doing that I noticed a thin white line on the right side.
Here is a Minimal Working Example:
ConTeXt ver: 2023.09.26 18:19 LMTX
\setupbackgrounds[page][background=color,backgroundcolor=black
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
area as well as under
the margins.
* I thought \useMPgraphics would be enough to re-calculate on every page?
* How can I set a background to the footer area, but page width?
* I tried \overlaywidth as well as OverlayWidth in the MP graphic –
how do I get the page size?
You need \setupbackgrounds
\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
,
footerstate=empty,
setups={toclist},
before=\setups{toc:setups},
]
\startsetups toc:setups
\setupbackgrounds[page][background=color, backgroundcolor=blue]
\stopsetups
\definemakeup
[standard]
[
doublesided=no,
page=right,
pagestate=start,
headerstate=empty
Index % todo: lucida
{%\startnotmode[*\v!frontpart]
\page[\v!right]
\setupbackgrounds[\v!paper][\c!background=\v!color]
\startmakeup[\v!standard]
\raggedleft
\doifsomething{\currentheadnumber}
{\hfill\expanded{\processMPheadnumber{\currentheadnumber}}}
\vfill
,
\c!numberstyle=\bfe]
and
\def\PlaatsHoofdstukIndex % todo: lucida
{%\startnotmode[*\v!frontpart]
\page[\v!right]
\setupbackgrounds[\v!paper][\c!background=\v!color]
\startmakeup[\v!standard]
\raggedleft
\doifsomething{\currentheadnumber}
{\hfill\expanded
,
footer=0.75cm,
]
\definelayer[test3]
%[x=.5\paperwidth, y=.5\paperheight]
[x=.5\textwidth, y=.5\textheight]
%\setupbackgrounds[page]
\setupbackgrounds[text]
[background=test3]
\starttext
\setlayer[test3][location={middle}]
\framed[offset=overlay
\showframe
\setupexternalfigures[location={default}]
\setuplayout
[backspace=2.5cm,
topspace=1cm,
height=28cm,
width=17cm,
header=0cm,
footer=0.75cm,
]
\definelayer[test3]
%[x=.5\paperwidth, y=.5\paperheight]
[x=.5\textwidth, y=.5\textheight]
%\setupback
[
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
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
up pencircle scaled 2pt ;
> draw p[0] withcolor red ;
> StopPage ;
> \stopreusableMPgraphic
>
> \defineoverlay[Card][\reuseMPgraphic{card}]
>
> \setupbackgrounds[page]
>[state=repeat,
> background={Card}]
>
> \starttext
>
>
(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
ppapersize
[label] [A4]
\setuplayout
[page]
\setuppaper
[nx=3,
ny=10,
dx=1mm,
dy=1mm]
\setuplayout
[horoffset=50mm,
veroffset=10mm]
\setuparranging
[XY]
\setupbackgrounds
[page]
[frame=on]
\starttext
\dorecurse{56}
{\startpagemakeup
\midalign
\defineoverlay
[verticalrule]
[\useMPgraphic{verticalrule3}]
\definecolumnset
[exam]
[n=2,
background=verticalrule]
\setuplayout[width=19cm, height=26cm, header=1cm, footer=.5cm,backspace=1cm]
\setupheader[before=\vfil, after=\vfil]
\setupbackgrounds[header][text][frame=off, 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
\defineoverlay [backgroundimage] [\reuseMPgraphic{backgroundgraphic}]
\setupbackgrounds [page] [background=backgroundimage]
Wolfgang
___
If your question is of interest to others as well, please add an entry to the
Wiki!
\baselineskip-0.4pt)]
{\framed[
background=color,
backgroundcolor=transparentgreen,
frame=off,
strut=yes,
offset=0pt,
width=\dimexpr(0.05\textwidth)+\PQhalfwith+\PQhalfwith,
height=\dimexpr(\posB\baselineskip-\posA\baselineskip)]{\bfd PULL QUOTE\\TRIAL}}
\setupbackgrounds[page
\setupbackgrounds
[page]
[background={backgraphics,foreground,foregraphics}]
\defineoverlay [backgraphics] [\positionoverlay{backgraphics}]
\defineoverlay [foregraphics] [\positionoverlay{foregraphics}]
\setupMPvariables
[mpos:box]
[linecolor=blue,
linewidth=\linewidth,
fillcolor
][
preset=lefttop,
%x=0mm,y=0mm,
width=\paperwidth,
height=\paperheight,
]
\setupbackgrounds[page][background=papier]
\starttext
\showframe
TEST
\setlayerframed[papier][
preset=lefttop,
%x=-\measure{Bleed},
%y=-\measure{Bleed},
offset=overlay,
Hi Willi,
thank you, I wasn’t aware that \flushlayer works this way. This was also
the problem in my real project.
And I had the wrong layer mentioned in \setupbackgrounds from another test.
Also, cropoffset was interfering in the real project, see my other mail.
Hraban
Am 16.04.22 um 22:27
imexpr\paperwidth + 2\measure{Bleed}\relax}]
>
> \definelayer[papier][
> preset=lefttop,
> %x=0mm,y=0mm,
> width=\paperwidth,
> height=\paperheight,
> ]
> \setupbackgrounds[paper][background=cover,state=start]
>
>
> \starttext
> \showframe
> TEST
>
}\relax}]
\definelayer[papier][
preset=lefttop,
%x=0mm,y=0mm,
width=\paperwidth,
height=\paperheight,
]
\setupbackgrounds[paper][background=cover,state=start]
\starttext
\showframe
TEST
\setlayerframed[papier][
preset=lefttop,
%x=-\measure{Bleed},
%y=-\measure{Bleed},
offset
neoverlay[chapter-thumb][\useMPgraphic{chapter-thumb}]
\startsectionblockenvironment[bodypart]
\setupbackgrounds[rightpage][background=chapter-thumb]
\stopsectionblockenvironment
\showframe
\starttext
\startfrontmatter
\startchapter[title=Test A]
\samplefile{ward}
\stopchapt
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
ddpageelse{}
{\pushbackground[page]
\resetlayer[chapCover]
\setlayer
[chapCover]
{\determineheadnumber[chapter]
\externalfigure
[chap-cover-\currentheadnumber]
[width=\paperwidth]}
\setupbackgrounds[page][background=chapCover]
\
\externalfigure
[chap-cover-\currentheadnumber]
[width=\paperwidth]}
\setupbackgrounds[page][background=chapCover]
\page[empty]
\popbackground}
\stopsetups
\startsetups chapter:after
\doifoddpageelse{}
{\page[empty]}
\stopsetups
\set
tartsetups chapter:before
\doifoddpageelse{}
{\pushbackground[page]
\resetlayer[chapCover]
\setlayer
[chapCover]
{\determineheadnumber[chapter]
\externalfigure
[chap-cover-\currentheadnumber]
[width=\paperwidth]}
\setupbackgrounds[page][background=cha
layer[mill]{\externalfigure[mill][width=\paperwidth]}
\startsetups chapter:before
\doifoddpageelse{}
{\pushbackground[page]
\setupbackgrounds[page][background=mill]
\page[empty]
\popbackground}
\stopsetups
\startsetups chapter:after
\doifoddpageelse{}
{\page[empty]}
\
[x=0mm,
y=0mm,
width=\paperwidth,
height=\paperheight,repeat=yes]
\setlayer
[mill]
{\externalfigure[mill][width=\paperwidth]}
\startsetups chapter:before
\doifoddpageelse{}
{\pushbackground[page]
\setupbackgrounds[page][background=mill]
\p
perwidth,height=\paperheight,repeat=yes]
\setlayer[mill]{\externalfigure[mill][width=\paperwidth]}
\startsetups chapter:before
\doifoddpageelse{}
{\pushbackground[page]
\setupbackgrounds[page][background=mill]
\page[empty]
\popbackground}
\stopsetups
\startsetup
\textwidth]}
\doifoddpageelse
{}
{\pushbackground[page]
\setupbackgrounds[page]%[background=color,backgroundcolor=red]
[background=mylayer]
\page[empty]
\popbackground}
\startchapter[title={Prelude}] etc.
This correctly places the Chapter1.jpg on the facing page to Chapter 1.
My problem comes
}]
\setupbackgrounds[page][background=page]
\starttext
\dorecurse{10}{\input knuth \page}
\stoptext
%%% EOF
In the resulting PDF the Field[Text][Text] path is not positioned (/computed?)
correctly, while the manually positioned Area[Text][Text] path is as expected.
So, it seems
Youssef Cherem via ntg-context schrieb am 24.01.2022 um 02:28:
I've managed to put double-sided page numbers -- but numbers are
restarting after two, though. What's going on?
Add
\setupbackgrounds[state=repeat]
to your setups to ensure the text background is refreshed.
Wolfgang
On 1/24/22 2:28 AM, Youssef Cherem via ntg-context wrote:
> I've managed to put double-sided page numbers -- but numbers are
> restarting after two, though. What's going on?
Hi Yousesef,
I think this is related to how \setupbackgrounds is invoked.
The following command
[pagenumber]
[
width=\paperwidth,
height=\paperheight,
% preset=rightbottom,
voffset=.3\paperheight
]
%\setupbackgrounds[page][background=pagenumber, setups=setpagenumber]
\setupbackgrounds[text] [rightmargin] [background=pagenumber,
setups=setpagenumber]
%isso aqui é o que funciona para
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
not working for me.
Here is my MWE:
\define[]\logofile{an_image_file.png} % Here defining the variable with the
filename to use.
\definelayer[stillimage]
\setlayer[stillimage]{\externalfigure[\logofile]} % Here trying to use the
\logofile macro.
\setupbackgrounds[page][background
y MWE:
>
>
>
> \define[]\logofile{an_image_file.png} % Here defining the variable with the
> filename to use.
>
> \definelayer[stillimage]
> \setlayer[stillimage]{\externalfigure[\logofile]} % Here trying to use the
> \logofile macro.
> \setupbackground
[]\logofile{an_image_file.png} % Here defining the variable with the
filename to use.
\definelayer[stillimage]
\setlayer[stillimage]{\externalfigure[\logofile]} % Here trying to use the
\logofile macro.
\setupbackgrounds[page][background=stillimage]
\starttext
\input knuth
\stoptext
What's
set
[exam]
[n=2,
background=verticalrule]
\setuplayout[width=19cm, height=26cm, header=1cm, footer=.5cm,backspace=1cm]
\setupheader[before=\vfil, after=\vfil]
\setupbackgrounds[header][text][frame=off, background=headerBox,
align=lohi]%topframe=
\setupbackgrounds[footer][text][frame=
set
[exam]
[n=2,
background=verticalrule]
\setuplayout[width=19cm, height=26cm, header=1cm, footer=.5cm,backspace=1cm]
\setupheader[before=\vfil, after=\vfil]
\setupbackgrounds[header][text][frame=off, background=headerBox,
align=lohi]%topframe=
\setupbackgrounds[footer][text][frame=
fineblock[Complement]
\setupblock[Complement][
before={\page[yes]\setuppagenumber[state=stop]\setupheadertexts[]\setupbackgrounds[page][background=color,backgroundcolor=red]},
after={\page[yes]\setuppagenumber[state=start]}]
\starttext
% Let's process the summar
\defineblock[ComplementTwo]
\defineblock[ComplementThree]
\setupblock[ComplementTwo,ComplementThree][
before={\page[yes]\setuppagenumber[state=stop]\setupheadertexts[]\setupbackgrounds[page][background=color,backgroundcolor=red]},
after={\page[yes]\setuppagenumber[state=start]}]
\startte
ber[state=stop]\setupheadertexts[]\setupbackgrounds[page][background=color,backgroundcolor=red]},
after={\page[yes]\setuppagenumber[state=start]}]
\doifallmodes{Professor} {
\keepblocks[Complement]
}
\starttext
page 1
\beginComplement
A complement
; > \setlayer[mwe] { \switchtobodyfont[chancery,8pt] \hskip 5mm Chancery
> > Font Here }
> > \setupbackgrounds[page][background=mwe]
> >
> > \starttext
> > Normal font text goes here. \blank[4*big]
> > { \switchtobodyfo
] { \switchtobodyfont[chancery,8pt] \hskip 5mm Chancery Font
Here }
\setupbackgrounds[page][background=mwe]
\starttext
Normal font text goes here. \blank[4*big]
{ \switchtobodyfont[chancery] This should be Chancery here to. But isn't. }
\blank[2*big]Note
Font
Here }
\setupbackgrounds[page][background=mwe]
\starttext
Normal font text goes here. \blank[4*big]
{ \switchtobodyfont[chancery] This should be Chancery here to. But isn't. }
\blank[2*big]Note that if I comment out the \type{setlayer[mwe
,
this is what you want:
\startsectionblockenvironment[bodypart]
\setupbackgrounds
[rightpage]
[background=butterfly]
\stopsectionblockenvironment
\startbodymatter
\setupbackgrounds
[rightpage]
[background=butterfly]
\startchapter[title={Chapter title
ully; the layer repeats for every page
> at the moment. I must have omitted something).
Hi Julian,
this is what you want:
\startsectionblockenvironment[bodypart]
\setupbackgrounds
[rightpage]
[background=butterfly]
\stopsectionblockenvironment
> \startbodymatter
something).
\startbodymatter
\setupbackgrounds
[rightpage]
[background=butterfly]
\startchapter[title={Chapter title}]
\definelayer[butterfly]
[x=0mm, y=0mm,repeat=yes,width=\paperwidth, height=\paperheight]
\setlayer[butterfly]
[hoffset=.99\textwidth, voffset=1cm]
{\externalfigure
Latest LMTX. I noticed the following \flushlayer behaviour and wondered if it
was a bug or something I've misunderstood?
\showframe
\setuppapersize [A5][A5]
\setuplayout[marking=on, location=middle]
\definelayer[coverlayer]
[width=\paperwidth, height=\paperheight]
\setupbackgrounds [paper
,
height=\paperheight,
location={left,top},
x=120mm,y=220mm,
doublesided=yes]
\startsetups layer
\setlayer[pagenumber][even]{\pagenumber}
\stopsetups
\setupbackgrounds[page][setups=layer,background={pagenumber}]
\starttext
~\page~\page~\page
\stoptext
And it works, but only for the left
,
doublesided=yes]
\startsetups layer
\setlayer[pagenumber][even]{\pagenumber}
\stopsetups
\setupbackgrounds[page][setups=layer,background={pagenumber}]
\starttext
~\page~\page~\page
\stoptext
And it works, but only for the left (even) page. On the right page I
want to place the pagenumber
> > \startuniqueMPgraphic{concept}
> > draw fullcircle scaled 1cm shifted (10cm,10cm);
> > \stopuniqueMPgraphic
> > \defineoverlay[concept][\uniqueMPgraphic{concept}]
> > \setupbackgrounds[page][background=concept]
> > \starttext
> > .
> > \stoptext
> >
ay[concept][\uniqueMPgraphic{concept}]
\setupbackgrounds[page][background=concept]
\starttext
.
\stoptext
How should the metapost background figure be positioned correctly?
\startuniqueMPgraphic{concept}
StartPage;
draw fullcircle scaled 1cm shifted (10cm,10cm);
draw Page withpen
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
]
\setupbackgrounds[text][background={bg},state=start]
\starttext
\starttransparent[light]%
\externalfigure[hacker]%
\stoptransparent
\setlayer[bg][
hoffset=5mm,
voffset=5mm,
]{
\starttransparent[light]%
\externalfigure[hacker]%
\stoptransparent
}
\stoptext
'''
The layer stuff is not "minimal&qu
(Latest LMTX, yesterday’s luametatex binary)
The MWE shows no transparency with LMTX, it works with MkIV:
'''
\setupexternalfigures[location=default]
\definetransparency[light][a=1,t=.05]
\definelayer[bg][x=0mm,y=0mm]
\setupbackgrounds[text][background={bg},state=start]
\starttext
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
Fabrice Couvreur schrieb am 27.08.2021 um 10:04:
Hi Wolfgang,
This may not be nicest but seems to work
Fabrice
%%
\definelayout
[1]
[header=10mm]
\setuplayout
[header=0pt,
height=middle]
\setuppagenumbering
[alternative=doublesided,location=]
\setupbackgrounds
Hi Wolfgang,
thanks a lot for your help.
Am Thu, Aug 26, 2021 at 05:52:11PM +0200 schrieb Wolfgang Schuster:
> To keep the layer setting you have to move \showframe above your own
> \setupbackgrounds command because the reset of the background-key happens
> then before you pass your
Hi,
Using this (but it's not exactly what I want) it works
test-1.tex %%
\setuppagenumbering
[alternative=doublesided,location=]
\definelayout
[1]
[header=10mm]
\setuplayout
[header=0pt,
height=middle]
\setupbackgrounds
[header]
[text]
[frame=off,bottomframe
]}
\setupbackgrounds[header][background=Cow]
\showframe
\starttext
\input knuth
\stoptext
The \showframe command is just a wrapper for \setupbackgrounds to enable
the frames on certain parts of the page.
One of the settings which are passed to \setupbacgrounds when you use
\showframe is "backg
Hi,
this sample shows that the image in a layer in header disappears if showframe is
set.
\setupexternalfigures[location=default]
\definelayer[Cow]
[x=0, y=0]
\setlayer[Cow]
[x=10em, y=0mm]
{\externalfigure[cow][height=\lineheight]}
\setupbackgrounds[header][background=Cow]
\showframe
]
\definelayer
[MyLogo]
[doublesided=yes,
width=\paperwidth,
height=\paperheight,
repeat=yes]
\setupbackgrounds [page] [background=MyLogo]
\setuppagenumbering [alternative=doublesided]
\setlayer
[MyLogo]
[left]
[preset=leftbottom,
x=\dimexpr\cutspace-\rightmargindistance
=\paperwidth,
height=\paperheight,
repeat=yes]
\setupbackgrounds[page][background=MyLogo]
\setlayer
[MyLogo]
[hoffset=\dimexpr\textwidth+\backspace+\rightmargindistance\relax,
voffset=\dimexpr\topspace+\textheight+\footerheight\relax]
{\externalfigure[dum][width=\rightmarginwidth
,
location=middle]
\setupbodyfont
[newcomputermodern-book,11pt]
\definefont
[TextStyle]
[SansBold*default sa 1.2]
\defineframed
[headerframed]
[frame=off,
height=fit,
width=fit,
]
\setupbackgrounds [header] [text]
[frame=off,bottomframe=on,width=\widthpaper,
framecolor
(using framed or so) and then taking those dimensions
Many thanks for your reply, Hans.
I’m afraid I don’t know how to make the commands work:
\setupexternalfigures[location=default]
\definelayer[hi]
[x=.5\dimexpr\framedwidth\relax, y=.5\dimexpr\framedheight\relax]
\setupbackgrounds
d then taking those dimensions
Many thanks for your reply, Hans.
I’m afraid I don’t know how to make the commands work:
\setupexternalfigures[location=default]
\definelayer[hi]
[x=.5\dimexpr\framedwidth\relax, y=.5\dimexpr\framedheight\relax]
\setupbackgrounds[page][background=
On 8/17/2021 5:56 AM, Pablo Rodriguez via ntg-context wrote:
Dear list,
I have the following sample:
\definelayer[hi][x=.5\paperwidth, y=.5\paperheight]
\setupbackgrounds[page][background=hi]
\starttext
\setlayer[hi]{hi}
\startTEXpage[offset=10em]
\null
\stopTEXpage
Dear list,
I have the following sample:
\definelayer[hi][x=.5\paperwidth, y=.5\paperheight]
\setupbackgrounds[page][background=hi]
\starttext
\setlayer[hi]{hi}
\startTEXpage[offset=10em]
\null
\stopTEXpage
\stoptext
I don’t get the layer in the TEXpage.
How could I get
, may cause surprising interactions when
around normal typsetting content. Putting the whatsit insertion in a
page background is a way to keep it away. "back-swf.mkiv" suggests:
\setupbackgrounds[page][background=resources]
\setlayer[resources]{\placerenderingwindow[foo][foo]}
longer supports this.
> [...]
> But, you can use renderings instead:
>
> \useexternalrendering[myaudiorendering]
> [audio/mp3][audio.mp3][embed=yes]
>
> \definerenderingwindow[audiowindow]
> [width=0sp, height=0sp]
>
> \definelayer[resources]
>
th=0sp, height=0sp]
\definelayer[resources]
\setupbackgrounds[page][background=resources]
\setlayer[resources]{\placerenderingwindow[audiowindow][myaudiorendering]}
\goto{PLAY SOUND}[StartRendering{myaudiorendering}]
This is basically the example from "/back-swf.mkiv". W
m,
>leftmargindistance=4mm,
>leftmargin=57mm,
> ]
>
> \definelayer[leftmargin][
> x=0mm,y=3mm,
>width=\leftmarginwidth,
>height=\textheight
> ]
>
> \setupbackgrounds[text][leftmargin][background=leftmargin,state=start]
>
> \starttext
>
> \
itsquare xyscaled (1mm,1mm) withcolor blue ;
> > \stopreusableMPgraphic
> >
> > \definelayer[foldingmarkslayer][width=\paperwidth,height=\paperheight]
> > \setlayer[foldingmarkslayer][y=101mm,x=11mm]{\reuseMPgraphic{fold}}
> >
> > \setupbackgrounds [page][b
;
\stopreusableMPgraphic
\definelayer[foldingmarkslayer][width=\paperwidth,height=\paperheight]
\setlayer[foldingmarkslayer][y=101mm,x=11mm]{\reuseMPgraphic{fold}}
\setupbackgrounds [page][background=foldingmarkslayer]
\starttext
Test
\stoptext
The error I get:
tex error on line 6 in file ./test.tex: Use
=\paperwidth,height=\paperheight]
\setlayer[foldingmarkslayer][y=101mm,x=11mm]{\reuseMPgraphic{fold}}
\setupbackgrounds [page][background=foldingmarkslayer]
\starttext
Test
\stoptext
The error I get:
tex error on line 6 in file ./test.tex: Use of \meta_usempgraphic_nop doesn't
match its
,
]
\definelayer[leftmargin][
x=0mm,y=3mm,
width=\leftmarginwidth,
height=\textheight
]
\setupbackgrounds[text][leftmargin][background=leftmargin,state=start]
\starttext
\setlayerframed[leftmargin][
frame=off,
offset=overlay,
width=\leftmarginwidth,
align={flushleft,verytolerant
[directory=images_bearbeitet_png]
\definelayer
[backgroundimage]
[width=\paperwidth,
height=\paperheight,
state=repeat,
doublesided=yes]
\setupbackgrounds
[page]
[background=backgroundimage]
\setlayer
[backgroundimage]
[right]
[x=\backspace,
y=\dimexpr\topspace+\headerheight+\head
Thanks, it was particularly the braces that I had overlooked.
Julian
On 28/4/21 2:58 pm, Wolfgang Schuster wrote:
Move both \definelayer and \setupbackgrounds to the start of the
document and put braces ({...}) around the list entry.
Wolfgang
jbf mailto:roma83...@gmail.com>> schrieb
Move both \definelayer and \setupbackgrounds to the start of the document
and put braces ({...}) around the list entry.
Wolfgang
jbf schrieb am Mi., 28. Apr. 2021, 06:53:
> It is not clear to me. I have two \setupbackgrounds as you can see. If I
> put setupbackgrounds[page][back
It is not clear to me. I have two \setupbackgrounds as you can see. If I
put setupbackgrounds[page][background=blessings,tree] for the first one
I get the tree but not the blessing graphic. If I also have the same for
the second one (\setupbackgrounds[page][background=blessings,tree]) I
get
externalfigure[bless.eps][width=3cm]} % the actual contents of
> the layer
> \setupbackgrounds[page][background=blessings]
>
> \definelayer[tree] % name of the layer
> [x=0mm, y=0mm, % from upper left corner of paper
> width=\paperwidth, height=\paperheight] % let the
the layer cover
the full paper
\setlayer[blessings] % name of the layer
[hoffset=.09\textwidth, voffset=1.7cm] % placement (from upper
left corner of the layer)
{\externalfigure[bless.eps][width=3cm]} % the actual contents of
the layer
\setupbackgrounds[page][background=blessings
\defineoverlay[frames][\positionoverlay{frames}]
> >
> > \setupbackgrounds[text][background=frames]
> >
> >
> > \startMPpositiongraphic{frame}
> >
> > if unknown context_apos : input mp-apos.mpiv ; fi ;
> >
> > \MPgetposboxes{\MPvar{self}}{\MPa
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
1 - 100 of 1175 matches
Mail list logo