Changes

Jump to navigation Jump to search
1,033 bytes added ,  10:00, 23 October 2010
new section: offsets
\stoptext
</context>
 
=Spacing between frame and text=
 
<tt>\framed</tt> comes with two different types of offsets:
one for the frame itself and another for the its content.
The parameters <tt>frameoffset</tt> and <tt>backgroundoffset</tt>
were already explained above in the section [[#Coloring frame background and framed text]].
 
==Content offsets==
Beyond those there is another four dimensions that enable you to control
the safety distance of a <tt>\framed</tt>’s content by orientation.
Horizontally, <tt>loffset</tt> governs the left, <tt>roffset</tt> the right
offset;
the same goes for <tt>boffset</tt> for the bottom and <tt>roffset</tt> for
the top distance.
Their effects are explored in the following example (MkIV only).
 
==Example==
<texcode>
\def\offsetframe[#1]{%
{\framed[
#1=1em,
align=normal,
width=5.3cm,
height=5.3cm,
]{\tfx\input ward }
}{\it#1}
}
 
\starttext
\startcombination[2*2]
\offsetframe[loffset]
\offsetframe[roffset]
\offsetframe[toffset]
\offsetframe[boffset]
\stopcombination
\stoptext
</texcode>
= Similar topics =
188

edits

Navigation menu