Command/setuptextrules

From Wiki
< Command
Revision as of 10:24, 24 September 2010 by Phg (talk | contribs) (→‎Example: showcase)
Jump to navigation Jump to search

\setuptextrules

Syntax

\setuptextrules[...,...=...,...]
location left inmargin
before command
after command
inbetween command
width dimension
distance dimension
bodyfont 5pt ... 12pt small big
color name
style normal bold slanted boldslanted type cap small... command
rulecolor name


Description

Example

\enableregime[utf]
\setupcolors[state=start]
\setupcolor[hex]
\definecolor[telekommagenta][h=E20074] % RAL 4010

\unexpanded\def\example#1{%
\subject{#1}
\starttextrule{Albatross!}
\starttabulate[|l|l|]
\NC{\em A} \NC What flavour is it?  \NC\NR
\NC{\em B} \NC It’s a bird, isn’t it? It's a bloody sea bird. It’s not any bloody flavour. Albatross! \NC\NR
\NC {\em A} \NC Do you get wafers with it? \NC\NR
\NC {\em B} \NC Of course you don’t get bloody wafers with it. Albatross!\NC\NR
\stoptabulate
\stoptextrule
}

\setupbodyfont[9pt]
\starttext
{\setuptextrules[location=left]
 \example{Location: Left}}

{\setuptextrules[location=inmargin]
 \example{Location: In Margin}}

{\setuptextrules[bodyfont=small,style=italic]
 \example{Small Bodyfont, Italic Text}}

{\setuptextrules[color=telekommagenta,rulecolor=red:2]
 \example{Colored Rule and Text}}

{\setuptextrules[distance=5em]
 \example{Wide Distance Between Text And Rule}}
\stoptext

See also