Jump to navigation Jump to search
1,070 bytes added ,  11:10, 8 June 2012
Improve quite a few sections. Category Layout
== [[Help:Reference|Syntax]] ==
== 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 margincutspace => width of outer margin (if 0 then Horizontal === backspace!)
B) params:leftmargin/rightmargin => width of leftmargin/rightmargin areamargin => width of outer marginleftedge/rightedge => width of leftedge/rightedge area*distance (like leftmargindistance) => space separates * area from If the innerdocument is singlesided, then the 'outside' is the right side and the 'inside' is the left side.
horoffset =The <code> shift material towards outside (not tought width calculation)</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]])
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.
=== Grid Setups ===
At In MkIV, at least in MkIV ", 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" takes some =normal]</code>. The presets as parameterare all combinations of the following options:
{| class=wikitable|-| <precode>% 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|-|}
\definegridsnapping[normal] [maxheight,maxdepth,strut]\definegridsnapping[standard] [maxheight,maxdepth,strut]\definegridsnapping[yes] [maxheight,maxdepth,strut] \definegridsnapping[strict] [\v!maxdepth:0These are the presets and their definitions.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] </pre>
{| class=wikitable
| \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]
== Example ==
<context source== Example ==yes>\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.
%% Show the top and the bottom with blue color:
header=0pt,footer=0pt,headerdistance=0pt,footerdistance=0pt, top=\MyLength, topdistance=\MyLength, bottom=\MyLength, bottomdistance=\MyLength,
topspace=\dimexpr(\topheight + \topdistance),
\dorecurse{7}{ \input tufte}\showsetupsthuan
== See also ==
* [[Layout]] <!-- something like * {{cmd|gotosetuppapersize}} -->to set the paper size* [[PaperSizes]] for a list of predefined paper sizes
== Help from ConTeXt-Mailinglist/Forum ==
[[Category:CommandsCommand/Layout|setuplayout]]td>[[Command/value:name|name]] /code> || align to top line|-|

Navigation menu