Difference between revisions of "Command/setuplayout"

From Wiki
Jump to navigation Jump to search
(Create reference page)
 
(Cleanup)
Line 1: Line 1:
<!-- please remove this and the following line if you have checked this page -->
 
{{Reference_Cleanup}}
 
 
{{Reference
 
{{Reference
 
|name=setuplayout
 
|name=setuplayout
Line 219: Line 217:
 
</pre>
 
</pre>
 
== comment ==
 
== comment ==
<pre>
 
See [[wiki:Layout]]
 
  
--------
 
 
What is needed is a picture of a page with each of these layout parameters indicated.  
 
What is needed is a picture of a page with each of these layout parameters indicated.  
</pre>
 
 
You can use the \showframe macro to see the results of your layout.  Just put the command before the \starttext and lines will be drawn on your document showing the different areas.
 
  
  
 +
You can use the [[cmd:showframe|\showframe]] macro to see the results of your layout.  Just put the command before the \starttext and lines will be drawn on your document showing the different areas.
  
  
 
== Example ==
 
== Example ==
  
<code source="tex">
+
<texcode>
 
%% This is an example for showing the effect of the vertical parameters
 
%% This is an example for showing the effect of the vertical parameters
 
%% top, topdistance, bottom, bottomdistance and topspace.
 
%% top, topdistance, bottom, bottomdistance and topspace.
Line 256: Line 249:
 
\stoptext
 
\stoptext
  
</code>
+
</texcode>
  
  
 
== See also ==
 
== See also ==
 +
[[Layout]]
 +
 
<!-- something like [[cmd:goto|\goto]] -->
 
<!-- something like [[cmd:goto|\goto]] -->
  
 
[[Category:Reference/en|setuplayout]]
 
[[Category:Reference/en|setuplayout]]

Revision as of 13:37, 11 April 2010

\setuplayout

Syntax

\setuplayout[...,...=...,...]
width dimension fit middle
height dimension fit middle
backspace dimension
topspace dimension
margin dimension
leftmargin dimension
rightmargin dimension
header dimension
footer dimension
top dimension
bottom dimension
leftedge dimension
rightedge dimension
headerdistance dimension
footerdistance dimension
topdistance dimension
bottomdistance dimension
leftmargindistance dimension
rightmargindistance dimension
leftedgedistance dimension
rightedgedistance dimension
horoffset dimension
veroffset dimension
style normal bold slanted boldslanted type cap small... command
color name
marking on off color screen text
location left middle right bottom top singlesided doublesided
scale dimension
nx number
ny number
dx dimension
dy dimension
lines number
columns number
columndistance dimension
grid yes no
bottomspace dimension
cutspace dimension
textdistance dimension
textwidth number
textmargin dimension
clipoffset dimension
page name
paper name


Description

Horizontal: (if singleside then outside is at right and inside is at left)
===========
width => width of text area
  middle: automatic calculation consider A) params
  fit: automatic calculation consider A)+B) params
  dimension: cutspace should be 0 and is calculated according to backspace

A) params: (\paperwidth=\backspace+\makeupwidth+\cutspace)
backspace => width of inner margin
cutspace => width of outer margin (if 0 then = backspace!)

B) params:
leftmargin/rightmargin => width of leftmargin/rightmargin area
margin => width of outer margin
leftedge/rightedge => width of leftedge/rightedge area
*distance (like leftmargindistance) => space separates * area from the inner

horoffset => shift material towards outside (not tought width calculation)

Vertical:
=========

Others:
=======

comment

What is needed is a picture of a page with each of these layout parameters indicated.


You can use the \showframe macro to see the results of your layout. Just put the command before the \starttext and lines will be drawn on your document showing the different areas.


Example

%% This is an example for showing the effect of the vertical parameters
%% top, topdistance, bottom, bottomdistance and topspace.
%% Just play around with these parameters.

%% Show the top and the bottom with blue color:
\setupcolors[state=start]
\setupbackgrounds[top,bottom][background=color,backgroundcolor=blue]

\def\MyLength{50pt}

\setuplayout[
  header=0pt,footer=0pt,headerdistance=0pt,footerdistance=0pt,
  top=\MyLength,topdistance=\MyLength,
  bottom=\MyLength,bottomdistance=\MyLength,
  topspace=\dimexpr(\topheight + \topdistance),
  height=fit]

\starttext
\dorecurse{7}{\input tufte}
\showsetups
\stoptext


See also

Layout