ConTEXt an excursion - Pragma ADE
ConTEXt an excursion - Pragma ADE ConTEXt an excursion - Pragma ADE
How to create a document ... your text\index{another indexentry} ... \subsection{the second sub section} ... your text ... \section{The third section} ... your text ... \chapter{Another Chapter} ... your text ... \chapter[lastchapter]{The Last Chapter} contents index commands definitions colofon ... your text ... \completeindex \stoptext CONT E XT expects a plain ASCII input file. Of course you can use any texteditor or wordprocessor you want, but you should not forget that CONT E XT can only read ASCII input. Most texteditors or wordprocessors can export your file as plain ASCII. The input file should contain the text you want to be processed by CONT E XT and the CONT E XT commands. A CONT E XT command begins with a backslash \. With the command \starttext you indicate the beginning of your text. The area before \starttext is called the set up area and is used for defining new commands and setting up the layout of your document. A command is usually followed by a left and right bracket pair [] and/or a left and right brace {}. In \chapter[lastchapter]{The Last Chapter} the command \chapter for example tells CONT E XT to perform a few actions concerning design, typography and structure. These actions might be: 1. start a new page 2. increase chapter number by one 3. place chapter number in front of chapter title 4. reserve some vertical space exit search + go back – + 1 4
How to create a document 5. use a big font 6. put chapter title (and page number) in table of contents These actions will be performed on the argument that is given between the left and right braces: The Last Chapter. The [lastchapter] between brackets has not been mentioned yet. This is a label with a logical name that can be used for refering to that specific chapter. This can be done with yet some other CONT E XT commands: \in{chapter}[lastchapter] typesets the chapter number, while \about[lastchapter] returns the title. So now the list of actions can be extended with: contents index commands definitions colofon 7. let label lastchapter be chapter number (and store this for later use) Other actions concerning running heads, number resetting and interactivity are disregarded at this moment. If you have CONT E XT process this file, you would obtain a very simple document with a few numbered chapter and section headers. While processing the file CONT E XT takes care of many things. One of these things is for example page numbering. But in order to make a table of contents CONT E XT needs page numbers that are not yet known to CONT E XT at the first run. So you have to process this file twice (a two pass job). CONT E XT will produce a few auxilliary files to store this kind of information. These are to be processed by T E XUTIL. In some instances you have to proces an input file thrice (a three pass job). One can use T E XEXEC to setup CONT E XT from the command line. This PERL script also takes care of the multiple passes. exit search + go back – + 1 5
- Page 1 and 2: \about \adaptlayout \adding \append
- Page 3 and 4: contents Table Of Contents index co
- Page 5: How to create a document contents 1
- Page 9 and 10: Special characters Some errors will
- Page 11 and 12: Defining a document contents 4 Defi
- Page 13 and 14: Headers \chapter[ref,..]{...} conte
- Page 15 and 16: Itemize all numbers will appear in
- Page 17 and 18: Itemize You will get: ♣ Hasselt w
- Page 19 and 20: Itemize 1. Achter ’t Werk 2. Baan
- Page 21 and 22: Formulae In The Netherlands the cit
- Page 23 and 24: Formulae Although display mode can
- Page 25 and 26: Legends \leg t \\ time \\ s \\ \leg
- Page 27 and 28: Figures You can define your own uni
- Page 29 and 30: Figures Option here force page top
- Page 31 and 32: Figures \placefigure [here,force] [
- Page 33 and 34: Figures \externalfigure[...][..,..=
- Page 35 and 36: Tables For placing a table the comm
- Page 37 and 38: Tables Command \JustLeft \JustRight
- Page 39 and 40: Tables Year Citizens contents 1675
- Page 41 and 42: Tables \VL \bf Year \VL \bf Citizen
- Page 43 and 44: Tables A more sensible example is g
- Page 45 and 46: Tables \VL 1808 \VL ˜9 \VL 2 \VL -
- Page 47 and 48: Tables Decline of wealth in Dutch f
- Page 49 and 50: Paragraph formatting \setupparagrap
- Page 51 and 52: Paragraph formatting \chemical{CaCO
- Page 53 and 54: Columns There you will find the St.
- Page 55 and 56: Footnotes contents 14 Footnotes ind
How to create a document<br />
... your text\index{<strong>an</strong>other indexentry} ...<br />
\subsection{the second sub section}<br />
... your text ...<br />
\section{The third section}<br />
... your text ...<br />
\chapter{Another Chapter}<br />
... your text ...<br />
\chapter[lastchapter]{The Last Chapter}<br />
contents<br />
index<br />
comm<strong>an</strong>ds<br />
definitions<br />
colofon<br />
... your text ...<br />
\completeindex<br />
\stoptext<br />
CONT E XT expects a plain ASCII input file. Of course you c<strong>an</strong> use <strong>an</strong>y texteditor or wordprocessor<br />
you w<strong>an</strong>t, but you should not forget that CONT E XT c<strong>an</strong> only read ASCII input. Most<br />
texteditors or wordprocessors c<strong>an</strong> export your file as plain ASCII.<br />
The input file should contain the text you w<strong>an</strong>t to be processed by CONT E XT <strong>an</strong>d the<br />
CONT E XT comm<strong>an</strong>ds. A CONT E XT comm<strong>an</strong>d begins with a backslash \. With the comm<strong>an</strong>d<br />
\starttext you indicate the beginning of your text. The area before \starttext is<br />
called the set up area <strong>an</strong>d is used for defining new comm<strong>an</strong>ds <strong>an</strong>d setting up the layout<br />
of your document.<br />
A comm<strong>an</strong>d is usually followed by a left <strong>an</strong>d right bracket pair [] <strong>an</strong>d/or a left <strong>an</strong>d right<br />
brace {}. In \chapter[lastchapter]{The Last Chapter} the comm<strong>an</strong>d \chapter<br />
for example tells CONT E XT to perform a few actions concerning design, typography <strong>an</strong>d<br />
structure. These actions might be:<br />
1. start a new page<br />
2. increase chapter number by one<br />
3. place chapter number in front of chapter title<br />
4. reserve some vertical space<br />
exit<br />
search +<br />
go back<br />
– +<br />
1 4