Changes

Jump to navigation Jump to search
1,522 bytes added ,  07:49, 10 June 2013
m
no edit summary
</texcode>
Similarly you can define your own presets.
 
===Understanding "location" and "corner"===
 
The layer is divided into a 2x2 matrix of squares, where 'x' is the center.
This gets you a total of 3x3=9 different corners.
o---o---o
| | |
o---x---o
| | |
o---o---o
 
Now you choose one 'corner' (the reference point) for the placement of the content. The content is placed in relation to this point.
The chosen 'corner' c is our new 'center point' (only for placement) now.
With 'location' you define where (in relation to 'corner') the content is placed.
Again you have nine different corners to choose from.
==== Example: to make this clear ====
Specifications 'corner={top,right},location={bottom,right}' will place content in the area L (outside the original layer).
Think about the 'corner' c as a magnetic grid point, where the content snaps to.
The 'location' defines, from which direction we approach the point c.
* x = layer center point
* c = corner 'top,right'
* d = location 'bottom right'
* L = location (area)
o---o---o
| | |
----o---c---o
| | | L |
----x---o---d
| | |
---------
 
==== Example: placing a logo to the top right corner of the page ====
 
<context source=yes text="Gives:">
\definelayer
[Logo]
[location={left,bottom},
x=\paperwidth,y=0mm,
hoffset=-5mm,voffset=5mm,
]
\setlayer[Logo]
{\framed[width=3cm,height=1cm,background=color,backgroundcolor=lightgray]{Logo...}}
\setupbackgrounds[page][background=Logo]
 
\starttext
%\showframe
 
Some text...
\stoptext
</context>
==State==
105

edits

Navigation menu