Difference between revisions of "Second Step"

From Wiki
Jump to navigation Jump to search
m (changed regime to UTF-8)
Line 5: Line 5:
 
<texcode>
 
<texcode>
 
% the first line can hold texexec's command line options
 
% the first line can hold texexec's command line options
\enableregime [il1] % choose input encoding: il1 is "ISO Latin 1" (ISO 8859-1), same as "win"
+
\enableregime [utf] % choose input encoding: utf is UTF-8
 
\mainlanguage [de] % language mode: changes typesetting rules, quote signs etc.
 
\mainlanguage [de] % language mode: changes typesetting rules, quote signs etc.
 
\starttext
 
\starttext
Line 20: Line 20:
  
 
<context>
 
<context>
\enableregime [il1] % choose input encoding: il1 is "ISO Latin 1" (ISO 8859-1), same as "win"
+
\enableregime [utf] % choose input encoding: il1 is "ISO Latin 1" (ISO 8859-1), same as "win"
 
\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
 
\setupbodyfontenvironment[default][em=italic] % ConTeXt's default \em is slanted, but italic is better
Line 33: Line 33:
 
</context>
 
</context>
  
* '''regime''' is the input encoding, i.e. what you type, so that you can use accented characters (like umlauts in the example) directly. It depends on your language, your OS and the capabilities of your editor. Try "utf" if your editor can process Unicode or "mac" (Mac Roman) on a Mac. (More on that topic in [[Encodings and Regimes]].)
+
* '''regime''' is the input encoding, i.e. what you type, so that you can use accented characters (like umlauts in the example) directly. It depends on your language, your OS and the capabilities of your editor. Try "utf" if your editor can process Unicode, otherwise "il1" (ISO Latin 1) on Windows or "mac" (Mac Roman) on a Mac. (More on that topic in [[Encodings and Regimes]].)
 
* '''language''' is the language of your text. Besides <cmd>mainlanguage</cmd> there's also <cmd>language</cmd> to switch temporarily. Try your internet top level domain code as language code (de = german, fr = french, it = italian etc.).
 
* '''language''' is the language of your text. Besides <cmd>mainlanguage</cmd> there's also <cmd>language</cmd> to switch temporarily. Try your internet top level domain code as language code (de = german, fr = french, it = italian etc.).
 
* '''quotation''': use logical markup instead of specified signs! You get single quotes with <cmd>quote</cmd>. You can use <cmd>startquotation</cmd> ... <cmd>stopquotation</cmd> for longer (indented) quotes.
 
* '''quotation''': use logical markup instead of specified signs! You get single quotes with <cmd>quote</cmd>. You can use <cmd>startquotation</cmd> ... <cmd>stopquotation</cmd> for longer (indented) quotes.
* '''em''': again, logical markup! say "<cmd>em</cmd>phasized" instead of bold or italics. Remember, it's a switch, not a command! (Not <tt>\em{bla}</tt>, but <tt>{\em bla}</tt>.)
+
* '''em''': again, logical markup! say "<cmd>em</cmd>phasized" instead of bold or italics. Remember, it's a switch, not a command! (Not <tt>\em{foo}</tt>, but <tt>{\em foo}</tt>.)
  
 
Now you can start with your own document, let's see what your [[Next Steps]] can be...
 
Now you can start with your own document, let's see what your [[Next Steps]] can be...

Revision as of 19:39, 6 February 2008

< Main Page | First Document | Next Steps >

Here's a slightly more complex example:

% the first line can hold texexec's command line options
\enableregime	[utf]		% choose input encoding: utf is UTF-8
\mainlanguage	[de]		% language mode: changes typesetting rules, quote signs etc.
\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. It depends on your language, your OS and the capabilities of your editor. Try "utf" if your editor can process Unicode, otherwise "il1" (ISO Latin 1) on Windows or "mac" (Mac Roman) on a Mac. (More on that topic in Encodings and Regimes.)
  • 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.).
  • 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}.)

Now you can start with your own document, let's see what your Next Steps can be...