Changes

Jump to navigation Jump to search
More information and example
</cd:command>
</cd:variants>
<cd:description>Predefined conversions(selection){| class=wikitable|-| <code>a</code> || {{cmd|characters}}|-| <code>A</code> || {{cmd|Characters}}|-| <code>AK</code> || {{cmd|cap}}{{cmd|characters}}|-| <code>KA</code> || {{cmd|cap}}{{cmd|characters}}|-| <code>n</code> || {{cmd|numbers}}|-| <code>N</code> || {{cmd|Numbers}}|-| <code>m</code> || {{cmd|mediaeval}}|-| <code>i</code> || {{cmd|romannumerals}}|-| <code>I</code> || {{cmd|Romannumerals}}|-| <code>r</code> || {{cmd|romannumerals}}|-| <code>R</code> || {{cmd|Romannumerals}}|-| <code>KR</code> || {{cmd|cap}}{{cmd|romannumerals}}|-| <code>RK</code> || {{cmd|cap}}{{cmd|romannumerals}}|-| <code>g</code> || {{cmd|greeknumerals}}|-| <code>G</code> || {{cmd|Greeknumerals}}|-| <code>o</code> || {{cmd|oldstylenumerals}}|-| <code>O</code> || {{cmd|oldstylenumerals}}|-| <code>or</code> || {{cmd|oldstyleromannumerals}}|-|} or {| class=wikitable| || default || depends, mostly “Arabic” numbers|-| n, N || numbers || “Arabic” numbers (difference?)|-| || zero || “Arabic” numbers, starting with 0|-| o || || Mediaeval numbers (oldstyle, {{cmd|os}})|-| a, A || alphabetic || Latin characters (lower/upper)|-| AK = KA || || Latin small caps|-| || sloveniannumerals, slovenianNumerals || Slovenian characters (Latin with č, lower/upper)|-| || spanishnumerals, spanishNumerals || Spanish characters (Latin with ñ, lower/upper)|-| || russiannumerals, russianNumerals || Russian characters (Cyrillic lower/upper)|-| i = r, I = R || romannumerals || Roman numbers (lower/upper)|-| RK = KR || || Roman numbers in small caps|-| or || || Roman numbers with continuous lines|-| g, G || greeknumerals || Greek characters (lower/upper)|-| || mathgreek || Greek lowercase characters from the math font|-| || hebrewnumerals, yiddishnumerals || Hebrew/Yiddish numbers|-| || month, month:mnem || Month names (full/abbreviated)|-| || set 0 || Symbol set for itemizations|-| || set 1 ... set 3 || Symbol sets for footnotes|-| || empty, none || |-| || continued || always “(continued)”|-| || words, Words || Numbers as words (lower/upper), so far only English|-|} There are many more options, e.g. for Arabic, CJK and other languages/scripts; all the character conversions are language dependent.</cd:description><cd:examples><cd:example title="Define new conversion set"><context sourcemode="yesmkiv" modesource="mkivyes">
\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,
\leftaligned{---Dorothy Parker, \quote{Inventory} (fragment)}
</context>
</cd:example><cd:example title="Change numbering in itemize to '(i)', '(ii)', ..."><context source="yes">\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)}</context></cd:example><cd:example title="Conversion set of stars"><context sourcemode="yesmkiv" modesource="mkivyes">
\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
</context></cd:example><cd:example title="Conversion for numbers with leading zeros"><context source="yes">\startluacodeinterfaces.implement { name = "FourDigits", public = true, arguments = "string", actions = function(s) context("%04d",tonumber(s)) end}\stopluacode \defineconversion [FourDigits] [\FourDigits] \setuphead[chapter][conversion=FourDigits] \startchapter [title={Chapter}] \stopchapter</context> (By Wolfgang Schuster, 2023-01-01)</cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:commandref name="convertnumber"></cd:commandref>
<cd:commandref name="setupitemize"></cd:commandref>
<cd:commandref name="startitemize"></cd:commandref><cd:commandref name="setuphead"></cd:commandref></cd:seealso>
</cd:commandgroup>

Navigation menu