Changes

Jump to navigation Jump to search
1,638 bytes added ,  12:10, 28 May 2020
m
no edit summary
< [[VisualsBasics#Basics_of_ConTeXt_text_formatting|Text formatting]] | [[Layers]] | [[Columns]] | [[Visual Debugging]] | [[Paper sizes]] >  This page focus on '''Basics of page design and layout'''. You can also be interested in:* '''[http://context.aanhet.net/svn/contextman/context-reference/en/co-pagedesign.pdf Layout and page design manual chapter]''' to go into more detail* '''[[Presentations]]''' and associated features, widgets, multimedia* '''[[Layers]]''' (absolute positioning etc.)* '''[[PaperSetup | Paper setup]]'''* '''[[Imposition]]''', making booklets, to arrange pages in proper order for printing.* '''[[Working on Grid]]''' (working with fixed distances)* '''[[Alternating backgrounds and repeating layers]]''' like Watermarks* '''Examples'''** [[A Very Simple Cover Page]]** [[Simple Cover Page]]** [[Example photo page layout]]
For more on [http://context.aanhet.net/svn/contextman/context-reference/en/co-pagedesign.pdf layout and page design] see the [http://context.aanhet.net/svn/contextman/context-reference/en/co-pagedesign.pdf manual chapter].
== Typesetting areas ==
The 25 typesetting areas of a ConTeXt page are divided into 5 columns and 5 rows. From left to right, one encounters {{code|leftedge}}, {{code|leftmargin}}, {{code|text}}, {{code|rightmargin}}, and {{code|rightedge}}. From top to bottom, the areas are called: {{code|top}}, {{code|header}}, {{code|text}}, {{code|footer}}, {{code|bottom}}. E.g. {{cmdcode|leftmargin}} is the margin area to the left of the main text area; {{code|{leftmargin,bottom}|}} is below it, at the same height as the {{code|bottom}} area. In between the two lies the area {{code|{leftmargin,footer}|}}.
The graphic below illustrates thingsthe areas and dimensions. The row and column names are written
along the edges of the page. The arrows correspond to layout dimensions; the
more important a dimension is (i.e. the more of the layout is pushed around
when you change it), the thicker its arrow and the larger its name.
[[Image:layout.pngsvg||||Diagram of \setuplayout[] dimensions]]
== Defining the layout ==
Page size and paper size are set with {{cmd|setuppapersize}}. Many paper sizes are already defined by name; see the list of [[PaperSizes|paper sizes]]. To define a new paper size, use {{cmd|definepapersize}}.
 
{{todo | Merge with [[PaperSetup]] }}
== Example layout ==
width=160mm,
topspace=20mm,
header=0mm,
footer=0mm,
height=250mm]
\definelayout[3][reset]
</texcode>
 
For the page numbers you can use absolute numbers (as above), relative numbers (like +1, -2) or the keywords odd, even, first and last.
 
<texcode>
\setuplayout[ % default layout (right page)
...
]
\definelayout[even][ % different layout on left pages
...
]
</texcode>
 
If you define additional layouts in a doublepage (duplex) setup, remember to think mirrored: leftmargin defines the right margin, backspace is the distance from the spine to the right edge of the text area etc.
 
.
<div style="border: 3px solid red; background: #ffcccc; padding: 0.4em;">
<div style="font-size: 1.3em; fontweight: bold">Warning!</div>
At the moment a layoutchange (setuplayout) inside a page is not proper working in mkiv duplex mode.
For more details and actual state see mailing list and [http://wiki.contextgarden.net/User_talk:Zenlima Bug Layoutchange inside page while duplexmode].
</div>
== Advanced features ==
| {{cmd|rightedgewidth}}
| from right margin to right rim of paper
|-
| horoffset
| ?
| bleed from left of paper
|-
| voroffset
| ?
| bleed from top of paper
|}

Navigation menu