Difference between revisions of "Framed"

From Wiki
Jump to navigation Jump to search
(→‎Preventing hyphenation: autowidth=force)
m (Back link to visuals)
Line 1: Line 1:
 +
< [[Visuals]] |
 +
 +
 
{{todo|the page devoted to all kinds of framed stuff}}
 
{{todo|the page devoted to all kinds of framed stuff}}
 +
 +
= How to achieve specific results =
  
 
== Preventing hyphenation ==
 
== Preventing hyphenation ==
Line 23: Line 28:
  
 
  I want to specify the maximum width of a frame. If the size of the  
 
  I want to specify the maximum width of a frame. If the size of the  
box is smaller than the maximum width, I want a tight box. This can be done using the <code>autowidth=force</cmd> option to framed.
+
box is smaller than the maximum width, I want a tight box. This can be done using the <code>autowidth=force</code> option to framed.
  
 
<context source="yes">
 
<context source="yes">
Line 35: Line 40:
 
</context>
 
</context>
  
== Similar topics ==
+
= Similar topics =
 
* [[Vertically Centered Boxes]]
 
* [[Vertically Centered Boxes]]
 
* [[Overlays]]
 
* [[Overlays]]
 
* [[Tables Overview]]
 
* [[Tables Overview]]

Revision as of 02:48, 3 November 2006

< Visuals |



TODO: the page devoted to all kinds of framed stuff (See: To-Do List)


How to achieve specific results

Preventing hyphenation

One can prevent hypenation inside a frame by passing nothypenated option to align. It is also a good idea to add verytolerant and strectch options.

\startcombination[2*1]
{\framed
   [width=5cm,
    align={flushleft}]
   {\input ward \endgraf}}
{flushleft}
{\framed
   [width=5cm,
    align={flushleft,nothyphenated,verytolerant}] % maybe also stretch
   {\input ward \endgraf}}
{flushleft,\crlf nothypenated, \crlf verytolerant}
\stopcombination

Specify the width no longer than needed

I want to specify the maximum width of a frame. If the size of the 

box is smaller than the maximum width, I want a tight box. This can be done using the autowidth=force option to framed.

\defineframed
   [tightframed][width=5cm,autowidth=force,align=middle]

\tightframed{Small}

\tightframed{A really really long line that is split at 5cm}

Similar topics