Difference between revisions of "Command/underbar"

From ConTeXt wiki
Jump to navigationJump to search
m (Fill in and categorize)
m
Line 19: Line 19:
  
 
== Example ==
 
== Example ==
<context source=yes>
+
=== Default style and math ===
\setuppapersize[A5]
+
<context source=yes mode=mkiv text="Gives:">
 
\underbar{This is an example. $c = \sqrt{a^2 + b^2}$}
 
\underbar{This is an example. $c = \sqrt{a^2 + b^2}$}
  
 
\underbar{\input ward}
 
\underbar{\input ward}
 +
</context>
 +
 +
=== Default style nested ===
 +
<context source=yes mode=mkiv text="Gives:">
 +
\setupbar[color=red]
 +
 +
\underbar{A \underbar{B \underbar{Cc} b} a}
 +
\blank
 +
</context>
 +
 +
=== Various parameters demo ===
 +
<context source=yes mode=mkiv text="Gives:">
 +
\setuppapersize[A5]
 +
 +
\definebar[BarA][color=red,rulethickness=1.4]
 +
 +
\BarA{BarA}
 +
\blank
 +
Hello \startbar[BarA]\input{knuth}\stopbar world!
 +
\blank
 +
 +
\definebar[BarB][color=green,rulethickness=2.8,order=background]
 +
 +
\BarB{BarB}
 +
\blank
 +
Hello \startbar[BarB]\input{knuth}\stopbar world!
 +
\blank
 +
 +
\definebar[BarC][color=blue,rulethickness=2.8,order=background,offset=1.5,continue=yes]
 +
 +
\BarC{BarC}
 +
\blank
 +
Hello \startbar[BarC]\input{knuth}\stopbar world!
 +
\blank
 
</context>
 
</context>
  

Revision as of 17:09, 27 October 2012

\underbar

Syntax

\underbar{...}
{...} text

Description

A rule under every line of text.

Example

Default style and math

\underbar{This is an example. $c = \sqrt{a^2 + b^2}$}

\underbar{\input ward}

Gives:

Default style nested

\setupbar[color=red]

\underbar{A \underbar{B \underbar{Cc} b} a}
\blank

Gives:

Various parameters demo

\setuppapersize[A5]

\definebar[BarA][color=red,rulethickness=1.4]

\BarA{BarA}
\blank
Hello \startbar[BarA]\input{knuth}\stopbar world!
\blank

\definebar[BarB][color=green,rulethickness=2.8,order=background]

\BarB{BarB}
\blank
Hello \startbar[BarB]\input{knuth}\stopbar world!
\blank

\definebar[BarC][color=blue,rulethickness=2.8,order=background,offset=1.5,continue=yes]

\BarC{BarC}
\blank
Hello \startbar[BarC]\input{knuth}\stopbar world!
\blank

Gives:

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: