Difference between revisions of "Command/defineconversion"

From ConTeXt wiki
 
Line 4: Line 4:
 
}}
 
}}
  
== [[Help:Reference|Syntax]] (autogenerated)] ==
+
== [[Help:Reference|Syntax]] (autogenerated) ==
 
<syntax>defineconversion</syntax>
 
<syntax>defineconversion</syntax>
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==

Latest revision as of 14:33, 13 October 2019

\defineconversion

Syntax (autogenerated)

\defineconversion[...][...][...]
[...]language
[...]name
[...]csname


\defineconversion[...][...][...,...]
[...]language
[...]name
[...,...]text


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: