ConTEXt
the manual
Hans Hagen
1
2
ConTEXt
the manual
Hans Hagen
January 27, 2000
3
This document is typeset using pdfTEX. The body font is Lucida Bright at 10 points. The layout
is based on a 24 cm square paper size, scaled down .875 to fit nicely on an A4.
TEX and AMS-TEX are trademarks of the American Mathematical Society; METAFONT is a trademark of Addison--Wesley Publishing Company; PostScript, Portable Document Format and Acrobat are trademarks of Adobe Systems Incorporated; dvipsone and dviwindo are trademarks
of Y&Y Incorporated; ibm is a trademark of International Business Machines Corporation; msdos is a trademark of MicroSoft Corporation; all other product names are trademarks of their
producers.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system,
or transmitted in any form or by any means, electronic, mechanical, photocopying, recording
or otherwise, without prior written permission of the publisher.
c 1991–2000 PRAGMA ADE, Ridderstraat 27, 8061GH Hasselt, The Netherlands, prag
ma@wxs.nl
4
1
Content
Preface
1
5
Introduction
7
1.1 TEX 7
1.2 ConTEXt 7
1.3 Commands 8
1.4 Programs 12
1.5 Files 12
1.6 Texts 13 1.7 Version numbers 14 1.8 Top ten 15 1.9 Warning 15
2
Documents
19
2.1 Introduction 19
2.2 Start and stop 19
2.5 Versions 25 2.6 Modes 26
3
Page design
2.3 Structure 20
2.4 Directories 25
29
3.1 Introduction 29
3.2 Paper dimensions 29
3.3 Page composition 30
3.4 Grids 42 3.5 Printing 45 3.6 Arranging pages 48 3.7 Logo types 57
4
Layout
63
4.1 Introduction 63 4.2 Paragraphs 63 4.3 Line spacing 63 4.4 Indentation 66
4.5 Vertical spacing (whitespacing) 68 4.6 Word spacing 72 4.7 Struts 73 4.8 Text
in the margin 73 4.9 Subscript and superscript 77 4.10 Columns 78 4.11 Paragraphs in columns 81
4.12 Tabulate 85
4.13 Alignment 87
4.14 New lines 89
4.15 New page 91 4.16 Pagenumbers 93 4.17 Headers and footers 95 4.18 Footnotes 100 4.19 Aligned boxes 104 4.20 Makeup 106
5
Typography
111
5.1 Introduction 111 5.2 The mechanism 113 5.3 Font switching 115 5.4 Characters 117
5.5 Available alternatives 117
5.6 Emphasize 118
5.7 Capitals 119
5.8 Verbatim text 122 5.9 Math 126 5.10 Em and Ex 128 5.11 Definitions 129
5.12 Page texts 136 5.13 Files 136 5.14 Figures 137
6
Color and background
141
6.1 Introduction 141
6.2 Color 141
6.3 Grayscales 145
6.4 Colorgroups and
palettes 145
6.5 Text backgrounds 150
6.6 Layout backgrounds 152
6.7 Overlays 154 6.8 METAPOST 155
5
2
7
Language specific issues
159
7.1 Introduction 159 7.2 Automatic hyphenating 159 7.3 Definitions and setups 160
7.4 Date 163
7.5 Labels and heads 164
7.6 Language specific commands 165
7.7 Automatic translation 166 7.8 Composed words 166
8
Text elements
169
8.1 Introduction 169
8.2 Subdividing the text 170
8.3 Variations in titles 174
8.4 Meta--structure 180 8.5 Alternative mechanisms 181
9
References
187
9.1 Table of contents 187 9.2 Synonyms 200 9.3 Sorting 203 9.4 Marking 205
9.5 Cross references 208 9.6 Predefined references 215 9.7 Registers 215
10 Descriptions
225
10.1 Introduction 225 10.2 Definitions 225 10.3 Enumeration 228 10.4 Indenting 232 10.5 Numbered labels 234 10.6 Itemize 235 10.7 Items 244 10.8 Citations 246
11 Lines and frames
251
11.1 Introduction 251
11.2 Single lines 251
11.3 Fill in rules 253
11.4 Text
lines 255 11.5 Underline 257 11.6 Framing 258 11.7 Framed texts 266 11.8 Margin rules 270 11.9 Black rules 271 11.10 Grids 272
12 Blocks
275
12.1 Introduction 275
12.2 Floats 275
12.3 Combining figures 284
12.4 Text
blocks 287 12.5 Opposite blocks 294 12.6 Margin blocks 294 12.7 Hiding text 295
12.8 Postponing text 295 12.9 Buffers 296
13 Figures
299
13.1 Introduction 299
13.2 Defining figures 299
13.3 Recalling figures 304
13.4 Automatic scaling 305
13.5 TEX--figures 307
13.6 Extensions of figures 308
13.7 Movies 309 13.8 Some remarks on figures 310
A
Definitions
313
6
3
B
Index
353
C
Commands
359
7
8
Preface
5
Preface
This manual is about ConTEXt, a system for typesetting documents. Central element in this
name is the word TEX because the typographical programming language TEX is the base for
ConTEXt.
People who are used to TEX will probably identify this manual as a TEX document. They recognise
the use of \. One may also notice that the way pararaphs are broken into lines is often better
than in the avarage typesetting system.
In this manual we will not discuss TEX in depth because highly recommended books on TEX
already exist. We would like to mention:
1. the unsurpassed The TEXBook by Donald E. Knuth, the source of all knowledge and TEXnical
inspiration,
2. the convenient TEX by Topic by Victor Eijkhout, the reference manual for TEX programmers,
and
3. the recommended The Beginners Book of TEX by Silvio Levy and Raymond Seroul, the book
that turns every beginner into an expert
For newcomers we advise (3), for the curious (1), and for the impatient (2). ConTEXt users will
not need this literature, unless one wants to program in TEX, uses special characters, or has to
typeset math. Again, we would advise (3).
You may ask yourself if TEX is not one of the many typesetting systems to produce documents.
That is not so. While many systems in eighties and nineties pretended to deliver perfect typographical output, TEX still does a pretty good job compared to others.
TEX is not easy to work with, but when one gets accustemed to it, we hope you will appreciate
its features,
Hans Hagen, 1996--1999
9
10
Introduction
7
Introduction
1.1
TEX
TEX was developed at the Stanford University during the seventies. The designer, developer and
spiritual father of TEX is Donald E. Knuth. Knuth developed TEX to typeset his own publications
and to give an example of a systematically developed and annotated program.
The TEX project was supported by the American Mathematical Society and resulted in the programming language and program TEX, the programming language and program METAFONT, the
Computer Modern typefaces and a number of tools and publications.
1
TEX is used worldwide, supports many languages, runs on almost every platform and is stable
since 1982, which is rather unique in today’s information technology.
TEX is a batch--oriented typesetting system. This means that the complete text is processed
from beginning to end during which typesetting commands are interpreted. Because you tell
your typesetting intentions to TEX, the system can also be qualified as an intentional typesetting
system.
In most documents one can stick to commands that define the structure and leave the typographic details to ConTEXt. One can concentrate on the content, instead of on makeup; the
author can concentrate on his reader and his intentions with the text. In this respect one
can classify ConTEXt as an intentional system. We prefer such a system over a page--oriented
system, especially in situations where you have to process bulky documents of with regularly
changing content. Furthermore an intentional typesetting system is rather flexible and makes
it possible to change layout properties depending on its application. It can also cooperate quite
well with other text--processing programs and tools.
1.2
ConTEXt
The development of ConTEXt was started in 1990. A number of TEX based macropackages
had been used to our satisfaction. However, the non--technical users at our company were
not accustomed to rather complex and non--Dutch interfaces. For this reason we initiated the
development of ConTEXt with a parameter driven interface and commands that are easy to
understand. Initially the user interface was only available in Dutch.
The functionality of ConTEXt was developed during the production of a great number of complex educational materials and workplace manuals and handbooks. In 1994 the package was
TEX — ConTEXt
1
11
8
Introduction
stable enough to warrant a Dutch user manual. Over the years ConTEXt has been upgraded
with many features and German and English interfaces were added. Though ConTEXt is as
(un)stable as any other macropackage there are still a great number of wishes. These will be
implemented in the spirit of the existing ConTEXt commands.
ConTEXt comes with a number of Perl scripts, like TEXutil and TEXexec. Also a number of
modules are available, like ppchTEX for typesetting chemical structures.
1.3
Commands
A ConTEXt document is normally coded in ascii. Such a document consist of text mixed with
ConTEXt commands. These commands tell the system how the text should be typeset. An
example of such a command is \sl. A ConTEXt command begins with a backslash (\). Most
of the time a command does something with the text that comes after the command. The text
after the command \sl will be typed slanted.
When we use a command like \sl we are typesetting. Typesetting and writing are conflicting
activities. As an author you would rather spend as little time as possible with typesetting.
However, you want to indicate that something has to happen with the text. An example is a
command like \em (emphasis). Commands like \em enable the typesetter to change the meaning
of this command without having to edit the text.
ConTEXt
plain TEX
TEX
Figure 1.1
A TEX user normally speaks of macros instead of commands. A macro is a, often small, program. Although
we will use both ‘command’ and ‘macro’, we try to consistently use the word command for users and macro for
programmers.
A collection of macros is called a macropackage. We believe ConTEXt is one of the most extensive and complete
macropackages. One of the advantages of ConTEXt is the
availability of most of the plain TEX macros.
A command is often followed by setups or by text. Setups
are placed between brackets ([]). The scope or range
of the command, the text acted upon, is placed between
curly brackets ({}). For example:
\framed[width=2cm,height=1cm]{that’s it}
If we process this text and command by TEX we get:
1
ConTEXt — Commands
12
Introduction
9
that’s it
Setups in ConTEXt are defined by commands like:
\setupsomething[variable=value,variable=value,...]
or
\setupsomething[option,option,...]
In both examples the setups are placed between []. Several setups are defined in a comma list.
A number of examples are:
\setupwhitespace[big]
\setupitemize[packed,columns]
\setuplayout[backspace=4cm,topspace=2.5cm]
There are also commands that are used to define new commands. For example:
\definesomething[name]
Sometimes a definition inherits its characteristics from another (existing) one. In those situations a definition looks like:
\definesomething[clone][original]
In many cases one can also pass settings to these commands. In that case a definition looks
like:
\definesomething[name][variable=value,...]
These setups can also be defined in a later stage with:
\setupsomething[name][variable=value,...]
An example of such a name coupled definiton and setup is:
\definehead[section][chapter]
\setuphead[section][textstyle=bold]
The alternatives shown above are the most common appearances of the commands. But there
are exceptions:
\defineenumeration[Question][location=inmargin]
\useexternalfigure[Logo][FIG-0001][width=4cm]
\definehead[Procedure][section]
\setuphead[Procedure][textstyle=slanted]
Commands
1
13
10
Introduction
After the first command the newly defined command \Question is available which we can
use for numbered questions and to place numbers in the margin. With the second command
we define a picture that is scaled to a width of 4cm. After the third command a new command \procedure is available that inherits its characteristics from the predefined command
\section. The last command alters the characteristics of the newly defined head. Later we
will discuss these commands in more detail.
Many typographical operations are performed on a text that is enclosed within a start-stop
construction:
\startsomething
.............................
\stopsomething
Often keywords or key--value pairs can be passed, that inform ConTEXt on the users wishes:
\startnarrower[2*left,right]
.............................
\stopnarrower
or
\startitemize[n,broad,packed]
\item .............................
\item .............................
\stopitemize
We use begin-end constructions to mark textblocks. Marked textblocks can be typeset, hidden,
replaced or called up at other locations in the document.
\beginsomething
.............................
\endsomething
These commands enable the author to type questions and answers in one location and place
them at another location in the document. Answers could be placed at the end of a chapter
with:
\defineblock[Answer]
\setupblock[Answer][bodyfont=small]
\hideblocks[Answer]
.............................
\chapter{........}
1
Commands
14
Introduction
11
.............................
\beginofAnswer
.............................
\endofAnswer
.............................
In this case answers will be typeset in a smaller bodyfont size, but only when asked for. They
are hidden by default, but stored in such a way, that they can later be typeset.
Commands come in many formats. Take for example:
\placefigure
[left]
[fig:logo]
{This is an example of a logo.}
{\externalfigure[Logo]}
This command places a picture at the left hand side of a text while the text flows around the
picture. The picture has a reference fig:logo, i.e. a logical name. The third argument contains
the title and the fourth calls the picture. In this case the picture is a figure defined earlier as
Logo. Figure 1.1 is typeset this way.
The last example has arguments between optional brackets ([]). Many commands have optional
arguments. In case these optional arguments are left out the default values become operative.
You may have noticed that a spacy layout of your ascii text is allowed. In our opnion, this
increases readability considerably, but you may of course decide to format your document
otherwise. When the ConTEXt commands in this manual are discussed they are displayed in
the following way:
\setupfootertexts[.1.][.2.][.3.]
.1.
.2.
.3.
96
text margin edge
text section date mark pagenumber
text section date mark pagenumber
The command \setupfootertexts, which we will discuss in detail in a later chapter, has three
arguments of which the first is optional. The first argument defaults to [text]. Optional arguments are displayed as slanted text. Default values are underlined and possible alternatives
are typeset slanted. In this example text means that you can provide any footertext. ConTEXt
is able to keep track of the status of information on the page, for instance the name of the
Commands
1
15
12
Introduction
current chapter. We call this kind of information mark, so the command \setupfootertexts
accept references to marks, like those belonging to sectioning commands: chapter, section,
etc. The argument date results in the current systemdate.
When the setup of some commands are displayed you will notice a ðñ in the right hand top
corner of the frame. This indicates that this command has a special meaning in interactive or
screen documents. Commands for the interactive mode only show solid arrows, commands
with an additional functionality show gray arrows.
1.4
Programs
TEX does a lot of text manipulations during document processing. However, some manipulations are carried out by TEXutil. This program helps TEX to produce registers, lists, tables of
contents, tables of formulas, pictures etc. This program is a Perl script.
Document processing can best be done with TEXexec. This Perl script enables the user to use
different processing modes and to produce different output formats. It also keeps track of
changes and processes the files as many times as needed to get the references and lists right.
1.5
Files
TEX is used with ascii source files. ascii is an international standardized computer alphabet.
The ascii file with the prescribed extension tex is processed by TEX. During this process TEX
produces a file with graphical commands. This file has the extension dvi. A machine--specific
driver transforms this file into a format that is accepted by photosetters and printers. Usually,
PostScript drivers are used to produce PostScript files.
ConTEXt relies on plain TEX. Plain TEX, ConTEXt and a third package TABLE are brought together
in a so called format file. TABLE is a powerful package for typesetting tables. A format file can
be recognized by its suffix fmt. TEX can load format files rather fast and efficiently.
A dvi file can be viewed on screen with a dedicated program. For electronic distribution
PostScript files can be transformed (distilled) into Portable Document Format (pdf) files. pdf
files are of high graphical quality and are also interactive (hyperlinked). ConTEXt fully supports
pdfTEX, which means that you can generate pdf output directly.
1
Commands — Programs — Files
16
Introduction
1.6
Texts
1.6.1
Characters
13
A TEX text contains ascii characters. Higher ascii values to produce characters like ë, ô and ñ
can also be used in this version of TEX. Some characters in TEX have a special meaning. These
characters can be typeset by putting a \ in front of it. A % is obtained by typing \%. If one
would type only a % the result would be undesirable because TEX interprets text after a % as
comment that should not be processed. A $ is produced by \$. A $ without a \ indicates the
beginning of the mathemathical mode.
1.6.2
Paragraphs
TEX performs its operations mostly upon the text element paragraph. A paragraph is ended
by \par or preferably by an empty line. Empty lines in an ascii text are preferred because of
readability.
1.6.3
Boxes
In this manual we will sometimes talk about boxes. Boxes are the building blocks of TEX. TEX
builds a page in horizontal and vertical boxes. Every character is a box, a word is also a box
built out of a number of boxes, a line is . . .
When TEX is processing a document many messages may occur on the screen. Some of these
messages relate to overfull or underful boxes. Horizontal and vertical boxes can be typeset
by the TEX commands \hbox and \vbox. Displacements can be achieved by using \hskip and
\vskip. It does not hurt to know a bit about the basics of TEX, because that way one can far
more easilly write his or her own alternatives to, for instance, chapter headers.
1.6.4
Fonts
TEX is one of the few typesetting systems that does math typesetting right. To do so TEX
needs a complete fontfamily. This means not only the characters and numbers but also the
mathematical symbols. Complete fontfamilies are Computer Modern Roman and Lucida Bright.
Both come in serif and sans serif characters and a monospaced character is also available. Other
fontfamilies are available.
1.6.5
Dimensions
Characters have dimensions. Spacing between words and lines have dimensions. These dimensions are related to one of the units of table 1.1. For example the linespacing in this document
is 14.83998pt.
Files — Texts
1
17
14
Introduction
dimension
meaning
equivalent
pt
point
72.27pt = 1in
pc
pica
1pc = 12pt
in
inch
1in = 2.54cm
bp
big point
72bp = 1in
cm
centimeter
2.54cm = 1in
mm
millimeter
10mm = 1cm
dd
didot point
1157dd = 1238pt
cc
cicero
1cc = 12dd
sp
scaled point
65536sp = 1pt
Table 1.1 Dimensions in TEX.
We will often specify layout dimensions in points or centimeters or milimeters. A point is
about .35mm. Most dimensions are rather American. The European Didot point is equivalent
to 1/2660m = 3.759398496mm.
Next to the mentioned dimension TEX also uses em and ex. Both are font dependant. An ex
has the height of an x, and an em the width of an M. In the Computer Modern Roman typefaces,
numbers have a width of 1/2em, while a — (---) is one em.
1.6.6
Error messages
While processing a document, TEX generates status messages (what is TEX doing), warning messages (what could TEX do better) and error messages (what considers TEX wrong). An error
message is always followed by a halt and processing will be stopped. A linenumber and a ?
will appear on screen. At the commandline you can type H for help and the available commands
will be displayed.
Some fatal errors will lead to an * on the screen. TEX is expecting a filename and you have to
quit processing. You can type stop or exit and if that doesn’t work you can always try ctrl-z
or ctrl-c.
1.7
Version numbers
TEX was frozen in 1982. This meant that no functionality would be added from that time on.
However, exceptions were made for the processing of multi--language documents, the use of
1
Texts — Version numbers
18
Introduction
15
8-bits ascii--values and composed characters. Additionally some bugs were corrected. At this
moment TEX version 3.141592 is being used. The final TEX version number will be π , while
METAFONT will become the Euler number e.
ConTEXt can handle both ε-TEX and pdfTEX, which are extensions to TEX. Both are still under
development, so we suggest using the latest versions available. This manual is typeset using
pdf-ε-TEX, with ε-TEX version 2.1 and pdfTEX version 14e.
ConTEXt is still under development. Macros are continually improved in terms of functionality and processing speed. Improvements are made within existing macros. For example the
possibility to produce highly interactive pdf documents has altered some low--level functionality of ConTEXt but did not alter the interface. We hope that in due time ConTEXt will be a
reasonable complete document processing system, and we hope this manual shows enough of
its possibilities. This document was processed with version 2000.1.26.
1.8
Top ten
A novice user might be shooed away by the number of ConTEXt commands. Satisfying results
can be obtained by only using the next ten groups of commands:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
1.9
\starttext, \stoptext
\chapter, \section, \title, \subject, \setuphead, \completecontent
\em, \bf, \cap
\startitemize, \stopitemize, \item, \head
\abbreviation, \infull, \completelistofabbreviations
\placefigure, \externalfigure, \useexternalfigures
\placetable, \starttable, \stoptable
\definedescription, \defineenumeration
\index, \completeindex
\setuplayout, \setupfootertexts, \setupheadertexts
Warning
ConTEXt users can define their own commands. These newly defined commands may conflict
with plain TEX or ConTEXt commands. Therefore it is advisable to use capital characters in
your own command definitions.
\def\MyChapter#1%
{\chapter{#1}\index{#1}}
Version numbers — Top ten — Warning
1
19
16
Introduction
This command starts a new chapter and defines an index entry with the same name.
1
Warning
20
21
18
\components
20
\disablemode
26
\doifmode
26
\doifmodeelse
26
\doifnotmode
26
\enablemode
26
\environment
20
\product
20
\project
20
\setupoutput
26
\startcomponent
20
\startenvironment
20
\startlocalenvironment
\startmode
26
\startnotmode
26
\startproduct
20
\startproject
20
\starttext
19
\version
25
20
22
Documents
19
Documents
2.1
Introduction
Why should one use TEX in the first place? Many people start using TEX because they want to
typeset math. Others are charmed by the possibility of separating content and make--up. Yet
another kind of user longs for a programmable system. And let us not forget those users that
go for quality.
When using TEX one does not easily run into capacity problems. Typesetting large documents
with hundreds of pages is typically a job for TEX. If possible, when coding a document one
should look beyond the current document. These days we see documents that were originally
typeset for paper being published in electronic format. And how about making a stripped
version of a 700 page document? A strict separation between content and layout (make--up)
on the one hand and an acceptable redundancy in structure on the other is often enough to
guarantee multiple use of one document source.
2
A system like ConTEXt is meant to make life easier. When coding a document the feeling can
surface that “this or that should be easier”. This feeling often reflects the truth and the answer
to the question can often be found in this manual, although sometimes obscured. It takes some
time to learn to think in structure and content, certainly when one is accustomed to mouse
driven word processors. In this chapter we focus on the structure of collections of documents.
2.2
Start and stop
In a self contained text we use the following commands to mark the begin and end of a text:
\starttext
\stoptext
The first command takes care of a number of initializations and the last command tells TEX
that processing can stop. When this command is left out TEX will display a * (a star) on the
command line at the end of the job. TEX will expect a command, for example \end.
It is advisable to type the document setups before the \start--command, the so called setup
area of the document. In this way a clever word--processor can identify where the text starts,
and therefore can include those setups when it partially processes the document, given of
course that it supports partial processing of files.
Introduction — Start and stop
2
23
20
Documents
In the example below a very simple layout is being used.
\starttext
\subject{Introduction}
\unknown\ America has always been a land set firmly not in the past, but
in the future. On a recent visit to England, I found dozens of wonderful
bookstores chock full of the past --- ancient history, rooms full of it,
and great literature in such monumental stacks as to be overwhelming. In
the usual American bookstore, history might occupy a few bookcases; great
literature has its honoured place, but this year’s paperbacks dominate. The
past is not disregarded, but neither does it loom so large and run so deep
in our blood.
\blank
{\bf Greg Bear, introduction to Tangents (1989).}
\stoptext
The commands \starttext...\stoptext may be nested. Within a text a new text containing
\starttext and \stoptext may be loaded.
2.3
Structure
In this section a structured approach of managing your documents is discussed. For very
simple and self containing documents you can use the following approach:
\environment this
\environment that
\starttext
... some interesting text ...
\stoptext
When you have to typeset very bulky documents it is better to divide your document in logical
components. ConTEXt allows you to setup a project structure to manage your texts. You have
to know that:
• A group of texts that belong together have to be maintained as a whole. We call this a
project.
• Layout characteristics and macros have to be defined at the highest level. For this, the term
environment has been reserved.
2
Start and stop — Structure
24
Documents
21
• Texts that belong together in a project we call products.
• A product can be divided into components, these components can be shared with other
products. Components can be processed individually.
Programmable word processors can be adapted to this structure.
A project, environment , product or component is started and stopped with one of the following
commands:
\startproject ...
...
... \stopproject
file
\startproduct ...
...
... \stopproduct
file
\startenvironment ...
...
file
\startcomponent ...
...
... \stopenvironment
... \stopcomponent
file
Before a \start--\stop--pair commands can be added. When a file is not found on the directory
ConTEXt looks for the files on higher level directories. This enables the user to use one or more
environments for documents that are placed on several subdirectories.
command
project
environment
\project name
\environment name
\product name
(?)
(?)
product
componnent
?
?
(?)
(?)
?
(?)
\componentonderdeel name
(?)
(?)
Table 2.1 The structure commands that can be used in the files that make up a project.
Structure
2
25
22
Documents
To treat products and components as individual documents, the commands in table 2.1 are
used. The commands marked with ? are obligatory and the commands marked with (?) are
optional. The content is typed before the \stop command.
\startproject documents
An example of a project file.
\environment layout
\product
\product
\product
teacher
pupil
curriculum
\stopproject
\startproduct teacher
\project
documents
The product teacher.tex (a teacher manual) can be defined as shown on the opposite site.
\component teacher1
\component teacher2
\stopproduct
\startcomponent teacher2
Here we see the component.
\project documents
\product teacher
... text ...
\stopcomponent
In most cases working with only \starttext and \stoptext in combination with \input or
\enviroment is sufficient. A project structure has advantages when you have to manage a
great number of texts. Although it is more obvious to process products as a whole, it also
enables you to process components independently, given that the stucture is defined properly.
In principal a project file contains only a list of products and environments. If you would
process the project file all products will be placed in one document. This is seldom wanted.
This manual for example has a project structure. Every part is a product and every chapter is
a component. There are several environments that are loaded in the main project file.
Schematically the coherence between files could be displayed as illustrated in figures 2.1, 2.2
and 2.3.
2
Structure
26
Documents
23
project
product
component
environment
environment
environment
Figure 2.1 An example of project structure.
product
component
environment
environment
Figure 2.2 An example with only products.
component
environment
Figure 2.3 An example with only
one component.
It is good practice to put all setups in one environment. In case a component or product has a
different layout you could define localenvironments:
\startlocalenvironment[names]
... setups ...
\stoplocalenvironment
Structure
2
27
24
Documents
A local environment can be typed in an environment file or is a separate file itself. When a
separate file is used the local environment is loaded with:
\localenvironment name
Below you will find an example of a project structure.
\startproject demos
\environment environ
\product
example
file: demos.tex
\stopproject
This file is used to define the products and environments.
\startenvironment environ
file: environ.tex
\setupwhitespace[big]
\setupfootertexts[part][chapter]
\stopenvironment
\startproduct example
In the environment we type the setups that relate to all
the different products. More than one environment or
local environments per product can be used.
file: example.tex
\project demos
\startintroductions
\completecontent
\stopintroductions
The product file contains the structure of the product.
Because indexes and registers can be evoked quite easily
we do not use a separate file.
\startmaintexts
\component first
\component second
\stopmaintexts
\startextroductions
\completeindex
\stopextroductions
\stopproduct
\startcomponent first
file: first.tex
\part{One}
\completecontent
\chapter{First}
..... text .....
In the components of a product we place the textual content, figures etc. It is also possible to request the tables
of content and registers per product.
\chapter{Second}
..... text .....
\completeindex
\stopcomponent
2
Structure
28
Documents
\startcomponent second
25
file: second.tex
\part{Two}
\completecontent
\chapter{Alfa}
..... text .....
The product contains more than one component. We
could have defined a product for each part and a component for each chapter.
\chapter{Beta}
..... text .....
\completeindex
\stopcomponent
The files first.tex, second.tex and example.tex can be processed separately. As long as
there is one product in this project you can also process project.tex. If you process an
environment there will be no pages of output.
2.4
Directories
Many TEX implementations look for a file in all directories and subdirectories when a requested
file is not in the current directory. This is not only time--consuming but may lead to errors
when the wrong file (a file with the same name) is loaded.
For this reason ConTEXt works somewhat differently. A file that is not available on the working
directory is searched for on the parent directories. This means that environments can be placed
in directories that are parents to the products that use them. For example:
/texfiles/course/layout.tex
/texfiles/course/teacher/manual.tex
/texfiles/course/student/learnmat.tex
/texfiles/course/otherdoc/sheets.tex
The last three files (in different subdirectories) all use the same environment layout.tex. So,
instead of putting all files into one directory, one can organize them in subdirectories. When a
project is properly set up, that is, as long as the project file and specific environments can be
found, one can process components and products independently.
2.5
Versions
During the process of document production it is useful to generate a provisional version. This
version shows the references and the typesetting failures. The provisional version is produced
when you type:
Structure — Directories — Versions
2
29
26
Documents
\version[...]
...
final concept temporary
By default the definitive version is produced. In case a preliminary version is produced the word
concept is placed at the bottom of each page. The keyword temporary shows some information
on for instance overfull lines, references, figure placement, and index entries. Most messages
are placed in the margin. In some cases these messages refer to the next pages because TEX is
processing in advance.
2.6
Modes
TEX can directly produce dvi or pdf. A document can be designed for paper and screen, where
the last category often has additional functionality. From one document we can generate different alternatives, both in size and in design. So, from one source several alternatives can be
generated.
Processing a file in practice comes down to launching TEX with the name of the file to be
processed. Imagine that by default we generate dvi output. Switching to pdf is possible by
enabling another output format in the file itself or a configuration file, but both are far from
comfortable.
\setupoutput[pdftex]
for direct pdf output, or for pdf produced from PostScript:
\setupoutput[dvips,acrobat]
The key to the solution of this problem is TEXexec. This Perl script provides ConTEXt with a
command--line--interface. When we want pdf instead of dvi, we can launch TEXexec with:
texexec
--pdf
filename
There are more options, like making A5--booklets; more on these features can be found in the
manual that comes with TEXexec. However, one option deserves more time: modes.
texexec
--pdf
--mode=screen
filename
The idea behind modes is that within a style definition, at each moment one can ask for in what
mode the document is processed. An example of a mode dependant definition is:
\startmode[screen]
\setupinteraction[state=start]
2
Versions — Modes
30
Documents
27
\setupcolors[state=start]
\stopmode
if needed, accompanied by:
\startnotmode[screen]
\setupcolors[state=start,conversion=always]
\stopnotmode
One can also pass more than one mode, separated by comma’s. There are also some low level
mode dependant commands. Given that we are dealing with a screen mode, we can say:
\doifmodeelse {screen} {do this} {and not that}
\doifmode
{screen} {do something}
\doifnotmode {screen} {do something else}
A mode can be activated by saying:
\enablemode[screen]
\disablemode[screen]
Again, we can pass more modes:
\enablemode[paper,A4]
One strength of TEXexec is that one is not forced to enable modes in a file: one can simply
pass a command line switch. Just as with choosing the output format: the less we spoil the
document source with output and mode settings, the more flexible we are.
Modes
2
31
\adaptlayout
30
\definelogo
57
\definepapersize
\moveongrid
42
\placelogos
57
2
29
\placeongrid
42
\setuparrangin
48
\setuplayout
30
\setuppapersize
29
\showframe
30
\showgrid
42
\showlayout
30
\showprint
45
\showsetups
30
Modes
32
Page design
29
While processing a text TEX makes use of the actual \hsize (width) and \vsize (height). As
soon as \vsize is exceeded TEX’s output routine is launched. The output routine deals with
the typeset part — most of the time this will be a page. It takes care of typesetting the headers and footers, the page number, the backgrounds and footnotes, tables and figures. This
rather complex process makes it obvious that the output routine actually makes use of more
dimensions than \hsize and \vsize.
3
Page design
3.1
3.2
Introduction
Paper dimensions
With the command \setuppapersize the dimensions of the paper being used are defined.
There is a difference between the dimensions for typesetting and printing.
\setuppapersize[..,.1.,..][..,.2.,..]
.1.
.2.
A3 A4 A5 A6 letter ... CD name landscape mirrored rotated 90 180 270
A3 A4 A5 A6 letter ... name landscape mirrored rotated negative 90 180 270
The dimensions of
DIN
formats are given in table 3.1.
format
size in mm
format
size in mm
A0
841 × 1189
A5
148 × 210
A1
594 × 841
A6
105 × 148
A2
420 × 594
A7
74 × 105
A3
297 × 420
A8
52 × 74
A4
210 × 297
A9
37 × 52
Table 3.1 Default paper dimensions.
Other formats like B0--B9 and C0--C9 are also available. You could also use: letter, legal,
folio and executive, envelop 9--14, monarch, check, DL and CD.
A new format can be defined by:
Introduction — Paper dimensions
3
33
30
Page design
\definepapersize[...][..,..=..,..]
...
width
height
offset
scale
name
dimension
dimension
dimension
number
For example CD was defined as:
\definepapersize[CD][width=12cm,height=12cm]
After defining CD you can type:
\setuppapersize[CD][A4]
This means that for typesetting ConTEXt will use the newly defined size CD. The resulting,
rather small page, is positioned on an A4 paper size. This second argument is explained in
detail later.
ConTEXt can also be used to produce screen documents. For that purpose a number of screen
formats are available that relate to the screen dimensions. You can use: S3--S6. These generate
screens with widths varying from 300 to 600 pt and a height of 3/4 of the width.
When one chooses another paper format than A4, the default settings are scaled to fit the new
size.
3.3
Page composition
In page composition we distinguish the main text area, headers and footers, and the margins
(top, bottom, right and left). The main text flows inside the main text area. When defining a
layout, one should realize that the header, text and footer areas are treated as a whole. Their
position on the page is determined by the topspace and backspace dimensions (see picture 3.1).
left
The header is located on top of the main text area, and the footer comes after it. Normally, in the
header and footer page numbers and running titles are placed. The left and/or right margin are
often used for structural components like marginal notes and/or chapter and section numbers.
The margins are located in the backspace. Their width has no influence on the location of the
typesetting area on the page.
right
On the contrary, the height of the header and footer influence the height of the text area.
When we talk about the height, we mean the sum of the header, text and footer areas. When
one occasionally hides the header or footer, this guarantees a consistent layout.
3
Paper dimensions — Page composition
34
Page design
31
topspace
header
backspace
text
footer
margin
margin
Figure 3.1 The A4 typesetting area and margins (height = header + text + footer).
Page composition
3
35
32
Page design
\setuplayout[..,..=..,..]
width
height
backspace
topspace
margin
leftmargin
rightmargin
header
footer
top
bottom
leftedge
rightedge
headerdistance
footerdistance
topdistance
bottomdistance
leftmargindistance
rightmargindistance
leftedgedistance
rightedgedistance
horoffset
veroffset
style
marking
location
scale
nx
ny
dx
dy
lines
grid
dimension fit middle
dimension fit middle
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
normal bold slanted boldslanted type cap small... command
on off color
left middle right bottom top singlesided doublesided
dimension
number
number
dimension
dimension
number
yes no
The dimensions and location of all those areas are set up with \setuplayout.
Setting up the left or right margin has no influence on the typesetting area. In paper documents this parameter is only of use when keywords or other text are placed in the margin
(hyphenation).
In paper documents it is sufficient to set up the height, header, footer, top space and back
space. In electronic documents and screen documents however we need some room for navi-
3
Page composition
36
Page design
33
gational tools (see chapter ??). In screen documents it is common practice to use backgrounds.
Therefore it is also possible to set up the space between the text area and the header and footer
on a page, and thereby visually separating those areas.
It is possible to trace the setting by using the following commands:
\showframe[...]
...
text margin edge
The dimensions can be displayed by:
\showsetups
A multi--page combination of both is generated with:
\showlayout
The width of a text is available as \hsize and the height as \vsize. To be on the safe side
one can better use the \dimen--registers \textwidth and \textheight, \makeupwidth and
\makeupheight.
When we are typesetting in one column of text \textwidth and \makeupwidth are identical.
In case of a two columned text the \textwidth is somewhat less than half the makeupwidth.
The \textheight is the \makeupheight minus the height of the header and footer.
variable
meaning
\makeupwidth
width of a text
\makeupheight
height of a text
\textwidth
width of a column
\textheight
height − header − footer
Table 3.2 Some \dimen variables.
There are also other dimensions available like \leftmarginwidth and \footerheight, but be
aware of the fact that you can only use these variables, you can not set them up. The width of
a figure could for instance be specified as width=.9\leftmarginwidth.
Page composition
3
37
34
Page design
In principal documents are typeset automatically. However, in some cases the output would
become much better if a line would be moved to another page. For these situations you can
adjust the layout momentarily (just for that page) by typing:
\adaptlayout[..,...,..][..,..=..,..]
...
height
lines
number
dimension max
number
The use of these commands should be avoided because if you alter your document the adjustment would not be necessary anymore. So, if you use this command, use it at the top of your
document. For example:
\adaptlayout[21,38][height=+.5cm]
The layout of page 21 and 38 will temporarily be 0.5 cm higher though the footer will be
maintained at the same height. The numbers to be specified are the numbers in the output file.
If the layout is disturbed you can reset the layout by:
\setuplayout[reset]
In some commands you can set up the parameters width and height with the value fit. In
that case the width and height are calculated automatically.
On the next pages we will show a number of A5 page layouts centered on an A4. The default
setups (dimensions) are adequate for standard documents like manuals and papers. The setup adjusts automatically to the paper size. Notice the use of middle while setting up the
parameters width and height.
3
Page composition
38
Page design
1
1
alfa
1
2
beta
2
alfa
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
1
35
2
beta
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
1
2
right
2
left
Figure 3.2 The default text--on--page (single sided).
\setuppapersize
\setuplayout
\setuppagenumber
\setupbodyfont
\setupheadertexts
[A5][A4]
[location=middle,marking=on]
[alternative=singlesided]
[lbr,6pt]
[alfa][beta]
\showframe
\starttext
\dorecurse{10}{\input tufte \par \input knuth \par}
\stoptext
Page composition
3
39
36
Page design
1
1
alfa
1
2
beta
alfa
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
1
2
2
beta
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
1
2
right
2
left
Figure 3.3 The default text--on--page (double sided).
\setuppapersize
\setuplayout
\setuppagenumber
\setupbodyfont
\setupheadertexts
[A5][A4]
[location=middle,marking=on]
[alternative=doublesided]
[lbr,6pt]
[alfa][beta]
\showframe
\starttext
\dorecurse{10}{\input tufte \par \input knuth \par}
\stoptext
3
Page composition
40
Page design
1
1
alfa
1
1
beta
1
alfa
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
1
37
1
beta
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the
wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake
their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
1
1
right
1
left
Figure 3.4 The default text--on--page (single–double sided).
\setuppapersize
\setuplayout
\setuppagenumber
\setupbodyfont
\setupheadertexts
[A5][A4]
[location=middle,marking=on]
[alternative={singlesided,doublesided}]
[lbr,6pt]
[alfa][beta][gamma][delta]
\showframe
\starttext
\dorecurse{10}{\input tufte \par \input knuth \par}
\stoptext
Page composition
3
41
38
Page design
1
1
alfa
1
2
beta
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure,
highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize, catalog,
classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review,
dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the
chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and first large--scale user;
the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these
activities, literally hundreds of improvements would never have been made, because I would never have thought of them or
perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design is complete and
fairly robust, the real test begins as people with many different viewpoints undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure,
highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize, catalog,
classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review,
dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the
chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and first large--scale user;
the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these
activities, literally hundreds of improvements would never have been made, because I would never have thought of them or
perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design is complete and
fairly robust, the real test begins as people with many different viewpoints undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure,
highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize, catalog,
classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review,
dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the
chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and first large--scale user;
the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these
activities, literally hundreds of improvements would never have been made, because I would never have thought of them or
perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design is complete and
fairly robust, the real test begins as people with many different viewpoints undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure,
highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize, catalog,
classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review,
dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the
chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and first large--scale user;
the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these
activities, literally hundreds of improvements would never have been made, because I would never have thought of them or
perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design is complete and
1
2
alfa
2
beta
fairly robust, the real test begins as people with many different viewpoints undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure,
highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize, catalog,
classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review,
dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the
chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and first large--scale user;
the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these
activities, literally hundreds of improvements would never have been made, because I would never have thought of them or
perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design is complete and
fairly robust, the real test begins as people with many different viewpoints undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure,
highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize, catalog,
classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review,
dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the
chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and first large--scale user;
the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these
activities, literally hundreds of improvements would never have been made, because I would never have thought of them or
perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design is complete and
fairly robust, the real test begins as people with many different viewpoints undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure,
highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize, catalog,
classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review,
dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the
chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and first large--scale user;
the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these
activities, literally hundreds of improvements would never have been made, because I would never have thought of them or
perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design is complete and
fairly robust, the real test begins as people with many different viewpoints undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure,
highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize, catalog,
classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review,
dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the
chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and first large--scale user;
the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these
activities, literally hundreds of improvements would never have been made, because I would never have thought of them or
perceived why they were important.
1
2
right
2
left
Figure 3.5 Automatically centered text--on--page.
\setuppapersize
\setuplayout
[A5][A4]
[backspace=1cm,width=middle,
topspace=1cm,height=middle,
location=middle,marking=on]
\setuppagenumber [alternative=doublesided]
\setupbodyfont
[lbr,6pt]
\setupheadertexts [alfa][beta]
\showframe
\starttext
\dorecurse{10}{\input tufte \par \input knuth \par}
\stoptext
3
Page composition
42
Page design
1
1
alfa
1
2
beta
2
alfa
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump,
skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review,
dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize,
winnow the wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer
and first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial
design is complete and fairly robust, the real test begins as people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump,
skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review,
dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize,
winnow the wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer
and first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial
design is complete and fairly robust, the real test begins as people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump,
skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review,
dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize,
winnow the wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer
1
39
2
beta
and first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial
design is complete and fairly robust, the real test begins as people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump,
skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review,
dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize,
winnow the wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer
and first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial
design is complete and fairly robust, the real test begins as people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump,
skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review,
dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize,
winnow the wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer
and first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial
design is complete and fairly robust, the real test begins as people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
1
2
right
2
left
Figure 3.6 A non symmetric text--on--page.
\setuppapersize
\setuplayout
[A5][A4]
[backspace=1cm,width=.7\paperwidth,
topspace=1cm,height=.7\paperheight,
location=middle,marking=on]
\setuppagenumber [alternative=doublesided]
\setupbodyfont
[lbr,6pt]
\setupheadertexts [alfa][beta]
\showframe
\starttext
\dorecurse{10}{\input tufte \par \input knuth \par}
\stoptext
Page composition
3
43
40
Page design
1
1
alfa
1
2
beta
alfa
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip
through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat
from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated
fully in all these activities, literally hundreds of improvements would never have been made, because I
would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake their
own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip
through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat
from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated
fully in all these activities, literally hundreds of improvements would never have been made, because I
would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake their
own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip
through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat
from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated
fully in all these activities, literally hundreds of improvements would never have been made, because I
would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake their
own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip
through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat
from the chaff and separate the sheep from the goats.
1
2
2
beta
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated
fully in all these activities, literally hundreds of improvements would never have been made, because I
would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake their
own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip
through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat
from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated
fully in all these activities, literally hundreds of improvements would never have been made, because I
would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake their
own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip
through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat
from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated
fully in all these activities, literally hundreds of improvements would never have been made, because I
would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake their
own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip
through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat
from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be the implementer and
first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated
fully in all these activities, literally hundreds of improvements would never have been made, because I
would never have thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design
is complete and fairly robust, the real test begins as people with many different viewpoints undertake their
1
2
right
2
left
Figure 3.7 A text without footerheight.
\setuppapersize
\setuplayout
[A5][A4]
[backspace=2cm,width=middle,
footer=0cm,margin=1cm,
location=middle,marking=on]
\setuppagenumber [alternative=singlesided]
\setupbodyfont
[lbr,6pt]
\setupheadertexts [alfa][beta]
\showframe
\starttext
\dorecurse{10}{\input tufte \par \input knuth \par}
\stoptext
3
Page composition
44
Page design
1
1
alfa
1
We thrive in information--thick worlds
because of our marvelous and everyday capacity to select, edit, single out,
structure, highlight, group, pair, merge,
harmonize, synthesize, focus, organize,
condense, reduce, boil down, choose,
categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen,
pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth,
chunk, average, approximate, cluster,
aggregate, outline, summarize, itemize,
review, dip into, flip through, browse,
glance into, leaf through, skim, refine,
enumerate, glean, synopsize, winnow
the wheat from the chaff and separate
the sheep from the goats.
Thus, I came to the conclusion that the
designer of a new system must not only
be the implementer and first large--scale
user; the designer should also write the
first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never
have been made, because I would never
have thought of them or perceived why
they were important.
But a system cannot be successful if it is
too strongly influenced by a single person. Once the initial design is complete
and fairly robust, the real test begins as
people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds
because of our marvelous and everyday capacity to select, edit, single out,
structure, highlight, group, pair, merge,
harmonize, synthesize, focus, organize,
condense, reduce, boil down, choose,
categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen,
pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth,
chunk, average, approximate, cluster,
aggregate, outline, summarize, itemize,
review, dip into, flip through, browse,
glance into, leaf through, skim, refine,
enumerate, glean, synopsize, winnow
the wheat from the chaff and separate
the sheep from the goats.
Thus, I came to the conclusion that the
2
beta
designer of a new system must not only
be the implementer and first large--scale
user; the designer should also write the
first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never
have been made, because I would never
have thought of them or perceived why
they were important.
But a system cannot be successful if it is
too strongly influenced by a single person. Once the initial design is complete
and fairly robust, the real test begins as
people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds
because of our marvelous and everyday capacity to select, edit, single out,
structure, highlight, group, pair, merge,
harmonize, synthesize, focus, organize,
condense, reduce, boil down, choose,
categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen,
pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth,
chunk, average, approximate, cluster,
aggregate, outline, summarize, itemize,
review, dip into, flip through, browse,
glance into, leaf through, skim, refine,
enumerate, glean, synopsize, winnow
the wheat from the chaff and separate
the sheep from the goats.
Thus, I came to the conclusion that the
designer of a new system must not only
be the implementer and first large--scale
user; the designer should also write the
first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never
have been made, because I would never
have thought of them or perceived why
they were important.
But a system cannot be successful if it is
too strongly influenced by a single person. Once the initial design is complete
and fairly robust, the real test begins as
people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds
1
because of our marvelous and everyday capacity to select, edit, single out,
structure, highlight, group, pair, merge,
harmonize, synthesize, focus, organize,
condense, reduce, boil down, choose,
categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen,
pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth,
chunk, average, approximate, cluster,
aggregate, outline, summarize, itemize,
review, dip into, flip through, browse,
glance into, leaf through, skim, refine,
enumerate, glean, synopsize, winnow
the wheat from the chaff and separate
the sheep from the goats.
Thus, I came to the conclusion that the
designer of a new system must not only
be the implementer and first large--scale
user; the designer should also write the
first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never
have been made, because I would never
have thought of them or perceived why
they were important.
But a system cannot be successful if it is
too strongly influenced by a single person. Once the initial design is complete
and fairly robust, the real test begins as
people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds
because of our marvelous and everyday capacity to select, edit, single out,
structure, highlight, group, pair, merge,
harmonize, synthesize, focus, organize,
condense, reduce, boil down, choose,
categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen,
pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth,
chunk, average, approximate, cluster,
aggregate, outline, summarize, itemize,
review, dip into, flip through, browse,
glance into, leaf through, skim, refine,
enumerate, glean, synopsize, winnow
the wheat from the chaff and separate
the sheep from the goats.
Thus, I came to the conclusion that the
designer of a new system must not only
41
2
alfa
be the implementer and first large--scale
user; the designer should also write the
first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never
have been made, because I would never
have thought of them or perceived why
they were important.
But a system cannot be successful if it is
too strongly influenced by a single person. Once the initial design is complete
and fairly robust, the real test begins as
people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds
because of our marvelous and everyday capacity to select, edit, single out,
structure, highlight, group, pair, merge,
harmonize, synthesize, focus, organize,
condense, reduce, boil down, choose,
categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen,
pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth,
chunk, average, approximate, cluster,
aggregate, outline, summarize, itemize,
review, dip into, flip through, browse,
glance into, leaf through, skim, refine,
enumerate, glean, synopsize, winnow
the wheat from the chaff and separate
the sheep from the goats.
Thus, I came to the conclusion that the
designer of a new system must not only
be the implementer and first large--scale
user; the designer should also write the
first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never
have been made, because I would never
have thought of them or perceived why
they were important.
But a system cannot be successful if it is
too strongly influenced by a single person. Once the initial design is complete
and fairly robust, the real test begins as
people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds
because of our marvelous and every-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
1
2
day capacity to select, edit, single out,
structure, highlight, group, pair, merge,
harmonize, synthesize, focus, organize,
condense, reduce, boil down, choose,
categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen,
pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth,
chunk, average, approximate, cluster,
aggregate, outline, summarize, itemize,
review, dip into, flip through, browse,
glance into, leaf through, skim, refine,
enumerate, glean, synopsize, winnow
the wheat from the chaff and separate
the sheep from the goats.
Thus, I came to the conclusion that the
designer of a new system must not only
be the implementer and first large--scale
user; the designer should also write the
first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never
have been made, because I would never
have thought of them or perceived why
they were important.
But a system cannot be successful if it is
too strongly influenced by a single person. Once the initial design is complete
and fairly robust, the real test begins as
people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds
because of our marvelous and everyday capacity to select, edit, single out,
structure, highlight, group, pair, merge,
harmonize, synthesize, focus, organize,
condense, reduce, boil down, choose,
categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen,
pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth,
chunk, average, approximate, cluster,
aggregate, outline, summarize, itemize,
review, dip into, flip through, browse,
glance into, leaf through, skim, refine,
enumerate, glean, synopsize, winnow
the wheat from the chaff and separate
the sheep from the goats.
Thus, I came to the conclusion that the
designer of a new system must not only
be the implementer and first large--scale
beta
user; the designer should also write the
first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never
have been made, because I would never
have thought of them or perceived why
they were important.
But a system cannot be successful if it is
too strongly influenced by a single person. Once the initial design is complete
and fairly robust, the real test begins as
people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds
because of our marvelous and everyday capacity to select, edit, single out,
structure, highlight, group, pair, merge,
harmonize, synthesize, focus, organize,
condense, reduce, boil down, choose,
categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen,
pigeonhole, pick over, sort, integrate,
blend, inspect, filter, lump, skip, smooth,
chunk, average, approximate, cluster,
aggregate, outline, summarize, itemize,
review, dip into, flip through, browse,
glance into, leaf through, skim, refine,
enumerate, glean, synopsize, winnow
the wheat from the chaff and separate
the sheep from the goats.
Thus, I came to the conclusion that the
designer of a new system must not only
be the implementer and first large--scale
user; the designer should also write the
first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never
have been made, because I would never
have thought of them or perceived why
they were important.
But a system cannot be successful if it is
too strongly influenced by a single person. Once the initial design is complete
and fairly robust, the real test begins as
people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds
because of our marvelous and everyday capacity to select, edit, single out,
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
2
right
2
left
Figure 3.8 A text placed on a grid.
\setuppapersize
\setuplayout
\setuppagenumber
\setupbodyfont
\setupheadertexts
[A5][A4]
[location=middle,marking=on]
[alternative=doublesided]
[lbr,6pt]
[alfa][beta]
\setuplayout
[headspace=1cm,lines=56,header=1cm,footer=0cm,
backspace=1cm,width=middle,grid=yes]
\showframe \showgrid
\starttext
\startcolumns[n=3]
\dorecurse{10}{\input tufte \par \input knuth \par}
\stopcolumns
\stoptext
Page composition
3
45
42
Page design
3.4
*14.83998pt0.0pt0.0pt001
Grids
1
2
There are many ways to align text on a page. Look at the example below and notice the vertical
alignment of the words and the white space between the words on the mini pages.
alpha
alpha
alpha
beta
beta
beta
gamma
gamma
gamma
alpha
beta
gamma
3
4
5
6
7
8
9
*14.83998pt59.35992pt0.0pt002
10
11
The first three alternatives result in an undesired output. The fourth alternative will lead
to pages with unequal length. So we rather make the white space between the lines a little
stretchable. 1
alpha
beta
gamma
delta
alpha
beta
gamma
alpha
beta
alpha
beta
gamma
gamma
delta
12
13
14
15
16
17
18
19
20
*14.83998pt59.35992pt0.0pt003
21
A stretchable line spacing has the disadvantage that lines of two pages or two columns
that are displayed close to each other, will seldom align. This is very disturbing for a reader. 2
grid. The means to do this in TEX are very limited but ConTEXt has some features to support grid typesetting. 3
23
24
25
26
2
In those situations we prefer to typeset on a
22
3
Here! Another footnote.
Finally, the last footnote!
27
28
29
During typesetting on a grid the heads, figures, formulas and the running text are set on a fixed
line spacing. If a typographical component for any reason is not placed on the grid one can
snap this component to the grid with:
30
31
32
33
\placeongrid{\framed{This is like a snapshot.}}
34
35
1
3
Hey,
this. A footnote!
Thiswatch
will result
in:
36
Grids
46
Page design
43
1
0.0pt22.25996pt7.41998pt++4
This is like a snapshot.
2
3
4
This mechanism can be influenced with an argument:
5
6
\placeongrid[bottom]{\framed{Do you like the snapshot?}}
7
8
Now an empty line will appear below the framed text. Other parameters are: top and both.
The last parameter divides the linespace between over and below the framed text.
9
10
11
0.0pt22.25996pt7.41998pt++5
Now the snapshot looks better.
12
13
14
These examples don’t show pretty typesetting. The reason is that \framed has no depth because TEX handles spacing before and after a line in a different way than text. ConTEXt has a
solution to this:
15
16
17
18
\startlinecorrection
\framed{This is something for hotshots.}
\stoplinecorrection
19
20
21
22
The command \startlinecorrection tries to typeset the lines as good as possible and takes
the use of grid in account.
23
24
25
26
This is something for hotshots.
*14.83998pt14.83998pt0.0pt006
27
28
Because line correction takes care of the grid we have to use yet another command to stretch
the framed text:
29
30
31
\moveongrid[both]
\startlinecorrection
\framed{Anyhow it is good to know how this works.}
\stoplinecorrection
32
33
34
35
36
Grids
3
47
44
Page design
As you can see this results in somewhat more space:
1
2
3
Anyhow it is good to know how this works.
4
14.83998pt22.25996pt7.41998pt++7
5
6
For test purposes one can display the grid with the command \showgrid. So grid related
commands are:
7
8
9
10
\placeongrid[.1.]{.2.}
11
.1.
12
see p 44: \moveongrid
13
*14.83998pt44.51994pt0.0pt008
14
15
\moveongrid[...]
...
16
top both bottom
17
18
*14.83998pt44.51994pt0.0pt009
19
20
\showgrid
21
*14.83998pt29.67996pt0.0pt0010
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
3
Grids
48
Page design
3.5
45
Printing
In an earlier section we used page and paper dimensions. In this section we will discuss how
these two can be manipulated to yield a good output on paper.
In figure 3.10 and 3.11 we see some alternatives to manipulate the page composition by means
of \setuppapersize and\setuplayout. So it is possible to put a page in a corner or in the
middle of the paper, to copy a page and to use cutting marks.
When the parameter papersize is set to landscape width and height are interchanged. This is
not the same as rotation! Rotation is done by typing 90, 180 and 270 in the first argument of
\setuppapersize.
\setuppapersize[A5,landscape][A4]
These examples don’t show that we can correct for duplex printing. For example when we type:
\setuppapersize[A5][A4]
\setuplayout[location=middle,marking=on]
the front and back side will be placed in the middle of the paper. The markings enable you to
cut the paper at the correct size. If we only want to cut twice, we type:
\setupppapersize[A5][A4]
\setuplayout[location=duplex]
This has the same meaning as {duplex,left}. At this setup ConTEXt will automatically move
front and back side to the correct corner. In figure 3.9 we show both alternatives.
right
left
right
left
Figure 3.9 Positioning the page on paper for cutting.
Rotating, mirroring, scaling, duplicating and placing pages on paper are independent operations. By combining these operations the desired effects can be reached. Rotating and mirroring and page and paper size are set up at the same time. The other operations are set up with
\setuplayout.
Grids — Printing
3
49
46
Page design
50
50
ABC
DEF
50
50
50
50
50
50
ABC
DEF
50 50
ABC
DEF
50
50
location=middle
50
50
ABC
DEF
ABC
DEF
50
50
50
50
50
marking=on
location=middle
50
ABC
DEF
50 50
50
marking=on
location=middle
nx=2
50
ABC
DEF
50
50
50
50
50
50
50
ABC
DEF
50
location=left
50
50 50
ABC
DEF
50
50
location=right
50
ABC
DEF
50 50
50
50
50
50
50
ABC
DEF
50
50
50 50
ABC
DEF
50
50
50
50
50
50
50
50
50
ABC
DEF
50 50
50 50
ABC
DEF
50
nx=2,ny=1
50
nx=1,ny=2
50
ABC
DEF
50
nx=2,ny=2
50
50
ABC
DEF
50
50
50
50
horoffset=.5cm
veroffset=.5cm
50
50
ABC
DEF
50 50
50
nx=2,ny=2
plaats=middle
50
50
ABC
DEF
ABC
DEF
50
50
ABC
DEF
50 50
50 50
ABC
DEF
50
50
50
50
ABC
DEF
50 50
50 50
ABC
DEF
50
ABC
DEF
location=left,bottom location=right,bottom
50
ABC
DEF
50
50
50
50
50
scale=1.5
scale=0.8
Figure 3.10 Manipulating the page composition with \setuplayout.
3
Printing
50
Page design
50
50
50
47
50
50
ABC
DEF
50
50
ABC
DEF
50
ABC
DEF
50
landscape
landscape
landscape
50
50
50
50
90
90
90
90
50
50
50
50
ABC
DEF
50
50
50
ABC
DEF
50
05
50
50
05
05
50
CBA
FED
CBA
FED
05
05
50
180
180
180
05
50
ABC
DEF
180
05
50
50
50
ABC
DEF
ABC
DEF
ABC
DEF
50
50
50
landscape
50
50
50
50
50
50
ABC
DEF
05
mirrored
mirrored
50
50
mirrored
mirrored
Figure 3.11 Manipulating the page composition with \setuppapersize.
Printing
3
51
48
Page design
\showprint[..,.1.,..][..,.2.,..][..,..=..,..]
..=..
..=..
..=..
see p 29: \setuppapersize
see p 29: \setuppapersize
see p 32: \setuplayout
You can use \showprint to get an idea of how your print will look. However, it is just a
representation of the real page as is shown in the examples above.
\showprint[mirrored][90][location=middle]
3.6
Arranging pages
By means of \setuplayout one can arrange pages on a sheet of paper. A special arrangement
for example is that for booklets.
\setuparranging[..,...,..]
...
disable 2*16 2*8 2*4 2*2 2UP 2DOWN mirrored rotated doublesided negative 90 180 270
We will show some page arrangements on the next pages. If you want to understand how it
really works you should try this yourself one day.
The next examples show the cooperation of the commands \setuppapersize, \setuplayout
and \setuparranging. Notice how these tests were generated.
3
Printing — Arranging pages
52
Page design
8
49
9
12
5
6
11
10
7
16
13
4
3
14
15
2
1
Figure 3.12 The 2*8 arrangement.
4
5
3
6
1
8
7
2
Figure 3.13 The 2*4 arrangement.
1
4
3
2
Figure 3.14 The 2*2 arrangement.
1
8
2
7
3
6
4
5
Figure 3.15 The 2UP arrangement.
8
7
6
5
1
2
3
4
Figure 3.16 The 2DOWN arrangement.
Arranging pages
3
53
16
9
influenced by a single person. Once the initial design is
complete and fairly robust, the real test begins as people with many different viewpoints undertake their own
experiments.
We thrive in information--thick worlds because of our
marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce,
boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate,
distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk,
average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse,
glance into, leaf through, skim, refine, enumerate, glean,
synopsize, winnow the wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a
new system must not only be the implementer and first
large--scale user; the designer should also write the first
user manual.
The separation of any of these four components would
have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improve-
influenced by a single person. Once the initial design is
complete and fairly robust, the real test begins as people with many different viewpoints undertake their own
experiments.
We thrive in information--thick worlds because of our
marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce,
boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate,
distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk,
average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse,
glance into, leaf through, skim, refine, enumerate, glean,
synopsize, winnow the wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a
new system must not only be the implementer and first
large--scale user; the designer should also write the first
user manual.
The separation of any of these four components would
have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improve-
1
We thrive in information--thick worlds because of our
marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce,
boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate,
distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk,
average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse,
glance into, leaf through, skim, refine, enumerate, glean,
synopsize, winnow the wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a
new system must not only be the implementer and first
large--scale user; the designer should also write the first
user manual.
The separation of any of these four components would
have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would
never have thought of them or perceived why they were
important.
But a system cannot be successful if it is too strongly
8
13
12
rate the sheep from the goats.
Thus, I came to the conclusion that the designer of a
new system must not only be the implementer and first
large--scale user; the designer should also write the first
user manual.
The separation of any of these four components would
have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would
never have thought of them or perceived why they were
important.
But a system cannot be successful if it is too strongly
influenced by a single person. Once the initial design is
complete and fairly robust, the real test begins as people with many different viewpoints undertake their own
experiments.
We thrive in information--thick worlds because of our
marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce,
boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate,
distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk,
average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse,
glance into, leaf through, skim, refine, enumerate, glean,
synopsize, winnow the wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a
new system must not only be the implementer and first
large--scale user; the designer should also write the first
user manual.
The separation of any of these four components would
have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would
never have thought of them or perceived why they were
important.
But a system cannot be successful if it is too strongly
influenced by a single person. Once the initial design is
complete and fairly robust, the real test begins as people with many different viewpoints undertake their own
experiments.
We thrive in information--thick worlds because of our
marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce,
We thrive in information--thick worlds because of our
marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce,
boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate,
distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk,
average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse,
glance into, leaf through, skim, refine, enumerate, glean,
synopsize, winnow the wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a
new system must not only be the implementer and first
large--scale user; the designer should also write the first
user manual.
The separation of any of these four components would
have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would
never have thought of them or perceived why they were
important.
But a system cannot be successful if it is too strongly
4
5
rate the sheep from the goats.
Thus, I came to the conclusion that the designer of a
new system must not only be the implementer and first
large--scale user; the designer should also write the first
user manual.
The separation of any of these four components would
have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would
never have thought of them or perceived why they were
important.
But a system cannot be successful if it is too strongly
influenced by a single person. Once the initial design is
complete and fairly robust, the real test begins as people with many different viewpoints undertake their own
experiments.
We thrive in information--thick worlds because of our
marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce,
boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate,
distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk,
user manual.
The separation of any of these four components would
have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would
never have thought of them or perceived why they were
important.
But a system cannot be successful if it is too strongly
influenced by a single person. Once the initial design is
complete and fairly robust, the real test begins as people with many different viewpoints undertake their own
experiments.
We thrive in information--thick worlds because of our
marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce,
boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate,
distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk,
average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse,
glance into, leaf through, skim, refine, enumerate, glean,
synopsize, winnow the wheat from the chaff and sepa-
[A7][A3]
[2*8,rotated,doublesided]
[alternative=doublesided]
[margin=0pt,width=fit]
[text][text][background=screen]
[state=start]
[location=middle,marking=color]
[tolerant]
[lbr,6pt]
\setuppapersize
\setuparranging
\setuppagenumber
\setuplayout
\setupbackgrounds
\setupcolors
\setuplayout
\setuptolerance
\setupbodyfont
0.00
0.10
0.20
0.30
0.40
0.50
0.60
0.70
0.75
0.80
0.85
0.90
0.95
1.00
B
Y
G
M
0.05
0.05
1.00
1.00
0.50
0.50
0.05
0.05
0.75
0.75
0.25
0.25
0.75
0.75
0.25
0.25
0.95
0.95
0.50
0.50
1
1
0.25
0.25
1
1
0.75
0.75
R
C
0.95
0.95
1.00
1.00
1.00
1.00
K
B
M
R
Y
G
C
.5 K
.5 Y
.5 M
.5 C
Arranging pages
3
Page design
50
0.05
0.05
0.50
0.50
0.95
0.95
Figure 3.17 Arranging: 16.
\starttext
\dorecurse{30}{\input tufte \par \input knuth \par}
\stoptext
54
51
01
dluow I esuaceb ,edam neeb evah reven dluow stnem
erew yeht yhw deviecrep ro meht fo thguoht evah reven
.tnatropmi
ylgnorts oot si ti fi lufsseccus eb tonnac metsys a tuB
si ngised laitini eht ecnO .nosrep elgnis a yb decneuflni
-oep sa snigeb tset laer eht ,tsubor ylriaf dna etelpmoc
nwo rieht ekatrednu stniopweiv tnereffid ynam htiw elp
.stnemirepxe
ruo fo esuaceb sdlrow kciht--noitamrofni ni evirht eW
-nis ,tide ,tceles ot yticapac yadyreve dna suolevram
-rah ,egrem ,riap ,puorg ,thgilhgih ,erutcurts ,tuo elg
,ecuder ,esnednoc ,ezinagro ,sucof ,ezisehtnys ,ezinom
-ba ,tsil ,yfissalc ,golatac ,ezirogetac ,esoohc ,nwod liob
,etanimircsid ,etalosi ,ezilaedi ,otni kool ,nacs ,tcarts
-etni ,tros ,revo kcip ,elohnoegip ,neercs ,hsiugnitsid
,knuhc ,htooms ,piks ,pmul ,retlfi ,tcepsni ,dnelb ,etarg
-mus ,eniltuo ,etagergga ,retsulc ,etamixorppa ,egareva
,esworb ,hguorht pifl ,otni pid ,weiver ,ezimeti ,eziram
,naelg ,etaremune ,enfier ,miks ,hguorht fael ,otni ecnalg
-apes dna ffahc eht morf taehw eht wonniw ,ezisponys
.staog eht morf peehs eht etar
a fo rengised eht taht noisulcnoc eht ot emac I ,suhT
tsrfi dna retnemelpmi eht eb ylno ton tsum metsys wen
tsrfi eht etirw osla dluohs rengised eht ;resu elacs--egral
ruo fo esuaceb sdlrow kciht--noitamrofni ni evirht eW
-nis ,tide ,tceles ot yticapac yadyreve dna suolevram
-rah ,egrem ,riap ,puorg ,thgilhgih ,erutcurts ,tuo elg
,ecuder ,esnednoc ,ezinagro ,sucof ,ezisehtnys ,ezinom
-ba ,tsil ,yfissalc ,golatac ,ezirogetac ,esoohc ,nwod liob
,etanimircsid ,etalosi ,ezilaedi ,otni kool ,nacs ,tcarts
-etni ,tros ,revo kcip ,elohnoegip ,neercs ,hsiugnitsid
,knuhc ,htooms ,piks ,pmul ,retlfi ,tcepsni ,dnelb ,etarg
-mus ,eniltuo ,etagergga ,retsulc ,etamixorppa ,egareva
,esworb ,hguorht pifl ,otni pid ,weiver ,ezimeti ,eziram
,naelg ,etaremune ,enfier ,miks ,hguorht fael ,otni ecnalg
-apes dna ffahc eht morf taehw eht wonniw ,ezisponys
.staog eht morf peehs eht etar
a fo rengised eht taht noisulcnoc eht ot emac I ,suhT
tsrfi dna retnemelpmi eht eb ylno ton tsum metsys wen
tsrfi eht etirw osla dluohs rengised eht ;resu elacs--egral
.launam resu
dluow stnenopmoc ruof eseht fo yna fo noitarapes ehT
-luf detapicitrap ton dah I fI .yltnacfiingis XET truh evah
-evorpmi fo sderdnuh yllaretil ,seitivitca eseht lla ni yl
dluow I esuaceb ,edam neeb evah reven dluow stnem
erew yeht yhw deviecrep ro meht fo thguoht evah reven
.tnatropmi
ylgnorts oot si ti fi lufsseccus eb tonnac metsys a tuB
2
si ngised laitini eht ecnO .nosrep elgnis a yb decneuflni
-oep sa snigeb tset laer eht ,tsubor ylriaf dna etelpmoc
nwo rieht ekatrednu stniopweiv tnereffid ynam htiw elp
.stnemirepxe
ruo fo esuaceb sdlrow kciht--noitamrofni ni evirht eW
-nis ,tide ,tceles ot yticapac yadyreve dna suolevram
-rah ,egrem ,riap ,puorg ,thgilhgih ,erutcurts ,tuo elg
,ecuder ,esnednoc ,ezinagro ,sucof ,ezisehtnys ,ezinom
-ba ,tsil ,yfissalc ,golatac ,ezirogetac ,esoohc ,nwod liob
,etanimircsid ,etalosi ,ezilaedi ,otni kool ,nacs ,tcarts
- e t ni , t r o s , r e v o k c i p , e l o h n o e g i p , n e e r c s , h s i u g n i t s i d
,knuhc ,htooms ,piks ,pmul ,retlfi ,tcepsni ,dnelb ,etarg
-mus ,eniltuo ,etagergga ,retsulc ,etamixorppa ,egareva
, e s w o r b , h g u o r h t p i fl , o t ni p i d , w e i v e r , e z i m e t i , e z i r a m
,naelg ,etaremune ,enfier ,miks ,hguorht fael ,otni ecnalg
-apes dna ffahc eht morf taehw eht wonniw ,ezisponys
.staog eht morf peehs eht etar
a fo rengised eht taht noisulcnoc eht ot emac I ,suhT
tsrfi dna retnemelpmi eht eb ylno ton tsum metsys wen
tsrfi eht etirw osla dluohs rengised eht ;resu elacs--egral
.launam resu
dluow stnenopmoc ruof eseht fo yna fo noitarapes ehT
-luf detapicitrap ton dah I fI .yltnacfiingis XET truh evah
-evorpmi fo sderdnuh yllaretil ,seitivitca eseht lla ni yl
7
41
11
.launam resu
dluow stnenopmoc ruof eseht fo yna fo noitarapes ehT
-luf detapicitrap ton dah I fI .yltnacfiingis XET truh evah
-evorpmi fo sderdnuh yllaretil ,seitivitca eseht lla ni yl
dluow I esuaceb ,edam neeb evah reven dluow stnem
erew yeht yhw deviecrep ro meht fo thguoht evah reven
.tnatropmi
ylgnorts oot si ti fi lufsseccus eb tonnac metsys a tuB
si ngised laitini eht ecnO .nosrep elgnis a yb decneuflni
-oep sa snigeb tset laer eht ,tsubor ylriaf dna etelpmoc
nwo rieht ekatrednu stniopweiv tnereffid ynam htiw elp
.stnemirepxe
ruo fo esuaceb sdlrow kciht--noitamrofni ni evirht eW
-nis ,tide ,tceles ot yticapac yadyreve dna suolevram
-rah ,egrem ,riap ,puorg ,thgilhgih ,erutcurts ,tuo elg
,ecuder ,esnednoc ,ezinagro ,sucof ,ezisehtnys ,ezinom
-ba ,tsil ,yfissalc ,golatac ,ezirogetac ,esoohc ,nwod liob
,etanimircsid ,etalosi ,ezilaedi ,otni kool ,nacs ,tcarts
-etni ,tros ,revo kcip ,elohnoegip ,neercs ,hsiugnitsid
,knuhc ,htooms ,piks ,pmul ,retlfi ,tcepsni ,dnelb ,etarg
-mus ,eniltuo ,etagergga ,retsulc ,etamixorppa ,egareva
,esworb ,hguorht pifl ,otni pid ,weiver ,ezimeti ,eziram
,naelg ,etaremune ,enfier ,miks ,hguorht fael ,otni ecnalg
-apes dna ffahc eht morf taehw eht wonniw ,ezisponys
-ba ,tsil ,yfissalc ,golatac ,ezirogetac ,esoohc ,nwod liob
,etanimircsid ,etalosi ,ezilaedi ,otni kool ,nacs ,tcarts
-etni ,tros ,revo kcip ,elohnoegip ,neercs ,hsiugnitsid
,knuhc ,htooms ,piks ,pmul ,retlfi ,tcepsni ,dnelb ,etarg
-mus ,eniltuo ,etagergga ,retsulc ,etamixorppa ,egareva
,esworb ,hguorht pifl ,otni pid ,weiver ,ezimeti ,eziram
,naelg ,etaremune ,enfier ,miks ,hguorht fael ,otni ecnalg
-apes dna ffahc eht morf taehw eht wonniw ,ezisponys
.staog eht morf peehs eht etar
a fo rengised eht taht noisulcnoc eht ot emac I ,suhT
tsrfi dna retnemelpmi eht eb ylno ton tsum metsys wen
tsrfi eht etirw osla dluohs rengised eht ;resu elacs--egral
.launam resu
dluow stnenopmoc ruof eseht fo yna fo noitarapes ehT
-luf detapicitrap ton dah I fI .yltnacfiingis XET truh evah
-evorpmi fo sderdnuh yllaretil ,seitivitca eseht lla ni yl
dluow I esuaceb ,edam neeb evah reven dluow stnem
erew yeht yhw deviecrep ro meht fo thguoht evah reven
.tnatropmi
ylgnorts oot si ti fi lufsseccus eb tonnac metsys a tuB
si ngised laitini eht ecnO .nosrep elgnis a yb decneuflni
-oep sa snigeb tset laer eht ,tsubor ylriaf dna etelpmoc
nwo rieht ekatrednu stniopweiv tnereffid ynam htiw elp
.stnemirepxe
-ba ,tsil ,yfissalc ,golatac ,ezirogetac ,esoohc ,nwod liob
,etanimircsid ,etalosi ,ezilaedi ,otni kool ,nacs ,tcarts
-etni ,tros ,revo kcip ,elohnoegip ,neercs ,hsiugnitsid
,knuhc ,htooms ,piks ,pmul ,retlfi ,tcepsni ,dnelb ,etarg
-mus ,eniltuo ,etagergga ,retsulc ,etamixorppa ,egareva
, e s w o r b , h g u o r h t p i fl , o t ni p i d , w e i v e r , e z i m e t i , e z i r a m
,naelg ,etaremune ,enfier ,miks ,hguorht fael ,otni ecnalg
-apes dna ffahc eht morf taehw eht wonniw ,ezisponys
.staog eht morf peehs eht etar
a fo rengised eht taht noisulcnoc eht ot emac I ,suhT
tsrfi dna retnemelpmi eht eb ylno ton tsum metsys wen
tsrfi eht etirw osla dluohs rengised eht ;resu elacs--egral
.launam resu
dluow stnenopmoc ruof eseht fo yna fo noitarapes ehT
-luf detapicitrap ton dah I fI .yltnacfiingis XET truh evah
-evorpmi fo sderdnuh yllaretil ,seitivitca eseht lla ni yl
dluow I esuaceb ,edam neeb evah reven dluow stnem
erew yeht yhw deviecrep ro meht fo thguoht evah reven
.tnatropmi
ylgnorts oot si ti fi lufsseccus eb tonnac metsys a tuB
si ngised laitini eht ecnO .nosrep elgnis a yb decneuflni
-oep sa snigeb tset laer eht ,tsubor ylriaf dna etelpmoc
nwo rieht ekatrednu stniopweiv tnereffid ynam htiw elp
.stnemirepxe
50.0
50.0
05.0
05.0
59.0
59.0
2
2
3
Arranging pages
3
6
-mus ,eniltuo ,etagergga ,retsulc ,etamixorppa ,egareva
,esworb ,hguorht pifl ,otni pid ,weiver ,ezimeti ,eziram
,naelg ,etaremune ,enfier ,miks ,hguorht fael ,otni ecnalg
-apes dna ffahc eht morf taehw eht wonniw ,ezisponys
.staog eht morf peehs eht etar
a fo rengised eht taht noisulcnoc eht ot emac I ,suhT
tsrfi dna retnemelpmi eht eb ylno ton tsum metsys wen
tsrfi eht etirw osla dluohs rengised eht ;resu elacs--egral
.launam resu
dluow stnenopmoc ruof eseht fo yna fo noitarapes ehT
-luf detapicitrap ton dah I fI .yltnacfiingis XET truh evah
- e v o r p m i f o s d e r d n u h y l l a r e t i l , s e i t i v i t c a e s e ht l l a n i y l
dluow I esuaceb ,edam neeb evah reven dluow stnem
erew yeht yhw deviecrep ro meht fo thguoht evah reven
.tnatropmi
ylgnorts oot si ti fi lufsseccus eb tonnac metsys a tuB
si ngised laitini eht ecnO .nosrep elgnis a yb decneuflni
-oep sa snigeb tset laer eht ,tsubor ylriaf dna etelpmoc
nwo rieht ekatrednu stniopweiv tnereffid ynam htiw elp
.stnemirepxe
ruo fo esuaceb sdlrow kciht--noitamrofni ni evirht eW
-nis ,tide ,tceles ot yticapac yadyreve dna suolevram
-rah ,egrem ,riap ,puorg ,thgilhgih ,erutcurts ,tuo elg
,ecuder ,esnednoc ,ezinagro ,sucof ,ezisehtnys ,ezinom
dluow I esuaceb ,edam neeb evah reven dluow stnem
erew yeht yhw deviecrep ro meht fo thguoht evah reven
.tnatropmi
ylgnorts oot si ti fi lufsseccus eb tonnac metsys a tuB
si ngised laitini eht ecnO .nosrep elgnis a yb decneuflni
-oep sa snigeb tset laer eht ,tsubor ylriaf dna etelpmoc
nwo rieht ekatrednu stniopweiv tnereffid ynam htiw elp
.stnemirepxe
ruo fo esuaceb sdlrow kciht--noitamrofni ni evirht eW
-nis ,tide ,tceles ot yticapac yadyreve dna suolevram
-rah ,egrem ,riap ,puorg ,thgilhgih ,erutcurts ,tuo elg
,ecuder ,esnednoc ,ezinagro ,sucof ,ezisehtnys ,ezinom
-ba ,tsil ,yfissalc ,golatac ,ezirogetac ,esoohc ,nwod liob
,etanimircsid ,etalosi ,ezilaedi ,otni kool ,nacs ,tcarts
-etni ,tros ,revo kcip ,elohnoegip ,neercs ,hsiugnitsid
,knuhc ,htooms ,piks ,pmul ,retlfi ,tcepsni ,dnelb ,etarg
-mus ,eniltuo ,etagergga ,retsulc ,etamixorppa ,egareva
,esworb ,hguorht pifl ,otni pid ,weiver ,ezimeti ,eziram
,naelg ,etaremune ,enfier ,miks ,hguorht fael ,otni ecnalg
-apes dna ffahc eht morf taehw eht wonniw ,ezisponys
.staog eht morf peehs eht etar
a fo rengised eht taht noisulcnoc eht ot emac I ,suhT
t s r fi d n a r e t n e m e l p m i e ht e b y l n o t o n t s u m m e t s y s w e n
tsrfi eht etirw osla dluohs rengised eht ;resu elacs--egral
[A7][A3,negative,mirrored]
[2*8,rotated,doublesided]
[alternative=doublesided]
[margin=0pt,width=fit]
[text][text][background=screen]
[state=start]
[location=middle,marking=color]
[tolerant]
[lbr,6pt]
\setuppapersize
\setuparranging
\setuppagenumber
\setuplayout
\setupbackgrounds
\setupcolors
\setuplayout
\setuptolerance
\setupbodyfont
00.1
59.0
09.0
58.0
08.0
57.0
07.0
06.0
05.0
04.0
03.0
02.0
01.0
00.0
Y
B
M
G
50.0
50.0
00.1
00.1
05.0
05.0
50.0
50.0
57.0
57.0
52.0
52.0
57.0
57.0
52.0
52.0
59.0
59.0
05.0
05.0
52.0
52.0
2
2
57.0
57.0
C
R
59.0
59.0
00.1
00.1
00.1
00.1
C 5.
M 5.
Y 5.
K 5.
C
G
Y
R
M
B
K
51
Page design
Figure 3.18 Arranging: negative mirrored 16.
\starttext
\dorecurse{30}{\input tufte \par \input knuth \par}
\stoptext
55
52
Page design
.5 M
.5 C
.5 Y
.5 K
C
G
Y
R
M
B
K
1
1
1.00
0.95
0.75
0.50
0.25
0.05
C
1.00
0.95
1.00
4
5
TEX significantly. If I had not participated fully in all these activities,
literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they
were important.
But a system cannot be successful if it is too strongly influenced
by a single person. Once the initial design is complete and fairly
robust, the real test begins as people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds because of our marvelous
and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize,
condense, reduce, boil down, choose, categorize, catalog, classify,
list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect,
filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through,
browse, glance into, leaf through, skim, refine, enumerate, glean,
synopsize, winnow the wheat from the chaff and separate the sheep
from the goats.
Thus, I came to the conclusion that the designer of a new system
must not only be the implementer and first large--scale user; the
designer should also write the first user manual.
The separation of any of these four components would have hurt
TEX significantly. If I had not participated fully in all these activities,
literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they
were important.
But a system cannot be successful if it is too strongly influenced
by a single person. Once the initial design is complete and fairly
robust, the real test begins as people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds because of our marvelous
and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize,
condense, reduce, boil down, choose, categorize, catalog, classify,
list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect,
filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through,
browse, glance into, leaf through, skim, refine, enumerate, glean,
synopsize, winnow the wheat from the chaff and separate the sheep
from the goats.
Thus, I came to the conclusion that the designer of a new system
must not only be the implementer and first large--scale user; the
designer should also write the first user manual.
The separation of any of these four components would have hurt
TEX significantly. If I had not participated fully in all these activities,
literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they
were important.
But a system cannot be successful if it is too strongly influenced
by a single person. Once the initial design is complete and fairly
robust, the real test begins as people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds because of our marvelous
and everyday capacity to select, edit, single out, structure, high-
0.95
0.75
0.50
0.25
0.05
R
1.00
0.95
0.75
0.75
0.50
0.50
0.25
0.25
0.50
0.25
0.05
1
0.75
8
0.95
We thrive in information--thick worlds because of our marvelous
and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize,
condense, reduce, boil down, choose, categorize, catalog, classify,
list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect,
filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through,
browse, glance into, leaf through, skim, refine, enumerate, glean,
synopsize, winnow the wheat from the chaff and separate the sheep
from the goats.
Thus, I came to the conclusion that the designer of a new system
must not only be the implementer and first large--scale user; the
designer should also write the first user manual.
The separation of any of these four components would have hurt
TEX significantly. If I had not participated fully in all these activities,
literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they
were important.
But a system cannot be successful if it is too strongly influenced
by a single person. Once the initial design is complete and fairly
robust, the real test begins as people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds because of our marvelous
and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize,
condense, reduce, boil down, choose, categorize, catalog, classify,
list, abstract, scan, look into, idealize, isolate, discriminate, distin-
M
1.00
must not only be the implementer and first large--scale user; the
designer should also write the first user manual.
The separation of any of these four components would have hurt
TEX significantly. If I had not participated fully in all these activities,
literally hundreds of improvements would never have been made,
because I would never have thought of them or perceived why they
were important.
But a system cannot be successful if it is too strongly influenced
by a single person. Once the initial design is complete and fairly
robust, the real test begins as people with many different viewpoints
undertake their own experiments.
We thrive in information--thick worlds because of our marvelous
and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize,
condense, reduce, boil down, choose, categorize, catalog, classify,
list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect,
filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through,
browse, glance into, leaf through, skim, refine, enumerate, glean,
synopsize, winnow the wheat from the chaff and separate the sheep
from the goats.
Thus, I came to the conclusion that the designer of a new system
must not only be the implementer and first large--scale user; the
designer should also write the first user manual.
The separation of any of these four components would have hurt
TEX significantly. If I had not participated fully in all these activities,
literally hundreds of improvements would never have been made,
0.05
0.05
G
1.00
0.95
0.75
0.50
0.25
0.05
Y
B
1
1
1.00
0.95
0.90
0.85
0.80
0.75
0.70
0.60
0.50
0.40
0.30
0.20
0.10
0.00
Figure 3.19 Arranging: 8.
\setuppapersize
\setuparranging
\setuppagenumber
\setuplayout
\setupbackgrounds
\setupcolors
\setuplayout
\setuptolerance
\setupbodyfont
[A6][A3]
[2*4,doublesided]
[alternative=doublesided]
[margin=0pt,width=fit]
[text][text][background=screen]
[state=start]
[location=middle,marking=color]
[tolerant]
[lbr,7pt]
\starttext
\dorecurse{30}{\input tufte \par \input knuth \par}
\stoptext
3
Arranging pages
56
4
0.05
1.00
M
0.95
0.75
0.50
0.25
0.05
1.00
\setuppapersize
\setuparranging
\setuppagenumber
\setuplayout
\setupbackgrounds
\setupcolors
\setuplayout
\setuptolerance
\setupbodyfont
the implementer and first large--scale user; the designer should also write the first
user manual.
The separation of any of these four components would have hurt TEX significantly.
If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would never have thought of them
or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person.
Once the initial design is complete and fairly robust, the real test begins as people
with many different viewpoints undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize,
catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump,
skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize,
itemize, review, dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the chaff and separate
the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be
the implementer and first large--scale user; the designer should also write the first
user manual.
The separation of any of these four components would have hurt TEX significantly.
If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would never have thought of them
or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person.
Once the initial design is complete and fairly robust, the real test begins as people
with many different viewpoints undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize,
catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump,
skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize,
itemize, review, dip into, flip through, browse, glance into, leaf through, skim, re-
1
0.95
0.75
0.50
0.25
0.05
1.00
C
0.95
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize,
catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump,
skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize,
itemize, review, dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the chaff and separate
the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be
the implementer and first large--scale user; the designer should also write the first
user manual.
The separation of any of these four components would have hurt TEX significantly.
If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would never have thought of them
or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person.
Once the initial design is complete and fairly robust, the real test begins as people
with many different viewpoints undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize,
catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump,
skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize,
itemize, review, dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the chaff and separate
the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be
the implementer and first large--scale user; the designer should also write the first
user manual.
The separation of any of these four components would have hurt TEX significantly.
If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would never have thought of them
or perceived why they were important.
Page design
.5 C
.5 M
0.95
.5 Y
0.90
.5 K
0.85
0.80
C
0.75
G
0.70
Y
0.60
0.50
0.40
53
1
R
M
0.30
Arranging pages
B
0.20
K
1.00
1
1.00
0.95
0.75
0.50
0.05
0.25
1.00
R
0.75
0.95
0.75
0.50
0.25
0.50
0.05
0.25
1.00
G
0.95
0.75
0.50
0.05
0.25
Y
1
1
B
0.10
0.00
Figure 3.20 Arranging: 4.
[A5][A3]
[2*2,rotated,doublesided]
[alternative=doublesided]
[margin=0pt,width=fit]
[text][text][background=screen]
[state=start]
[location=middle,marking=color]
[tolerant]
[lbr,8pt]
\starttext
\dorecurse{30}{\input tufte \par \input knuth \par}
\stoptext
3
57
1
0.95
0.75
0.50
0.25
0.05
1.00
C
0.95
1.00
\setuppapersize
\setuparranging
\setuppagenumber
\setuplayout
\setupbackgrounds
\setupcolors
\setuplayout
\setuptolerance
\setupbodyfont
3
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize,
catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump,
skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize,
itemize, review, dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the chaff and separate
the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be
the implementer and first large--scale user; the designer should also write the first
user manual.
The separation of any of these four components would have hurt TEX significantly.
If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would never have thought of them
or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single person.
Once the initial design is complete and fairly robust, the real test begins as people
with many different viewpoints undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize,
catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump,
skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize,
itemize, review, dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the chaff and separate
the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only be
the implementer and first large--scale user; the designer should also write the first
user manual.
The separation of any of these four components would have hurt TEX significantly.
If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would never have thought of them
or perceived why they were important.
54
Page design
1
.5 C
.5 M
0.95
.5 Y
0.90
.5 K
0.85
0.80
C
0.75
G
0.70
Y
0.60
R
0.50
0.40
M
0.30
B
0.20
K
1.00
1
1.00
0.95
0.75
0.50
0.05
0.25
1.00
R
0.75
0.95
0.75
0.50
0.25
0.50
0.25
0.05
0.05
M
G
1.00
1.00
0.95
0.95
0.75
0.75
0.50
0.25
0.50
0.25
0.05
0.05
Y
1
1
B
0.10
0.00
Figure 3.21 Arranging: 2UP (1).
[A5][A3]
[2UP,rotated,doublesided]
[alternative=doublesided]
[margin=0pt,width=fit]
[text][text][background=screen]
[state=start]
[location=middle,marking=color]
[tolerant]
[lbr,8pt]
\starttext
\dorecurse{30}{\input tufte \par \input knuth \par}
\stoptext
Arranging pages
58
\setuppapersize
\setuparranging
\setuppagenumber
\setuplayout
\setupbodyfont
35
boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate,
distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk,
average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse,
glance into, leaf through, skim, refine, enumerate, glean,
synopsize, winnow the wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a
new system must not only be the implementer and first
large--scale user; the designer should also write the first
user manual.
The separation of any of these four components would
have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would
never have thought of them or perceived why they were
important.
But a system cannot be successful if it is too strongly
influenced by a single person. Once the initial design is
complete and fairly robust, the real test begins as people with many different viewpoints undertake their own
experiments.
1
We thrive in information--thick worlds because of our
marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce,
boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate,
distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk,
average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse,
glance into, leaf through, skim, refine, enumerate, glean,
synopsize, winnow the wheat from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a
new system must not only be the implementer and first
large--scale user; the designer should also write the first
user manual.
The separation of any of these four components would
have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would
never have thought of them or perceived why they were
important.
But a system cannot be successful if it is too strongly
Page design
Arranging pages
55
Figure 3.22 Arranging: 2UP (2).
[A5][A4]
[2UP,rotated,doublesided]
[alternative=doublesided]
[margin=0pt,width=fit]
[lbr,12pt]
\starttext
\dorecurse{30}{\input tufte \par \input knuth \par}
\stoptext
3
59
56
Page design
1
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge,
harmonize, synthesize, focus, organize, condense, reduce, boil down, choose,
categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse, glance
into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat
from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only
be the implementer and first large--scale user; the designer should also write
the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds
of improvements would never have been made, because I would never have
thought of them or perceived why they were important.
But a system cannot be successful if it is too strongly influenced by a single
person. Once the initial design is complete and fairly robust, the real test begins
as people with many different viewpoints undertake their own experiments.
We thrive in information--thick worlds because of our marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge,
harmonize, synthesize, focus, organize, condense, reduce, boil down, choose,
categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse, glance
into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat
from the chaff and separate the sheep from the goats.
Thus, I came to the conclusion that the designer of a new system must not only
be the implementer and first large--scale user; the designer should also write
the first user manual.
The separation of any of these four components would have hurt TEX significantly. If I had not participated fully in all these activities, literally hundreds
Figure 3.23 Arranging: 2DOWN.
\setuppapersize
\setuparranging
\setuppagenumber
\setuplayout
\setupbodyfont
[A4,landscape][A3]
[2DOWN,doublesided]
[alternative=doublesided]
[margin=0pt,width=fit]
[lbr,12pt]
\starttext
\dorecurse{30}{\input tufte \par \input knuth \par}
\stoptext
3
Arranging pages
60
right top
left top
right header
left header
3.7
Logo types
It is possible to place for example company logos at the top or the bottom of a page. We show
some examples on the next pages. It is advisable to define a command for typesetting a logo
type.
The location of a logo type is defined by:
\definelogo[.1.][.2.][.3.][..,..=..,..]
.1.
.2.
.3.
command
state
name
top header footer bottom
none page leftedge leftmargin left middle right rightmargin rightedge
command text
start stop
All logo types with state=start are automatically typeset on the page. A logo can also be
recalled by:
\placelogos[..,...,..]
...
name
In that case only the listed logos are typeset.
On this page a few potential locations of logos are shown. Temporarily headers and footers of
this manual are suppressed. For example the left logo types are defined by means of:
\definelogo
[logo a] [bottom] [left]
[command=left bottom]
\definelogo
[logo d] [top] [left]
[command=left top]
\definelogo
[logo g] [footer] [left]
[command=left footer]
\definelogo
[logo j] [header] [left]
[command=left header]
\placelogos[logo a,logo b,logo c,logo d]
left footer
right footer
left bottom
right bottom
61
Instead of command we could have chosen text. We define the logo with command because it is
evident that we will use the logo more than once. The example is discussed below.
First we define a command that generates a small logo.
\def\ContextLogo%
{\externalfigure[mp-cont.502][height=24pt,method=mps]}
If we want to set this logo at the bottom of every page we type:
\definelogo
[small logo] [bottom] [middle]
[command=\ContextLogo,state=start]
This logo is placed at the bottom of every page. In letters however the logos are located
on different positions on the paper. Again, we define the bigger logo including all address
information. Watch the use of \framed.
\def\ContextLetterhead%
{\hbox
{\definefont[ContextFont][RegularBold sa 1.5]%
\ContextFont \setupinterlinespace
\setupframed
[align=middle,top=\vfill,bottom=\vfill,
height=10\bodyfontsize,offset=overlay,frame=off]%
\framed
{The\\Con\TeX t\\Chronicle}%
\externalfigure
[mp-cont.502][height=10\bodyfontsize]%
\framed
{Ridderstraat 27\\8061GH Hasselt NL\\pragma@wxs.nl}}}
We also define the position on the paper:
\definelogo
[big logo] [header] [right]
[command=\ContextLetterhead]
This letterhead logo should appear only on the first page. So we simply say:
\placelogos[big logo]
62
The
Ridderstraat 27
ConTEXt
Chronicle
8061GH Hasselt NL
pragma@wxs.nl
You will notice that the smaller logo is not placed at the bottom of the page because the
command \placelogos typesets only the listed logos and suppresses all other logos.
The big logo needs some space on this page so the content of the letter should be moved to a
somewhat lower location. We do this with the command:
\blank[force,8\bodyfontsize]
63
60
Page design
ll
l
ll LLLl
LL
L
m
r
rr
rrr
1
m
r
rrR
RR rrr RRR
Hier is een ‘volledige’ layout weergegeven, inclusief de instellingen. De instellingen zijn opgeroepen met het \tooninstellingen. We zien dat een aanpassing van de layout geen gevolgen heeft voor de plaats van de beeldmerken. De
getoonde layout wijkt af van de in deze handleiding gebruikte.
papierhoogte
papierbreedte
printpapierhoogte
printpapierbreedte
29.69577cm
20.99701cm
29.69577cm
20.99701cm
845.04684pt
597.50787pt
845.04684pt
597.50787pt
\papierhoogte
\papierbreedte
\printpapierhoogte
\printpapierbreedte
kopwit
rugwit
hoogte
breedte
3.99942cm
4.99928cm
21.99687cm
10.4985cm
113.81102pt
142.26378pt
625.96062pt
298.75394pt
\kopwit
\rugwit
\zethoogte
\zetbreedte
boven
bovenafstand
hoofd
hoofdafstand
teksthoogte
voetafstand
voet
onderafstand
onder
0.0cm
0.0cm
1.49979cm
0.42169cm
18.65384cm
0.42169cm
0.99985cm
0.0cm
0.0cm
0.0pt
0.0pt
42.67912pt
0.0pt
530.82875pt
0.0pt
28.45274pt
0.0pt
0.0pt
\bovenhoogte
\bovenafstand
\hoofdhoogte
\hoofdafstand
\teksthoogte
\voetafstand
\voethoogte
\onderafstand
\onderhoogte
linkerrand
linkerrandafstand
linkermarge
linkermargeafstand
tekstbreedte
rechtermargeafstand
rechtermarge
rechterrandafstand
rechterrand
1.99971cm
0.42169cm
0.74988cm
0.63254cm
10.4985cm
0.42163cm
1.49979cm
0.42169cm
1.74974cm
56.9055pt
0.0pt
21.33955pt
0.0pt
298.75394pt
11.99829pt
42.67912pt
0.0pt
49.79231pt
\linkerrandbreedte
\linkerrandafstand
\linkermargebreedte
\linkermargeafstand
\tekstbreedte
\rechtermargeafstand
\rechtermargebreedte
\rechterrandafstand
\rechterrandbreedte
korps
12.0pt
\globalbodyfontsize
regel
hoogte
diepte
boven
onder
2.8ex
.72
.28
1.0
0.4
\normallineheight
\strutheightfactor
\strutdepthfactor
\topskipfactor
\maxdepthfactor
De \teksthoogte wordt berekend op basis van de hoogte en de afmetingen
van het hoofd en de voet. Het feit dat geen hele getallen worden weergegeven,
is mede bepaald door het feit dat we de waarden opslaan in registers en dus
te maken hebben met de nauwkeurigheid van TEX.
ll LLLl
ll
l
LL
L
m
r
rrR
RR rrr RRR
m
r
rr
rrr
Figure 3.24 The location of header, footer, bottom and top logos on a page.
3
Logo types
64
65
62
\bbox
104
\blank
68
\cbox
104
\column
78
\correctwhitespace
68
\crlf
89
\definemakeup
106
\defineparagraphs
81
\definetext
95
\donttest
95
\fixedspaces
72
\footnote
100
\godown
68
\hbox
104
\high
77
\indenting
66
\inleft
73
\inmarge
73
\inothermargin
73
\inright
73
\lbox
104
\leftaligned
87
\lohi
77
\low
77
\margintext
73
\midaligned
87
\noheadersandfooterlines
\noindenting
66
\nospace
72
\note
100
\notopandbottomlines
95
95
\nowhitespace
68
\numberofsubpages
93
\page
91
\pagenumber
93
\par
63
\paragraph
81
\paragraph
63
\placefootnotes
100
\placelocalfootnotes
100
\rbox
104
\rightaligned
87
\sbox
104
\setnostrut
73
\setstrut
73
\setupalign
87
\setupblank
68
\setupbottom
95
\setupbottomtexts
95
\setupcolumns
78
\setupfooter
95
\setupfootertexts
95
\setupfootnotes
100
\setupheader
95
\setupheadertexts
95
\setupindenting
66
\setupinmargin
73
\setupinterlinespace
63
\setuplinenumbering
89
\setuplines
89
\setupmakeup
106
\setupnarrower
66
\setuppagenumbering
93
\setuppagesubnumbering
93
\setupparagraphs
81
\setupspacing
72
\setuptext
95
\setuptexttexts
95
\setuptolerance
87
\setuptop
95
\setuptoptexts
95
\setupwhitespace
68
\showstruts
73
\space
72
\startalignment
87
\startcolumns
78
\startlinecorrection
68
\startlinenumbering
89
\startlines
89
\startlocalfootnotes
100
\startnamemakeup
106
\startnarrower
66
\startpacked
68
\startparagraph
81
\startstandardmakeup
106
\starttabulate
85
\strut
73
\subpagenumber
93
\tbox
104
\totalnumberofpages
93
\vbox
104
\vtop
104
\whitespace
68
66
Layout
63
The look of a publication is determined by the page design, the chosen fonts and other aspects
like vertical spacing. In this chapter we will explore the latter. Sometimes we will go into detail
but a novice user can skip such parts. In normal applications, the default setups are most
adequate, because they will adapt to the different situations. For the impatient reader we will
just mention a few setups. Spacing between paragraphs is defined by:
4
Layout
4.1
Introduction
\setupwhitespace[big]
In your source file you can best use an empty line between paragraphs. This increases readability and it makes the typing of \par at the end of each paragraph obsolete. Indentation at
every new paragraph is obtained by:
\setupindenting[medium]
A doublesided publication is generated when you type:
\setuppagenumbering[alternative=doublesided]
As you might expect this might generate page numbering on the right and left hand side of a
paper and the margins will be mirrored automatically.
As we have said before only the curious have to read on.
4.2
Paragraphs
The most important unit in TEX is paragraph. A new paragraph is forced by:
1. an empty line
2. the TEX--command\par or \endgraf
3. the ConTEXt--command \paragraph
The first alternative is the most obvious. You will obtain a readable input file (ascii file) and
errors are minimized. The second alternative is chosen when it is mandatory to the used
command. For example in definitions (see 10.2).
4.3
Line spacing
In TEX linespacing is determined by a number of variable dimensions like \topskip, \parskip
and \baselineskip. However, in ConTEXt these variables are related to the bodyfont size.
Introduction — Line spacing
4
67
64
Layout
A line has a height and a depth. The distance between two lines is normally equal to the sum
of the maximum height and maximum depth:
+
=
This sum is in ConTEXt equal to 2.8ex, so almost three times the height of an x. This is about
1.2× the bodyfont height. The proportion between maximum height and depth is default
.72 : .28. Linespacing alters when a new bodyfont is used or when linespacing is defined
explicitly by:
\bfd \setupinterlinespace Now, the interline spacing is larger ... \par
One has to consider the fact that TEX operates on paragraphs and within a group one has to
close the paragraph explicitly with an empty line or \par. However, in most cases ConTEXt
will take care of this.
Sometimes a line does not have the maximum height or depth. The next example illustrates
this:
It says:
The height and depth of lines differs.
When we put two of these lines above each other we will get:
You can see that the distance is somewhat bigger that the sum of the height and depth of
each separate line. This distance is called the baseline distance (\baselineskip) and is in this
document 14.83998pt. If we add some extra height to the line we see this:
To prevent the lines from touching TEX adds a \lineskip, in our example 1.0pt. In a similar
way TEX is taking care of the first line of a page to have at least a height of \topskip (here
10.6848pt).
Linespacing is setup by:
4
Line spacing
68
Layout
65
\setupinterlinespace[...] [..,..=..,..]
...
height
depth
line
top
bottom
reset small medium big on off
number
number
dimension
number
number
Linespacing adapts to the size of the actual bodyfont automatically. This means that the user
can leave this command untouched, unless a different linespacing is wanted. Instead of a factor
one of the predetermined values small (1.0), medium (1.25) or big (1.5) can be given. Below an
example is given of a text with a linespacing of 1.25: \setupinterlinespace[medium].
Whenever it comes to my mind that “everything that comes in quantities, will somehow survive”, I also got the feeling that in a few hundred years people will draw the saddening conclusion that all those top--ten hits produced by computers represent the summum of todays
musical and instrumental abilities. Isn’t it true that archeologists can spend a lifetime on speculating about some old coins from the first century? On the other hand, the mere fact that one
can have success with this type of non--music success of some top--hit musicians demonstrates
both the listeners inability to rate the product and the lack of self criticism of the performers.
In principle the future archeologist will therefore draw the right conclusion.
When you make a fontswitch the linespacing is adapted when you type the command
\setupinterlinespace without set up parameters or by adding reset, for example:
[reset,medium].
In books meant for children we often find a somewhat bigger typeface, for
instance because we are convinced that this enables them to read the book
themselves. On the other hand, I can also imagine that it is a cheap way to
increase the number of pages. Unfortunately scaling up will also uncover the
lack of quality of the typesetting used and/or the lack of typographic knowledge
of the user of such a system. The interline space sometimes differs on a line
height
by line basis, and depends on the
of the current line. Therefore,
when changing the style, something that should only be done on purpose, also
change the baseline distance when needed.
Line spacing
4
69
66
Layout
The text above is typeset in the fontsize \tfa which equals \rma (see also chapter 5).
\start \tfa \setupinterlinespace In books meant for children we often find
a somewhat ... when needed. \par \stop
In this example the \par is necessary because otherwise TEX will have forgotten the linespacing
before the paragraph is finished (in that case, the paragraph is ended by the empty line after
the \stop).
Instead of a keyword, one can pass a key--value pair to define the characteristics of a line. The
default settings are:
\setuplinespacing
[height=.72,
depth=.28,
top=1.0,
bottom=0.4,
line=2.8ex]
The height and depth determine the ratio between the height and depth of a line. The baseline
distance is set to 2.8ex. The parameters top and bottom specify the relation between the
bodyfont size and the height of the first line and the depth of the last line on a page. The last
two quantities are related to TEX’s \topskip and \maxdepth.
4.4
Indentation
When a text has little whitespacing, for example in a novel, it is a custom to indent each new
paragraph. Indentation is setup with:
\setupindenting[..,...,..]
...
none small medium big next first dimension
By default there is ‘no’ indentation. When indentation is turned on, when possible the commands will determine whether indentation is necessary. For example, it doesn’t look good to
indent after a vertical whitespace. In a number of cases it is even undesirable to indent. Think
for example of headers and itemizations.
This manual is typeset without indentation. The great quantity of short sentences and examples
would result in a very messy page layout.
4
Line spacing — Indentation
70
Layout
67
When indentation is used, we may have to tell TEX in some cases not to indent. This is done by:
\noindenting
We can set up indenting by:
\indenting[..,...,..]
...
never not no yes always first next
The meaning of the setups is described in table 4.1. Next to the commands described above
we could use the TEX--commands \indent and \noindent.
setup
result
no / not
don’t indent the next paragraph
yes / always
turn on indentation
never
turn off indentation
first
indent first paragraphs too
next
don’t indent first paragraphs
Table 4.1 The way of indenting.
The settings first and next determine if paragraphs following whitespace should be indented
or not. It is a sort of custom not to indent these.
A text my be typeset smaller than the default textwidth. In that case the complete text will be
indented on both sides.
\startnarrower[..,...,..] ... \stopnarrower
...
n*left n*middle n*right
For example:
\startnarrower[3*left,2*right]
The relatively small revolution in in Russia in 1917 had big consequences for
this country as well as the rest of the world. It is interesting to see that
some 80˜years later a just as small revolution was needed to undo the 1917
Indentation
4
71
68
Layout
one. In both cases, the main reason for the revolutions was to prevent
democracy to arise.
\stopnarrower
Will become:
The relatively small revolution in in Russia in 1917 had big consequences for
this country as well as the rest of the world. It is interesting to see that some
80 years later a just as small revolution was needed to undo the 1917 one. In
both cases, the main reason for the revolutions was to prevent democracy to
arise.
Next to using left, right and middle also combinations and manifolds are possible. Indentation in the example above could have obtained by typing 2*middle,left. So, middle is
equivalent to left,right.
The value of indentation is set up by:
\setupnarrower[..,..=..,..]
left
right
middle
4.5
dimension
dimension
dimension
Vertical spacing (whitespacing)
Vertical spacing between paragraphs is set up by:
\setupwhitespace[...]
...
none small medium big line fixed fix dimension
Instead of a random value it is better to use one of the pre defined dimension. Default there
is no vertical spacing. Without any set up values the vertical spacing is related to the actual
fontsize.
Vertical spacing can be forced by either:
\whitespace
4
Indentation — Vertical spacing (whitespacing)
72
Layout
69
\nowhitespace
These commands have only effect when vertical spacing is set up. In fact these commands will
not be necessary for ConTEXt takes care of most situations.
TEX handles vertical spacing around lines quite different from that around text. In case these
problematic situations occur one can use the following commands. Spacing around figures
and tables is dealt with by ConTEXt, so only use these commands when the typeset text looks
really bad.
\startlinecorrection ... \stoplinecorrection
For example:
\startlinecorrection
\framed{To boxit or not, that’s a delicate question!}
\stoplinecorrection
One can add vertical spacing with the TEX command \vskip, but please don’t. We advise you
to use:
\blank[..,...,..]
...
n*small n*medium n*big nowhite back white disable force reset line halfline formula
fixed flexible
We can use a value of one of the keywords small, medium or big. A big jump is twice a medium
jump which is four times a small jump. A value however can be left out (\blank) when the
default vertical space is desired. It is advisable to set up the vertical spacing only once in
the setup area of your document. Local alterations throughout your document will result in a
badly--spaced document.
Normally there is some stretch in the vertical spacing. This enables TEX to fill out a page
optimally. In the next example we see what happens when we add stretch to whitespace. Each
sample shows from top to bottom three \blank’s of big, medium and small. The left and right
sample show the range of the stretch. The rightmost sample shows that adding stretch can
result in shrink.
Vertical spacing (whitespacing)
4
73
70
Layout
maximum stretch
no stretch
minimal stretch
The last vertical space can be undone by typing \blank[back] and the next blank can be
blocked by disable. With reset a disable is ignored.
The command \blank is one of the more advanced commands. The next call is allowed:
\blank[2*big,medium,disable]
Since medium is half the amount of big, this results in adding a vertical spaces of 2.5 times
big. The previous vertical space will be undone automatically and the disable suppressed
the next \blank.
A lasting vertical space can be sustained by force. For example, if you want some extra spacing
at the top of a page you will have to type force.
The default vertical spaces are set up with:
\setupblank[...]
...
normal standard line dimension big medium small fixed flexible
An example of such a definition is:
\setupblank[big]
The vertical spaces will be automatically adapted to the fontsize and they are flexible. Changing
the default set up locally is therefore not advisable. Without an argument \setupblank adapts
to the actual fontsize!
The keywords fixed and flexible are used to end or reinstate this adaptive characteristic. In columns it is recommended to use the setup [fixed,line] or the opposite setup
[flexible,standard].
This text is typeset a bodyfont of 10pt and is downscaled by a few percent. The setup that is
used in this document is shown in table 4.2. We see some stretch in the vertical spacing. The
stretching enables TEX to fill out a page satisfactorily. Default the maximal vertical space is
75% of the line space and the stretch maximal of 25%.
4
Vertical spacing (whitespacing)
74
Layout
setup
value
small
2.78249pt plus 0.92749pt minus 0.92749pt
medium
5.56499pt plus 1.855pt minus 1.855pt
big
11.12997pt plus 3.70999pt minus 3.70999pt
line
14.83998pt
71
Table 4.2 The whitespace values to a 10pt bodyfont.
In paragraph ?? it was said that the vertical spacing can be set up with the command
\setupwhitespace. Default there is no whitespace between paragraphs. The setup of vertical spacing and line spacing are related to each other.
Instead of direct setup you can use an indirect way. This has the advantage that you can change
the layout more easily. In that case we use:
\defineblank[.1.][.2.]
.1.
.2.
name
see p 70: \setupblank
If we type for example:
\defineblank[aroundverbatim][medium]
than aroundverbatim is equal to medium, which can be used, for example around verbatim,
as in:
\setuptyping
[before={\blank[aroundverbatim]},
after={\blank[aroundverbatim]}]
If we want some more whitespacing we only have to change the definition of aroundverbatim:
\defineblank[aroundverbatim][big]
The vertical spacing between two lines can be suppressed with the command:
\packed
Vertical spacing between more than one line is suppressed by:
Vertical spacing (whitespacing)
4
75
72
Layout
\startpacked[...] ... \stoppacked
...
blank
The spacing around ‘packed’ text is automatically corrected. Opposed to this command is:
\startunpacked ... \stopunpacked
Skipping more than one vertical space is done with:
\godown[...]
...
dimension
One of the most important lessons to be learned is to avoid using \vskip in running text. This
can interfere with some hidden mechanisms of ConTEXt.
Sometimes TEX is not able to sort out spacing on its own. In such situations one can insert the
next command at the troublesome location.
\correctwhitespace{...}
Normally one will not need this command, although sometimes when writing macros, it can be
added to make sure that the spacing is okay. Use this kind of tweaking with care!
4.6
Word spacing
Default a space is placed after a period that ends a sentence. In some countries it is custom to
stretch the space after a period. Especially documents typeset in small columns will look better
that way. Because this is a language specific feature. the default depends on the language. One
can however (temporarily) change this spacing.
\setupspacing[...]
...
broad packed
In many cases we combine words and numbers that should not be separated at linebreaking,
for example number 12. These combinations can be connected by a tight space: number˜12.
4
Vertical spacing (whitespacing) — Word spacing
76
Layout
73
Word and number will never be separated at linebreaking on that spot. A space can be made
visible by:
\space
Undesired spaces can be suppressed by:
\nospace
When you want to align a row of numbers you can use tight spaces with the width of a number.
Tight spaces are activated by:
\fixedspaces
After this command the ˜ (tilde) generates a tight space with the width of a number.
4.7
Struts
A strut is a little invisible block without width but with the maximal height and depth of a
character or line. If you want to force these maximal dimensions, for example when you are
using boxes in your own commands, than you can use the command \strut:
\hbox{\strut test}
If we leave out the strut in this example the box has no depth. The characters in the word test
don’t reach under the baseline. Compare for example test (with strut) with test.
Many commands use struts automatically. If for some reason you don’t want struts you can try
to suppress them by \setnostrut. However take care that this command works only locally.
A strut can be set by \setstrut.
The struts that are used by ConTEXt can be made visible with the command:
\showstruts
4.8
Text in the margin
Texts can be place in the margins with:
Word spacing — Struts — Text in the margin
4
77
74
Layout
\inmargin[.1.][ref]{.2.}
.1.
.2.
+ - low
text
A new line in a margin text is forced with \\. An example of a margin text is:
\inmargin{the marginal\\influence of\\advertisement}It would be great
if the recent reduction in washing powder needed to get your wash
perfectly clean had resulted in an equal reduction of time needed to
advertise this kind of products.
or:
the marginal
influence of
advertisement
over here
It would be great if the recent reduction in washing powder needed to get your wash perfectly
clean had resulted in an equal reduction of time needed to advertise this kind of products.
When this command is used in the middle of a paragraph the margin text will appear on the
same line in themargin. The command \inmargin puts the text in the left or right margin. The
location where the text will show up depends on the character of the document: single--sided
or double--sided. You can also force the text into a specific margin, using:
\inleft[.1.][ref]{.2.}
.1.
.2.
+ - low
text
\inright[.1.][ref]{.2.}
.1.
.2.
+ - low
text
There is also:
\inothermargin[.1.][ref]{.2.}
.1.
.2.
+ - low
text
Some examples of the use of margin text appear below:
4
Text in the margin
78
Layout
75
\startlines
\inleft{to be}\quotation{To be or not to be} to me
\inright{or not}is rather famous english
\inmargin{to be}And just as it is meant to be
that quote will never perish
\stoplines
This will become:
to be
“To be or not to be” to me
is rather famous english
And just as it is meant to be
that quote will never perish
or not
to be
The mechanism of margin texts is rather complex. If you think of multiline margin texts and
the alignment of these lines with the lines in the textbody you can imagine a few typographic
problems. The number 123 next to this paragraph is not aligned but is typeset somewhat
lower. This is done by adding the keyword low:
123
\inmargin[low]{\ssd 123}The mechanism of margin texts ...
It is possible to set up the way margin texts are typeset by means of the command:
\setupinmargin[...][..,..=..,..]
...
location
style
before
after
align
line
distance
separator
..=..
a rather
marginal
effect
left right number
left right both
normal bold slanted boldslanted type cap small... command
command
command
inner outer left right middle normal no yes
number
dimension
text
see p 264: \setupframed
With align we define the left or right alignment of the margin text. Default margin texts are
right aligned. In this example alignment is middle.
We can also align on the left of right side automatically. In a double sided document design
optimisation of the margin text may ask for more than one processing step. In the example
below you see some of the possible setups.
Text in the margin
4
79
76
Layout
left
middle
right
yes
no
inner
outer
This is left aligned
but this goes in the middle. Don’t forget that
right in this sense, align means a ragged right margin.
Just to be complete, there is yes
and no.
The outsiders inner and
outer adapt themselvs to a doublesided design.
The left and right margin can be set up separately by adding [left] or [right] as the first
argument.
that way we can
move quite some
text into the margin
With before and after we can influence margin texts. Bij default the same line spacing is
used as in the textbody. But when a narrower fontsize is used we can also adapt the interline
spacing. For example:
\setupinmargin
[style=\bfx\setupinterlinespace]
Page breaking and margin text are in conflict with each other. The reason is that TEX first
typesets a complete page in order to be able to determine the right spot for page breaking.
However the margin text is already typeset at that moment. In a next processing stage the
margin texts are typeset correctly. If you want to force margin texts in a margin you can type
\inmargin[+].
The next command can be compared with the command like \section. Before the command
is placed in the margin TEX looks if it can be placed on the actual page. If not, it is moved to
the following page.
\margintext[.1.][ref]{.2.}
.1.
.2.
+ - low
text
The layout of your ascii--file will not interfere with the function of this command. This may
seem obvious, but TEX programmers know that it is not the case. For example even commands
that take care of index entries can be typed close to the margin texts.
The layout of your ascii--file will not interfere with the function of this command. You might
not expect it to, but TEX programmers know that with TEX, the layout of the source usually
interferes with for instance margin texts and index entries. In ConTEXt commands that take
care of margin texts take care of this situation, so that index entries can be typed close to the
4
Text in the margin
80
Layout
77
margin texts and margin texts can be separated from the next paragraph by an empty line. The
same cannot be said for other TEX macropackages.
\margintext{text in themargin}
\index{margintexts}
After experimenting a long time I have succeeded to filter
empty lines and commands that stand between body texts and
margin texts. It is amazing but the index entry really works.
Because of the close relation with the page design the margin width is set up by means of:
\setuplayout (see section 3.3).
The command \margintext enables you to put texts in the margin that show completely
different characteristics than that of the text body. You can typeset different margin texts with
different characteristics like bodyfont, line spacing and offset.
Isn’t
this
cute?
\margintext{Isn’t}
\margintext{this}
\margintext{cute?}
In the setup we see an optional argument. The number is determined by the order of definition.
\setupinmargin[1][align=right, line=1,style=slanted]
\setupinmargin[2][align=middle,line=2,style=boldslanted]
\setupinmargin[3][align=left, line=3,style=bold]
This means that the second margintext in a row will start on line 2, and be typeset in a bold
slanted font. One can explicitly force a margintext to go some place, by saying for instance:
\margintext[2]{this is the second one}
4.9
Subscript and superscript
There are three commands to create superscript and subscript outside the math mode:
\high{...}
...
text
\low{...}
...
text
Text in the margin — Subscript and superscript
4
81
78
Layout
\lohi{.1.}{.2.}
.1.
.2.
text
text
The next example illustrates the use of these commands:
You can walk on \high {high} heels or \low {low} heels but your height
is still the same.
This results in:
You can walk on
high
heels or
low
heels but your height is still the same.
These commands relate to the ˆ and _ in math mode. In case of larger fontsizes like \tfc, the
ˆ and _ will not create the desired output. Compare the examples below:
test\high{test} test test$ˆ{\rm test}$ test
{\bf test\high{test} test test$ˆ{\bf test}$ test}
{\tfb test\high{test} test test$ˆ{\tfb test}$ test}
This becomes:
test test test testtest test
test test test testtest test
test test test testtest test
4.10
Columns
The TEX programmer knows that it is not easy to put text in columns. Gratefully a ConTEXt
user is not bothered with the implementation of extensive macros.
You can typeset text in columns.
Most commands can be used in a
normal way without any problems.
The floating object like tables or figures are somewhat limited. This is
caused by the fact that TEX has limited
capabilities for typesetting columns.
4
For insiders: columns are produced
with the primitives: \output and
\vsplit.
The number of columns is unlimited, however TEXs memory can only
handle upto about twenty to thirty or
fourty columns.
The number of columns and the type
setting of a vertical line as a column
separator is set up by:
Columns
82
Layout
79
\setupcolumns[..,..=..,..]
n
rule
height
tolerance
distance
balance
align
blank
option
direction
..=..
number
on off
dimension
verystrict strict tolerant verytolerant stretch
dimension
yes no
yes no text
fixed halfline line flexible big medium small
background
left right
see p 264: \setupframed
The n indicates the number of columns. The column text is enclosed by:
\startcolumns[..,..=..,..] ... \stopcolumns
..=..
see p 79: \setupcolumns
The local setup of columns can be added directly after this command. A new column is forced
by:
\column
The text below is typeset in two columns with a verytolerant alignment.
\startcolumns[rule=on,n=2,tolerance=verytolerant]
Thus, I came to the conclusion that the designer of a new
system must not only be the implementer and first
.
.
\bf D.E. Knuth
\stopcolumns
Thus, I came to the conclusion that the designer of a new system must not only be the
implementer and first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If
I had not participated fully in all these activities, literally hundreds of improvements
would never have been made, because I would
Columns
4
83
80
Layout
never have thought of them or perceived why
they were important.
But a system cannot be successful if it is too
strongly influenced by a single person. Once
the initial design is complete and fairly robust,
the real test begins as people with many different viewpoints undertake their own experiments.
D.E. Knuth
This example makes it painfully obvious that spacing between lines is not on forehand equal. By
default the line spacing in this document is big, which equals .75×\lineheight. Furthermore,
the allowable stretch in line spacing makes vertical alignment practically impossible.
For this reason the default line spacing is equal to the lineskip and stretching is not allowed.
When a switch in fontsize is desirable you should do so before starting the column mechanism.
Font switches within columns will have a poor result. The next example shows a line spacing
equal to the lineskip.
Thus, I came to the conclusion that the designer of a new system must not only be the
implementer and first large--scale user; the designer should also write the first user manual.
The separation of any of these four components would have hurt TEX significantly. If
I had not participated fully in all these activities, literally hundreds of improvements
would never have been made, because I would
never have thought of them or perceived why
they were important.
But a system cannot be successful if it is too
strongly influenced by a single person. Once
the initial design is complete and fairly robust,
the real test begins as people with many different viewpoints undertake their own experiments.
D.E. Knuth
This effect is reached by the (default) setup:
\setupcolumns[blank={fixed,line}]
In section 3.4 typesetting on a grid is explained. This mechanism works quite well within
columns.
TEX is not an easy to learn typesetting system or program. The problem is that “knowing everything is possible” leads to “wanting
everything that is possible”. However using
ConTEXt or TEX takes considerable learning
time. And it is not feasible to explain every
single detail in this manual. Therefore “doing” is the answer.
This text shows that one can do some tricks with columns. The frame is created by:
4
Columns
84
Layout
81
\def\FramedColumn#1{\ruledhbox{\box#1}}
\setupcolumns[command=\FramedColumn]
A less senseless display is:
\def\FramedColumn#1%
{\hbox to \hsize
{\ifodd\currentcolumn\unhbox\hss#1\else\unhbox#1\hss\fi}}
This time the columns will look like:
TEX is not an easy to learn typesetting system or program. The problem is that “knowing everything is possible” leads to “wanting
everything that is possible”. However using
ConTEXt or TEX takes considerable learning
time. And it is not feasible to explain every
single detail in this manual. Therefore “doing” is the answer.
A column can be manipulated as a whole. For example to create a background:
\setupfootnotes
[location=columns,
background=color,
backgroundcolor=white]
\setuplayout
[grid=yes]
This time the column will be typeset on a grid:
TEX is not an easy to learn typesetting system or program. The problem is that “knowing everything is possible” leads to “wanting
everything that is possible”. However using
4.11
ConTEXt or TEX takes considerable learning
time. And it is not feasible to explain every
single detail in this manual. Therefore “doing” is the answer.
Paragraphs in columns
In some cases you want to typeset a paragraph in columns. For example in a definition where
you have a first column containing meaningful text and a second column containing meaningful
text. In these cases you can use:
Columns — Paragraphs in columns
4
85
82
Layout
\defineparagraphs[...][..,..=..,..]
...
n
rule
height
before
after
inner
distance
tolerance
align
name
number
on off
fit dimension
command
command
command
dimension
verystrict strict tolerant verytolerant stretch
left right middle
This command defines a column layout that is recalled by its name.
\startparagraph ... \stopparagraph
The layout can be set up by:
\setupparagraphs[.1.][.2.][..,..=..,..]
.1.
.2.
style
width
height
align
tolerance
distance
before
after
inner
command
rule
name
number each
normal bold slanted boldslanted type cap small... command
dimension
dimension
left right middle width breedte
verystrict strict tolerant verytolerant stretch
dimension
command
command
command
command
on off
The width of non--specified columns is determined automatically. Distance relates to horizontal
white space in front of a column. The next column is specified by:
\paragraph
We show a simple example of the use of paragraphs in columns.
4
Paragraphs in columns
86
Layout
83
\defineparagraphs[TwoColumns][n=2]
\setupparagraphs[TwoColumns][1][width=5cm]
\startTwoColumns
This is the top left corner.
\TwoColumns
In graphic environments the top right corner is also called the upper
right corner.
\stopTwoColumns
\startTwoColumns
In a similar way, the bottom left corner is called the lower left corner.
\TwoColumns
Which leaves the bottom right corner, that is also known as lower right
corner. Now what is the alternative name for the top left corner?
\stopTwoColumns
Here the \TwoColumns separates the columns. With a default setup this results in:
This is the top left corner.
In graphic environments the top right corner is also called the
upper right corner.
In a similar way, the bottom Which leaves the bottom right corner, that is also known as
left corner is called the lower lower right corner. Now what is the alternative name for the
left corner.
top left corner?
We also could have used \nextTwoColumns instead of \TwoColumns. Sometimes this is more
readable in your ascii text. An alternative specification is:
\TwoColumns first text \\ second text \\
You can add a command to the keywords bottom and top. These commands will be executed
before or after the text. For example a column can be forced down by [top=\vfill].
This is the right place to show a more complex example. The use of paragraphs is preferred
over the use of columns because the text is kept together. If we want to score an item on two
dimensions we need three columns:
\defineparagraphs [CombinedItem]
[n=3,rule=on]
\setupparagraphs [CombinedItem] [2] [width=3em]
\setupparagraphs [CombinedItem] [3] [width=7em]
The item itself is defined with \defineenumeration (see section ??):
Paragraphs in columns
4
87
84
Layout
\defineenumeration
[SomeItem]
[location=left,text=,width=3em,before=,after=]
The scoring is done on a scale that is typeset as an itemization (see section ??). An item might
look like this in ascii:
\startCombinedItem
\startSomeItem
The student is able to write a detailed planning for the
design and construction of a water purification plant.
\stopSomeItem
\nextCombinedItem
\startitemize[5,packed]
\item yes \item no
\stopitemize
\nextCombinedItem
\startitemize[5,packed]
\item self study \item class room \item simulation
\stopitemize
\stopCombinedItem
And will result in:
1
The student is able to write a detailed planning for the design
and construction of a water purification plant.
◦ yes ◦ self study
◦ no ◦ class room
◦ simulation
When the scoring scales are identical over all items we can use macros:
\def\firstscale%
{\startitemize[5,packed]
\item yes \item no
\stopitemize}
\def\secondscale%
{\startitemize[5,packed]
\item self study \item class room \item simulation
\stopitemize}
\startCombinedItem
\startSomeItem
4
Paragraphs in columns
88
Layout
85
The student is able to write a detailed planning for the
design and construction of a water purification plant.
\stopSomeItem
\nextCombinedItem
\firstscale
\nextCombinedItem
\secondscale
\stopCombinedItem
Or even more sophisticated:
\def\startItem%
{\startCombinedItem
\startSomeItem}
\def\stopItem%
{\stopSomeItem
\nextCombinedItem \firstscale
\nextCombinedItem \secondscale
\stopCombinedItem}
\startItem
The student is able to write a detailed planning for the
design and construction of a water purification plant.
\stopItem
A definition like the one above can be very surprising. The commands in such a definition can
interfere and result in undesirable output. We think of \vtop’s that align on the baseline and
\vbox s that align under the baseline. Another example with framed texts show that ConTEXt
takes care of most of the problems.
left
4.12
middle
right
Tabulate
In a later chapter we will go into detail on typesetting tables. Consider this paragraph to be
an appetizer. We use the term tabulate when a table is part of the running text. A simple
tabulation looks like this:
Paragraphs in columns — Tabulate
4
89
86
Layout
\starttabulate[|l|p|]
\NC question \NC Sometimes it is surprising to notice that writers,
independently of each other, explore the same theme along similar lines.
Three of the four books mentioned here fall into this category. Which
books do not belong in this list? \NC \NR
\stoptabulate
\starttabulate[|l|l|l|]
\NC A. \NC This Perfect Day
\NC B. \NC Opstaan op Zaterdag
\NC C. \NC Tot waar zal ik je brengen
\NC D. \NC The City And The Stars
\stoptabulate
\NC
\NC
\NC
\NC
Ira Levin
Jan Gerhart Toonder
Anton Koolhaas
Arthur Clarke
\NC
\NC
\NC
\NC
\NR
\NR
\NR
\NR
This results in:
question
A.
B.
C.
D.
Sometimes it is surprising to notice that writers, independently of each other, explore the same theme along similar lines. Three of the four books mentioned here
fall into this category. Which books do not belong in this list?
This Perfect Day
Opstaan op Zaterdag
Tot waar zal ik je brengen
The City And The Stars
Ira Levin
Jan Gerhart Toonder
Anton Koolhaas
Arthur Clarke
With \NC we go to the next column and with \NR to the next row. Definitions like [|l|p|] and
[|l|l|l|] are called a template. The set ups are similar to those of \starttable (see in ??).
The default template looks like this: [|l|p|]. The second column is typeset as a normal
paragraph and with a width that is calculated automatically by TEX.
\starttabulate
\NC d: \NC avond, afond, avend, afend \NC \NR
\NC t: \NC avont, afont, avent, afent \NC \NR
\stoptabulate
This quotation from “Spellingsverandering van zin naar onzin” by G.C. Molewijk (1992) will
look like this: 4
4
4
For the non--dutch readers: this book “Change of spelling, from sense to nonsense” is one of the most humorous books
on the developments in a language one can imagine. If you ever come to studying dutch, you should give this book a
try.
Tabulate
90
Layout
d:
t:
4.13
87
avond, afond, avend, afend
avont, afont, avent, afent
Alignment
Horizontal and vertical alignment is set up by:
\setupalign[...]
...
width left right middle inner outer wide broad height bottom line reset
The keys left, middle and right, inner and outer apply to horizontal alignment and bottom,
height and line to vertical alignment.
The key right results in the text being typeset ragged right. The keyword broad can be combined with left, middle and right which results in somewhat more rough alignments.
The option line lets the last line touch the bottom of the page while height aligns the baseline
to the bottom.
Individual lines can be aligned with the commands:
\leftaligned{...}
...
text
\midaligned{...}
...
text
\rightaligned{...}
...
text
alignment over a number of lines is done by:
\startalignment ... \stopalignment[...]
..=..
see p 87: \setupalign
The text below shows a number of examples of horizontal alignment.
Tabulate — Alignment
4
91
88
Layout
The Brittish stubbornly stick to
driving at the left side of the road.
This can be considered a form conservatism,
or alternatively phrased: right--wing thinking.
However, a political drive--in--the--middle
compromise would definitely lead to accidents.
We done this with:
\leftaligned{The Brittish stubbornly stick to}
\leftaligned{driving at the left side of the road.}
\blank[medium]
\rightaligned{This can be considered a form conservatism,}
\rightaligned{or alternatively phrased: right||wing thinking.}
\blank[medium]
\midaligned{However, a political drive||in||the||middle}
\midaligned{compromise would definitely lead to accidents.}
The last words of a paragraph can be placed on the right hand side by the command
\wordright,
so with:
\wordright{...}
...
text
When typesetting a paragraph, TEX tries several alternatives and decides which one to choose
based on a system, of penalties. Normally TEX is very strict, but we can instruct TEX to be a bit
more tolerant. This means that, instead of letting problematic situations remain unsolved —i.e.
let words that cannot be hyphenated stick into the margin— TEX will add a bit more stretch
and apply different penalties for successive hyphens.
Alignment can be set up by:
\setuptolerance[..,...,..]
...
horizontal vertical stretch verystrict strict tolerant verytolerant
By default we use [horizontal,verystrict] for horizontal alignment and
[vertical,strict] for vertical alignment. 5 A last resort is provided by the keyword stretch,
5
4
If you want a real ugly result, you should set the TEX variable \pretolerance to 10.000. It is up to you.
Alignment
92
Layout
89
which in unsolvable situations will stretch spaces, extending the ugliness even further.
In double sided typesetting, alignment can be coupled to the left or right pages.
\startalignment[inner]
\quotation {Out of nowhere} is a rather normal way of saying that it is
not clear where something originates. It is typically a phrase that has
no counterpart, in the sense that nobody would comprehend the remark
\quotation {Into somewhere}.
\stopalignment
\startalignment[outer]
\quotation {Out of bounds} is a similar quote. There is no counterpart
\quotation {In of bounds}. Both examples demonstrate that in(ner) and
out(er) are not always counterparts.
\stopalignment
Results of the commands above depend on the location of the page (left of right). The commands lead to:
“Out of nowhere” is a rather normal way of saying that it is not clear where something originates. It is typically a phrase that has no counterpart, in the sense that nobody would comprehend the remark “Into somewhere”.
“Out of bounds” is a similar quote. There is no counterpart “In of bounds”.
Both examples demonstrate that in(ner) and out(er) are not always counterparts.
4.14
New lines
A new line is forced by: 6
\crlf
If you want to have lines show up the way you typed them in your source file you can use:
\startlines ... \stoplines
Default indenting is off. You can set up lines by:
6
In titles, headers and margin texts \\ is available for introducing a new line.
Alignment — New lines
4
93
90
Layout
\setuplines[..,..=..,..]
before
after
inbetween
indenting
command
command
command
yes no even odd
If we set up indenting=odd for example we will obtain:
Come on, he said, give me a while,
and I will typeset you this text
with rivers like the river Nile
This was typed in the source file as:
\setupindenting[medium]
\setuplines[indenting=even]
\startlines
Come on, he said, give me a while,
and I will typeset you this text
with rivers like the river Nile
\stoplines
Lines can be numbered with:
\startlinenumbering[...] ... \stoplinenumbering
...
continue
A simple example of numbered lines might look like this:
\startlinenumbering
There is of course no problem with trying to prevent illegal copying of
\cap {cd}’s and records. However, why should artists benefit from these
measures, who themselves have no problems with copying themes, lyrics
and melodies?
\stoplinenumbering
this becomes:
1
2
3
4
There is of course no problem with trying to prevent illegal copying of CD’s and records. However, why should artists benefit from these measures, who themselves have no problems with
copying themes, lyrics and melodies?
New lines
94
Layout
91
We can influence line numbering by:
\setuplinenumbering[..,..=..,..]
conversion
start
step
width
location
style
prefix
referencing
numbers characters Characters romannumerals Romannumerals text
number
number
dimension
intext inmargin
normal bold slanted boldslanted type cap small... command
text
on off
With the variable conversion you set up the type of numbering. You may even use your own
character, for example an em--dash (keyed in as ---). In that case this character is set in front
of each line.
In chapter 9.5 we will explain how we can refer to a linenumber. The parameters prefix and
referencing can be used to unfluence that proces.
In the example below we use the following setup:
\setuplinenumbering[conversion=numbers,step=2,location=intext]
and:
\setuplinenumbering[conversion=characters,step=1,location=intext]
a but when fed to TEX the program
a macro is a piece of text
2 random at first sight
b you will be surprised
a bunch of stupid tokens that
c thanks to macros your text too
4 looks less that awful right
d will look quite organized
You can also mark lines in order to refer to specific line numbers. This will be shown in in
chapter 9.5.
4.15
New page
In some instances it is up to you to force, prevent or encourage a new page.
\page[..,...,..]
...
yes markup no preference bigpreference left right disable last quadruple even odd
blank empty reset
New lines — New page
4
95
92
Layout
The possible set ups are explained in table 4.3. If no setup is used \page will result in a new
page.
setup
result
yes
force a new page
makeup
the same, without fill
no
when possible, avoid page break
preference
when possible, force page break
bigpreference
when possible, force page break, try harder
left
force a left page
right
force a right page
disable
ignore the next \page command
last
add last page(s)
quadruple
add pages until quadruple number of pages
even
go to the next even page
odd
go to the next odd page
blank
insert a completely blank page
empty
insert an empty page (with headers etc.)
reset
reset the disable command
Table 4.3 Setups of \page.
The setups last and quadruple can be used in double sided (reduced) typesetting. The first
setup up will add pages until an even number is obtained, the second set up will add pages
until the next quadruple is reached. When you want to overrule the automatic page numbering
you type the pagenumber yourself:
\page[25]
You can also use a relative number like [+4]. You can use this feature when you want to be
on the safe side and if you don’t know at what page you are.
While generating empty pages you have to take doublesidedness into account, for example:
\page[right,empty,right]
4
New page
96
Layout
4.16
93
Pagenumbers
At any location in the text the pagenumber can be set up with the command:
\setuppagenumbering[..,..=..,..]
alternative
location
conversion
style
left
right
way
text
numberseparator
textseparator
sectionnumber
separator
state
command
singlesided doublesided
header footer left right middle margin marginedge inleft inright
numbers characters Characters romannumerals Romannumerals
normal bold slanted boldslanted type cap small... command
text
text
bytext bysection bypart
text
text
text
yes no
text
start stop
\command#1
The pagenumber position on the page is defined by:
\setuppagenumbering[..,..=..,..]
alternative
location
conversion
style
left
right
way
text
numberseparator
textseparator
sectionnumber
separator
state
command
singlesided doublesided
header footer left right middle margin marginedge inleft inright
numbers characters Characters romannumerals Romannumerals
normal bold slanted boldslanted type cap small... command
text
text
bytext bysection bypart
text
text
text
yes no
text
start stop
\command#1
The position varies with the nature of the document. With conversion we state the way we
want to display the number. With location we define pagenumber positions like the bottom
New page — Pagenumbers
4
97
94
Layout
or top, left or right side or in the margin. You can use combinations of these options. For
example:
\setuppagenumbering[location={header,inmargin}]
alternative=singlesided
alternative=doublesided
left, right
marginedge
middle
middle
margin
margin
Table 4.4 setups to \setuppagenumbering.
Another alternative is {singlesided,doublesided}. In this case headers and footers will be
mirrored in a double--sided document. The backspace is not mirrored (see figure 4.1).
l
r
l
r
l
r
r
l
l
r
r
l
l
r
l
r
l
r
r
l
l
r
r
l
singlesided
single...,double...
doublesided
Figure 4.1 Three ways to mirror.
You can assign text to the parameters left and right. These texts will encloses the pagenumber:
\setuppagenumbering[conversion=romannumerals,left={--˜},right={˜--}]
This will lead to: – viii –. With style you define the font and with state pagenumbering is
switched on and off.
Numbering can become very fancy when you use command to execute an operation. This command has an argument and will be executed every time a pagenumber is placed. A framed
pagenumber can be obtained by:
\setuppagenumbering[command=\inframed]
or partially framed by:
\def\mypagenumber#1%
{\inframed[frame=off,leftframe=on,rightframe=on]{#1}}
4
Pagenumbers
98
Layout
95
\setuppagenumbering[command=\mypagenumber]
In this we use \inframed instead of \framed, because the pagenumber must align with the
texts of the headers and footers.
With textseparator you can define a separator between the section and pagenumber. Default
this is a –. When the pagenumber is to appear at the margin the numberseparator is placed
between the number and the footer text. Default this is a space with a width of 1em.
In interactive documents subpagenumbering is frequently used for hyperlinking. When every
new section is started on a new page the footer text can be set up with:
\setupsubpagenumber
[way=byparagraph]
\setupfootertexts
[screen {\subpagenumber} of {\numberofsubpages}] []
The setup is done with:
\setupsubpagenumber[..,..=..,..]
way
state
bytext bysection bypart
start stop none
and the numbers themselves can be recalled by \subpagenumber and \numberofsubpages.
These numbers are only reliable in headers and footers. In the case of interactive documents
a more abstract definition can be used:
\setupfootertexts[][{\interactionbar[alternative=d]}]
In this case one can jump to the previous and following subpages. The subnumbering can be
reset with [reset].
In a similar fashion one has access to the page number and the total number of pages:
\pagenumber and \totalnumberofpages.
4.17
Headers and footers
Text in the header and footer are set up with the commands:
Pagenumbers — Headers and footers
4
99
96
Layout
\setupheadertexts[.1.][.2.][.3.]
.1.
.2.
.3.
text margin edge
text section date mark pagenumber
text section date mark pagenumber
\setupfootertexts[.1.][.2.][.3.]
.1.
.2.
.3.
text margin edge
text section date mark pagenumber
text section date mark pagenumber
A great number of arguments can be added. When the first argument is left out it is taken for
granted that the footer and header should be place under or over the pagebody (text). The
edge is located at the left side of the margin and is only used in interactive documents where
a extended pagebody is needed.
The key date generates a date and pagenumber generates the pagenumber. Part, chapter and
section titles can be summoned to appear in the header-- and footer text by part, chapter,
paragraph etc. By default the mark mechanism is active. Sectionnumbers can also be recalled:
chapternumber etc.
Setting the state is done for the whole header, so one should use the one--argument version:
\setupheader[state=high]
Those who want more variations in headers and footers can use four instead of two arguments.
Four arguments have only effect in double--sided documents.
\setupfootertexts
[even left][even right]
[odd left][odd right]
So there are different combinations of arguments possible:
\setupheadertexts
\setupheadertexts[mid text]
\setupheadertexts[left text][right text]
\setupheadertexts[left text][right text][left .][right .]
\setupheadertexts[location][left text][right text]
\setupheadertexts[location][left text][right text][left .][right .]
4
Headers and footers
100
Layout
97
Instead of text, one can specify keywords like chapter, date or pagenumber. When the pagenumber is positioned in this way, one should also say:
\setuppagenumbering[location=]
The current setups of the headers and footers are cleared when no values are stated in
\setupfootertexts. Problems can be expected when you use [ ] in your setup. These have
to be enclosed in curly brackets:
\setupfootertexts[chapter][{\currentdate[month,year]}]
The type setting of head-- and foot texts can be influenced by:
\setupheader[...][..,..=..,..]
...
state
strut
style
leftstyle
rightstyle
leftwidth
rightwidth
before
after
text margin
normal stop
yes no
normal bold
normal bold
normal bold
dimension
dimension
command
command
edge
start empty high none nomarking name
slanted boldslanted type cap small... command
slanted boldslanted type cap small... command
slanted boldslanted type cap small... command
and
\setupfooter[...][..,..=..,..]
...
..=..
see p 97: \setupheader
see p 97: \setupheader
As with \setup...texts the first argument is optional. The keys state, before and after
work on all parts of the pagebody, on the main text, the margins and edges.
When ...width is set up the text is clipped at the given width. The key strut is important
when footers or headers contain other objects than text. When strut is set to no, the object is
not corrected for linedepth. You could use the command \showstruts to get some information
on this phenomena.
The setups with state are explained in table 4.5. You should bear in mind that page numbering
will always continue whether or not the pagenumbers are placed.
Headers and footers
4
101
98
Layout
setup
result
normal
visible
none
invisible, no whitespace
empty
one page invisble, whitespace
high
one page visible, no whitespace
start
visible
nomarking
leave out marks
stop
invisible, whitespace
Table 4.5 Setups with \setupheader and \setupfooter.
When setups are done between \start and \stop they will only work locally. This means that
the setups are reset after stop. Headers and footers may appear even while you think new
ones should appear. This is due to the way TEX determines valid breakpoints. One can never
be certain when such an automatic break will occur. The solution is to force a new page by
\page before \stop.
Headers and footers can be switched off on a page by means of:
\noheaderandfooterlines
Next to head-- and footertexts there are also over-- and bottomtexts. These are setup in a similar
way:
\setuptoptexts[.1.][.2.][.3.]
.1.
.2.
.3.
text margin edge
text section date mark pagenumber
text section date mark pagenumber
\setuptexttexts[.1.][.2.][.3.]
.1.
.2.
.3.
4
text margin edge
text section date mark pagenumber
text section date mark pagenumber
Headers and footers
102
Layout
99
\setupbottomtexts[.1.][.2.][.3.]
.1.
.2.
.3.
text margin edge
text section date mark pagenumber
text section date mark pagenumber
\setuptop[...][..,..=..,..]
...
..=..
see p 97: \setupheader
see p 97: \setupheader
\setuptext[...][..,..=..,..]
...
..=..
see p 97: \setupheader
see p 97: \setupheader
\setupbottom[...][..,..=..,..]
...
..=..
see p 97: \setupheader
see p 97: \setupheader
\notopandbottomlines
When the height of an area equals zero, no text is placed. By default the top and bottom area
have zero height, so setting their text areas without setting the height has no effect.
At the instance of a new part or chapter we can deal in a different way with the headers and
footers. Suppose that a default setup looks like this:
\setupheadertexts[pagenumber]
\setupfootertexts[chapter][paragraph]
At the first page of new chapters this may look not too good. Therefore we could state:
\setuphead[chapter][header=empty,footer=empty]
However if we use it in this way we loose the pagenumber. A more adequate solution is:
\definetext[chapter][footer][pagenumber]
with:
Headers and footers
4
103
100
Layout
\setuphead[chapter][header=high,footer=chapter,page=right]
we obtain the desired effect. The pagenumber appears in the foot and the header disappears
completely. These kind of commands are essential when you don’t want to define all kinds
of setups locally in a text, for example before every new chapter. This mechanism only works
when going to a new page enabled.
\definetext[.1.][.2.][.3.][.4.][.5.]
.1.
.2.
.3.
.4.
.5.
4.18
name
header footer
text
text
text
Footnotes
In some texts you can’t do without footnotes. The footnote marker is placed in the text and
the note itself is typeset at another location in the text, usually at the bottom of the page. Most
often at the bottom of the page.
\footnote[ref]{...}
...
text
A footnote number or --symbol is recalled with:
ð ñ
\note[ref]
An example of footnotes is given below.
The first compositions of the American composer Steve Reich will probably
only appreciated by the most \quote {purist} among those who like
minimal||music \footnote {A decent minimal is not so much characterized by
a minimal use of musical instruments, but more by subtle shifts in
polyphonic rhythms.}, his later works, like \quote {The Desert Music}, are
compositions for full orchestra, where the orchestra is extended with a for
Reich characteristic rhythm section \footnote {In most cases this section
consists of pianos, marimbas and xylophones.} and choir. Together
4
Headers and footers — Footnotes
104
Layout
101
with John Adams, \footnote {His \quote {Fearful Symmetries} is a perfect mix
of classic, jazz, swing and pop music.} Reich can be considered one of
today’s leading composers. It is, however, a pity that they can only be seen
\footnote {The nice thing about compositions like \quote {Drumming} and
\quote {Sextet} is de fact that \quotation {what the ear hears} differs
from what the \quotation {eye sees happening}.} and heard at the smaller
broad companies, like the \cap {VPRO}. \footnote{A non commercial Dutch
broadcast company.} \footnote {Sometimes also at other companies, because
somehow this kind of music is quite suited for impressive and|/|or
melodramatic documentaries.}
Undesired spaces are ignored. Spacing between two footnote numbers or symbols is taken care
of. The result looks like this:
The first compositions of the American composer Steve Reich will probably only appreciated
by the most ‘purist’ among those who like minimal--music 7, his later works, like ‘The Desert
Music’, are compositions for full orchestra, where the orchestra is extended with a for Reich
characteristic rhythm section 8 and choir. Together with John Adams, 9 Reich can be considered
one of today’s leading composers. It is, however, a pity that they can only be seen 10 and heard
at the smaller broad companies, like the VPRO. 11 12
The type setting of the footnote can be setup with the command below that is defined in the
setup area of your document.
7
8
9
10
11
12
A decent minimal is not so much characterized by a minimal use of musical instruments, but more by subtle shifts in
polyphonic rhythms.
In most cases this section consists of pianos, marimbas and xylophones.
His ‘Fearful Symmetries’ is a perfect mix of classic, jazz, swing and pop music.
The nice thing about compositions like ‘Drumming’ and ‘Sextet’ is de fact that “what the ear hears” differs from what
the “eye sees happening”.
A non commercial Dutch broadcast company.
Sometimes also at other companies, because somehow this kind of music is quite suited for impressive and/or melodramatic documentaries.
Footnotes
4
105
102
Layout
\setupfootnotes[..,..=..,..]
conversion
way
location
rule
before
after
width
height
bodyfont
style
distance
columndistance
margindistance
n
numbercommand
..=..
numbers characters Characters romannumerals Romannumerals
bytext bysection
page text columns high
on off
command
command
dimension
dimension
5pt ... 12pt small big
normal bold slanted boldslanted type cap small... command
dimension
dimension
dimension
number
\command#1
see p 258: \framed
By default footnotes are placed at the bottom of a page. When using columns you can set
location to columns so that the footnotes appear in the last column.
We can frame footnotes, place them in columns and decouple them from a page. The meaning
of this last option is explained in an example.
\startlocalfootnotes[n=0]
\placetable
{A (latin) table.}
\placelegend
{\starttable[|l|r|]
\HL
\VL Nota \footnote {Bene} \VL Bene \footnote {Nota} \VL\FR
\VL Bene \footnote {Nota} \VL Nota \footnote {Bene} \VL\LR
\HL
\stoptable}
{\placelocalfootnotes}
\stoplocalfootnotes
The table enables the float placement mechanism, so we don’t know on which page the table
nor the footnotes will appear. So the footnotes are coupled to the table by using local footnotes.
4
Footnotes
106
Layout
103
Nota 1
Bene 2
Bene 3
Nota 4
1Bene
2Nota
3Nota
4Bene
Table 4.6 A (latin) table.
\startlocalfootnotes ... \stoplocalfootnotes
..=..
see p 102: \setupfootnotes
\placelocalfootnotes[..,..=..,..]
..=..
see p 102: \setupfootnotes
Footnotes can be placed at the end of a chapter or a document. The key location is set at
text and we use the following command to place the footnotes:
\placefootnotes[..,..=..,..]
..=..
see p 102: \setupfootnotes
When n is set at 2, you can display the footnotes in columns. This should be done at an early
stage because TEX is using the dimensions of the footnotes to determine the page break. More
information can be found in the source code of the ConTEXt module: core-not.tex.
The next example demonstrates that footnote numbers can be replaced by footnote symbols.
In this example conversion is set at set 3.
note: use footnotes sparingly ∗
note: be brief ∗∗
note: no notes are even better ∗ ∗ ∗
Default the key numbercommand is set \high, but other setups are allowed. You can also work
with:
∗ During the development of ConT Xt the footnote mechanism was one of the first real challenges. And I’m challenged
E
still since I just encountered documents with footnotes within footnotes.
∗∗ Why? See note ∗.
∗ ∗ ∗ QED.
Footnotes
4
107
104
Layout
\setupfootnotedefinition[..,..=..,..]
..=..
see p 225: \definedescription
to define the exact way of how to display the footnotes, because the standard definition mechanism is used (see section ??).
4.19
Aligned boxes
TEX is basically aware of two kind of boxes: \hbox and \vbox. A horizontal \hbox can be
considered a line, a \vbox a paragraph. There are two types of vertical boxes: a \vbox aligns
on the baseline of the last line, while a \vtop aligns on the first line.
\hbox{\hbox{one} \vbox{two\par three} \vtop{four\par five}}
When we make the frames visible —in this case we said \showboxes in advance— the example
above becomes:
two
one three
four
five
In addition ConTEXt provides a lot of alternative boxes, like: \cbox, \lbox and \rbox. These
commands can be used while defining your own macros, but will seldom appear in the running
text. Like in \hbox and \vbox the dimension of the width can be added.
\cbox{... text ...}
\lbox to 4cm{... text ...}
The reader is invited to experiment with these commands. A new line is forced with \\.
For some very dedicated purposes there is \sbox. This command is used to give a box the
height of a strut. You may forget this command.
To another category of boxes belong \tbox and \bbox. Both are used within tables. Look at
the example below that illustrates their use.
aa
\hbox
4
a
a
\vbox
a
a
\vtop
a
a
\lbox
a
a
\cbox
a
a
a
a
\rbox
\sbox
aa
aa
\tbox
\bbox
Footnotes — Aligned boxes
108
Layout
105
The \tbox and \bbox are also used in figures.
\hbox
\vbox
\sbox
\tbox
\bbox
In ConTEXt a complete repertoire of macros is available that relies on boxes. For example we
can add cutmarks to a box:
\setbox0=\vbox{The Final Cut\par --- \em Pink Floyd}
\makecutbox0 \box0
Be aware of the fact that such marks lie outside the boxes.
The Final Cut
— Pink Floyd
We can visualize boxes by using \ruledhbox, \ruledvbox and \ruledvtop instead of \hbox,
\vbox and \vtop. With \showmakeup we can visualise everything automatically and we can
get some insight on the features of ConTEXt and TEX.
The next example shows that we can use TEX for more than only the straight forward typesetting. However, to be able to do this, one should have some insight in the manipulation of
boxes. We use buffers to enhance comprehensibility.
\startbuffer[water]
Drink geen water \crlf direct uit de kraan! \blank
\start
\tfx \setupinterlinespace Het drinkwater is tijdelijk niet betrouwbaar.
Kook het water voor consumptie ten minste 2˜minuten. Zodra het water
weer betrouwbaar is, krijgt u bericht. \par
\stop
\blank[2*big]
\language[en] Do not drink water \crlf directly from the tap! \blank
\start
\tfx \setupinterlinespace The water is temporarily unfit for drinking.
Boil the water during at least 2˜minutes before consumption. As soon
as the water is reliable again, you will be notified. \par
Aligned boxes
4
109
106
Layout
\stop
\stopbuffer
This text is typeset in a framed box. We use two temporary boxes. The first determines the height of the second one. Instead of \tfx\setupinterlinespace you could use
\switchtobodyfont to switch to a narrower bodyfont. ([small]). The \par is essential!
\framed[offset=\bodyfontsize]
{\setbox0=\vbox
{\hsize 16em\switchtobodyfont[ss]\getbuffer[water]}
\setbox2=\vbox to \ht0
{\vfill\externalfigure[vew1091a][width=5cm]\vfill}
\hskip1em\box2\hskip1em\box0\hskip1em}
The result —an example of a drinking water warning— is shown below.
Drink geen water
direct uit de kraan!
Het drinkwater is tijdelijk niet betrouwbaar. Kook het water voor consumptie ten
minste 2 minuten. Zodra het water weer
betrouwbaar is, krijgt u bericht.
Do not drink water
directly from the tap!
The water is temporarily unfit for drinking. Boil the water during at least 2 minutes before consumption. As soon as the
water is reliable again, you will be notified.
4.20
Makeup
A document may have a titlepage, a colofon and some pages that are not directly related to the
main part of the document. Mostly these pages are not numbered and can do without headers
and footers. Because their layout needs extra attention we prefer the word makeup for defining
their specific layout.
4
Aligned boxes — Makeup
110
Layout
107
The commands \startstandardmakeup and \stopstandardmakeup exclude text from the
standard pagebody and its layout. Below a simple example is given. You will notice commands
like \vfill, \blank, \tf and even \crlf and \vskip.
\startstandardmakeup
\tfd Jobs around the house \blank[2*big]
\tfb Part 1: Gas, water and electricity \vfill
\tfb J. Hagen \crlf A.F. Otten \blank
\tfb Hasselt \crlf \currentdate[month,year]
\stopstandardmakeup
In double--sided documents an empty page is generated that functions as the backside of the
title page. However sometimes this backside should also be typeset.
\startstandardmakeup[doublesided=no]
... the front
\stopstandardmakeup
\startstandardmakeup[page=no]
... the back
\stopstandardmakeup
Because double--sided typesetting is turned off, a backside page is not generated. And because
the key page is no the next page does not get the layout of a right hand side page (this would
be default).
With the command \showframe frames can be made visible (temporarily) around the made up
text. This is very convenient during the typesetting of separate pages.
Next to the command \startstandardmakeup one can define his own layout with different
dimensions by means of:
\definemakeup[...][..,..=..,..]
...
..=..
name
see p 108: \setupmakeup
Makeup
4
111
108
Layout
\setupmakeup[...][..,..=..,..]
...
width
height
voffset
hoffset
page
commands
doublesided
headerstate
footerstate
textstate
topstate
bottomstate
name
dimension
dimension
dimension
dimension
left yes right
command
yes no empty
normal stop start empty none nomarking
normal stop start empty none nomarking
normal stop start empty none nomarking
stop start
stop start
\startnamemakeup ... \stopname
The first command generates a \start...stop--pair between which the new typesetting commands can be typed. Bij default the result of this new layout is typeset on an empty page. The
new layout is marked with name, for selection at a later stage (see section ??).
The commands that are provided after the key commands are executed immediately when a
new layout is called. In this local layouts can be defined.
4
Makeup
112
113
110
\CAP
119
\Cap
119
\cap
119
\Caps
119
\characters
119
\defineaccent
129
\definebodyfont
126, 129
\definebodyfontenvironment
129
\definecasemap
129
\definecharacter
129
\definecommand
129
\definefont
129
\definefontsynonym
129
\definestyle
129
\em
118
\enablembox
126
\ix
113
\mf
126
\nocap
119
\setupbodyfont
113
\setupbodyfontenvironment
129
\setupcapitals
119
\setuptype
122
\setuptyping
122
\showbodyfontenvironment
129
\startencoding
129
\startmapping
129
\starttyping
122
\switchtobodyfont
\tex
122
\typ
122
\type
122
\typefile
122
\viii
113
\Word
119
\Words
119
\WORDS
119
\x
113
\xi
113
\xii
113
113
114
Typography
111
Through the millennia we have developed and adapted methods for storing facts and thoughts
on a variety of different medium. A very efficient way of doing this is using logograms, like
Chinese have done for ages. Another method is to represent each syllable in a word by a
symbol, like the Japanese do when writing telegrams. However, the most familiar way of storing
information is using a limited set of pictures representing so called phonemes. Such a collection
is called an alphabet, and often the same glyph is used for different sounds.
5
Typography
5.1
Introduction
Although TEX is primarily meant for typesetting languages that use this third method, in principle the other two can also be dealt with. In this manual we will focus on the languages that
use such alphabets.
The little pictures representing the characters that make up an alphabet are more or less standardized, and thereby can be recognized by readers, even if their details differ. Such a collection
of pictures, often called glyphs, make up a font.
gap gap gap gap
From left to right we see the Computer Modern, a Lucida Bright, a Times Roman and an Antiqua
Torunka font, all scaled to 60pt. Fonts colections are designed in such a way that the overall
appearance of a page looks good and that reading is as comfortable as possible.
lap lap lap lap
Within a font design there can be variations. In the example above we see a normal, a bold, an
italic, and a bold italic alternative of the Lucida Bright font.
Introduction
5
115
112
Typography
The distance between the individual glyphs in a word depend on the combinations of these
glyphs. In the next sample, the gap between the b and the o as well as the distance between
the o and the x is slightly altered. This is called kerning.
box
box
Here we show a Computer Modern, the default TEX font. This font is designed by Donald Knuth
and is a variation on a Monotype Times font. The Computer Modern has many kerning pairs,
while the Lucida Bright used in this manual has none.
This kind of micro--typography is not to be altered by the user. It is part of the font design.
However the user can alter fonts and interline spacing and some more aspects on the level of
macro--typography. The choice of font is the main topic of this chapter.
There are different ways to classify fonts. There are classification systems based on times of development, the characteristics of the fonts or the font application, for example in a newspaper
or a book.
ok ok ok ok ok
In this example we see five font styles of Lucida: the Bright, Sans, Typewriter, Handwriting and
Calligraphy. This is one of the few examples of a font collection that provides many consistent
alternative styles. The Computer Modern is another example of a rather complete font. It is
one of the few fonts that comes with dedicated design sizes. The example below shows the
differences of a 5, 7, 9, 12 and 17 point design scaled up to 48 points. Such nuances in font
size are seldom seen these days.
ok ok ok ok ok
5
Introduction
116
Typography
113
The general appearance of a style can be classified according to many schemes. In table 5.1 we
see some examples of the naming of styles.
Serif
Sans
Mono
Regular Support Mono
Roman
Sans
Type
Table 5.1 Some ways of classifying the styles in a font.
The first two series are used by typographers, however in ConTEXt we rather use the last series
because it is traditionally used in plain TEX. The command \rm is used to switch to a roman/
serif/regular style, and \tt for switching to mono spaced or typewriter style.
In the next sections we will go into switching of font styles and fonts in your documents. Note
that the font switching mechanism is rather complex. This is caused by the different modes
like math mode and text mode in ConTEXt. If you want to be able to understand the mechanism
you will have to acquaint yourself with the concept of the encoding vector and obtain some
knowledge on fonts and their peculiarities.
5.2
The mechanism
Font switching is one of the eldest features of ConTEXt because font switching is indispensable in a macropackage. The last few years extensions to the font switching mechanism were
inevitable. We have chosen the following starting points during the development of this mechanism:
• To change a style must be easy, this means switching to: roman (serif, regular), sans serif
(support), teletype (or monospaced) etc. (\rm, \ss, \tt etc.)
• More than one variations of character must be available like slanted and bold (\sl and \bf).
• Different font families like Computer Modern Roman and Lucida Bright must be supported.
• Changing the bodyfont must also be easy, and so font size between 8pt and 12pt must be
available by default.
• Within a font different sub-- and superscripts must be available. The script sizes can be
used during switching of family, style and alternative.
Introduction — The mechanism
5
117
114
Typography
• Specific characteristics of a body font like font definition (encoding vector) must be taken
into account.
Text can be typeset in different font sizes. We often use the unit pt to specify the size. The
availability of these font sizes are defined in definition files. Traditionally font designers used
to design a glyph collection for each font size, but nowadays most fonts have a design size of
10 points. An exception to this rule is the Computer Modern Roman that comes with most TEX
distributions.
The most frequently used font sizes are predefined: 8, 9, 10, 11, 12 and 14.4 points. When you
use another size —for example for a titlepage— ConTEXt will define this font itself within the
constraints of the used typeface. ConTEXt works with a precision of 1 digit which prevents
unnecessary loading of fontsizes with small size differences. When a fontsize is not available
ConTEXt prefers to use a somewhat smaller font size. We consider this to be more tolerable
than a somewhat bigger font size.
The bodyfont (main font), font style and size is set up with:
\setupbodyfont[..,...,..]
...
name serif regular roman sans support sansserif mono type teletype handwritten
calligraphic 5pt ... 12pt
In a running text a temporary font switch is done with the command:
\switchtobodyfont[..,...,..]
...
5pt ... 12pt small big global
This command doesn’t change the bodyfont in headers and footers. With small and big you
switch to a smaller or larger font.
In most cases, the command \setupbodyfont is only used once: in the styledefinition.
Fontswitching is done with \switchtobodyfont. Don’t mix these two up because this may
lead to some rather strange but legitimate effects.
TEX searches for font information in the file with the extension tfm. Pre--loading is possible
but ConTEXt will only load these files when necessarry. The reason is that filenames can differ
per distribution.
The font used in headers, footers and footnotes are adapted automatically. This includes the
interline space and vertical whitespaces. Font switches with \vi, \vii, \viii, \ix, \x, \xi
and \xii have only local effects.
5
The mechanism
118
Typography
115
The commands:
{\xii
{\xi
{\x
{\ix
{\viii
with these commands
for font switching
it is possible to
produce an eyetest:
a x c e u i w m q p
\par}
\par}
\par}
\par}
\par}
When changing the size of the bodyfont, the interline space is adapted automatically. This is
shown on the left. On the right we see what happens when the interline space is not adapted.
5.3
with these commands
with these commands
for font switching
for font switching
it is possible to
it is possible to
produce an eyetest:
produce an eyetest:
axceuiwmqp
axceuiwmqp
Font switching
The mechanism to switch from one style to another is rather complex and therefore hard to
explain. To begin with, the terminology is a bit fuzzy. We call a collection of font shapes,
like Lucida or Computer Modern Roman a family. Within such a family, the members can be
grouped according to characteristics. Such a group is called a style. Examples of styles within
a family are: roman, sans serif and teletype. We already saw that there can be alternative
classifications, but they all refer to the pressence of serifs and the glyphs having equal widths.
In some cases handwritten and/or calligraphic styles are also available. Within a style there
can be alternatives, like boldface and slanted.
There are different ways to change into a new a style or alternative. You can use \ss to switch
to a sans serif font style and \bf to get a bold alternative. When a different style is chosen, the
alternatives adapt themselves to this style. Often we will typeset the document in one family
and style. This is called the bodyfont.
A consequent use of commands like \bf and \sl in the text will automatically result in the
desired bold and slanted altermatives when you change the family or style in the setup area
of your input file. A somewhat faster way of style switching is done by \ssbf, \sssl, etc. but
this should be used with care, since far less housekeeping takes place.
The alternatives within a style are given below. The abbreviation \sl means slanted, \it means
italic and \bf means boldface. Sometimes \bs and \bi are also available, meaning bold slanted
The mechanism — Font switching
5
119
116
Typography
and bold italic. When an alternative is not known, ConTEXt will choose a suitable replacement
automatically.
With \os we tell ConTEXt that we prefer mediaeval or old--style numbers 139 over 139. The
\sc generates Small Caps. With an x we switch to smaller font size, with a, b, c and d to a
bigger one. The actual font style is stated by \tf or typeface.
\tfa \tfb \tfc \tfd
\tfx \bfx \slx \itx
\bf \sl \it \bs \bi \sc \os
It depends on the completeness of the font definition files whether alternatives like \bfa,
\bfb, etc. are available. Not all fonts have for instance italic and slanted or both their bold
alternatives. In such situations, slanted and italic are threated as equivalents.
Switching to a smaller font is accomplished by \tfx, \bfx, \slx, etc., which adapt themselves
to the actual alternative. An even more general downscaling is achieved by \tx, which adapts
itself to the style and alernative. This command is rather handy when one wants to write
macros that act like a chameleon. Going one more step smaller, is possible too: \txx. Using
\tx when \tx is already given, is equivalent to \txx.
Frequent font switching leads to longer processing times. When no sub- or superscripts are
used and you are very certain what font you want to use, you can perform fast font switches
with: \rmsl, \ssbf, \tttf, etc.
Switching to another font style is done by:
\rm \ss \tt \hw \cg
When \rm is chosen ConTEXt will interpret the command \tfd as \rmd. All default font setups
use tf--setups and will adapt automatically.
The various commands will adapt themselves to the actual setup of font and size. For example:
{\rm test {\sl test} {\bf test} \tfc test {\tx test} {\bf test}}
{\ss test {\sl test \tx test} {\bf test \tx test}}
will result in:
test test test
test test test
test test test test
test
When a character is not available the most acceptable alternative is chosen.
We will not go into the typographical sins of underlining. These commands are discussed in
section 11.5 (“Underline”).
5
Font switching
120
Typography
5.4
117
Characters
A number of commands use the parameter style to set up the font style and size. You can
use commands like \sl or \rma or keywords like:
normal bold slanted boldslanted italic bolditalic type
small smallbold smallslanted ... smallitalic ... smalltype
capital
The parameter mechanism is rather flexible so with the parameter style you can type bold
and \bf or bf. Even the most low level kind of font switching commands like 12ptrmbf are
permitted. This is fast but requires some insight in macros behind this mechanism.
5.5
Available alternatives
There are only a few font families that can handle math. There is the Computer Modern Roman,
the very beautiful Lucida Bright that we prefer in electronic documents, and of course one can
use the ‘prefered by publishers font’ Times. These fonts carry a complete set of characters
and symbols for mathematical typesetting. Among these, the Computer Modern Roman distinguishes itself by its many design sizes, which pays off when typesetting complicate math.
On this design there are a few variations called Euler and Concrete. 16
The Computer Modern Roman contains 70 charactertypes and sizes. Because a number of
charactersizes are not defined the 11 point characters are defined as scaled 9 and 10 point
characters under the option cmr. With eul and con we obtain a Computer Modern.
\showbodyfont[..,...,..]
...
see p 114: \setupbodyfont
With the command \showbodyfont an overview is generated of the available characters. Below
the 12pt--body font Computer Modern Roman (cmr) is shown. The close reader will note that
not all alternatives are available by default.
16
See Concrete Mathematics by Knuth cs., an outstanding book from the perspective of typography and didactically.
Font switching — Characters — Available alternatives
5
121
118
Typography
[cmr,12pt]
\tf \sc \sl \it \bf \bs \bi \tfx \tfxx \tfa \tfb \tfc
\tfd
Ag
Ag
Ag
Ag
Ag
Ag
\rm
Ag
Ag
Ag
Ag
Ag Ag
Ag
Ag
Ag
\ss
Ag
Ag
Ag
Ag
Ag
Ag
Ag
Ag
Ag
\tt
Ag
Ag
Ag
Ag
Ag
Ag
Ag
Ag
Ag
Ag
Ag Ag
Ag Ag
Ag
We can see that the 12pt Lucida Bright (lbr) is somewhat bigger than the 12pt Computer
Modern Roman. An x--character for example \bfx is 2pts smaller than the actual typeface.
The bigger characters are scaled by TEX’s \magstep.
[lbr,12pt]
\tf \sc \sl \it \bf \bs \bi \tfx \tfxx \tfa \tfb \tfc \tfd
\rm Ag
Ag
Ag
Ag
Ag Ag Ag
Ag
Ag
Ag
\ss Ag
Ag
Ag
Ag
Ag Ag
Ag
Ag
Ag
Ag
\tt Ag
Ag
Ag
Ag
Ag
Ag
Ag
Ag
Ag
Ag
Ag
Ag Ag
Ag Ag
Ag
Ag
Ag
Ag
A last remark. When you have chosen a larger charactersize, for example \tfb, then \tf equals
\tfb, \bf equals \bfb, etc. This method is preferable over returning to the original character
size.
5.6
Emphasize
Within most macropackages the command \em is available. This command behaves like a
chameleon which means that it will adapt to the actual typeface. In ConTEXt \em has the
following characteristics:
• a switch to slanted or italic is possible
• a switch within \bf results in bold slanted or bold italic (when available)
• a so called italic correction is performed automatically (\/)
The bold italic or bold slanted characters are supported only when \bs and \bi are available.
5
Available alternatives — Emphasize
122
Typography
119
The mnemonic {\em em} means {\em emphasis}.
{\em The mnemonic {\em em} means {\em emphasis}.}
{\bf The mnemonic {\em em} means {\em emphasis}.}
{\em \bf The mnemonic {\em em} {\em emphasis}.}
{\it The mnemonic em {\em means \bf emphasis}.}
{\sl The mnemonic em {\em means \bf emphasis}.}
This results in:
The mnemonic em means emphasis.
The mnemonic em means emphasis.
The mnemonic em means emphasis.
The mnemonic em emphasis.
The mnemonic em means emphasis.
The mnemonic em means emphasis.
The advantage of the use of \em over \it and/or \sl is that consistent typesetting is enforced.
By default emphasis is set at slanted, but in this text it is set at italic. The setting is made by:
\setupfontenvironment[default][em=italic]
5.7
Capitals
Words and abbreviations can be typeset in capitals. Both small and big characters are converted
into capitals. When \cap is used to typeset a capital the size is that of an \tx. When we switch
to slanted (\sl), bold (\bf), etc. the capital letter will also change. Since \cap has a specific
meaning in math mode, the format implementation is called \kap. However in text mode one
can use \cap.
\kap{...}
...
text
\Cap{...}
...
text
Emphasize — Capitals
5
123
120
Typography
\CAP{...}
...
text
\Caps{..
...
... ..}
text
The first command converts all letters to a capital. We advise you not to type capital letters in
your source file because real small caps distinguishes between small and big letters.
Capitals for \cap {UK} are \cap {OK} and capitals for \cap {USA} are
okay. But what about capitals in \cap {Y2K}.
this results in:
Capitals for
UK
are
OK
and capitals for
USA
are okay. But what about capitals in
Y2K.
A \kap within a \kap will not lead to any problems:
\kap {People that have gathered their \kap {capital} at the cost of other
people are not seldom \nokap {decapitated} in revolutionary times.}
or:
PEOPLE THAT HAVE GATHERED THEIR
CAPITAL
AT THE COST OF OTHER PEOPLE ARE NOT SELDOM decapitated IN
REVOLUTIONARY TIMES.
In this example we see that \cap can be temporarily revoked by \nocap.
\nocap{...}
...
text
The command \Cap changes the first character of a word into a capital and \CAP changes letters
that are preceded by \\ into capital letters. With \Caps you can change the first character of
several words into a capital letter.
\setupcapitals[..,..=..,..]
title
sc
5
yes no
yes no
Capitals
124
Typography
121
With this command the capital mechanism can be set up. The key sc=yes switches to real
Small Caps. With title we determine whether capitals in titles are changed.
Next to the former \cap--commands we have:
\Word{...}
...
text
and
\Words{..
...
... ..}
text
These commands switch the first characters of words into capitals. All characters in a word
are changed with:
\WORD{...}
...
text
We end this section with real small capitals. When these are available the real small caps \sc
are preferred over the pseudo--capital in abbreviations and logos.
In a manual on \TeX\ and Con\TeX t there is always the question whether to
type \kap{\TeX} and \kap{Con\TeX t} or {\sc \TeX} and {\sc Con\TeX t}. Both
are defined as a logo in the style definition so we type \type {\TEX} and
\type {\CONTEXT}, which come out as \TEX\ and \CONTEXT.
Results in:
In a manual on TEX and ConTEXt there is always the question whether to type TEX and CONTEXT
or TEX and ConTEXt. Both are defined as a logo in the style definition so we type \TEX and
\CONTEXT, which come out as TEX and ConTEXt.
It is always possible to typeset text in small capitals. However, realize that lower
case characters discriminate more and make for an easier read.
An important difference between \kap and \sc is that the last command is used for a specific
designed font type. The command \kap on the other hand adapts itself to the actual typeface:
KAP, KAP, KAP, etc.
Capitals
5
125
122
Typography
Some typesetting packages stretch words (inter character spacing) to reach an acceptable alignment. In ConTEXt this not supported. On purpose! Words in titles can be stretched by:
\stretched{...}
...
text
\hbox to \hsize {\stretched{there\\is\\much\\stretch\\in ...}}
\hbox to 20em
{\stretched{... and\\here\\somewhat\\less}}
With \\ we enforce a space ({} is also allowed).
t h e r e
i s
m u c h
... and here somewhat less
s
t
r
e
t
c
h
i
n
.
.
.
These typographically non permitted actions are only allowed in heads. The macros that take
care of stretching do this by processing the text character by character.
5.8
Verbatim text
Text can be displayed in verbatim (typed) form. The text is typed between the commands:
\starttyping ... \stoptyping
Like in:
\starttyping
In this text there are enough examples of verbatim text. The command
definitions and examples are typeset with the mentioned commands. Like in
this example.
\stoptyping
For in--line typed text the command \type is available.
\type{...}
...
text
A complete file can be added to the text with the command:
5
Capitals — Verbatim text
126
Typography
123
\typefile{...}
...
file
The style of typing is set with:
\setuptyping[...][..,..=..,..]
...
space
page
option
text
icommand
vcommand
ccommand
before
after
margin
evenmargin
oddmargin
blank
escape
indentnext
palet
color
file typing name
on off
yes no
slanted normal commands color none
yes no
command
command
command
command
command
dimension standard
dimension
dimension
dimension small medium big standard halfline line
/
yes no
name colorpretty
name
This setup influences the display verbatim (\starttyping) and the verbatim typesetting of files
(\typefile) and buffers (\typebuffer). The first optional argument can be used to define a
specific verbatim environment.
\setuptyping[file][margin=default]
When the key space=on, the spaces are shown:
NoÀalignmentÀisÀtoÀbeÀpreferred
overÀÀÀaligningÀÀÀbyÀÀÀmeansÀÀof
spacesÀorÀtheÀsÀtÀrÀeÀtÀcÀhÀiÀnÀgÀofÀwords
A very special case is:
\definetyping
[broadtyping]
Verbatim text
5
127
124
Typography
\setuptyping
[broadtyping]
[oddmargin=-1.5cm,evenmargin=-.75cm]
This can be used in:
\startbroadtyping
A verbatim line can be very long and when we don’t want to hyphenate we
typeset it in the margin on the uneven pages.
\stopbroadtyping
At a left hand side page the verbatim text is set in the margin.
A verbatim line can be very long and when we don’t want to hyphenate we
typeset it in the margin on the uneven pages.
An in--line verbatim is set up by:
\setuptype[..=..]
space
option
color
on off
slanted normal none
name
When the parameter option is set at slanted all text between << and >> is typeset in a slanted letter. This feature can be used with all parameters. In this way
\type{aa<<bb>>cc} will result in: aabbcc.
For reasons of readability you can also use other characters than { and } as outer parenthesis.
You can choose your own non--active (a non--special) character, for example:
\type+like this+ or \type-like that-. Furthermore you can use the mentioned << and
>>, as in \type<<like this>> or even \type<like that>.
The parameter option=commands enables you to process commands in a typed text. In this
option \ is replaced by /. This option is used for typesetting manuals like this one. For example:
\seethis <</rm : this command has no effect>>
/vdots
\sihtees <</sl : neither has this one>>
The double << and >> overtake the function of {}.
Within the type--commands we are using \tttf. When we would have used \tt, the \sl would
have produced a slanted and \bf a bold typeletter. Now this will not happen:
5
Verbatim text
128
Typography
\seethis
.
.
.
\sihtees
125
: this command has no effect
: neither has this one
One of the most interesting options of typesetting verbatim is a program source code. We
will limit the information on this topic and refer readers to the documentation in the files
verb-xxx.tex and cont-ver.tex. In that last file you can find the following lines:
\definetyping
\definetyping
\definetyping
\definetyping
[MP]
[PL]
[JS]
[TEX]
[option=MP]
[option=PL]
[option=JS]
[option=TEX]
Here we see that it is possible to define your own verbatim environment. For that purpose we
use the command:
\definetyping[...][..,..=..,..]
...
..=..
file typing name
see p 123: \setuptyping
The definitions above couple such an environment to an option.
\startMP
beginfig (12) ;
MyScale = 1.23 ;
draw unitsquare scaled MyScale shifted (10,20) ;
endfig ;
\stopMP
In color (or reduced gray) this will come out as:
beginfig (12) ;
MyScale = 1.23 ;
draw unitsquare scaled MyScale shifted (10,20) ;
endfig ;
These environments take care of typesetting the text in such a way that the typographics match
the chosen language. It is possible to write several filters. Languages like METAPOST, META
FONT, Perl, JavaScript, sql, and off course TEX are supported. By default color is used to
display these sources, where several palettes take care of the different commands. That is why
Verbatim text
5
129
126
Typography
you see the parameter palet in \setuptyping. One can use font changes or even own commands instead, by assigning the appropriate values to the icommand (for identifiers), vcommand
(for variables) and ccommand parameters (for the rest). By default we have:
\setuptyping [icommand=\ttsl, vcommand=, ccommand=\tf]
We have some alternatives for \type. When typesetting text with this command the words are
not hyphenated. Hyphenation is performed however when one uses:
\typ{...}
...
text
When you are thinking of producing a manual on TEX you have two commands that may serve
you well:
\tex{...}
...
text
\arg{...}
...
text
The first command places a \ in front of typed text and the second command encloses the text
with {}.
5.9
Math
Many TEX users have chosen TEX for its superb math type setting. The math oriented character
of TEX has also influenced the font mechanism. We will not go into any details but the central
key is the family. There is a font family for \bf, \it, etc. Within a family we distinguish three
members: text, script and scriptscript, or a normal, smaller and smallest font. The normal font
size is used for running text and the smaller ones for sub and superscripts. The next example
will show what the members of a font family can do.
$\tf
$\tf
$\tf
$\tf
5
xˆ2+\bf
xˆ2+\bf
xˆ2+\bf
xˆ2+\bf
xˆ2+\sl
xˆ2+\sl
xˆ2+\sl
xˆ2+\sl
xˆ2+\it
xˆ2+\it
xˆ2+\it
xˆ2+\it
xˆ2+\bs
xˆ2+\bs
xˆ2+\bs
xˆ2+\bs
xˆ2+
xˆ2+
xˆ2+
xˆ2+
\bi
\bi
\bi
\bi
xˆ2
xˆ2
xˆ2
xˆ2
=\rm
=\tf
=\bf
=\sl
6xˆ2$
6xˆ2$
6xˆ2$
6xˆ2$
Verbatim text — Math
130
Typography
127
When this is typeset you see this:
x2 + x2 + x 2
x2 + x2 + x 2
x 2 + x2 + x 2
x 2 + x2 + x 2
+ x2
+ x2
+ x2
+ x2
+ x2
+ x2
+ x2
+ x2
+ x2
+ x2
+ x2
+ x2
= 6x2
= 6x2
= 6x2
= 6x 2
We can see that the characters adapt but that the symbols are typeset in the same font. Technically this means that the symbols are set in font family 0 (there are 16 families) and in this
case that is default \tf.
It can also be done somewhat differently as we will see in the next example. A new command
is used: \mf, which stands for math font. This command takes care of the symbols in such a
way that they are set in the actual font. 17
x2 + x 2 + x 2 + x 2 + x 2 + x 2 = 6x2
x2 + x2 + x2 + x2 + x2 + x2 = 6x2
x 2 + x 2 + x 2 + x 2 + x 2 + x 2 = 6x 2
x 2 + x 2 + x 2 + x 2 + x 2 + x 2 = 6x 2
x 2 + x 2 + x 2 + x 2 + x 2 + x 2 = 6x 2
x 2 + x 2 + x 2 + x 2 + x 2 + x 2 = 6x 2
You should take into account that TEX typesets a formula as a whole. In some cases this means
that setups at the end of the formula have effect at the beginning.
$\tf\mf
$\bf\mf
$\sl\mf
$\bs\mf
$\it\mf
$\bi\mf
xˆ2
xˆ2
xˆ2
xˆ2
xˆ2
xˆ2
+
+
+
+
+
+
xˆ2
xˆ2
xˆ2
xˆ2
xˆ2
xˆ2
+
+
+
+
+
+
xˆ2
xˆ2
xˆ2
xˆ2
xˆ2
xˆ2
+
+
+
+
+
+
xˆ2
xˆ2
xˆ2
xˆ2
xˆ2
xˆ2
+
+
+
+
+
+
xˆ2
xˆ2
xˆ2
xˆ2
xˆ2
xˆ2
+
+
+
+
+
+
xˆ2
xˆ2
xˆ2
xˆ2
xˆ2
xˆ2
=
=
=
=
=
=
6xˆ2$
6xˆ2$
6xˆ2$
6xˆ2$
6xˆ2$
6xˆ2$
The exact location of \mf is not that important. We also could have typed:
$\bf xˆ2 + xˆ2 + xˆ2 + xˆ2 + xˆ2 + xˆ2 = \mf 6xˆ2$
One other aspect of fonts in math mode is the way reserved names like \sin and \cos are
typeset.
$\bf xˆ2 + \hbox{whatever} + \sin(2x)$
Unlike plain TEX, the sin is also set bold.
17
We also see a strange visual effect. It seems as if the lines are sloped.
Math
5
131
128
Typography
x2 + whatever + sin(2x)
In ConTEXt the 12pt math (Computer Modern) fonts are defined with:
\definebodyfont [12pt] [mm]
[ex=cmex10 at 12pt,
mi=cmmi12,
sy=cmsy10 at 12pt]
It is possible to use \tf, \bf, etc. within math mode.
\definebodyfont [10pt,11pt,12pt] [mm]
[tf=Sans
sa 1,
bf=SansBold
sa 1,
sl=SansItalic
sa 1,
ex=MathExtension sa 1,
mi=MathItalic
sa 1,
sy=MathSymbol
sa 1]
\setupbodyfont
The example we used before would become:
x2 + whatever + sin(2x)
5.10
Em and Ex
In specifying dimensions we can distinguish physical units like pt and cm and internal units like
em and ex. These last units are related to the actual fontsize. When you use these internal units
in specifying for example horizontal and vertical spacing you don’t have to do any recalculating
when fonts are switched in the style definition.
Some insight in these units does not hurt. The width of an em is not the with of an M, but
that of an — (an em--dash). When this glyph is not available in the font another value is used.
Table 5.2 shows some examples. We see that the width of a digit is about .5em. In Computer
Modern Roman a digit is excactly half an em wide.
In most cases we use em for specifying width and and ex for height. Table 5.3 shows some
examples. We see that the height equals the height of a lowercase x.
5
Math — Em and Ex
132
Typography
129
\tf
\bf
\sl
\tt
\ss
\tfx
12
12
12
12
12
12
M
M
M
M
M
M
—
—
—
---
—
—
Table 5.2 The width of an em.
\tf
\bf
\sl
\tt
\ss
x
x
x
x
x
\tfx
x
Table 5.3 The height of an ex.
5.11
Definitions
This section is meant for curious users or those users that want to do some experimenting on
defining fonts. We will not discuss precise definitions of accents and encodings. For these issues
we refer to the examples in the source code and the files font-xxx and enco-xxx.
Earlier we have seen that within a font family there are different font sizes. The relations
between these sizes are defined with:
\definebodyfontenvironment
[12pt]
[
text=12pt,
Math dimensions: normal dimensions,
script=9pt,
super- and subscripts and
scriptscript=7pt,
supersuper- and subsubscripts.
x=10pt,
Pseudo caps and
xx=8pt,
nested pseudo caps.
big=12pt,
In case we switch to big
small=10pt]
or small.
When we use a fontsize that is not predefined in this way ConTEXt applies the same proportions
anyhow. You can alter this definition by specifying the parameter default. When you want to
have a somewhat bigger fontsize you can type:
\definebodyfontenvironment [24pt]
Em and Ex — Definitions
5
133
130
Typography
You can switch to a 12.4 environment, without any specific actions. Within a group these
fontdefinitions are temporary. When you use the definitions several times in your document
you should type the definitions in the setup area of your source file (style definition) since this
can save much runtime.
An overview of the different fontsizes within a family can be summoned with:
\showbodyfontenvironment[..,...,..]
...
see p 114: \setupbodyfont
For the lbr family of fonts this is:
[lbr]
text
script
scriptscript
x
xx
small
big
20.7pt
14.4pt
12pt
17.3pt
14.4pt
17.3pt
20.7pt
17.3pt
12pt
10pt
14.4pt
12pt
14.4pt
20.7pt
14.4pt
11pt
9pt
12pt
10pt
12pt
14.4pt
12pt
9pt
7pt
10pt
8pt
10pt
14.4pt
11pt
8pt
6pt
9pt
7pt
9pt
12pt
10pt
7pt
5pt
8pt
6pt
8pt
12pt
9pt
7pt
5pt
7pt
5pt
7pt
11pt
8pt
6pt
5pt
6pt
5pt
6pt
10pt
7pt
6pt
5pt
6pt
5pt
5pt
9pt
6pt
5pt
5pt
5pt
5pt
5pt
8pt
5pt
5pt
5pt
5pt
5pt
5pt
7pt
4pt
4pt
4pt
4pt
4pt
4pt
6pt
For all regular fontsizes environments are predefined that fulfill their purpose adequately.
However when you want to do some extra defining yourself there is:
\setupbodyfontenvironment[...][..,..=..,..]
...
..=..
see p 114: \setupbodyfont
see p 114: \setupbodyfont
The real definitions, i.e. the coupling of commands to the font files, can be done in different
ways. The most transparant is the font file font-phv.
5
Definitions
134
Typography
\definefontsynonym
\definefontsynonym
\definefontsynonym
\definefontsynonym
\definefontsynonym
\definefontsynonym
\definefontsynonym
[Sans]
[SansBold]
[SansItalic]
[SansSlanted]
[SansBoldItalic]
[SansBoldSlanted]
[SansCaps]
131
[Helvetica]
[Helvetica-Bold]
[Helvetica-Oblique]
[Helvetica-Oblique]
[Helvetica-BoldOblique]
[Helvetica-BoldOblique]
[Helvetica]
\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [ss] [default]
With \definefontsynonym we couple a logical name, like SansBold to a font name, like
Helvetica-Bold. The real coupling is done somewhere else, by default in the file font-fil.
There you will see:
\definefontsynonym [Helvetica-Bold] [hvb] [encoding=texnansi]
This is the only location where a system dependent setup is made. When we work under the
naming regime of Karl Berry, the next setup would be more obvious (see font-ber):
\definefontsynonym [Helvetica-Bold] [phvb] [encoding=ec]
Coupling fonts in this way has no real limits. It is interesting to look in font-unk where
different styles are coupled in such a way that they be used interchangeably.
\definefontsynonym [Regular] [Serif]
\definefontsynonym [Roman]
[Serif]
We see that the basic specification is Serif. The default serif fonts are defined with:
\definebodyfont [default] [rm]
[ tf=Serif
sa 1,
tfa=Serif
sa a,
...
sl=SerifSlanted sa 1,
sla=SerifSlanted sa a,
...]
We saw that \tf is the default font. Here \tf is defined as Serif sa 1 which means that it
is a serif font, scaled to a normal font size. This Serif is projected elsewhere on for example
LucidaBright which in turn is projected on the filename lbr.
The kind of all--in--one definitions as shown previously for Helvetica use the default settings
and enable easy font definitions. This is okay for fonts that come in one design size.
Definitions
5
135
132
Typography
We, like other TEX users, started with the use of Computer Modern Roman fonts. Since these
fonts have specific design sizes ConTEXt supports accurate definitions. See the file font-cmr:
\definebodyfont [12pt] [rm]
[ tf=cmr12,
tfa=cmr12 scaled \magstep1,
tfb=cmr12 scaled \magstep2,
tfc=cmr12 scaled \magstep3,
tfd=cmr12 scaled \magstep4,
bf=cmbx12,
it=cmti12,
sl=cmsl12,
bi=cmbxti10 at 12pt,
bs=cmbxsl10 at 12pt,
sc=cmcsc10 at 12pt]
We use here the available TEX--specifications scaled and at, but ConTEXt also supports a
combination of both: sa (scaled at). For example if we do not want to use the default Helvetica
definition we define:
\definebodyfont [12pt,11pt,10pt,9pt,8pt] [ss]
[tf=hv sa 1.000,
bf=hvb sa 1.000,
it=hvo sa 1.000,
sl=hvo sa 1.000,
tfa=hv sa 1.200,
tfb=hv sa 1.440,
tfc=hv sa 1.728,
tfd=hv sa 2.074,
sc=hv sa 1.000]
The scaling is done in relation to the bodyfont size. In analogy with TEX’s \magstep we can
use \magfactor: instead of sa 1.440 we specify sa \magfactor2. Because typing all these
numbers is rather tiresome so we replace 1.200 by a, etc. The relations between a and 1.200
can be set up in the bodyfont environment.
\definebodyfont [12pt,11pt,10pt,9pt,8pt] [ss]
[tf=hv sa 1, tfa=hv sa a, tfb=hv sa b, tfc=hv sa c, tfd=hv sa d]
5
Definitions
136
Typography
133
Since font files are used in all interfaces we use English commands. The definitions take place
in files with the name font-xxx.tex, see for example the file font-cmr.tex.
\definebodyfont[..,.1.,..][.2.][..,..=..,..]
.1.
.2.
tf
bf
sl
it
bs
bi
sc
ex
mi
sy
ma
mb
mc
5pt ... 12pt default
rm ss tt mm hw cg
file
file
file
file
file
file
file
file
file
file
file
file
file
The setups ex, mi, sy, ms, mb and mc relate to the math charactersets. The first three we can
also find in plain TEX, the last three are necessary in other font families. The symbols and
characters in AMS-TEX can also be used in ConTEXt: \definebodyfont [ams]. These can be
found in ma and mb.
The a--d are not mandatory. As an example we will define a bigger fontsize of \tf:
\definebodyfont [10pt,11pt,12pt] [rm] [tfe=Regular at 48pt]
\tfe Big Words.
This becomes:
Big Words.
This definition brings us to other definitions. It is possible to define a bodyfont in a several
ways. We can use classifications like Regular, or abstract names like TimesRoman, or filenames,
like tir, or even fancy names like HeadLetter.
\definebodyfont[HeadLetter][Regular sa 1.2]
Definitions
5
137
134
Typography
After these definitions we can use \HeadLetter to switch fonts. It may be necessary to adapt
the interline spacing with \setupinterlinespace like this:
\HeadLetter \setupinterlinespace text \par
For advanced TEX users there is the dimension--register \bodyfontsize. This variable can be
used to set fontwidths. The number (rounded) points is available in \bodyfontpoints.
Until now we assumed that an a will become an a during type setting. However, this is not
always the case. Take for example ä or æ. This character is not available in every font and
certainly not in the Computer Modern Typefaces. Often a combination of characters \"a or a
command \ae will be used to produce such a character. In some situation TEX will combine
characters automatically, like in fl that is combined to fl and not fl. Another problem occurs
in converting small print to capital print and vice versa.
Below you see an example of the texnansi mapping:
\startmapping[texnansi]
\definecasemap 228 228
\definecasemap 235 235
\definecasemap 239 239
\definecasemap 246 246
\definecasemap 252 252
\definecasemap 255 255
\stopmapping
196
203
207
214
220
159
\definecasemap
\definecasemap
\definecasemap
\definecasemap
\definecasemap
\definecasemap
196
203
207
214
220
159
228
235
239
246
252
255
196
203
207
214
220
159
This means so much as: in case of a capital the character with code 228 becomes character
228 and in case of small print the character becomes character 196.
These definitions can be found in enco-ans. In this file we can also see:
\startencoding[texnansi]
\defineaccent " a 228
\defineaccent " e 235
\defineaccent " i 239
\defineaccent " o 246
\defineaccent " u 252
\defineaccent " y 255
\stopencoding
and
5
Definitions
138
Typography
135
\startencoding[texnansi]
\definecharacter ae 230
\definecharacter oe 156
\definecharacter o 248
\definecharacter AE 198
\stopencoding
As a result of the way accents are placed over characters we have to approach accented characters different from normal characters. There are two methods: TEX does the accenting itself or
prebuild accentd glyphs are used. The definitions above take care of both methods. Other definitions are sometimes needed. In the documentation of the file enco-ini more information
on this can be found.
We once again return to font definitions. Fast fontswitching is done with commands like \xii
or \twelvepoint, which is comparable to the way it is done in plain TEX. These commands are
defined with:
\definefontsynonym [twelvepoint] [12pt]
\definefontsynonym [xii]
[12pt]
The keys in \setupbodyfont are defined in terms of:
\definefontstyle
\definefontstyle
\definefontstyle
\definefontstyle
\definefontstyle
[rm,roman,serif,regular]
[ss,sansserif,sans,support]
[tt,teletype,type,mono]
[hw,handwritten]
[cg,calligraphic]
[rm]
[ss]
[tt]
[hw]
[cg]
In many command setups we encounter the parameter style. In those situations we can specify
a key. These keys are defined with \definestyle. The third argument is only of importance
in chapter and section titles, where, apart from \cap, we want to obey the font used there.
\definestyle
\definestyle
\definestyle
\definestyle
\definestyle
\definestyle
\definestyle
\definestyle
[normal]
[bold]
[type]
[italic]
[slanted]
[bolditalic,italicbold]
[boldslanted,slantedbold]
[small,smallnormal]
[\tf]
[\bf]
[\tt]
[\it]
[\sl]
[\bs]
[\bs]
[\tfx]
Definitions
[]
[]
[]
[]
[]
[]
[]
[]
5
139
136
Typography
In section 5.6 we have already explained how emphasizing is defined. With oldstyle digits this
is somewhat different. We cannot on the forehand in what font these can be found. By default
we have the setup:
\definefontsynonym [OldStyle] [MathItalic]
As we see they are obtained from the same font as the math italic characters.
In addition to these commands there are others, for example macros for manipulating accents.
These commands are discussed in the file font-ini. More information can also be found in
the file core-fnt and specific gimmicks in the file supp-fun. So enjoy yourself.
5.12
Page texts
Page texts are texts that are placed in the headers, footers, margins and edges of the so called
pagebody. This sentence is for instance typeset in the bodyfont in the running text. The fonts
of the page texts are set up by means of different commands. The values of the parameters may
be something like style=bold but style=\ss\bf is also allowed. Setups like style=\ssbf
are less obvious because commands like \kap will not behave the way you expect.
Switching to a new font style (\ss) will cost some time. Usually this is no problem but in
interactive documents where we may use interactive menus with dozens of items and related
font switches the effect can be considerable. In that case a more efficient font switching is:
\setuplayout[style=\ss]
Border texts are setup by its command and the related key. For example footers may be set up
with the key letter:
\setupfooter[style=bold]
5.13
Files
A number of font definition files that are standard in most distributions are mentioned in
table 5.4. These fonts can be recalled by their last three letters.
The most commonly used encoding vectors, like ans, ec and il2, are preloaded. Extra encoding
files are loaded by \useencoding, but this is seldom needed. The last two files mentioned in
table 5.5 relate to the support of the non--standard keyboard styles. These should be loaded
explicitly.
5
Definitions — Page texts — Files
140
Typography
font-cmr
Computer Modern Roman
font-csr
Computer Slavik Roman (?)
font-con
Concrete Roman
font-eul
Euler
font-ams
American Mathematics Society
font-ant
Antykwa Torunska
font-lbr
Lucida Bright
font-pos
Base PostScript Fonts
font-ptm
Times Roman
font-phv
Helvetica
font-pcr
Courier
font-fil
Standard Filenames
font-ber
Karl Berry FileNames
137
Table 5.4 Some standard font definition files (pos = ptm + phv + pcr ).
enco-ans
TeXnansi
enco-ec
European Computer
enco-il2
ISO Latin 2
enco-plr
Polish Roman
enco-ibm
default IBM PC code page
enco-win
default MS Windows code page
Table 5.5 Some standard encoding definition files.
5.14
Figures
When you use figures in your document they may contain text. Most of time the TEX--fonts
are not available. When you use a serif in your document you can best use a Helvetica in the
figures. In figure 5.1 we use a Helvetica, while we use Knuth’s Sans Serif in the caption.
Files — Figures
5
141
138
Typography
loopvlak
gordels van koorden
voering
schaafstrook
flipper
koordlagen
berubberd
textielweefsel
hielvulstuk
hiel van staalkoord
Figure 5.1 The use of fonts in pictures.
5
Figures
142
143
140
\background
150
\color
141
\colorvalue
145
\comparecolorgroup
145
\comparepalet
145
\definecolor
141
\definecolorgroup
145
\defineoverlay
154
\definepalet
145
\graycolor
145
\grayvalue
145
\setupbackground
150
\setupbackgrounds
152
\setupcolors
141
\setuppalet
145
\setupscreens
150
\showcolor
141
\showcolorgroup
145
\showpalet
145
\startbackground
150
\startcolor
141
\startraster
150
144
Color and background
141
Color and background
6.1
Introduction
Judicious use of color can enhance your document’s layout. For example. in interactive documents color can be used to indicate hyperlinks or other aspects that have no meaning in paper
documents, or background colors can be used to indicate screen areas that are used for specific
information components.
In this chapter we describe the ConTEXt color support. We will also pay attention to backgrounds and overlays because these are related to the color mechanism.
6.2
6
Color
One of the problems in typesetting color is that different colors may result in identical gray
shades. We did some research in the past on this subject and we will describe the ConTEXt
facilities on this matter and the way ConTEXt forces us to use color consistently. Color should
not be used indiscriminately, therefore you first have to activate the color mechanism:
\setupcolors[state=start]
Other color parameters are also available:
\setupcolors[..,..=..,..]
state
conversion
reduction
rgb
cmyk
start stop global local
yes no always
yes no
yes no
yes no
The parameter state can also be set at local or global. If you do not know whether the use
of color will cross a page boundary, then you should use global or start to keep track of
the color. We use local in documents where color will never cross a page border, as is the
case in many screen documents. This will also result in a higher processing speed. (For most
documents it does not hurt that much when one simply uses start).
By default both the rgb and cmyk colorspaces are supported. When the parameter cmyk is
set at no, then the cmyk color specifications are automatically converted to rgb. The reverse
Introduction — Color
6
145
142
Color and background
is done when rgb=no. When no color is allowed the colors are automatically converted to
weighted grayshades. You can set this conversion with conversion. When set to always, all
colors are converted to gray, when set to yes, only gray colors are converted.
Colors must be defined. For some default color spaces, this is done in the file colo-xxx.tex.
After definition the colors can be recalled with their mnemonic name xxx. By default the file
colo-rgb.tex is loaded. In this file we find definitions like:
\definecolor [darkred]
[r=.5, g=.0, b=.0]
\definecolor [darkgreen] [r=.0, g=.5, b=.0]
............ ........... ..................
A file with color definitions is loaded with:
\setupcolor[rgb]
Be aware of the fact that there is also a command \setupcolors that has a different meaning.
The rgb file is loaded by default.
Color must be activated like this:
\startcolor[darkgreen]
We can use as many colors as we like. But we do have to take into
account that the reader is possibly \color [darkred] {colorblind}. The
use of color in the running text should always be carefully considered.
The reader easily tires while reading multi||color documents.
\stopcolor
In the same way you can define cmyk colors and grayshades:
\definecolor [cyan] [c=1,m=0,y=0,k=0]
\definecolor [gray] [s=0.75]
gray can also be defined like this:
\definecolor [gray] [r=0.75,r=0.75,b=0.75]
When the parameter conversion is set at yes the color definitions are automatically downgraded to the s--form: [s=.75]. The s stands for ‘screen’. When reduction is yes, the black
component of a cmyk color is distilled from the other components.
One of the facillities of color definition is the heritage mechanism:
\definecolor [important] [red]
6
Color
146
Color and background
143
These definitions enable you to use colors consistently. Furthermore it is possible to give all
important issues a different color, and change colors afterwards or even in the middle of a
document.
So, next to \setupcolors we have the following commands for defining colors:
\definecolor[...][..,..=..,..]
...
r
g
b
c
m
y
k
s
name
text
text
text
text
text
text
text
text
A color definition file is loaded with:
\setupcolor[...]
...
name
Typesetting color is done with:
\color[.1.]{.2.}
.1.
text
\startcolor[...] ... \stopcolor
...
...
name
text
A complete palette of colors is generated with:
\showcolor[...]
...
name
Figure 6.1 shows the colors that are standard available (see colo-rgb.tex).
Color
6
147
144
Color and background
red
green
blue
middlered
middlegreen
middleblue
darkred
darkgreen
darkblue
yellow
magenta
cyan
middleyellow
middlemagenta
middlecyan
darkyellow
darkmagenta
darkcyan
lightgray
darkergray
black
Figure 6.1 Some examples of colors.
The use of color in TEX is not trivial. TEX itself has no color support. Currently color support
is implemented using TEX’s low level \mark’s and \special’s. This means that there are some
limitations, but in most cases these go unnoticed.
It is possible to cross page boundaries with colors. The headers and footers and the floating
figures or tables will stil be set in the correct colors. However, the mechanism is not robust.
In this sentence we use colors within colors. Aesthetically this is bad.
As soon as a color is defined it is also available as a command.
So there is
a command \darkred.
These commands do obey grouping.
So we can say
{\darkred this is typeset in dark red}.
There are a number of commands that have the parameter color. In general, when a style
can be set, color can also be set.
The default color setup is:
\setupcolors [conversion=yes, reduction=no, rgb=yes, cmyk=yes]
This means that both colorspaces are supported and that the k--component in cmyk colors is
maintained. When reduction=yes, the k--component is ‘reduced’. With conversion=no equal
color components are converted to gray shades.
6
Color
148
Color and background
6.3
145
Grayscales
When we print a document on a black and white printer we observe that the differences between
somes colors are gone. Figure 6.2 illustrates this effect.
0.300 0.850 1.000
0.400 0.800 1.000
0.500 0.750 1.000
0.702
0.702
0.703
Figure 6.2 Three cyan variations with equal gray shades.
In a black and white print all blocks look the same but the three upper blocks have different
cyan based colors. The lower blocks simulate grayshades. We use the following conversion
formula:
gray = .30 × red + .59 × green + .11 × blue
A color can be displayed in gray with the command:
\graycolor[...]
...
text
The actual values of a color can be recalled by the commands \colorvalue{name} and
\grayvalue{name}.
We can automatically convert all used colors in weighted grayshades.
\setupcolors [conversion=always]
6.4
Colorgroups and palettes
TEX itself has hardly any built--in graphical features. However the ConTEXt color mechanism
is designed by looking at the way colors in pictures are used. One of the problems is the effect
we described in the last section. On a color printer the picure may look fine, but in black and
white the results may be disappointing.
In TEX we can aproach this problem systematically. Therefore we designed a color mechanism
that can be compared with that in graphical packages.
Color — Grayscales — Colorgroups and palettes
6
149
146
Color and background
We differentiate between individual colors and colorgroups. A colorgroup contains a number
of gradations of a color. By default the following colorgroups are defined.
1
2
3
4
5
6
7
8
red
green
blue
yellow
magenta
cyan
The different gradations within a colorgroup are represented by a number. A colorgroup is
defined with:
\definecolorgroup[.1.][.2.][..,.3.,..]
.1.
.2.
.3.
name
rgb cmyk gray s
[x:y:z=,..]
An example of a part of the rgb definition is:
\definecolorgroup
[blue][rgb]
[1.00:1.00:1.00,
0.90:0.90:1.00,
..............,
0.40:0.40:1.00,
0.30:0.30:1.00]
The [rgb] is not mandatory in this case, because ConTEXt expects rgb anyway. This command
can be viewed as a range of color definitions.
\definecolor [blue:1]
\definecolor [blue:2]
..............
\definecolor [blue:7]
\definecolor [blue:8]
6
[r=1.00, g=1.00, b=1.00]
[r=0.90, g=0.90, b=1.00]
[r=0.40, g=0.40, b=1.00]
[r=0.30, g=0.30, b=1.00]
Colorgroups and palettes
150
Color and background
147
A color within a colorgroup can be recalled with name:number, for example: blue:4.
There is no maximum to the number of gradations within a colorgroup, but on the bases of
some experiments we advise you to stay within 6 to 8 gradations. We can explain this. Next to
colorgroups we have palettes. A pallet consists of a limited number of logical colors. Logical
means that we indicate a color with a name. An example of a palette is:
top
bottom
up
down
strange
charm
alfa
The idea behind palettes is that we have to avoid colors that are indistinguishable in black and
white print. A palette is defined by:
\definepalet
[example]
[strange=red:3,
top=green:1,
.....
bottom=yellow:8]
We define a palette with the command:
\definepalet[...][..,..=..,..]
...
name
name
name
ConTEXt contains a number of predefined palettes. Within a palette we use the somewhat
abstract names of quarks: top, bottom, up, down, strange and charm. There is also friend and
rude because we ran out of names. Be aware of the fact that these are just examples in the rgb
definition file and based on our own experiments. Any name is permitted.
The system of colorgroups and palettes is based on the idea that we compose a palette from
the elements of a colorgroup with different numbers. Therefore the prerequisite is that equal
numbers should have an equal grayshade.
Colorgroups and palettes
6
151
148
Color and background
red
green
blue
yellow
magenta
cyan
1
2
3
4
5
6
7
8
When a palette is composed we can use the command:
\setuppalet[...]
...
name
After that we can use the colors of the chosen palette. The logical name can be used in for
example \color[strange]{is this not strange}.
An example of the use of palettes is shown in the verbatim typesetting of TEX code. Within
this mechanism colors with names like prettyone, prettytwo, etc. are used. There are two
palettes, one for color and one for gray:
\definecolor [colorprettyone] [r=.9, g=.0, b=.0]
\definecolor [grayprettyone] [s=.3]
These palettes are combined into one with:
\definepalet
[colorpretty]
[ prettyone=colorprettyone,
prettytwo=colorprettytwo,
prettythree=colorprettythree, prettyfour=colorprettyfour]
\definepalet
[graypretty]
[ prettyone=grayprettyone,
prettythree=grayprettythree,
prettytwo=grayprettytwo,
prettyfour=grayprettyfour]
Now we can change all colors by resetting the palette with:
\setuptyping[palet=colorpretty]
6
Colorgroups and palettes
152
Color and background
149
Each filter can be set differently:
\definepalet [MPcolorpretty] [colorpretty]
\definepalet [MPgraypretty] [graypretty]
As you can see a palette can inherit its properties from another palette. This example shows
something of the color philosophy in ConTEXt: you can treat colors as abstractions and group
them into palettes and change these when necessary.
On behalf of the composition of colorgroups and palettes there are some commands available
to test whether the colors are distinguishable.
\showcolorgroup[.1.][..,.2.,..]
.1.
.2.
name
horizontal vertical name value number
\showpalet[.1.][..,.2.,..]
.1.
.2.
name
horizontal vertical name value
\comparecolorgroup[...]
...
name
\comparepalet[...]
...
name
The overviews we have shown thusfar are generated by the first two commands and the gray
values are placed below the baseline. On the left there are the colors of the grayshades.
Colorgroups and palettes
6
153
150
Color and background
This overview is made with \comparecolorgroup[green] and the one below with
\comparepalet[gamma].
The standard colorgroups and palettes are composed very carefully and used systematically
for coloring pictures. These can be displayed adequately in color and black and white.
Figure 6.3 Some examples of the use of color.
6.5
Text backgrounds
In a number of commands, for example \framed, you can use backgrounds. A background
may have a color or a screen (pure gray). By default the backgroundscreen is set at 0.95.
Usable values lie between 0.70 and 1.00.
6
Colorgroups and palettes — Text backgrounds
154
Color and background
151
Building screens in TEX is memory consuming and may cause error messages. The screens are
therefore build up externally by means of PostScript or pdf instructions. This is set up with:
\setupscreens[..,..=..,..]
method
resolution
factor
screen
dot rule external
number
number
number
The parameter factor makes only sense when the method line or dot is chosen. The parameter screen determines the ‘grid’ of the screen. Text on a screen of 0.95 is still readable.
Visually the TEX screens are comparable with PostScript screens. When memory and time are
non issues TEX screens come out more beautiful than postscript screens. There are many ways
to implement screens but only the mentioned methods are implemented.
Behind the text in the pagebody screens can be typeset. This is done by enclosing the text
with the commands:
\startbackground
\stopbackground
We have done so in this text. Backgrounds can cross page boundaries when necessary. Extra
vertical whitespace is added around the text for reasons of readability.
\startbackground ... \stopbackground
The background can be set up with:
\setupbackground[..,..=..,..]
leftoffset
rightoffset
topoffset
bottomoffset
state
..=..
dimension
dimension
dimension
dimension
start stop
see p 264: \setupframed
The command \background can be used in combination with for example placeblocks:
Text backgrounds
6
155
152
Color and background
\placetable
{Just a table.}
\background
\starttable[|c|c|c|]
\HL
\VL red \VL green
\VL blue
\VL \AR
\VL cyan \VL magenta \VL yellow \VL \AR
\HL
\stoptable
The command \background expects an argument. Because a table is ‘grouped’ it will generate
{ } by itself and no extra braces are necessary.
\background
A fundamental difference between colors and screens is that screens are never converted.
There is a command \startraster that acts like \startcolor, but in contrast to the color
command, ConTEXt does not keep track of screens across page boundaries. This makes sense,
because screens nearly always are used as simple backgrounds.
6.6
Layout backgrounds
In interactive or screen documents the different screen areas may have different functions.
Therefore the systematic use of backgrounds may seem obvious. It is possible to indicate all
areas or compartments of the pagebody (screenbody). This is done with:
\setupbackgrounds[.1.][..,.2.,..][..,..=..,..]
.1.
.2.
state
..=..
top header text footer bottom page paper leftpage rightpage
leftedge leftmargin text rightmargin rightedge
start stop repeat
see p 264: \setupframed
Don’t confuse this command with \setupbackground (singular). A background is only calculated when something has changed. This is more efficient while generating a document.
When you want to calculate each background separately you should set the parameter state
at repeat. The page background is always recalculated, since it provides an excellent place for
page dependent buttons.
6
Text backgrounds — Layout backgrounds
156
Color and background
153
After \setupbackgrounds without any arguments the backgrounds are also re--calculated.
A specific part of the layout is identified by means of an axis (see figure 6.4).
leftedge
leftmargin
text
rightmargin
rightedge
top
header
text
footer
bottom
Figure 6.4 The coordinates in \setupbackgrounds.
You are allowed to provide more than one coordinate at a time, for example:
\setupbackgrounds
[header,text,footer]
[text]
[background=screen]
or
\setupbackgrounds
[text]
[text,rightedge]
[background=color,backgroundcolor=MyColor]
Some values of the paremeter page, like offset and corner also apply to other compartments,
for example:
\setupbackgrounds
[page]
[offset=.5\bodyfontsize
depth=.5\bodyfontsize]
When you use menus in an interactive or screen document alignment is automatically adjusted
for offset and/or depth. It is also possible to set the parameter page to the standard colors
and screens.
If for some reason an adjustment is not generated you can use \setupbackgrounds (without
an argument). In that case ConTEXt will calculate a new background.
Layout backgrounds
6
157
154
6.7
Color and background
Overlays
TEX has only limited possibilities to enhance the layout with specific features. In ConTEXt we
have the possibility to ‘add something to a text element’. You can think of a drawing made in
some package or other ornaments. What we technically do is lay one piece of text over another
piece text. That is why we speak of ‘overlays’.
When we described the backgrounds you saw the paremeters color and screen. These are
both examples of an overlay. You can also define your own background:
\defineoverlay[gimmick][\green a green text on a background]
\framed
[height=2cm,background=gimmick,align=middle]
{at\\the\\foreground}
This would look like this:
at
the
a green text on a background
foreground
An overlay can be anything:
\defineoverlay
[gimmick]
[{\externalfigure[koe][width=\overlaywidth,height=\overlayheight]}]
\framed
[height=2cm,width=5cm,background=gimmick,align=right]
{\vfill this is a cow}
We can see that in designing an overlay the width and height are available in macros. This
enables us to scale the figure.
this is a cow
We can combine overlays with one another or with a screen and color.
6
Layout backgrounds — Overlays
158
Color and background
155
A Cow
this is a cow
The TEX definitions look like this:
\defineoverlay
[gimmick]
[{\externalfigure[koe][width=\overlaywidth,height=\overlayheight]}]
\defineoverlay
[nextgimmick]
[\red A Cow]
\framed
[height=2cm,width=.5\textwidth,
background={screen,gimmick,nextgimmick},align=right]
{\vfill this is a cow}
6.8
METAPOST
In a ConTEXt document we can use METAPOST code directly. For example:
\startMPgraphic
fill unitsquare scaled 100 withcolor (.2,.3,.4) ;
\stopMPgraphic
A direct relation with the ConTEXt color mechanism is obvious:
\startMPgraphic
fill unitsquare scaled 100 withcolor \MPcolor{mark} ;
\stopMPgraphic
METAPOST support is very extensive. You can store definitions and re--use them at random. If
possible processed METAPOST pictures are re--used.
A detailed discussion on embedding METAPOST graphics is beyond this manual, and therefore
will be covered elsewhere. For the moment it is enough to know the basics of putting for
instance graphics in the background. In the next example, a graphic is calculated each time it
is refered to:
Overlays — METAPOST
6
159
156
Color and background
\startuseMPgraphic{test a}
fill unitsquare xscaled \overlaywidth yscaled \overlayheight ;
\stopuseMPgraphic
\defineoverlay[A Nice Rectangle][\useMPgraphic{test a}]
\setupbackgrounds[page][background=A Nice Rectangle]
When the graphic does not change, we can best reuse it, like:
\startreusableMPgraphic{test b}
fill unitsquare xscaled \overlaywidth yscaled \overlayheight ;
\stopreusableMPgraphic
\defineoverlay[A Nice Rectangle][\reuseMPgraphic{test b}]
\setupbackgrounds[page][background=A Nice Rectangle]
When using the ConTEXt command line interface TEXexec, graphics are processed automatically. Unless one calls METAPOST at runtime, a second pass is needed to get the graphics in
their final state.
6
METAPOST
160
161
158
\currentdate
163
\date
163
\de
159
\en
159
\fr
159
\headtext
164
\installlanguage
160
\labeltext
164
\mainlanguage
164
\nl
159
\setupheadtext
164
\setuphyphenmark
166
\setuplabeltext
164
\setuplanguage
160
\sp
159
\taal
159
\translate
166
162
Language specific issues
159
Language specific issues
7.1
Introduction
One of the more complicated corners of ConTEXt is the department that deals with languages.
Fortunately users will seldom notice this, but each language has its own demands and we put
quite some effort in making sure that most of the issues on hyphenation rules and accented
and non latin characters could be dealt with. For as long as it does not violate the ConTEXt
user interface, we also support existing input schemes.
7
In the early days TEX was very American oriented, but since TEX version 3 there is (simultaneous)
support for multiple languages. The input of languages with many accents —sometimes more
accents per character— may look rather complicated, depending on the use of dedicated input
encodings or special TEX commands.
The situation is further complicated by the fact that specific input does not have a one--to--one
relation with the position of a glyph in a font. We discussed this in section 5.11. It is important
to make the right choices for input and font encoding.
In this chapter we will deal with hyphenation and language specific labels. More details can be
found in the language definition files (lang-xxx), the font files (font-xxx) and the encoding
files (enco-xxx). There one can find details on how to define commands that deal with accents
and special characters as covered in a previous chapter, sorting indexes, providing support for
unicode, and more.
7.2
Automatic hyphenating
Each language has its own hyphenation rules. As soon as you switch to another language,
ConTEXt will activate the appropriate set of hyphenation patterns for that language. Languages
are identified by their official two character identifiers, like: Dutch (nl), English (en), German
(de) and French (fr). A language is chosen with the following command: 18
\language[...]
...
18
nl fr en uk de sp cz ..
In case of any doubt please check if the hyphenation patterns are included in the fmt--file.
Introduction — Automatic hyphenating
7
163
160
Language specific issues
Some short cut commands are also available. They can be used enclosed in braces:
\nl
\en
\de
\fr
\sp
\uk
\pl
\cz
...
The command \language[nl] can be compared with \nl. The first command is more
transparant. The two character commands may conflict with existing commands. Take, for
example, Italian and the code for italic type setting. For this reason we use capitals for commands that may cause any conflicts. One may also use the full names, like czech.
At any instance you can switch to another language. In the example below we switch from
English to French and vice versa.
The French composer {\fr Olivier Messiaen} wrote \quote {\fr Quatuor pour
la fin du temps} during the World War II in a concentration camp. This
may well be one of the most moving musical pieces of that period.
We use these language switching commands if we cannot be certain that an alternative hyphenation pattern is necessary.
The French composer Olivier Messiaen
wrote ‘Quatuor pour
la fin du temps’ during the World War
II in a concentra-
tion camp. This may
well be one of the
most moving musical
pieces of that period.
How far do we go in changing languages. Borrowed words like perestrojka and glasnost are
often hyphenated okay, since these are Russian words used in an English context. When words
are incorrectly hyphenated you can define an hyphenation pattern with the TEX--command:
\hyphenation{ab-bre-via-tion}
You can also influence the hyphenation in a text by indicating the allowed hyphenation pattern
in the word: at the right locations the command \- is added: al\-lo\-wed.
7.3
Definitions and setups
When a format file is generated the hyphenation pattern one needs should be added to this
file. The definition and installation of a language is therefore not transparant for the user. We
show the process to give some insight in the mechanism. An example: 19
\installlanguage
[en]
[spacing=broad,
19
7
The somewhat strange name \upperleftsinglesixquote is at least telling us what the quote will look like.
Automatic hyphenating — Definitions and setups
164
Language specific issues
161
leftsentence=---,
rightsentence=---,
leftsubsentence=---,
rightsubsentence=---,
leftquote=\upperleftsinglesixquote,
rightquote=\upperrightsingleninequote,
leftquotation=\upperleftdoublesixquote,
rightquotation=\upperrightdoubleninequote,
date={month,\ ,day,{,\ },year},
default=en,
state=stop]
and:
\installlanguage
[uk]
[default=en,
state=stop]
With the first definition you define the language component. You can view this definition in
the file lang-ger.tex, the german languages. Languages are arranged in language groups.
This arrangement is of no further significance at the moment. Since language definitions are
preloaded, users should not bother about setting up such files.
The second definition inherits its set up from the English installation. In both definitions state
is set at stop. This means that no patterns are loaded yet. That is done in the files cont-xx,
the language and interface specific ConTEXt versions. As soon as state is set at start, a new
pattern is loaded, which can only be done during the generation of a format file.
We use some conventions in the file names of the patterns lang-xx.pat and the exceptions
lang-xx.hyp. Normally a language is installed with a two character code. However there are
three character codes, like deo for hyphenating ‘old deutsch’ and nlx the Dutch extended characterset, or 8--bit encoding. On distributions that come with patterns, the filenames mentioned
can be mapped onto the ones available on the system. This happens in the file cont-usr.tex.
After installation you are not bound to the two character definitions. Default the longer (English) equivalents are defined:
\installlanguage[german][de]
Definitions and setups
7
165
162
Language specific issues
\installlanguage[...][..,..=..,..]
...
spacing
lefthyphenmin
righthyphenmin
state
leftsentence
rightsentence
leftsubsentence
rightsubsentence
leftquote
rightquote
leftquotation
rightquotation
default
name
packed broad
dimension
dimension
start stop
command
command
command
command
command
command
command
command
name
\setuplanguage[...][..,..=..,..]
..=..
see p 162: \installlanguage
The setup in these commands relate to the situations that are shown below.
\currentdate
|<|all right there we go|>|
|<| |<|all right|>| there we go|>|
|<|all right |<|there|>| we go|>|
\quote{all right there we go}
\quotation{all right there we go}
\quotation{\quote{all right} there we go}
\quotation{all right \quote{there} we go}
This becomes:
January 27, 2000
—all right there we go—
— —all right— there we go—
7
Definitions and setups
166
Language specific issues
163
—all right —there— we go—
‘all right there we go’
“all right there we go”
“ ‘all right’ there we go”
“all right ‘there’ we go”
We will discuss || in one of the next sections.
7.4
Date
Typesetting a date is also language specific so we have to pay some attention to dates here.
When the computer runs at the actual time and date the system date can be recalled with:
\currentdate[..,...,..]
...
day month MONTH weekday WEEKDAY year dd mm jj yy d m j y referral
The sequence in which day, month and year are given is not mandatory. The pattern
[day,month,year] results in 27 January 2000. We use \currentdate[weekday,month,day,{,},year]
to obtain Thursday January 27,2000.
A short cut looks like this: [dd,mm,yy] and will result in 270100. Something like [d,m,y]
would result in 2712000 and with [referral] you will get a 20000127. Combinations are also
possible. Characters can also be added to the date pattern. The date 27–01–00 is generated by
the pattern [dd,--,mm,--,yy].
A date can be (type)set with the command:
\date[..,..=..,..][..,...,..]
d
m
y
...
number
number
number
see p 163: \currentdate
The first (optional) argument is used to specify the date:
\date[d=10,m=3,y=1996][weekday,month,day, year]
When no argument is given you will obtain the actual date. When the second argument is left
out the result equals that of \currentdate. The example results in:
Definitions and setups — Date
7
167
164
Language specific issues
Sunday March 10 1996
7.5
Labels and heads
In some cases ConTEXt will generate text labels automatically, for example the word Figure
is generated automatically when a caption is placed under a figure. These kind of words are
called textlabels. Labels can be set with the command:
\setuplabeltext[...][..=..]
...
name
nl fr en uk de sp cz ..
text
Relevant labels are: table, figure, chapter, appendix and comparable text elements. An
example of such a set up is:
\setuplabeltext[en][chapter=Chapter ]
\setuplabeltext[nl][hoofdstuk=Hoofdstuk ]
The space after Chapter is essential, because otherwise the chapternumber will be placed right
after the word Chapter (Chapter1 instead of Chapter 1). A labeltext can recalled with:
\labeltext{...}
...
text
Some languages, like Chinese, use split labels. These can be passed as a comma separated list,
like chapter={left,right}.
Titleheads for special sections of a document, like abbreviations and appendices are set up
with:
\setupheadtext[...][..=..]
...
name
nl fr en uk de sp cz ..
text
Examples of titleheads are Content, Tables, Figures, Abbreviations, Index etc. An example
definition looks like:
\setupheadtext[content=Content]
7
Date — Labels and heads
168
Language specific issues
165
A header can be recalled with:
\headtext{...}
...
text
Labels and titleheads are defined in the file lang-xxx. You should take a look in these files to
understand the use of titleheads and labels.
The actual language that is active during document generation does not have to be the same
language that is used for the labels. For this reason next to \language we have:
\mainlanguage[...]
...
nl fr en uk de sp cz ..
When typesetting a document, there is normally one main language, say \mainlanguage[en].
A temporary switch to another language is then accomplished by for instance \language[nl],
since this does not influence the labels and titles. language.
7.6
Language specific commands
German TEX users are accustomed to entering "e and getting ë typeset in return. This and a
lot more are defined in lang-ger using the compound character mechanism built in ConTEXt.
Certain two or three character combinations result in one glyph or proper hyphenation. The
example below illustrates this. Some macros are used that will not be explained here. Normally,
users can stick to simply using the already defined commands.
\startlanguagespecifics[de]
\installcompoundcharacter
\installcompoundcharacter
.....
\installcompoundcharacter
\installcompoundcharacter
.....
\installcompoundcharacter
\installcompoundcharacter
.....
"a
"s
{\moveaccent{-.1ex}\"a\midworddiscretionary}
{\SS}
"U
"Z
{\smashaccent\"U}
{SZ}
"ck {\discretionary {k-}{k}{ck}}
"TT {\discretionary{TT-}{T}{TT}}
Labels and heads — Language specific commands
7
169
166
Language specific issues
\installcompoundcharacter "‘
\stoplanguagespecifics
{\handlequotation\c!leftquotation}
The command \installcompoundcharacter takes care of the German type setting, "a is
converted to ä, "U in Ü, "ck for the right hyphenation, etc. One can add more definitions, but
this will violate portability. In a Polish ConTEXt the / is used instead of a ".
7.7
Automatic translation
It is possible to translate a text automatically in the actual language. This may be comfortable
when typesetting letterheads. The example below illustrates this.
\translate[..,..=..,..]
name
text
It depends on the actual language whether a labeltext is type set in
English {\en as an \translate [en=example, fr=exemple], \fr or in French
as an \translate}.
The second command call \translate uses the applied values. That is, \translate with no
options uses the options of the last call to \translate.
It depends on the actual language whether a labeltext is type set in English as an example, or
in French as an exemple.
7.8
Composed words
Words consisting of two separate words are often separated by an intra word dash, as in x-axis. This dash can be placed between | |, for example |--|. This command, which does not
begin with a \, serves several purposes. When || is typed the default intra word dash is used,
which is --. This dash is set up with:
\setuphyphenmark[..=..]
sign
-- --- -
) ( = /
The | | is also used in word combinations like (intra)word, which is typed as (intra|)|word.
The mechanism is not foolproof but it serves most purposes. In case the hyphenation is incorrect you can hyphenate the first word of the composed one by hand: (in\-tra|)|word.
7
Language specific commands — Automatic translation — Composed words
170
Language specific issues
input
normal
hyphenated
intra||word
intra--word
in-tra--word
intra|-|word
intra-word
in-tra-word
intra|(|word)
intra(word)
in-tra(-word)
(intra|)|word
(intra)word
(in-tra-)word
intra|--|word
intra–word
in-tra–word
intra|˜|word
intra word
in-tra-word
167
Table 7.1 Hyphenation of composed words.
The main reason behind this mechanism is that TEX doesn’t really know how to hyphenate
composed words and how to handle subsentences. TEX know a lot about math, but far less
about normal texts. Using this command not only serves consistency, but also makes sure that
TEX can break compound words at the right places. It also keeps boundary characters at the
right place when a breakpoint is inserted.
Composed words
7
171
\chapter
170
\coupledocument
174
\definehead
170
\headnumber
174
\momarking
170
\nextsection
181
\nolist
170
\part
170
7
\section
170
\setuphead
174
\setupheadnumber
174
\setupheads
174
\startappendices
180
\startbodypart
180
\startextroductions
180
\startintroductions
180
\subject
170
\subsection
170
\subsubject
170
\subsubsection
170
\subsubsubject
170
\title
170
Composed words
172
Text elements
169
Text elements
8.1
Introduction
The core of ConTEXt is formed by the commands that structures the text. The most common
structuring elements are chapters and sections. The structure is visualized by means of titles
and summarized in the table of contents.
A text can be subdivided in different ways. As an introduction we use the methods of H. van
Krimpen, K. Treebus and the Collectief Gaade. First we examine the method of van Krimpen:
1.
2.
3.
4.
5.
French title
title
history & copyright
mission
preface/introduction
6.
7.
8.
9.
10.
...
list of illustrations
acknowledgement
errata
the content
11.
12.
13.
14.
8
notes
literature
register(s)
colofon
The French title is found at the same spread as the back of the cover, or first empty sheet. In
the colofon we find the used font, the names of the typesetter and illustrator, the number of
copies, the press, the paper, the binding, etc.
The subdivision of Treebus looks like this:
1.
2.
3.
4.
5.
6.
7.
French title
titlepage
colofon
copyright
mission
preface (1)
table of content
8.
9.
10.
11.
12.
13.
14.
list of illustrations
introduction/preface (2)
...
epilogue
appendices
summaries
notes
15.
16.
17.
18.
19.
literature
used words
addenda
register
acknowledgement
tos
20. (colofon)
pho-
In this way of dividing a text the colofon is printed on the back of the titlepage. The first
preface is written by others and not by the author.
The last text structure is that of the Collectief Gaade:
1.
2.
3.
French title
series title
title
4.
5.
6.
copyright
mission
blank
Introduction
7.
8.
9.
preface
table of content
introduction
8
173
170
Text elements
10. . . .
11. appendices
12. notes
13. list of illustrations
14. used words
15. bibliography
16. colofon
17. register
Since there seems to be no standardized way of setting up a document, ConTEXt will only
provide general mechanisms. These are designed in such a way that they meet the following
specifications:
1. In a text the depth of sectioning seldom exceeds four. However, in a complex manuals more
depth can be useful. In paper documents a depth of six may be very confusing for the reader
but in electronic documents we need far more structure. This is caused by the fact that a
reader cannot make a visual representation of the electronic book. Elements to indicate this
structure are necessary to be able to deal with the information.
2. Not every level needs a number but in the background every level is numbered to be able to
refer to these unnumbered structuring elements.
3. The names given to the structuring elements must be a logical ones and must relate to their
purpose.
4. It is possible to generate tables of contents and registers at every level of the document and
they must support complex interactivity.
5. A document will be divided in functional components like introductions and appendices
with their respective (typographical) characteristics.
6. The hyphenation of titles must be handled correctly.
7. Headers and footers are supported based on the standard labels used in a document. For
example chapter in a book and procedure in a manual.
8. A ConTEXt user must be able to design titles without worrying about vertical and horizontal
spacing, referencing and synchronisation.
These prerequisites have resulted in a heavy duty mechanism that works in the background
while running ConTEXt. The commands that are described in the following sections are an
example of an implementation. We will also show examples of self designed titles.
8.2
Subdividing the text
A text is divided in chapters, sections, etc. with the commands:
8
Introduction — Subdividing the text
174
Text elements
171
Subdividing the text
8
\part[ref,..]{...}
...
text
\chapter[ref,..]{...}
...
text
\section[ref,..]{...}
...
text
\subsection[ref,..]{...}
...
text
\subsubsection[ref,..]{...}
...
text
and
\title[ref,..]{...}
...
text
\subject[ref,..]{...}
...
text
\subsubject[ref,..]{...}
...
text
\subsubsubject[ref,..]{...}
...
text
175
172
Text elements
The first series of commands (\chapter . . . ) generate a numbered head, with the second series
the titles are not numbered. There are a few more levels available than those shown above.
level
numbered title
unnumbered title
1
\part
2
\chapter
\title
3
\section
\subject
4
\subsection
\subsubject
5
\subsubsection
\subsubsubject
Table 8.1 The structuring elements.
By default \part generates no title because most of the times these require special attention
and a specific design. In the background however the partnumbering is active and carries out
several initialisations. The other elements are set up to typeset a title.
A structuring element has two arguments. The first argument, the reference, makes it possible
to refer to the chapter or section from another location of the document. In chapter 9 this
mechanism is described in full. A reference is optional and can be left out.
\section{Subdividing a text}
ConTEXt generates automatically the numbers of chapters and sections. However there are
situations where you want to enforce your own numbering. This is also supported.
\setuphead[subsection][ownnumber=yes]
\subsection{399}{The old number}
\subsection[someref]{400}{Another number}
In this example an additional argument appears. In the background ConTEXt still uses its own
numbering mechanism, so operations that depend upon a consistent numbering still work
okay. The extra argument is just used for typesetting the number. This user--provided number
does not have to be number, it may be anything, like ABC-123.
399
The old number
400
Another number
You can automatically place titles of chapters, sections or other structuring elements in the
header and footer with the marking mechanism. Titles that are too long can be shortened by:
8
Subdividing the text
176
Text elements
173
\nomarking{...}
...
text
For example:
\chapter{Influences \nomarking{in the 20th century:} an introduction}
The text enclosed by \nomarking is replaced by dots in the header or footer. Perhaps an easier
strategy is to use the automatic marking limiting mechanism. The next command puts the
chapter title left and the section title right in the header. Both titles are limited in length.
\setupheadertexts[chapter][section]
\setupheader[leftwidth=.4\hsize,rightwidth=.5\hsize]
A comparable problem may occur in the table of contents. In that case we use \nolist:
\chapter{Influences in the 20th century\nolist{: an introduction}}
When you type the command \\ in a title a new line will be generated at that location. When
you type \crlf in a title you will enforce a new line only in the table of contents. For example:
\chapter{Influences in the 20th century:\crlf an introduction}
This will result in a two line title in the table of context, while the title is only one line in the
text.
It is possible to define your own structuring elements. Your ‘own’ element is derived from an
existing text element.
\definehead[.1.][.2.]
.1.
.2.
name
section
An example of a definition is:
\definehead[category][subsubject]
From this moment on the command \category behaves just like \subsubject, i.e., \category
inherits the default properties of \subsubject. For example, \category is not numbered.
A number of characteristics available with \setuphead are described in section 8.3. Your own
defined structuring elements can also be set up. The category defined above can be set up as
follows:
Subdividing the text
8
177
174
Text elements
\setuphead[category][page=yes]
This setup causes each new instance of category to be placed at the top of a new page.
We can also block the sectionnumbering with \setupheads[sectionnumber=no]. Sectionnumbering will stop but ConTEXt will continue the numbering on the background. This is
necessary to be able to perform local actions like the generating local tables of content.
In defining your own structuring elements there is always the danger that you use existing TEX
or ConTEXt commands. It is of good practice to use capitals for your own definitions. For
example:
\definehead[WorkInstruction][section]
8.3
Variations in titles
The numbering and layout of chapters, sections and subsections can be influenced by several
commands. These commands are also used in the design of your own heads. We advise you to
start the design process in one of the final stages of your document production process. You
will find that correct header definitions in the setup area of your source file will lead to a very
clean source without any layout commands in the text.
The following commands are at your disposal:
8
Subdividing the text — Variations in titles
178
Text elements
175
\setuphead[...][..,..=..,..]
...
style
textstyle
numberstyle
number
ownnumber
page
continue
header
before
inbetween
after
alternative
command
numbercommand
textcommand
prefix
placehead
incrementnumber
align
tolerance
indentnext
file
expansion
section
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
yes no
yes no
left right yes
yes no
none empty high nomarking
command
command
command
normal inmargin middle text
\command#1#2
\command#1
\command#1
+ - text
yes no
yes no file
left right normal broad
verystrict strict tolerant verytolerant stretch
yes no
name
yes command no
Later we will cover many of the parameters mentioned here. This command can be used to set
up one or more heads, while the next can be used to set some common features.
\setupheads[..,..=..,..]
sectionnumber
alternative
separator
command
yes number no
normal margin middle text paragraph
text
\command#1#2
The number of a title can be set up with:
Variations in titles
8
179
176
Text elements
\setupheadnumber[.1.][.2.]
.1.
.2.
section
number +number -number
This command accepts absolute and relative numbers, so [12], [+2] and [+]. The relative
method is preferred, like:
\setuphead[chapter][+1]
This command is only used when one writes macros that do tricky things with heads. A number
can be recalled by:
\headnumber[...]
...
section
and/or:
\currentheadnumber
For example:
\currentheadnumber
: 3
\headnumber[chapter] : 8
\headnumber[section] : 8.3
When you want to use the titlenumber in calculations you must use the command
\currentheadnumber. This number is calculated by and available after:
\determineheadnumber[...]
...
section
When headers and footers use the chapter and section titles they are automatically adapted at
a new page. The example below results in going to new right hand side page for each chapter.
\setuphead
[chapter]
[page=right,
after={\blank[2*big]}]
8
Variations in titles
180
Text elements
177
In extensive documents you can choose to start sections on a new page. The title of the first
section however should be placed directly below the chapter title. You can also prefer to start
this first section on a new page. In that case you set continue at no. Figure 8.1 shows the
difference between these two alternatives.
\setuphead
[section]
[page=yes,continue=no,
after=\blank]
chapter 1
section 1.2
section 1.3
section 1.1
section 1.2
section 1.1
chapter 1
section 1.3
Figure 8.1 Two alternatives for the first section.
It is also possible that you do not want any headers and footers on the page where a new chapter
begins. In that case you should set header at empty, high, nomarking or an identification of
a self defined header (this is explained in section 4.17).
By default the titles are typeset in a somewhat larger font. You can set the text and number
style at your own chosen bodyfont. When the titles make use of the same body font (serif,
sans, etc.) as the running text you should use neutral identifications for these fonts. So you
use \tfb instead of \rmb. Font switching is also an issue in titles. For example if we use \ssbf
instead of \ss\bf there is a chance that capitals and synonyms are not displayed the way they
should. So you should always use the most robust definitions for fontswitching. Commands
like \kap adapt their behaviour to these switchings.
A chapter title consists of a number and a text. It is possible to define your own command that
typesets both components in a different way.
Variations in titles
8
181
178
Text elements
8.3.1 Title alternative equals normal
8.3.2 Title alternative equals inmargin
Title alternative equals middle
These titles were generates by:
\setupheads[alternative=normal]
\subsection{Title alternative equals normal}
\setupheads[alternative=inmargin]
\subsection{Title alternative equals inmargin}
\setupheads[alternative=middle]
\subsubject{Title alternative equals middle}
In this manual we use a somewhat different title layout. The design of such a title is time consuming, not so much because the macros are complicated, but because cooking up something
original takes time. In the examples below we will show the steps in the design process.
\def\HeadTitle#1#2%
{\hbox to \hsize
{\hfill % the % after {#1} suppresses a space
\framed[height=1cm,width=2cm,align=left]{#1}%
\framed[height=1cm,width=4cm,align=right]{#2}}}
\setuphead[subsection][command=\HeadTitle]
8.3.3 Title
A reader will expect the title of a section on the left hand side of the page, but we see an
alternative here. The title is at the right hand side. One of the advantages of using \framed is,
that turning frame=on, some insight can be gained in what is happening.
8.3.4 Another title
This alternative looks somewhat better. The first definition is slightly altered. This example
also shows the features of the command \framed.
\def\HeadTitle#1#2%
{\hbox to \hsize \bgroup
\hfill
8
Variations in titles
182
Text elements
179
\setupframed[height=1cm,offset=.5em,frame=off]
\framed[width=2cm,align=left]{#1}%
\framed[width=4cm,align=right,leftframe=on]{#2}%
\egroup}
\setuphead
[subsection]
[command=\HeadTitle,
style=\tfb]
We see that the font is set with the command \setuphead. These font commands should
not be placed in the command \HeadTitle. You may wonder what happens when ConTEXt
encounters a long title. Here is the answer.
8.3.5 A somewhat
longer
title
Since we have fixed the height at 1cm, the second line of the title end up
below the
frame. We
will solve that problem in the next alternative. A \tbox provides a top aligned box.
\def\HeadTitle#1#2%
{\hbox to \hsize \bgroup
\hfill
\setupframed[offset=.5em,frame=off]
\tbox{\framed[width=3cm,align=left]{#1}}%
\tbox{\framed[width=4cm,align=right,leftframe=on]{#2}}%
\egroup}
\setuphead
[subsection]
[command=\HeadTitle]
This definition results in a title and a number that align on their first lines (due to \tbox).
8.3.6 A considerably longer title
When the title design becomes more complex you have to know more of TEX. Not every design
specification can be foreseen.
Variations in titles
8
183
180
Text elements
\setuphead[subsubject]
[alternative=text,style=bold]
\setuphead[subsubsubject][alternative=text,style=slantedbold]
Titles in the text Why are titles in the text more difficult to program in TEX than we may
expect beforehand. The answer lies in the fact that ConTEXt supports the generation of
parallel documents. These are documents that have a printable paper version and an electronic
screen version. These versions are coupled and thus hyperlinked by their titles. This means
that when you click on a title you will jump to the same title in the other document. So we
couple document versions:
\coupledocument
[screenversion]
[repman-e]
[chapter,section,subsection,subsubsection,part,appendix]
[The Reporting Manual]
\setuphead
[chapter,section,subsection,subsubsection,part,appendix]
[file=screenversion]
The first argument in \coupledocument identfies the screen document and the second argument specifies the file name of that document. The third argument specifies the coupling and
the fourth is a description. After generating the documents you can jump from one version to
another by just clicking the titles. This command only preloads references, the actual coupling
is achieved by \setuphead command. Because titles in a text may take up several lines some
heavy duty manipulation is necessary when typesetting such titles as we will see later.
8.4
Meta--structure
You can divide your document in functional components. The characteristics of the titles may
depend in what component the title is used. By default we distinguish the next functional
components:
• frontmatter
• bodypart
• appendices
• backmatter
Introductions and extroductions are enclosed by \start ... \stop constructs. In that case
the titles will not be numbered like the chapters, but they are displayed in the table of contents.
Within the component ‘bodypart’ there are no specific actions or layout manipulations, but in
the ‘appendices’ the titles are numbered by letters (A, B, C, etc.).
\startfrontmatter
\completecontent
8
Meta--structure
184
Text elements
\chapter{Introduction}
\stopfrontmatter
181
in content, no number
\startbodymatter
\chapter{First}
\section{Alfa}
\section{Beta}
\chapter{Second}
\subject{Blabla}
\stopbodymatter
number 1, in content
number 1.1, in content
number 1.2, in content
number 2, in content
no number, not in content
\startappendices
\chapter{Index}
\chapter{Abbreviations}
\stopappendices
letter A, in content
letter B, in content
\startbackmatter
\chapter{Acknowlegdement} no number, in content
\title{Colofon}
no number, not in content
\stopbackmatter
When this code is processed, you will see that commands like \title and \subject never
appear in the table of content and never get a number. Their behaviour is not influenced by
the functional component they are used in. The behaviour of the other commands depend
on the setup within such a component. Therefore it is possible to adapt the numbering in a
functional component with one parameter setup.
8.5
Alternative mechanisms
Not every document can be structured in chapters and sections. There are documents with
other numbering mechanisms and other ways to indicate levels in the text. The title mechanism
supports these documents.
At the lowest level, the macros of ConTEXt do not work with chapters and sections but with
sectionblocks. The chapter and section commands are predefined sectionblocks. In dutch this
distinction is more clear, since there we have \hoofdstuk and \paragraaf as instances of
‘secties’.
Meta--structure — Alternative mechanisms
8
185
182
Text elements
\definesectionblock[...][..,..=..,..]
...
..=..
name
see p 182: \setupsectionblock
\setupsectionblock[...][..,..=..,..]
...
number
page
before
after
name
yes no
yes right
command
command
\definesection[...]
...
name
\setupsection[...][..,..=..,..]
...
conversion
previousnumber
name
numbers characters Characters romannumerals Romannumerals
yes no
By default there are four sectionblocks:
\definesectionblock
\definesectionblock
\definesectionblock
\definesectionblock
[bodypart]
[appendices]
[introductions]
[extroductions]
[headnumber=yes]
[headnumber=yes]
[headnumber=no]
[headnumber=no]
We see that numbering is set with these commands. When numbering is off local tables of contents can not be generated. When numbers are generated but they do not have to be displayed
you can use \setupheads[sectionnumber=no].
By default every sectionblock starts at a new (right hand side) page. This prevents markings
from being reset too early. A new page is enforced by page.
In ConTEXt there are seven levels in use but more levels can be made available.
\definesection [section-1]
\definesection [section-2]
8
Alternative mechanisms
186
Text elements
183
.............. ..........
\definesection [section-7]
There are a number of titles predefined with the command \definehead. We show here some
of the definitions:
\definehead [part]
[section=section-1]
\definehead [chapter] [section=section-2]
\definehead [section] [section=section-3]
The definition of a subsection differs somewhat from the others, since the subs inherit the
characteristics of a section:
\definehead
[subsection]
[section=section-4,
default=section]
The definitions of unnumbered titles and subjects are different because we don’t want any
numbering:
\definehead
[title]
[coupling=chapter,
default=chapter,
incrementnumber=no]
The unnumbered title is coupled to the numbered chapter. This means that in most situations
the title is handled the same way as a chapter. You can think of the ways new pages are
generated at each new unnumbered title or chapter. Characteristics like the style and color are
also inherited.
There is more to consider. The predefined sectionblocks are used in appendices, because these
have a different numbering system.
\setupsection
[section-2]
[appendixconversion=Character, % Watch the capital
previousnumber=no]
\setuphead
[part]
[placehead=no]
Alternative mechanisms
8
187
184
Text elements
\setuphead
[chapter]
[appendixlabel=appendix,
bodypartlabel=chapter]
This means that within an appendix conversion from number to character takes place, but
only at the level of section 2. Furthermore the titles that are related to section-2 do not get a
prefix in front of the number. The prefix consists of the separate numbers of the sectionblocks:
<section-1><separator><section-2><separator><section-3>
etc.
By default section 2 (appendix) will be prefixed by the partnumber and a separator (.) and this
is not desirable at this instance. At that level we block the prefix mechanism and we prevent
that in lower levels (section 3 ...) the partnumber is included.
In the standard setup of ConTEXt we do not display the part title. You can undo this by saying:
\setuphead[part][placehead=yes]
Chapters and appendices can be labeled. This means that the titles are preceded with a word
like Chapter or Appendix. This is done with \setuplabeltext, for example:
\setuplabeltext[appendix=Appendix˜]
The look of the titles are defined by \setuphead. ConTEXt has set up the lower level section
headings to inherit their settings from the higher level. The default setups for ConTEXt are
therefore limited to:
\setuphead
[part,chapter]
[align=normal,
continue=no,
page=right,
head=nomarking,
style=\tfc,
before={\blank[2*big]},
after={\blank[2*big]}]
\setuphead
[section]
[align=normal,
style=\tfa,
8
Alternative mechanisms
188
Text elements
185
before={\blank[2*big]},
after=\blank]
With nomarking, we tell ConTEXt to ignore markings in running heads at the page where a
chapter starts. We prefer \tfc, because this enables the title to adapt to the actual bodyfont.
The { } around \blank are essential for we do not want any conflicts with [ ].
Earlier we saw that new structuring elements could be defined that inherit characteristics of
existing elements. Most of the time this is sufficient:
\definehead[topic]
[section][style=bold,before=\blank]
\definehead[category][subject][style=bold,before=\blank]
One of the reasons that the mechanism is rather complex is the fact that we use the names of
the sections as setups in other commands. The marking of category can be compared with
that of subject, but that of subject can not be compared with that section. During the last
few years it appeared that subject is used for all sorts of titles in the running text. We don’t
want to see these in headers and footers.
While setting the parameter criterium in lists and registers and the way of numbering, we
can choose persection or persubject. For indicating the level we can use the parameter
section as well as subject. So we can alter the names of sections in logical ones that relate
to their purpose. For example:
\definehead
\definehead
\definehead
\definehead
[handbook]
[procedure]
[subprocedure]
[instruction]
[section=section-1]
[section=section-2]
[section=section-3]
[procedure]
After this we can set up the structuring elements (or inherit them) and generate lists of procedures and instructions. We will discuss this feature in detail in one of the later chapters.
Alternative mechanisms
8
189
\abbreviation
200
\about
208
\at
208
\atpage
208
\completecombinedlist
187
\completelistofsorts
203
\completelistofsynonyms
200
\completeregister
215
\couplemarking
205
\coupleregister
215
\decouplemarking
205
\definecombinedlist
187
\definelist
187
\definemarking
205
\definereferenceformat
215
\defineregister
215
\definesorting
203
\definesynonyms
200
\getmarking
205
8
\in
208
\inline
208
\loadsorts
203
\loadsynonyms
200
\logo
203
\marking
205
\nextregister
215
\nolist
187
\pagereference
208
\placecombinedlist
187
\placelist
187
\placelistofsorts
203
\placelistofsynonyms
200
\placeregister
215
\ref
208
\reference
208
\register
215
\resetmarking
205
\seeregister
215
\setupcombinedlist
187
\setuplist
187
\setupmarking
205
\setupreferencing
208
\setupregister
215
\setupsorting
203
\setupsynonyms
200
\someline
208
\somwhere
208
\sorteer
203
\startline
208
\startregister
215
\synonym
200
\textreference
208
\writebetweenlist
187
\writetolist
187
\writetoregister
215
Alternative mechanisms
190
References
187
References
9.1
Table of contents
The table of contents is very common in books and is used to refer to the text that lies ahead.
Tables of content are generated automatically by:
\placecontent
The table of contents shows a list of chapters and sections but this depends also on the location
where the table of contents is summoned. Just in front of a chapter we will obtain a complete
table. But just after the chapter we will only obtain a list of relevant sections or subsections.
The same mechanism also works with sections and subsections.
9
\chapter{Mammals}
\placecontent
\section{Horses}
A table of contents is an example of a combined list. Before discussing combined lists we go
into single lists. A single list is defined with:
\definelist[.1.][.2.][..,..=..,..]
.1.
.2.
..=..
name
name
see p 189: \setuplist
An example of such a definition is:
\definelist[firstlevel]
Such a list is recalled with:
\placelist[firstlevel]
Each list may have its own set up:
\setuplist[firstlevel][width=2em]
Lists can be set up simultaneously, for example:
\setuplist[firstlevel,secondlevel][width=2em]
To generate a list you type:
Table of contents
9
191
188
References
\placelist[..,...,..][..,..=..,..]
...
..=..
name
see p 189: \setuplist
The layout of a list is determined by the values of alternative (see table 9.1), margin, width
and distance. The alternatives a, b and c are line oriented. A line has the following construct:
margin
width
distance
headnumber
head and pagenumber
In a paper document it is sufficient to set up width. In an interactive document however the
width determines the clickable area. 20
In alternative d the titles in the table will be type set as a continuous paragraph. In that case
the before and after have no meaning. The distance, that is 1em at a minimum, relates
to the distance to the next element in the list. The next set up generates a compact table of
contents:
\setuplist
[chapter]
[before=\blank,after=\blank,style=bold]
\setuplist
[section]
[alternative=d,left=(,right=),pagestyle=slanted,prefix=no]
Since both lists are defined already when defining the sectioning command, we do not define
them here. The parameter prefix indicates whether the preceding level indicator numbering
is used. In this alternative the prefix is not used. Alternative d looks like this:
(1) Table of contents 187 (2) Synonyms 200 (3) Sorting 203 (4) Marking 205
(5) Cross references 208 (6) Predefined references 215 (7) Registers 215
When alternative is set to d, an element in the list has the following construction:
left headnumber right
20
9
head
page distance
This also depends on the value assigned to interaction.
Table of contents
192
References
189
\setuplist[..,...,..][..,..=..,..]
...
state
alternative
coupling
criterium
pageboundaries
style
numberstyle
textstyle
pagestyle
color
command
numbercommand
textcommand
pagecommand
interaction
before
after
inbetween
left
right
label
prefix
pagenumber
sectionnumber
aligntitle
margin
width
height
depth
distance
separator
symbol
expansion
maxwidth
..=..
name
start stop
a b c ... none command
on off
section local previous all
list
normal bold slanted boldslanted type
normal bold slanted boldslanted type
normal bold slanted boldslanted type
normal bold slanted boldslanted type
name
\command#1#2#3
\command#1
\command#1
\command#1
sectionnumber text pagenumber all
command
command
command
text
text
yes no
yes no
yes no
yes no
yes no
dimension
dimension fit
dimension fit broad
dimension fit broad
dimension
text
none 1 2 3 ...
yes no command
dimension
see p 258: \framed
cap
cap
cap
cap
small...
small...
small...
small...
command
command
command
command
When you define a title you also define a list. This means that there are standard lists for
chapters, sections and subsections, etc. available.
These (sub)sections can be combined into one combined list. The default table of contents is
such a combined list:
Table of contents
9
193
190
References
\definecombinedlist
[content]
[part,
chapter,section,subsection,subsubsection,
subsubsubsection,subsubsubsubsection]
[level=subsubsubsubsection,
criterium=local]
The alternative setups equals that of the separate lists.
\definecombinedlist[.1.][..,.2.,..][..,..=..,..]
.1.
.2.
..=..
name
list
see p 190: \setupcombinedlist
\setupcombinedlist[...][..,..=..,..]
...
level
..=..
name
1 2 3 4 section current
see p 189: \setuplist
These commands themselves generate the commands:
\completecombinedlist[...][..,..=..,..]
...
..=..
name
see p 190: \setupcombinedlist
\placecombinedlist[...][..,..=..,..]
...
..=..
name
see p 190: \setupcombinedlist
The first command places a title at the top of the list. This title is unnumbered because we do
not want the table of contents as an element in the list. In the next section we will discuss lists
where the numbered title \chapter is used.
9
Table of contents
194
References
alternative
191
display
a
number – title – pagenumber
b
number – title – spaces – pagenumber
c
number – title – dots – pagenumber
d
number – title – pagenumber (continuous)
e
title (framed)
f
title (left, middle or right aligned)
g
title (centered)
Table 9.1 Alternatives in combined lists.
Possible alternatives are summed up in table 9.1. There are a number of possible variations and
we advise you to do some experimenting when you have specific wishes. The three parameters
width, margin and style are specified for all levels òr for all five levels separately.
\setupcombinedlist
[content]
[alternative=c,
aligntitle=no,
width=2.5em]
The parameter aligntitle forces entries with no section number (like titles, subjects and
alike) to be typeset onto the left margin. Otherwise the title is aligned to the numbered counterparts (like chapter, section and alike). Compare:
title
12 chapter
with:
title
12 chapter
You can also pass setup parameters to the \place... commands. For example:
\placecontent[level=part]
In this situation only the parts are used in the displayed list. Instead of an identifier, like part
or chapter, you can also use a number. However this suggests that you have some insight in
the level of the separate sections (part=1, chapter=2 etc.)
Table of contents
9
195
192
References
A table of contents may cross the page boundaries at an undesired location in the list. Pagebreaking in tables of content can hardly be automated. Therefore it is possible to adjust the
pagebreaking manually. The next example illustrates this.
\completecontent[pageboundaries={2.2,8.5,12.3.3}]
This kind of ‘fine--tuning’ should be done at the end of the production proces. When the document is revised you have to evaluate the pagebreaking location. ConTEXt produces terminal
feedback to remind you when these kind of commands are in effect.
Before a list can be generated the text should be processed twice. When a combined list is not
placed after the text is processed twice you probably have asked for a local list.
There are two commands to write something directly to a list. The first command is used to
add an element and the second to add a command:
\writetolist[.1.]{.2.}{.3.}
.1.
section name
\writebetweenlist[.1.]{.2.}
.1.
section name
We supply a simple example:
\writebetweenlist [section] {\blank}
\writetolist
[section] {---} {from here temporary}
\writebetweenlist [section] {\blank}
The next command is used in situations where information goes into the title but should not
go into the list.
\nolist{...}
...
text
Consider for example the following example:
\definehead[function][ownnumber=yes]
\function{A-45}{manager logistics \nolist{(outdated)}}
\placelist[function][criterium=all]
9
Table of contents
196
References
193
When we call for a list of functions, we will get ( . . . ) instead of (outdated). This can be handy
for long titles. Keep in mind that each head has a corresponding list.
In an interactive document it is common practice to use more lists than in a paper document.
The reason is that the tables of content is also a navigational tool. The user of the interactive
document arrives faster at the desired location when many subtables are used, because clicking
is the only way to get to that location.
In designing an interactive document you can consider the following setup (probably in a different arrangement):
\setuplayout[rightedge=3cm]
\setupinteractions[state=start,menu=on]
\setupinteractionmenu[right][state=start]
\startinteractionmenu[right]
\placecontent
[level=current, criterium=previous,
alternative=f, align=right,
interaction=all,
before=, after=]
\stopinteractionmenu
These definitions make sure that a table of contents is typeset at every page (screen) in the
right edge. The table displays the sections one level deeper than the actual level. So, for each
section we get a list of subsections.
When you produce an interactive document with a table of contents at every level you can make
a (standard) button that refers to [previouscontent]. This reference is generated automatically.
The list elements that are written to a list are not expanded (that is, commands remain commands). When expansion is needed you can set the parameter expansion. Expansion is needed
in situations where you write variable data to the list. This is seldom the case.
In a more extensive document there may occur situations where at some levels there are no
deeper levels available. Then the table of contents at that level is not available either. In that
case you need more information on the list so you can act upon it. You can have access to:
\listlength the number of items
\listwidth
the maximum width of a list element
\listheight the maximum height of a list element
Table of contents
9
197
194
References
These values are determined by:
\determinelistcharacteristics[..,...,..][..,..=..,..]
...
..=..
name
see p 189: \setuplist
We end this section with an overview of the available alternatives. The first three alternatives
are primarily meant for paper documents. The criterium parameter determines what lists
are typeset, so in the next example, the sections belonging to the current chapter are typeset.
\placelist
[section]
[criterium=chapter,alternative=a]
9.1
Table of contents
187
9.2
Synonyms
200
9.3
Sorting
203
9.4
Marking
205
9.5
Cross references
208
9.6
Predefined references
215
9.7
Registers
215
\setuplabeltext[en][section={ugh }]
\placelist
[section]
[criterium=chapter,alternative=a,
label=yes,width=2cm]
ugh 9.1
Table of contents
187
ugh 9.2
Synonyms
200
ugh 9.3
Sorting
203
ugh 9.4
Marking
205
ugh 9.5
Cross references
208
ugh 9.6
Predefined references
215
ugh 9.7
Registers
215
\placelist
[section]
[criterium=chapter,alternative=b]
9.1
9
Table of contents
187
Table of contents
198
References
9.2
Synonyms
9.3
Sorting
9.4
Marking
9.5
Cross references
9.6
Predefined references
9.7
Registers
\placelist
[section]
[criterium=chapter,alternative=b,
pagenumber=no,width=fit,distance=1em]
195
200
203
205
208
215
215
9.1 Table of contents
9.2 Synonyms
9.3 Sorting
9.4 Marking
9.5 Cross references
9.6 Predefined references
9.7 Registers
\placelist
[section]
[criterium=chapter,alternative=c,
chapternumber=yes,margin=1.5cm]
9.1
Table of contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.2
Synonyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.3
Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.4
Marking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.5
Cross references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.6
Predefined references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.7
Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
\placelist % note the spaces on each side of the colon
[section]
[criterium=chapter,alternative=c,
chapternumber=yes,separator={ : },width=fit]
9–187
9–200
9–203
9–205
9–208
9–215
9–215
9.1 : Table of contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–187
9.2 : Synonyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–200
9.3 : Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–203
Table of contents
9
199
196
References
9.4 : Marking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.5 : Cross references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.6 : Predefined references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.7 : Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
\placelist
[section]
[criterium=chapter,alternative=d]
9–205
9–208
9–215
9–215
9.1 Table of contents 187
9.2 Synonyms 200
9.3 Sorting 203
9.4 Marking 205
9.5 Cross references 208 9.6 Predefined references 215 9.7 Registers 215
\placelist
[section]
[criterium=chapter,alternative=d,
distance=2cm]
9.1 Table of contents 187
9.2 Synonyms 200
9.4 Marking 205
9.5 Cross references 208
references 215
9.7 Registers 215
9.3 Sorting 203
9.6 Predefined
\placelist
[section]
[criterium=chapter,alternative=d,
left={(},right={)}]
(9.1) Table of contents 187 (9.2) Synonyms 200 (9.3) Sorting 203 (9.4) Marking 205
(9.5) Cross references 208 (9.6) Predefined references 215 (9.7) Registers 215
\placelist
[section]
[criterium=chapter,alternative=e]
Table of contents
Synonyms
Sorting
Marking
Cross references
Predefined references
9
Table of contents
200
References
197
Registers
\placelist
[section]
[criterium=chapter,alternative=e,
width=\textwidth,background=screen]
Table of contents
Synonyms
Sorting
Marking
Cross references
Predefined references
Registers
\placelist
[section]
[criterium=chapter,alternative=e,
width=4cm]
Table of contents
Synonyms
Sorting
Marking
Cross references
Predefined references
Registers
\placelist
[section]
[criterium=chapter,alternative=f]
Table of contents
Table of contents
9
201
198
References
Synonyms
Sorting
Marking
Cross references
Predefined references
Registers
\placelist
[section]
[criterium=chapter,alternative=g]
Table of contents
Synonyms
Sorting
Marking
Cross references
Predefined references
Registers
Within a list entry, each element can be made interactive. In most cases, in screen documents,
the option all is the most convenient one. Alternative e is rather well suited for screen documents and accepts nearly all parameters of \framed. In the next example we use a symbol
instead of a sectionnumber. The parameter depth applies to this symbol.
\placelist
[section]
[criterium=chapter,alternative=a,
pagenumber=no,distance=1em,
symbol=3,height=1.75ex,depth=.25ex,numbercolor=gray]
Table of contents
Synonyms
Sorting
Marking
Cross references
Predefined references
Registers
When using color, don’t forget to enable it. In the last example, All alternatives provide the
means to hook in commands for the section number, text and pagenumber. Real complete
9
Table of contents
202
References
199
freedom is provided by alternative none.
\placelist
[section]
[criterium=chapter,alternative=none,
numbercommand=\framed,
textcommand=\framed,pagecommand=\framed]
9.1 Table of contents 187
9.2 Synonyms 200
9.3 Sorting 203
9.4 Marking 205
9.5 Cross references 208
9.6 Predefined references 215
9.7 Registers 215
\def\ListCommand#1#2#3%
{at page {\bf #3} we discuss {\bf #2}}
\placelist
[section]
[criterium=chapter,alternative=none,
command=\ListCommand]
at
at
at
at
at
at
at
page
page
page
page
page
page
page
187
200
203
205
208
215
215
we
we
we
we
we
we
we
discuss
discuss
discuss
discuss
discuss
discuss
discuss
Table of contents
Synonyms
Sorting
Marking
Cross references
Predefined references
Registers
This alternative still provides much of the built--in functionality. Alternative command leaves
nearly everything to the macro writer.
\def\ListCommand#1#2#3%
{At p˜#3 we discuss {\em #2}; }
\placelist
[section]
Table of contents
9
203
200
References
[criterium=chapter,alternative=command,
command=\ListCommand]
At p 187 we discuss Table of contents; At p 200 we discuss Synonyms; At p 203 we discuss
Sorting; At p 205 we discuss Marking; At p 208 we discuss Cross references; At p 215 we
discuss Predefined references; At p 215 we discuss Registers;
As an alternative for none, we can use horizontal and vertical. Both commands have their
spacing tuned for typesetting lists in for instance menus.
9.2
Synonyms
In many texts we use abbreviations. An abbreviation has a meaning. The abbreviation and its
meaning have to be used and typeset consistently throughout the text. We do not like to see
ABC and in the next line an ABC. For this reason it is possible to define a list with the used
abbreviations and their meanings. This list can be recalled and placed at the beginning or end
of a book for the convenience of the reader.
The use of abbreviations is an example of the synonym mechanism. A new category of synonyms is defined with the command:
\definesynonyms[.1.][.2.][.3.][.4.]
.1.
.2.
.3.
.4.
singular name
plural name
command
command
The way the list is displayed can be influenced by:
\setupsynonyms[...][..,..=..,..]
...
textstyle
synonymstyle
location
width
state
criterium
conversion
expansion
command
9
name
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
left right top serried inmargin inleft inright
dimension
start stop
all used
yes no
yes command no
\command#1#2#3
Table of contents — Synonyms
204
References
201
Abbreviations are defined with the command:
\definesynonyms[abbreviation][abbreviations][\infull]
We will explain the optional fourth argument later. After this definition a new command
\abbreviation is available. An example of the use of abbreviations is:
\abbreviation {UN} {United Nations}
\abbreviation {UK} {United Kingdom}
\abbreviation {USA} {United States of America}
The meaning can be used in the text by:
\infull{abbreviation}
It is also possible to add commands in the abbreviation. In that case the command must be
typed literally between the [ ]:
\abbreviation [TEX] {\TeX} {The \TeX\ Typesetting System}
Recalling such an abbreviation is done with \TEX and the meaning can be fetched with
\infull {TEX}. In a running text we type \TEX\ and in front of punctuation \TEX.
A synonym is only added to a list when it is used. When you want to display all defined
synonyms (used and not used) you have to set the parameter criterium at all. By setting
state at stop you will prevent list elements to be the added to the list even when they are
used. This can be a temporary measure:
\setupsynonyms[abbreviation][state=stop]
\abbreviation {NIL} {Not In List}
\setupsynonyms[abbreviation][state=start]
Here we left out the optional first argument, in which case the abbreviation itself becomes the
command (\NIL). So, in this case the next two definitions are equivalent:
\abbreviation [NIL] {NIL} {Not In List}
\abbreviation {NIL} {Not In List}
The formal definition of a synonym looks like this:
\synonym[.1.]{.2.}{.3.}
.1.
.2.
.3.
text
text
text
Synonyms
9
205
202
References
A list of synonyms is generated by:
\placelistofsynonyms
The next command generates a list with a title (\chapter):
\completelistofsynonyms
Here we see why we typed the plural form during the definition of the synonym. The plural is
also used as the title of the list and the first character is capitalized. The title can be altered
with \setuphead (see section 8.3).
Synonyms are only available after they are used. There are instances when the underlying
mechanism cannot preload the definitions. When you run into such troubles, you can try to
load the meaning of the synonyms with the command:
\loadsynonyms
For instance, the meaning of abbreviations can be loaded with \loadabbreviations. In order
to succeed, the text has to be processed at least once. Don’t use this command if things run
smoothly.
Next to the predefined abbreviations we also defined the si--units as synonyms. These must be
loaded as a separate module. We will discuss this in section ??.
The attentive reader has seen that the command \definesynonyms has four arguments. The
fourth argument is reserved for a command with which you can recall the synonym. In this
way the synonyms are protected from the rest of the ConTEXt commands and there will be no
conflicts using them.
\definesynonyms[Function][Functions][\FunctionName][\FunctionNumber]
We could define some functions like:
\Function [0001] {0001a} {Lithographer}
\Function [0002] {0002x} {Typesetter}
Than we can recall number and name by \FunctionName (Lithographer and Typesetter) and
\FunctionNumber (0001a and 0002x), so:
The \FunctionName{0001} has functionnumber \FunctionNumber{0001}.
9
Synonyms
206
References
9.3
203
Sorting
Another instance of lists with synonyms is the sorted list. A sorted list is defined with:
\definesorting[.1.][.2.][.3.]
.1.
.2.
.3.
singular name
plural name
command
The list is set up with:
\setupsorting[...][..,..=..,..]
...
before
after
command
state
criterium
style
expansion
name
command
command
\command#1
start stop
all used
normal bold slanted boldslanted type cap small... command
yes command no
After the definition the next command is available. The sort indicates the name for the list
you defined.
\sort[.1.]{.2.}
.1.
.2.
text
text
In accordance to lists there are two other commands available:
\placelistofsorts
The title can be set up with \setuphead:
\completelistofsorts
An example of sorting is:
Synonyms — Sorting
9
207
204
References
\definesorting[city][cities]
\setupsorting[city][criterium=all]
\city
\city
\city
\city
\city
{London}
{Berlin}
{New York}
{Paris}
{Hasselt}
\placelistofcities
The definition is typed in the setup area of your file or in an environment file. The cities can
be typed anywhere in your text and the list can be recalled anywhere.
Berlin
Hasselt
London
New York
Paris
Another instance of the sorting command is that where we must type the literal text of the
synonym in order to be able to sort the list. For example if you want a sorted list of commands
you should use that instance. The predefined command \logo is an example of such a list.
\logo [TEX]
{\TeX}
\logo [TABLE] {\TaBlE}
When you use the alternative with the [ ] ConTEXt automatically defines a command that
is available throughout your document. In the example above we have \TABLE and \TEX for
recalling the logo. For punctuation we use \TABLE.
We advise you to use capital letters to prevent interference with existing ConTEXt and/or TEX
commands.
Like in synonyms, a sorted list is only available after an entry is used. When sorting leads to
any problems you can load the list yourself:
\loadsorts
When we add a command in the third argument during the definition of the sorted list we may
recall sorted list with this command. In this way the sorted lists can not interfere with existing
commands (see section 9.2).
9
Sorting
208
References
9.4
205
Marking
There is a feature to add ‘invisible’ marks to your text that can be used at a later stage. Marks
can be used to place chapter or section titles in page headers or footers.
A mark is defined with:
\definemarking[.1.][.2.]
.1.
.2.
name
name
The second optional argument will be discussed at the end of this section. After the definition
texts can be marked by:
\marking[.1.]{.2.}
.1.
.2.
name
text
and recalled by:
\getmarking[.1.][.2.]
.1.
.2.
name
first last previous both all
In analogy with the TEX--command \mark, we keep record of three other marks per mark (see
table 9.2).
marks
location
previous
the last of the previous page
first
the first of the actual page
last
the last of the actual page
both
first — last
all
previous — first — last
Table 9.2 Recorded marks, completed with some combinations.
Sorting — Marking
9
209
206
References
When you use a combination of marks (both and all) marks are separated by an —. This
separator can be set up with:
\setupmarking[...][..=..]
...
state
separator
expansion
name
start stop
command
yes no
The use of marks can be blocked with the parameter state. The parameter expansion relates
to the expansion mechanism. By default expansion is inactive. This means that a command
is stored as a command. This suits most situations and is memory effective. When you use
altering commands in the mark you should activate the expansion mechanism.
Marks are initialised by:
\resetmarking[...]
...
name
At the beginning of a chapter the marks of sections, subsections, etc. are reset. If we do not
reset those marks would be active upto the next section or subsection.
Assume that a word list is defined as follows (we enforce some pagebreaks on purpose):
\definemarking[words]
\marking[words]{first}first word ...
\marking[words]{second}second word ...
\page
\marking[words]{third}third word ...
\marking[words]{fourth}fourth word ...
\page
\marking[words]{fifth}fifth word ...
\page
The results are shown in table 9.3.
9
Marking
210
References
page
previous
207
first
last
1
—
first
second
2
second
third
fourth
3
fourth
fifth
fifth
Table 9.3 The reordering of marks.
While generating the title of chapters and sections first is used. The content of the marks
can be checked easily by placing the mark in a footer:
\setupfootertexts
[{\getmarking[words][first]}]
[]
or all at once:
\setupfootertexts
[{\getmarking[words][previous]} -{\getmarking[words][first]} -{\getmarking[words][last]}]
[]
A more convenient way of achieving this goal, is the following command. The next method
also takes care of empty markings.
\setupfootertexts[{\getmarking[words][all]}][]
Commands like \chapter generate marks automatically. When the title is too long you can
use the command \nomarking (see section 8.2) or pose limits to the length. In ConTEXt the
standard method to place marks in footers is:
\setupfootertexts[chapter][sectionnumber]
In case you defined your own title with \definehead, the new title inherits the mark from the
existing title. For example when we define \category as follows:
\definehead[category][subsection]
After this command it does not matter whether we recall the mark by category or subsection.
In this way we can also set up the footer:
\setupfootertexts[chapter][category]
Marking
9
211
208
References
There are situations where you really want a separate mark mechanism category. We could
define such a mark with:
\definemarking[category]
However, we do want to reset marks so we have to have some information on the level at which
the mark is active. The complete series of commands would look something like this:
\definehead[category][subsection]
\definemarking[category]
\couplemarking[category][subsection]
Note that we do this only when we both use category and subsection! After these commands
it is possible to say:
\setupfootertexts[subsection][category]
The command \couplemarking is formally defined as:
\couplemarking[.1.][.2.]
.1.
.2.
name
name
Its counterpart is:
\decouplemarking[...]
...
name
It is obvious that you can couple marks any way you want, but it does require some insight in
the ways ConTEXt works.
9.5
Cross references
We can add reference points to our text for cross referencing. For example we can add reference
points at chapter titles, section titles, figures and tables. These reference points are typed
between [ ]. It is even allowed to type a list of reference points separated by a comma. We
refer to these reference points with the commands:
ð ñ
\in{.1.}{.2.}[ref]
.1.
9
text
Marking — Cross references
212
References
ð ñ
\at{.1.}{.2.}[ref]
.1.
text
ð ñ
\about{...}[ref]
...
209
text
A cross reference to a page, text (number) or both can be made with:
\pagereference[ref]
\textreference[ref]{...}
...
text
\reference[ref]{...}
...
text
The command \in provides the number of a chapter, section, figure, table, etc. The command
\at produces a pagenumber and \about produces a complete title. In the first two calls, the
second argument is optional, and when given, is put after the number or title.
In the example below we refer to sections and pages that possess reference points:
In section˜\in[cross references], titled \about[cross references], we
describe how a cross reference can be defined. This section starts
at page˜\at[cross references] and is part of chapter˜\in[references].
This becomes:
In section 9.5, titled “Cross references”, we describe how a cross reference can be defined. This
section starts at page 208 and is part of chapter 9.
Here is another variation of the same idea:
In \in{section}[cross references], titled \about[cross references], we
describe how a cross reference can be defined. This section starts
at \at{page}[cross references] and is part of \in{chapter}[references].
Cross references
9
213
210
References
We prefer this way of typing the cross references, especially in interactive documents. The
clickable area is in this case not limited to the number, but also includes the preceding word,
which is more convenient, especially when the numbering is disabled. In the first example you
would have obtained a symbol like that is clickable. This symbol indicates the direction of the
cross reference: forward or backward .
The direction of a hyperlink can also be summoned by the command \somewhere. In this way
we find chapters or other text elements before and discuss somewhere later the descriptions.
\somewhere{.1.}{.2.}[ref]
.1.
text
This command gets two texts. The paragraph will be typed like this:
The direction of a hyperlink can also be summoned by the command
\type {\somewhere}. In this way we find chapters or other text elements
\somewhere {before} {after} [text elements] and discuss somewhere
\somewhere {previous} {later} [descriptions] the descriptions.
The next command does not need any text but will generate it itself. The generated texts can
be defined with \setuplabeltext (see page 164).
\atpage[ref]
At the locations where we make reference points we can also type a complete list of reference
points in a comma delimited list:
\chapter[first,second,third]{First, second and third}
Now you can cross reference to this chapter with \in[first], \in[second] or \in[third].
In a large document it is difficult to avoid the duplication of labels. Therefore it is advisable
to bring some order to your reference point definitions. For example, in this manual we use:
[fig:first], [int:first], [tab:first] etc. for figures, intermezzos and tables respectively.
ConTEXt can do this for you automatically. Using the command \setupreferencing, you can
set for instance prefix=alfa, in which case all references will be preceded by the word alfa.
A more memory efficient approach would be to let ConTEXt generate a prefix itself: prefix=+.
Prefixing can be stopped with prefix=-.
9
Cross references
214
References
211
In many cases, changing the prefix in many places in the document is not an example of clearness and beauty. For that reason, ConTEXt is able to set the prefix automatically for each
section. When for instance you want a new prefix at the start of each new chapter, you can use
the command \setuphead to set the parameter prefix to +. The chapter reference itself is
not prefixed, so you can refer to them in a natural way. The references within that chapter are
automatically prefixed, and thereby local. When a chapter reference if given, this one is used
as prefix, otherwise a number is used. Say that we have defined:
\setuphead[chapter][prefix=+]
\chapter[texworld]{The world of \TeX}
In this chapter, we can safely use references, without the danger of clashing with references in
other chapters. If we have a figure:
\placefigure[here][fig:worldmap]{A map of the \TeX\ world}{...}
In the chapter itself we can refer to this figure with:
\in {figure} [fig:worldmap]
but from another chapter, we should use:
\in {figure} [texworld:fig:worldmap]
In general, when ConTEXt tries to resolve a reference in \in, \at etc., it first looks to see
whether it is a local reference (with prefix). If such a reference is not available, ConTEXt
will look for a global reference (without prefix). If you have some trouble understanding the
mechanism during document production you can visualize the reference with the command
\version[temporary].
There are situations where you want to make a global reference in the middle of document. For
example when you want to refer to a table of contents or a register. In that case you can type
-: in the reference point label that no prefix is needed: you type [-:content]. Especially in
interactive documents the prefix--mechanism is of use, since it enables you to have documents
with thousands of references, with little danger for clashes. In the previous example, we would
have got a global reference by saying:
\placefigure[here][-:fig:worldmap]{A map of the \TeX\ world}{...}
The generation of references can be started, stopped and influenced with the command:
Cross references
9
215
212
References
\setupreferencing[..=..]
state
sectionnumber
prefix
interaction
width
left
right
convertfile
separator
start stop
yes no
+ - text
label text all symbol
dimension
command
command
yes no
text
In this command the parameter \sectionnumber relates to the way the page numbers must
be displayed. In interactive documents, we can refer to other documents. In that case, when
the parameter convertfile is set to yes, external filenames are automatically converted to
uppercase, which is sometimes needed for cdrom distributions. We will go into details later.
References from another document can be loaded with the command:
\usereferences[..,...,..]
...
file
With left and right you can define what is written around a reference generated by \about.
Default these are quotes. The parameter interaction indicates whether you want references
to be displayed like section 1.2, section, 1.2 or as a symbol, like .
What exactly is a cross reference? Earlier we saw that we can define a reference point by typing
a logical label at the titles of chapters, sections, figures, etc. Then we can summon the numbers
of chapters, sections, figures, etc. or even complete titles at another location in the document.
For some internal purposes the real pagenumber is also available. In the background real
pagenumbers play an important role in the reference mechanism.
In the examples below we discuss in detail how the reference point definitions and cross referencing works in ConTEXt.
\reference[my reference]{{Look}{at}{this}}
The separate elements can be recalled by \ref:
p the typeset pagenumber \ref[p][my reference] 212
t the text reference
\ref[t][my reference] Look
r the real pagenumber
\ref[r][my reference] 216
9
Cross references
216
References
s the subtext reference
e the extra text reference
213
\ref[s][my reference] at
\ref[e][my reference] this
In a paper document the reference is static: a number or a text. In an interactive document a
reference may carry functionality like hyperlinks. In addition to the commands \in and \at
that we discussed earlier we have the command \goto, which allows us to jump. This command
does not generate a number or a text because this has no meaning in a paper version.
ConTEXt supports interactivity which is integrated into the reference mechanism. This integration saved us the trouble of programming a complete new set of interactivity commands
and the user learns how to cope with these non--paper features in a natural way. In fact there is
no fundamental difference in referring to chapter 3, the activation of a JavaScript, referring
to another document or the submitting of a completed form.
A direct advantage of this integration is the fact that we are not bound to one reference, but
we can define complete lists of references. This next reference is legal:
... see \in{section}[flywheel,StartVideo{flywheel 1}] ...
As expected this command generates a section number. And in an interactive document you
can click on section nr and jump to the correct location. At the moment that location is reached
a video titled flywheel 1 is started. In order to reach this kind of comfortable referencing we
cannot escape a fully integrated reference mechanism.
Assume that you want to make a cross reference for a general purpose. The name of the
reference point is not known yet. In the next example we want to start a video from a general
purpose menu:
\startinteractionmenu[right]
\but [previouspage] previous
\but [nextpage]
next
\but [ShowAVideo]
video
\but [CloseDocument] stop
\stopinteractionmenu
\\
\\
\\
\\
Now we can activate a video at any given moment by defining ShowAVideo:
\definerreference[ShowAVideo][StartVideo{a real nice video reel}]
This reference can be redefined or erased at any moment:
\definereference[ShowAVideo][]
Cross references
9
217
214
References
\definereference[...][ref,..]
...
name
\startlinenumbering
A special case of referencing is that of referring to linenumbers.
\startline [line:a] Different line numbering mechanism can be used
interchangeably. \startline [line:b] This leads to confusing input.
\stopline [line:a] \startline [line:c] Doesn’t it? \stopline [line:c]
\stopline [line:b] A cross reference to a line can result in one line
number or a range of lines. \someline[line:d] {A cross reference is
specified by \type {\inline} where the word {\em line(s)} is
automatically added.} Here we have three cross references: \inline
[line:a], \inline [line:b], \inline[line:c] and \inline {as the last
reference} [line:d].
\stoplinenumbering
With \startlines..\stoplines you will obtain the range of lines in a cross reference and in
case of \someline you will get the first line number. In this example we see that we can either
let ConTEXt generate a label automatically, or privide our own text between braces.
1
2
3
4
5
6
A special case of referencing is that of referring to linenumbers. Different line numbering mechanism can be used interchangeably. This leads to confusing input. Doesn’t
it? A cross reference to a line can result in one line number or a range of lines.
[line:d] A cross reference is specified by \inline where
the word line(s) is automatically added. Here we have three cross references: line 1–2, line 2–3,
line 2–3 and as the last reference ??.
\startlines ... \stoplines
\someline[ref]
\inline[ref]
9
Cross references
218
References
9.6
215
Predefined references
One can imagine that it can be cumbersome and even dangerous for consistency when one has
many references which the same label, like figure in \in{figure}[somefig]. For example,
you may want to change each figure into Figure afterwards. The next command can both save
time and force consistency:
\definereferenceformat[...][..,..=..,..]
...
left
right
text
label
name
text
text
text
name
Given the following definitions:
\definereferenceformat [indemo] [left=(,right=),text=demo]
\definereferenceformat [indemos] [left=(,right=),text=demos]
\definereferenceformat [anddemo] [left=(,right=),text=and]
we will have three new commands:
\indemo [demo:b]
\indemo {some text} [demo:b]
\indemos {some text} [demo:b] \indemo {and more text} [demo:c]
\indemos [demo:b] \anddemo [demo:c]
These will show up as:
demo (BB)
some text (BB)
some text (BB) and more text (CC)
demos (BB) and (CC)
Instead of using the text parameter, one can use label and recall a predefined label. The
parameter command can be used to specify the command to use (\in by default).
9.7
Registers
A book without a register is not likely to be taken seriously. Therefore we can define and
generate one or more registers in ConTEXt. The index entries are written to a separate file.
The Perl script TEXutil converts this file into a format TEX can typeset.
Cross references — Predefined references — Registers
9
219
216
References
A register is defined with the command:
\defineregister[.1.][.2.]
.1.
.2.
singular name
plural name
There are a number of commands to create register entries and to place registers. One register
is available by default:
\defineregister[index][indices]
An entry is created by:
\register[.1.]{..+.2.+..}
.1.
.2.
text
text
An entry has a maximum of three levels. The subentries are separated by a + or &. We illustrate
this with an example.
\index{car}
\index{car+wheel}
\index{car+engine}
When index entries require special typesetting, for example \sl and \kap we have to take some
measures, because these kind of commands are ignored during list generation and sorting. In
those cases we can use the extended version. Between [ ] we type the literal ascii--string
which will determine the alphabetical order.
For example we have defined logos or abbreviations like
an index entry must look like this:
UN, UK
and
USA
(see section 9.2), then
\index[UN]{\UN}
\index[UK]{\UK}
\index[USA]{\USA}
If we do not do it this way
UN, UK
and
USA
will be placed under the \.
A cross reference within a register is created with:
9
Registers
220
References
217
\seeregister[.1.]{.2.}{..+.3.+..}
.1.
.2.
.3.
text
text
text
This command has an extended version also with which we can input a ‘pure’ literal ascii
string.
A register is generated and placed in your document with:
ð ñ
\placeregister[..,..=..,..]
..=..
see p 218: \setupregister
The next command results in register with title:
ð ñ
\completeregister[..,..=..,..]
..=..
see p 218: \setupregister
The register can be set up with the command \setupregister. When you use the command
\version[temporary] during processing, the entries and their locations will appear in the
margin (see section ??).
Registers
9
221
218
References
\setupregister[.1.][.2.][..,..=..,..]
.1.
.2.
n
balance
align
style
pagestyle
textstyle
indicator
coupling
sectionnumber
criterium
distance
symbol
interaction
expansion
referencing
command
location
maxwidth
unknownreference
singular name
name
number
yes no
yes no
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
yes no
yes no
yes no
section local all part
dimension
1 2 ... n a ... none
pagenumber text
yes command no
on off
\command#1
left middle right
dimension
empty none
By default a complete register is generated. However it is possible te generate partial registers.
In that case the parameter criterium must be set. With indicator we indicate that we want
a letter in the alphabetical ordering of the entries. When referencing=on is a pagereference
is generated for every letter indicator, for example index:a or index:w. We can use these
automatically generated references to refer to the page where for instance the a--entries start.
The commands we have mentioned thus far allow us to use a spacious layout in our source
file. This means we can type the entries like this:
\chapter{Here we are}
\section{Where we are}
\index{here}
\index{where}
Wherever you are ...
Between \chapter and \section we should not type any text because the vertical spacing
might be disturbed by the index entries. The empty line after the entry has no consequences.
9
Registers
222
References
219
In case there are problems we always have the option to write index entries to the list by the
more direct command:
\writetoregister[.1.][.2.]{..+.3.+..}
.1.
.2.
.3.
singular name
text
text
There the expansion mechanism can be activated. Default expansion is inactive (see page 206).
In this reference manual there is a register with commands. This register is defined and initialised with:
\defineregister [macro] [macros]
\setupregister [macro] [indicator=no]
And we can find entries like:
\macro{\tex{chapter}}
\macro{\tex{section}}
In case we want a register per chapter we can summon the accompanying register with the
command below (the command \tex will place a \ in front of a word, but is ignored during
sorting): 21
\placeregister[macro]
[criterium=chapter,n=2,before=,after=]
and we will obtain:
\abbreviation 200
\about 208
\at 208
\atpage 208
\completecombinedlist 187
\completelistofsorts 203
\completelistofsynonyms 200
\completeregister 215
\couplemarking 205
21
\coupleregister 215
\decouplemarking 205
\definecombinedlist 187
\definelist 187
\definemarking 205
\definereferenceformat 215
\defineregister 215
\definesorting 203
\definesynonyms 200
Of course, \placemacro and \completemacros are also available.
Registers
9
223
220
References
\seeregister 215
\setupcombinedlist 187
\setuplist 187
\setupmarking 205
\setupreferencing 208
\setupregister 215
\setupsorting 203
\setupsynonyms 200
\someline 208
\somwhere 208
\sorteer 203
\startline 208
\startregister 215
\synonym 200
\textreference 208
\writebetweenlist 187
\writetolist 187
\writetoregister 215
\getmarking 205
\in 208
\inline 208
\loadsorts 203
\loadsynonyms 200
\logo 203
\marking 205
\nextregister 215
\nolist 187
\pagereference 208
\placecombinedlist 187
\placelist 187
\placelistofsorts 203
\placelistofsynonyms 200
\placeregister 215
\ref 208
\reference 208
\register 215
\resetmarking 205
A warning is due. The quality of the content of a register is completely in your hands. A bad
selection of index entries leads to an inadequate register that is of no use to the reader.
Every entry shows one or more pagenumbers. With symbol we can define some alternatives.
With distance the horizontal spacing between word and number or symbol is set.
symbol
display
a
abcd
n
1234
1
• • ••
2
Table 9.4 Alternatives for pagenumbers in registers.
Most of the time the layout of a register is rather simple. Some manuals may need some form of
differentiating between entries. The definition of several registers may be a solution. However
9
Registers
224
References
221
the layout can contribute to a better use of the register:
\index
{entry}
\index[key]
{entry}
\index[form::]
{entry}
\index[form::key]{entry}
\index
{form::entry}
\index[key]
{form::entry}
\index[form::]
{form::entry}
\index[form::key]{form::entry}
The first two alternatives are known, but the rest is new and offers some control over the
way the entry itself is typeset. The specification between [ ] relates to the pagenumber, the
specification in front of the entry relates to the entry itself.
\setupregister[index][form][pagestyle=bold,textstyle=slanted]
Without any problems we can use different appearances for pagenumber and entry.
\setupregister[index][nb][pagestyle=bold]
\setupregister[index][hm][pagestyle=slanted]
With for example:
\index[nb::]{squareroot}
\index[hm::root]{$\srqt{2}$}
The index entries we have discussed so far indicate the one page where the entry is made, but
we can also indicate complete ranges of pages using:
\startregister[.1.]{..+.2.+..}
.1.
.2.
text
text
The entries in between, which are of the same order, are not placed in the register.
\startregister[endless]{endless}
...... an endless story ......
\stopregister[endless]
An extensive index entry, i.e. an entry with a large number of appearances, may have an uncomfortably long list of pagenumbers. Especially in interactive documents this leads to endless
Registers
9
225
222
References
back and forth clicking. For this purpose we designed the feature of linked index entries. This
means that you can couple identical entries into a list that enables the user to jump from entry
to (identical) entry without returning to the register. The coupling mechanism is activated by:
\setupregister[index][coupling=yes]
In this way a mechanism is activated that places references in the register ( ) as well as in
the text ( word ) depending on the availability of alternatives. A jump from the register will
bring you to the first, the middle or the last appearance of the entry.
This mechanism is only working at the first level; subentries are ignored. Clicking on the word
itself will bring you back to the register. Because we need the clickable word in the text we use
the following command for the index entry itself:
\coupledregister[.1.]{.2.}
.1.
.2.
text
text
For example \coupledindex{where}. The couplings must be loaded with the command:
\coupleregister[...]
...
name
Normally this command is executed automatically when needed, so it’s only needed in emergencies.
9
Registers
226
227
224
\but
235
\currentname
234
\definedescription
225
\description
225
\enumeration
228
\enumeration
228
\head
235
\incrementname
234
\indentation
232
\indentation
232
\item
235
\items
244
\its
235
\label
234
\label
234
\mar
235
\name
225, 228, 232
\nextname
228, 234
\nextsubname
228
\nextsubsubname
228
\nop
235
\quotation
246
\quote
246
\ran
235
\resetname
228, 234
\setupdescriptions
225
\setupenumerations
228
\setupindentations
232
\setupitemize
235
\setupitems
244
\setupquotation
246
\startdescription
225
\startenumeration
228
\startitemize
235
\startquotation
246
\sub
235
\subname
228
\subsubname
228
\subsubsubname
228
\sym
235
228
Descriptions
225
In a document we can find text elements that bring structure to a document. We have already
seen the numbered chapter and section titles, but there are more elements with a recognizable
layout. We can think of numbered and non--numbered definitions, itemizations and citations.
One of the advantages of TEX and therefore of ConTEXt is that coding these elements enables
us to guarantee a consistent design in our document, which in turn allows us to concentrate
on the content of our writing.
10
Descriptions
10.1
Introduction
In this chapter we will discuss some of the elements that will bring structure to your text. We
advise you to experiment with the commands and their setups. When applied correctly you
will notice that layout commands in your text are seldom necessary.
10.2
Definitions
Definitions of concepts and/or ideas, that are to be typeset in a distinctive way, can be defined
by \definedescription.
\definedescription[...][..,..=..,..]
...
..=..
name
see p 227: \setupdescriptions
The first argument of this command contains the name. After the definition a new command
is available.
\description{.1.}.2.\par
.1.
.2.
text
text
An example of the definition is:
\definedescription[definition][location=top,headstyle=bold]
\definition{icon}
Introduction — Definitions
10
229
226
Descriptions
An icon is a representation of an action or the name of a computer
program. Icons are frequently used in operating systems on several
computer platforms. \par
Several alternatives are displayed below:
icon
An icon is a representation of an action or the name of a computer program. Icons are frequently used in operating systems on several computer platforms.
Some users of those computer platforms are using these icons with an almost
religious fanaticism. This brings the word icon almost back to its original
meaning.
icon
icon
icon
An icon should be recognizable for every user but they are designed within a
cultural and historical setting. In this fast and ever changing era the recognizability of icons is relative.
The 8--bit principle of computers was the reason that non--Latin scriptures were hardly supported by the operating systems. Not long ago this changed.
icon What for some languages looked like a handicap has now become a feature. Thousands
of words and concepts are already layed down in characters. These characters therefore can
be considered icons.
icon
It is to be expected that people with expressive languages overtake us in computer usage because they are used to thinking in concepts.
icon
The not--so--young generation remembers the trashcan in the earlier operating
systems used to delete files. We in Holland were lucky that the text beneath
it said: trashcan. A specific character for the trashcan would have been less sensitive misinterpretation, than the rather American--looking garbage receptacle unknown to many young
people.
In the fifth example the definition is placed serried and defined as:
\definedescription
[definition]
[location=serried,headstyle=bold,width=broad,sample={icon}]
\definition{icon}
What for some languages looked like a handicap has now become a feature.
Thousands of words and concepts are already layed down in characters.
These characters therefore can be considered icons. \par
10
Definitions
230
Descriptions
227
In the seventh example we have set hang at broad. This parameter makes only sense when we
set the label at the right or left. When we set width at fit or broad instead of a number, the
width of the sample is used. With fit, no space is added, with broad, a space of distance is
inserted. When no sample is given the with of the defined word is used. The parameter align
specifies in what way the text is aligned. When the definition is placed in the margin or typeset
in a serried format, the parameter margin is of importance. When set to standard or ja, the
marging follows the document setting. Alternatively you can pass a dimension.
Some characteristics of the description can be specified with:
\setupdescriptions[..,...,..][..,..=..,..]
...
headstyle
style
color
width
distance
sample
text
align
margin
location
hang
before
inbetween
after
indentnext
name
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
name
fit broad dimension
dimension
text
text
left middle right
standard yes no dimension
left right top serried inmargin inleft inright hanging
fit broad number
command
command
command
yes no
The setup of a description can be changed with the command below. This has the same construct as \definedescription:
\setupdescriptions[name][setups]
When a description consists of more than one paragraph, use:
\startdescription{...} ... \stopdescription
...
text
\startdefinition{icon}
An icon is a painting of Jesus Christ, Mother Mary or other holy figures.
These paintings may have a special meaning for some religious people.
Definitions
10
231
228
Descriptions
For one reason or the other the description icon found its way to the
computer world where it leads its own life.
\stopdefinition
These commands will handle empty lines adequately.
10.3
Enumeration
Sometimes you will encounter text elements you would like to number, but they do not fit into
the category of figures, tables, etc. Therefore ConTEXt has a numbering mechanism that we
use for numbering text elements like questions, remarks, examples, etc. Such a text element
is defined with:
\defineenumeration[..,.1.,..][.2.][..,..=..,..]
.1.
.2.
..=..
name
name
see p 230: \setupenumerations
After such a definition, the following commands are available:
\name
\subname
\subsubname
\subsubsubname
Where name stands for any chosen name.
ð ñ
\enumeration...\par
...
text
The numbering can take place at four levels. Conversion is related to the last level. If you
specify a text, then this will be a label that preceeds every generated number. A number can
be set and reset with the command:
\setenumeration{value}
\resetenumeration
You can use the start parameter in the setup command to explictly state a startnumber. Keep
in mind that the enumeration commands increase the number, so to start at 4, one must set
the number at 3. Numbers and subnumbers and be explictly increased with the commands:
10
Definitions — Enumeration
232
Descriptions
229
\nextenumeration
\nextsubenumeration
\nextsubsubenumeration
The example below illustrates the use of \enumeration. After the shown commands the content of a remark can be typed after \remark.
\defineenumeration
[remark]
[location=top,
text=Remark,
between=\blank,
before=\blank,
after=\blank]
Some examples of remarks are:
Remark 1
After definition the ‘remark’ is available at four levels: \remark, \subremark, \subsubremark
and \subsubsubremark.
Remark 2
This command looks much like the command \definedescription.
The characteristics of numbering are specified with \setupenumerations. Many parameters
are like that of the descriptions because numbering is a special case of descriptions.
\setupenumerations[name][setups]
Enumeration
10
233
230
Descriptions
\setupenumerations[..,...,..][..,..=..,..]
...
..=..
location
text
levels
conversion
way
blockway
sectionnumber
separator
stopper
coupling
couplingway
number
aligntitle
start
name
see p 225: \definedescription
left right top serried inmargin inleft inright hanging
text
number
numbers characters Characters romannumerals Romannumerals
bytext bysection
yes no
yes number no
text
text
name
global local
no name
no yes
number
The characteristics of sub and subsub enumerations can be set too. For example:
\setupenumerations[example][headstyle=bold]
\setupenumerations[subexample][headstyle=slanted]
Just like the description command there is a \start--\stop construction for multi paragraph
typesetting.
\startenumeration ... \stopenumeration
Sometimes the number is obsolete. For example when we number per chapter and we have
only one example in a specific chapter. In that case you can indicate with a [-] that you want
no number to be displayed.
Remark
Because this remark was recalled by \remark[-] there is no number. Just as with other commands, we can also pass a reference label between [ ]. Also, we can setup the enumeration
to stop numbering by setting number to no.
The numbering command can be combined usefully with the feature to move textblocks. An
example is given in section 12.4. In that example we also demonstrate how to couple one
numbered text to another. These couplings only have a meaning in interactive documents
where cross references (hyperlinks) can be useful.
10
Enumeration
234
Descriptions
231
The numbering of text elements can appear in different forms. In that case we can let one
numbered text element inherit its characteristic from another. We illustrate this in an example.
\defineenumeration[first]
\first The numbering \type {first} is unique. We see that one
argument is sufficient. By default label and number are placed at the left
hand side.
\defineenumeration[second][first][location=right]
\second The \type {second} inherits its counters from \type {first},
but is placed at the right hand side. In case of three arguments the first
one is the copy and the second the original.
\doornummeren[third,fourth][location=inright]
\third The numbered elements \type {third} and \type {fourth} are both
unique and are placed in right margin.
\fourth Both are defined in one command but they do have own
counters that are in no way coupled.
\doornummeren[fifth,sixth][first]
\fifth The elements \type {fifth} and \type {sixth} inherit the properties
and counters of \type {first}.
\sixth Note: inheriting of \type{second} is not allowed because \type
{second} is not an original! \par
It may seem very complex but the text below may shed some light on this issue:
first 1
The numbering first is unique. We see that one argument is sufficient. By default label and
number are placed at the left hand side.
The second inherits its counters from first, but is placed at the right hand
side. In case of three arguments the first one is the copy and the second the
original.
second 2
The numbered elements third and fourth are both unique and are placed in right margin.
third 1
Both are defined in one command but they do have own counters that are in no way coupled.
fourth 1
Enumeration
10
235
232
Descriptions
fifth 3
The elements fifth and sixth inherit the properties and counters of first.
sixth 4
Note: inheriting of second is not allowed because second is not an original!
It is possible to couple a numbered text element to another. For example we may couple
questions and answers. In an interactive document we can click on a question which will result
in a jump to the answer. And vice versa. The counters must be synchronised. Be aware of the
fact that the counters need some resetting now and then. For example at the beginning of each
new chapter. This can be automated by setting the parameter way to bychapter.
\definedescription [question] [coupling=answer]
\definedescription [answer]
[coupling=question]
10.4
Indenting
Indented itemizations, like dialogues, can be typeset with the command defined by
\defineindenting[...][..,..=..,..]
...
..=..
name
see p 233: \setupindentations
After this command \name, \subname and \subsubname are available.
\indentation...\par
...
text
The parameters can be set up with the command:
10
Enumeration — Indenting
236
Descriptions
233
\setupindentations[..,...,..][..,..=..,..]
...
style
headstyle
width
text
sample
before
after
distance
separator
name
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
fit dimension
text
text
command
command
dimension
text
It is possible to change the setup of \indentation with the command:
\setupindentations[name][setups]
An example of how you can use the indentation mechanism is given below:
\setupindentations
[sample={rime m},
separator={:},
distance=.5em]
\defineindenting[ra][text=rime a]
\defineindenting[rb][text=rime b]
\defineindenting[rc][text=rime c]
\startpacked
\ra pretty litte girl
\ra pretty litte girl in a blue dress
\rb pretty little girl in a blue dress
\rc playing in the sand
\rb make my day
\rc smile for me
\stoppacked
This results in:
rime
rime
rime
rime
a
a
b
c
:
:
:
:
pretty litte girl
pretty litte girl in a blue dress
pretty little girl in a blue dress
playing in the sand
Indenting
10
237
234
Descriptions
rime b : make my day
rime c : smile for me
A series of indenting commands can be enclosed with the commands:
\startindentation
\stopindentation
10.5
Numbered labels
There is another numbering mechanism that is used for numbering specific text labels that
also enables you to refer to these labels. For example, when you want to refer in your text to a
number of transparencies that you use in presentations the next command can be used:
\definelabel[...][..,..=..,..]
...
text
location
way
blockway
headstyle
headcolor
before
after
name
text
inmargin intext
bytext bysection bychapter
yes no
normal bold slanted boldslanted type cap small... command
name
command
command
Where the parameter location is set at intext and inmargin. After this definition the following commands are available:
\resetname
\incrementname
\nextname
\currentname[reference]
The [reference] after currentname is optional. After
\definelabel[video][text=video,location=inmargin]
video 10.1
This defines \video, that results in a numbered label video in the margin. The command
\currentvideo would have resulted in the number 0. The label can also be recalled with:
\labeling[ref]
10
Indenting — Numbered labels
238
Descriptions
235
In our case, saying \video results in the marginal note concerning a video. The values of
before and after are executed around the label (which only makes sense for in--text labels.
10.6
Itemize
Items in an itemization are automatically preceded by symbols or by enumerated numbers or
characters. The symbols and the enumeration can be set up (see table 10.1). The layout can
also be influenced. Itemization has a maximum of four levels.
setup
result
setup
result
n
1, 2, 3, 4
1
dot (•)
a
a, b, c, d
2
dash (−)
A
A, B, C, D
3
star (?)
KA
A, B, C, D
4
triangle (.)
r
i, ii, iii, iv
5
circle (◦)
R
I, II, III, IV
6
big circle ()
KR
I, II, III, IV
7
bigger circle ()
m
1, 2, 3, 4
8
square (t
u)
g
α, β, γ
G
A, B, Γ
Table 10.1 Item separator identifications in itemizations.
The command to itemize is:
\startitemize[setups]
\item ........
\item ........
\stopitemize
So you can do things like this:
Which of these theses are true?
\startitemize[A]
\item The difference between a village and a city is the existence of
a townhall.
Numbered labels — Itemize
10
239
236
Descriptions
\item The difference between a village and a city is the existence of
a courthouse.
\stopitemize
This will lead to:
Which of these theses are true?
A. The difference between a village and a city is the existence of a townhall.
B. The difference between a village and a city is the existence of a courthouse.
The symbols used under 1 to 8 can be defined with the command \definesymbol (see section ??) and the conversion of the numbering with \defineconversion (see section ??). For
example:
Do the following propositions hold some truth?
\definesymbol[1][$\diamond$]
\startitemize[1]
\item The city of Amsterdam is built on wooden poles.
\item The city of Rome was built in one day.
\stopitemize
results in:
Do the following propositions hold some truth?
The city of Amsterdam is built on wooden poles.
The city of Rome was built in one day.
The keys n, a, etc. are related to the conversions. This means that all conversions are accepted.
Take for example:
α. a g for Greek characters
β. a G for Greek capitals
When the setup and the [ ] are left out then the default symbol is typeset.
The indentation and horizontal whitespace is set up locally or globally with:
10
Itemize
240
Descriptions
237
\setupitemize[.1.][..,.2.,..][..,..=..,..]
.1.
.2.
margin
width
distance
factor
items
before
inbetween
after
beforehead
afterhead
headstyle
marstyle
symstyle
stopper
n
symbol
align
indentnext
number each
standard n*broad n*serried packed unpacked stopper joinedup atmargin inmargin
autointro loose section
no standard dimension
dimension
dimension
number
number
command
command
command
command
command
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
text
number
number
left right normal
yes no
These arguments may appear in different combinations, like:
What proposition is true?
\startitemize[a,packed][stopper=:]
\item 2000 is a leap-year
\item 2001 is a leap-year
\item 2002 is a leap-year
\item 2003 is a leap-year
\stopitemize
this will become:
What proposition is true?
a:
b:
c:
d:
2000
2001
2002
2003
is
is
is
is
a
a
a
a
leap-year
leap-year
leap-year
leap-year
Both argument are optional. The key packed is one of the most commonly used:
Itemize
10
241
238
Descriptions
What proposition is true?
\startitemize[n,packed,inmargin]
\item[ok] 2000 is a leap-year
\item 2001 is a leap-year
\item 2002 is a leap-year
\item 2003 is a leap-year
\stopitemize
will result in:
What proposition is true?
1.
2.
3.
4.
2000
2001
2002
2003
is
is
is
is
a
a
a
a
leap-year
leap-year
leap-year
leap-year
It happens very often that an itemization is preceded by a sentence like “ . . . can be seen below:”.
In that case we add the key intro and the introduction sentence will be ‘connected’ to the
itemization. After this setup a pagebreak between sentence and itemization is discouraged.
\startitemize[n,packed,inmargin,intro]
The setup of the itemization commands are presented in table 10.2.
In the last example we saw a reference point behind the command \item for future cross
referencing. In this case we could make a cross reference to answer 1 with the command
\in[ok].
The enumeration may be continued by adding the key continue, for example:
\startitemize[continue]
\item 2005 is a leap-year
\stopitemize
This would result in a rather useless addition:
5.
2005 is a leap-year
Another example illustrates that continue even works at other levels of itemizations:
10
Itemize
242
Descriptions
setup
result
standard
default setup
packed
no white space between items
joinedup
no white space before and after itemization
paragraph
no white space before an itemization
n*serried
little horizontal white space after symbol
n*broad
extra horizontal white space after symbol
inmargin
item separator in margin
atmargin
item separator at the margin
stopper
punctuation after item separator
intro
no pagebreak
columns
two columns
239
Table 10.2 Setup of \setupitemize.
• supported image formats in pdfTEX
a. png
b. eps
c. pdf
• non supported image formats in pdfTEX
d. jpg
e. gif
f. tif
This was typed as (in this document we have set headstyle=bold):
\startitemize[1,packed]
\head supported image formats in \PDFTEX \par
\startitemize[a]
\item png \item eps \item pdf
\stopitemize
\head non supported image formats in \PDFTEX \par
\startitemize[continue]
\item jpg \item gif \item tif
\stopitemize
Itemize
10
243
240
Descriptions
\stopitemize
When we use the key columns the items are typeset in two columns. The number of columns
can be set by the keys one, two (default), three or four.
\startitemize[n,columns,four]
\item png \item tif \item jpg \item eps \item pdf
\item gif \item pic \item bmp \item bsd \item jpe
\stopitemize
We can see that we can type the items at our own preference.
1. png
2. tif
3. jpg
4. eps
5. pdf
6. gif
7. pic
8. bmp
9. bsd
10.jpe
In such a long enumerated list the horizontal space between itemseparator and text may be
too small. In that case we use the key broad, here 2*broad:
I.
II.
III.
png
tif
jpg
IV.
V.
VI.
eps
pdf
gif
VII. pic
VIII. bmp
IX. bsd
X.
jpe
The counterpart of broad is serried. We can also add a factor. Here we used 2*serried.
•What format is this?
We can abuse the key broad for very simple tables. It takes some guessing to reach the right
spacing.
This results in a rather strange example:
\startitemize[4*broad,packed]
\sym {yes} this is a nice format
\sym {no} this is very ugly
\stopitemize
yes
no
this is a nice format
this is very ugly
The parameter stopper expects a character of your own choice. By default it is set at a period.
When no level is specified and the [ ] are empty the actual level is activated. In section ?? we
will discuss this in more detail. Stoppers only apply to ordered (numbered) list.
10
Itemize
244
Descriptions
241
There are itemizations where a one line head is followed by a text block. In that case
you use \head instead of \item. You can specify the layout of \head with the command
\setupitemize. For example:
\setupitemize[each][headstyle=bold]
\startitemize[n]
\head A title head in an itemization
After the command \type{\head} an empty line is mandatory. If you
leave that out you will get a very long header.
\stopitemize
This becomes:
1. A title head in an itemization
After the command \head an empty line is mandatory. If you leave that out you will get a
very long header.
If we would have used \item the head would have been typeset in a normal font. Furthermore
a pagebreak could have been introduced between head and textblock. This is not permitted
when you use \head.
\head[ref,..]
When an itemization consists of only one item we can leave out the commands \startitemize
and \stopitemize and the level 1 symbol is used.
\item The itemization commands force the user into a consistent layout
of the itemizations. \par
Instead of the \par you could have used an empty line. In each case, we get the following
output:
• The itemization commands force the user into a consistent layout of the itemizations.
Only the text directly following the command and ended by an empty line or \par is indented.
When you want to re-use the last number instead of increasing the next item you can use \sub.
This feature is used in discussion documents where earlier versions should not be altered too
much for reference purposes.
Itemize
10
245
242
Descriptions
1. This itemization is preceded by \startitemize[n,packed].
+1. This item is preceded by \sub, the other items by \item.
2. The itemization is ended by \stopitemize.
The most important commands are:
\startitemize[..,...,..][..,..=..,..] ... \stopitemize
...
..=..
a A KA n N m r R KR number continue standard n*broad n*serried packed stopper joinedup
atmargin inmargin intro columns
see p 237: \setupitemize
\item[ref,..]
\sub[ref,..]
In addition to \item there is \sym. This command enables us to type an indented text with
our own symbol.
\sym{...}
Another alternative to \item is \mar. The specified argument is set in the margin (by default
a typeletter) and enables us to comment on an item.
\mar[ref,..]{...}
Some at first sight rather strange alternatives are:
\its[ref,..]
\ran{...}
These acronyms are placeholders for items and range. We illustrate most of these commands
with an example that stems from a ntg questionnaire:
10
Itemize
246
Descriptions
no
◦ ◦
◦ ◦
◦ ◦
◦ ◦
◦ ◦
◦ ◦
◦
◦
◦
◦
◦
◦
yes
◦ ◦
◦ ◦
◦ ◦
◦ ◦
◦ ◦
◦ ◦
I
I
I
I
I
I
243
can not do without TEX.
will use TEX forever.
expect an alternative to TEX in the next few years.
use TEX and other packages.
hardly use TEX.
am looking for another system.
The source is typed below. Look at the setup, it is local.
\startitemize[5,packed][width=8em,distance=2em,items=5]
\ran {no\hss yes}
\its
\its
\its
\its
\its
\its
I
I
I
I
I
I
can not do without \TeX.
will use \TeX\ forever.
expect an alternative to \TeX\ in the next few years.
use \TeX\ and other packages.
hardly use \TeX.
am looking for another system.
\stopitemize
For the interactive version there is:
ð ñ
\but[ref]
This command resembles \item but produces an interactive symbol that executes the reference
sequence specified.
The example below shows a combination of the mentioned commands. We also see the alternative \nop.
• he got a head ache
++
1. of all the items
he had to learn at school
2. because the marginal explanation
+2. of the substantial content
# turned out to be mostly symbolic
This list was typed like this:
Itemize
10
247
244
Descriptions
\startitemize
\head he got a head ache
\startitemize[n,packed]
\item
of all the items
\nop
he had to learn at school
\mar{++} because the marginal explanation
\sub
of the substantial content
\sym{\#} turned out to be mostly symbolic
\stopitemize
\stopitemize
With the no--operation command:
\nop
During the processing of itemizations the number of items is counted. This is the case with all
versions. The next pass this information is used to determine the optimal location to start a
new page. So do not despair when at the first parse your itemizations do not look the way you
expected. When using TEXexec this is all taken care of.
We have two last pieces of advises. When items consist of two or more paragraphs always
use \head instead of \item, especially when the first paragraph consists only one line. The
command \head takes care of adequate pagebreaking between two paragraphs. Also, always
use the key [intro] when a one line sentence preceeds the itemization. This can be automated
by:
\setupitemize[each][autointro]
10.7
Items
A rarely used variant of producing lists is the command \items. It is used to produce simple,
one level, vertical or horizontal lists. The command in its simplest form looks like this:
\items{alternative 1,alternative 2,...,alternative N}
Instead of an alternative you can also type -. In that case space is reserved but the item is not
set. The layout of such a list is set with the command:
10
Itemize — Items
248
Descriptions
245
\setupitems[..,..=..,..]
location
symbol
width
n
before
inbetween
align
after
left right inmargin top bottom
1 2 ... n a ... text none
dimension
number unknown
command
command
left right middle margin
command
The number (n) as well as the width are calculated automatically. When you want to do this
yourself you can use the previous command or you pass the options directly. We show some
examples.
\items[location=left]{png,eps,pdf}
◦ png
◦ eps
◦ pdf
\items[location=bottom]{png,eps,pdf}
png
eps
pdf
◦
◦
◦
\items[location=right,width=2cm]{png,eps,pdf}
png
eps
pdf
◦
◦
◦
\items[location=top,width=6cm,align=left]{png,eps,pdf}
◦
◦
◦
png
eps
pdf
\items[location=inmargin]{png,eps,pdf}
◦
◦
◦
png
eps
pdf
\items[location=left,n=2,symbol=5]{jpg,tif}
Items
10
249
246
Descriptions
◦ jpg
◦ tif
\items[symbol=3,n=6,width=\hsize,location=top]{png,eps,pdf,jpg,tif}
?
?
png
?
eps
?
pdf
?
jpg
?
tif
The setup just after \items have the same effect as those of \setupitems:
\items[..,..=..,..]{..,...,..}
..=..
10.8
see p 245: \setupitems
Citations
The use of quotes depends on the language of a country: ‘Nederlands’, ‘English’, ,Deutsch‘,
<Français>. The consistent use of single and double quotes is supported by a number of commands. A citation in the running text is typeset by:
\startquotation[..,...,..] ... \stopquotation
...
n*left n*middle n*right
This command can be compared with \startnarrower and has the same setup parameters.
The quotes are placed around the text and they fall outside the textblock:
“In commercial advertising ‘experts’ are quoted. Not too long ago I saw a commercial
where a washing powder was recommended by the Dutch Society of Housewives. The
remarkable thing was that there was a spokesman and not a spokeswoman. He was
introduced as the “director”. It can’t be true that the director of the Society of Housewives
is a man. Can it?”
In this example we see two other commands:
\startquotation
In commercial advertising \quote {experts} are quoted. Not too
long ago I saw a commercial where a washing powder was recommended
by the Dutch Society of Housewives. The remarkable thing was that
there was a spokesman and not a spokeswoman. He was introduced as
10
Items — Citations
250
Descriptions
247
the \quotation {director}. It can’t be true that the director of the
Society of Housewives is a man. Can it?
\stopquotation
The command \quotation produces double quotes and \quote single quotes.
\quote{...}
...
text
\quotation{...}
...
text
These commands adapt to the language. In Dutch, English, German and French texts other
quotes are activated. The body font is set with:
\setupquote[..,..=..,..]
before
after
style
command
command
normal bold slanted boldslanted type cap small... command
The location of a period, inside or outside a citation is somewhat arbitrary. The opinions on
this issue differ considerately.
He said: “That is a bike” to which she replied: “Take a hike”.
The quotes are language dependent. Therefore it is of some importance that language switching
is done correctly.
\quotation {He answered: \fr \quotation {Je ne parle pas fran\c cais}.}
\quotation {He answered: \quotation {\fr Je ne parle pas fran\c cais}.}
\quotation {\fr Il respondait: \quotation{Je ne parle pas fran\c cais}.}
\fr \quotation {Il respondait: \quotation{Je ne parle pas fran\c cais}.}
Watch the subtle difference.
“He answered: Je ne parle pas français.”
“He answered: “Je ne parle pas français”.”
“Il respondait: Je ne parle pas français.”
Il respondait: Je ne parle pas français.
Citations
10
251
248
Descriptions
When we want different quotes, we can change them. This is a language related setting.
\setuplanguage
[en]
[leftquote=\upperleftsinglesixquote,
leftquotation=\upperleftdoublesixquote]
Fo rconsistency, such a setting can best be put into the local system file cont-sys.tex, together
with other local settings. The following quotes are available:
\lowerleftsingleninequote
\lowerleftdoubleninequote
\upperleftsingleninequote
\upperleftdoubleninequote
\upperleftsinglesixquote
\upperleftdoublesixquote
10
,
„
’
”
‘
“
\lowerrightsingleninequote ,
\lowerrightdoubleninequote „
\upperrightsingleninequote ’
\upperrightdoubleninequote ”
\upperrightsinglesixquote
‘
\upperrightdoublesixquote
“
Citations
252
253
250
\blackrule
271
\blackrules
271
\defineframedtext
\fillinline
253
\fillinrules
253
\framed
258
\grid
272
\hairline
251
\hl
251
\inframed
258
266
\marginrule
270
\overstrike
257
\overstrikes
257
\setupblackrules
271
\setupfillinline
253
\setupfillinrules
253
\setupframedin
258
\setupframedtexts
266
\setupmarginrule
270
\setuptextruleen
255
\setupthinrules
\startframedtext
\startmarginrule
\textrule
255
\thinrule
251
\thinrules
251
\underbar
257
\underbars
257
\vl
251
251
266
270
254
Lines and frames
251
Lines and frames
11.1
Introduction
TEX has an enormous capacity in handling text, but is very weak at handling graphical information. Lines can be handled adequately as long as you use vertical or horizontal lines. However,
you can do graphical work with TEX by combining TEX and METAPOST.
In this chapter we introduce a number of commands that relate to drawing straight lines in
your text. We will see a very sophisticated command \framed that can be used in many ways.
The parameters of this command are also available in other commands.
11.2
11
Single lines
The simplest way to draw a line in ConTEXt is:
\hairline
For example:
\hairline
In what fairy tale is the wolf cut open and filled with stones? Was it in
{Little Red Riding-hood} or in \quote {The wolf and the seven goats}.
\hairline
This will become:
In what fairy tale is the wolf cut open and filled with stones? Was it in Little Red Riding-hood
or in ‘The wolf and the seven goats’.
It does not look good at all. This is caused by the fact that a drawn line gets its own vertical
whitespace. In section 11.4 we will show how to alter this.
The effects of the command \hairline is best illustrated when we visualize \strut’s. We did
so by saying \showstruts first.
Introduction — Single lines
11
255
252
Lines and frames
A strut is a character with a maximum height and depth, but no width. The text in this example
is surrounded by two strutted lines.
It is also possible to draw a line over the width of the actual paragraph:
\thinrule
Or more than one lines by:
\thinrules[..=..]
..=..
see p 253: \setupthinrules
For example:
\startitemize
\item question 1 \par \thinrules[n=2]
\item question 2 \par \thinrules[n=2]
\stopitemize
If you leave out a \par (or empty line), the thin rules come after the text. Compare
• question 1
• question 2
with
• question 1
• question 2
11
Single lines
256
Lines and frames
253
The last example was keyed in as:
\startitemize
\item question 1 \thinrules[n=2]
\item question 2 \thinrules[n=2]
\stopitemize
The parameters are set with:
\setupthinrules[..=..]
interlinespace
n
before
after
small medium big
number
command
command
You can draw thin vertical or horizontal lines with the commands:
\vl[...]
...
number
\hl[...]
...
number
The argument is optional. To \vl ( ) you may pass a factor that relates to the actual height of
a line and to \hl ( ) a width that relates to the width of an em. So \vl[2] produces a rule
with a height of two lines.
11.3
Fill in rules
On behalf of questionnaires there is the command:
\fillinline[..,..=..,..]...\par
..=..
see p 254: \setupfillinlines
With the accompanying setup command:
Single lines — Fill in rules
11
257
254
Lines and frames
\setupfillinlines[..,..=..,..]
width
margin
distance
before
after
dimension
dimension
dimension
command
command
The example:
\fillinline[n=2,width=2cm]{name} \par
\fillinline[n=2,width=2cm]{address} \par
Leads to the next list:
name
address
An alternative is wanting the fill--in rule at the end of a paragraph. Then you use the commands:
\fillinrules[..,..=..,..]{.1.}{.2.}
..=..
see p 254: \setupfillinrules
\setupfillinrules[..,..=..,..]
width
distance
before
after
style
n
interlinespace
separator
fit broad dimension
dimension
command
command
normal bold slanted boldslanted type cap small... command
number
small medium big
text
The next example will show the implications:
\fillinline[width=3cm] Consumers in this shopping mall are frequently
confronted with questionnaires. Our hypothesis is that consumers rather
shop somewhere else than answer these kind of questionnaires. Do you
agree with this?
In this example we could of course have offered some alternatives for answering this question.
By setting the width to broad, we get
11
Fill in rules
258
Lines and frames
255
Consumers in this shopping mall are frequently confronted with questionnaires. Our hypothesis is that consumers rather shop somewhere else than
answer these kind of questionnaires. Do you agree with this?
The next set of examples demonstrate how we can influence the layout.
\fillinrules[n=2,width=fit]{first}
\fillinrules[n=2,width=broad]{first}
\fillinrules[n=2,width=3cm]{first}
\fillinrules[n=2,width=fit,distance=.5em,separator=:]{first}
\fillinrules[n=2,width=broad,distance=.5em]{first}{last}
first
first
first
first:
first
last
11.4
Text lines
A text line is drawn just before and/or after a paragraph. The upper line may also contain text.
The command is:
\textrule[.1.]{.2.}
.1.
.2.
top bottom
text
An example:
Fill in rules — Text lines
11
259
256
Lines and frames
\textrule[top]{Instruments}
Some artists mention the instruments that they use during the production
of their \kap{CD}. In Peter Gabriel’s \quote {Digging in the dust} he used
the {\em diembe}, {\em tama} and {\em surdu}. The information on another
song mentions the {\em doudouk}. Other \quote {unknown} instruments are
used on his \kap{cd} \quote {Passion}.
\textrule
This will result in:
Instruments
Some artists mention the instruments that they use during the production of their CD. In Peter
Gabriel’s ‘Digging in the dust’ he used the diembe, tama and surdu. The information on another
song mentions the doudouk. Other ‘unknown’ instruments are used on his CD ‘Passion’.
The behaviour of textlines is set up with the command below. With the parameter width you
set the length of the line in front of the text.
\setuptextrules[..,..=..,..]
left inmargin
command
command
command
dimension
dimension
5pt ... 12pt small big
name
normal bold slanted boldslanted type cap small... command
name
location
before
after
inbetween
width
distance
bodyfont
color
style
rulecolor
These is also a \start--\stop alternative. This one also honors the bodyfont parameter.
\starttextrule[.1.]{.2.} ... \stoptextrule
.1.
.2.
11
top bottom
text
Text lines
260
Lines and frames
11.5
257
Underline
Underlining text is not such an ideal method to banner your text. Nevertheless we introduced
this feature in ConTEXt. Here is how it works. We use:
\underbar{...}
...
text
A disadvantage of this command is that words can no longer be hyphenated. This is a nasty side-effect. But we do support nested underlining.
The spaces in the last paragraph were also underlined. If we do not want that in this paragraph
we use:
\underbars{..
...
... ..}
text
From the input we can see that the hyphen results from the compound word.
\underbar {A disadvantage of this command is that words can \underbar
{no} longer be hyphenated. This is a nasty side||effect. But we do
support \underbar {nested} underlining.}
\underbars {The spaces in the last paragraph were also underlined. If
we do not want that in this paragraph we use:}
The counterpart of these commands are:
\overbar{...}
...
text
\overbars{..
...
... ..}
text
You may wonder for what reasons we introduced these commands. The reasons are mainly
financial:
Text lines — Underline
11
261
258
Lines and frames
product 1
product 2
total
1.420
3.182
4.602
This financial overview is made with:
\starttabulate[|l|r|]
\NC product 1 \NC
1.420 \NC \NR
\NC product 2 \NC
3.182 \NC \NR
\NC total
\NC \overbar{4.602} \NC \NR
\stoptabulate
The number of parameters in these commands is limited:
\setupunderbar[..,..=..,..]
alternative
rulethickness
a b c
dimension
The alternatives are: alternative a, alternative b, alternative
. . . . . . . . . . .c. while another line thickness results in: 1pt line, 2pt line.
A part of the text can be striked with the command:
\overstrike{...}
...
text
This command supports no nesting. Single words are striked with:
\overstrikes{..
...
11.6
... ..}
text
Framing
Texts can be framed with the command: \framed. In its most simple form the command looks
like this:
\framed{A button in an interactive document is a framed text
with specific characteristics.}
11
Underline — Framing
262
Lines and frames
259
The becomes:
A button in an interactive document is a framed text with specific characteristics.
The complete definition of this command is:
\framed[..,..=..,..]{...}
..=..
...
see p 264: \setupframed
text
You may notice that all arguments are optional.
\framed
[height=broad]
{A framed text always needs special attention as far as the spacing
is concerned.}
Here is the output of the previous source code:
A framed text always needs special attention as far as the spacing is concerned.
For the height, the values fit and broad have the same results. So:
\hbox
{\framed[height=broad]{Is this the spacing we want?}
\hskip1em
\framed[height=fit] {Or isn’t it?}}
will give us:
Is this the spacing we want?
Or isn’t it?
To obtain a comparable layout between framed and non--framed framing can be set on and off.
yes
no
yes
no
yes
no
The rulethickness is set with the command \setuprulethickness (see section ??).
A framed text is typeset ‘on top of’ the baseline. When you want real alignment you can use
the command \inframed.
Framing
11
263
260
Lines and frames
to \framed{frame} or to be \inframed{framed}
or:
to
frame
or to be framed
It is possible to draw parts of the frame. In that case you have to specify the separate sides of
the frame with leftframe=on and the alike.
We will now show some alternatives of the command \framed. Please notice the influence of
offset. When no value is given, the offset is determined by the height and depth of the \strut,
that virtual character with a maximum height and depth with no width. When exact positioning
is needed within a frame you set offset at none (see also tables 11.1, 11.2 and 11.3). Setting
the offset to none or overlay, will also disable the strut.
width=fit
width=broad
width=8cm,height=1.5em
offset=5pt
offset=0pt
offset=none
offset=overlay
width=8cm,height=1.5em,offset=0pt
width=8cm,height=1.5em,offset=none
The commands \lbox (ragged left), \cbox (ragged center) and \rbox (ragged right) can be
combined with \framed:
left
of the
middle
\lbox
just
in the
middle
\cbox
right
of the
middle
\rbox
The second text is typed as follows:
11
Framing
264
Lines and frames
261
\framed
[width=.2\hsize,height=3cm]
{\cbox to 2.5cm{\hsize2.5cm just\\in the\\middle}}
There is a more convenient way to align a text, since we have the parameters align and top
and bottom. In the next one shows the influence of top and bottom (the second case is the
default).
\setupframed[width=.2\hsize,height=3cm,align=middle]
\startcombination[4]
{\framed[bottom=\vss,top=\vss]{just\\in the\\middle}}
{\type{top=\vss}\crlf\type{bottom=\vss}}
{\framed[bottom=\vss,top=]
{just\\in the\\middle}}
{\type{top=}
\crlf\type{bottom=\vss}}
{\framed[bottom=,top=\vss]
{just\\in the\\middle}}
{\type{top=\vss}\crlf\type{top=}}
{\framed[bottom=,top=]
{just\\in the\\middle}}
{\type{top=}
\crlf\type{bottom=}}
\stopcombination
just
in the
middle
top=\vss
bottom=\vss
just
in the
middle
top=
bottom=\vss
just
in the
middle
just
in the
middle
top=\vss
top=
top=
bottom=
In the background of a framed text you can place a screen or a coloured background by setting
background at color or screen. Don’t forget to activate the the colour mechanism by saying
(\setupcolors[state=start]).
Framing
11
265
262
Lines and frames
In the
dark
background=screen
background=screen
backgroundscreen=0.7
all cats
are grey.
background=color
background=color
backgroundcolor=red
There is also an option to enlarge a frame or the background by setting the frameoffset and/
or backgroundoffset. These do not influence the dimensions. Next to screens and colours
you can also use your own kind of backgrounds. This mechanism is described in section 6.7.
The command \framed itself can be an argument of \framed. We will obtain a framed frame.
\framed
[width=3cm,height=3cm]
{\framed[width=2.5cm,height=2.5cm]{hello world}}
In that case the second frame is somewhat larger than expected. This is caused by the fact
that the first framed has a strut. This strut is placed automatically to enable typesetting one
framed text next to another. We suppress \strut with:
\framed
[width=3cm,height=3cm,strut=no]
{\framed[width=2.5cm,height=2.5cm]{hello world}}
When both examples are placed close to one another we see the difference:
hello world
hello world
strut=yes
strut=no
A \hairline is normally draw over the complete width of a text (\hsize). Within a frame the
line is drawn from the left to the right of framed box.
11
Framing
266
Lines and frames
263
Consequently the code:
\framed[width=8cm,align=middle]
{when you read between the lines \hairline
you may see what effort it takes \hairline
to write a macropackage}
produces the following output:
when you read between the lines
you may see what effort it takes
to write a macropackage
When no width is specified only the vertical lines are displayed.
their opinions differ considerately
Which was obtained with:
\framed
{their opinions \hairline differ \hairline considerately}
The default setup of \framed can be changed with the command:
Framing
11
267
264
Lines and frames
\setupframed[..,..=..,..]
height
width
offset
location
option
strut
align
bottom
top
frame
topframe
bottomframe
leftframe
rightframe
frameoffset
framedepth
framecorner
frameradius
framecolor
background
backgroundscreen
backgroundcolor
backgroundoffset
backgrounddepth
backgroundcorner
backgroundradius
depth
corner
radius
empty
...
fit broad dimension
fit broad dimension
none overlay dimension
low depth
none empty
yes no
no left right middle normal
command
command
on off overlay
on off
on off
on off
on off
dimension
dimension
round rectangular
dimension
name
screen color none foreground name
number
name
dimension
dimension
round rectangular
dimension
dimension
round rectangular
dimension
yes no
text
The command \framed is used within many other commands. The combined use of offset
and strut may be very confusing. It realy pays off to spend some time playing with these
macros and parameters, since you will meet \framed in many other commands. Also, the
parameters width and height are very important for the framing texts. For that reason we
summarize the consequences of their settings in table 11.1, 11.2 and 11.3.
11
Framing
268
Lines and frames
265
offset
.25ex
strut
0pt
none
overlay
yes
no
Table 11.1 The influence of strut and offset in \framed (1).
offset
strut
.25ex
0pt
none
overlay
yes
TEX
TEX
TEX
TEX
no
TEX
TEX
TEX
TEX
Table 11.2 The influence of strut and offset in \framed (2).
width
height
fit
broad
fit
broad (\hsize=4cm)
xxxx
xxxx
xxxx
xxxx
Table 11.3 The influence of height and width in \framed.
happy
birthday
to you
At first sight it is not so obvious that \framed can determine the width of a paragraph by itself. When we set the parameter align the paragraph is first typeset and
then framed. This feature valuable when typesetting titlepages. In the example left
of this text, linebreaks are forced by \\, but this is not mandatory. This example
was coded as follows:
\placefigure
[left]
{none}
{\framed[align=middle]{happy\\birthday\\to you}}
Framing
11
269
266
Lines and frames
The parameter offset needs some special attention. By default it is set at .25ex, based on
the cureently selected font. The next examples will illustrate this:
\hbox{\bf \framed{test} \sl \framed{test} \tfa \framed{test}}
\hbox{\framed{\bf test} \framed{\sl test} \framed{\tfa test}}
The value of 1ex outside \framed determines the offset. This suits our purpose well.
test test test
test test test
The differences are very subtle. The distance between the framed boxes depends on the actual
font size, the dimensions of the frame, the offset, and the strut.
TEX can only draw straight lines. Curves are drawn with small line pieces and effects the
size of dvi--files considerately and will cause long processing times. Curves in ConTEXt are
implemented by means of PostScript. There are two parameters that affect curves: corner
and radius. When corner is set at round, round curves are drawn.
Don’t be to edgy.
It is also possible to draw circles by setting radius at half the width or height. But do not use
this command for drawing, it is meant for framing text. Use METAPOST instead.
Technically speaking the background, the frame and the text are separate components of a
framed text. First the background is set, then the text and at the last instance the frame. The
curved corner of a frame belongs to the frame and is not influenced by the text. As long as the
radius is smaller than the offset no problems will occur.
11.7
Framed texts
When you feel the urge to put a frame around or a backgroud behind a paragraph there is the
command:
\startframedtext[...][..,..=..,..] ... \stopframedtext
...
..=..
left right middle
see p 267: \setupframedtexts
An application may look like this:
11
Framing — Framed texts
270
Lines and frames
267
\startframedtext[left]
From an experiment that was conducted by C. van Noort (1993) it was
shown that the use of intermezzos as an attention enhancer is not very
effective.
\stopframedtext
From an experiment that was conducted by C. van
Noort (1993) it was shown that the use of intermezzos
as an attention enhancer is not very effective.
This can be set up with:
\setupframedtexts[..,..=..,..]
bodyfont
style
left
right
before
after
inner
margin
..=..
5pt ... 12pt small big
normal bold slanted boldslanted type small... command
command
command
command
command
command
standard yes no
see p 264: \setupframed
Framed texts can be combined with the place block mechanism, as can be seen in intermezzo 11.1.
\placeintermezzo
[here][int:demo 1]
{An example of an intermezzo.}
\startframedtext
For millions of years mankind lived just like animals. Then
something happened, which unleashed the power of our imagination.
We learned to talk.
\blank
\rightaligned{--- The Division Bell / Pink Floyd}
\stopframedtext
In this case the location of the framed text (between [ ]) is left out.
Framed texts
11
271
268
Lines and frames
For millions of years mankind lived just like animals.
Then something happened, which unleashed the
power of our imagination. We learned to talk.
— The Division Bell / Pink Floyd
Intermezzo 11.1 An example of an intermezzo.
You can also draw a partial frame. The following setup produces intermezzo 11.2.
\setupframedtexts[frame=off,topframe=on,leftframe=on]
Why are the world leaders not moved by songs
like Wozu sind Kriege da? by Udo Lindenberg. I
was, and now I wonder why wars go on and on.
Intermezzo 11.2 An example of an intermezzo.
You can also use a background. When the background is active it looks better to omit the
frame.
An intermezzo like this will draw more attention,
but the readability is far from optimal. However,
you read can it. This inermezzo was set up with :
\setupframedtexts[frame=off,background=screen]
Intermezzo 11.3 An example of an intermezzo with background.
Intermezzo 11.4 demonstrate how to use some color:
\setupframedtexts
[background=screen,
frame=off,
rightframe=on,
framecolor=darkgreen,
rulethickness=3pt]
11
Framed texts
272
Lines and frames
269
\placeintermezzo
[here][int:color]
{An example of an intermezzo with a trick.}
\startframedtext
The trick is really very simple. But the fun is gone when Tom, Dick
and Harry would use it too.
\stopframedtext
The trick is really very simple. But the fun is
gone when Tom, Dick and Harry would use it too.
Intermezzo 11.4 An example of an intermezzo with a trick.
So, in order to get a partial frame, we have to set the whole frame to off. This is an example
of a situation where we can get a bit more readable source when we say:
\startbuffer
\startframedtext ... \stopframedtext
\stopbuffer
\placeintermezzo
[here][int:color]
{An example of an intermezzo with a trick.}{\getbuffer}
You do not want to set up a framed text every time you need it, so there is the following
command:
\defineframedtext[...][..,..=..,..]
...
..=..
name
see p 267: \setupframedtexts
The definition:
\defineframedtext
[musicfragment]
[frame=off, rightframe=on, leftframe=on]
\placeintermezzo
[here][]
Framed texts
11
273
270
Lines and frames
{An example of a predefined framed text.}
\startmusicfragment
Imagine that there are fragments of music in your interactive document.
You will not be able to read undisturbed.
\stopmusicfragment
results in:
Imagine that there are fragments of music in your interactive document. You will not be able to read undisturbed.
Intermezzo 11.5 An example of a predefined framed text.
11.8
Margin rules
To add some sort of flags to paragraphs you can draw vertical lines in the margin. This can be
used to indicate that the paragraph was altered since the last version. The commands are:
\startmarginrule[...] ... \stopmarginrule
...
number
\marginrule[.1.]{.2.}
.1.
number
The first command is used around paragraphs, the second within a paragraph.
By specifying a level you can suppress a margin rule. This is done by setting the ‘global’ level
higher than the ‘local’ level.
\setupmarginrules[..=..]
level
thickness
number
dimension
In the example below we show an application of the use of margin rules.
11
Framed texts — Margin rules
274
Lines and frames
271
\startmarginrule
The sound of a duck is a good demonstration of how different people
listen to a sound. Everywhere in Europe the sound is equal. But in
every country it is described differently: kwaak||kwaak (Netherlands),
couin||couin (French), gick||gack (German), rap||rap (Danish) and
mech||mech (Spanish). If you speak these words aloud you will notice
that \marginrule[4]{in spite of the} consonants the sound is really very
well described. And what about a cow, does it say boe, mboe or mmmmmm?
\stopmarginrule
Or: 22
The sound of a duck is a good demonstration of how different people listen to a sound. Everywhere in Europe the sound is equal. But in every country it is described differently: kwaak-kwaak (Netherlands), couin--couin (French), gick--gack (German), rap--rap (Danish) and mech-mech (Spanish). If you speak these words aloud you will notice that in spite of the consonants the sound is really very well described. And what about a cow, does it say boe, mboe or
mmmmmm?
If we would have set \setupmarginrules[level=2] we would have obtained a margin rule
in the middle of the paragraph. In this example we also see that the thickness of the line is
adapted to the level. You can undo this feature with \setupmarginrules[thickness=1].
11.9
Black rules
Little black boxes —we call them black rules— (
) can be drawn by \blackrule:
\blackrule[..,..=..,..]
..=..
see p 272: \setupblackrules
When the setup is left out, the default setup is used.
22
G.C. Molewijk, Spellingsverandering van zin naar onzin (1992).
Margin rules — Black rules
11
275
272
Lines and frames
\setupblackrules[..,..=..,..]
width
height
depth
alternative
distance
n
dimension max
dimension max
dimension max
a b
dimension
number
The height, depth and width of a black rule are in accordance with the usual height, depth
and width of TEX. When we use the key max instead of a real value the dimensions of TEX’s
\strutbox are used. When we set all three dimensions to max we get: .
Black rules may have different purposes. You can use them as identifiers of sections
or subsections.
This paragraph is tagged by a black rule with default dimensions:
\inleft{\blackrule}.
A series of black rules can be typeset by \blackrules:
\blackrules[..,..=..,..]
..=..
see p 272: \setupblackrules
There are two versions. Version a sets n black rules next to each other with an equal specified
width. Version b divides the specified width over the number of rules. This paragraph is tagged
with \inleft{\blackrules}. The setup after \blackrule and \blackrules are optional.
11.10
Grids
We can make squared paper (a sort of grid) with the command:
11
Black rules — Grids
276
Lines and frames
273
\grid[..,..=..,..]
x
y
nx
ny
dx
dy
xstep
ystep
offset
factor
scale
unit
location
number
number
number
number
number
number
number
number
yes no
number
number
cm pt em mm ex sp in
left middle
The default setup produces:
It is used in the background when defining interactive areas in a figure. And for the sake of
completeness it is described in this chapter.
Grids
11
277
\beginblock
287
\completelistoffloats
275
\defineblocks
287
\definefloat
275
\getbuffer
296
\hideblocks
287
\keepblocks
287
\placefloat
275
\placelistoffloats
275
\placeontopofeachother
284
\placesidebyside
284
11
\processblocks
287
\reservefloat
275
\reset
287
\selectblocks
287
\setupblock
287
\setupbuffer
296
\setupcaptions
275
\setupcombinations
284
\setupfloats
275
\setupfloats
275
\setupmarginblocks
294
\startbuffer
296
\startcombination
284
\startfloattext
275
\starthiding
295
\startmarginblock
294
\startopposite
294
\startpostponing
295
\typebuffer
296
\useblocks
287
Grids
278
Blocks
275
References
Blocks
12.1
> floats
> stp:380
> stp:definefloat
Registers
Introduction
A block in ConTEXt is defined as typographical unit that needs specific handling. We distinguish the following block types:
• floats
Examples of floats are figures, tables, graphics, intermezzos etc. The locations of these
blocks are determined by TEX and depends on the available space on a page.
• textblocks
Examples of textblocks are questions and answers in a studybook, summaries, definitions
or derivatives of formulas. The location of these kind of blocks in the final document cannot
be determined beforehand. And the information may be used repeatedly in several settings.
• opposite blocks
Opposite (or spread) blocks are typeset on the left--hand page when a single sided output
is generated. The layout of the right--hand side page is influenced by the blocks on the left.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
i
i
i
i
i
i
i
i
i
i
i
i
m
m
m
m
m
m
m
m
m
t
figures+placing
tables+placing
figures+numbering
tables+numbering
figures+listing
tables+listing
placing+figures
placing+tables
numbering+figures
numbering+tables
listing+figures
listing+tables
\tex {definefloat}
\tex {place«float»}
\tex {placelistof<..
\tex {completelist..
\tex {reserve<<flo..
\tex {setup«floats»}
\tex {start<<float..
\tex {setupfloats}
\tex {setupcaptions}
\tex {definefloat}
12
• margin blocks
Margin blocks are more extensive than single margin words. Text and figures can be placed
in the margin with this feature.
There are a number of commands that support the use of these block types. These are discussed in this chapter. Furthermore we will discuss other forms of text manipulation. Formulas
can also be seen as blocks. Since formulas are covered in a separate chapter we don’t go into
details here.
This chapter is typeset with the option \version [temporary]. This does not refer to the
content but to the typesetting. With this option, design information is placed in the margin.
12.2
Floats
Floats are composed of very specific commands. For example a table in ConTEXt is typeset
using a shell around TABLE. Drawings and graphics are made with external packages, as TEX is
only capable of reserving space for graphics.
Introduction — Floats
Version:
January 27, 2000
Project:
manual
Produkt:
cont-en
Onderdeel:
co-en-13
12
279
279
276
Blocks
Floatblocks
Most floats are numbered and may have a caption. A float is defined with the command:
> 83 saved
\definefloat[.1.][.2.]
.1.
.2.
References
>
>
<
>
singular name
plural name
In ConTEXt, figures, graphics, tables, and intermezzos are predefined with:
\definefloat
\definefloat
\definefloat
\definefloat
[figure]
[table]
[graphic]
[intermezzo]
stp:378
stp:place@@float@@
tab:floats
tab:floats
Registers
[figures]
[tables]
[graphics]
[intermezzos]
> t \tex {place«float»}
As a result of these definitions you can always use \placefigure, \placetable,
\placegraphic and \placeintermezzo. Of course, you can define your own floats with
\definefloat. You place your newly defined floats with the command:
\placefloat[.1.][ref,..]{.2.}{.3.}
.1.
.2.
.3.
left right here top bottom inleft inright inmargin margin page opposite always force
tall
text
text
When a float cannot be placed at a specific location on a page, ConTEXt will search for the most
optimal alternative. ConTEXt provides a number of placement options for floats. These are
listed in table 12.1.
The commands can be used without the left and right brackets. For example:
\place...{caption}{content}
When the caption is left out, the float number is generated anyway. When the number is not
needed you type none, like in:
\placefigure{none}{.....}
It is mandatory to end this command by an empty line or a \par. You don’t have to embed a
table in braces, since the \start and \stop commands have them built in:
\placetable
[here][tab:example]
12
Floats
Version: January 27, 2000
Project: manual
Produkt: cont-en
Onderdeel: co-en-13
280
280
Blocks
preference
277
Floatblocks
result
< 84 placed
left
left of text
right
right of text
here
preferably here
top
at top of page
bottom
at bottom of page
inleft
in left margin
inright
in right margin
inmargin
in the margin (left or right)
margin
in the margin (margin float)
page
on a new (empty) page
opposite
on the left page
always
precedence over stored floats
force
per se here
References
> tab:example
> stp:379
> stp:reserve@@float@@
Registers
83
> t \tex {reserve<<flo..
Table 12.1 Preferences in \placefloat.
{A very simple example of a table.}
\starttable[|c|c|]
\HL
\VL this \VL is
\VL\FR
\VL a
\VL table \VL\LR
\HL
\stoptable
84
this
is
a
table
Table 12.2 A very simple example of a table.
The vertical whitespace for a float can be reserved with:
Floats
Version:
January 27, 2000
Project:
manual
Produkt:
cont-en
Onderdeel:
12
co-en-13
281
281
278
Blocks
Floatblocks
\reservefloat[..,..=..,..][.1.][ref,..]{.2.}
height
width
frame
.1.
.2.
< 85 placed
dimension
dimension
on off
left right here top bottom inleft inright inmargin margin page opposite always force
text
References
<
>
>
>
This command can be used without the left and right bracket. An example of a reservation is:
fig:reservation
fig:reservation
stp:382
stp:start@@float@@text
Registers
> t \tex {start<<float..
\reservefigure
[height=4cm,width=10cm,frame=on][here][fig:reservation]
{An example of a reservation.}
Which results in figure 12.1.
figure
85
Figure 12.1 An example of a reservation.
When the content of a float is not yet available, you can type \empty... instead of \place....
In this way you can also reserve vertical whitespace. When no option is added, so { } is typed,
the default empty float is used. However, whether the figure or table is available is not that
important. You can always type:
\placefigure{This is a figure caption.}{}
As a first argument you can specify a key left or right that will cause ConTEXt to let the
text flow around the float. The second optional parameter can be a cross reference, to be used
later, like \at {page} [fig:schematic process].
\placefigure[here][fig:demo]{This a figure caption.}{}
As we will later see, you can also use the next command:
12
Floats
Version:
January 27, 2000
Project:
manual
Produkt:
cont-en
Onderdeel:
co-en-13
282
282
Blocks
279
References
\startfloattext[.1.][ref]{.2.}{.3.} ... \stopfloat
.1.
.2.
.3.
.4.
>
>
<
>
>
<
>
>
<
left right high middle low offset tall
text
text
text
Preferences are left, right or middle. Furthermore you can specify offset in case the text
should align with the float. Both setups can be combined: [left,offset].
Registers
> t \tex {placelistof<..
> t \tex {completelist..
> t \tex {setupfloat}
A list of used floats is generated with the command:
ð ñ
\placelistoffloats
numbering->
stp:383
stp:placelistof@@flo..
numbering
stp:384
stp:completelistof@@..
toc
stp:381
stp:setupfloat
\currentsetupinherit..
For example, the command \placelistoffigures would typeset a list of figures. The list
follows the numbering convention that is set with the command \setupnumbering, which was
discussed at page ??.
The next command generates a list of floats on a separate page.
ð ñ
\completelistoffloats
Pagebreaks that occur at unwanted locations can be enforced in the same way that is done with
a table of contents (see section 9.1):
\completelistoffloats[pageboundaries={8.2,20.4}]
As with tables of content the default local lists are generated. Recalling a list within a chapter
produces a list for that specific chapter. So, if you want a list of all figures, you need to specify
criterium as all.
12.1
12.2
12.3
12.4
12.5
12.6
An example of a reservation.
278
281
284
285
286
286
An example of \startcombination....
The spacing within combinations (1).
The spacing within combinations (2).
Combinations without captions.
The previous list was produced by saying:
\placelistoffigures[criterium=chapter]
Floats
Version:
January 27, 2000
Project:
manual
Produkt:
cont-en
Onderdeel:
12
co-en-13
283
283
280
Blocks
References
The characteristics of a specific class of floats are specified with the command:
>
>
<
>
>
\setupfloat[...][..,..=..,..]
...
height
width
pageboundaries
..=..
name
dimension
dimension
list
see p 264: \setupframed
stp:237
stp:setupfloats
\currentsetupinherit..
stp:235
stp:setupcaptions
Registers
> t \tex {setupfloats}
> t \tex {setupcaptions}
The (predefined) floats can also be set up with the more meaningful commands
\setupfigures, \setuptables etc.
The height and width relate to the vertical whitespace that should be reserved for an empty
float. All settings of \framed can be used, so when frame is set to on, we get a framed float.
The next two commands relate to all floats. The first command is used for setting the layout
including the caption:
\setupfloats[..,..=..,..]
location
width
before
after
margin
spacebefore
spaceafter
sidespacebefore
sidespaceafter
ntop
nbottom
nlines
..=..
left right middle
fit dimension
command
command
dimension
n*small n*medium n*big none
n*small n*medium n*big none
n*small n*medium n*big none
n*small n*medium n*big none
number
number
number
see p 264: \setupframed
The second command is used for setting the enumerated captions of figures, tables, intermezzos, etc.
12
Floats
Version:
January 27, 2000
Project:
manual
Produkt:
cont-en
Onderdeel:
co-en-13
284
284
Blocks
281
Floatblocks
\setupcaptions[..,..=..,..]
location
width
headstyle
style
number
inbetween
align
conversion
way
< 86 placed
top bottom none high low middle
fit max dimension
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
yes no
command
left middle right no
numbers characters Characters romannumerals Romannumerals
bytext bysection
References
> stp:236
> stp:setupcaption
< \currentsetupinherit..
Registers
> t \tex {setupcaption}
You can also set up captions for a specific class of floats, like figures. The first argument of
the next command is the name of that class of floats.
\setupcaption[...][..,..=..,..]
...
..=..
name
see p 281: \setupcaptions
The commands assigned to before, after are are executed before and after placing the float.
The parameter inbetween is executed between the float and the caption. All three normally
have a \blanko command assigned.
The parameter style is used for numbering (Figure x.y) and width for the width of the caption
label. The parameter margin specifies the margin space around a float when it is surrounded
by text. The float macros optimize the width of the caption (at top or bottom) related to the
width of the figure or table.
Figure 12.2
\setupcaptions[location=high]
\setupfloats[location=left]
86
With the three variables ntop, nbottom and nlines the float storage mechanism can be influenced. The first two variables specify the maximum number of floats that are saved per page
at the top or the bottom of a page.
By default these variables have the values 2 and 0. Assume that ten figures, tables and/or
other floats are stored, then by default two floats will be placed at each new page (if possible).
Floats
Version:
January 27, 2000
Project:
manual
Produkt:
cont-en
Onderdeel:
12
co-en-13
285
285
282
Blocks
For example, at a forced pagebreak or at the beginning of a new chapter, all stored floats are
placed.
Floatblocks
< 87 placed
< 88 placed
The parameter nlines has the default value 4. This means that never less than four lines will
be typeset on the page where the floats are placed.
We continue with a few examples of floats (figures) placed next to the running text. This looks
like:
\placefigure[right]{none}{}
... here is where the text starts ....
For illustrating the mechanism we do need some text. Therefore the examples are used to
explain some issues on the float mechanism.
Floats are placed automatically. The order of appearance follows the order you have keyed in
the source. This means that larger floats are placed somewhere else in your document. When
\version[temporary] is set, you can get information on the float mechanism. By consulting
that information you get some insight into the process.
Floats can be surrounded by text. The float at the right was set with
\placefigureright[right]{none}{...}. The float mechanism
works automatically. Should it occur that pages are left blank as a
result of poor float placement, you will need to make some adaptations manually. You can downsize your figure or table or alter your
text. It is also a good practice to define your float some paragraphs
up in your source. However, all of this should be done at the final
87
production stage.
spuitmond
doorn
doornhouder
With the key force you can force a float to be placed at that exact location. Tables or figures
that are preceded by text like: ‘as we can see in the figure below’ may be defined with this
option.
In manuals and study books we encounter many illustrations. It
is almost unavoidable to manually adapt these for optimal display.
However, the float commands in ConTEXt are optimized in such a
motor
way that you can produce books with hundreds of floats effortlessvertraging
ly. The worst case is that some floats are stored and placed at the
end of the chapter. But this can be influenced with the command
\startpostponing. Postponing is done with the keys always which can be combined with the
location, like [left,always] or [here,always]. Because the order of the floats is changed
schroef
draad
88
kamers
vul opening
12
Floats
Version:
January 27, 2000
Project:
manual
Produkt:
cont-en
Onderdeel:
co-en-13
286
286
Blocks
283
several parses are necessary for the document. These processes can be traced via messages on
the terminal.
This brings us to a figure that is placed at the left side of a page. The side float mechanism in
inspired and based on a mechanism of D. Comenetz. In the background three mechanisms are
active. A mechanism to typeset a figure on top, inbetween, of under existing text. There is a
mechanism to place figures on the right or left of a page. And there is a third mechanism to
typeset text next to a figure.
Floatblocks
< 89 placed
< 90 placed
< 91 placed
Registers
>
>
>
>
>
>
i
i
m
m
m
m
figures+combining
combining
\tex {startcombina..
\tex {setupcombina..
\tex {placesidebys..
\tex {placeontopof..
We see an example of the last mechanism. The text is enclosed by
the commands:
\startfiguretext
[right]{none}{\externalfigure[rb00015]}
....
\stopfiguretext
bewegende opspanplaat
machine eindplaat
89
It is obvious that we can also place the figure at the left. With
\start...text we can add the key offset.
Here we used
[left,offset].
vaste opspanplaat
hydraulische cylinder
90
When the text is longer than expected, then it will not flow around
the float. By default the floats are handled in the same order they
are typed in the source file. This means that the stored figures are
placed first. If this is not desired you can type the key always. The
actual float will get priority.
bewegende opspanplaat
There are more options. In this case the setup [right,middle] is
given. In the same way we place text high and low.
machine eindplaat
When the key long is used the rest of the text is filled out with
empty lines, as here.
vaste opspanplaat
hydraulische cylinder
91
When several figures are set under each other, making them the same width makes for a nice
presentation on the page. This looks better.
Floats
Version:
January 27, 2000
Project:
manual
Produkt:
cont-en
Onderdeel:
12
co-en-13
287
287
284
Blocks
12.3
Floatblocks
Combining figures
< 92 placed
For reasons of convenience we now discuss a command that enables us to combine floats into
one.
>
>
>
<
\startcombination[...] ... \stopcombination
...
References
stp:434
stp:startcombination
fig:combinations
fig:combinations
n*m
Registers
> t \tex {startcombina..
This command is used to place the figures under or next to each other.
92
a
b
c
d
e
f
Figure 12.3 An example of \startcombination....
The example in figure 12.3 is typeset with the commands:
\placefigure
[here]
[fig:combinations]
{An example of \type{\startcombination...}.}
{\startcombination[3*2]
{\externalfigure[lb00220]} {a} {\externalfigure[lb00221]} {b}
{\externalfigure[lb00222]} {c} {\externalfigure[lb00223]} {d}
{\externalfigure[lb00225]} {e} {\externalfigure[lb00226]} {f}
\stopcombination}
Between [ ] we specify how the combination is combined: [3*2], [4*2] etc. When we put
two floats next to each other it is sufficient to specify [2], [4] etc.
The floats, mostly figures or tables, are specified within two arguments. The first content is
placed over the second content: {xxx}{yyy}. The second argument can be empty: {xxx}{}.
The general construct looks like this:
12
Floats — Combining figures
Version: January 27, 2000
Project: manual
Produkt: cont-en
Onderdeel: co-en-13
288
288
Blocks
285
Floatblocks
\startcombination[n*m]
{text 1} {subcaption 1}
{text 2} {subcaption 2}
........ ..............
\stopcombination
< 93 placed
> 94 saved
> 95 saved
References
>
>
<
<
<
>
>
>
>
>
The combination can be set up with:
\setupcombinations[..,..=..,..]
before
inbetween
after
distance
height
width
align
commando
commando
commando
dimension
dimension fit
dimension fit
no left right middle normal
stp:433
stp:setupcombinations
fig:order of combina..
fig:spacing in combi..
fig:no subcaptions
fig:spacing in combi..
fig:order of combina..
fig:no subcaptions
stp:435
stp:placesidebyside
Registers
> t \tex {setupcombina..
> t \tex {placesidebys..
With distance you specify the horizontal distance between objects. The parameters align
relates to the subcaption. By default the text and objects are centered. The width is the total
width of the combination.
The three parameters before, after and between are processed in the order of specification
in figure 12.5. There are some examples in figure 12.4. We can see in figure 12.6 that when the
title in the second argument is empty the spacing adapted.
test
test
test
test
a
b
c
d
{\blank[big]}
93
test
test
test
test
test
test
test
test
a
b
c
d
a
b
c
d
{\blank[small]}
{\blank[medium]}
Figure 12.4 The spacing within combinations (1).
Using combinations require figures that have the correct dimensions or equal proportions.
Unequally proportioned figures are hard to combine.
The simple version of combining is this:
Combining figures
Version:
January 27, 2000
Project:
manual
Produkt:
cont-en
Onderdeel:
12
co-en-13
289
289
286
Blocks
References
> stp:436
> stp:placeontopofeach..
> textblocks
figure
Registers
>
>
>
>
>
>
>
>
>
>
>
>
>
>
<inbetween>
subtitle
<after>
<before>
Figure 12.5 The spacing within combinations (2).
94
95
t
i
i
i
i
m
m
m
m
m
m
m
m
m
\tex {placeontopof..
moving text
blocks+moving
blocks+numbering
numbering+blocks
\tex {defineblocks}
\tex {begin«block»}
\tex {hideblocks}
\tex {selectblocks}
\tex {useblocks}
\tex {keepblocks}
\tex {processblocks}
\tex {setupblock}
\tex {reset}
Figure 12.6 Combinations without captions.
\placesidebyside{.1.}{.2.}
.1.
.2.
text
text
\placeontopofeachother{.1.}{.2.}
.1.
.2.
text
text
We use them in this way:
\placesidebyside
{\framed{\Logo[ADE]}} {\framed{\Logo[BUR]}}
\placeontopofeachother {\framed{\Logo[ADE]}} {\framed{\Logo[BUR]}}
12
Combining figures
Version:
January 27, 2000
Project:
manual
Produkt:
cont-en
Onderdeel:
co-en-13
290
290
Blocks
12.4
287
Text blocks
For practical reasons we sometimes want to key text somewhere in the source that should be
typeset at a completely different location in the typeset document. It is also useful to be able
to use text more than once. The commands described below are among the eldest of ConTEXt.
They were one of the reasons to start writing the macropackage.
You can mark text (a text block) and hide or move that block, but first you have to define it
using:
\defineblock[...]
...
name
If necessary you can pass several names in a comma--delimited list. After the definition you
can mark text with:
\beginname
....................
....................
\endname
Between the begin-- and end command you can use any command you want.
The commands below tell ConTEXt to hide or recall text blocks:
\hideblocks[..,.1.,..][..,.2.,..]
.1.
.2.
name
name
\useblocks[..,.1.,..][..,.2.,..]
.1.
.2.
name
name
\keepblocks[..,.1.,..][..,.2.,..]
.1.
.2.
name
all name
Combining figures — Text blocks
12
291
288
Blocks
\selectblocks[..,.1.,..][..,.2.,..][..=..]
.1.
.2.
criterium
name
name
all section
\processblocks[..,.1.,..][..,.2.,..]
.1.
.2.
name
name
These commands make it necessary to process your text at least twice. You can also recall
more than one text block, for example [question,answer].
In hidden and re--used blocks commands for numbering can be used. Assume that you use
questions and answers in your document. By defining the questions as text blocks you can:
1.
2.
3.
4.
5.
at that location typeset the questions
only use the questions and use the answers in a separate chapter
use questions and answers in a separate chapter
hide the answers
etc.
When we choose option 2 the definitions look like this:
\defineenumeration[question][location=top,text=Question]
\defineenumeration[answer][location=top,text=Answer]
\defineblock[question,answer]
\hideblocks[answer]
A question and answer in the source look like this:
\beginquestion
\question Why do we use blocks? \par
\endquestion
\beginanswer
\answer I really don’t know. \par
\endanswer
The questions are only used in the text. Questions and answers are both numbered. Answers
are summoned by:
12
Text blocks
292
Blocks
289
\chapter{Answers}
\reset[answer]
\useblocks[answer]
The command \reset... is necessary for resetting the numbering mechanism. When the
answers are used in the same chapter you can use the following commands:
\section{Answers}
\reset[answer]
\selectblocks[answer][criterium=chapter]
You must be aware of the fact that it may be necessary to (temporarily) disable the reference
mechanism also:
\setupreferencing[state=stop]
A more complex situation is this one. Assume that you have several mathematical formulas in
your document, and that you want to recapitulate the more complex ones in a separate chapter
at the end of the document. You have to specify an [-] at formulas you do not want repeated.
\defineblock[formula]
\beginformula
\placeformula[newton 1]$$f=ma$$
\endformula
This can also be written as:
\beginformula[-]
\placeformula[newton 2]$$m=f/a$$
\endformula
When you re--use the formulas only the first one is typeset. The rest of the formulas is processed, so the numbering will not falter.
The opposite is also possible. By default all local specifications are undone automatically. This
means for example that the enumeration of text elements like questions, answers, definitions,
etc. can be temporarily stopped. When numbering should continue you specify: [+]. 23
Among the parameters of the number mechanism we (in some cases) use the parameter
blockwise. This parameter relates to numbering within a set of blocks, for example per chapter.
23
When you use enumerations within text blocks you can best use the \start...stop alternative (see page ??).
Text blocks
12
293
290
Blocks
You may have a document in which the questions and answers are collected in text blocks.
The questions are typeset in the document and the answers in a separate appendix. Answers
and question are put at the same location in the source file. When we number the questions
and answers per chapter, then question 4.12 is the 12th question in chapter 4. The correct
number is used in the appendix. In this example answer 4.12 refers to question 4.12 and not
the appendix number.
In case we do want the appendix number to be the prefix of the blocknumber we set the
parameter blockwise at no. This is a rather complex situation and will seldom occur.
Earlier we discussed the initializing and resetting of counters. For reasons of uniformity we
also have:
\reset[..,...,..]
...
name
In future there will be an option to sort blocks. For that purpose a second set of optional [ ]
in and \selectblocks is available. The first argument is used for ‘tags’. These tags are logical
labels that enable us to recall the blocks.
\beginremark[important]
This is an important message!
\endremark
Now we can recall the ‘important’ messages by:
\useblocks[remark][important]
or:
\selectblocks[remark][important][criterium=chapter]
Here, criterium has the same function as in lists (like tables of content) and registers: it limits
the search. In this case, only the blocks belonging to this chapter will be typeset.
More than one ‘tag’ is allowed in a comma delimited list. Text blocks may be nested:
\beginpractice
\beginquestion
\question Is that clear? \par
\endquestion
\beginanswer
12
Text blocks
294
Blocks
291
\answer Yes it is! \par
\endanswer
\endpractice
In this case we use three blocks. Such blocks are stored in a file. This file must be available
when the blocks are re--used. This means that the document must be processed at least twice.
When blocks are summoned at the end of your source file only one processing step is sufficient
but then you have to type the command nomoreblocks before the blocks are recalled:
\nomoreblocks
After this command no blocks should be specified. In the future commands will be developed
for local adaptations of the layout of text blocks. Until that moment the following command
is all there is:
\setupblock[..,...,..][..,..=..,..]
...
before
after
inner
style
file
name
command
command
command
normal bold slanted boldslanted type cap small... command
file
A block is being processed within a group, in other words: within { }. The setup of before
and after are used outside this group, and the setup of inner is used within the group. For
example if we mark a re--used text block in the margin we can use the following setup:
\defineblock[exampletext]
\beginexampletext
If you wonder why this mechanism was implemented consider an educational
document with hundreds of \quote {nice to know} and \quote {need to know}
text blocks at several ability levels.
\endexampletext
\setupblock[exampletext][inner=\margintitle{reused}]
\useblocks[exampletext]
The first text is set without an indicator in the margin and the second is. If we would have used
before instead of inner some grouping problems had occurred.
Text blocks
12
295
292
Blocks
If you wonder why this mechanism was implemented consider an educational document with
hundreds of ‘nice to know’ and ‘need to know’ text blocks at several ability levels.
reused
If you wonder why this mechanism was implemented consider an educational document with
hundreds of ‘nice to know’ and ‘need to know’ text blocks at several ability levels.
You can import text blocks from other source files. For example if you want to use text blocks
from a manual for students in a manual for teachers, you can specify:
\setupblock
[homework]
[file=student,
before=\startbackground,
after=\stopbackground]
In that case the blocks are imported from the file student.tex. In this example these blocks
are typeset differently, with a background. When the student material is specified with:
\beginhomework[meeting 1]
..........
\endhomework
we can summon the blocks in the teacher’s manual with:
\useblocks[homework][meeting 1]
In extensive documents it will take some time to generate these products. But this mechanism garantees we use the same homework descriptions in the students and teachers manual.
Furthermore it saves typing and prevents errors.
Questions and answers are good examples of text blocks that can be hidden and moved. The
example below will illustrate this. Because commands like \question have a paragraph as an
argument the \par’s and/or empty lines are essential.
In the setup we see that questions and answers are coupled. A coupling has a meaning in
interactive documents.
\defineblock[question]
\defineblock[answer]
\defineenumeration[question][location=inmargin,coupling=answer]
\defineenumeration[answer][location=top,coupling=question]
\hideblocks[answer]
12
Text blocks
296
Blocks
293
\starttext
\chapter{\CONTEXT}
\CONTEXT\ is a macropackage that is based on \TEX. \TEX\ is a typesetting
system and a programm. This unique combination is used extensively in
\CONTEXT.
\beginquestion
\startquestion
To date, the fact that \TEX\ is a programming language enables \CONTEXT\
to do text manipulations that cannot be done with any other known package.
Can you mention one or two features of \CONTEXT\ that are based on the
fact that \TEX\ is programming language?
\stopquestion
\endquestion
\beginanswer
\answer You can think of features like floating blocks and text block
manipulation. \par
\endanswer
\beginquestion
\question Are there any limitations in \TEX ? \par
\endquestion
\beginanswer
\answer Yes and no. The implementation of \TEXEXEC\ is done in
\PERL\ rather than in \TEX.
\endanswer
\TEX\ is a very powerful tool, but much of its power is yet to be
unleashed. \CONTEXT\ tries to make a contribution with its user||friendly
interface and its support of many features, like interactivety.
\chapter{Answers}
\useblocks[question,answer]
\stoptext
With \processblocks blocks are processed but not typeset. Assume that we have two types
of questions:
Text blocks
12
297
294
Blocks
\defineblock[easyquestion,hardquestion]
When both types of questions use the same numbering mechanism, we can recall the hard
questions in their original order by hiding the easy questions.
\processblocks[easyquestion]
\useblocks[hardquestion]
12.5
Opposite blocks
In future versions of ConTEXt there will be support of spread based typesetting. For the
moment the only command available is:
\startopposite ... \stopopposite
Everything between start and stop is typeset at the left page in such a way that it is aligned
with the last paragraph that is typeset on the right page.
\setupoppositeplacing[..=..]
state
12.6
start stop
Margin blocks
Within limits you can place text and figures in the margin. In this case the margin is handled
as a separate (very narrow) page next to the actual page.
\startmarginblock ... \stopmarginblock
This can be setup with:
12
Text blocks — Opposite blocks — Margin blocks
298
Blocks
295
\setupmarginblocks[..,..=..,..]
location
style
width
align
top
inbetween
bottom
left
right
before
after
inmargin left middle right
normal bold slanted boldslanted type cap small... command
dimension
left middle right no
command
command
command
command
command
command
command
The mechanism to place blocks is still under construction.
12.7
Hiding text
It is possible to hide text (skip during processing) by:
\starthiding ... \stophiding
12.8
Postponing text
Text elements can be postponed (stored) and placed at the next empty page. This option is
needed in case ConTEXt encounters large figures or tables. The postponed textelement is
placed at the next page generated by TEX or forced by the user with a manual page break.
\startpostponing ... \stoppostponing
Several text blocks can be postponed and stored. This proces can be followed on screen during
document generation.
\startpostponing
\placefigure{A rather large figure.}{...}
\stoppostponing
When a lot of text elements are postponed or when a figure uses a complete page we advise
you to add \page after the postponing. Otherwise there is the possibility that a blank page is
Margin blocks — Hiding text — Postponing text
12
299
296
Blocks
inserted. This is caused by the fact that the postponing mechanism and the float mechanism
are completely independent.
\startpostponing
\placefigure{A very large figure.}{...}
\page
\stoppostponing
12.9
Buffers
Buffers simplify the moving of text blocks. They are stored in a file with the extension tmp and
are used to bring readability to your source. Furthermore they can be recalled at any location
without retyping them.
\startbuffer[...] ... \stopbuffer
...
name
\getbuffer[...]
...
name
\typebuffer[...]
...
name
The example below shows the use of these commands.
\startbuffer
We see that a {\em buffer} works something like a {\em block}.\par
\stopbuffer
\startlines
{\tf \getbuffer}
{\bf \getbuffer}
{\sl \getbuffer}
\stoplines
This results in:
12
Postponing text — Buffers
300
Blocks
297
We see that a buffer works something like a block.
We see that a buffer works something like a block.
We see that a buffer works something like a block.
The name is optional. A name makes sense only when several buffers are used. Most of the
time the default buffer will do. Most examples in this manual are typed in buffers.
In chapter ?? we can see that the last argument of a \placeblock can be rather extensive. A
buffer can be useful when such large tables are defined.
\startbuffer
... many lines ...
\stopbuffer
\placetable{A table.}{\getbuffer}
The buffer is set up with:
\setupbuffer[...][..,..=..,..]
...
before
after
name
command
command
The first argument is optional and relates to the buffers you defined yourself. You can define
your own buffer with:
\definebuffer[...]
...
name
Be aware of possible conflicting names and use capital letters. After this command /getbuffer
and /typebuffer are available where buffer is the name of the buffer.
Buffers
12
301
\externalfigure
299, 304
\setupexternalfigures
299
12
\showexternalfigures
304
\useexternalfigure
299
Buffers
302
Figures
299
Figures
13.1
Introduction
In this chapter we discuss how to place figures in your document. In section 12.2 we introduced
the float mechanism. In this chapter the placement of figures is discussed. Most of the time
these figures are created with external applications.
After processing a document the result is a dvi file or, when we use pdfTEX, a pdf file. The dvi
document reserves space for the figure, but the figure itself will be put in the document during
postprocessing of the dvi file. pdfTEX needs no postprocessing and the external figures are
automatically included in the pdf file.
13
External figures may have different formats like the vector formats eps and pdf, or the bitmap
formats tif, png and jpg. Note that we refer to figures but we could also refer to movies.
ConTEXt has special mechsnisms to handle figures generated by METAPOST. We have to take
care that fonts used in METAPOST figures are recognized by pdfTEX. Finally, we’ll see that
METAPOST code can be embedded in ConTEXt documents.
Normally, users need not concern themselves with the internal mechanisms used by ConTEXt
for figure processing. However some insight may be useful.
13.2
Defining figures
A figure is designed within specific dimensions. These dimensions may of may not be known
by the document designer.
natural
dimension
scaled
to 25%
a height
of 2 cm
a height of 2 cm
and a width 3 cm
If the original dimensions are unknown, then scaling the figure to 40% can have some astonishing results. A figure with width and height of 1 cm becomes almost invisible, but a figure
width width and height of 50 cm will still be very large when scaled to 40% of its original size.
Introduction — Defining figures
13
303
300
Figures
A better strategy is to perform the scaling based on the current bodyfont size, the width of
text on the page, or to set absolute dimensions, such as 3 cm by 2 cm.
To give TEX the opportunity to scale the figure adequately the file format must be known.
Table 13.1 shows the file formats supported by dvips, dvipsone, and pdfTEX respectively.
pdfTEX has the unique capability to determine the file format during processing.
When we use dvi, TEX can determine the dimensions of an eps illustration by searching for the
so called bounding box. However, with other formats such as tif, the user is responsible for
the determination of the figure dimensions.
eps
pdf
METAPOST
dvips
+
–
dvipsone
+
–
pdfTEX
-
+
tif
png
jpg
mov
+
-
+
+
-
-
+
-
-
+
+
+
+
+
+
Table 13.1 Some examples of supported file formats.
Now, let us assume that the dimensions of a figure are found. When we want to place the
same figure many times, it would be obvious to search for these dimensions only once. That
is exactly what happens. When a figure is found it is stored as an object. Such an object is
re--used in TEX and in pdf but not in dvi, since reuse of information is not supported by the
dvi format. To compensate for this shortcoming, when producing dvi output, ConTEXt will
internally reuse figures, and put duplicates in the dvi file.
\useexternalfigure[some logo][logo][width=3cm]
\placeexternalfigure{first logo}{\externalfigure[some logo]}
\placeexternalfigure{second logo}{\externalfigure[some logo]}
So, when the second logo is placed, the information collected while placing the first one is used.
In pdfTEX even the content is reused, if requested, at a different scale.
A number of characteristics of external figures are specified by:
13
Defining figures
304
Figures
301
\setupexternalfigures[..=..]
option
object
frames
ymax
xmax
directory
location
frame empty test
yes no
on off
number
number
text
local global
This command affect all figures that follow. Three options are available: frame, empty and
test. With empty no figures are placed, but the necessary space is reserved. This can save you
some time when ‘testing’ a document. 24 Furthermore the figure characteristics are printed in
that space. When frame is set at on a frame is generated around the figure. The option test
relates to testing hyperactive areas in figures.
When ConTEXt is not able to determine the dimensions of an external figure directly, it will fall
back on a simple database that can be generated by the Perl script TEXutil. You can generate
such a database by calling this script as follows:
texutil
--figures
*.tif
This will generate the texutil.tuf file, which contains the dimensions of the tif figures found.
You need to repeat this procedure every time you change a graphic. Therefore, it can be more
convenient to let ConTEXt communicate with TEXutil directly. You can enable that by adding
\runutilityfiletrue to your local cont-sys.tex file.
When a figure itself is not available but it is listed in the texutil.tuf file then ConTEXt
presumes that the figure does exist. This means that the graphics do not need to be physically
present on the system.
Although ConTEXt very hard tries to locate a figure, it may fail due to missing or invalid figure,
or invalid path specifications (more on that later). The actual search depends on the setup of
directories and the formats supported. In most cases, it it best not to specify a suffix or type.
\exernalfigure[hownice]
\exernalfigure[hownice.pdf]
\exernalfigure[hownice][type=pdf]
24
A similar effect can be obtained with the --fast switch in TEXexec.
Defining figures
13
305
302
Figures
In the first case, ConTEXt will use the graphic that has the highest quality, while in both other
cases, a pdf graphic will be used. In most cases, the next four calls are equivalent, given that
hownice is available in METAPOST output format with a suffix eps or mps:
\exernalfigure[hownice]
\exernalfigure[hownice][type=eps]
\exernalfigure[hownice][type=eps,method=mps]
\exernalfigure[hownice][type=mps]
In most cases, a METAPOST graphic will have a number as suffix, so the next call makes the
most sense:
\exernalfigure[hownice.1]
Let us summarize the process. Depending on the formats supported by the currently selected
driver (dvi, pdfTEX, etc.), ConTEXt tries to locate the graphics file, starting with the best quality.
When found, ConTEXt first tries to determine the dimensions itself. If this is impossible,
ConTEXt will look into texutil.tuf. The graphic as well as the file texutil.tuf are searched
on the current directory (local) and/or dedicated graphics directories (global), as defined by
\setupexternalfugures. By default the location is set at {local,global}, so both the
local and global directories are searched. You can set up several directories for your search by
providing a comma--delimited list:
\setupexternalfigures[directory={c:/fig/eps,c:/fig/pdf}]
Even if your operating uses a \ as separator, you should use a /. The figure directory may be
system dependent and is either set in the file cont-sys, in the document preamble, or in a
style.
An external figure is summoned by the command \externalfigure. The cow is recalled with:
\exernalfigure[koe][width=2cm]
For reasons of maintenance it is better to specify all figures at the top of your source file or in
a separate file. The figure definition is done with:
13
Defining figures
306
Figures
303
\useexternalfigure[.1.][.2.][..,..=..,..]
.1.
.2.
scale
factor
wfactor
hfactor
width
height
frame
preset
display
preview
repeat
object
type
method
name
file
number
max fit broad
number max broad fit
number max broad fit
dimension
dimension
on off
yes no
file
yes no
yes no
yes no
eps mps pdf tif png jpg mov tex
eps mps pdf tif png jpg mov tex
Valid definitions are:
\useexternalfigure [cow]
\useexternalfigure [some cow] [cow230]
\useexternalfigure [big cow] [cow230] [width=4cm]
In the first definition, the figure can be recalled as cow and the graphics file is also cow. In the
second and third definition, the symbolic name is some cow, while the filename is cow230. The
last example also specifies the dimensions.
The scale is given in percentages. A scale of 800 (80%) reduces the figure, while a value of
1200 (120%) enlarges the figure. Instead of using percentages you can also scale with a factor
that is related to the actual bodyfont. A setup of hfactor=20 supplies a figure with 2 times the
height of the bodyfont size, and bfactor=120 will result in a width of 12 times the bodyfont
size (so 144pt when using a 12pt bodyfont size). When we want to place two figures next to
one another we can set the height of both figures with hfactor at the same value:
\useexternalfigure[alfa][file0001][hfactor=50]
\useexternalfigure[beta][file0002][hfactor=50]
\placefigure
{Two figures close to one another.}
\startcombination[2]
{\externalfigure[alfa]} {this is alfa}
Defining figures
13
307
304
Figures
{\externalfigure[beta]} {this is beta}
\stopcombination
We can see that \externalfigure is capable of using a predefined figure. The typographical
consistency of a figure may be enhanced by consistently scaling the figures. Also, figures can
inherit characteristics of previously defined figures:
\useexternalfigure
\useexternalfigure
\useexternalfigure
\useexternalfigure
[alfa]
[beta]
[gamma]
[delta]
[file0001]
[file0002]
[file0003]
[file0004]
[hfactor=50]
[alfa]
[alfa]
[alfa]
Normalizing a figure’s width must also be advised when figures are placed with
\startfiguretext below one another.
In most cases you will encounter isolated figures of which you want to specify width or height.
In that case there is no relation with the bodyfont except when the units em or ex are used.
In figure 13.1 we drew a pattern with squares of a factor 10.
1 2 3 4 5 6 7 8 9 10111213141516171819202122232425262728293031
1
2
3
4
5
6
7
8
9
10
11
Figure 13.1 Factors at the actual bodyfont.
13.3
Recalling figures
A figure is recalled with the command:
\externalfigure[...][..,..=..,..]
...
..=..
13
file
see p 303: \useexternalfigure
Defining figures — Recalling figures
308
Figures
305
For reasons of downward compatibility a figure can also be recalled with a command that
equals the figure name. In the example below we also could have used \akoe and \bkoe,
unless they are already defined. Using \externalfigure instead is more safe, since it has its
own namespace.
\useexternalfigure[akoe][koetje][factor=10]
\useexternalfigure[bkoe][koetje][factor=20]
\placefigure[left]{none}{\externalfigure[bkoe]}
The \hbox {\externalfigure[akoe]} is a very well known animal in the Dutch
landscape. But for environmental reasons the \hbox {\externalfigure[akoe]}
is slowly disappearing. In the near future the cow will fulfil a marginal
\inleft {\externalfigure[bkoe]} role in the Netherlands. That is the
reason why we would like to write the word \hbox {\externalfigure[bkoe]}
in big print.
Here we see how akoe and bkoe are reused. This code will result in:
The
is a very well known animal in the Dutch landscape. But for environmental
reasons the
is slowly disappearing. In the near future the cow will fulfil a marginal
role in the Netherlands. That is the reason why we would like to write the word
in big print.
Normalized figures adapt to the actual bodyfont at least when the font is set with
\setupbodyfont or \switchtobodyfont. When a text is used for different media and is generated with different fontsizes the use of normalized figures is a good practice. The example
above looks different in a smaller fontsize.
The
is a very well known animal in the Dutch landscape. But for environmental reasons the
is slowly
disappearing. In the near future the cow will fulfil a marginal role in the Netherlands. That is the reason why
we would like to write the word
13.4
in big print.
Automatic scaling
In cases where you want the figure displayed as big as possible you can set the parameter
factor at max, fit or broad. In most situations the value broad will suffice, because then the
caption still fits on a page.
Recalling figures — Automatic scaling
13
309
306
Figures
setup
result
max
maximum width or height
fit
remaining width or height
broad
more remaining width or height
number
scaling factor (times 10)
Table 13.2 Normalized figures.
So, one can use max to scale a figure to the full page, or fit to let it take up all the remaining
space. With broad some space is reserved for a caption.
Sometimes it is not clear whether the height or the width of a figure determines the optimal
display. In that case you can set factor at max, so that the maximal dimensions are determined
automatically.
\externalfigure[cow][factor=max]
This figure of a cow will scale to the width or height of the text, whichever fits best. Even
combinations of settings are possible:
\externalfigure[cow][factor=max,height=.4\textheight]
In this case, the cow will scale to either the width o fthe text or 40% of the height of the text,
depending on what fits best.
As already said, the figures and their characteristics are stored in the file texutil.tuf and
can be displayed with:
\showexternalfigures[..,..=..,..]
alternative
a b c
There are two alternatives: a, b and c. The first alternative leaves room for figure corrections
and annotations, the second alternative is somewhat more efficient and places more figures
on one page. The third alternative puts each figure on its own page. Of course one needs to
provide the file texutil.tuf by saying:
texutil --figures *.mps *.jpg *.png
Even more straightforward is running TEXexec, for instance:
texexec --figures=c --pdf *.mps *.jpg *.png
13
Automatic scaling
310
Figures
307
This will give you a pdf file of the figures requested, with one figure per page.
13.5
TEX--figures
Figures can be scaled. This mechanism can also be used for other text elements. These elements
are then stored in separate files or in a buffer. The next example shows how a table is scaled
to the pagewidth. The result is typeset in figure 13.2.
\startbuffer[table]
\starttable[||||||]
\HL
\VL \bf factor
\bf height
\bf nothing
\HL
\VL \type{max}
automatically
width or height
\VL \type{fit}
automatically
width or height
\VL \type{broad}
automatically
width or height
\VL \type{...}
height
original dimensions
\HL
\stoptable
\stopbuffer
\VL \bf width
\VL
\VL \bf width and height \VL
\VL \SR
\VL
\VL
\VL
\VL
\VL
\VL
\VL
\VL
\VL
\VL
\VL
\VL
automatically
automatically
\FR
automatically
automatically
\MR
automatically
automatically
\MR
width
isometric
\LR
\VL
\VL
\VL
\VL
\VL
\VL
\VL
\VL
\placefigure
[here][fig:table]
{An example of a \TEX\ figure.}
{\externalfigure[table.tmp][width=\textwidth]}
\placefigure
{An example of a \TEX\ figure.}
Automatic scaling — TEX--figures
13
311
308
Figures
{\externalfigure[table.tmp][width=.5\textwidth]}
factor
width
height
width and height
nothing
max
automatically
automatically
automatically
width or height
fit
automatically
automatically
automatically
width or height
broad
automatically
automatically
automatically
width or height
...
width
height
isometric
original dimensions
Figure 13.2 An example of a TEX figure.
factor
width
height
width and height
nothing
max
automatically
automatically
automatically
width or height
width or height
fit
automatically
automatically
automatically
broad
automatically
automatically
automatically
width or height
...
width
height
isometric
original dimensions
Figure 13.3 An example of a TEX figure.
Buffers are written to a file with the extension tmp, so we recall the table with table.tmp. Other
types of figures are searched on the directories automatically. With TEX figures this is not the
case. This might lead to conflicting situations when an eps figure is meant and not found, but
a TEX file of that name is.
13.6
Extensions of figures
In the introduction we mentioned different figure formats like eps and png. In most situations
the format does not have to be specified. On the contrary, format specification would mean
that we would have to re--specify when we switch from dvi to pdf output. The figure format
that ConTEXt will use depends on the special driver. First preference is an outline, second a
bitmap.
METAPOST figures, that can have a number as suffix, are recognized automatically. ConTEXt
will take care of the font management when it encounters METAPOST figures. When color is
disabled, or rgb is to be converted to cmyk, ConTEXt will determine what color specifications
have to be converted in the METAPOST file. If needed, colors are converted to weighted grey
13
TEX--figures — Extensions of figures
312
Figures
309
scales, that print acceptable on black and white printers. In the next step the fonts are smuggled
into the file. 25 In case of pdf output the METAPOST code is converted into pdf by TEX.
If necessary the code needed to insert the graphic is stored as a so called object for future re-use. This saves processing time, as well as bytes when producing pdf. You can prevent this by
setting object=no.
When eps and mps (METAPOST) figures are processed ConTEXt searches for the high resolution
bounding box. By default the PostScript bounding box may have a deviation of half a point,
which is within the accuracy of our eyes. Especially when aligning graphics, such deviations
will not go unnoticed.
ConTEXt determines the file format automatically, as is the case when you use:
\externalfigure[koe]
Sometimes however, as we already explained, the user may want to force the format for some
reason. This can be done by:
\externalfigure[koe.eps]
\externalfigure[koe][type=eps]
In special cases you can specify in which way figure processing takes place. In the next example
ConTEXt determines dimensions asif the file were in eps format, that is, it has a bounding box,
but processes the files as if it were a METAPOST file. This kind of detailed specification is
seldom needed.
\externalfigure[graphic.xyz][type=eps,method=mps]
The automatic searching for dimensions can be blocked by preset=no.
13.7
Movies
In ConTEXt moving images or ‘movies’ are handled just like figures. The file format type is not
determined automatically yet. This means the user has to specify the file format.
\externalfigure[demo.mov][label=demo,width=4cm,height=4cm,preview=yes]
With this setup a preview is shown (the first image of the movie). If necessary an ordinary
(static) figure can be layed over the first movie image with the overlay mechanism.
25
Fonts are a problem in METAPOST files, since it it up to the postprocessor to take care of them. In this respect,
METAPOST output is not self contained.
Extensions of figures — Movies
13
313
310
Figures
Movies can be controlled either by clicking on them, or by providing navigational tools, like:
... \goto {start me} [StartMovie{demo}] ...
A more detailed discussion on controlling widgets is beyond this chapter. Keep in mind that
you need to distribute the movies along with your document, since they are not included. This
makes sense, since movies can be pretty large.
13.8
Some remarks on figures
Figures, and photos in particular, have to be produced with consistent proportions. The proportions specified in figure 13.4 can be used as a guideline. Scaling of photos may cause quality
loss.
4: 5
3: 4
2: 3
5: 4
4: 3
3: 2
Figure 13.4 Some preferred image
proportions.
In the background of a figure you typeset a background (see figure ??). In this example the
external figures get a background (for a black and white reader: a green screen).
\setupfloats
[background=color,
backgroundcolor=green,
backgroundoffset=3pt]
\useexternalfigure [koe]
[bfactor=80,
background=screen,
backgroundscreen=0.75]
Note that we use only one float and that there are six external figures. The background of the
float is used for the complete combination and the background of the external figure only for
the figure itself.
13
Movies — Some remarks on figures
314
Figures
311
raster=0.70
raster=0.75
raster=0.80
raster=0.85
raster=0.90
raster=0.95
Figure 13.5 Some examples of backgrounds in figures.
Some remarks on figures
13
315
316
Definitions
313
Definitions
\about{...}[ref]
...
ð ñ
\adaptlayout[..,...,..][..,..=..,..]
...
height
lines
34
number
dimension max
number
\arg{...}
...
126
ð ñ
209
text
\atpage[ref]
210
\background
152
\blackrule[..,..=..,..]
271
..=..
see p 272: \setupblackrules
\blackrules[..,..=..,..]
..=..
272
see p 272: \setupblackrules
\blank[..,...,..]
...
69
n*small n*medium n*big nowhite back white disable force reset line halfline formula fixed flexible
\but[ref]
\Cap{...}
...
A
text
\at{.1.}{.2.}[ref]
.1.
209
text
ð ñ
243
119
text
A
317
314
Definitions
\CAP{...}
...
\Caps{..
...
120
text
... ..}
120
text
\chapter[ref,..]{...}
...
171
text
\color[.1.]{.2.}
.1.
143
text
\column
79
\comparecolorgroup[...]
...
149
name
\comparepalet[...]
...
149
name
\completecombinedlist[...][..,..=..,..]
...
..=..
190
name
see p 190: \setupcombinedlist
\completelistoffloats
ð ñ
279
\completelistofsorts
203
\completelistofsynonyms
202
\completeregister[..,..=..,..]
..=..
ð ñ
217
see p 218: \setupregister
\correctwhitespace{...}
72
A
318
Definitions
\coupledregister[.1.]{.2.}
.1.
.2.
222
name
\crlf
89
\currentdate[..,...,..]
...
208
name
name
\coupleregister[...]
...
222
text
text
\couplemarking[.1.][.2.]
.1.
.2.
315
163
day month MONTH weekday WEEKDAY year dd mm jj yy d m j y referral
\currentheadnumber
176
\date[..,..=..,..][..,...,..]
163
d
m
y
...
number
number
number
see p 163: \currentdate
\decouplemarking[...]
...
\defineblank[.1.][.2.]
.1.
.2.
71
name
see p 70: \setupblank
\defineblock[...]
...
208
name
287
name
A
319
316
Definitions
\definebodyfont[..,.1.,..][.2.][..,..=..,..]
.1.
.2.
tf
bf
sl
it
bs
bi
sc
ex
mi
sy
ma
mb
mc
\definebuffer[...]
...
190
name
list
see p 190: \setupcombinedlist
\definedescription[...][..,..=..,..]
...
..=..
146
name
rgb cmyk gray s
[x:y:z=,..]
\definecombinedlist[.1.][..,.2.,..][..,..=..,..]
.1.
.2.
..=..
143
name
text
text
text
text
text
text
text
text
\definecolorgroup[.1.][.2.][..,.3.,..]
.1.
.2.
.3.
297
name
\definecolor[...][..,..=..,..]
...
r
g
b
c
m
y
k
s
133
5pt ... 12pt default
rm ss tt mm hw cg
file
file
file
file
file
file
file
file
file
file
file
file
file
225
name
see p 227: \setupdescriptions
A
320
Definitions
\defineenumeration[..,.1.,..][.2.][..,..=..,..]
.1.
.2.
..=..
...
text
location
way
blockway
headstyle
headcolor
before
after
234
name
text
inmargin intext
bytext bysection bychapter
yes no
normal bold slanted boldslanted type cap small... command
name
command
command
\definelist[.1.][.2.][..,..=..,..]
187
name
name
see p 189: \setuplist
\definelogo[.1.][.2.][.3.][..,..=..,..]
.1.
.2.
.3.
command
state
232
name
see p 233: \setupindentations
\definelabel[...][..,..=..,..]
.1.
.2.
..=..
173
name
section
\defineindenting[...][..,..=..,..]
...
..=..
269
name
see p 267: \setupframedtexts
\definehead[.1.][.2.]
.1.
.2.
276
singular name
plural name
\defineframedtext[...][..,..=..,..]
...
..=..
228
name
name
see p 230: \setupenumerations
\definefloat[.1.][.2.]
.1.
.2.
317
57
name
top header footer bottom
none page leftedge leftmargin left middle right rightmargin rightedge
command text
start stop
A
321
318
Definitions
\definemakeup[...][..,..=..,..]
...
..=..
\definemarking[.1.][.2.]
.1.
.2.
...
width
height
offset
scale
...
n
rule
height
before
after
inner
distance
tolerance
align
82
name
number
on off
fit dimension
command
command
command
dimension
verystrict strict tolerant verytolerant stretch
left right middle
\definereference[...][ref,..]
214
name
\definereferenceformat[...][..,..=..,..]
215
name
text
text
text
name
\defineregister[.1.][.2.]
.1.
.2.
30
name
dimension
dimension
dimension
number
\defineparagraphs[...][..,..=..,..]
...
left
right
text
label
147
name
name
\definepapersize[...][..,..=..,..]
...
205
name
name
\definepalet[...][..,..=..,..]
...
name
107
name
see p 108: \setupmakeup
216
singular name
plural name
A
322
Definitions
\definesection[...]
...
194
name
see p 189: \setuplist
\externalfigure[...][..,..=..,..]
...
..=..
176
section
\determinelistcharacteristics[..,...,..][..,..=..,..]
...
..=..
125
file typing name
see p 123: \setuptyping
\determineheadnumber[...]
...
100
name
header footer
text
text
text
\definetyping[...][..,..=..,..]
...
..=..
200
singular name
plural name
command
command
\definetext[.1.][.2.][.3.][.4.][.5.]
.1.
.2.
.3.
.4.
.5.
203
singular name
plural name
command
\definesynonyms[.1.][.2.][.3.][.4.]
.1.
.2.
.3.
.4.
182
name
see p 182: \setupsectionblock
\definesorting[.1.][.2.][.3.]
.1.
.2.
.3.
182
name
\definesectionblock[...][..,..=..,..]
...
..=..
319
304
file
see p 303: \useexternalfigure
A
323
320
Definitions
\fillinline[..,..=..,..]...\par
..=..
\fillinrules[..,..=..,..]{.1.}{.2.}
..=..
\footnote[ref]{...}
205
72
dimension
\graycolor[...]
...
296
name
first last previous both all
\godown[...]
...
258
name
\getmarking[.1.][.2.]
.1.
.2.
100
see p 264: \setupframed
text
\getbuffer[...]
...
73
text
\framed[..,..=..,..]{...}
..=..
...
254
see p 254: \setupfillinrules
\fixedspaces
...
253
see p 254: \setupfillinlines
145
text
A
324
Definitions
321
\grid[..,..=..,..]
x
y
nx
ny
dx
dy
xstep
ystep
offset
factor
scale
unit
location
273
number
number
number
number
number
number
number
number
yes no
number
number
cm pt em mm ex sp in
left middle
\hairline
251
\head[ref,..]
241
\headnumber[...]
176
...
section
\headtext{...}
...
165
text
\hideblocks[..,.1.,..][..,.2.,..]
.1.
.2.
287
name
name
\high{...}
...
77
text
\hl[...]
...
\in{.1.}{.2.}[ref]
.1.
ð ñ
208
text
\indenting[..,...,..]
...
253
number
67
never not no yes always first next
A
325
322
Definitions
\inleft[.1.][ref]{.2.}
.1.
.2.
\inline[ref]
214
\inmargin[.1.][ref]{.2.}
.1.
.2.
74
+ - low
text
\inright[.1.][ref]{.2.}
.1.
.2.
74
+ - low
text
\inothermargin[.1.][ref]{.2.}
.1.
.2.
74
+ - low
text
74
+ - low
text
\installlanguage[...][..,..=..,..]
...
spacing
lefthyphenmin
righthyphenmin
state
leftsentence
rightsentence
leftsubsentence
rightsubsentence
leftquote
rightquote
leftquotation
rightquotation
default
162
name
packed broad
dimension
dimension
start stop
command
command
command
command
command
command
command
command
name
\item[ref,..]
242
\items[..,..=..,..]{..,...,..}
246
..=..
see p 245: \setupitems
\its[ref,..]
242
A
326
Definitions
\kap{...}
...
159
nl fr en uk de sp cz ..
\leftaligned{...}
...
164
text
\language[...]
...
287
name
all name
\labeltext{...}
...
119
text
\keepblocks[..,.1.,..][..,.2.,..]
.1.
.2.
323
87
text
\loadsorts
204
\loadsynonyms
202
\lohi{.1.}{.2.}
.1.
.2.
\low{...}
...
77
text
\mainlanguage[...]
...
78
text
text
165
nl fr en uk de sp cz ..
\mar[ref,..]{...}
242
\marginrule[.1.]{.2.}
270
.1.
number
A
327
324
Definitions
\margintext[.1.][ref]{.2.}
.1.
.2.
76
+ - low
text
\marking[.1.]{.2.}
.1.
.2.
205
name
text
\midaligned{...}
...
87
text
\moveongrid[...]
...
44
top both bottom
\nocap{...}
...
120
text
\noheaderandfooterlines
98
\noindenting
67
\nolist{...}
192
...
text
\nomarking{...}
...
173
text
\nomoreblocks
291
\nop
244
\nospace
\note[ref]
\notopandbottomlines
73
ð ñ
100
99
A
328
Definitions
325
\nowhitespace
69
\overbar{...}
257
...
text
\overbars{..
...
... ..}
\overstrike{...}
...
258
text
\overstrikes{..
...
257
text
... ..}
258
text
\packed
71
\page[..,...,..]
91
...
yes markup no preference bigpreference left right disable last quadruple even odd blank empty reset
\pagereference[ref]
209
\part[ref,..]{...}
171
...
text
\placecombinedlist[...][..,..=..,..]
...
..=..
\placefloat[.1.][ref,..]{.2.}{.3.}
.1.
.2.
.3.
276
left right here top bottom inleft inright inmargin margin page opposite always force tall
text
text
\placefootnotes[..,..=..,..]
..=..
190
name
see p 190: \setupcombinedlist
103
see p 102: \setupfootnotes
A
329
326
Definitions
\placelist[..,...,..][..,..=..,..]
...
..=..
188
name
see p 189: \setuplist
\placelistoffloats
ð ñ
279
\placelistofsorts
203
\placelistofsynonyms
202
\placelocalfootnotes[..,..=..,..]
103
..=..
see p 102: \setupfootnotes
\placelogos[..,...,..]
...
57
name
\placeongrid[.1.]{.2.}
.1.
44
see p 44: \moveongrid
\placeontopofeachother{.1.}{.2.}
.1.
.2.
\placeregister[..,..=..,..]
..=..
286
288
name
name
\quotation{...}
...
217
text
text
\processblocks[..,.1.,..][..,.2.,..]
.1.
.2.
ð ñ
see p 218: \setupregister
\placesidebyside{.1.}{.2.}
.1.
.2.
286
text
text
247
text
A
330
Definitions
\quote{...}
...
327
247
text
\ran{...}
242
\reference[ref]{...}
209
...
text
\reservefloat[..,..=..,..][.1.][ref,..]{.2.}
height
width
frame
.1.
.2.
\reset[..,...,..]
...
217
text
text
text
\selectblocks[..,.1.,..][..,.2.,..][..=..]
.1.
.2.
criterium
288
name
name
all section
\setupalign[...]
...
171
text
\seeregister[.1.]{.2.}{..+.3.+..}
.1.
.2.
.3.
87
text
\section[ref,..]{...}
...
206
name
\rightaligned{...}
...
290
name
\resetmarking[...]
...
278
dimension
dimension
on off
left right here top bottom inleft inright inmargin margin page opposite always force
text
87
width left right middle inner outer wide broad height bottom line reset
A
331
328
Definitions
\setuparranging[..,...,..]
...
\setupbackground[..,..=..,..]
leftoffset
rightoffset
topoffset
bottomoffset
state
..=..
width
height
depth
alternative
distance
n
291
name
command
command
command
normal bold slanted boldslanted type cap small... command
file
\setupbodyfont[..,...,..]
114
name serif regular roman sans support sansserif mono type teletype handwritten calligraphic 5pt ... 12pt
\setupbodyfontenvironment[...][..,..=..,..]
...
..=..
70
normal standard line dimension big medium small fixed flexible
\setupblock[..,...,..][..,..=..,..]
...
272
dimension max
dimension max
dimension max
a b
dimension
number
\setupblank[...]
...
before
after
inner
style
file
152
top header text footer bottom page paper leftpage rightpage
leftedge leftmargin text rightmargin rightedge
start stop repeat
see p 264: \setupframed
\setupblackrules[..,..=..,..]
...
151
dimension
dimension
dimension
dimension
start stop
see p 264: \setupframed
\setupbackgrounds[.1.][..,.2.,..][..,..=..,..]
.1.
.2.
state
..=..
48
disable 2*16 2*8 2*4 2*2 2UP 2DOWN mirrored rotated doublesided negative 90 180 270
130
see p 114: \setupbodyfont
see p 114: \setupbodyfont
A
332
Definitions
\setupbottom[...][..,..=..,..]
...
..=..
281
name
see p 281: \setupcaptions
\setupcaptions[..,..=..,..]
location
width
headstyle
style
number
inbetween
align
conversion
way
281
top bottom none high low middle
fit max dimension
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
yes no
command
left middle right no
numbers characters Characters romannumerals Romannumerals
bytext bysection
\setupcolor[...]
...
120
yes no
yes no
\setupcaption[...][..,..=..,..]
...
..=..
297
name
command
command
\setupcapitals[..,..=..,..]
title
sc
99
text margin edge
text section date mark pagenumber
text section date mark pagenumber
\setupbuffer[...][..,..=..,..]
...
before
after
99
see p 97: \setupheader
see p 97: \setupheader
\setupbottomtexts[.1.][.2.][.3.]
.1.
.2.
.3.
329
143
name
\setupcolors[..,..=..,..]
state
conversion
reduction
rgb
cmyk
141
start stop global local
yes no always
yes no
yes no
yes no
A
333
330
Definitions
\setupcolumns[..,..=..,..]
n
rule
height
tolerance
distance
balance
align
blank
option
direction
..=..
\setupcombinations[..,..=..,..]
before
inbetween
after
distance
height
width
align
285
commando
commando
commando
dimension
dimension fit
dimension fit
no left right middle normal
\setupcombinedlist[...][..,..=..,..]
...
level
..=..
79
number
on off
dimension
verystrict strict tolerant verytolerant stretch
dimension
yes no
yes no text
fixed halfline line flexible big medium small
background
left right
see p 264: \setupframed
190
name
1 2 3 4 section current
see p 189: \setuplist
\setupdescriptions[..,...,..][..,..=..,..]
...
headstyle
style
color
width
distance
sample
text
align
margin
location
hang
before
inbetween
after
indentnext
227
name
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
name
fit broad dimension
dimension
text
text
left middle right
standard yes no dimension
left right top serried inmargin inleft inright hanging
fit broad number
command
command
command
yes no
A
334
Definitions
\setupenumerations[..,...,..][..,..=..,..]
...
..=..
location
text
levels
conversion
way
blockway
sectionnumber
separator
stopper
coupling
couplingway
number
aligntitle
start
301
frame empty test
yes no
on off
number
number
text
local global
\setupfillinlines[..,..=..,..]
width
margin
distance
before
after
230
name
see p 225: \definedescription
left right top serried inmargin inleft inright hanging
text
number
numbers characters Characters romannumerals Romannumerals
bytext bysection
yes no
yes number no
text
text
name
global local
no name
no yes
number
\setupexternalfigures[..=..]
option
object
frames
ymax
xmax
directory
location
331
254
dimension
dimension
dimension
command
command
\setupfillinrules[..,..=..,..]
width
distance
before
after
style
n
interlinespace
separator
\setupfloat[...][..,..=..,..]
...
height
width
pageboundaries
..=..
254
fit broad dimension
dimension
command
command
normal bold slanted boldslanted type cap small... command
number
small medium big
text
280
name
dimension
dimension
list
see p 264: \setupframed
A
335
332
Definitions
\setupfloats[..,..=..,..]
location
width
before
after
margin
spacebefore
spaceafter
sidespacebefore
sidespaceafter
ntop
nbottom
nlines
..=..
\setupfooter[...][..,..=..,..]
...
..=..
96
text margin edge
text section date mark pagenumber
text section date mark pagenumber
\setupfootnotedefinition[..,..=..,..]
..=..
97
see p 97: \setupheader
see p 97: \setupheader
\setupfootertexts[.1.][.2.][.3.]
.1.
.2.
.3.
280
left right middle
fit dimension
command
command
dimension
n*small n*medium n*big none
n*small n*medium n*big none
n*small n*medium n*big none
n*small n*medium n*big none
number
number
number
see p 264: \setupframed
104
see p 225: \definedescription
\setupfootnotes[..,..=..,..]
conversion
way
location
rule
before
after
width
height
bodyfont
style
distance
columndistance
margindistance
n
numbercommand
..=..
102
numbers characters Characters romannumerals Romannumerals
bytext bysection
page text columns high
on off
command
command
dimension
dimension
5pt ... 12pt small big
normal bold slanted boldslanted type cap small... command
dimension
dimension
dimension
number
\command#1
see p 258: \framed
A
336
Definitions
\setupframed[..,..=..,..]
height
width
offset
location
option
strut
align
bottom
top
frame
topframe
bottomframe
leftframe
rightframe
frameoffset
framedepth
framecorner
frameradius
framecolor
background
backgroundscreen
backgroundcolor
backgroundoffset
backgrounddepth
backgroundcorner
backgroundradius
depth
corner
radius
empty
...
264
fit broad dimension
fit broad dimension
none overlay dimension
low depth
none empty
yes no
no left right middle normal
command
command
on off overlay
on off
on off
on off
on off
dimension
dimension
round rectangular
dimension
name
screen color none foreground name
number
name
dimension
dimension
round rectangular
dimension
dimension
round rectangular
dimension
yes no
text
\setupframedtexts[..,..=..,..]
bodyfont
style
left
right
before
after
inner
margin
..=..
333
267
5pt ... 12pt small big
normal bold slanted boldslanted type small... command
command
command
command
command
command
standard yes no
see p 264: \setupframed
A
337
334
Definitions
\setuphead[...][..,..=..,..]
...
style
textstyle
numberstyle
number
ownnumber
page
continue
header
before
inbetween
after
alternative
command
numbercommand
textcommand
prefix
placehead
incrementnumber
align
tolerance
indentnext
file
expansion
\setupheader[...][..,..=..,..]
...
state
strut
style
leftstyle
rightstyle
leftwidth
rightwidth
before
after
text margin
normal stop
yes no
normal bold
normal bold
normal bold
dimension
dimension
command
command
slanted boldslanted type cap small... command
slanted boldslanted type cap small... command
slanted boldslanted type cap small... command
96
text margin edge
text section date mark pagenumber
text section date mark pagenumber
\setupheadnumber[.1.][.2.]
.1.
.2.
97
edge
start empty high none nomarking name
\setupheadertexts[.1.][.2.][.3.]
.1.
.2.
.3.
175
section
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
yes no
yes no
left right yes
yes no
none empty high nomarking
command
command
command
normal inmargin middle text
\command#1#2
\command#1
\command#1
+ - text
yes no
yes no file
left right normal broad
verystrict strict tolerant verytolerant stretch
yes no
name
yes command no
176
section
number +number -number
A
338
Definitions
\setupheads[..,..=..,..]
sectionnumber
alternative
separator
command
sign
-- --- -
...
style
headstyle
width
text
sample
before
after
distance
separator
166
) ( = /
\setupindentations[..,...,..][..,..=..,..]
233
name
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
fit dimension
text
text
command
command
dimension
text
\setupindenting[..,...,..]
66
none small medium big next first dimension
\setupinmargin[...][..,..=..,..]
...
location
style
before
after
align
line
distance
separator
..=..
164
nl fr en uk de sp cz ..
text
\setuphyphenmark[..=..]
...
175
yes number no
normal margin middle text paragraph
text
\command#1#2
\setupheadtext[...][..=..]
...
name
335
75
left right number
left right both
normal bold slanted boldslanted type cap small... command
command
command
inner outer left right middle normal no yes
number
dimension
text
see p 264: \setupframed
A
339
336
Definitions
\setupinterlinespace[...] [..,..=..,..]
...
height
depth
line
top
bottom
\setupitemize[.1.][..,.2.,..][..,..=..,..]
.1.
.2.
margin
width
distance
factor
items
before
inbetween
after
beforehead
afterhead
headstyle
marstyle
symstyle
stopper
n
symbol
align
indentnext
location
symbol
width
n
before
inbetween
align
after
245
left right inmargin top bottom
1 2 ... n a ... text none
dimension
number unknown
command
command
left right middle margin
command
\setuplabeltext[...][..=..]
164
nl fr en uk de sp cz ..
text
\setuplanguage[...][..,..=..,..]
..=..
237
number each
standard n*broad n*serried packed unpacked stopper joinedup atmargin inmargin autointro loose section
no standard dimension
dimension
dimension
number
number
command
command
command
command
command
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
text
number
number
left right normal
yes no
\setupitems[..,..=..,..]
...
name
65
reset small medium big on off
number
number
dimension
number
number
162
see p 162: \installlanguage
A
340
Definitions
\setuplayout[..,..=..,..]
width
height
backspace
topspace
margin
leftmargin
rightmargin
header
footer
top
bottom
leftedge
rightedge
headerdistance
footerdistance
topdistance
bottomdistance
leftmargindistance
rightmargindistance
leftedgedistance
rightedgedistance
horoffset
veroffset
style
marking
location
scale
nx
ny
dx
dy
lines
grid
91
numbers characters Characters romannumerals Romannumerals text
number
number
dimension
intext inmargin
normal bold slanted boldslanted type cap small... command
text
on off
\setuplines[..,..=..,..]
before
after
inbetween
indenting
32
dimension fit middle
dimension fit middle
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
dimension
normal bold slanted boldslanted type cap small... command
on off color
left middle right bottom top singlesided doublesided
dimension
number
number
dimension
dimension
number
yes no
\setuplinenumbering[..,..=..,..]
conversion
start
step
width
location
style
prefix
referencing
337
90
command
command
command
yes no even odd
A
341
338
Definitions
\setuplist[..,...,..][..,..=..,..]
...
state
alternative
coupling
criterium
pageboundaries
style
numberstyle
textstyle
pagestyle
color
command
numbercommand
textcommand
pagecommand
interaction
before
after
inbetween
left
right
label
prefix
pagenumber
sectionnumber
aligntitle
margin
width
height
depth
distance
separator
symbol
expansion
maxwidth
..=..
name
start stop
a b c ... none command
on off
section local previous all
list
normal bold slanted boldslanted type
normal bold slanted boldslanted type
normal bold slanted boldslanted type
normal bold slanted boldslanted type
name
\command#1#2#3
\command#1
\command#1
\command#1
sectionnumber text pagenumber all
command
command
command
text
text
yes no
yes no
yes no
yes no
yes no
dimension
dimension fit
dimension fit broad
dimension fit broad
dimension
text
none 1 2 3 ...
yes no command
dimension
see p 258: \framed
\setupmakeup[...][..,..=..,..]
...
width
height
voffset
hoffset
page
commands
doublesided
headerstate
footerstate
textstate
topstate
bottomstate
189
cap
cap
cap
cap
small...
small...
small...
small...
command
command
command
command
108
name
dimension
dimension
dimension
dimension
left yes right
command
yes no empty
normal stop start empty none nomarking
normal stop start empty none nomarking
normal stop start empty none nomarking
stop start
stop start
A
342
Definitions
\setupmarginblocks[..,..=..,..]
location
style
width
align
top
inbetween
bottom
left
right
before
after
68
dimension
dimension
dimension
\setupoppositeplacing[..=..]
state
206
name
start stop
command
yes no
\setupnarrower[..,..=..,..]
left
right
middle
270
number
dimension
\setupmarking[...][..=..]
...
state
separator
expansion
295
inmargin left middle right
normal bold slanted boldslanted type cap small... command
dimension
left middle right no
command
command
command
command
command
command
command
\setupmarginrules[..=..]
level
thickness
339
294
start stop
\setuppagenumbering[..,..=..,..]
alternative
location
conversion
style
left
right
way
text
numberseparator
textseparator
sectionnumber
separator
state
command
93
singlesided doublesided
header footer left right middle margin marginedge inleft inright
numbers characters Characters romannumerals Romannumerals
normal bold slanted boldslanted type cap small... command
text
text
bytext bysection bypart
text
text
text
yes no
text
start stop
\command#1
A
343
340
Definitions
\setuppalet[...]
...
\setuppapersize[..,.1.,..][..,.2.,..]
.1.
.2.
.1.
.2.
style
width
height
align
tolerance
distance
before
after
inner
command
rule
29
A3 A4 A5 A6 letter ... CD name landscape mirrored rotated 90 180 270
A3 A4 A5 A6 letter ... name landscape mirrored rotated negative 90 180 270
\setupparagraphs[.1.][.2.][..,..=..,..]
82
name
number each
normal bold slanted boldslanted type cap small... command
dimension
dimension
left right middle width breedte
verystrict strict tolerant verytolerant stretch
dimension
command
command
command
command
on off
\setupquote[..,..=..,..]
before
after
style
148
name
247
command
command
normal bold slanted boldslanted type cap small... command
\setupreferencing[..=..]
state
sectionnumber
prefix
interaction
width
left
right
convertfile
separator
212
start stop
yes no
+ - text
label text all symbol
dimension
command
command
yes no
text
A
344
Definitions
\setupregister[.1.][.2.][..,..=..,..]
.1.
.2.
n
balance
align
style
pagestyle
textstyle
indicator
coupling
sectionnumber
criterium
distance
symbol
interaction
expansion
referencing
command
location
maxwidth
unknownreference
...
conversion
previousnumber
182
name
numbers characters Characters romannumerals Romannumerals
yes no
\setupsectionblock[...][..,..=..,..]
182
name
yes no
yes right
command
command
\setupsorting[...][..,..=..,..]
...
before
after
command
state
criterium
style
expansion
151
dot rule external
number
number
number
\setupsection[...][..,..=..,..]
...
number
page
before
after
218
singular name
name
number
yes no
yes no
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
yes no
yes no
yes no
section local all part
dimension
1 2 ... n a ... none
pagenumber text
yes command no
on off
\command#1
left middle right
dimension
empty none
\setupscreens[..,..=..,..]
method
resolution
factor
screen
341
203
name
command
command
\command#1
start stop
all used
normal bold slanted boldslanted type cap small... command
yes command no
A
345
342
Definitions
\setupspacing[...]
...
\setupsubpagenumber[..,..=..,..]
way
state
95
bytext bysection bypart
start stop none
\setupsynonyms[...][..,..=..,..]
...
textstyle
synonymstyle
location
width
state
criterium
conversion
expansion
command
...
..=..
200
name
normal bold slanted boldslanted type cap small... command
normal bold slanted boldslanted type cap small... command
left right top serried inmargin inleft inright
dimension
start stop
all used
yes no
yes command no
\command#1#2#3
\setuptext[...][..,..=..,..]
99
see p 97: \setupheader
see p 97: \setupheader
\setuptextrules[..,..=..,..]
location
before
after
inbetween
width
distance
bodyfont
color
style
rulecolor
256
left inmargin
command
command
command
dimension
dimension
5pt ... 12pt small big
name
normal bold slanted boldslanted type cap small... command
name
\setuptexttexts[.1.][.2.][.3.]
.1.
.2.
.3.
72
broad packed
98
text margin edge
text section date mark pagenumber
text section date mark pagenumber
\setupthinrules[..=..]
interlinespace
n
before
after
253
small medium big
number
command
command
A
346
Definitions
\setuptolerance[..,...,..]
...
124
on off
slanted normal none
name
\setuptyping[...][..,..=..,..]
...
space
page
option
text
icommand
vcommand
ccommand
before
after
margin
evenmargin
oddmargin
blank
escape
indentnext
palet
color
alternative
rulethickness
123
file typing name
on off
yes no
slanted normal commands color none
yes no
command
command
command
command
command
dimension standard
dimension
dimension
dimension small medium big standard halfline line
/
yes no
name colorpretty
name
\setupunderbar[..,..=..,..]
258
a b c
dimension
\setupwhitespace[...]
...
98
text margin edge
text section date mark pagenumber
text section date mark pagenumber
\setuptype[..=..]
space
option
color
99
see p 97: \setupheader
see p 97: \setupheader
\setuptoptexts[.1.][.2.][.3.]
.1.
.2.
.3.
88
horizontal vertical stretch verystrict strict tolerant verytolerant
\setuptop[...][..,..=..,..]
...
..=..
343
68
none small medium big line fixed fix dimension
A
347
344
Definitions
\showbodyfont[..,...,..]
...
\showbodyfontenvironment[..,...,..]
...
149
name
horizontal vertical name value number
\showexternalfigures[..,..=..,..]
alternative
306
a b c
\showframe[...]
...
143
name
\showcolorgroup[.1.][..,.2.,..]
.1.
.2.
130
see p 114: \setupbodyfont
\showcolor[...]
...
117
see p 114: \setupbodyfont
33
text margin edge
\showgrid
44
\showlayout
33
\showpalet[.1.][..,.2.,..]
.1.
.2.
\showprint[..,.1.,..][..,.2.,..][..,..=..,..]
..=..
..=..
..=..
149
name
horizontal vertical name value
48
see p 29: \setuppapersize
see p 29: \setuppapersize
see p 32: \setuplayout
\showsetups
33
\showstruts
73
\someline[ref]
214
A
348
Definitions
\somewhere{.1.}{.2.}[ref]
.1.
210
text
\space
73
\startalignment ... \stopalignment[...]
..=..
345
87
see p 87: \setupalign
\startbackground ... \stopbackground
151
\startbuffer[...] ... \stopbuffer
296
...
name
\startcolor[...] ... \stopcolor
...
...
\startcolumns[..,..=..,..] ... \stopcolumns
..=..
... \stopcomponent
227
text
\startenumeration ... \stopenumeration
\startenvironment ...
...
21
file
\startdescription{...} ... \stopdescription
...
284
n*m
\startcomponent ...
...
79
see p 79: \setupcolumns
\startcombination[...] ... \stopcombination
...
143
name
text
... \stopenvironment
230
21
file
A
349
346
Definitions
\startfloattext[.1.][ref]{.2.}{.3.} ... \stopfloat
.1.
.2.
.3.
.4.
\startframedtext[...][..,..=..,..] ... \stopframedtext
...
..=..
279
left right high middle low offset tall
text
text
text
266
left right middle
see p 267: \setupframedtexts
\starthiding ... \stophiding
295
\startitemize[..,...,..][..,..=..,..] ... \stopitemize
242
...
..=..
a A KA n N m r R KR number continue standard n*broad n*serried packed stopper joinedup atmargin inmargin intro columns
see p 237: \setupitemize
\startlinecorrection ... \stoplinecorrection
69
\startlinenumbering[...] ... \stoplinenumbering
90
...
continue
\startlines ... \stoplines
\startlocalfootnotes ... \stoplocalfootnotes
..=..
89
103
see p 102: \setupfootnotes
\startmarginblock ... \stopmarginblock
294
\startmarginrule[...] ... \stopmarginrule
270
...
number
\startnamemakeup ... \stopname
\startnarrower[..,...,..] ... \stopnarrower
...
108
67
n*left n*middle n*right
\startopposite ... \stopopposite
294
A
350
Definitions
\startpacked[...] ... \stoppacked
...
\startpostponing ... \stoppostponing
\startproduct ...
21
... \stopproject
21
file
256
top bottom
text
\starttyping ... \stoptyping
\startunpacked ... \stopunpacked
\stretched{...}
...
246
n*left n*middle n*right
\starttextrule[.1.]{.2.} ... \stoptextrule
.1.
.2.
295
... \stopproduct
\startquotation[..,...,..] ... \stopquotation
...
82
file
\startproject ...
...
72
blank
\startparagraph ... \stopparagraph
...
347
122
72
122
text
\sub[ref,..]
242
\subject[ref,..]{...}
171
...
text
\subsection[ref,..]{...}
...
171
text
A
351
348
Definitions
\subsubject[ref,..]{...}
...
\subsubsection[ref,..]{...}
...
171
text
\switchtobodyfont[..,...,..]
...
171
text
\subsubsubject[ref,..]{...}
...
171
text
114
5pt ... 12pt small big global
\sym{...}
242
\tex{...}
126
...
text
\textreference[ref]{...}
...
\textrule[.1.]{.2.}
.1.
.2.
209
text
255
top bottom
text
\thinrule
252
\thinrules[..=..]
252
..=..
see p 253: \setupthinrules
\title[ref,..]{...}
...
\translate[..,..=..,..]
name
171
text
166
text
A
352
Definitions
\typ{...}
...
126
text
\type{...}
...
122
text
\typebuffer[...]
...
123
file
\underbar{...}
...
257
text
\underbars{..
...
... ..}
303
name
file
number
max fit broad
number max broad fit
number max broad fit
dimension
dimension
on off
yes no
file
yes no
yes no
yes no
eps mps pdf tif png jpg mov tex
eps mps pdf tif png jpg mov tex
\usereferences[..,...,..]
...
287
name
name
\useexternalfigure[.1.][.2.][..,..=..,..]
.1.
.2.
scale
factor
wfactor
hfactor
width
height
frame
preset
display
preview
repeat
object
type
method
257
text
\useblocks[..,.1.,..][..,.2.,..]
.1.
.2.
296
name
\typefile{...}
...
349
212
file
A
353
350
Definitions
\version[...]
...
\vl[...]
...
253
number
\whitespace
\Word{...}
...
121
121
text
\wordright{...}
...
... ..}
192
section name
\writetoregister[.1.][.2.]{..+.3.+..}
.1.
.2.
.3.
192
section name
\writetolist[.1.]{.2.}{.3.}
.1.
121
text
\writebetweenlist[.1.]{.2.}
.1.
88
text
\Words{..
...
68
text
\WORD{...}
...
26
final concept temporary
219
singular name
text
text
A
354
355
352
356
Index
353
Index
The pagenumbers refer to the chapter or paragraph that describes the topic.
a
abbreviations 200
align 42, 87
alignment 73, 104
columns 78
appendices 180
arranging 48
ascii 12
b
backgrounds
layout 152
text 150
backspace 30, 93
baselines 63
black rules 271
blocks 275
moving 287, 294
numbering 287
bodyfont 113
boldface 115
boxes 13
brackets 8
buffers 296
chapters 170, 174
character 117
characters 13
citation 246
cm 13
cmr 117
cmyk 141
color 141
colorgroups 145
columns 42, 78, 81
combined list 187
combining 284
commands 8
components 20
con 117
ConTEXt 7
cross references 208
B
d
date 163
definitions 225
descriptions 228
dimensions 13
directories 25
double--sided 93
c
e
capital characters 119
capitals 119
em 13, 128
emphasize 118
B
357
354
Index
enumeration
texts 228
environments 20
error messages 14
ε-TEX 14
eul 117
ex 13, 128
extensions 12
external figures 299
extroductions 180
f
figures
combining 284
defining 299
extensions 308
fonts 137
listing 275
maximum 305
numbering 275
placing 275
recalling 304
tables 307
files 12
directories 25
floats 275
font
definition 129
font files 136
fonts 13, 115
font size 113
footer 95
footers 93, 136
marking 170, 205
footnotes 42, 100
forms 235, 244
frames 30, 258, 266
framing 258, 266
french spacing 72
g
german 165
gray conversion 141
grayscales 145
grid 42
grids 272
h
header 95
headers 93, 136, 180
marking 170, 205
heads 164, 170
hiding text 295
high text 77
hyphen 166
hyphenation 159
i
indentation 66
indenting 232
index 215
checking 25
inslagschemas 48
interaction
registers 215
introductions 180
italic 115, 118
itemization 228
B
358
Index
itemize 235, 244
items 235, 244
k
Knuth 7
l
label 234
labels 164, 215
language
quotes 246
languages 159
layout 30, 63
lbr 117
letter heads 57
linenumbers 208
lines 251, 253
linespace 42
linespacing 63
listing
figures 275
tables 275
lists 85, 187, 244
sorting 203
logos 203
logo types 57
low text 77
355
lines 270
text 73
margins 30
marking 170, 205
math 126
medaeval numbers 115
menus 136
METAPOST 155
mirroring 93, 294
modes 26
movies 309
moving text 287, 294, 296
n
new
lines 89
page 91
new lines 89
new pages 91
nts 14
numbering
blocks 287
chapters 170, 174, 181
figures 275
itemize 235
label 234
lines 89
pages 93
tables 275
m
o
macros 8
makeup 106
margin
blocks 294
old style 115
output format 26
overlays 154
B
359
356
Index
overstrike 257
s
p
sans serif 113, 115
screen numbers 93
screens 150, 152
sections 170
selective typesetting 26
set ups 30
single--sided 93
slanted 115, 118
small--caps 119
small capitals 119
smaller layout 66
sorting 203
spacing 63, 68
spacing after colon 72
specials 26
squares 272
start 19
stop 19
stopping 14
structure 19, 20, 169, 170
structuring elements 170
struts 73
styles 26
subscript 77
superscript 77
symbols 100
synonyms 200
page design 29
pagenumbers 93
palettes 145
paper dimension 29
paragraphs 13, 63, 81
indentation 66
vertical spacing 68
parts 170
pdfTEX 14
placing
blocks 275
figures 275
tables 275
postponing text 295
printing 45
products 20
projects 20
pt 13
q
questionnaire 235, 244, 253
quotation 246
r
references 187, 208
checking 25
registers 215
interaction 215
rgb 141
roman 113, 115
t
TABLE 12
table of contents
187
B
360
Index
tables 85
listing 275
numbering 275
placing 275
scaling 307
tabulate 85, 232
tabulation 78
testing 25
TEX 7
version 14
TEXexec 12
mode 26
TEXutil 12
theses 225
titles 170, 174
alternatives 181
margins 73
topspace 30
translate 166
357
typed text 122
typewriter 113, 115
typing 122
typography 111
u
underline 257
v
verbatim 122
verbatim text 122
vertical spacing 68
w
whitespacing 63
word spacing 72
B
361
B
362
Commands
359
Commands
The pagenumbers refer to the chapter or paragraph that describes the command.
\abbreviation 200
\about 208
\adaptlayout 30
\at 208
\atpage 208
\background
\bbox 104
\beginblock
\blackrule
\blackrules
\blank 68
\but 235
150
287
271
271
\CAP 119
\Cap 119
\cap 119
\Caps 119
\cbox 104
\chapter 170
\characters 119
\color 141
\colorvalue 145
\column 78
\comparecolorgroup 145
\comparepalet 145
\completecombinedlist 187
\completelistoffloats 275
\completelistofsorts 203
\completelistofsynonyms 200
\completeregister 215
\components 20
\correctwhitespace 68
\coupledocument 174
\couplemarking 205
\coupleregister 215
\crlf 89
\currentdate 163
\currentname 234
\date 163
\de 159
\decouplemarking 205
\defineaccent 129
\defineblocks 287
\definebodyfont 126, 129
\definebodyfontenvironment
\definecasemap 129
\definecharacter 129
\definecolor 141
\definecolorgroup 145
\definecombinedlist 187
\definecommand 129
\definedescription 225
\definefloat 275
\definefont 129
\definefontsynonym 129
\defineframedtext 266
\definehead 170
\definelist 187
\definelogo 57
\definemakeup 106
C
129
C
363
360
Commands
\definemarking 205
\defineoverlay 154
\definepalet 145
\definepapersize 29
\defineparagraphs 81
\definereferenceformat 215
\defineregister 215
\definesorting 203
\definestyle 129
\definesynonyms 200
\definetext 95
\description 225
\disablemode 26
\doifmode 26
\doifmodeelse 26
\doifnotmode 26
\donttest 95
\em 118
\en 159
\enablembox 126
\enablemode 26
\enumeration 228
\enumeration 228
\environment 20
\externalfigure 299, 304
\fillinline 253
\fillinrules 253
\fixedspaces 72
\footnote 100
\fr 159
\framed 258
\getbuffer 296
\getmarking 205
\godown 68
\graycolor 145
\grayvalue 145
\grid 272
\hairline 251
\hbox 104
\head 235
\headnumber 174
\headtext 164
\hideblocks 287
\high 77
\hl 251
\in 208
\incrementname 234
\indentation 232
\indentation 232
\indenting 66
\inframed 258
\inleft 73
\inline 208
\inmarge 73
\inothermargin 73
\inright 73
\installlanguage 160
\item 235
\items 244
\its 235
\ix 113
\keepblocks 287
\label 234
\label 234
\labeltext 164
C
364
Commands
\lbox 104
\leftaligned 87
\loadsorts 203
\loadsynonyms 200
\logo 203
\lohi 77
\low 77
\overstrike 257
\overstrikes 257
\page 91
\pagenumber 93
\pagereference 208
\par 63
\paragraph 81
\paragraph 63
\part 170
\placecombinedlist 187
\placefloat 275
\placefootnotes 100
\placelist 187
\placelistoffloats 275
\placelistofsorts 203
\placelistofsynonyms 200
\placelocalfootnotes 100
\placelogos 57
\placeongrid 42
\placeontopofeachother 284
\placeregister 215
\placesidebyside 284
\processblocks 287
\product 20
\project 20
\mainlanguage 164
\mar 235
\marginrule 270
\margintext 73
\marking 205
\mf 126
\midaligned 87
\momarking 170
\moveongrid 42
\name 225, 228, 232
\nextname 228, 234
\nextregister 215
\nextsection 181
\nextsubname 228
\nextsubsubname 228
\nl 159
\nocap 119
\noheadersandfooterlines
\noindenting 66
\nolist 170, 187
\nop 235
\nospace 72
\note 100
\notopandbottomlines 95
\nowhitespace 68
\numberofsubpages 93
361
95
\quotation 246
\quote 246
\ran 235
\rbox 104
\ref 208
\reference 208
\register 215
\reservefloat 275
C
365
362
Commands
\reset 287
\resetmarking 205
\resetname 228, 234
\rightaligned 87
\sbox 104
\section 170
\seeregister 215
\selectblocks 287
\setnostrut 73
\setstrut 73
\setupalign 87
\setuparrangin 48
\setupbackground 150
\setupbackgrounds 152
\setupblackrules 271
\setupblank 68
\setupblock 287
\setupbodyfont 113
\setupbodyfontenvironment 129
\setupbottom 95
\setupbottomtexts 95
\setupbuffer 296
\setupcapitals 119
\setupcaptions 275
\setupcolors 141
\setupcolumns 78
\setupcombinations 284
\setupcombinedlist 187
\setupdescriptions 225
\setupenumerations 228
\setupexternalfigures 299
\setupfillinline 253
\setupfillinrules 253
\setupfloats 275
\setupfloats 275
\setupfooter 95
\setupfootertexts 95
\setupfootnotes 100
\setupframedin 258
\setupframedtexts 266
\setuphead 174
\setupheader 95
\setupheadertexts 95
\setupheadnumber 174
\setupheads 174
\setupheadtext 164
\setuphyphenmark 166
\setupindentations 232
\setupindenting 66
\setupinmargin 73
\setupinterlinespace 63
\setupitemize 235
\setupitems 244
\setuplabeltext 164
\setuplanguage 160
\setuplayout 30
\setuplinenumbering 89
\setuplines 89
\setuplist 187
\setupmakeup 106
\setupmarginblocks 294
\setupmarginrule 270
\setupmarking 205
\setupnarrower 66
\setupoutput 26
\setuppagenumbering 93
\setuppagesubnumbering 93
\setuppalet 145
\setuppapersize 29
\setupparagraphs 81
\setupquotation 246
C
366
Commands
\setupreferencing 208
\setupregister 215
\setupscreens 150
\setupsorting 203
\setupspacing 72
\setupsynonyms 200
\setuptext 95
\setuptextruleen 255
\setuptexttexts 95
\setupthinrules 251
\setuptolerance 87
\setuptop 95
\setuptoptexts 95
\setuptype 122
\setuptyping 122
\setupwhitespace 68
\showbodyfontenvironment 129
\showcolor 141
\showcolorgroup 145
\showexternalfigures 304
\showframe 30
\showgrid 42
\showlayout 30
\showpalet 145
\showprint 45
\showsetups 30
\showstruts 73
\someline 208
\somwhere 208
\sorteer 203
\sp 159
\space 72
\startalignment 87
\startappendices 180
\startbackground 150
\startbodypart 180
363
\startbuffer 296
\startcolor 141
\startcolumns 78
\startcombination 284
\startcomponent 20
\startdescription 225
\startencoding 129
\startenumeration 228
\startenvironment 20
\startextroductions 180
\startfloattext 275
\startframedtext 266
\starthiding 295
\startintroductions 180
\startitemize 235
\startline 208
\startlinecorrection 68
\startlinenumbering 89
\startlines 89
\startlocalenvironment 20
\startlocalfootnotes 100
\startmapping 129
\startmarginblock 294
\startmarginrule 270
\startmode 26
\startnamemakeup 106
\startnarrower 66
\startnotmode 26
\startopposite 294
\startpacked 68
\startparagraph 81
\startpostponing 295
\startproduct 20
\startproject 20
\startquotation 246
\startraster 150
C
367
364
Commands
\startregister 215
\startstandardmakeup 106
\starttabulate 85
\starttext 19
\starttyping 122
\strut 73
\sub 235
\subject 170
\subname 228
\subpagenumber 93
\subsection 170
\subsubject 170
\subsubname 228
\subsubsection 170
\subsubsubject 170
\subsubsubname 228
\switchtobodyfont 113
\sym 235
\synonym 200
\taal 159
\tbox 104
\tex 122
\textreference 208
\textrule 255
\thinrule 251
\thinrules 251
\title 170
\totalnumberofpages 93
\translate 166
\typ 122
\type 122
\typebuffer 296
\typefile 122
\underbar 257
\underbars 257
\useblocks 287
\useexternalfigure 299
\vbox 104
\version 25
\viii 113
\vl 251
\vtop 104
\whitespace 68
\Word 119
\Words 119
\WORDS 119
\writebetweenlist 187
\writetolist 187
\writetoregister 215
\x 113
\xi 113
\xii 113
C
368
365
369
ConTEXt is a macropackage written in the typographic programming language
TEX. It offers the user a wide range of tools to typeset documents. Although
ConTEXt originally was written to facilitate the development of educational
documents, it can handle all kind of simple and complex forms of documentation.
Therefore ConTEXt is used for a wide range of documents, like books of technical
or more scolar nature, computer manuals, the often huge and complex quality
assurance manuals and technical manuals to machines, books of encyclopedian nature,
database(d) documents, and collections of documents that have common characteristics.
Reuse of sources, data--abstraction and structure is typical a job for ConTEXt.
Due to the nature of TEX, ConTEXt is well suited to process documents coded in a
medium--neutral way. Paper output as well as highly interactive screen documents are
both supported. There is a very complete support for pdf and the related technologies.
ConTEXt is avaliable ‘for free’. Apart from this reference manual, there
are manuals for starters in several languages. There are also documents that describe the basic functionality. There are example styles
as well as many examples of documents produced by ConTEXt.
for more information: www.pragma-ade.nl
370