* \setuplayout --- what do parameters mean?
@ 2004-11-04 2:43 David Arnold
2004-11-04 10:59 ` jimarin
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: David Arnold @ 2004-11-04 2:43 UTC (permalink / raw)
All,
When I see something like this:
\setuplayout
[topspace=10pt,
header=40pt,
headerdistance=20pt,
height=middle,
footerdistance=20pt,
footer=0pt,
bottomdistance=10pt,
bottom=20pt,
bottomspace=40pt,
backspace=30pt,
width=middle]
I have a hard time working out what it means. I know I can do \showframe,
but that doesn't indicate everything I need to see. Does anyone have a
macro that shows ALL of these parameters in a visual way, similar to that
on page 182 of the Latex User Guide, 2nd ed., Lamport?
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: \setuplayout --- what do parameters mean?
2004-11-04 2:43 \setuplayout --- what do parameters mean? David Arnold
@ 2004-11-04 10:59 ` jimarin
2004-11-04 18:01 ` Henning Hraban Ramm
2004-11-04 22:07 ` Patrick Gundlach
2 siblings, 0 replies; 4+ messages in thread
From: jimarin @ 2004-11-04 10:59 UTC (permalink / raw)
Hi David,
I use the following code...which I borrowed and adapted from someone else (I
think it was from Patrick Gundlach's http://levana.de/context/) to explore
graphically the meanings of the parameters of \setuplayout.
I used it when developing my own style for presentations...I am aware it may
not be perfect but I hope it does help you
Greetings
Jose Ignacio Marin
The code
(the unknown commands like \Location \Style etc... are for you to substitute
with values you want)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setuplayout
[
location=\Location,
style=\Style,
marking=\Marking,
scale=\Scale,
nx=\Nx,
ny=\Ny,
dx=\Dx,
dy=\Dy,
lines=\Lines,
grid=\Grid,
bottomspace=\BottomSpace,
cutspace=\CutSpace,
horoffset=\HorOffset,
veroffset=\VerOffset,
backspace=\BackSpace,
leftmargin=\LeftMargin,
leftmargindistance=\LeftMarginDistance,
width=\Width,
rightmargin=\LeftMargin,
rightmargindistance=\LeftMarginDistance,
topspace=\TopSpace,
header=\Header,
headerdistance=\HeaderDistance,
height=\Height,
footerdistance=\FooterDistance,
footer=\Footer,
paperwidth=\PaperWidth,
paperheight=\PaperHeight,
leftedge=\LeftEdge,
leftedgedistance=\LeftEdgeDistance,
rightedge=\RightEdge,
rightedgedistance=\RightEdgeDistance,
top=\Top,
topdistance=\TopDistance,
bottom=\Bottom,
bottomdistance=\BottomDistance
]
% PAGE TEST
\startreusableMPgraphic{TestPage}
StartPage;
path p;
fill Page withcolor .95white;
% backspace and topspace
p:= ulcorner Page --
llcorner Page --
llcorner Page shifted (BackSpace,0) --
ulcorner Page shifted (BackSpace,0) -- cycle;
fill p withcolor transparent(1,0.5,green);
p:= ulcorner Page --
urcorner Page --
urcorner Page shifted (0,-TopSpace) --
ulcorner Page shifted (0,-TopSpace) -- cycle;
fill p withcolor transparent(1,0.5,blue);
% a red bottom...
p:= (Hstep[LeftEdge], Vstep[Bottom]) --
(Hstep[RightEdge],Vstep[Bottom]) --
(Hstep[RightEdge],Vstep[Bottom]+Vsize[Bottom]) --
(Hstep[LeftEdge], Vstep[Bottom]+Vsize[Bottom]) -- cycle;
fill p withcolor transparent(1,0.5,red);
% leftmargin and rightmargin
p:= (Hstep[LeftMargin], Vstep[Text])--
(Hstep[LeftMargin] + Hsize[LeftMargin],Vstep[Text]) --
(Hstep[LeftMargin] + Hsize[LeftMargin],Vstep[Text]+Vsize[Text])--
(Hstep[LeftMargin], Vstep[Text]+Vsize[Text])--
cycle;
draw p withpen pencircle scaled .5mm withcolor blue dashed evenly;
p:= (Hstep[RightMargin], Vstep[Text])--
(Hstep[RightMargin] + Hsize[RightMargin],Vstep[Text]) --
(Hstep[RightMargin] + Hsize[RightMargin],Vstep[Text]+Vsize[Text])--
(Hstep[RightMargin], Vstep[Text]+Vsize[Text])--
cycle;
draw p withpen pencircle scaled .5mm withcolor blue dashed evenly;
% leftedge and rightedge
p:= (Hstep[LeftEdge], Vstep[Text])--
(Hstep[LeftEdge] + Hsize[LeftEdge],Vstep[Text]) --
(Hstep[LeftEdge] + Hsize[LeftEdge],Vstep[Text]+Vsize[Text])--
(Hstep[LeftEdge], Vstep[Text]+Vsize[Text])-- cycle;
draw p withpen pencircle scaled .5mm withcolor red dashed evenly;
p:= (Hstep[RightEdge], Vstep[Text])--
(Hstep[RightEdge] + Hsize[RightEdge],Vstep[Text]) --
(Hstep[RightEdge] + Hsize[RightEdge],Vstep[Text]+Vsize[Text])--
(Hstep[RightEdge], Vstep[Text]+Vsize[Text])--
cycle;
draw p withpen pencircle scaled .5mm withcolor red dashed evenly;
% let's draw the header (notice that Vsize[Header] and HeaderHeight
% are the same!)
p:= (BackSpace, Vstep[Header]) --
(BackSpace+MakeupWidth, Vstep[Header]) --
(BackSpace+MakeupWidth, Vstep[Header]+Vsize[Header]) --
(BackSpace, Vstep[Header]+HeaderHeight) -- cycle ;
draw p withpen pencircle scaled .5mm withcolor blue dashed evenly;
% and now for the footer
p:= (BackSpace, Vstep[Footer]) --
(BackSpace+MakeupWidth, Vstep[Footer]) --
(BackSpace+MakeupWidth, Vstep[Footer]+FooterHeight) --
(BackSpace, Vstep[Footer]+FooterHeight) -- cycle ;
draw p withpen pencircle scaled .5mm withcolor blue dashed evenly;
% And now for something completely different :)
drawoptions (withcolor transparent (1,0.9,yellow) withpen pencircle scaled
.3mm);
draw Field [Text][Top];
draw Field [Text][Header];
draw Field [Text][Text];
draw Field [Text][Footer];
% Field[][] = Area[][] shifted Location[][]
draw Area [Text][Bottom] shifted Location [Text][Bottom];
% needed, since LeftMargin+LeftMarginDistance > BackSpace
setbounds currentpicture to boundingbox Page;
\stopreusableMPgraphic
\startbuffer[TestPage]
\reuseMPgraphic{TestPage}
\stopbuffer
\startMPpage
StartPage ;
\stopMPpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-----Mensaje original-----
De: ntg-context-bounces@ntg.nl [mailto:ntg-context-bounces@ntg.nl]En
nombre de David Arnold
Enviado el: jueves, 04 de noviembre de 2004 3:43
Para: ntg-context@ntg.nl
Asunto: [NTG-context] \setuplayout --- what do parameters mean?
All,
When I see something like this:
\setuplayout
[topspace=10pt,
header=40pt,
headerdistance=20pt,
height=middle,
footerdistance=20pt,
footer=0pt,
bottomdistance=10pt,
bottom=20pt,
bottomspace=40pt,
backspace=30pt,
width=middle]
I have a hard time working out what it means. I know I can do \showframe,
but that doesn't indicate everything I need to see. Does anyone have a
macro that shows ALL of these parameters in a visual way, similar to that
on page 182 of the Latex User Guide, 2nd ed., Lamport?
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: \setuplayout --- what do parameters mean?
2004-11-04 2:43 \setuplayout --- what do parameters mean? David Arnold
2004-11-04 10:59 ` jimarin
@ 2004-11-04 18:01 ` Henning Hraban Ramm
2004-11-04 22:07 ` Patrick Gundlach
2 siblings, 0 replies; 4+ messages in thread
From: Henning Hraban Ramm @ 2004-11-04 18:01 UTC (permalink / raw)
Am 04.11.2004 um 03:43 schrieb David Arnold:
> I have a hard time working out what it means. I know I can do
> \showframe,
Try \showlayout
Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: \setuplayout --- what do parameters mean?
2004-11-04 2:43 \setuplayout --- what do parameters mean? David Arnold
2004-11-04 10:59 ` jimarin
2004-11-04 18:01 ` Henning Hraban Ramm
@ 2004-11-04 22:07 ` Patrick Gundlach
2 siblings, 0 replies; 4+ messages in thread
From: Patrick Gundlach @ 2004-11-04 22:07 UTC (permalink / raw)
Hi David,
[...]
> I have a hard time working out what it means. I know I can do \showframe,
> but that doesn't indicate everything I need to see. Does anyone have a
> macro that shows ALL of these parameters in a visual way, similar to that
> on page 182 of the Latex User Guide, 2nd ed., Lamport?
Well, I don't own a Lamport, and probably not many ConTeXt users own
one, so your description could be more verbose.
Nevertheless you might want to have a look at
http://levana.de/context/ there is somewhere a module that should do
something like this. But there is still a bug in there when the
margins are too small.
Patrick
--
ConTeXt wiki: http://contextgarden.net
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-11-04 22:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-04 2:43 \setuplayout --- what do parameters mean? David Arnold
2004-11-04 10:59 ` jimarin
2004-11-04 18:01 ` Henning Hraban Ramm
2004-11-04 22:07 ` Patrick Gundlach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).