Difference between revisions of "Command/framed"

From Wiki
Jump to navigation Jump to search
m (remove manual syntax table)
Line 6: Line 6:
== [[Help:Reference|Syntax]] (autogenerated) ==
== [[Help:Reference|Syntax]] (autogenerated) ==
== [[Help:Reference|Syntax]] ==
<table cellspacing="4" cellpadding="2" class="cmd">
    <td colspan="2" class="cmd">\framed<span class="first" style="color:red;">[...,...=...,...]</span><span class="second" >{...}</span></td>
  <tr valign="top" class="first">
    <td class="cmd">[...,...=...,...]</td>
    <td>see [[Command/setupframed|\setupframed]] </td>
  <tr valign="top" class="second">
    <td class="cmd">{...}</td>
    <td><i>text</i> </td>
== Description ==
== Description ==

Revision as of 14:50, 9 January 2020


Syntax (autogenerated)

...=...,...inherits from \setupframed


There are two variants of this command:

As its name suggests, \framed draws a frame around its argument. For example

surrounding text \framed{framed text} surrounding text

Notice that the bottom line of the frame is aligned with the baseline of text.

Framed little cousin, \inframed aligns the baseline of framed text with the baseline of surrounding text. For example,

surrounding text \inframed{framed text} surrounding text

The following example contrast the difference between framed and inframed.


Notice the difference between
\framed{framed} and \inframed{inframed},
especially considering its effect on linespacing...


The first argument of framed takes the same key-value options as \setupframed.

height Specifies the height of the frame.
  • Default value: broad
  • Most common alternative: fit
  • Other alternatives: any valid TeX dimension
width Specifies the width of the frame.
frame This option determines whether a frame is drawn or not.
Default value: on
Alternate value: off
background none color
backgroundcolor The background color. background=color must be set.
corner This option determines whether or not the corners are round. It also allows drawing only selected corners.
Default value: rectangular
Most common alternative: round
Other values: any number between 0 and 28
offset sets interior padding
loffset Set left interior padding
roffset Set right interior padding
toffset Set top interior padding
boffset Set bottom interior padding
frameoffset Gives frame an extra offset without affecting surrounding text
backgroundoffset offsets boundaries of background without affecting surrounding text


A frame till the bottom of the page (by WS, 4/2011)

  \input ward

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: