From Wiki
< Command
Revision as of 03:24, 14 March 2012 by Jannis (talk | contribs) (moved Reference/en/setuplayout to Command/setuplayout: Text replace - "Reference/en/" to "Command/")
Jump to navigation Jump to search



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 more see below
bottomspace dimension
cutspace dimension
textdistance dimension
textwidth number
textmargin dimension
clipoffset dimension
page name
paper name


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)




What is needed is a picture of a page with each of these layout parameters indicated. (see Layout)

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.

Grid Setups

At least in MkIV "grid" takes some presets as parameter:

% none             don't enlarge
% halfline         enlarge by halfline/halfline
% line             enlarge by line/line
% strut            enlarge by ht/dp (default)
% first            align to top line
% last             align to bottom line
% mindepth         round depth down
% maxdepth         round depth up
% minheight        round height down
% maxheight        round height up
% local            use local interline space
% shift:-3tp       vertical shift within box

\definegridsnapping[normal]   [maxheight,maxdepth,strut]
\definegridsnapping[standard] [maxheight,maxdepth,strut]
\definegridsnapping[yes]      [maxheight,maxdepth,strut]

\definegridsnapping[strict]   [\v!maxdepth:0.8,maxheight:0.8,strut]
\definegridsnapping[tolerant] [\v!maxdepth:1.2,maxheight:1.2,strut]

\definegridsnapping[top]      [minheight,maxdepth,strut]
\definegridsnapping[bottom]   [maxheight,mindepth,strut]
\definegridsnapping[both]     [minheight,mindepth,strut]

\definegridsnapping[broad]    [maxheight,maxdepth,strut,0.8]
\definegridsnapping[fit]      [maxheight,maxdepth,strut,1.2]

\definegridsnapping[first]    [first]
\definegridsnapping[last]     [last]
\definegridsnapping[high]     [minheight,maxdepth,none]
\definegridsnapping[low]      [maxheight,mindepth,none]
\definegridsnapping[line]     [line]
\definegridsnapping[strut]    [strut]

\definegridsnapping[max]      [maxdepth,maxheight,strut]
\definegridsnapping[min]      [mindepth,minheight,strut]


%% 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:


  topspace=\dimexpr(\topheight + \topdistance),

\dorecurse{7}{\input tufte}

See also