Difference between revisions of "Second Step"
Jump to navigation
Jump to search
m |
m (Text replacement - "</cmd>" to "}}") |
||
(22 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
Here's a slightly more complex example: | Here's a slightly more complex example: | ||
− | < | + | <context source="yes" text="looks like:"> |
− | + | \enableregime [utf-8] % choose input encoding | |
− | \enableregime [ | + | % (in LuaTeX and XeTeX, UTF-8 is on by default, thus not needed) |
\mainlanguage [de] % language mode: changes typesetting rules, quote signs etc. | \mainlanguage [de] % language mode: changes typesetting rules, quote signs etc. | ||
+ | \setupbodyfontenvironment[default][em=italic] % ConTeXt's default \em is slanted, but italic is better | ||
+ | |||
\starttext | \starttext | ||
Rotkäppchen: | Rotkäppchen: | ||
Line 15: | Line 15: | ||
\stoptext | \stoptext | ||
− | </ | + | </context> |
+ | |||
+ | * '''regime''' is the input encoding, i.e. what you type, so that you can use accented characters (like umlauts in the example) directly. Old encodings are supported, but use UTF-8 whenever possible. In [[XeTeX]] and [[LuaTeX]] that's the default already, so you don't need that line any more. (More on that topic in [[Encodings and Regimes - Old Content]].) | ||
+ | * '''language''' is the language of your text. Besides {{cmd|mainlanguage}} there's also {{cmd|language}} to switch temporarily. Try your internet top level domain code as language code (de = german, fr = french, it = italian etc., see [[Languages#Language_tags|language tags]]). | ||
+ | * '''quotation''': use logical markup instead of specified signs! You get single quotes with {{cmd|quote}}. You can use {{cmd|startquotation}} ... {{cmd|stopquotation}} for longer (indented) quotes. | ||
+ | * '''em''': again, logical markup! say "{{cmd|em}}phasized" instead of bold or italics. Remember, it's a switch, not a command! (Not <tt>\em{foo}</tt>, but <tt>{\em foo}</tt>.) | ||
− | + | [[Category:Old_Content]] | |
− | |||
− | |||
− |
Latest revision as of 13:19, 9 August 2020
Here's a slightly more complex example:
\enableregime [utf-8] % choose input encoding % (in LuaTeX and XeTeX, UTF-8 is on by default, thus not needed) \mainlanguage [de] % language mode: changes typesetting rules, quote signs etc. \setupbodyfontenvironment[default][em=italic] % ConTeXt's default \em is slanted, but italic is better \starttext Rotkäppchen: \quotation{Aber Großmutter, warum hast du so große Augen?} Der böse Wolf: \quotation{Damit ich dich besser {\em sehen} kann!} \stoptext
looks like:
- regime is the input encoding, i.e. what you type, so that you can use accented characters (like umlauts in the example) directly. Old encodings are supported, but use UTF-8 whenever possible. In XeTeX and LuaTeX that's the default already, so you don't need that line any more. (More on that topic in Encodings and Regimes - Old Content.)
- language is the language of your text. Besides \mainlanguage there's also \language to switch temporarily. Try your internet top level domain code as language code (de = german, fr = french, it = italian etc., see language tags).
- quotation: use logical markup instead of specified signs! You get single quotes with \quote. You can use \startquotation ... \stopquotation for longer (indented) quotes.
- em: again, logical markup! say "\emphasized" instead of bold or italics. Remember, it's a switch, not a command! (Not \em{foo}, but {\em foo}.)