Command/defineconversion

From ConTeXt wiki
Jump to: navigation, search

\defineconversion

Syntax

\defineconversion[...][...]
[...] name
[...] command text

Description

Predefined conversions:

a \characters
A \Characters
AK \cap\characters
KA \cap\characters
n \numbers
N \Numbers
m \mediaeval
i \romannumerals
I \Romannumerals
r \romannumerals
R \Romannumerals
KR \cap\romannumerals
RK \cap\romannumerals
g \greeknumerals
G \Greeknumerals
o \oldstylenumerals
O \oldstylenumerals
or \oldstyleromannumerals

Examples

Change numbering in itemize to '(i)', '(ii)', ...

\defineconversion[bracketroman][(\romannumerals]

Three be the things I shall never attain:
\startitemize[bracketroman, packed][stopper=), width=2em]
    \item Envy, 
    \item content, and 
    \item sufficient champagne.
\stopitemize
\leftaligned{---Dorothy Parker, \quote{Inventory} (fragment)}

Define wholly new conversionset

\defineconversion[inventory][<3,!,\math{\therefore},?]

Four are the things I'd been better without:
\startitemize[inventory, packed][stopper=, width=2em]
    \item Love, 
    \item curiosity,
    \item freckles,
    \item and doubt.
\stopitemize
\leftaligned{---Dorothy Parker, \quote{Inventory} (fragment)}

Conversion set of stars

\defineconversion[starred][\m{*},\m{**},\m{***}] % Math mode gives better spacing, thus \m{...}

\startitemize[starred,packed][stopper=,width=2.5em]
    \item First, 
    \item second,
    \item third.
\stopitemize

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