Difference between revisions of "Command/setuplayout"

From Wiki
Jump to navigation Jump to search
m (Text replace - "Reference/en|" to "Commands|")
(remove manual syntax table, add pseudo columns)
 
(16 intermediate revisions by 6 users not shown)
Line 4: Line 4:
 
}}
 
}}
  
== [[Help:Reference|Syntax]] ==
+
__TOC__
<table cellspacing="4" cellpadding="2" class="cmd">
 
  <tr>
 
    <td colspan="2" class="cmd">\setuplayout<span class="first" >[...,...=...,...]</span></td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:width|width]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] [[Reference/en/value:fit|fit]] [[Reference/en/value:middle|middle]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:height|height]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] [[Reference/en/value:fit|fit]] [[Reference/en/value:middle|middle]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:backspace|backspace]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:topspace|topspace]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:margin|margin]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:leftmargin|leftmargin]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:rightmargin|rightmargin]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:header|header]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:footer|footer]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:top|top]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:bottom|bottom]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:leftedge|leftedge]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:rightedge|rightedge]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:headerdistance|headerdistance]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:footerdistance|footerdistance]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:topdistance|topdistance]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:bottomdistance|bottomdistance]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:leftmargindistance|leftmargindistance]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:rightmargindistance|rightmargindistance]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:leftedgedistance|leftedgedistance]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:rightedgedistance|rightedgedistance]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:horoffset|horoffset]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:veroffset|veroffset]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:style|style]]</td>
 
    <td>[[Reference/en/value:normal|normal]] [[Reference/en/value:bold|bold]] [[Reference/en/value:slanted|slanted]] [[Reference/en/value:boldslanted|boldslanted]] [[Reference/en/value:type|type]] [[Reference/en/value:cap|cap]] [[Reference/en/value:small...|small...]] [[Reference/en/value:command|command]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:color|color]]</td>
 
    <td>[[Reference/en/value:name|name]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:marking|marking]]</td>
 
    <td>[[Reference/en/value:on|on]] [[Reference/en/value:off|off]] [[Reference/en/value:color|color]] [[Reference/en/value:screen|screen]] [[Reference/en/value:text|text]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:location|location]]</td>
 
    <td>[[Reference/en/value:left|left]] [[Reference/en/value:middle|middle]] [[Reference/en/value:right|right]] [[Reference/en/value:bottom|bottom]] [[Reference/en/value:top|top]] [[Reference/en/value:singlesided|singlesided]] [[Reference/en/value:doublesided|doublesided]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:scale|scale]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:nx|nx]]</td>
 
    <td>[[Reference/en/value:number|number]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:ny|ny]]</td>
 
    <td>[[Reference/en/value:number|number]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:dx|dx]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:dy|dy]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:lines|lines]]</td>
 
    <td>[[Reference/en/value:number|number]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:columns|columns]]</td>
 
    <td>[[Reference/en/value:number|number]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:columndistance|columndistance]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:grid|grid]]</td>
 
    <td>[[Reference/en/value:yes|yes]] [[Reference/en/value:no|no]] more see below</td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:bottomspace|bottomspace]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:cutspace|cutspace]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:textdistance|textdistance]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:textwidth|textwidth]]</td>
 
    <td>[[Reference/en/value:number|number]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:textmargin|textmargin]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:clipoffset|clipoffset]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:page|page]]</td>
 
    <td>[[Reference/en/value:name|name]] </td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[[Reference/en/keyword:paper|paper]]</td>
 
    <td>[[Reference/en/value:name|name]] </td>
 
  </tr>
 
</table>
 
  
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>setuplayout</syntax>
  
 
== Description ==  
 
== Description ==  
<pre>
 
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)
+
=== Horizontal ===
backspace => width of inner margin
 
cutspace => width of outer margin (if 0 then = backspace!)
 
  
B) params:
+
If the document is singlesided, then the 'outside' is the right side and the 'inside' is the left side.
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)
+
The <code>width</code> parameter sets <code>\makeupwidth</code>, the width of the text area.
  
Vertical:
+
* <code>width=middle</code> solves the following equation to set the makeupwidth:
=========
+
  paperwidth = \backspace + \makeupwidth + \cutspace
 +
** <code>backspace</code> is the distance from the inside edge of the paper to the edge of the text area.
 +
**  <code>cutspace</code> is the width from the outside edge of the text area to the edge of the paper. If cutspace is set to 0, it is taken to be equal to the backspace.
  
Others:
+
* if <code>width=fit</code>, then the calculation is like for <code>width=middle</code>, but with the following additions:
=======
+
** <code>leftmargin/rightmargin</code> => width of leftmargin/rightmargin area
 +
** <code>margin</code> => width of outer margin
 +
** <code>leftedge/rightedge</code> => width of leftedge/rightedge area
 +
** <code>*distance</code> (like leftmargindistance) => space separates * area from the inner
 +
** <code>horoffset</code> is applied after the various width calculations to shift everything bodily to the outside.
  
</pre>
+
== Comment ==
== comment ==
 
  
What is needed is a picture of a page with each of these layout parameters indicated. (see [[Layout]])
+
A picture of a page with each of these layout parameters indicated is shown in [[Layout]].
  
 +
You can use the {{cmd|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.
+
== Grid Setups ==
  
=== Grid Setups ===
+
In MkIV, at least, a number of presets for the <code>grid</code> parameter were defined using {{cmd|definegridsnapping}}; they can be invoked by e.g. <code>\setuplayout[grid=normal]</code>. The presets are all combinations of the following options:
  
At least in MkIV "grid" takes some presets as parameter:
+
{| class=wikitable
 +
|-
 +
| <code>none</code>        || don't enlarge
 +
|-
 +
| <code>halfline</code>    || enlarge by halfline/halfline
 +
|-
 +
| <code>line</code>        || enlarge by line/line
 +
|-
 +
| <code>strut</code>        || enlarge by ht/dp (default)
 +
|-
 +
| <code>first</code>        || align to top line
 +
|-
 +
| <code>last</code>        || align to bottom line
 +
|-
 +
| <code>mindepth</code>    || round depth down
 +
|-
 +
| <code>maxdepth</code>    || round depth up
 +
|-
 +
| <code>minheight</code>    || round height down
 +
|-
 +
| <code>maxheight</code>    || round height up
 +
|-
 +
| <code>local</code>        || use local interline space
 +
|-
 +
| <code>shift:-3tp</code>  || vertical shift within box
 +
|-
 +
|}
  
<pre>
+
These are the presets and their definitions.
% 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]
+
{| class=wikitable
\definegridsnapping[standard] [maxheight,maxdepth,strut]
+
|-
\definegridsnapping[yes]      [maxheight,maxdepth,strut]
+
| \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]
 +
|-
 +
|}
  
\definegridsnapping[strict]  [\v!maxdepth:0.8,maxheight:0.8,strut]
+
== Pseudo columns ==
\definegridsnapping[tolerant] [\v!maxdepth:1.2,maxheight:1.2,strut]
 
  
\definegridsnapping[top]      [minheight,maxdepth,strut]
+
With the <code>columns</code> and <code>columndistance</code> parameters you can set up a design grid that is usually not visible and not related to real columns, but you can use it for placements on [[Layers]]. See the [[manual:details.pdf|Details]] manual.
\definegridsnapping[bottom]   [maxheight,mindepth,strut]
 
\definegridsnapping[both]     [minheight,mindepth,strut]
 
  
\definegridsnapping[broad]    [maxheight,maxdepth,strut,0.8]
+
== Example ==
\definegridsnapping[fit]      [maxheight,maxdepth,strut,1.2]
 
  
\definegridsnapping[first]    [first]
+
<context source=yes>
\definegridsnapping[last]    [last]
+
\setuppapersize[A10]
\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]
 
 
</pre>
 
 
 
== Example ==
 
 
<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.
 
%% Just play around with these parameters.
 
%% Just play around with these parameters.
 +
 +
\showframe
  
 
%% Show the top and the bottom with blue color:
 
%% Show the top and the bottom with blue color:
\setupcolors[state=start]
+
\setupbackgrounds[header, footer][background=color, backgroundcolor=blue]
\setupbackgrounds[top,bottom][background=color,backgroundcolor=blue]
 
  
\def\MyLength{50pt}
+
\def\MyLength{10pt}
  
 
\setuplayout[
 
\setuplayout[
  header=0pt,footer=0pt,headerdistance=0pt,footerdistance=0pt,
+
   top=\MyLength,  
   top=\MyLength,topdistance=\MyLength,
+
  topdistance=\MyLength,
   bottom=\MyLength,bottomdistance=\MyLength,
+
   bottom=\MyLength,  
 +
  bottomdistance=\MyLength,
 
   topspace=\dimexpr(\topheight + \topdistance),
 
   topspace=\dimexpr(\topheight + \topdistance),
 
   height=fit]
 
   height=fit]
  
 
\starttext
 
\starttext
\dorecurse{7}{\input tufte}
+
    \input thuan
\showsetups
 
 
\stoptext
 
\stoptext
 
+
</context>
</texcode>
 
 
 
  
 
== See also ==
 
== See also ==
[[Layout]]
+
* [[Layout]]
 +
* {{cmd|adaptlayout}} to locally adapt the page layout
 +
* {{cmd|setuppapersize}} to set the paper size
 +
* [[PaperSetup#Predefined_Paper_Sizes|Paper setup section]] for the predefined paper sizes and [[Paper sizes]] for theirs actuals dimensions in mm.
  
<!-- something like [[cmd:goto|\goto]] -->
+
== Help from ConTeXt-Mailinglist/Forum ==
 +
All issues with:
 +
{{Forum|{{SUBPAGENAME}}}}
  
[[Category:Commands|setuplayout]]
+
[[Category:Command/Layout|setuplayout]]
 +
[[Category:Layout]]

Latest revision as of 11:57, 30 July 2023

\setuplayout

Syntax (autogenerated)

\setuplayout[...][...=...,...]
[...]name
statestart stop normal repeat
margindimension
edgedimension
margindistancedimension
edgedistancedimension
leftedgedistancedimension
rightedgedistancedimension
leftmargindistancedimension
rightmargindistancedimension
topdistancedimension
headerdistancedimension
footerdistancedimension
bottomdistancedimension
presetname
leftmargindimension
rightmargindimension
leftedgedimension
rightedgedimension
headerdimension
footerdimension
topdimension
bottomdimension
backspacedimension
topspacedimension
setupsname
cutspacedimension
widthdimension middle fit
bottomspacedimension
linesnumber
heightdimension middle fit
horoffsetdimension
veroffsetdimension
columnsnumber
columndistancedimension
methoddefault normal name
locationleft middle right top bottom singlesided doublesided
textwidthdimension
textheightdimension
nxnumber
nynumber
dxdimension
dydimension
scalenumber
sxnumber
synumber
markingon off page empty color one two four
gridyes no off
textdistancedimension
alternativedefault normal makeup name
clipoffsetdimension
cropoffsetdimension auto
trimoffsetdimension
bleedoffsetdimension
artoffsetdimension
directionnormal reverse


\setuplayout[...]
[...]reset name


Description

Horizontal

If the document is singlesided, then the 'outside' is the right side and the 'inside' is the left side.

The width parameter sets \makeupwidth, the width of the text area.

  • width=middle solves the following equation to set the makeupwidth:
 paperwidth = \backspace + \makeupwidth + \cutspace
    • backspace is the distance from the inside edge of the paper to the edge of the text area.
    • cutspace is the width from the outside edge of the text area to the edge of the paper. If cutspace is set to 0, it is taken to be equal to the backspace.
  • if width=fit, then the calculation is like for width=middle, but with the following additions:
    • 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 is applied after the various width calculations to shift everything bodily to the outside.

Comment

A picture of a page with each of these layout parameters indicated is shown in 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

In MkIV, at least, a number of presets for the grid parameter were defined using \definegridsnapping; they can be invoked by e.g. \setuplayout[grid=normal]. The presets are all combinations of the following options:

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

These are the presets and their definitions.

\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]

Pseudo columns

With the columns and columndistance parameters you can set up a design grid that is usually not visible and not related to real columns, but you can use it for placements on Layers. See the Details manual.

Example

\setuppapersize[A10]

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

\showframe

%% Show the top and the bottom with blue color:
\setupbackgrounds[header, footer][background=color, backgroundcolor=blue]

\def\MyLength{10pt}

\setuplayout[
  top=\MyLength, 
  topdistance=\MyLength,
  bottom=\MyLength, 
  bottomdistance=\MyLength,
  topspace=\dimexpr(\topheight + \topdistance),
  height=fit]

\starttext
    \input thuan
\stoptext

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: