Basic Text Formatting
From ConTeXt wiki
< Visuals | Second Step >
This is an overview of the basic text formatting commands and switches of TeX and ConTeXt.
Generally you want to use logical markup, i.e. say "it's emphasized" (\em) instead of "it's bold".
Contents |
[edit] Font, Style, Case and Size
- See this Tugboat article for an introduction to context's font switches.
- Better use \em instead of \it or \sl. The meaning of \em is defined by \setupbodyfontenvironment.
- Note that that the above table is indicative of the Latin Modern family only, and as a result, some styles are not defined for some fonts. This is a result of the fonts available and of the typescripts that have been defined; see Bold typewriter for an example of how to define a typescript to define an additional style for an existing font.
- You can combine size with style, e.g. \bfa is large bold bodyfont.
- Normal size (\tf) is defined by \setupbodyfont.
- Note that \WORD, \Word and all following macros aren't switches, but commands (brackets behind, not around): {\em switch} \Word{macro}
[edit] Relative Font Sizes
- \tfa = 1.2 times \tf size
- \tfb = 1.44 times \tf size
- \tfc = 1.728 times \tf size
- \tfd = 2.074 times \tf size
- \tfe = 2.488 times \tf size
[edit] Verbatim Code
- single commands
- \tex{a tex command}
- oneliners
- \type{tex code}
- source code
- \starttyping etc.
[edit] Quotes
Don't try to type quotation marks, but use logical markup! Quotation marks and formatting are language dependent.
- single quotes
- \quote{some text}
- double quotes
- \quotation{some text}
- long quote sections
- try \startquote or \startquotation etc. See also Long quotations and extracts.
For alternate nesting of double and single quotes, see Nested quotations.
[edit] Language
For short quotes you can switch the language (and depending setups like quotation marks) with the language code like {\de das ist deutsch}. If you switch between longer sections or if the two-letter language code has some other meaning (like \sl stands for slanted and can't be used to start Slovenian) you should use \language[de] or \mainlanguage[de] for the whole document.

