Command/framed

From ConTeXt wiki
Jump to: navigation, search

\framed

Syntax

\framed[...,...=...,...]{...}
[...,...=...,...] see \setupframed
{...} text


Description

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

yields

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

yields

The following example contrast the difference between framed and inframed.

\setuplayout[width=10em]
\setupalign[flushleft]

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

Options

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

height

Specifies the height of the frame.

width

Specifies the width of the frame.


frame

This option determines whether a frame is drawn or not.

Default value: on
Alternate value: off

Notes

corner

This option determines whether or not the corners are round. It also allows drawing only selective corners.

Default value: rectangular
Most common alternative: round
Other values: any number between 0 and 28

Notes

(More) examples

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

\setuppapersize[A6,landscape]
\starttext
  \input ward
  \blank
  \framed[width=\textwidth,height=\dimexpr\pagegoal-\pagetotal-\lineheight\relax]{}
\stoptext

See also


Help from ConTeXt-Mailinglist/Forum

All issues with:

C O N T E X T G A R D E N

Personal tools
Namespaces
Variants
Actions
Help
External Help
Installation
Navigation
Toolbox