Difference between revisions of "Command/setupframed"

From Wiki
Jump to navigation Jump to search
Line 4: Line 4:
 
</cd:shortdesc>
 
</cd:shortdesc>
 
<cd:variants>
 
<cd:variants>
<cd:command category="rules" file="pack-rul.mkiv" interfacedate="2020-07-14T09:24" interfacefile="i-framed.xml" keywords="background" level="style" name="setupframed" variantnumber="1">
+
<cd:command category="rules" file="pack-rul.mkiv" interfacedate="2021-03-02T11:08" interfacefile="i-framed.xml" keywords="background" level="style" name="setupframed" variantnumber="1">
 
   <cd:arguments>
 
   <cd:arguments>
 
     <cd:keywords list="yes" optional="yes" ordinal="1">
 
     <cd:keywords list="yes" optional="yes" ordinal="1">
     <cd:keywordsdoc>The name of an instance of {{gen|framed}}. Not needed for the {{cmd|framed}} command itself.</cd:keywordsdoc>
+
     <cd:keywordsdoc></cd:keywordsdoc>
 
     <cd:constant type="cd:name"></cd:constant>
 
     <cd:constant type="cd:name"></cd:constant>
 
     </cd:keywords>
 
     </cd:keywords>
Line 111: Line 111:
 
       <cd:paramdoc></cd:paramdoc>
 
       <cd:paramdoc></cd:paramdoc>
 
       <cd:constant type="foreground"></cd:constant>
 
       <cd:constant type="foreground"></cd:constant>
       <cd:constant type="color">a color, to be set with <cd:iref name="backgroundcolor"/> {{bug|backgroundcolor is not documented.}}</cd:constant>
+
       <cd:constant type="color">a color, to be set with <cd:iref name="backgroundcolor"/></cd:constant>
 
       <cd:constant type="cd:name">a named background ??</cd:constant>
 
       <cd:constant type="cd:name">a named background ??</cd:constant>
 
     </cd:parameter>
 
     </cd:parameter>
Line 118: Line 118:
 
       <cd:constant type="frame"></cd:constant>
 
       <cd:constant type="frame"></cd:constant>
 
       <cd:constant type="cd:dimension"></cd:constant>
 
       <cd:constant type="cd:dimension"></cd:constant>
 +
    </cd:parameter>
 +
    <cd:parameter name="backgroundcolor">
 +
      <cd:paramdoc></cd:paramdoc>
 +
      <cd:constant name="cd:color"></cd:constant>
 
     </cd:parameter>
 
     </cd:parameter>
 
     <cd:parameter name="component">
 
     <cd:parameter name="component">
Line 275: Line 279:
 
       <cd:paramdoc></cd:paramdoc>
 
       <cd:paramdoc></cd:paramdoc>
 
       <cd:constant type="cd:dimension"></cd:constant>
 
       <cd:constant type="cd:dimension"></cd:constant>
 +
    </cd:parameter>
 +
    <cd:parameter name="linedirection">
 +
      <cd:paramdoc></cd:paramdoc>
 +
      <cd:constant default="yes" type="normal"></cd:constant>
 +
      <cd:constant type="reverse"></cd:constant>
 
     </cd:parameter>
 
     </cd:parameter>
 
     </cd:assignments>
 
     </cd:assignments>

Revision as of 11:38, 29 October 2021


\setupframed

Summary

The command \setupframed is used for configuring \framed and instances of framed

Settings

\setupframed[...,...][...=...,...]
[...,...]name
cornerrectangular round number
framecornerrectangular round number
backgroundcornerrectangular round number
radiusdimension
frameradiusdimension
backgroundradiusdimension
depthdimension
framedepthdimension
backgrounddepthdimension
framecolorcolor
topframeon off small name
bottomframeon off small name
leftframeon off small name
rightframeon off small name
regionyes no
rulethicknessdimension
frameoffsetdimension
frameon off overlay small closed none
backgroundforeground color name
backgroundoffsetframe dimension
backgroundcolor
componentname
extrascommand
foregroundstylestyle command
foregroundcolorcolor
setupsname
offsetdefault overlay none dimension
widthlocal fit max broad fixed dimension
heightfit max broad dimension
minheightdimension
alignsee \setupalign
strutyes no none local global
autostrutyes no
locationheight depth high low top middle bottom line lohi hanging keep formula mathematics normal
autowidthyes no force
linesnumber
topcommand
bottomcommand
blankyes no
profilename
emptyyes no
loffsetdimension
roffsetdimension
toffsetdimension
boffsetdimension
orientationnumber
anchoringnormal up down left right top bottom name
xanchordimension
yanchordimension
linedirectionnormal reverse

OptionExplanation
corner
This option determines whether or not the corners of the frame and background are rounded. It also allows drawing only selected corners. See the example below.
rectangular square corners
round rounded corners
framecorner
This option applies only to the frame corners.
backgroundcorner
This option applies only to the background corners.
radius
background and frame corner radius, if corner=round
frameradius
frame radius, if framecorner=round
backgroundradius
background radius, if backgroundcorner=round
rulethickness
sets the thickness of the frame border.
frameoffset
Gives frame an extra offset without affecting surrounding text.
frame
This option determines whether a frame is drawn or not.
background
color a color, to be set with backgroundcolor
name a named background ??
backgroundoffset
Gives background an extra offset without affecting surrounding text.
offset
This is the offset around the framed content. The frame itself is controlled by frameoffset
default set to 0.25ex.
overlay set to 0pt. If the frame is inside another one then the frame lines will overlap.
none set to 0pt. If the frame is inside another frame then the frame lines are doubled.
width
Specifies the width of the frame.
local inherit the width from parent box
fit according to content
broad sets width to approximately \textwidth
fixed like fit, but with an implied autowidth=no
height
Specifies the height of the frame.
align
If the align parameter is unspecified, \framed produces a \hbox, inside which linebreaks (if any) will appear as spaces; when align is specified, \framed will produce a \vbox.
location
depth lower framed box about \strutdp.
low (resembles \inframed): lowers the framed box by about \strutdp+offset+framelinewidth.
hanging lower framed box by approx. its own height (baseline is on the top).
empty
yes do not display contents of the box.
loffset
override the left value of offset
roffset
override the right value of offset
toffset
override the top value of offset
boffset
override the bottom value of offset

Description

Set the default parameters for \framed. The \framed command produces a box with (optionally) a frame, certain dimensions, a background, etc.


Examples

corner option values

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

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: