The Jolly Writer
The Jolly Writer
The Jolly Writer
Scypress
6, rue de Versailles
78460 Chevreuse
The Jolly Writer
Joris van der Hoeven
Table of contents
PREFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.1 How to read this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.2 Making science beautiful . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.3 Structuring your documents . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.4 The joy of wysiwyg-ness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.5 TEXMACS as a structured editor . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.6 Towards a scientific office suite . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.7 Creating your own extensions . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.8 TEXMACS and (LA)TEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5
6 TABLE OF CONTENTS
BIBLIOGRAPHY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Preface
11
12 PREFACE
The name “GNU TEXMACS” is explained by the facts that TEXMACS is part of
the GNU project and that some initial inspiration was drawn from the (LA)TEX
systems [36, 38] and GNU EMACS [53]. However, it has become clear over
time that this choice of name was one of the biggest mistakes of the project.
Indeed, the name incorrectly suggests that TEXMACS is some kind of interface
to (LA)TEX. So let me stress once and for all: the current TEXMACS system is
completely independent from (LA)TEX. Of course, TEXMACS does provide con-
verters between its native format and LATEX.
As a free software, the development of TEXMACS has benefitted from the help of
a wide community of contributors around the globe. Particular thanks go to the
following main co-developers throughout the years: David ALLOUCHE, Miguel
DE BENITO DELGADO, Darcy CHEN, Andrey GROZIN, Massimiliano GUBINELLI,
Philippe JOYEZ, Grégoire LECERF, Henri LESOURD, François POULAIN, and
Denis RAUX. Further thanks go to the many other contributors and supporters;
see http://www.texmacs.org/tmweb/about/authors.en.html for a more
extensive list. I am indebted to Basile AUDOLY and Kostas OIKONOMOU for
their careful proofreading.
I also wish to express my gratitude to those who have provided financial sup-
port to the TEXMACS project: CNRS, CRI-TECH de Haute-Savoie, DIGITEO, Rennes
MÉTROPÔLE, SPRINGER-VERLAG, INRIA, Dan GRAYSON, and Christoph BENZ-
MUELLER.
TEXMACS is built on top of a lot of other software. The QT, GUILE, FREETYPE, and
HUMMUS libraries are particularly essential [47, 33, 63, 34]. Recent versions
integrate an increasing amount of artwork, such as the TEX Gyre fonts [32] (the
main font of this book is PAGELLA), various “Subtle Patterns” [61], more fonts
from DAFONT [9], and further freely available pictures from WIKIMEDIA [65].
Last but not least, I wish to thank SYLVIE, JUDITH, and NIELS for their support
and patience.
Chapter 1
Introduction
13
14 INTRODUCTION
ments of Style [55] or Fowler's Dictionary to Modern English Usage [14]. Besides
these classics, a few more recent style guides are Thomas and Turner's Clear
and Simple as the Truth: Writing Classic Prose [60] and Williams's Toward clarity
and grace [66]. The Cambridge Grammar of the English Language [31] is one of the
bibles on grammar, whereas Merriam-Webster's Dictionary of English Usage is
a dictionary that elevates words beyond the ordinary.
This book is organized as follows. The remainder of the present chapter is
devoted to a quick introduction to some of the main features of TEXMACS and its
design philosophy. The next chapter discusses the the graphical user interface.
These two chapters introduce the most important concepts and terminology,
so we recommend that you read them first. The other chapters are fairly inde-
pendent and organized by increasing order of difficulty.
Let us mention a few conventions that are followed throughout this book. We
use a sans serif font for menu entries: “you may create a new file using File
New”. Sometimes, clicking on a menu button will open a new popup window
in which you have to click on yet another series of buttons. The menu notation
naturally extends to this case, as in Edit Preferences Convert Pdf.
We use boxes such as ⌘⇧x and - > for keyboard shortcuts. The first
example ⌘⇧x corresponds to simultaneously pressing the modifier keys
⌘ (meta) and ⇧ (shift) together with the letter x . In the second example - > ,
you first have to press and release the - key and next press and release
the > key. For more information, we refer to section 2.3.1.
Notice that the default behavior of the menus and keyboard depends on your
operating system. Indeed, TEXMACS attempts to follow the same conventions as
the other programs on your computer, and these conventions may vary with
your operating system. The default behavior can be overridden by selecting
another “look and feel” in the user preferences (Edit Preferences General).
The keyboard shortcuts in this book hold for the EMACS look and feel on MAC
computers. That said, many of them work for all look and feels, up to minor
prefix adjustments. See section 2.3.6 for more details.
Modern word processors have made it easy for just about anyone to create
nice-looking documents. Yet, there exists a difference between “nice” and
“beautiful”. A few decades ago, typesetting books was the job of professionals.
Whereas most of the typesetting can nowadays be carried out automatically,
some design decisions still have to be made by humans. So let us step back
and ask ourselves what makes a document attractive.
Typography is a matter of technical craftsmanship. Although we might com-
pare it with architecture or the building of a bridge, typography does not
involve emotions, as do arts like poetry, painting, or literature.
1.2 MAKING SCIENCE BEAUTIFUL 15
How to put this into practice? When starting a new document, you will first
have to decide on the global layout, such as the page size, the extent of the
actual text, the number of columns, the main fonts, etc. Here are a few useful
rules:
• Do not make your paragraphs too wide, since wide paragraphs make it
harder for the eye to find the next line, and thereby cause fatigue for the
reader.
• Use fonts and a general layout that are well suited to the medium of
publication and to the intended purpose. For example, sans serif fonts
are more readable on a computer screen (so you might prefer them for
web pages and laptop presentations) but may look unprofessional on
paper.
To ease the choice of a general layout, TEXMACS offers document styles for various
purposes: you may select Document Style Article for writing an article, Doc-
ument Style Beamer for creating a laptop presentation, and so on. TEXMACS
also supports some of the most important styles used by publishing compa-
nies. For instance, Document Style Article Springer llncs can be used for
articles in Springer's series of “Lecture Notes on Computer Science”.
Style files rely on markup to map specific intentions of the author to appro-
priate layouts. For example, it is customary to use either an italic or a bold font
for important text. Such choices are made once and for all in the document
style and then consistently applied throughout the entire document. We will
return to this issue in the next section about document structure. For now, we
observe once again that the consistent use of a minimal number of fonts and
layouts is helpful in several ways: it allows the reader to stay focussed, without
getting distracted by incongruous design decisions; it eases navigation within
the document; and ideas can be transmitted through the mere use of appro-
priate typography.
16 INTRODUCTION
The same lines of thought also apply to the main text. Many authors put a lot
of effort into the science, some good will into the English spelling, and little
energy into punctuation and other typographic issues. Fortunately, profes-
sional typesetting systems such as (LA)TEX and TEXMACS have taken over a large
part of this task. However, despite sophisticated algorithms for spacing, line-
breaking, page-breaking, positioning individual characters, etc., they occasion-
ally require some human assistance.
Basic punctuation rules specify that you enter a space after a period “.” at the
end of a sentence, before starting a new one. If you correctly apply this rule,
then TEXMACS will understand your intent and use this during the typesetting
process (for instance, the space between two sentences will be slightly larger
than between two ordinary words). Although TEXMACS does not forbid you to
omit spaces after periods, it will fail to do the typesetting correctly if you break
basic punctuation rules.
Explicit human intervention is typically required when using periods “.” for
other purposes, such as decimal dots, or inside abbreviations. Note that the
space after an abbreviation is somewhat smaller than after the final period
of a sentence. By identifying abbreviations through the use of appropriate
markup, you may help TEXMACS to get the typesetting right.
Punctuation, typography, and even spelling are often perceived as dull and
unimportant details. Please keep in mind that some of your readers might
even if you don't. Your sloppiness may easily irritate or confuse others and lead
to ambiguities or even errors. The good news is that it requires only minimal
awareness and discipline to do things right in the first place. Furthermore,
TEXMACS will do a big part of the job for you, as long as you follow a few basic
rules. In sections 3.1 and 3.7, we will come back to these issues in more detail.
The rendering of a document usually reflects its structure, which makes it nat-
ural to edit structured documents in a wysiwyg manner. For instance, it is
likely that a short line, typeset using a bold 17 point font, and starting with
a number, is always a section title. However, some of the structure may not
directly be apparent: from the mere rendering of
n
n
= 2 n, (1.1)
k
k=0
Using Focus Preferences Edit macro you may then edit the macro defini-
tion that specifies the rendering of the binom tag. You may also inspect the
style package in which the binom tag is defined, using Focus Preferences Edit
source. Through trial and error, this allows you to progressively learn how to
write more and more sophisticated style packages by yourself.
who really want to manipulate TEXMACS documents as text files, we offer sev-
eral plain text formats, such as XML, SCHEME expressions, etc. The syntax of
these formats is systematic and well-defined, contrary to (LA)TEX.
In summary, the most annoying drawbacks of early wysiwyg text editors have
been addressed in TEXMACS through the implementation of various, occasion-
ally novel, ideas. The further advantages of wysiwyg editors become most
apparent for two dimensional layouts. For example, consider a table or a matrix.
In TEXMACS, it is easy to insert a new column using a keyboard shortcut ( ⌥←
or ⌥→ ), the menus, or the toolbars. In (LA)TEX or HTML, this requires you to
modify every individual row of the table. Technical pictures are an even more
convincing example. The original LATEX picture environment invites you to
enter the coordinates of each individual component. No wonder that (LA)TEX
eliminated pictures from mathematical textbooks more surely than the BOUR-
BAKI movement did!
x 2| x
=1 + 3. (1.2)
y y
The current focus is highlighted using a cyan box, whereas the grey boxes cor-
respond to the other tags that contain the current cursor at higher levels.
The entries in the Focus menu allow you to directly perform editing opera-
tions on the current focus. For instance, in the example (1.2), the superscript
can be turned into a subscript using Focus Superscript Subscript or the key-
board shortcut ⌃⇥ . You may also jump to the next and previous scripts inside
the document using Focus Next similar and Focus Previous similar (or ⌃⇟
and ⌃⇞ ), or obtain contextual help on the “superscript” tag rsup using Focus
Describe. See sections 2.7 and 10.5–10.7 for more details.
The document structure is also taken into account for several common editing
operations. For example, when searching “a” inside a mathematical formula,
TEXMACS will only search for the symbol “a” inside other mathematical for-
mulas. If you were editing a (LA)TEX source file, then such a search would
typically result in many parasite non-mathematical “a” hits inside the main
1.6 TOWARDS A SCIENTIFIC OFFICE SUITE 21
text. Using the TEXMACS search facility, it is even possible to find text in a struc-
x
tured way (see section 10.2). For instance, when searching for , you will find
any fraction in which x occurs in the numerator, such as
x 1+x 1 + √x
, , ,....
y 1+y 1 − √x
The technical picture editor is another extremely useful tool in the TEXMACS
office suite. Although the tool is not as complete as dedicated editors for scal-
able vector graphics, it is well suited for simple images. One important advan-
tage is that the tool is fully integrated, which makes it easy to put formulas
or hyperlinks inside your pictures. Of course, it remains possible to embed
pictures that were made using another tool into your documents. The tech-
nical picture editor is presented in detail in chapter 8.
A few decades ago, scientific presentations at conferences were done on a black-
board or using slides on an overhead projector. Nowadays, it is most common
to directly project the screen of your laptop using a beamer. TEXMACS con-
tains special markup for creating such laptop presentations, allowing you to
progressively uncover content, play simple animations and sounds, compose
complex overlays, etc. Various standard themes can be used for the general
appearance and it is easy to add your own ones using the style package mech-
anism. It should be stressed that TEXMACS presentations are very dynamic:
you may add new content or make corrections during your show. Computer
algebra sessions can also be replayed in real time. See chapter 9 for more infor-
mation about the presentation tool.
Recent developments aim at making TEXMACS more “web-aware”. Indeed,
when coauthoring papers with several people, it is fashionable to create a cen-
tral repository on the web from where such papers are accessible to everyone
and where to keep a record of all successive versions. SVN [6, 7] and GIT [62,
51] are well known versioning tools that allow you to accomplish this task.
TEXMACS comes with an interface for SVN, and a special mode for going through
the differences between various versions. Future plans exist for a centrally
available TEXMACS server, with many other features beyond mere file sharing
and version control.
board shortcuts, and most elements of the graphical interface are programmed
in SCHEME. Besides, certain TEXMACS macros may occasionally call SCHEME
routines for computing their rendering. The last chapter 14 of this book con-
tains an introduction to SCHEME programming for TEXMACS.
TEXMACS offers one more extension mechanism, which is also used for the
creation of interfaces with external software. A TEXMACS plug-in consists of
a directory with a collection of various files: TEXMACS style files and packages as
above, SCHEME files with customizations or extensions of the editor, TEXMACS
files with useful documentation, and any other files of interest, such as com-
munication scripts with external programs. TEXMACS plug-ins can easily be
shared among users and it suffices to put them at a dedicated place in order
to activate them. For more details, we refer to the integrated documentation
in Help Interfacing.
25
26 THE USER INTERFACE
• The focus toolbar contains icons that depend on the current focus. This
toolbar frequently changes when moving your cursor around in a struc-
tured document. Most of the icons correspond to entries in the Focus
menu.
• The status bar contains useful information. The left footer generally shows
the current mode and font properties, whereas the right footer indicates
the structure at the current cursor position. The status bar is also used
for certain warnings, error messages and interactive input from the user.
• The search toolbar is not displayed by default, but gets activated when
starting a new search. The bar can be expanded into a separate window
by pushing the button and closed by pushing . The replace and
spell toolbars work in a similar way and it is likely that future versions of
TEXMACS will implement more and more toolbars of this kind.
Search toolbar
Status bar
Figure 2.1. The main TEXMACS window. On most computers, the menu bar is part of
the TEXMACS windows. Some operating systems such as MACOS rather display them
at the top of the screen.
28 THE USER INTERFACE
Not all icon toolbars are always visible. Their visibility can be controlled from
within the View menu. It is also useful to know that most of the icons on the
toolbars are self-explanatory: when keeping your mouse over the icon during
a second or so, a help balloon with a short description of its purpose will
appear. The help balloon also indicates an equivalent keyboard shortcut if
there exists one.
Keyboard shortcuts are combinations of keys that are pressed either concur-
rently or in a sequence. In the case when several keys are pressed at the same
time, all but one of the keys being pressed are so-called modifier keys. Such
modifier keys are somewhat larger than the other keys on your keyboard, so
your fingers can find them easily. TEXMACS uses four modifier keys: Shift ⇧ ,
Control ⌃ , Alternate ⌥ , and Meta ⌘ . Most keyboards contain Shift, Control
(or Ctrl), and Alternate (or Alt) keys. The “Meta” key usually carries another
name, which depends on your keyboard model and operating system. The
naming conventions for different keyboard models and operating systems are
summarized in Table 2.1.
Unfortunately, there are far more useful editing operations than keys on your
keyboard. This raises the question of how to associate keyboard shortcuts
to editing actions in a way that is easy to remember. TEXMACS achieves this
through a mixture of ideas.
Secondly, many editing operations are similar or at least share one common
characteristic. For instance, we may single out the class of “structured inser-
tions/removals”. TEXMACS attempts to group shortcuts for operations in such
a class together via a distinctive prefix, modifier key, or modifier key combi-
nation. Structured insertions and removals are assigned the common modifier
key ⌥ , with the consequence that you may insert a new column in a table or
a new argument in a list of bibliographic citations using ⌥← or ⌥→ . You may
also perform the corresponding removals of columns and citations using ⌥⌫
and ⌥⌦ .
30 THE USER INTERFACE
The next idea is based on the concept of “variants”. In the case of a list of sim-
ilar editing operations, you may use the Tab-key ⇥ to cycle among the different
variants. This mechanism is highly useful for entering mathematical symbols:
∈, ⊂, and ≺ are examples of variants of <, which are entered using < ⇥ , < ⇥ ⇥ ,
and < ⇥ ⇥ ⇥ . The variant mechanism is also used when several editing oper-
ations compete for the same key. For example, inside mathematics, we use
the keyboard shortcuts ^ and _ for entering superscripts and subscripts, as
does (LA)TEX. Inside text, these shortcuts rather insert the symbols “^” and
“_”, yet superscripts and subscripts can be obtained through the shortcuts ^ ⇥
and _ ⇥ . The Tab-key ⇥ is highly versatile: it is also used for “Tab-completion”
of words and the selection of the appropriate object in the graphical mode,
whenever ambiguities arise through superposition. The Tab-key also produces
interesting effects when combining it with modifier keys: ⇧⇥ allows you to
circle back, whereas ⌃⇥ is used for “structural variants” such as turning a the-
orem into a proposition.
There are a few other noteworthy mechanisms that are mode-specific. In math
mode, one such mechanism is “graphical concatenation”, which allows you to
type → using - > , ⟺ using < = = > , and ⩽ using < = . We refer to section 4.2
for further examples and tables with mathematical symbols. In text mode,
accented characters are formed using the ⌘ modifier key (e.g. ⌘' e yields “é”)
and special symbols are obtained using the prefix ⇧F5 (e.g. ⇧F5 s yields ß):
see section 3.1.
One should also be aware of the fact that the TEXMACS keyboard behavior is
highly contextual: it depends on the user preferences, the current mode, as
well as the current focus. For instance, inside “math mode”, you have spe-
cial keyboard shortcuts that are handy for typing mathematical formulas, but
which are useless in text mode. This allows for a substantial amount of over-
loading, in the sense that the same keyboard shortcuts serve different purposes
in different contexts. For example, after activating a computer algebra system
as a scripting language (using Document Scripts), you may use ⌃↩ in order to
evaluate a mathematical formula. When going through the differences between
two TEXMACS documents using the versioning tool, the same shortcut ⌃↩ is
rather used for retaining a selected version.
typing a LATEX or TEXMACS command, the left footer displays something like
At this stage, hitting the return-key ↩ will execute your command. For instance,
in math-mode, typing \ f r a c ↩ creates a fraction.
Technically speaking, TEXMACS first checks whether you typed a LATEX com-
mand. If your command is not recognized as a LATEX one, then TEXMACS looks
whether it is an existing TEXMACS command, macro argument or environment
variable (provided by the style file; see chapters 12 and 13). If so, the cor-
responding macro expansion, macro argument or environment variable is
inserted, with the right number of arguments. The \ key is always equivalent
to one of the more specific shortcuts ⌘i l (LATEX command), ⌘i c (TEXMACS
command), ⌘i a (macro argument), or ⌘i v (environment variable).
⌥ . TEXMACS shortcuts that may rely on the current editing mode. For
example, ⌥s produces strong text in text mode and a square root √ in
math mode.
⌘ . This modifier key is used in combination with arrow keys and certain
other special keys for positioning and resizing objects (see section 10.8).
Table 2.3. Common prefix rule correspondences for different look and feels. Recall that
the shortcuts in this book correspond to the EMACS look and feel.
⇧F5 . This prefix can be used in combination with normal letters for the inser-
tion of special symbols. For example, ⇧F5 s yields ß and ⇧F5 a yields ⨿.
The ⇧F5 prefix is also used for the insertion of “literal characters”. For
instance, ⇧F5 \ will always produce the \ character, whereas the \ key
is used for entering hybrid commands.
If you are using a different computer or look and feel, then some of these prefix
rules may change: see Table 2.3.
On certain keyboards, important modifier keys such as the “Meta” key (or
a substitute) are sometimes missing, or reserved for other purposes. For
instance, ⌥ -based shortcuts are used for entering accented characters and
common special symbols under MACOS. Certain important TEXMACS keyboard
shortcuts can also be superseded by shortcuts from the operating system. For
example, the MACOS application SPACES uses the shortcuts ⌃← , ⌃→ , ⌃↑ , ⌃↓ ,
⌃1 , ⌃2 , ⌃3 , and ⌃4 to switch between multiple screens.
One solution to the second problem is to change the problematic global short-
cuts that got overridden in the responsible applications. For example, SPACES
can be configured to use ⌘⌥⌃ as a prefix instead of ⌃ (click on the popup menu
behind “To switch between spaces” and simultaneously press ⌘ , ⌥ , and ⌃ ).
Notice that fn is another key that is not used by TEXMACS.
Table 2.4. Keyboard shortcuts for modifier keys or modifier key combinations. Recall that
the shortcuts in this book correspond to the EMACS look and feel.
• The Insert menu is mode-dependent and used for the insertion of struc-
tural markup. In text mode, it allows you for example to insert section
titles, theorems, numbered lists, emphasized text, etc. In math mode, it
allows you to insert fractions, wide accents, matrices, etc.
• The Focus menu corresponds to editing operations that act on the cur-
rent focus; see section 2.7. Assuming that your cursor is inside a section
title, it allows you to transform the section into a subsection, to toggle
the numbering, to jump to other sections, etc.
• The Document menu allows you to specify the global properties of your
document, such as its style and language, the page size and color, the
main font, metadata, etc.
• The View menu is used for controlling the presentation of the TEXMACS
windows. It specifies which toolbars are visible and the zoom factor
that is applied to your document. It also allows you to enter and leave
presentation mode.
• The Go menu allows you to change the document that is visible in the
main window. Its Back and Forward entries can be used for browsing
a collection of TEXMACS files, such as the built-in documentation.
Figure 2.2. The dialogue window for changing the layout of paragraphs.
operation system, but you are free to choose another “look and feel”.
You may also choose the Emacs look and feel in order to enable many
of the GNU EMACS keyboard bindings.
TEXMACS offers a wide range of features. The main mechanism through which
only the most relevant functionalities in a given context are exposed to the
user is based on the concept of current focus. Recall that TEXMACS documents
are structured. At a given cursor position, we find ourselves inside a list of
structures (also called tags or markup elements), ordered from innermost to out-
ermost. For instance, assume that our cursor is behind the “w” of “brown”
inside the following quotation:
Then we are inside two structures: a change of color into brown and a quota-
tion. TEXMACS displays this information in the right footer. It also indicates the
innermost structure through a cyan box and all other surrounding structures
through light grey boxes. The innermost structure at the current cursor posi-
tion is called the current focus.
38 THE USER INTERFACE
Remark. When selecting text, the current focus rather becomes the innermost
structure that contains the selection. Here it is useful to know that the ⌃␣
keyboard shortcut enlarges the current selection to its surrounding structure.
Through the repeated use of this shortcut, any of the tags that contain the
cursor can thus be selected efficiently and act as the focus tag.
The main editing operations that correspond to the current focus are accessible
through the Focus menu and the focus toolbar. The items in this menu and on
this toolbar are highly context-dependent by design. Whenever appropriate,
they allow you to perform the following types of actions:
Navigation. The icons , , , and (which correspond to the menu
entries First similar, Previous similar, Next similar, and Last similar) can
be used for jumping to similar tags in your document. Assuming that
you are inside a theorem, clicking on will for example bring your
cursor to the next theorem, proposition, lemma or corollary.
Insertion and removal. Certain tags (such as bibliographic citations,
“switches” in presentations, tables, etc.) admit a variable number of
arguments. Using the icons and (or the menu items Insert argu-
ment before and Insert argument after), you may add new arguments.
Similarly, and (or Remove argument before and Remove argument
after) can be used for the removal of arguments. In the case of tables, the
above icons (or menu entries) can be used for the insertion and removal
of columns. In addition, you may use , , , and for the inser-
tion and removal of rows.
Variants. Certain tags admit variants or alternative states. Theorems can
be numbered or not for example and they behave much alike proposi-
tions, lemmas and corollaries. Other markup elements can be folded or
unfolded (this is useful for presentations and exercises). Now the focus
menu and toolbar always indicate the name of the tag that corresponds
to the current focus. If this tag has interesting variants, then a submenu
with the list of variants is proposed under its name. Similarly, the icons
, , , and can be used to toggle the numbering or state of the tag,
whenever applicable.
Exit. The icons and (or Exit left and Exit right) can be used in order to
exit the focus tag at the left or the right.
Destroy. The focus tag can be destroyed using , Delete or ⌃⌫ . More pre-
cisely, the tag and its arguments will be replaced by the argument that
contains the cursor.
Customize. The presentation of the focus tag can be customized via
or Preferences. Notice that customizations of this kind will act on the
style properties and preamble of your document and not on the user
preferences, strictly speaking. In other words, alternative settings will
only impact on the document that you are editing and not on any other
2.7 THE CURRENT FOCUS 39
documents that you may open in the future. The following types of
customizations are most common:
• Some tags come with one or more style options that correspond
to customized renderings through the use of special style pack-
ages. For example, theorems may be told to use an alternative
“European numbering style” using Focus Preferences Euro-
pean numbering style.
Arguments. Certain tags come with one or more “hidden” arguments that
are invisible in the document itself and therefore require special mech-
anisms for being edited. Typical examples of hidden arguments are the
color “brown” in the example at the beginning of this section or the
names of labels and references. In many cases, such hidden arguments
are short names, colors or lengths, that can be edited via extra input
fields on the focus toolbar. In general, tags with hidden arguments can
be deactivated and reactivated using or Show hidden. Alternatively,
you may place the cursor just behind the tag and press ⌫ in order to
deactivate it. After editing the hidden arguments, you may reactivate
the tag using ↩ .
In the case when the current cursor is not inside any particular tag, the current
focus is on the whole document. This happens for instance when the cursor is
at the extreme top-left position in the document. Some of the most important
entries of the Document menu are then exposed more directly on the focus
toolbar:
Style. On the extreme left, you may specify the style of your document,
and select any additional style packages to be used. We recall that style
packages that are really style options for particular tags should rather
be specified via the Focus Preferences menus for these tags.
40 THE USER INTERFACE
Page style. The current page size is indicated on the focus bar and can be
modified. Similarly, the orientation and number of columns are indi-
cated through one of the icons , , , , , or . These settings can
also be changed by clicking on the displayed icon.
The default page rendering mode is Paper, which corresponds to the
way your document will be printed. However, in this mode, the posi-
tions of page breaks may heavily change while you are typing, which
can be annoying. This can be avoided by using the alternative Papyrus
mode, in which your document is displayed on a single page of fixed
width and flexible height. The Papyrus mode also allows for faster type-
setting, which makes the editor more responsive when your document
gets large.
Font. The main document font and its size are indicated and can be mod-
ified from the focus bar. The proposed main fonts are on a restricted
shortlist of fonts that are particularly well supported by TEXMACS.
Language. The icon with the little flag indicates the main document lan-
guage. This language is used by the typesetter for punctuation and
hyphenation of words. It is also relevant for the spell checker.
Section. If your document contains several sections, then the focus bar also
indicates the current section. By clicking on it, a list with all sections
appears, which allows you to jump to any other section inside the doc-
ument.
• In the Help Manual menu, you find the main documentation about how
to use TEXMACS. The manual is quite complete, but not very detailed.
2.8 FINDING DOCUMENTATION 41
• In the Help Reference guide menu, you find more detailed documenta-
tion about the TEXMACS format, its primitives and environment variables,
and the standard style files.
• TEXMACS plug-ins may (or may not) include documentation. Any avail-
able auto-documentation of this kind is made available through the
Help Plug-ins menu.
• The Help About menu contains more information about TEXMACS, like
information about its authors, how to contact us, and changes in dif-
ferent versions of the program.
Special symbols
TEXMACS reserves the \ , $ , and " keys for entering special commands, mathe-
matical formulas, and quotes. The literal symbols \, $, and " can be produced
using the shortcuts ⇧F5 \ , ⇧F5 $ , and ⇧F5 " , or alternatively using \ ⇥ , $ ⇥ ,
and " ⇥ . The ⇧F5 keyboard prefix is also used for entering other special sym-
bols; see Table 3.1.
Punctuation
TEXMACS assumes that you are familiar with basic punctuation rules for the
language you are writing in. English rules stipulate that each of the principal
punctuation symbols
. , : ; ! ?
should be followed by a space, except at the end of a paragraph, but not pre-
ceded by any spaces. French rules on the contrary require you to also put
a space before these symbols, except for periods and commas.
42
3.1 TYPING ORDINARY TEXT 43
Shortcuts
⇧F5 a æ ⇧F5 A Æ ⇧F5 a e æ ⇧F5 A E Æ
⇧F5 o ø ⇧F5 O Ø ⇧F5 o e œ ⇧F5 O E Œ
⇧F5 s ß ⇧F5 S S
⇧F5 ! ¡ ⇧F5 ? ¿ ⇧F5 p § ⇧F5 P £
Table 3.1. Typing special characters using the ⇧F5 keyboard prefix.
Whitespace
negative space xy \ ! ↩
no space xy
tiny space xy \ , ↩
small space x y \ : ↩
thin space x y \ ; ↩
normal space x y ␣
quad space x y ␣ ⇥ ⇥ or \ q u a d ↩
double quad space x y \q q u a d ↩
There are a few exceptional cases that require additional care. The period
sign is also used inside abbreviations, for example, in which case it should
be followed by a normal space (instead of the slightly larger space between
sentences). We recommend that you systematically “tag” abbreviations using
Insert Content tag Abbreviation or the keyboard shortcut ⌥a . This in par-
ticular allows TEXMACS to adjust the spacing.
Whitespace
It is generally a bad idea to insert several spaces in a row, just for the visual
effect of obtaining a somewhat larger space. In the case when you need an
explicit whitespace of, say, one inch, you should rather use Format White-
space Rigid and enter 1 in at the prompt. Certain amounts of whitespace are
very common for tweaking the presentation of text; see Table 3.2 for some
useful shortcuts to this effect. For more details about horizontal whitespace,
we refer to section 7.5.1.
44 READY, STEADY, GO!
Shortcuts
` ‘ ' ’
` ` “ '' ”
< ⇥ ‹ >⇥ ›
< < « >> »
⇧F5 " " , , „
Table 3.3. Keyboard shortcuts for specific quotes.
TEXMACS provides three types of hyphens and dashes (namely -, –, and —),
which are entered using the shortcuts - , - - , and - - - . The shortest ones,
called hyphens, are used for hyphenation and in order to join words (e.g. high-
school teacher, Marie Skłodowska-Curie, etc.). So-called en dashes (–) are typ-
ically used for ranges (see pages 256–65536), relations, and connections (the
Stone–Weierstrass theorem). The longest em dashes (—) mostly serve as sub-
stitutes for parentheses or colons (Archimedes—the great scientist—is also
known for letting his bath overflow). TEXMACS finally provides a non-breaking
hyphen after which line breaks are forbidden; you may enter this character
using - ⇥ .
Quotes
When you press the " key, an appropriate opening or closing quote will be
inserted. The quote character is chosen according to the current language and
the surrounding text. If the default quoting style is not appropriate for some
reason, then you can change it in Edit Preferences Keyboard Automatic quotes.
You can also insert specific quotes using the keyboard shortcuts in Table 3.3.
In most languages, opening quotes are preceded but not followed by a space,
whereas closing quotes are followed but not preceded by one. The French
use a thin space after opening guillemets « and before closing ones ». The
spacing may need to be adjusted for nested quotations, such as “Archimedes
exclaimed ‘Eureka!’ ”. In order to detach the single nested closing quote from
the surrounding double closing quote, we manually inserted a small space
using \ ; ↩ .
3.1 TYPING ORDINARY TEXT 45
Font ‘ ’ ‘ ‘ ’ ’ ‘ ⇥ ’ ⇥ " ⇥
TEXMACS Computer Modern ‘ ’ ` ' "
TEX Gyre Termes (Times) ‘ ’ “ ” ` ' "
TEX Gyre Pagella (Palatino) ‘ ’ “ ” ` ' "
DejaVu ‘ ’ “ ” ` ' "
Table 3.4. Rendering of simple quotes, double quotes, backquotes, apostrophes, and quo-
tation marks in various fonts.
The single quotes ‘ ’ and the double closing quotes ” are easily confused with
the backquote `, the ambidextrous apostrophe ' and the ambidextrous quota-
tion mark ". Older fonts may even display some of these symbols in the same
way, whereas modern UNICODE fonts tend to propose different glyphs (see
Table 3.4). “Genuine” single and double quotes are used for quotations in ordi-
nary text; they can for instance be entered using the natural shortcuts ‘ , ’ ,
‘ ‘ , and ’ ’ , as explained above. The quotation mark ", the apostrophe ', and
the backquote ` are important for programmers, who tend to use notations
like "Hello world" or 'Hello world' for representing textual string data;
you may enter them using ‘ ⇥ , ’ ⇥ , and " ⇥ . Notice that the keyboard short-
cuts are “reversed” inside computer programs (e.g. " produces the quotation
mark ", whereas " ⇥ produces ”).
Line breaking
Ordinary text is built up from paragraphs, each of which contain one or more
sentences. Most paragraphs do not fit on a single line, so TEXMACS automati-
cally breaks them into several lines. Sometimes, you may wish to control more
precisely how this is done. There are several circumstances in which line breaks
should be avoided:
• After initials of names: do not break after “A.” in “A. Einstein”.
• After very short words: I personally tend to avoid breaks after single-
letter words such as the article “a”.
• Before references such as the number “3” in “Chapter 3”.
• Inside mathematical text, it is often considered bad taste to start a line
with a mathematical formula.
TEXMACS provides a special “non-breaking space” character that can be used
instead of an ordinary space in order to prevent line breaks at a specific posi-
tion. This character is entered using ␣ ⇥ and rendered on the screen using a
barely visible steel-blue hyphen. You may also prevent all line breaks inside
a selection of text by turning it into a “group” using Format Break Group
Horizontal or ⌘= .
that look nice at a time t. Indeed, as soon as you make further modifications
inside your text, change the document style, or export it to another format,
the nice looking break often becomes your worst possible choice.
Hyphenation
Long words may be hyphenated during the line breaking process. The hyphen-
ation rules are determined by the language in which you wrote your text (as
selected using Document Language or Insert Language).
For a given word, TEXMACS also allows you to explicitly specify its hyphen-
ation: select the word and use Format Hyphenate as. You will be prompted
for a hyphenation of the word. Just enter short dashes at the places where
hyphenations should be allowed.
In the past, typing foreign text on a computer was often a complex task, espe-
cially for languages with other alphabets or scripts, such as Russian or Chinese.
The UNICODE standard was designed to simplify this task and provide a “uni-
versal” computer alphabet for all known languages in the world. Nowadays,
most operating systems comply with this standard and provide built-in mech-
anisms for entering text in UNICODE format, while supporting a large number
of languages and keyboard models.
Note that you can set the text language for the whole document with Docu-
ment Language. It is also possible to select another language for a single word
or fragment of text using Insert Language. TEXMACS uses language informa-
tion for a variety of purposes, such as hyphenation, spell checking, available
keyboard shortcuts, punctuation and spacing rules, etc. It is also possible to
specify an alternative language for the graphical user interface in Edit Prefer-
ences General Language.
3.3 STARTING A NEW DOCUMENT 47
TEXMACS includes a few general purpose styles such as article, beamer, book,
Education exam and letter, as well as a selection of more specialized styles.
For example, in the menus Article and Book, you will find additional styles for
writing articles and books, implementing specific layouts that are required by
certain journals or publishers.
Assuming that you selected a document style such as “article” or “book”, the
next logical actions are to enter a title, the authors, an abstract, etc. Of course,
the precise kind of information you provide depends on the style: in the case
of an exam, you may wish to add the subject, the level, or the name of a class-
room; the title page of a laptop presentation typically becomes more attractive
if you add some artwork.
Let us detail how to enter title information in the case of an article. Such infor-
mation should be regarded as a block of data. The specific order and way in
which the data are presented is determined by the document style, although
TEXMACS provides a few options for customization.
You may use Insert Title Insert title in order to create a block with title infor-
mation. For a newly created document, you may also use the Title button on
the focus bar. The main data field of the title block is the title itself. Extra data
fields can be inserted from the Focus menu or the icon on the focus toolbar.
For instance, Focus Author allows you to insert one or more authors. You
may also specify the creation date of your document using Focus Date (arbi-
trary dates) or Focus Today (the current date). Miscellaneous fields with a
customized layout can be added using Focus Miscellaneous. For notes with
people to be thanked or grant information, you should rather use Focus Note.
Many document styles do not only display the title at the top of the first page:
often this information also shows up in the headers of individual pages. If
a title is very long, then this may cause the headers to run off the pages. In
such cases, you may specify an alternative running title using Focus Running
title. The same remark applies to the authors: if your paper has many authors,
then you should specify an abbreviated running author for page headers using
Focus Running author.
For each author that you enter using Focus Author, you provide additional
data via the items below Focus Author (alternatively you may use the icon
next to Author on the focus bar). Nowadays it is customary to provide an affil-
iation for the author (Focus Author Affiliation) as well as an email address
(Focus Author Email). Optionally, you may also wish to point to a homepage
(Focus Author Homepage).
Miscellaneous data fields and further notes can be inserted in a similar way as
for titles.
3.3 STARTING A NEW DOCUMENT 49
JAN KLAASSEN
Afdeling wiskunde
Katholieke Universiteit Tilburg
Email: [email protected]
Figure 3.1. Three ways to cluster title information: [1] none; [2] by affiliation; [3] maximal.
Notice that data fields need not be unique. You may for example specify more
than one affiliation or email address for an author, or attach several miscella-
neous data fields to the title.
50 READY, STEADY, GO!
Whenever several authors share the same affiliation, publishers may require
you to save space by factoring out such common information. TEXMACS can do
this automatically for you; the desired amount of “clustering” can be specified
using the following options in the menu on the focus bar:
The abstract of an article can be entered using Insert Title Abstract. This
action really inserts abstract blocks which are similar to the title blocks from
the previous section: besides the abstract itself, you may also insert several
metadata such as keywords and subject classifiers.
More precisely, with the current focus on the abstract, a list of keywords can
be entered using Focus Keywords: you start typing the first keyword and then
insert additional keywords using Focus Insert argument after or ⌥→ . Each topic
(mathematics, physics, computer science, etc.) admits its own specific subject
classification system. For example, mathematicians often use the A.M.S. sub-
ject classification (Focus A.M.S. subject class), whereas computer scientists
tend to prefer the A.C.M. computing class (Focus A.C.M. computing class).
In TEXMACS, we aim at supporting the most frequent classification schemes,
and new schemes can easily be added on request.
We notice that certain metadata can also be entered using Document Meta-
data. This alternative mechanism attaches the metadata even more directly to
the document. Currently, you may specify a title, an author, and a subject in
this way, while TEXMACS attempts to automatically determine as many fields
as possible. This kind of metadata is for instance used when exporting a doc-
ument as a PDF file.
Long documents are usually subdivided into chapters and/or sections (laptop
and slide presentations rather consist of a sequence of “screens” or slides). As
a structured text editor (see section 1.3), TEXMACS provides special markup for
sections. We recommend to use this markup and to refrain from manually
typesetting section titles using, say, a large underlined font.
3.5 QUOTATIONS AND PROMINENT STATEMENTS 51
New sections can be inserted using Insert Section or ⌥1 . There are different
levels of sections. At the top level, books are first subdivided into parts and
chapters. Articles and chapters of books are next subdivided into sections, sub-
sections and subsubsections. Smaller portions of text can finally be put into
paragraphs and subparagraphs. The level of a section can be changed a poste-
riori using the variant system. For instance, you may use ⌃⇥ in order to change
a section into subsection or a subsubsection into a paragraph.
Sections are numbered by default. You may toggle the numbering of indi-
vidual sections using ⌃# or the icon on the focus toolbar. Paragraphs and
subparagraphs form an exception: in most of the standard document styles
they are not numbered , but this default behavior can be overridden via Focus
Preferences Paragraph display numbers.
TEXMACS also provides an appendix tag for appendices at the end of a paper or
book. Appendices are numbered A, B, C, ... instead of 1, 2, 3, ... In a similar
vein, books may include a prologue (Insert Chapter Prologue) or epilogue
(Insert Chapter Epilogue).
There are a few special types of unnumbered sections (or chapters) for which
the content can be generated automatically: tables of contents, bibliographies,
indexes, glossaries, lists of figures, etc. The mechanisms for automatic content
generation will be explained in section 6.4.
There are many occasions on which a fragment of text needs to catch the eye.
Mathematicians like to state their theorems prominently, whereas literary writ-
ings may use a special layout for quotations or poetry. High school teachers
emphasize the most crucial parts of their courses inside frames. Being a struc-
tured editor, TEXMACS encourages you to use special markup in each of these
situations. This in particular guarantees a uniform layout.
The markup described in this section is mainly intended for text fragments
of medium length. In LATEX, such markup elements are called environments.
People with HTML [41] or XML [3] backgrounds prefer the terminology block
markup. In section 3.7 below, we focus on inline markup for shorter pieces of
52 READY, STEADY, GO!
3.5.1 Theorems
THEOREM 3.1. On a Turing machine with sufficiently many tapes, two n-digit num-
bers can be multiplied in time O(n log n).
Exercise 3.1. Show that the Euclidean division of a 2 n-digit integer by an n-digit one can also
be computed in time O(n log n).
Three environments for quotations and poetry have been adapted from LATEX
to TEXMACS. The first one, quote (Insert Prominent Quote), should be used for
one or more short, one-line, quotations.
Eureka! Archimedes
E = m c 2 Einstein
For longer quotations of more than one paragraph, you should rather use quo-
tation (Insert Prominent Quotation).
For poetry, you may use the verse tag (Insert Prominent Verse). The layout
is similar to quotations, but differs when it comes to line breaking. This is best
seen when making the paragraph artificially narrow:
The Insert Prominent menu also contains various items to single out portions
of text in a visually oriented way. First of all, you may change the alignment
of a block of text using Insert Prominent Left aligned, Insert Prominent Cen-
54 READY, STEADY, GO!
Left aligned
Centered
Right aligned
TEXMACS next provides a series of tags that allow you to surround a block of text
by vertical padding, horizontal lines, or a frame. These are illustrated below:
These tags are often used in conjunction with other ones. For instance, we used
quotations for each of the above examples in order to make clear where they
start and end.
The markup for padding, overlines, underlines, and frames comes with sev-
eral style options. The precise amount of padding can be changed via Focus
Above and Focus Below or directly on the focus toolbar. The default amount
of padding for all similar padded structures in your document can be speci-
fied using Focus Preferences Padding above and Focus Preferences Padding
below. For overlined and underlined structures, you may also change the
amount of space that separates the text from the lines. Framed boxes allow you
to specify a similar horizontal separation space, as well as a background color.
Ornaments (Insert Prominent Ornament) are a more general kind of frames
with even more bells and whistles. They are most convenient for laptop pre-
sentations, where you may use them for obtaining various graphical effects:
as follows:
• First item.
∘ A subitem.
∘ Another one.
• A final item.
The rendering of the default item tag depends on the level of nesting: the • item
tag for the outermost level, the ∘ item tag at the second level, and so on.
Numbered lists can be inserted using Insert Enumerate. Again, you may
optionally choose a specific numbering style. Here is an example of an enu-
meration that was started using Insert Enumerate Roman:
I. A first item.
The default numbering style again depends on the nesting level: at the outer-
most level, most styles use ordinary numbers. At the second level, it is common
to use lowercase letters, and so on.
Descriptive lists are started using Insert Description and they allow you to
describe a series of concepts:
Yet once more, TEXMACS proposes several presentation styles, some of which
are only appropriate if you know beforehand that the keys Gnu, Gnat, etc. are
sufficiently short.
Assuming that you are inside an item list, pressing ↩ automatically starts a
new item. If you need items that are several paragraphs long, then you can
use ⇧↩ in order to start a new paragraph. TEXMACS also allows you to turn
an unnumbered item list into a numbered one and vice versa, using the toggle
Focus Numbered or the icon on the focus toolbar. The default layout of lists
is rather spaced out. You may select a more compact rendering style using
Focus Preferences Compact Lists. The low-level style parameters that control
the spacing of icons can also be customized via the style preferences menu
Focus Preferences.
56 READY, STEADY, GO!
Table 3.7. Common content-based tags and how to obtain them via Insert Content tag.
Other presentation markup can be found in Insert Presentation tag: you may
use Underline, Overline, and Strike through for underlined, overlined, and
--crossed-out
-------------------------------------------- text, respectively. (Although underlining is a common way to
emphasize text in handwritten documents, we notice that this practice is con-
sidered bad taste for printed material.) Subscripts and superscripts as in 2 nd
can be obtained using Subscript and Superscript or the keyboard shortcuts _ ⇥
and ^ ⇥ . Using Pastel, Greyed, and Light, you may create translucent text with
various degrees of transparency. This feature is typically used for laptop pre-
sentations in order to anticipate upcoming content. The graphical effect is best
noticed when using colored text on background patterns.
3.8 Fonts
As we have discussed at length by now (see sections 1.3 and 3.7), traditional
typesetters tend to use special fonts only for specific, well-identified purposes.
Users are recommended to use the appropriate markup for these purposes,
rather than changing the font explicitly. Nevertheless, you may sometimes
wish to select a particular font yourself, or search for a font with certain char-
acteristics (e.g. a bold handwritten font).
In comparison with other non-structured text editors, this idea of font collections
is particularly important in TEXMACS. Indeed, assume that you have selected
one of your favorite fonts. Which font is TEXMACS supposed to use when you
start a mathematical formula, when a monospaced variant is needed for type-
setting a computer program, or when part of your document is written in an
exotic language? There are only a very limited number of fonts that allow you
to do all this. Examples include the Computer Modern [37] and Stix fonts [54],
as well as the TEX Gyre fonts Bonum, Pagella, Schola, Termes, and DejaVu [32].
The above discussion actually raises three main questions. First of all, how
to find those font collections that support a certain number of features (e.g.
all Cyrillic fonts with bold and italic variants)? Secondly, what to do if a cer-
tain feature is not available for the user's favorite font (e.g. typeset a computer
program using a font with no monospaced variant)? Finally, how to specify
separate fonts for specific tasks (one font for normal text, another one for bold
section titles, and yet another one for mathematical formulas)?
TEXMACS partially addresses these problems by maintaining a detailed font
database. This database contains more information about fonts than the fonts
themselves. For instance, TEXMACS is aware which fonts are sans serif, hand-
written, outlined, monospaced, etc. The database also contains more subtle
technical information about the general shape of the font (its boldness, aspect
ratio, slant, ascent, descent, etc.). In the case when a font with certain required
properties does not exist, this allows TEXMACS to search for the best available
proxy. The same mechanism applies when a particular character is missing
in a font.
The downside to the above approach is that part of the information in the data-
base needs to be entered manually. Although the database contains entries for
most of the standard fonts available under GNU/LINUX, MACOS, and WIN-
DOWS, it may not recognize any further fonts that you may have purchased or
installed on your system.
Another thing to keep in mind when using less common fonts is that TEXMACS
comes with only a limited number of preinstalled fonts, such as the Stix fonts,
the TeX Gyre fonts, and several fonts prefixed by “TeXmacs”. Documents
that only use these fonts will be rendered in the same way on different sys-
tems (assuming the versions of TEXMACS are identical). Any other fonts may be
replaced by closest available proxies according to the font database.
In TEXMACS, the global document font can be specified using Document Font.
It is also possible to locally use another font using Format Font. Both Doc-
ument Font and Format Font open the TEXMACS font browser, which looks
like the window in Figure 3.2. The standard way to indicate fonts is via their
Family, Style and Size (in points). In addition, TEXMACS provides several filters
that allow you to search for fonts that meet one or more criteria.
3.8 FONTS 59
In the example, we first selected the “Baskerville Regular” font. Using the Cate-
gory pop-up choice list on the right, we next searched for a font with a “Retro”
look and feel that combines as well as possible with the Baskerville font. The
header of the Sample text indicates that “Essays1743 Medium” is the best match
that we could find on our system. The standard sample text shows the ren-
dering of various characters in this font (other sample texts can be selected
instead from the choice list that indicates Standard). The Family frame lists all
“Retro” fonts that were found on our system. Since we did not select any of
these font families yet, the Style frame does not contain any corresponding
styles.
The easiest way to select a font is by clicking on a suitable family and then
press Ok. If you rather select your font by picking a style or by using a filter (as
in our example), then the semantics of font selection is slightly more subtle. For
instance, when clicking on Ok in Figure 3.2, TEXMACS will insert a tag inside the
document that asks for a “Retro” font. Since the surrounding text was typeset
using the “Baskerville Regular” font, any text that you will enter next will be
typeset using the “Essays1743 Medium” font, as indicated by the font selector;
so far so good. However, whenever you copy and paste the newly entered
text somewhere else, the appropriate “Retro” font for the surrounding text is
not necessarily “Essays1743 Medium”: TEXMACS might use another, more rel-
evant font instead.
60 READY, STEADY, GO!
Although the font selector is easy to use, it is more limited when it comes to
specifying a more precise fallback strategy in the case of missing fonts or char-
acters. For example, it does not allow you to specify one particular font for text
and another one for mathematics. TEXMACS provides a mechanism for building
composite of this type, which is beyond the scope of this book, and currently
only intended for expert users (if you are curious, then you may try Edit Pref-
erences Other Advanced font customization before opening the font selector).
Another way to force a particular font for, say, mathematics is to adapt the
math macro so as to use this font.
That said, we notice that TEXMACS is good at emulating mathematical sym-
bols for fonts that do not natively support them. For example, in case of the
Essays1743 font, the arrow ----› is obtained by juxtaposing two minus signs - and
the closing guillemet ›; we refer to [27] for more details.
Family. Fonts are grouped together into families with a similar design.
Shape. Inside the same font family, individual fonts have different shapes,
such as bold, italic, small capitals, etc.
The actual font files on your hard disk usually correspond to the font family
and the font shape; the font itself can automatically be scaled to any size.
The TEXMACS font database keeps track of several extra characteristics of fonts.
The font selector allows you to filter on the following criteria:
Stretch. This property determines the horizontal width for a fixed vertical
height:
Condensed Unextended Wide
Case. This property determines how lowercase letters are capitalized:
Mixed SMALL CAPITALS
Each of the above properties really constitutes a hint on the kind of font that
should be used. If no suitable font can be found on your particular system, then
setting these properties may have no effect.
Let us finally recall that the left footer of the TEXMACS window indicates some
of the most significant properties of the font being used at the current cursor
position. For instance, for a generic newly created document, it displays “text
roman 10”, which means that you are working in text mode using Knuth's 10
point Computer Modern “Roman” font [37].
At this point it is useful to say a few words about lengths in TEXMACS. Most
of the fields in the Format Paragraph dialogue window expect length values.
For instance, in order to indent every first line of a paragraph by a quarter of
an inch, you should enter 0.25 in as the value for Format Paragraph Basic
First indentation. A TEXMACS length consists of a number (e.g. 0.25) followed
by a unit (e.g. in). Apart from the standard units mm, cm, and in, TEXMACS
also provides several units of interest for typographers, such as pt (one point;
approximately 1/72 inch), fn (the current font size; e.g. 10 pt), or tab (a special
unit for indentations; by default, 1 tab equals 1.5 fn and the article style uses
a first indentation of 1 tab); see Table 3.9 for an overview.
The dialogue window Format Paragraph allows you to specify a few other
layout properties of paragraphs. The margins can be changed using Left margin
and Right margin. For instance, inside quotations (see section 3.5.2), both the
left and right margins are increased by 2 tab. The spacing between individual
lines is controlled via Interline space. By default, TEXMACS uses a small inter-
line space of 0.2 fn. A zero interline space makes ordinary text less readable,
but can be acceptable for computer programs, while stuffing as much code
The quick brown fox The quick brown fox The quick brown fox
jumps over the lazy jumps over the lazy
dog. The quick brown dog. The quick brown jumps over the lazy
fox jumps over the fox jumps over the
lazy dog. The quick dog. The quick brown
lazy dog. The quick
brown fox jumps
brown fox jumps fox jumps over the
over the lazy dog.
The quick brown fox over the lazy dog.
The quick brown fox lazy dog. The quick
jumps over the lazy
dog. jumps over the lazy brown fox jumps over
dog.
the lazy dog.
Figure 3.4. Illustration of three different interline spaces: 0 fn, 0.2 fn, and 1 fn.
The quick brown fox The quick brown fox The quick brown fox
jumps over the lazy jumps over the lazy dog.
Jumps over the lazy
dog. The quick brown fox
dog.
jumps over the lazy dog.
The quick brown fox
The quick fox The quick brown fox
jumps over the lazy
jumps over the lazy dog.
Jumps over dog. The quick
The quick brown fox
dogs. brown fox jumps
jumps over the lazy dog.
over the lazy dog.
The quick brown fox
jumps over the lazy
dog.
Figure 3.5. Effect of the markup elements indent, jump-in, and compact.
64 READY, STEADY, GO!
The default page layout is determined by the document style. You can cus-
tomize it using the dialogue window that is opened via Document Page. For
a newly created document, you may also change some of the settings using the
icon (or possibly , , , , or ) on the focus toolbar (see section 2.7).
In order to tweak the layout of a specific page, you should rather use Format
Page.
The main characteristics of a page are its size (most of the standard page
sizes—such as A4, A5, Letter, Legal, etc.—are supported by TEXMACS) and its
orientation (portrait or landscape). These properties can be specified via Doc-
ument Page Format Page type and Orientation.
• The paper rendering reflects the actual way your document will be
printed. Page breaks are made explicit by showing the pages separately,
one below another.
• The screen setting can be used if you do not intend to print your doc-
ument. The page width and height are automatically adjusted to the
size of your window. This is most useful when browsing web pages or
using TEXMACS as an interface for some computer algebra system.
The page breaking algorithm takes some time on large documents, which may
hamper the reactivity of the editor while typing. For this reason, we recom-
mend that you edit such documents in “papyrus” mode and only switch to
“paper” mode when your document is almost finished (e.g. in order to inspect
the page breaks).
3.1. For TEXMACS to be “truly wysiwyg”, you need to select the paper rendering mode and Docu-
ment Page Margins Same screen margins as on paper. However, since screens and paper are
different media, editing your document as if it were already printed is not always convenient. For
instance, page breaks may heavily change while you are typing, and thereby cause unpleasant
jumping around of the cursor. Sentences with page breaks may also become hard to read.
3.10 PAGE LAYOUT 65
Figure 3.6. Schematic representation of the typical layout of a book: the left margins are
larger than the right margins on the (even) left-hand pages, whereas they are smaller on
the (odd) right-hand pages.
The second most important decision about page layout concerns the margins;
these can be specified in the tab Document Page Margins. Remember that the
lines of your text should not be made too long, thereby keeping them easy to
read. On standard paper of A4 or Letter size, this can be achieved by using suf-
ficiently large margins or a larger font. Another option is to use a two column
layout. It is also interesting to know that printed books tend to use different
margins for odd and even pages: see Figure 3.6. Since margins on actual paper
can be quite large, you finally may wish to use different margins when editing
documents on your screen. In Document Page Margins, you are therefore
allowed to separately specify paper margins and screen margins (or force the
same settings for both using Same screen margins as on paper).
The remaining global settings for page layout are intended for more expert
users. In particular, it is recommended to not specify page headers and footers
through Document Page Headers, except when you selected the generic
document style. The reason is that title blocks and section titles often override
these settings, since the main title, the authors and titles of sections are typi-
cally used inside page headers.
On the other hand, it is safe to customize the headers and footers of a particular
page using Format Page This page header and This page footer. You may also
change the number of a particular page (and all the subsequent ones) using
Format Page This page number. You may finally change the way page num-
bers are rendered using Format Page Page number rendering.
Chapter 4
Mathematics
You enter math mode by starting a new formula or by placing the cursor inside
an existing formula. In math mode, the menus, the icon toolbars, and the key-
board behavior are adapted so as to facilitate the insertion of mathematical
symbols and markup. For instance, typing - > inserts the arrow →.
Recent versions of TEXMACS also include optional “semantic editing” facili-
ties that will briefly be described at the end of this chapter (see [26, 29] for
more details). When used appropriately, these allow you to write documents
in which all formulas are at least correct from a syntactical point of view.
A “syntax corrector” is included to assist you with this task. Syntactic correct-
ness is for instance important when using formulas as inputs for a computer
algebra system. Syntactically correct documents are also less likely to contain
“typos”. Further functionalities, such as semantic search and replace, should
be developed in the future.
66
4.2 MATHEMATICAL SYMBOLS 67
x + (−x) = 0
x+y = y+x
(x + y) + z = x + (y + z).
A similar layout is often required for step by step computations
(e sin x + sin e x)′ = (e sin x)′ + (sin e x)′
= (sin x)′ e sin x + (e x)′ sin e x
= e sin x cos x + e x sin e x,
in which case several left-hand members are simply left empty.
In order to create so-called equation arrays of this type, you may use ⌥& or
Insert Mathematics Several equations. The typesetter uses a table with three
columns for the rendering, where the first column is aligned to the right, the
third one to the left, and the middle column is centered. New rows are cre-
ated by pressing ↩ . In fact, since equation arrays are special forms of tables,
all table editing rules apply (see chapter 5). In a sense, they are also somewhat
superfluous: you may obtain the same layout by creating an appropriate ta-
ble inside a displayed formula. Nevertheless, equation arrays are so common
in mathematical documents that it is nice to have special markup for them.
𝛼 a ⇥ 𝛽 b ⇥ 𝛾 g ⇥ 𝛿 d ⇥ 𝜀 e ⇥ 𝜖 e ⇥ ⇥ ⇥
𝜁 z ⇥ 𝜂 h ⇥ 𝜃 j ⇥ 𝜗 j ⇥ ⇥ ⇥ 𝜄 i ⇥ 𝜅 k ⇥
𝜘 k ⇥ ⇥ 𝜆 l ⇥ 𝜇 m ⇥ 𝜈 n ⇥ 𝜉 x ⇥ 𝜊 o ⇥
𝜋 p ⇥ 𝜛 p ⇥ ⇥ ⇥ 𝜌 r ⇥ 𝜚 r ⇥ ⇥ 𝜎 s ⇥ 𝜍 s ⇥ ⇥
𝜏 t ⇥ 𝜐 u ⇥ 𝜑 f ⇥ 𝜙 f ⇥ ⇥ 𝜓 y ⇥ 𝜒 q ⇥
𝜔 w ⇥
Α A ⇥ Β B ⇥ Γ G ⇥ Δ D ⇥ Ε E ⇥ Ζ Z ⇥
Η H ⇥ Θ J ⇥ Ι I ⇥ Κ K ⇥ Λ L ⇥ Μ M ⇥
Ν N ⇥ Ξ X ⇥ Ο O ⇥ Π P ⇥ Ρ R ⇥ Σ S ⇥
Τ T ⇥ Υ U ⇥ Φ F ⇥ Ψ Y ⇥ Χ Q ⇥ Ω W ⇥
d d ⇥ ⇥ ∂ d ⇥ ⇥ ⇥ e e ⇥ ⇥ i i ⇥ ⇥
γ g ⇥ ⇥ λ l ⇥ ⇥ π p ⇥ ⇥ Γ G ⇥ ⇥ ⇥
ℏ h ⇥ ⇥ ı i ⇥ ⇥ ⇥ j j ⇥ ⇥ ℓ l ⇥ ⇥ ⇥
D D ⇥ ⇥ ∇ V ⇥ ⇥ Δ D ⇥ ⇥ ⇥ ⇥ ∞ @ @
ℜ R E ℑ I M ∁ C ⇥ ⇥ ⇥ ϝ G ⇥ ⇥ ⇥ ⇥
∀ A ⇥ ⇥ ∃ E ⇥ ⇥ ∃∃ E ⇥ ⇥ ⇥ ℘ P ⇥ ⇥
ℵ A ⇥ ⇥ ⇥ ℶ B ⇥ ⇥ ⇥ ℷ G ⇥ ⇥ ℸ D ⇥ ⇥ ⇥
Ε
϶ e ⇥ ⇥ ⇥ ⇥
ω w ⇥ ⇥ E ⇥ ⇥ ⇥ ⇥ ℧ W ⇥ ⇥
@ . This key is used for putting symbols into circles or boxes. For example,
@ + yields ⊕ and @ x yields ⊗. Similarly, @ ⇥ + yields ⊞.
/ . Slashes are used for negations. For example, = / yields ≠ and < = /
yields ⩽. Notice that < = ⇥ ⇥ / yields ≦
/ , whereas < = ⇥ ⇥ / ⇥ yields ≨.
! . After entering an arrow, this key forces scripts to be placed above or
below the
x
arrow. For example, - - > ^ x yields ⟶x , but - - > ! ^ x
yields ⟶.
Apart from these general rules, there are a few other shortcuts and facts that
are worth knowing:
⊕ @ + ⊖ @ - ⊗ @ * ⊘ @ / ⇥
⊙ @ . ⊚ @ @ ⇥ ~ @ * ⇥ ⊙ @ |
− −
⊞ @ ⇥ + ⊟ @ ⇥ - ⊠ @ ⇥ * − @ ⇥ /
− − −
−
⊡ @ ⇥ . ⧇ @ ⇥ @ −
∗ @ ⇥ * ⇥ − @ ⇥ |
−
−
−
−
− −
± + - ∓ - + × * ⇥ ÷ / ⇥ ⇥
∗ * ⇥ ⇥ ⋆ * ⇥ ⇥ ⇥ ⇥ ⇥ ∘ @ • @ ⇥ ⇥
∩ & ⇥ ∪ % ⇥ ⊎ % ⇥ + ⋅ * ⇥ ⇥ ⇥
⊓ & ⇥ ⇥ ⊔ % ⇥ ⇥ ∨ % ∧ &
⋎ % ⇥ ⇥ ⇥ ⇥ ⋏ & ⇥ ⇥ ⇥ ⇥ ⊻ % - ⌅ - &
⋉ | ⇥ * ⋊ * ⇥ ⇥ | ⋋ T ⇥ ⇥ ⇥ ⇥ ⋌ T ⇥ ⇥ ⇥ ⇥ ⇥
Table 4.3. Binary operators (see also Insert Symbol Binary operator).
. . The default dot stands for the decimal dot, as in 3.14159. The dot symbol
has several variants: the “point” operator from λ-calculus ( . ⇥ ) as in λx.
x 2, the “dummy” dot ⋅ ( . ⇥ ⇥ ) as in g = f (x, ⋅), and the invisible dummy
dot ( . ⇥ ⇥ ⇥ ).
Various kinds of ellipses . . ., ⋅ ⋅ ⋅, . . . , ⋅⋅⋅, ⋅ ⋅ ⋅ , and ⋅ ⋅ ⋅ can be obtained using
the shortcuts . . , . . ⇥ , etc. The “lower” ellipses should be used in
expressions such as x 1, . . . , x n and K[[x 1; . . . ; x n]], whereas the centered
ellipses should be preferred in x 1 + ⋅ ⋅ ⋅ + x n and x 1 ⋅ ⋅ ⋅ x n. Notice that
TEXMACS provides the additional shortcuts , , , + + , etc. for entering
“, . . . , ”, “+⋅ ⋅ ⋅ + ”, etc.
, . The comma most commonly serves as a separator, as in f (x, y, z) and
x 1,...,xn. Variants are the “decimal comma” (like in 3,14159), the invisible
comma (as in the matrix (M ij)), and various “wide invisible commas”,
as in the list of formulas
a1 = b1 a2 = b1 + b2 a3 = b 1 + b 2 + b 3.
& , % . The logical connectors ∧ and ∨ are obtained using & and % . The con-
junction ∧ has many variants (namely ∩, ⊓, , ⋏, &, ', and &), and so
does the conjunction ∨ (namely ∪, ⊔, ⨿, ⋎, ., /, ‰, and %). The literal
symbols & and % are obtained most efficiently through F5 & and F5 % .
Alternative shortcuts for ∧ and ∨ are / \ and \ / , with approximately
the same variants as above.
# . This key is used for the “number” prefix #, with variants ♯ and ♮. The
“flat” symbol ♭ can be obtained using b ⇥ ⇥ .
∼ ~ ≃ ~ - ≈ ~ ~ ≅ ~ =
≁ ~ / ≄ ~ - / ≉ ~ ~ / ≇ ~ = /
≍ = ⇥ ≡ = ⇥ ⇥ ≅ ~ = ∼
− = ⇥ ⇥ ⇥ ⇥
∼
≭ = ⇥ / ≢ = ⇥ ⇥ / ≇ ~ = / ∼
/
− = ⇥ ⇥ ⇥ ⇥ /
∼
≏ ~ - ⇥ ⇥ ≎ ~ ~ ⇥ ≗ @ = ≖ = @
∽ ~ ⇥ ⋍ ~ - ⇥ ∼ F6 ~ ≈ F6 ~ ~
≠ = / ∝ @ @ ⇥ ⇥ ≊ ~ ~ = ≜ @ = ⇥
Table 4.4. Equalities, similarities, and their negations (see also Insert Symbol Binary
relation).
Table 4.5. Comparison relations (see also Insert Symbol Binary relation).
∉ < ⇥ / ∌ > ⇥ /
≮ < / /
⩽ < = / ≰ < = ⇥ / ⪇ < = ⇥ / ⇥
≯ > / /
⩾ > = / ≱ > = ⇥ / ⪈ > = ⇥ / ⇥
≨ < = ⇥ ⇥ / ⇥ < < = ⇥ ⇥ / ⇥ ⇥ ⋦ < ~ / ⇥ ⪉ < ~ ~ / ⇥
=
− −
← < - ⇐ < = ⇥ ⇥ ⇥ ↼ / - ⇥ ↽ / - ⇥ ⇥
→ - > ⇒ = > ⇁ - / ⇥ ⇀ - / ⇥ ⇥
↔ < - > ⇔ < = > ⇋ < - - > ⇥ ⇥ ⇥ ⇌ - > < - ⇥
⇇ < - < - ↢ < - < ↩ < - | ⇥ ↞ < < -
⇉ - > - > ↣ > - > ↪ | - > ⇥ ↠ - > >
⇆ < - - > ⇥ ⇥ ⇄ - > < - ↦ | - >
↫ < - @ ↬ @ - > ↝ ~ > ↭ < ~ >
↑ < - ⇥ ↕ < - > ⇥ ⇑ = > ⇥ ⇥ ⇈ < - < - ⇥
↓ < - ⇥ ⇥ ⇕ < = > ⇥ ⇓ = > ⇥ ⇊ < - < - ⇥ ⇥
↿ / - ⇥ ⇥ ⇥ ⇥ ↾ / - ⇥ ⇥ ⇥ ↖ < - ⇥ ⇥ ⇥ ↗ - > ⇥ ⇥ ⇥ ⇥
⇃ / - ⇥ ⇥ ⇥ ⇥ ⇥ ⇂ / - ⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ↙ < - ⇥ ⇥ ⇥ ⇥ ↘ - > ⇥ ⇥ ⇥
⟹
⟼⟶
⟶⟼
¬ ! ⇥ ∅ @ / / @ ⇥ ⇥ ⇥ ⇥ 2 @ ⇥ ⇥ ⇥ ⇥ ⇥
∘ @ □ @ ⇥ • @ ⇥ ⇥ ■ @ ⇥ ⇥ ⇥
⊤ T ⇥ ⇥ ⊥ T ⇥ ⇥ ⇥ ⊢ | ⇥ - ⊣ - | ⇥
⊩ | | ⇥ - ⊪ | | | ⇥ - ⊨ | ⇥ =
♭ b ⇥ ⇥ ♯ # ⇥ ♮ # ⇥ ⇥
♦ < > ⇥ ♥ < > ⇥ ⇥ ♠ < > ⇥ ⇥ ⇥ ♣ < > ⇥ ⇥ ⇥ ⇥
... . . ⋅⋅⋅ . . ⇥ ... . . ⇥ ⇥
⋅⋅⋅ . . ⇥ ⇥ ⇥ ⋅⋅
⋅ . . ⇥ ⇥ ⇥ ⇥ ⋅⋅
⋅ . . ⇥ ⇥ ⇥ ⇥ ⇥
For certain symbols like ✠, it may not be clear how to obtain it using the system-
atic mechanisms described in this section. Since the symbol vaguely reminds
one of addition, you may take your chances and try all variants of +. If you
are unlucky, or if the symbol is so exotic (e.g. ♫) that it reminds you of nothing
at all, then you have several fall-back options:
System tools. Most operating systems integrate tools for visualizing UNI-
CODE characters and copy and paste them to other applications. For
example, MACOS integrates “Character Viewer” for this purpose.
LATEX names. If you know the LATEX name of the symbol, then you may
enter it using that name. For example, ♫ corresponds to the LATEX com-
mand \twonotes, so you may obtain this symbol via \ t w o n o t e s ↩ .
Internal TEXMACS names. Most mathematical symbols are internally
known under the same name as under LATEX. Symbols can directly be
entered using their TEXMACS name via the keyboard shortcut ⌃q . Hence
⌃q t w o n o t e s ↩ also produces ♫.
UNICODE numbers. You may also look up the UNICODE number of your
symbol inside UNICODE tables that you can find on the web. The
hexadecimal UNICODE number prefixed by # can also be used as an
internal TEXMACS name for the symbol. For example, the symbol ♫ cor-
responds to the UNICODE character 266B, so you may enter it by typing
⌃q # 2 6 6 B ↩ .
f ∘n = f ∘ .n×
..∘ f x = statlim x n.
n→∞
4.3 TWO-DIMENSIONAL MATHEMATICAL MARKUP 75
Primes. Single and double primes can be entered using the keys ' and " .
Primes behave much in the same way as superscripts, but it is slightly more
efficient to insert or remove them (compare entering a′ + b and a 2 + b using
a ' + b versus a ^ 2 → + b ). Using ` , you may also insert a “left backprime”,
as in ‵a.
There are various alternative types of primes, which can be obtained as vari-
ants: the primes in a‵, a ∗, a†, a ‡, and a 6 are entered using the shortcuts ' ⇥ ,
' ⇥ ⇥ , etc. You may for example write V ∗ for the dual of V and f † for the log-
arithmic derivative f ′/ f of a function f . Backprimes and double primes also
have several variants. For instance, you may enter V ∗∗ and 6a using V " ⇥ ⇥
and ` ⇧⇥ a .
Fractions. TEXMACS uses ⌥ as the principal modifier key for the insertion
of mathematical markup. You may for example insert a fraction using ⌥f
(or Insert Fraction). There are several kinds of fractions, which are listed in
Table 4.10. Alternatively, fractions may use a one-dimensional layout as in
a/b, 15 : 5, and 15 ÷ 3. The symbols /, :, and ÷ are obtained through / , / ⇥ ,
and / ⇥ ⇥ .
Square roots and n-th roots. You may enter a square root using ⌥s (or Insert
square root) and an n-th root using ⌥s ⇥ (or Insert N-th root). Hence, ⌥s x
yields √x and ⌥s ⇥ ← ← 3 yields 3√x .
The degree n of an n-th root can also be added a posteriori using ⌥→ . For example,
assume that your cursor is at the indicated position in x|. Then typing ⌥→
leads you to the state |√x . Conversely, pressing ⌫ in the latter situation will
remove the degree and bring you back to the original state.
Notice that the sqrt tag for square roots and n-th roots is an example of a tag
with a variable number of arguments (either one or two in this case). The
above keyboard shortcuts ⌥→ and ⌫ can be used more generally in such sit-
uations for the insertion and removal of arguments: see section 10.5.
76 MATHEMATICS
Ordinary text. Ordinary text can be inserted into a formula using ⌥$ or Insert
Text. This is what we did for the text “ is sufficiently large” below:
L = {x | x is sufficiently large}.
Negations. Some of the TEXMACS relation symbols do not admit any negated
versions. You may manually negate a symbol or a formula using ⌥n or Insert
Negation:
a ℛ b ⟺ ¬(a ℛ b).
∞
1 1
f (x) dx.
k=1
k2 0
The big integral signs has two variants, depending on where you want to place
subscripts and superscripts in display mode. By default, the scripts are placed
to the right:
∞ dx
.
0 1 + x2
can be obtained using the ! postfix, by typing ⇧F5 I ! . Some people also prefer
integrals to be rendered using an upright font. This gives rise to two further
variants. For instance, you may obtain the triple integral in
f (x, y, z) dx ∧ dy ∧ dz
V
using the shortcut ⇧F5 I I I ⇥ ⇥ ⇥ . We recall that it is good practice to enter the
d's of the differentials using d ⇥ ⇥ , so as to distinguish them from the letter d
in a + b + c + d. Similarly, the exterior product was entered using * & .
4.5 LARGE DELIMITERS 77
⇧F5 O ⇧F5 O O
h
⇧F5 V ⇧F5 V ⇥ ⇧F5 V ⇥ ⇥
k
⇧F5 W ⇧F5 W ⇥ ⇧F5 W ⇥ ⇥
We notice that such large separators do not exist in (LA)TEX. There may be
as many middle delimiters between a left and a right delimiter as needed
and they are all scaled to the same appropriate size. Notice that not all ver-
tical bars are delimiters. For example, the binary relation “divides” is entered
using | ⇥ ⇥ ⇥ ⇥ or F5 | ⇥ ⇥ ; we will see more examples in section 4.11.
In TEXMACS, large delimiters may either be “left delimiters”, “right delimiters”
or “middle delimiters”. By default, (, [, {, and ⟨ are left delimiters, whereas ), ],
}, and ⟩ are right delimiters. But their status can be changed using the ⌥l ,
⌥r , and ⌥m prefixes. For example, ⌥l ) produces ), considered as a large left
delimiter, together with the corresponding “closing bracket” (. Open French-
style intervals ]a, b[ can therefore be entered using ⌥l ] .
By default, the sizes of the brackets are adjusted to the expression between the
brackets. Small delimiters, created using the ⌥ -prefix, keep their sizes inde-
pendently of the enclosed expression. Thus, the brackets in the left-hand and
right-hand expressions below were entered respectively using ( and ⌥( :
ex ex
f ee + 1 f ( e e + 1 ).
You may also use ⌃* in order to toggle between large and small delimiters.
Sometimes you may want large delimiters of a particular size, instead of the
self-adjusting ones. This can be achieved in two main ways. The best strategy
is usually to tweak the size of the expression between the brackets using
the Format Adjust menu. For example, if you think that the brackets in the
formula
x
f
y
(( ))
are slightly too large, then you may reduce the size of the fraction using Format
Adjust Reduce, which yields
x
f .
y
TEXMACS also allows you to directly increase or decrease the size of the brackets
themselves using the keyboard shortcuts ⌘↑ and ⌘↓ . In order to reset to the
initial size, you may use ⌘⌫ .
We finally notice that it is possible to insert a pair of invisible brackets
using ⌥l . . This is for instance useful in computational contexts, when for-
mulas should have a precise, not merely visual semantics. Alternatively, you
may use ⌘= to confine a selected formula inside a “horizontal group”. This
additionally prevents the formula from being hyphenated.
4.6 WIDE ACCENTS AND EXTENSIBLE ARROWS 79
⌥o < ⌥o >
a + b + c.
Besides delimiters and accents, some of the arrows are also extensible in
TEXMACS. This is typically needed whenever they come with a superscript
above them (or a subscript below them). For instance, the following formula
was entered by typing E - > ^ f @ * g → F :
f ⊗g
E→
→
→
→→
→
→
→→ F.
→
→
Here - > ^ was used as a keyboard shortcut for creating an extensible arrow
with a superscript above it. Whenever you need a non-extensible arrow with
an ordinary superscript (in the upper-right corner), the trick is to “break” the
keyboard shortcut; e.g. E - > ← → ^ + → F yields
E →+ F.
Table 4.15 lists the available extensible arrows in TEXMACS.
(( ac db )) a b
c d
[[ ac db ]] a b
c d
.
Note that you may cycle among the first three variants using ⌃⇥ . Secondly,
you may create so-called “choice lists” using ⌘t N c or { ⌘t N T , as in
if x ⩽ 0
f (x) =
{{ 0
{{ e 1
− 2
x otherwise.
4.8 COMMUTATIVE DIAGRAMS 81
Finally, TEXMACS provides the stack tag for tables in which the spacing is
reduced to the strict minimum ( ⌘t N s ). This is useful when tables are used
in subscripts or superscripts:
S= 𝜑(x i, y j).
1⩽i⩽n
1⩽ j⩽m
𝜄B ↘ 𝛼.
B ⟶ X
𝛽
Here we recommend the use of long horizontal and vertical arrows. The small
scripts 𝜄B and 𝛼 beside the long vertical arrows were created using the markup
elements left-script and right-script.
Centered tables may quickly become problematic when you need diagonal or
curved arrows. The most general approach to commutative diagrams is to con-
sider them as pictures. For general information about how to draw technical
pictures, we refer to chapter 8. In this section, we will describe those features
that are useful for creating the same commutative diagram (4.1) as above.
Inside a mathematical formula, we start with the creation of an empty commu-
tative diagram using Insert Image Commutative diagram. This inserts a small
grid of the following type:
A⨿B A
B X
82 MATHEMATICS
At the next stage, we want to add the arrows. TEXMACS provides a special
mode for adding arrows surrounded by text: Insert Arrow with text. Further-
more, when moving the mouse around the four formulas, you will observe
that there are eight special positions around each formula that “attract” the
pointer. These special points should be used as the starting and end points
of your arrows:
A⨿B x A
x
x x
x
B X
For the diagonal arrow, a dashed line style would actually have been more
appropriate. Such alternative line styles can be selected using Focus Line
dashes. At the next stage, you should select Insert Mathematics and edit the
formulas next to the arrows. You may use ⌃⇥ to put the text at the other side
of an arrow.
𝜄A
A⨿B A
𝜄B 𝛼
B X
𝛽
B X
𝛽
If the diagram needs further editing, then you may restore the grid using Insert
Grid Notebook.
A few further remarks are in order. First of all, TEXMACS does not automatically
adjust the endpoints of the arrows if you edit one of the formulas A, B, X, or A⨿
B. On the other hand, the position of the formula next to the arrow is auto-
matically updated when modifying the endpoints. In documents with several
commutative diagrams, we also recommend to consistently opt for either one
of the two styles exemplified in (4.1) and (4.2).
4.9 SEMANTICS OF MATHEMATICAL FORMULAS 83
After activation of the semantic editing mode, you may check whether a for-
mula is correct by positioning your cursor inside it and looking at the color of
the bounding box of the semantic focus: a green color corresponds to a cor-
rect formula and a red color indicates an error in the formula. Alternatively,
assuming that the focus is on a mathematical formula, you may select Focus
Preferences Highlight incorrect formulas, in which all incorrect formulas are
highlighted inside red boxes.
For the second kind of common errors, TEXMACS includes an automatic syntax
corrector. Assuming that your cursor is inside a formula, you may use Edit
Correct Correct all for the correction of all formulas in your document, or
the correction of the current selection. If the versioning tool is activated (see
section 10.9), then you may use Edit Correct Correct manually to show the
differences between the original and the corrected versions. You may then use
the versioning tool to go through these differences and select the preferred
versions.
The precise algorithms that are used for the correction may be enabled or dis-
abled from Edit Preferences Mathematics Manual correction:
From the Edit Preferences Mathematics Automatic correction, you may also
select the correction algorithms that should be applied automatically when-
ever you open a file. These corrections are always carried out when importing
a LATEX file.
After syntax correction, the remaining errors indicate genuine typos at worst,
or non-standard or unsupported notations at best. We also note that “correct”
formulas do not necessarily have the intended meaning. In order to check
whether the operators indeed apply to the intended arguments, you should
keep an eye on the current focus while typing your formulas.
86 MATHEMATICS
(( 𝜆 1
⋅⋅ )),
(( ⋅
𝜆n
))
TEXMACS mainly relies on the standard variant system for entering homoglyphs.
See Table 4.16 for the complete list of supported homoglyphs.
For example, if we enter ℛ as the first argument and < as the second one, then
the ℛ will be interpreted as a binary relation, exactly in the same way as <.
Moreover, the spacing around ℛ will be adapted, so as to mimic the spacing
around <. In this particular example, we might have obtained the same result
by using the math-relation tag, which is essentially a syntax tag < as second
argument. Most standard operator types are available from the Insert Seman-
tics menu or using the keyboard prefix ⌥x . In particular, you may use ⌥x ␣ to
simply ignore a formula and ⌥x o in order to make the formula behave as an
ordinary symbol (such as the letter “x”).
The syntax primitive is particularly powerful in combination with the TEXMACS
macro language. For instance, consider the formula C = 1/2 π i ∮ f (z) dz. It is
likely that the intended interpretation of 1/2 π i is 1/(2 π i) and not (1/2) π i.
Therefore, if we often use the constant 2 π i, then it is convenient to define a
macro twopii by
You may group such macros together into style package with your favorite
notations. Future versions of TEXMACS might also provide style packages with
notations dedicated to specific areas.
Let us finally note that there are usually several ways for redefining the seman-
tics of a formula. For example, an alternative way to define the macro twopii is
using
hassignjtwopiijhmacroj2 π iii
we may select the whole formula and give it the semantics of an ordinary
symbol, by pressing ⌥x o . However, a nicer solution is to only select the sub-
formula ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ , and give it the semantics of an ordinary symbol. Yet another
example is the sign sequence ++−+−+ mentioned earlier. This sequence can
be interpreted correctly by inserting invisible separators between the different
signs using the , ␣ ␣ shortcut.
Chapter 5
Tables
Tables form one of the most versatile layout primitives of TEXMACS. You can
create ordinary textual tables and specify the properties of individual cells in
a very precise way. More generally, matrices, aligned lists of equations, and
various other kinds of markup are also formatted as tables.
The distinctive feature of a “block” is that the borders of cells are visible as
lines. Furthermore, a “wide” table extends over the entire width of a para-
graph and long lines inside individual cells are wrapped when necessary.
Remark 5.1. In other word processors, “wide tables” are usually the default.
TEXMACS provides many kinds of tables that are not wide, in which case text
inside cells is usually not line-wrapped. This is indeed most natural for small
inline tables like matrices inside a formula. However, it is the responsibility of
the user to prevent such tables from getting too large and not fitting on a single
line. Line wrapping can be enabled via Focus Cell Line wrapping Top or by
toggling the icon on the focus bar. In that case, you should also indicate the
desired width of the cell (see section 5.3.2).
89
90 TABLES
Insert Table Big table creates a “big” paragraph-wide table with a number
and a legend. If you rather wish to fit several numbered tables with accom-
panying legends on a single line, then you may use Insert Table Small table.
Tables 5.1 and 5.2 show an example of two small juxtaposed tables.
Inside math mode, a few additional kinds of tables Matrix, Determinant, Choice,
and Stack are available through the Insert Table menu (see Figures 5.1–5.4).
The stack tag corresponds to tables that are compressed as much as possible.
This makes them useful inside subscripts, superscripts, or other places where
little space is available.
(( a⋅⋅
11 ⋅ ⋅ ⋅ a1n
⋅⋅ )) ||| a⋅⋅
11 ⋅ ⋅ ⋅ a1n
⋅⋅ |||
(( a⋅
n1
⋅
⋅ ⋅ ⋅ ann
)) | a⋅
n1
⋅
⋅ ⋅ ⋅ ann |
Figure 5.1. Matrix Figure 5.2. Determinant
if x ⩽ 0
f (x) = {{ 0 𝜎n = 𝜑i, j
{e 1
−x
if x > 0
1⩽i⩽n
i⩽ j⩽2i
There are several other table-like environments and new ones may be created
by the user. For instance, using Insert Mathematics Equations or ⌥& , you
may insert an eqnarray* environment. This allows mathematical users to align
lists of equations that extend over entire lines. An example of such a list of
equations is
⌥→ ⌥← ⌥↓ ⌥↑ ↩
a b a b
(( ac db| )) (( ac db | )) (( ac | db )) (((( | )))) (((( a b )))) (((( | ))))
|
(c d) (c d) (c d)
Table 5.3. Inserting new rows and columns using the cursor keys. Starting from the initial
2 × 2 matrix at the left hand side, with the cursor behind the character b, the table indicates
the results after pressing the keys ⌥→ , ⌥← , ⌥↓ , ⌥↑ , and ↩ .
⌫ ⌦
(( ac | db )) (( a|c db )) (( ac |bd ))
(( a| b )) ( a b| ) ( a b )
(( c d )) ( c d ) ( |c d )
Table 5.4. Removing empty rows and columns using the keys ⌫ and ⌦ .
Rows and columns that are entirely empty can be deleted using the keys ⌫
or ⌦ , as indicated in Table 5.4. No matter whether they are empty or not, rows
and columns can be deleted from the Focus Resize menu, or using the icons ,
, , and from the focus bar.
Rows, columns, and more general rectangular selections of cells can easily be
cut, copied, and pasted. Selections of cells are indicated using a different color
(magenta) from that of usual selections (which are red). One typical scenario
for copying and pasting a rectangular selection of cells is shown in Figure 5.5.
(( a⋅⋅
11 ⋅ ⋅ ⋅ a1n
⋅⋅ )) select (( a⋅⋅11 ⋅ ⋅ ⋅ a1n|
⋅⋅ )) Copy (( a⋅⋅
11 ⋅ ⋅ ⋅ a1n|
⋅⋅ ))
(( ⋅| ⋅ )) →
→
→
→→
→
→→
→
→
→→
→
(( a⋅11
⋅
⋅ ⋅ ⋅ a1n
)) →
→
→
→→
→
→→
→
→
→→
(( ⋅ ⋅ ))
mouse click (( a⋅⋅11 ⋅ ⋅ ⋅ a1n
⋅⋅ )) Paste (( a⋅⋅
11 ⋅ ⋅ ⋅ a1n
⋅⋅ ))
→
→
→
→→
→
→→
→
→
→→
→
→→
→
→
→→
→
→→
→
→
→→
→
(( ⋅| ⋅ )) →
→
→
→→
→
→→
→
→
→→
→
(( |a⋅
11
⋅
⋅ ⋅ ⋅ a1n
))
Figure 5.5. One typical scenario of copying and pasting a range of cells. Starting with the
matrix at the left-hand side, we first select the top row using the mouse. We next copy the
selection using Edit Copy or ⌘w and reposition the cursor inside the first cell of the third
row. We finally paste the selection using Edit Paste or ⌃y .
border width and padding, etc. One first way to edit these properties is to
open the cell property editor using Format Cell. Alternatively, changes can
be made via the entries in the Focus Cell menu or the corresponding icons
on the focus bar. Some properties can also be edited using the keyboard.
By default, cell operations are performed on the cell that contains the cursor.
It is also possible to jointly modify the cell properties of all cells in the table, or
of all cells in the row or column that contains the cursor. For this, it suffices to
change the “cell operation mode”, by selecting Entire table, Row or Column in
the menu Focus Cell Operation mode. Similarly, if a selection of cells is active,
then the properties are modified jointly for all cells in the selection.
Internally, cell properties are associated to rectangular regions of cells. Let us
mention one useful implication of this fact. Assume that the first row of the
following table was colored by selecting the first row and changing the back-
ground color to “pastel yellow” using Focus Cell Background color:
Then TEXMACS associates this background color to the entire region corre-
sponding to the first row. Now assume that we insert a new column between
house and tree. This will yield
In other words, it is not necessary to specify the background color of the top
cell again in the new column, since this cell is “naturally part of the region”
for which we set the color to pastel yellow. This would not have been the case
if we had separately specified the background color for each of the cells in
the top row of the original table. In that case, the insertion of a new column
between house and tree would have resulted in
English house tree beast
French maison arbre bête
Dutch huis boom beest
Figure 5.8. Minimal width of 1in. Figure 5.9. Maximal width of 1 in.
the default width becomes zero). The default width can be overridden using
Focus Cell Width, Format Cell Width, or the icon menu on the focus bar.
The user may either specify an exact, minimal, or maximal width for the cell.
When specifying a minimal width, the corresponding column has a guaran-
teed minimal width; the actual width may be larger if one of the cells is even
wider. When specifying a maximal width for all cells, it is guaranteed that
the width of the corresponding column will never exceed the specified value.
However, this also means that any contents that don't fit into this width may
overlap with neighboring cells. The same problem can occur if you specify an
exact width. The possible settings are illustrated in Figures 5.6–5.9.
If your table is too wide or if you manually specified its width, then it may
happen that the available horizontal space is not completely used up by the
columns. This occurs for instance when starting a new wide table using Insert
Table Wide block. By default, the unused space is distributed evenly over all
columns, but this setting can be overridden by specifying stretch factors using
Focus Cell Width Stretch factor or Format Cell Width Stretch. In Figure 5.10,
we have shown an example table in which the unused space has been distrib-
uted evenly among the two columns. In Figure 5.11, we have shown the same
table with a stretch factor of 0 for the first column and 1 for the second one.
The heights of rows are determined following similar principles. In addition,
TEXMACS adjusts the vertical limits of cells in order to ensure a uniform layout
for ordinary text. Indeed, characters like “a”, “e”, and “x” are shorter than “b”,
“d”, and “k”, and not as deep as “p”, “q”, and “g”. If the vertical limits of cells
(( xa xa )) + (( xf xf ))
would rather be displayed as follows:
a x f x (( ))
x a + x f
In other words, TEXMACS adjusts cells such that they vertically extend to the
highest and deepest character in the current font. This feature can be turned
off, or only applied to the top or the bottom, via the menu Focus Cell Height
Adjust limits or Format Cell Text height correction.
Table 5.5. Typical settings for the horizontal and vertical cell padding.
Notice that the borders that are created in this way have a default width of
1 ln. For other border widths, you may use Pen width or the more detailed
interface from Format Cell.
Besides the borders, it is also possible to customize the amount of padding
between borders of cells and their actual contents. Again, it is possible to sep-
arately specify the amount of padding in all four directions via Format Cell
Padding, Focus Cell Padding, or the icon . By default, TEXMACS uses a hori-
zontal padding of 1 spc (the default width of a space character for the current
font) and a vertical padding of 1 sep (standard separation space for the current
font). In Table 5.5, we have illustrated the effect of various amounts of hori-
zontal and vertical padding.
center H = 1 + 1
1
x2 + y2 = z2 e πi = −1 14.285714 14,285714
x y
H= 1
1
bottom
e πi = −1 x 2 + y 2 = z 2 1428.5714 1428,5714
1
x
+y
It is easy to modify the alignment of cells using the keyboard. The shortcut ⌘→
moves the horizontal alignment of a cell further to the right: a cell that was
aligned at the left will be centered, and a cell that was centered will become
right aligned. Similarly, the keystroke ⌘← moves the horizontal alignment fur-
ther to the left, whereas ⌘↑ and ⌘↓ allow you to adjust the vertical alignment.
When applied to a selection of cells, we notice that the selection remains active,
so that multiple changes can be made efficiently. If you need to modify the
horizontal alignment of many columns in multiple tables, then the keyboard
shortcuts ⌘← and ⌘→ are also very efficient in combination with the “column
operation mode” (Focus Cell Operation mode Columns).
We already discussed the difference between wide tables and smaller inline
tables such as matrices inside mathematical formulas. Wide tables allow cells
to contain large portions of text. If the contents of a cell do not fit on a single
line, then line-wrapping is activated by default in order to prevent the table
from running out of the page. To this effect, we recall the existence of the
toggle on the focus bar. Notice that line-wrapping only makes sense inside
cells or tables for which a maximal width has been specified (see sections 5.3.2
and 5.4.2); otherwise, the cell will simply become as large as necessary for its
contents to fit on a single line.
Both the first and the last column of this table are line-wrapped. However, the
first column is aligned at the bottom whereas the last column is aligned at the
top.
to allow for block content inside cells that are not line-wrapped. Inversely, you
may want to disallow block content in cells where line wrapping is active. This
can be specified via the menus Format Cell Block content or Focus Cell Block
content.
We have already discussed the insertion and removal of rows and columns
using the keyboard shortcuts ⌥← , ⌥→ , ⌥↑ , ⌥↓ , or the icons , , , , , ,
, and on the focus bar. It is also possible to specify an exact number of
rows or columns using Focus Table Size Set number of rows and Set number
of columns. Moreover, the Focus Table Size menu allows you to specify a
minimum or maximum number of rows or columns in a table. This is espe-
cially useful for the design of macros for customized tables (see section 5.7).
For instance, the macro eqnarray* for aligned lists of equations
a1 + ⋅ ⋅ ⋅ + an
𝜇 =
n
a1 + ⋅ ⋅ ⋅ + an2
2
𝜎 =
n
specifies that “tables” of this kind should contain at least and at most three
columns. Newly created lists of equations therefore contain three columns
instead of one, but no new columns can be inserted using ⌥← or ⌥→ . Simi-
larly, the keys ⌫ and ⌦ suppress the table as soon as its cells are empty and
there are only one row and three columns left.
The width and the height of a table can be specified using Format Table Width
and Height or Focus Table Width and Height, much in the same way as for
cells (see section 5.3.2).
Two settings for the global table size are most common: wide tables on sep-
arate lines usually extend over the entire width of a paragraph, whereas the
sizes of smaller tables such as matrices are typically determined automatically
so as to make the contents of all cells fit. Toggling between these two possibili-
ties is so common that the focus bar contains a special icon for this purpose.
You may also use Focus Table Width Paragraph or specify 1 par as Format
Table Width or Focus Table Width.
98 TABLES
Today's menu
Of course, other table sizes can sometimes be useful. For instance, one may use
a fixed table size for mimicking a minipage or a miniscreen, as in Figure 5.12.
bottom
axis middle
Vertical alignment at the or or or bottom .
axis top middle
top
Figure 5.13. Basic types of vertical table alignment with respect to surrounding text.
5.4 TABLE PROPERTIES 99
bottom
bottom
middle
bottom second row
middle
Baseline alignment at the top or or bottom or second row .
middle
top second row
middle
top second row
top
Figure 5.14. Various kinds of vertical baseline alignment of tables.
It is also possible to align the baseline of a particular row in the table with the
baseline of the surrounding text, by selecting Top baseline, Middle baseline,
Bottom baseline or Specific baseline in Focus Table Vertical alignment. This
kind of alignment is illustrated in Figure 5.14. When the number of rows of a
table is even, the middle baseline is located exactly at the middle between the
baselines of the two central rows. For the rightmost table in Figure 5.14, we
chose “2” for Focus Table Vertical alignment Specific baseline.
The default horizontal alignment of tables is at the left. Other alignments are
supported for completeness, but rarely needed, since they usually result in
overlapping text: see Figure 5.15.
x 1 = Φ1(x 1, x 2, . . . , x n−1, x n)
x 2 = Φ2(x 1, x 2, . . . , x n−1, x n)
⋅⋅
⋅
x n−1 = Φn−1(x 1, x 2, . . . , x n−1, x n)
x n = Φn(x 1, x 2, . . . , x n−1, x n).
If you want to allow for page breaks inside such tables, then you should use
Format Table Large tables Enable page breaking or Focus Table Special
Table breaking. Notice that you should set all interline and interparagraph
spacing to zero (see section 3.9) whenever the cells of such a table admit bor-
ders.
2011 2012
Total
jan–jun jul–dec jan–jun jul–dec
Milk 120.10 116.20 128 126.15 490.45
Beverages 850.65
Cola 85.40 105.30 74.15 95.35 360.20
Apples 65.10 72.85 82.90 83.10 303.95
Fruit Cherries 34.20 55.45 23.85 57.55 171.05 728.40
Bananas 83 47.20 72 51.20 253.40
Total 387.80 397 380.90 413.35 1579.05
Table 5.7. Spending table that illustrates how to use joined cells.
It is sometimes useful to merge several cells into a single cell. After making
a selection of cells, this can be done by clicking on the icon or Focus Cell Join
selected cells. Cells that have been joined together can be dissociated using
or Focus Cell Dissociate joined cells. Table 5.7 gives a typical example of
a table with a few joined cells. Cell-joining can also be an efficient way to create
certain diagrams: see Figure 5.16. In this example the widths and heights of
all cells were set to 0.25 in.
Remark 5.2. When joining selected cells C 11, . . . , C kl, the top left cell C 11 will
assume the role of the “leader” and contains the content of the joined cell. The
other cells C 12, . . . , C kl remain part of the table, but become invisible to the user
until the joined cell is dissociated.
g8 8
8 10 14
g7 7
g6 6
6
g5 5
6 10
g4 4
4
g3 3
g2 2
2 4 6 8
g1 1
g0 0 1 2 3 4 5 6 7 8
f0 f1 f2 f3 f4 f5 f6 f7 f8
Conversely, TEXMACS also allows you to split up a single cell into several ones,
by transforming it into a “subtable”. This can be done using the icon on
the focus bar or Focus Insert subtable. Whether it is better to join several cells
together or split up some of the other cells depends on the context. The main
difference between the two techniques is that the alignment properties of cells
in subtables of the outer table are not correlated: see Figure 5.17.
Tables can also be given a more artistic look through the use of background
patterns. One example of this technique is shown in Table 5.9. The “wooden
borders” are empty rows and columns whose heights and widths were respec-
tively set to 0.5 em. We also turned off the height correction using Focus Cell
Height Ajust limits None.
Table 5.10. Combining the three above background patterns inside a table.
It may be useful to specify a minimum size as well using Focus Table Size
Minimal number of rows and Minimal number of columns. In our example, it is
natural to require at least two rows and two columns.
5.7 TABLE MACROS 103
At the second step, you should place the cursor anywhere inside the table an
click on Tools Macros Create table macro. A window for editing macros
should pop up with a declaration that should look as follows:
|≔
hmacrojbodyj
htformatj
hcwithj1j-1j1j-1jcell-rborderj1lnij
hcwithj1j-1j1j-1jcell-bborderj1lnij
hcwithj1j1j1j-1jcell-tborderj1lnij
hcwithj1j-1j1j1jcell-lborderj1lnij
hcwithj1j1j1j-1jcell-backgroundjdark blueij
hcwithj1j1j1j-1jfont-familyjssij
hcwithj1j1j1j-1jcolorjpastel yellowij
htwithjtable-min-rowsj2ij
htwithjtable-min-colsj2ij
bodyii
At the default cursor position, enter the name of your macro and click on the
Ok button.
Having created our table macro, we may now use it. Assuming that we called
it “translation-table”, it suffices to type \ followed by this name and hit ↩ .
This will yield
Notice that the table macro only preserves the style of the macro, not its actual
contents. Notice also that the initial table macro application indeed contains
two rows and two columns, as desired.
In certain cases, we might want to surround the actual table with some fixed
content. For instance, a matrix is really a table surrounded by two big paren-
theses. Assume that we want to create a new curly-matrix macro for which the
parentheses are replaced by curly braces. As usual, we first create a prototype
of such a “table”:
{ ac db }.
Next, we carefully select the table together with the braces and click on Tools
Macros Create table macro. As before, we finally enter the name curly-matrix
in the macro editor and click on the Ok button. Notice that the selection step is
essential: if we just place our cursor inside the table, then Tools Macros Create
table macro creates a macro for the table without the surrounding braces.
Chapter 6
Connected documents
The days are gone that we had to roam through the alleys of libraries, when
brinks of information were hiding themselves inside thick books. Modern doc-
uments need to be connected, within ten-click distance of the entire universe.
TEXMACS provides functionalities for the creation of many types of connec-
tions inside and between documents. In this chapter, we cover hyperlinks,
labels and references, tables of contents, indexes, bibliographies, inclusions
from other documents, etc. In chapter 11, we will explain how TEXMACS can be
connected to external computational software. Other types of “connections”
are under development, such as support for various web services.
Connected documents contain a lot of automatically generated content, ranging
from short references to complete bibliographies. This introduces an inevitable
pitfall: the precise way in which this content has to be generated and kept up to
date may become a complex and potentially time-consuming process. In order
to avoid any slowdown of the usual editing process, some of these updates
are only done on request using Document Update All or by clicking on the
icon. The Document Update menu also contains several entries for specific
kinds of updates, such as regenerating only the table of contents. Note that
you have to be in “paper mode” (Document Page Format Page rendering
paper) if you want page numbers to be updated correctly.
104
6.1 LABELS AND REFERENCES 105
|a 2 + b 2 = c 2 (1)
You may create the actual label using Insert Link Label or the keyboard
shortcut ⌘! . Newly created labels are initially inactive: you are supposed to
enter the name of your label and then hit ↩ in order to activate it. After that,
a small marker should appear to indicate the position of the label. This marker
will not appear in the printed version of your document. When selecting Doc-
ument Informative flags Detailed, these markers will also indicate the names
of the actual labels, as in the equation
eq:Pythagoras
a 2 + b 2 = c 2. (6.4)
It is the responsibility of the user to avoid the creation of several labels with the
same name. In that case, you will receive an error message, since references to
such labels are ambiguous.
Assuming that you created a label test-name, you can insert a reference to it
using Insert Link Reference or the keyboard shortcut ⌘? . Again, a newly
created reference will be inactive. After re-entering the name test-name and
hitting the activation key ↩ , the appropriate reference should appear in the
text. For equations such as (6.4), we note that you have to add the surrounding
parentheses yourself. When entering the name of a reference, you may benefit
from the mechanism of “tab-completion”: after typing the first characters of
106 CONNECTED DOCUMENTS
the name, hitting the ⇥ key will automatically complete it. References to non-
existent labels cause TEXMACS to complain with an error message. Inside the
editor, as well as for the PDF and HTML exports, references behave like hyper-
links: when clicking on them, you jump to the corresponding label.
(system "shell-command")
evaluates shell-command as a shell command. This provides an easy way to
launch any external application via a simple mouse click.
You can insert images into the text using Insert Image. The entries Insert
Image Draw image and Insert Image Draw over selection allow you to draw
your own pictures using the graphical editor that comes with TEXMACS (see
chapter 8).
External images can be incorporated using either Insert Image Link image
or Insert Image Insert image. The first method only puts a link to the image
inside your document, whereas the second method inserts the image itself.
Links offer the advantages that documents remain smaller in size, that the
same image can be shared between several documents or document fragments,
6.3 INSERTING IMAGES 107
and that images can be updated independently from documents. The main
drawback is that documents become less self-contained: if you send your doc-
ument to a friend or colleague, then you also need to send each of the linked
images. This drawback can be alleviated by keeping all images inside a ded-
icated folder.
By default, external images are displayed at their design sizes and aligned at
their bottom lines. Alternative widths, heights, and alignment offsets can be
specified using the focus menu or toolbar.
• When specifying a new width (using Focus Set width), but no height
(or vice versa), the image is resized so as to preserve the aspect ratio. For
example, entering a width of 1 par will make the image extend over the
entire paragraph width and adjust the height proportionally.
You may use w and h as special lengths for the default width and height
of the image. For example, specifying 2 w and 2 h for the width and the
height, the image will be displayed at twice the default size.
Figure 6.2 shows the effect of various size and offset settings for a given image.
In addition to the above ways to specify the exact width, height, and offset of
an image, it is also possible to customize these settings efficiently using the key-
board: the shortcuts ⌘← and ⌘→ (resp. ⌘↑ and ⌘↓ ) allow you to decrease and
increase the width (resp. height), whereas ⌘⇟ and ⌘⇞ can be used for adjusting
the vertical offset.
Width 0.5 w 15 mm 1w
Height 1h 0.5 h 0.5 h
X-offset
Y-offset 0.5 h -0.5 h
Figure 6.2. Example of the effect of various size and offset specifications for an image.
Blank fields correspond to the default setting. In particular, the leftmost image corre-
sponds to the default rendering.
In order to generate a table of contents for your document, you should proceed
as follows:
1. Put the cursor at the appropriate place and click on Insert Automatic
Table of contents.
2. Select Document Page Format Page rendering paper for the page
mode.
Index
hindexjsimplei
hsubindexjentryjsubentryi E
hsubsubindexjentryjsubentryjsubsubentryi entry
hindex-complexjjstrongjjhtuplejentryjimportantii important . . . . . . . . . . . 109
range . . . . . . . . . . 109–109
hindex-complexjtheoryjjjhtuplej𝛼-theoryii subentry . . . . . . . . . . . 109
hindex-complexjjjrangejhtuplejentryjrangeii subsubentry . . . . . . . . 109
hindex-complexjjjrangejhtuplejentryjrangeii
S
hindex-linejejhstrongjEii simple .. . .. . .. . .. . .. . 109
hindex-linejsjhvspace*j0.5fnihstrongjSii
T
hindex-linejtjhvspace*j0.5fnihstrongjTii 𝛼-theory . . .. . .. . .. . .. . 109
Figure 6.3. Demonstration of the available types of index entries. The left-hand side shows the
entries in their deactivated state. The right-hand side shows the index generated from these
entries, after activating them and putting them at appropriate places in the main text.
6.4.2 Indexes
For the generation of an index, you first have to put “index entries” in your
document using Insert Link Index entry. In a second step, you must put your
cursor at the place where you want your index to be generated and click on
Insert Automatic Index. The index can then be generated in a similar way as
the table of contents (see Figure 6.3 for an example).
In the Insert Link Index entry menu, you find several types of index entries.
The simplest ones are Main, Sub, and Subsub, which are macros with one, two,
and three arguments respectively. Entries of the form Sub and Subsub may be
used to subordinate index entries with respect to other ones. As usual, you
have to fill out the arguments of the entries, and then hit ↩ in order to activate
them. The locations of index entries are indicated through markers or flags ,
as in the case of labels (see section 6.1).
A Complex index entry takes four arguments. The first one is a key that spec-
ifies how the entry has to be sorted; it must be a “tuple” (created using ⌘i < )
whose first component is the main category, the second a subcategory, etc. The
second argument of a complex index entry is either blank or “strong”, in which
case the page number of your entry will appear in bold. The third argument
is usually blank, but if you create two index entries with the same non-blank
third argument, then this will create a “range” of page numbers. The fourth
argument, which is again a tuple, is the entry itself.
It is also possible to create an index line without a page number using Insert
Link Index entry Interject. The first argument of this macro is a key for how
to sort the index line. The second argument contains the actual text. This con-
struct may be useful for creating different sections “A”, “B”, etc. in your index.
110 CONNECTED DOCUMENTS
Glossary
hglossary-linejhstrongjSymbolsii
hglossaryjℵi Symbols
hglossary-explainjℝjThe field of real numbersi ℵ . . . . . . . . . . . . . . . . . . . .. . 110
hglossary-linejhvspace*j0.5fnihstrongjNotationsii ℝ The field of real numbers . .. . 110
hglossary-explainjA ⨿ BjCoproduct of A and Bi
hglossary-dupjA ⨿ Bi Notations
A⨿B Disjoint union of A and B . 110, 110
Figure 6.4. Demonstration of the available types of glossary entries. The left-hand side shows the
entries in their deactivated state. The right-hand side shows the glossary generated from these
entries.
6.4.3 Glossaries
Glossaries are compiled in a similar way as indexes, but the entries are not
sorted (see Figure 6.4 for an example): the items in the glossary are listed in
the same order as the corresponding entries in the text. Glossary entries are
created using Insert Link Glossary entry, whereas the glossary itself is inserted
using Insert Automatic Glossary.
A Regular glossary entry just contains some text, and a page number will be
generated for it. An Explained glossary entry contains a second argument,
which explains the notation. A Duplicate entry may be used to create a page
number for the second occurrence of an entry. A glossary line creates an entry
without a page number.
Using Insert Image Big figure or Insert Image Small figure, it is possible to as-
sociate a number and a caption (i.e. some explicative text) to a figure. TEXMACS
allows you to automatically produce the list of all figures of this kind: for each
figure, this list contains its caption and page number. Such a list of figures is
inserted using Insert Automatic List of figures and generated using Docu-
ment Update List of figures or Document Update All.
Sometimes, the caption of a figure may be quite long. In that case, you may
wish to use an alternative shorter caption for the list of figures. This can be
done by using the tag caption-detailed as your caption. The first argument of
this tag should be the long caption, and the second argument the shorter ver-
sion.
The same mechanism applies for numbered tables with captions, as created
using Insert Table Big table or Insert Table Small table. Lists of tables are
inserted using Insert Automatic List of tables and the tag caption-detailed can
again be used for generating alternative short captions in such lists.
6.4 CONTENT EXTRACTION 111
hindexjpower seriesi
hwith-indexjhofjhindexjIsaac Newtonii
hsubindexjrelativityjspeciali
hsubindexjrelativityjgenerali
hwith-indexjhofjhindexjAlbert Einsteinii
hindexjHilbert schemei
hwith-indexjhofjhindexjAlexander Grothendieckii
Let us show with an example how this works. Assume that we wish to main-
tain two separate indexes idx and hof for general concepts and names of
famous persons. The first index is managed as usual. The second one can be
created as follows: click on Insert Link Alternate Index and specify hof at the
prompt; next insert the index as usual via Insert Automatic Index. The name
“Hall of fame” can be specified by selecting the new index and doing Focus
Rename. Index entries for persons are inserted in a similar way: click on Insert
Link Alternate Index and specify hof at the prompt; next insert the index
entry as usual via Insert Link Index entry. An example is shown in Figure 6.5.
The specification of an alternate identifier for each person in the hall of fame
may be somewhat tedious. Of course, nothing prevents you from creating
a macro hof-index for this purpose:
hassignjhof-indexjhmacrojnamejhwith-indexjhofjhindexjnameiiii
112 CONNECTED DOCUMENTS
Similar macros can be created for putting the same entry in several indexes.
See chapter 12 for more information on how to create your own macros.
6.5 Bibliographies
TEXMACS essentially uses BIBTEX [43] as the format for storing bibliographic
entries. In particular, users who are familiar with this format may directly use
existing or hand-compiled BIBTEX files as bibliographic databases. There are
also several external tools for managing BIBTEX-based databases, such as BIB-
DESK [57] and ZOTERO [50]. Some of these tools make it easy to retrieve existing
bibliographic entries from the web. Section 6.5.4 contains a crash course on
BIBTEX; more information can be found in [43, 38, 16].
The particular BIBTEX file with your bibliographic database can be specified
when inserting a bibliography into your document. It is also possible to let
TEXMACS do the job of maintaining a global bibliographic database for all your
documents. This requires you to enable the Database tool in the Tools menu.
One advantage is that you may directly perform searches from inside the editor.
Another advantage is that relevant entries are copied as invisible attachments
inside your documents. When collaborating on a document, this makes it pos-
sible to automatically share bibliographic data among colleagues. The built-
in bibliography manager still allows you to import and export bibliographic
data in the form of BIBTEX entries or files.
A typical BIBTEX file example.bib with three entries is shown below. We will
use it for all our examples in this section. Bibliographic entries for many clas-
sical works can be found on the web in BIBTEX format. More generally, BIBTEX
files can be assembled and edited by hand using TEXMACS or any external ASCII
text editor.
In order to import the example file into the integrated bibliography manager
(assuming that Tools Database tool is enabled), you first have to open your
personal bibliography database using Data Open bibliography. It next suffices
to click on Data Import and select example.bib using the file browser.
6.5 BIBLIOGRAPHIES 113
example.bib
@Article{Ein05,
author = {Einstein, Albert},
title = {Ist die {Tr\"agheit} eines {K\"orpers}
von seinem {Energieinhalt} abh\"angig?},
journal = {Annalen der Physik},
year = {1905},
month = {March},
number = {113},
volume = {323},
pages = {639--641}
}
@Book{New1671,
author = {I. Newton},
title = {De methodis serierum et Fluxionum},
publisher = {Manuscript},
year = {1671}
}
@Article{Tur36,
author = {A. Turing},
title = {On computable numbers, with an application
to the {Entscheidungsproblem}},
journal = {Proc. London Maths. Soc.},
year = {1936},
volume = {2},
number = {42},
pages = {230--265}
}
Ordinary citations such as [2] are created using Insert Link Citation Vis-
ible. The entries in the database are identified via their keys. In our example
file example.bib, the keys are New1671, Ein05, and Tur36. Using Focus
Insert argument after or , further citations can be added to form a group.
For instance, the three entries from our example file are [1, 2, 3].
If you forgot part of a key, then you may use tab-completion to cycle through
all possible completions. You may also search for bibliographic entries in your
personal database using Focus Search in database or by clicking on the icon
on the focus bar. After entering some keywords separated by spaces in the
Search field of the search window, all entries are listed in which each keyword
appears at least once. By clicking on the key of one of the matching entries, this
key will be chosen for your citation.
114 CONNECTED DOCUMENTS
Finally, Insert Link Citation Detailed allows you to cite a specific portion of
text in a work, such as a section or a theorem. For example, see [3, section 11]
for a proof of the impossibility to solve the Entscheidungsproblem.
Bibliography
[1] Albert Einstein. Ist die Trägheit eines Körpers von seinem Energieinhalt
abhängig? Annalen der Physik, 323(113):639–641, March 1905.
[2] I. Newton. De methodis serierum et Fluxionum. Manuscript, 1671.
[3] A. Turing. On computable numbers, with an application to the Entschei-
dungsproblem. Proc. London Maths. Soc., 2(42):230–265, 1936.
You may insert the bibliography using Insert Automatic Bibliography. If you
enabled Tools Database tool, then your personal global database will be used
for the bibliographic data. Otherwise you will be prompted to select a BIBTEX
file using the file browser. With the focus on the bibliography, the file name
can be changed a posteriori using Focus Set file name or on the focus toolbar.
An empty file name instructs TEXMACS to search for bibliographic entries in
your personal database.
The BIBTEX style to be used can also be specified on the focus toolbar or using
Focus Style, just after insertion of the bibliography. Notice that the Style text
on the focus toolbar is actually a button that opens a popup menu with some of
the supported styles. TEXMACS contains built-in support for the most frequent
BIBTEX styles abbrv, acm, alpha, elsart-num, ieeetr, plain, siam, unsrt.
In order to generate bibliographies using this built-in support, you must prefix
the bibliography style with tm-. For instance, the default style tm-plain cor-
responds to plain. Native BIBTEX styles can also be used, modulo installation
of the bibtex program on your computer.
The bibliography styles determine the rendering of both citations and the
entries in the bibliography itself, as well as the way these entries are sorted.
Below, we have shown the effect of the standard styles for our sample bib-
liography example.bib.
tm-abbrv
The achievements in [2, 1, 3] have changed the world.
[1] A. Einstein. Ist die Trägheit eines Körpers von seinem Energieinhalt
abhängig? Annalen der Physik, 323(113):639–641, March 1905.
[2] I. Newton. De methodis serierum et Fluxionum. Manuscript, 1671.
6.5 BIBLIOGRAPHIES 115
tm-acm
The achievements in [2, 1, 3] have changed the world.
[1] EINSTEIN, A. Ist die Trägheit eines Körpers von seinem Energieinhalt
abhängig? Annalen der Physik 323, 113 (March 1905), 639–641.
[2] NEWTON, I. De methodis serierum et Fluxionum. Manuscript, 1671.
[3] TURING, A. On computable numbers, with an application to the Entschei-
dungsproblem. Proc. London Maths. Soc. 2, 42 (1936), 230–265.
tm-alpha
The achievements in [New71, Ein05, Tur36] have changed the
world.
[Ein05] Albert Einstein. Ist die Trägheit eines Körpers von seinem Energieinhalt
abhängig? Annalen der Physik, 323(113):639–641, March 1905.
[New71] I. Newton. De methodis serierum et Fluxionum. Manuscript, 1671.
[Tur36] A. Turing. On computable numbers, with an application to the Entschei-
dungsproblem. Proc. London Maths. Soc., 2(42):230–265, 1936.
tm-elsart-num
The achievements in [1, 2, 3] have changed the world.
[1] I. Newton, De methodis serierum et Fluxionum, Manuscript, 1671.
[2] A. Einstein, Ist die Trägheit eines Körpers von seinem Energieinhalt
abhängig?, Annalen der Physik 323 (113) (1905) 639–641.
[3] A. Turing, On computable numbers, with an application to the Entschei-
dungsproblem, Proc. London Maths. Soc. 2 (42) (1936) 230–265.
tm-ieeetr
The achievements in [1, 2, 3] have changed the world.
[1] I. Newton, De methodis serierum et Fluxionum. Manuscript, 1671.
[2] A. Einstein, ``Ist die Trägheit eines Körpers von seinem Energieinhalt
abhängig?,'' Annalen der Physik, vol. 323, no. 113, pp. 639–641, March 1905.
[3] A. Turing, ``On computable numbers, with an application to the Entschei-
dungsproblem,'' Proc. London Maths. Soc., vol. 2, no. 42, pp. 230–265, 1936.
tm-plain
The achievements in [2, 1, 3] have changed the world.
[1] Albert Einstein. Ist die Trägheit eines Körpers von seinem Energieinhalt
abhängig? Annalen der Physik, 323(113):639–641, March 1905.
[2] I. Newton. De methodis serierum et Fluxionum. Manuscript, 1671.
116 CONNECTED DOCUMENTS
tm-siam
The achievements in [2, 1, 3] have changed the world.
[1] A. EINSTEIN, Ist die Trägheit eines Körpers von seinem Energieinhalt abhängig?,
Annalen der Physik, 323 (1905), pp. 639–641.
[2] I. NEWTON, De methodis serierum et Fluxionum, Manuscript, 1671.
[3] A. TURING, On computable numbers, with an application to the Entscheidung-
sproblem, Proc. London Maths. Soc., 2 (1936), pp. 230–265.
tm-unsrt
The achievements in [1, 2, 3] have changed the world. Yet, would
they be qualified as excellent +++ according to modern criteria for
research proposals?
[1] I. Newton. De methodis serierum et Fluxionum. Manuscript, 1671.
[2] Albert Einstein. Ist die Trägheit eines Körpers von seinem Energieinhalt
abhängig? Annalen der Physik, 323(113):639–641, March 1905.
[3] A. Turing. On computable numbers, with an application to the Entschei-
dungsproblem. Proc. London Maths. Soc., 2(42):230–265, 1936.
BIBTEX files are raw text files that can be edited using any text editor. When
editing them using TEXMACS, a few special rules apply that will be discussed
in section 6.5.5 below. But let us first survey the most important facts about
the BIBTEX format. For more details and special features of lesser interest for
ordinary users, we refer to [38, appendix B] and [16, chapter 13].
In fact, BIBTEX is really a program that takes a BIBTEX file and a list of citations
as input and produces the corresponding bibliography as output. Whenever
you edit BIBTEX files by hand, it is important to follow the BIBTEX syntax. Oth-
erwise, errors may occur when running BIBTEX and the resulting bibliography
might be badly formatted. Recall that TEXMACS contains its own replacement
for the BIBTEX program; to use this native replacement, your bibliography style
must be prefixed by tm-; otherwise, TEXMACS will run BIBTEX whenever it needs
to generate a bibliography.
A BIBTEX file consists of a list of BIBTEX entries, which are usually separated
by empty lines. Each entry consists of three main parts: a type specifier, an
identifying key, and a comma-separated list of data fields. The file should not
contain any “duplicate” entries with the same identifying key; indeed, any
references to such entries would be ambiguous. Each data field of an entry
consists of a field type and a value:
6.5 BIBLIOGRAPHIES 117
@Entry_type{key, @Book{Bor28,
field_type_1 = field_value_1, author = {\'E. Borel},
field_type_2 = field_value_2, title = {Le\c{c}ons sur les
... s\'eries divergentes},
field_type_n = field_value_n, publisher = {Gauthier-Villars},
} year = {1928}
}
The field values should be enclosed between curly brackets {val} or quotes
"val". The values themselves are in LATEX format, but a few additional rules
apply that will be discussed below. Notice that entry and field types are not
case-sensitive, contrary to the key and the field values.
BIBTEX supports a fixed set of entry types that are listed below. For each entry
type, there are three kinds of fields: required fields, optional fields and ignored
fields. For instance, the entry type Article requires you to specify the author,
title, journal, and year (otherwise, an error will occur and the resulting bib-
liography will probably be badly formatted). In addition, you may specify the
optional fields volume, number, pages, month, and note. Such optional fields
will also appear in the generated bibliography using an appropriate layout.
All other field types are ignored for the Article entry type, even though they
may contain interesting information such as an abstract, a hyperlink to the
paper, etc. BIBTEX entries that are downloaded from the web generally contain
several ignored fields that may be useful for bookkeeping or other purposes.
Booklet. A work that is printed and bound, but without any explicit pub-
lisher or sponsoring institution. Required field: title. Optional fields:
author, howpublished, address, month, year, note, key.
Incollection. A part of a book with its own title. Required fields: author,
title , booktitle, publisher , year . Optional fields: editor ,
volume/number, series, type, chapter, pages, address, edition,
month, note, key.
Misc. To be used when nothing else fits. No required fields. Optional fields:
author, title, howpublished, month, year, note, key.
Unfortunately, BIBTEX has no special entry type for preprints. You may use
Unpublished, Techreport or Misc for this purpose, with the appropriate
information on how the preprint was published in the optional fields. In the
future, TEXMACS might support a few additional entry types for preprints and
modern kinds of electronic publications.
address. Publisher's address, usually just the city, but possibly the full
address.
6.5 BIBLIOGRAPHIES 119
institution. The institution that was involved in the publishing, but not
necessarily the publisher.
key. A hidden field which specifies how to sort the entry in a bibliography.
Notice that this field is different from the entry's BIBTEX key that is used
for citations and cross-references.
series. The series of books the book was published in, such as Astérisque or
Lecture Notes in Computer Science.
type. The field overriding the default type of publication (e.g. “Preprint”
or “Research Note” for Techreport, “Habilitation” for Phdthesis, or
“Section” for Inbook/Incollection).
BIBTEX entries that were downloaded from the web often include other non-
standard fields such as a DOI or publisher-specific information. These fields
are ignored by the traditional BIBTEX styles, but can be useful for other biblio-
graphic software or non-standard styles. In the future, TEXMACS might provide
its own non-standard extensions of this kind.
Names. BIBTEX expects a name or a list of names for the values of author and
editor fields. You must use and as a separator when entering more than one
name:
author = {G. H. Hardy and E. M. Wright}
BIBTEX names consist of four parts: a first name, an optional “von” part, a last
name, and an optional Jr. part. Simple names without von-parts or suffixes can
be entered in two equivalent ways:
author = {Albert Einstein} or
author = {Einstein, Albert}
You are allowed to use abbreviations instead of first names:
author = {C. St. J. A. Nash-Williams} or
author = {Nash-Williams, C. St. J. A.}
BIBTEX recognizes “von” parts via the use of lowercase between an uppercase
first and last names:
author = {John von Neumann}
Unfortunately, the way these “von”-parts are handled by most BIBTEX styles is
far from satisfactory. For instance, in order to correctly sort the author of this
book in a bibliography, you must use
author = {Hoeven, Joris van der}
6.5 BIBLIOGRAPHIES 121
instead of
author = {Joris van der Hoeven}
Special suffixes such as Jr. or IV in “Henry IV” are entered as follows:
author = {Johnson, Jr., John}
Titles. BIBTEX styles may change the case of titles when appropriate. Titles
of books are usually capitalized, unlike those of articles. In BIBTEX, it is rec-
ommended to capitalize titles in the same way as in the original work. For
instance:
title = {Factoring Polynomials with
Rational Coefficients}
Inside an actual bibliography, this title is typically transformed as follows:
[LLL82] A.K. Lenstra, H.W. Lenstra, and L. Lovász. Factoring polynomials with rational
coefficients. Math. Ann., 261:515–534, 1982.
In order to prevent names of people or places to appear in lower case, you may
surround them by curly braces:
title = {An Algorithm for the Machine Calculation
of Complex {Fourier} Series}
Inside a bibliography, such a title might yield
[CT65] J.W. Cooley and J.W. Tukey. An algorithm for the machine calculation of
complex Fourier series. Math. Computat., 19:297–301, 1965.
The same mechanism applies to German nouns, which must always be capi-
talized.
When editing BIBTEX entries in plain text format, we saw in section 6.5.4.3 that
various contortions were necessary for editing names and titles. Formulas also
need to be “encoded” using LATEX pseudo-code. These disadvantages disap-
pear when using the integrated editor, although a few new rules need to be
followed in order to get your entries right:
• When entering titles, do not capitalize, except for the first character and
names or concepts that always must be. For example, use “Riemannian
geometry” instead of “Riemannian Geometry” and “Differential Galois
theory” instead of “Differential Galois Theory”.
• The database tool maintains the full history of all data, while keeping
track of the persons behind changes. This is useful for the resolution of
conflicts when importing data from a file sent by a colleague.
We recall that the database tool can be enabled using Tools Database tool.
6.5.6.4 Versioning
The database keeps track of the full history of all entries. As in the case of
popular versioning tools such as SVN or GIT, the history includes information
about the dates when modifications were made and by whom.
Every entry in the database also keeps a record of all previous versions of the
entry. This is useful in the following scenario: you send an entry to a colleague,
who modifies it, and sends it back. When importing the modified entry, the
datatool automatically recognizes that it is a newer version of an existing entry.
However, if you modified the entry as well in the meantime, then your per-
sonal modification will be preferred.
The above mechanism applies automatically when a colleague sends you file
that contains a bibliography: TEXMACS will attempt to enrich your personal
database with all the bibliographic entries that it can find in the file. If you
do not like this feature and wish to retain more manual control, then you can
disable it in Data Preferences. In that case, importations have to be done man-
ually, as described in section 6.5.6.3.
6.6 LARGE DOCUMENTS 125
Title
Table of contents
⋅⋅⋅
Include c1.tm
Include c2.tm
⋅⋅
⋅
Bibliography
Attached
Figure 6.6. Schematic representation of a book project with a master and individual chap-
ters.
You should also enable paper mode (Document Page Format Page rendering
paper) in order to get the page numbers right when updating the document.
Notice that the project file is rarely edited itself: this only happens when you
modify the main structure of the book, e.g. by adding a new chapter. The main
book style and other global layout properties should also be specified in the
master file.
Now assume that we have a separate file c2.tm with a chapter that we wish
to include in the book. Then you should first include the chapter at the appro-
priate place in the master file using Insert Link Include. In the chapter file
itself, you also have to attach the chapter to its master, using Tools Project
Attach master. If all this is done correctly, then the master file and the indi-
vidual chapter files should be accessible through the top-level Project menu.
Tables of contents, bibliographies, etc. can directly be inserted into the master
file in the usual way. See Figure 6.6 for a summary.
Since the actual editing is done in the chapter files, it is most convenient to
select papyrus mode (Document Page Format Page rendering papyrus) for
them. For consistency, you may still wish to use the same book style and global
layout properties as for the master file, although this is not mandatory.
Page numbers, chapter numbers, bibliographic citations, and cross references
between different sections are taken care of by TEXMACS in a semi-automatic
way: from time to time, you need to update the master file in order to get all
numbers and further references right. It is recommended that you save the
master file after such updates; this ensures that references remain up to date
after closing the editor and re-opening one of the chapters. For the compu-
tation of page numbers, it is also important to enable the paper mode for the
master file. Whenever you modify the main book structure, some individual
chapters occasionally may need to be updated as well.
Chapter 7
Advanced layout facilities
It the first section, we describe a few general principles that may be useful to
keep in mind when working on the layout of your document. In the remainder
of the chapter, we continue with a description of some of the more advanced
layout features inside TEXMACS that can be used to put these principles into prac-
tice.
Purpose
Whenever you are inclined to use a special style for some portion of text, rule
number one is to ask yourself the question “Why?” The more conscious you
are of the precise purpose of a style element, the more likely you will opt for a
graphical presentation that correctly conveys its intent. Take for instance the
graphical interface elements “menu” and “keyboard shortcut” in this book.
Their purpose is to make it immediately clear for the reader that File Open
corresponds to a TEXMACS menu entry and - - > to a series of keystrokes. In
this case, we chose a presentation that mimics physical appearance: the font
for the menus is the same as the menu font inside the editor and the little boxes
around the keystrokes remind of the keys on your keyboard.
Part of these considerations can be aesthetic: alternate fonts are often chosen
for their contrast with the main font. This is why we chose a sans serif font
for the section titles in this book. For the main font, we preferred the more
recreational TEX Gyre Pagella font (a variant of PALATINO) over the more well-
known but sterner Computer Modern Roman and Stix fonts.
Uniformity
Another important rule is to stick to your own design decisions. For example,
if you decide to use an italic font for important text, then you should do so
127
128 ADVANCED LAYOUT FACILITIES
throughout your document: nothing is more confusing for the reader than sud-
denly switching to a bold font for no apparent reason.
By its very design, TEXMACS makes it easy to achieve uniformity: the most
common style elements are directly available through the interface and their
rendering can be customized when needed. The macro system also allows to
add new style elements of your own. Still, even though the interface invites
you to use appropriate markup in a systematic way, you should not forget
to do so!
Minimality
When introducing new style elements using the macro system, it is also recom-
mended to introduce new macros only if you really need them. In a botanical
guide, it would in principle be possible to introduce separate macros for the
names of mosses, flowers, conifers, and cycads. But would this really be a good
idea? Maybe so, if they require four different renderings; otherwise, a single
macro “name” or “plant” should suffice.
Standard conventions
7.1. The convention is due to the observation that “comma,” looks a bit nicer than “comma”, typo-
graphically speaking. As a compromise, we suggest to put the “comma”, outside the quote, but to
precede it by negative whitespace.
7.1 GENERAL STYLE CONSIDERATIONS 129
Specialization
Specific contexts may also call for the temporary suspension of general rules.
For example, modern bibliographies often contain hyperlinks that are hard to
break. It is therefore wise to somewhat relax the rules for line breaking inside
bibliographies. A similar remark applies for the output formulas in computer
algebra sessions.
As soon as you identified a style element that should serve a certain purpose,
you have to start thinking about the best way to render this element. If you
are lucky, then TEXMACS already contains a markup element that does precisely
what you want. Otherwise, you should search hard for the appropriate fea-
tures in TEXMACS that allow you to achieve the desired effect in a systematic
and automated manner. This chapter describes several of the finer tricks that
you may find useful.
A similar remark applies to the global layout of your document: if you need
a particular design, then it is a good practice to always search for an existing
TEXMACS style that comes close to what you want. At a second stage, you may
select additional style packages or customize some of the macros. If you decide
to change major parameters such as the page size or margins, then it may be
useful to be aware of proportions that are particularly pleasant to the eye. We
refer to [4, chapters 2 and 8] for more information.
Trade-offs
There is often a trade-off between various design goals. For example, alter-
nate fonts should typically be sufficiently similar to the main font (in order
to “mix” well), but also sufficiently distinctive (in order to avoid confusions).
A similar issue came up in the present book: it is natural to use specific markup
for various purposes: important concepts, menus, keyboard shortcuts, source
code, TEXMACS markup, names of TEXMACS styles or environment variables, etc.
130 ADVANCED LAYOUT FACILITIES
However, one quickly runs out of the available fonts if one insists on having
a different rendering for each of these style elements. When facing these kinds
of dilemmas, it is often impossible to find a completely satisfactory solution,
and one is condemned to opt for the lesser evil. Yet, the general rules that we
described so far may act as a guide.
Typography is an “art” that has been developed ever since the invention of
printing. Although computer programs have become pretty good typogra-
phers, machines do not always manage to keep up with human competition.
The first reason for this is that the implementation of high quality typesetting
algorithms requires a lot of effort. Besides the fact that only few developers are
willing to make this investment, it is not always clear how to mimic traditional
human skills. Although TEXMACS attempts to keep pace with state-of-the-art
technology, a lot progress can and probably will be made in the future.
Secondly, some of the finer details are a matter of taste and may depend on the
actual content or purpose of a document. The typesetting process in particular
depends on many parameters. Although default values can be implemented
that work reasonably well on the average, you may wish to override these
settings for particular purposes (recall the above discussion about “specializa-
tion”). For this, it is important to understand the typographic challenge that
such a parameter was meant to address.
Personal taste
You may have noticed that we chose to separate distinct paragraphs by vertical
whitespace. In many books, the first lines of paragraphs are rather indented.
Why did we prefer the first option? By its very nature, this book contains
a wide variety of markup elements and figures. This causes a lot of “disorder”
that would be further aggravated by indenting the first lines of paragraphs.
One of the most delicate tasks of the typesetter is to break paragraphs into
successive lines. The line breaking problem is most difficult for narrow para-
7.2 LINE BREAKING 131
graphs that you can see in newspapers or magazines. Whenever a long word
does not fit on a line, moving it to the next line typically requires the insertion
of a lot of whitespace. If a paragraph is justified, then this leads to annoy-
ingly large spaces between words. Professional typesetters use a combination
of techniques to deal with this problem:
The simplest method to break lines is the so-called “first fit” algorithm. It
processes the lines one by one and simply finds the best possible break for each
line. One important drawback of this algorithm is that a much better break
can sometimes be obtained for a given line by using a non-optimal break on
one of the previous lines.
The algorithm that TEXMACS uses for line breaking can be specified in Docu-
ment Paragraph Line breaking: the global method corresponds to professional,
and the first fit strategy to normal.
7.2.2 Hyphenation
to always specify the correct language for your documents in Document Lan-
guage. If you need to combine text written in more than one language, then
you may locally change the language using Insert Language.
Ordinary words are hyphenated using “-”. Inside verbatim text, words may
also be hyphenated after slashes; this is useful for long hyperlinks in the ref-
erences. Long numbers are hyphenated using backslashes, as in the following
example:
Pari] 200!
%1 = 7886578673647905035523632139321850622951359776871732632947425\
3324435944996340334292030428401198462390417721213891963883025764279\
0242637105061926624952829931113462857270763317237396988943922445621\
4516642402540332918641312274282948532775242424075739032403212574055\
7956866022603190417032406235170085879617892222278962370389737472000\
0000000000000000000000000000000000000000000000
If, for some reason, you don't like a particular line break, then you may man-
ually override it. This can be done in two ways: by specifying suitable breaks
or by forbidding bad breaks.
Suitable breaks can be forced explicitly using Format Break Line break. If para-
graphs are justified, then explicit breaks will appear at the right-hand border.
Alternatively, you may insert “new lines” using Format Break New line. This
causes the typesetter to start a new line without stretching the current line to
its right border: see Figure 7.1.
You may explicitly forbid a break using Format Break No line break. Such
prohibitions are most frequent around spaces. For this reason, TEXMACS also
provides so-called “non-breaking spaces”, which can be inserted using ␣ ⇥ .
For instance, it is recommended to systematically precede theorem and
equation numbers by non-breaking spaces, as in Theorem 123 and Equa-
tion (1.2.3). Besides non-breaking spaces, it is also possible to insert “non-
breaking hyphens”, using - ⇥ .
7.2 LINE BREAKING 133
TEXMACS also provides a way to forbid line breaking altogether inside a given
region of text: just select the “unbreakable text” and apply Format Break
Group Horizontal. This mechanism may in particular serve to disable line
breaking inside subexpressions of mathematical formulas.
One disadvantage of explicit line breaks is that they tend to provoke disaster
whenever you make further changes in a paragraph. Indeed, a perfect explicit
break near the end of a line may suddenly find itself at the start of the next line,
thereby causing it to be filled with whitespace. By contrast, explicit prohibi-
tions at inappropriate places will simply be ignored. Unless you are preparing
the very final version of a document, explicit line breaks should therefore be
avoided.
7.2.4 Microtypography
a3 b c a4 c b5 a b4 a2 b 3
+ + + + +
11612160 129024 193491763200000 107495424000 149299200
a3 b 2 a4 b a5
+ +
414720 2304 32
Another technique is to stretch individual glyphs. On the one hand, glyph expan-
sion allows for a further reduction of the amount of whitespace between indi-
vidual words by increasing the widths of the glyphs. On the other hand, glyph
contraction may also allow you to fit an extra word on a line via a decrease of the
widths. Traditional typographers even did better by using special extended or
condensed fonts for these purposes; such fonts are more elegant in combina-
tion with the main font than machine generated imitations through mathemat-
ical transformations.
The glyph expansion and contraction factors can be controlled using Format
Paragraph Advanced Character expansion and Character contraction. Manual
horizontal magnification of fonts is also possible via Format Font effects Mag-
nify horizontally. It is recommended to use a magnification factor between 0.95
and 1.05 if you wish to simulate glyph expansion. TEXMACS finally imple-
ments the emulation of extended and condensed fonts in a way that preserves
the stroke width: Format Font effects Extended and Condensed.
Besides the above strategies for avoiding large whitespaces, TEXMACS also sup-
ports protrusion, which is equally known under the names margin kerning or
hanging punctuation. This mechanism aims at aligning the left and right mar-
gins of the text in an optical manner, rather than rigidly fitting all text between
two imaginary lines. Protrusion was first used in the very Gutenberg bible.
You may enable it via Format Paragraph Advanced Use margin kerning.
After cutting your text into pieces that fit on successive lines, the typesetter
moves on to page breaking and the assembly of the final pages of your docu-
ment. Page breaking is similar to line breaking, with similar bells and whistles
for controlling the process.
Again, TEXMACS implements both a first-fit and a global algorithm for page
breaking, which can be selected via Document Page Breaking Page breaking
algorithm sloppy and professional. The global algorithm is used by default,
but there are two main reasons why you may sometimes prefer the lower
quality algorithm. First of all, when preparing the final version of a document,
it is convenient to perform one last pass in order to correct suboptimal page
breaks. The problem with global page breaking is that any corrections on later
pages may cause earlier pages to be broken differently. Consequently, mul-
tiple passes may be necessary before all breaks will be to your satisfaction.
We also note that the global page breaking algorithm is more complex and
therefore more time consuming. The algorithm may become particularly slow
in the case of long documents that use a multiple column layout. When editing
such documents in “paper mode”, this causes the editor to become less respon-
sive. With single column layouts, a similar slowdown only occurs for very
long documents.
There are a few global style variables that influence precisely how page
breaking is done. In Document Page Breaking Allowed page height reduction
and Allowed page height extension, you may specify the amounts of space by
which the default page height may be reduced or extended if no suitable break
can be found. “Vertical space stretchability” specifies a multiplier for stretch-
able spaces. We recall that several vertical spaces are stretchable, in the sense
136 ADVANCED LAYOUT FACILITIES
that they may be increased if a page isn't full enough, or decreased when it
is too full. For example, the whitespace around section titles, displayed for-
mulas, and theorems is very elastic. The interparagraph and interline spaces
are also stretchable, but to a lesser extent. When specifying a multiplier dif-
ferent from one for the Vertical space stretchability, you may further increase
or decrease the elasticity of stretchable spaces.
As in the case of line breaking, you may force or forbid page breaks at specific
points in the document. Such directives are indicated through markers. You
may also specify whether you wish the directive to take effect before or after
the line where the marker occurs. For instance, when doing Format Break
Page break after New page, a marker is inserted in the text and a new page
is started right after the line with the marker. Similarly, Format Break Page
break before New double page starts a new page just before the line with the
marker, and inserts one extra page if necessary in order to make sure that the
new page appears at the right-hand side. This feature is useful when starting
a new chapter in a book.
We recall that it is usually better to forbid bad page breaks rather than explic-
itly enforcing good ones. In order to prevent one specific bad break, you may
use Format Break Page break before No page break or Page break after No
page break. You may also forbid any page breaks to occur in a specified region
of text using Format Break Group Vertical.
Simple documents contain a single text flow that is formatted into lines and
pages by the typesetter. More complex documents often include footnotes,
marginal notes, and floating figures or tables, that are interleaved with the
main text in non-linear ways. In particular, each note and each floating object
comes with its own text flow that is typeset independently, before being com-
bined with the main text.
Note that footnotes and floating objects are mainly useful for documents that
are intended to be readable on paper. In order to see where your notes will
appear in the printed document, you must select a page rendering mode that
shows the individual pages (using Document Page Page rendering paper; see
section 3.10).
In Figure 7.3, we have shown an example of two pages in a book that contain
two footnotes, a marginal note, a floating figure, as well as a floating table.
Each of these objects is “anchored” in the main text flow. In the case of a foot-
note, the anchor is displayed in the form of a numeric superscript or a symbol
such as †, ‡, etc. The anchors of marginal notes and floating objects are invis-
ible on paper and indicated through “informative flags” on the screen. The
7.4 MULTIPLE TEXT FLOWS 137
Header Header
Footnote 1
anchors indicate on which page and at which position the notes or floating
objects should be displayed.
The amount of whitespace between the main text flow and headers, footnotes,
floating objects, etc. is controlled by style parameters. For instance, if the cursor
is inside a marginal note, then the Focus Preferences menu (or, equivalently,
the menu on the focus toolbar) allows you to specify its width and the dis-
tance between the main text and the note.
Footnotes are started using Insert Note Footnote. They are numbered and you
may jump between the main text and the footnote by clicking on their numbers
or on the icon. The style preferences in the Focus Preferences menu allow
you to control the length of the separating footnote bar (Page fnote barlen), the
amount of whitespace that separates footnotes from the main text (Page fnote
sep), as well as the space between successive footnotes (Footnote sep). Notice
that page breaking inside footnotes has not been implemented yet, whence
footnotes are assumed to fit on a single page.
138 ADVANCED LAYOUT FACILITIES
The precise position of a marginal note can be controlled via the focus menu
or toolbar. Its vertical alignment with respect to the anchor can be either Top,
Center, or Bottom. Concerning the horizontal alignment, one may force place-
ments in the Left or Right margin, or make this decision depend on the parity
of the page number. If the left and right margins are different on left and
right pages (as in Figure 7.3), then TEXMACS places marginal notes in the largest
margin by default.
Large objects such as figures and tables are often “indivisible” in the sense
that they cannot be cut into several pieces by the page breaker. This causes
a problem whenever the natural end of a page occurs in the middle of such
a figure or table: the object does not fit on the page, but moving it to the next
page will leave an unacceptably large amount of whitespace. One remedy is
to manually move all large objects in a document to places that lead to appro-
priate page breaks. However, any subsequent modifications in the document
may ruin this effort. A better solution is to let the typesetter take care of the
problem by tagging the figure or table to be a floating object.
You may insert a floating figure, table, or algorithm using Insert Note Floating
figure, Floating table, resp. Insert Note Floating algorithm. More generally,
you may use Insert Note Floating object in order to create a floating object
with arbitrary content. Existing figures, tables, and algorithms can also be
turned into floating objects a posteriori by clicking on the icon or Focus
Make floating.
7.5 FINISHING TOUCHES 139
Whenever you allow an object to float, the page breaker may freely move it to
the top or bottom of the page, and even to the next page. Nevertheless, floating
objects always appear in the same order as their anchors in the main text flow.
The precise positions to which floating is allowed can be specified using Focus
Allowed positions or . The style parameter that controls the amount of white-
space between floating objects and the main text can be changed using Focus
Preferences Page float sep.
When you are editing a floating object, you may jump to the corresponding
anchor by clicking on the icon or Focus Go to anchor. Conversely, if your
cursor is just after the anchor, then clicking on one of these buttons will posi-
tion your cursor at the start of the floating object. Note that page breaking
inside floating objects has not been implemented yet. This means that floating
objects should always fit on a single page.
Most finishing touches are of a very visual nature; they typically correct a few
remaining problems that keep hurting your eye. As such, the adjustments may
crucially depend on particular line or page breaks, or the font that you use.
This also means that any further change in the document has the potential of
wrecking your work. For instance, assume that you inserted negative spaces
into a formula so as to make it fit on a line. If a subsequent change in the para-
graph results in removing a word from this same line, then it could become
“underfull” instead of “overfull”, and your negative spaces will do more harm
than good.
For this reason, it is recommended to perform the final fine-tuning only at the
very, very end. It is also worth it to invest a little thinking in how to make
the adjustments. For example, if some specific page break does not suit you,
then you have two options: preventing this break, or forcing a break at a more
appropriate place. The second option may cause disaster if you insert new
material on the previous pages: the forced break might very well migrate to the
top of a page. Preventing ugly page breaks is the more robust solution: a bad
break is likely to remain bad even after modifications earlier in the document.
Another example concerns fine-tuning the position of a subscript in a formula
such as Γa. Indeed, this formula looks better if the a is moved slightly to the
left, yielding Γa. If you use an absolute length such as 1 mm for this kind of
repositioning, then the formula will not look as good whenever you switch
to a different font size, or copy and paste it inside another subscript or super-
Γa
script: Γa + e Γa + e e . This problem can be avoided by using a length unit that
Γa
is proportional to the font size, such as em: Γa + e Γa + e e .
Due to evolutions inside TEXMACS, we notice that this kind of fine-tuning may
occasionally lead to incorrect results when re-opening an adjusted document
with a newer version of the editor. For example, the current version of TEXMACS
produces Γa on our original example formula and Γa when applying exactly
the same adjustments as above. This is one side-effect of the maturing process
of the typesetter, which has recently been educated to automatically move sub-
scripts of Γ somewhat to the left. The precise correction depends on the font
and can still be overridden via manual fine-tuning.
Whereas abcd descends below the line, Whereas abcd descends below the line,
ex
the iterated exponential e e is rather ex
the iterated exponential e e is rather
high. high.
Figure 7.4. Vertical spacing with and without shoving-in.
The vertical spaces really act as padding: assume that you specified a “ver-
tical space after” of 1 cm for some paragraph and a “vertical space before” of
5 mm for the next paragraph. Then the resulting space between these two para-
graphs will be the maximum 1 cm of both values. This is very useful for the
design of environments that are surrounded by vertical padding, such as the-
orem: the mechanism ensures that the same amount of space that separates
the theorem from other text is also used for the separation between two con-
secutive theorems. When using “hard spaces” instead of padding, the space
between two consecutive theorems would become twice too large (you may
have encountered this annoying behavior in LATEX).
Adding padding around environments is so common that TEXMACS actually
provides a special padded tag for this, which can be inserted using Insert
Prominent Padded. The Focus Preferences Padding above and Padding below
menus allow you to specify the default amount of padding. We recommend
to base padded environments of your own design on the padded tag when-
ever possible.
If you want to insert vertical space between two specific lines (instead of para-
graphs), then you may use Format Whitespace Rigid box, as described in the
previous section. In this particular case, you should take 1 cm for the width of
your space; the height and the depth will determine the amount of whitespace
with respect to the previous and the next line.
The default vertical spacing between lines can be set via Document Paragraph
Interline space. You may also specify an additional space between successive
paragraphs using Document Paragraph Interparagraph space. An alternative
way to indicate the start of a new paragraph is to indent its first line; in that
case you may take zero for the interparagraph space and control the precise
amount of indentation using Document Paragraph First indentation.
The most common length unit for vertical spacing is fn. Occasionally, the
length unit fns may also be of use: the minimal and default values of 1 fns are
both 0 fn, but its maximal value is 1 fn. This allows for the insertion of extra
vertical whitespace on underfull pages only. Several TEXMACS styles in which
paragraphs are indented use 0.5 fns as the default value for the interpara-
graph space. The interline space can be increased similarly, using Document
Paragraph Advanced Extra interline space. The default amount of extra inter-
line space is 0.025 fns, which corresponds to the additional stretchability of
one line for every forty lines.
Inline mathematical formulas frequently extend beyond the vertical limits of
the line. TEXMACS implements a special “shoving-in” mechanism that avoids
unnecessarily large spaces between successive lines: see Figure 7.4. To avoid
7.5 FINISHING TOUCHES 143
The fact that the character f is higher than x causes TEXMACS to use larger
brackets for the right-hand matrix. In order to obtain the better-looking
x f
(( 20 20 )) + (( 30 30 )),
y g
it suffices to select the character f and “smash” it using Format Adjust Smash.
The smashed f is displayed as before, but the typesetter is told to believe that
its vertical extents are the same as for the character x. It is also possible to
reduce the vertical extents by an explicit amount of space using Format Adjust
Reduce. Inversely, you may “inflate” the character x using Format Adjust
Inflate, and thereby pretend that it has the same vertical extents as the largest
character in the font, e.g. f .
Further types of adjustments that you may find in the Format Adjust menu are
the following:
Move. Explicitly move a subformula by both a horizontal and a vertical
amount of space. This can both be used for fine-tuning and for graph-
ical effects such as bubbling.
Shift. This is a variant of Move with this difference that the extents of the
object are not altered by the shift. In other words, shifting does not alter
the typesetting of any surrounding text; it just displays the shifted object
at another place.
Resize. Explicitly modify the extents of a piece of text (i.e. its left, right,
bottom, and top limits), without changing its rendering. The above
mechanisms of smashing, inflation, and reduction are all special cases
of resizing.
Extend. Similar to Resize except that we specify increments with respect to
the default extents.
144 ADVANCED LAYOUT FACILITIES
Clip. Similar to Resize with the difference that the piece of text is “clipped”
to remain inside the specified bounding box. For instance, when clip-
ping the text “clipped” vertically to the extents of the character “x”, we
obtain clipped.
When specifying the length arguments for the above constructs, you may use
the length units w and h for the width and height of the original content. You
may also use l, r, b, and t for the left, right, bottom, and top limits.
7.5.4 Phantoms
Phantoms are yet another typesetting technique that is occasionally useful.
A piece of text can be turned into a phantom by selecting it and applying
Format Special Phantom. The phantom text is treated similarly to the original
text, except that it is rendered using invisible ink. Let us give two examples
of how to apply this feature.
Tensors are objects that may contain subscripts and superscripts, but for which
the subscripts and superscripts need to be aligned in a precise manner:
j il
Ai k ⋅ Bj .
This effect can be obtained by inserting a phantom superscript i above the sub-
script i of A, followed by a phantom subscript j below the superscript j, and so
on.
Another example is a book on polynomial elimination, which typically con-
tains many explicit polynomials in a finite number of variables, such as
x 1 x 26 x 3 + 5 x 15 x 33 − 7 x 2 x 37 − 2016 x 38.
The subtle typographic problem here is that the subscripts of x 1 and x 26 are
not aligned, due to the fact that x 1 has no superscript (no need to move the
subscript further downwards). One possible remedy is to use “phantom 1”
superscripts whenever a variable occurs without any exponent:
x 1 x 26 x 3 + 5 x 15 x 33 − 7 x 2 x 37 − 2016 x 38.
Of course, it would be even better if TEXMACS implemented a special style para-
meter that allows similar subscripts and superscripts to be placed automatically
at the same level.
Hi there!
!
re
he
e!
Hi ther
it
Hi there!
H
Hi t
re! he
Hi there!
Skew(-0.333) Skew(0.25) Skew(0.333) Skew(1) Skew(1.5)
Hi there! Hi there! Hi there! Hi there!
( 1.2 0.2 )
Linear 0.2 1.2 ( 1.5 0.8 )
Linear 0.6 1.2 ( -1.5 0.4 )
Linear -0.5 1.4 ( 0.3
Linear 1.2 -0.4
1
) ( 1.4
Linear -0.3 0.8
1.6
)
re! !ere h
the
Hi ther Hi
e!
t iH
Hi ther
e r e ht iH e!
!
Figure 7.5. Applying several linear transformations to the text “Hi there!”.
that linear transformations can be applied to any kind of content, both text and
graphics. In sections 7.7 and 7.8 below, we will discuss several transformations
and effects that are applied more specifically to text or graphics. Figure 7.5
demonstrates various common linear transformations.
Figure 7.6. Basic font effects for various values of their corresponding parameters.
nisms uses a sophisticated algorithm in order to preserve the pen width. How-
ever, this results in a lower “ink density” for wider fonts. For high quality
emulations of condensed and extended fonts, a good compromise might be
to use a combination of both mechanisms; see Figure 7.7 for a comparison.
Besides emulations of common font styles, TEXMACS also implements a few
more artistic font effects: see Figure 7.8. These effects involve random, so-called
Perlin noise. The Degraded effect conserves the general shape of glyphs, but
randomly removes little regions of pixels. The size of these regions is con-
trolled using the “frequency” parameter, whereas the amount of degradation
depends on the “threshold” parameter. You may use Distorted in order to ran-
domly distort glyphs at their boundaries. Such distortions work “both ways”
in the sense that ink may leak to the outside or be moved further inside. If
you don't want to permit leaks to the outside, then you may use the Gnawed
effect instead.
It is worth pointing out that the control parameters of all font effects are envi-
ronment variables. As such, you may both modify them locally, using the
fields on the focus toolbar, or globally, via Focus Preferences Style para-
meters. For example, assuming that your cursor is inside a degraded tag, you
may change the default degradation threshold from 0.667 into 0.6 using Focus
Preferences Degraded threshold Other.
We also note that many of the above font effect rely on low-level bitmap oper-
ations on the font glyphs. This means in particular that the transformed fonts
are no longer vectorial “Type 1” fonts, but only “Type 3” bitmap fonts. Some
publishers prohibit PDF files that include such fonts. This drawback might
vanish in future versions of TEXMACS with the development of vectorial coun-
terparts for all font effects. Font emboldening, slanting, and magnification are
already vectorial.
Increasing thickness
Increasing aspect ratio
Increasing angles
Figure 7.10. Various pen widths, heights, and angles for Gaussian thickening.
150 ADVANCED LAYOUT FACILITIES
The next group of effects is built on top of the above more basic effects through
superposition, intersections, and recoloring. The effect adds a Gaus-
sian drop shadow to the text in a color that can be specified by the user. The
effect is a variant in which the roles of the shadow and the main
text are interchanged. Alternative ways to “raise” or “emboss” text are
and . The opposite effects are and .
Engravings require the colors and pen parameters to be chosen with care, as
in Figure 7.11, where we put a golden formula on a granite background, using
“pastel yellow” for the shadow color.
The random effects , and are similar to the corresponding
font effects. One advantage of the graphical variants is that they can be applied
to text as well as pictures: see Figure 7.12.
151
152 DRAWING PICTURES
the current cursor position using the mouse (or a pen in the case that you have
a tablet).
The following formula shows an example of drawing a picture over an existing
formula:
Hypothenuse
a 2 + b 2 = c2
Figure 8.2 shows a similar example in which the red oval was inked over
the text. When making laptop presentations, it can be extremely useful to
put graphical and mathematical annotations on top of existing pictures:
see Figure 8.3.
By design, graphical annotations (created using Draw over selection or Ink here)
are drawn on top of the annotated text. Annotations are also allowed to par-
tially overlap with the surrounding text. The amount of permitted overlap
can be specified using Insert Geometry Overlap. This basically determines
the region where you are allowed to draw.
a2 b2
c2
Figure 8.3. Picture of a Pythagoras tree with mathematical annotations. The picture is due
to Atze van der Ploeg and freely available from WIKIMEDIA.
8.2 STARTING NEW PICTURES 153
Cartesian Polar
Logarithmic Notebook
You may exit the graphics mode using Focus Exit graphics or . You may
re-enter the graphics mode by clicking inside the annotated text; alternatively
you may put your cursor just behind the annotated text and use Focus Enter
graphics or . The annotated text itself can be edited by replacing the draw-
over tag by a draw-under tag using Focus Draw over Draw under (or Insert
Geometry Draw over from inside the graphics mode).
In the menu Insert Grid or it is possible to adjust the colors of the axes and
the grid-lines, as well as the number of subunit grid-lines per unit grid-line.
By default, grids are printed; you need to remove them after completing your
drawing if you do not want them to appear in print.
The origin of the grid is initially set at the center of the screen. You may scroll
the picture using the arrow keys ← , → , ↑ , ↓ (or ⇧← , ⇧→ , ⇧↑ , ⇧↓ if you want to
move fast). The default unit for grids is 1 cm. You may specify a different unit
using the menu Insert Geometry Unit or Unit. You may also zoom in and
out using + and - , Insert Geometry Zoom, or Zoom.
154 DRAWING PICTURES
When drawing pictures, the user interface of TEXMACS works in a slightly dif-
ferent way than in text mode. Before going into more details, let us briefly
summarize the main design philosophy behind the graphical editor.
We have already encountered the icons and for specifying the global
properties of the image and of a guiding grid.
a b c
a b
Figure 8.6. A posteriori editing of polylines. Figure 8.7. A filled polygon and polyline.
156 DRAWING PICTURES
control point can be inserted on an existing line segment using the same tech-
nique. In order to do so, hover the mouse pointer over the edge where you
want to insert a new point; the two neighboring control points should be high-
lighted (Figure 8.6c). Then start dragging and a new control point will appear.
When hovering over a control point, the right mouse button or the ⌫ key can
be used to remove it. When holding the shift key ⇧ while clicking on the right
mouse button, the entire object will be removed.
Polygons are a variant of polylines for which the last and the first control point
are also joined by a line. You may draw them using or Insert Polygon. The
style properties allow you to specify a fill color or pattern for the interior of
a polygon (Figure 8.7a). Broken line objects may also be filled, but the result
usually looks less nice (Figure 8.7b).
Circles and arcs of circles
You may enter “insert circle mode” using or
Insert Circle. New circles are inserted by speci-
fying three points on the circle using single mouse
clicks. Arcs of circles are inserted in a similar way,
provided that you are in “insert arc mode” ( or
Insert Arc). As usual, the three control points can Figure 8.8. A filled circle and
be moved a posteriori by dragging them using the a circular arc, together with
mouse. The style properties allow you to specify their three control points.
a fill color (Figure 8.8).
Smooth curves
Smooth curves are similar to polyline objects with this difference that they are
nicely rounded at the control points. You may draw smooth curves using
or Insert Curve; their closed variants can be obtained through or Insert
Closed curve. New curves and control points can be inserted in the same way
as for polyline objects and polygons. Removal and a posteriori editing of con-
trol points also works similarly.
TEXMACS supports two types of smooth curves: splines and cubic Bezier curves.
Splines are the default type of curves for and . The precise shape of a spline
curve is determined as a function of all control points. Moving a control point
will therefore affect the whole curve and not just the neighboring parts, even
though the changes will be most prominent near the control point. By con-
trast, the shape of individual pieces of a Bezier curve is entirely determined
by the four closest control points.
The differences between splines and Bezier curves can be seen in Figures 8.9a
and 8.9b. The banana from Figure 8.9a is a closed spline with four control
points. Figure 8.9b shows the closed Bezier curve that is obtained by using the
same control points.
The banana from Figure 8.9b is actually a “simplified” Bezier curve, that was
inserted using Insert Closed curve Closed smooth. More general (cubic) Bezier
curves have two types of control points: principal control points that lie on
8.4 GRAPHICAL OBJECTS 157
a b
a b c
Figure 8.9. Comparing splines and Bezier curves. Figure 8.10. Bezier curves with general tangents.
the curve and additional control points that specify the tangents of the curve
at these principal control points. Every principal control point is surrounded
by exactly two control points for controlling these tangents. In Figure 8.9c we
have drawn yet another banana by using such a general Bezier curve. Notice
that we specified both a horizontal and a vertical tangent at each of the two
endpoints of the banana.
General Bezier curves are inserted using Insert Curve Bezier or Insert
Closed curve Closed Bezier. They are a bit more awkward to edit because
of the different types of control points. But they are very useful for tech-
nical drawings that require very precise control over the curves. For
instance, it becomes possible to alternate straight and rounded portions
within the same curve (Figure 8.10a). They also allow you to draw heart-like
shapes (Figure 8.10b).
Text objects and mathematical formulas
Ordinary text can be incorporated into pictures after switching to “insert text
mode” ( or Insert Text). In this mode, a mouse click inserts a text object at
that position. While editing text, you are no longer in graphics mode, and the
interface will change to the usual one for editing text. In order to return to the
graphics mode, it suffices to click anywhere inside the picture. In case your
picture contains several text objects, you may easily move from one object to
the others using the cursor keys ← , → , ↑ , and ↓ . As usual, text objects can be
moved by dragging them using the mouse and removed using the right mouse
button or ⌫ .
C e πi/2 = i
e πi = −1 e 2πi = 1
G
A B e 3πi/2 = −i
Figure 8.11. Example of text in a picture. Figure 8.12. A picture with mathematical formulas.
158 DRAWING PICTURES
Hand-drawn curves
Sometimes it may be desirable to quickly sketch a picture as if you were
drawing it using a pen on a sheet of paper. This is particularly natural if you
own a tablet PC or if you connected an external graphical tablet to your com-
puter. The graphical editor offers a special “inking mode” to this purpose,
which is entered using or Insert Hand drawn.
If you own a graphical tablet with a pen, the
“inking mode” allows you to directly draw
curves on the screen. It is also possible to “ink”
using a traditional mouse by holding the mouse
button down while drawing. Currently, the
inking mode produces straightforward polylines
that can be edited a posteriori as described above.
Notice however that inked curves usually contain
many control points, which makes it tedious to
edit them one by one. On the other hand, global Figure 8.13. Hand-drawn greeting.
transformations are easy to apply a posteriori, as
explained in section 8.6.
Figure 8.14. Closed splines with various line and fill colors. Figure 8.15. Pattern fill demo.
Color
This property applies to any of the graphical object types and specifies the line
or font color. The color can either be selected from a fixed palette of common
colors, using a special color picking window (Focus Color Palette), or by
name (Focus Color Other). TEXMACS supports many familiar colors by their
English names, such as red, purple, gold, or olive. In addition, you may use
hexadecimal values of the form #rrggbb, such as #c04080 (75% red, 25% green,
50% blue).
Fill color
This property applies to all graphical object types except text and mathematics.
It specifies a fill color for the object. Notice that TEXMACS also allows you to
specify a pattern for the fill color (see Figure 8.15).
Opacity
This property applies to all graphical object types and specifies an opacity
between 0% and 100%. The default is 100% and lower opacities will make the
object more transparent (see Figure 8.16).
Line width
The line width property applies to all curves (polylines, splines, Bezier curves,
arcs, circles, and their closed variants), including curves that may occur inside
other graphical objects (such as arrows with text). The default line width is 1 ln,
which corresponds to the width of the fraction bar in mathematical formulas.
Figure 8.17 shows the effect of changing the line width. It is recommended
160 DRAWING PICTURES
0.5 ln
1 ln
2 ln
5 ln
2 mm
to use ln as a unit for line widths, but any other length unit such as mm is
also allowed.
Horizontal Vertical
10 ln 5 ln
10 ln 10 ln
5 ln 10 ln 20 ln
10 ln 20 ln
20 ln 5 ln
20 ln 10 ln
20 ln 20 ln
Figure 8.20. Varying the horizontal dash unit. Figure 8.21. Varying the pattern dash units.
of dashes. This makes dashed curves look better, especially when they are
closed or when they have arrows: see Figure 8.20.
In the case of two-dimensional dash patterns,
you may specify both a horizontal and a ver-
tical dash unit using Focus Line dashes Unit
Other. In the case of “wave pattern dashes”, the
horizontal and vertical unit respectively con-
trol the wave length and the amplitude: see
Figure 8.21. In Figure 8.22, we have also shown
an example of “meander pattern dashes”, with
30 ln for both the horizontal and vertical dash
units. Figure 8.22. Meander pattern dashes.
Line arrows
Several kinds of arrows can be attached to the endpoints of curves using Focus
Line arrows (see Figure 8.23). The orientation of such arrows is determined
by the tangents to the curves at these endpoints.
Figure 8.23. The same segment using different types of “arrows” at the extremities.
162 DRAWING PICTURES
Size Border
Disk Round Square Plus
4 px 1 px
10 ln 1 px
Diamond Triangle Star Cross
10 ln 2 ln
Figure 8.24. Point styles for black line and red fill colors. Figure 8.25. Point size and border width.
Point style
A few different styles are supported for displaying points: solid disks, circles,
squares, diamonds, triangles, stars, and two types of crosses; see Figure 8.24.
Two additional style properties control the size and the line width for drawing
the borders. Notice that the px unit (which stands for the size of a pixel on the
screen) remains constant while zooming in or out. The ln unit is proportional
to other standard units such as cm, so that you may prefer this unit if you want
the points to automatically adjust together with other graphical objects.
Text alignment
For textual and mathematical boxes, it is possible to specify their horizontal
and vertical alignment. The three modes for horizontal alignment are “left”,
“center”, and “right”; see Figure 8.26a. Besides the classical “bottom”, “center”,
and “top” modes, TEXMACS also provides modes for vertical alignment at the
baseline and axis; see Figure 8.26b. We recall that the axis is an invisible hori-
zontal line that goes through the vertical center of the character “x”.
Left b
Right
If you wish to operate on a group of objects, then you may use single clicks on
the right mouse button in order to toggle those objects that should be part of
the group. Alternatively, you may specify a rectangular region by dragging
the mouse while holding the right button down. In that case, all objects inside
the region will be included in the group.
The first group editing mode is entered using or Insert Set properties, and
can be used for modifying the style properties of one or more objects. If you
select a group of objects, then the current properties of the group are shown in
the focus toolbar. You may then modify them there or via the focus menu. If
several objects of the selection have different values for a given property, then
the focus toolbar will indicate “mixed” for that property. In the “set proper-
ties” mode, a left mouse click will simply select the object under your mouse.
The next three modes , , (or Insert Move objects, Resize objects, Rotate
objects) allow you to move, resize, and rotate graphical objects, respectively. If
you selected a group of objects, then the desired transformation can be achieved
by dragging the mouse while holding the left button down. If you did not
select any group of objects, then individual objects can be transformed in a
similar way. In the cases of resize operations and rotations, the center of the
bounding box for the transformed group of objects remains fixed.
The last group editing mode is entered using or Insert Group/ungroup.
Assuming that you selected a group of several objects, a left mouse click groups
these objects together into a single object. Inversely, when clicking on the
resulting “group object”, it is ungrouped back into simpler objects that can
be manipulated individually.
The group editing modes can also be used in order to copy and paste graphical
objects. Assuming that you selected a group of objects, you can copy it to the
clipboard using ⌘w , , or Edit Copy. When pasting this selection using ⌃y ,
, or Edit Paste, a duplicate group will be inserted at exactly the same loca-
tion as the original group. The new copy is automatically selected as a group,
which allows you to immediately apply a transformation to it. This is partic-
ularly convenient in “move objects” mode, in which case you typically move
the pasted group of objects to a new location. If you need several copies at
different locations, the same procedure (pasting and moving to a new location)
can be repeated.
8.7 Snapping
For technical pictures, exactness is important. When drawing freely by hand
or using the mouse on a modern high precision screen, it is not so easy to
specify control points up to the pixel. This makes it hard to draw lines that
are exactly horizontal or vertical. Similarly, it is difficult to make a new line
start at the exact intersection of two curves. What is more, such intersections
usually do not have coordinates that are integer multiples of a pixel. Con-
sequently, what may appear to be the right intersection point on your screen
may look awful when zooming in or printing out on a high resolution printer.
164 DRAWING PICTURES
Snapping is a technique that makes it easier to draw pictures in which lines are
guaranteed to be horizontal or vertical when needed, and for which various
other graphical requirements can be met exactly. The idea is that certain points,
such as control points, grid points, or intersections of curves, are considered
to be “special” by the editor. Whenever you approach the cursor sufficiently
close to such a point, the cursor snaps to it, as if attracted by magic force.
Some of these special points may actually be more special than others. For
instance, a point on a curve is more special than a generic point and the intersec-
tion of two curves is more special than a generic point on one of the intersecting
curves. When two special points are competing for attention, the cursor will
be snapped to the most special one. Sometimes, ambiguities still occur. In
that case, you may use the ⇥ key in order to cycle among all possibilities. For
instance, assume that we drew several curves starting at the same point. If
we want to move the starting point of one of these curves, by dragging it using
the mouse, then we may first need to hit ⇥ one or more times to make sure
that we are adjusting the right curve.
The precise types of points that are considered “special” by the editor can be
controlled by toggling the items in the Snap menu on the focus bar. The active
kinds of snapping are indicated by the icons next to this menu; they can be
deactivated by clicking on the corresponding icons. TEXMACS currently imple-
ments the following kinds of snapping (see Figure 8.27):
None. Deactivate all forms of snapping (except snapping to control points).
Grid points. ( ) Snaps to all grid points. For a standard Cartesian grid,
this means that we snap to points (x, y) for which both x and y are inte-
gers (or multiples of 1/n in the case when n subunit steps are used).
Grid lines. ( ) Use snapping to all horizontal and vertical lines that join
two grid points. For a standard Cartesian grid, this means that we snap
to points (x, y) for which x or y is an integer (or a multiple of 1/n in the
case when n subunit steps are used).
Grid-curve intersections. ( ) For snapping to intersection points between
curves drawn by the user and horizontal or vertical lines that join two
grid points.
Curve points. ( ) Snap to arbitrary points on curves.
Curve intersections. ( ) Snap to intersections between curves, including
self-intersections.
Text corners. ( ) Text objects and mathematical formulas are surrounded
by an invisible rectangular bounding box. The cursor may be snapped
to the corners of this box as well as to the midpoints of the edges. This
kind of snapping is useful for the creation of commutative diagrams, as
explained in section 4.8.
8.7 SNAPPING 165
Hello
Hello world
A B
C
Figure 8.27. Illustration of the different kinds of snapping that are supported.
Text borders. ( ) This variant of the above way of snapping can be used
for snapping to arbitrary points on the bounding box. This is useful if
your text needs to be connected to many other graphical elements using
arrows.
Two additional parameters control the precise way that snapping takes place.
The “snapping distance” can be changed using Snap Snap distance; when
approaching a special point closer than this distance, your cursor will snap.
The default snapping distance is 10 pixels. People who are skilled with the
mouse may prefer a smaller distance, whereas larger distances are typically
more adequate on high resolution screens. When drawing pictures that con-
tain many small details, snapping occasionally becomes annoying. Besides
changing the snapping distance, another useful trick for such situations is to
zoom in using + , edit the details, and then zoom back out using - .
For text objects and mathematical formulas, you may also specify the “text
padding” using Snap Text padding. This quantity controls the additional
padding to be inserted between the physical bounding box of the text and the
logical bounding box for snapping purposes.
Interactive geometry programs such as C INDERELLA, D R . G EO , or
GEOGEBRA [48, 12, 30] implement a further improvement with respect to snap-
ping: geometric constructions. Assume for instance that we constructed a picture
with two intersecting circles 𝒞 1 and 𝒞 2, together with a line segment ℓ between
the two intersection points. In interactive geometry programs, this line seg-
ment ℓ is automatically updated when moving the control points of 𝒞 1 or 𝒞 2.
In TEXMACS, the cursor is only snapped to the correct intersection points when
drawing ℓ. If you change 𝒞 1 or 𝒞 2 afterwards, then you will have to move
the endpoints of ℓ to the new intersection points.
Chapter 9
Laptop presentations
9.1 Introduction
TEXMACS provides a special beamer style for the creation of laptop presenta-
tions. A beamer presentation consist of a series of screens instead of pages.
During a presentation, the screens are displayed one after another, via a remote
controller or special keyboard shortcuts. Using special markup, the screens
can be further subdivided, so as to make part of their content appear progres-
sively or in alternation. The presentation may also contain dynamic elements
such as animations or on-the-fly mathematical computations.
There exist two main types of screens: textual and graphical ones. Textual
screens are simply pages of the size of your screen and similar formatting rules
apply as on ordinary paper. In particular, a consistent layout is guaranteed
throughout the presentation. Graphical screens are pictures of the size of your
screen with an optional title. Text can be placed anywhere inside such pic-
tures and freely moved around. It is also easy to insert other graphical objects
such as polygons, circles, and more general curves.
166
9.2 THEMES AND STYLE OPTIONS 167
Bluish Parchment
Multiplication in Fq[X] 1/1 Multiplication in 𝔽q[X] 1/1
Kronecker : MFp(n) = O(I(n log p)) if log n = O(log p) Kronecker : M𝔽p(n) = O(I(n log p)) if log n = O(log p)
SchönhageStrassen : MFq(n) = O(n log n log log n MFq(1)) if char Fq > 2 Schönhage–Strassen : M𝔽q(n) = O(n log n log log n M𝔽q(1)) if char 𝔽q > 2
Schönhage : MFq(n) = O(n log n log log n MFq(1)) for all q Schönhage : M𝔽q(n) = O(n log n log log n M𝔽q(1)) for all q
Kronecker : MFpk(n) MFp(k n), modulo O(k n log p) operations Kronecker : M𝔽p k(n) ≍ M𝔽p(k n), modulo O(k n log p) operations
Theorem Theorem
We have, uniformly in q: We have, uniformly in q:
Mq(n) = O((n log q) log(n log q) 4log
∗
log(nlog q) (nlogq)
Mq(n) = O((n log q) log(n log q) 4 ): ).
Theorem Theorem
Modulo plausible conjectures, we have, uniformly in q: Modulo “plausible conjectures”, we have, uniformly in q:
Mq (n) = O((n log q) log(n log q)): Mq(n) = O((n log q) log(n log q)).
Kronecker : MFp(n) = O(I(n log p)) if log n = O(log p) Kronecker : MFp (n ) = O (I(n log p )) if log n = O (log p )
Schönhage–Strassen : MFq(n) = O(n log n log log n MFq(1)) if char Fq > 2 Schönhage–Strassen : MFq (n ) = O (n log n log log n MFq (1)) if char F >2
q
Schönhage : MFq(n) = O(n log n log log n MFq(1)) for all q Schönhage : MFq (n ) = O (n log n log log n MFq (1)) for all q
Theorem Theorem
By activating the debugging tool Tools Debugging tool and Debug keyboard,
you may determine the particular mappings used by your remote control.
You may select one of the beamer themes in order to specify the global look
and feel of your presentation. Such a theme mainly corresponds to a collec-
tion of colors and background patterns for titles, mathematical formulas, theo-
rems, etc., and the presentation itself. Assuming that the focus is on your entire
presentation, the available themes can be found in Focus Beamer theme; see
Figure 9.1 for a few examples.
In addition to the main theme, we recall from section 2.7 that the rendering of
individual markup elements can be further customized via the Focus Pref-
erences menu. For instance, inside a screen title, you may select Focus Prefer-
ences Framed titles as an alternative for the default title bar rendering at the
top of the screen. Similarly, inside a theorem, you may select the alternative
Hanging theorems rendering. Yet another example is the use of an alternative
color for mathematical formulas. See Figure 9.2 for the effect of such customiza-
tions.
168 LAPTOP PRESENTATIONS
Kronecker : MFp(n) = O(I(n log p)) if log n = O(log p) Kronecker : MFp(n) = O(I(n log p)) if log n = O(log p)
SchönhageStrassen : MFq(n) = O(n log n log log n MFq(1)) if char Fq > 2 SchönhageStrassen : MFq(n) = O(n log n log log n MFq(1)) if char Fq > 2
Schönhage : MFq(n) = O(n log n log log n MFq(1)) for all q Schönhage : MFq(n) = O(n log n log log n MFq(1)) for all q
Kronecker : MFpk(n) MFp(k n), modulo O(k n log p) operations Kronecker : MFpk(n) MFp(k n), modulo O(k n log p) operations
Mq(n) = O((n log q) log(n log q) 4log Mq(n) = O((n log q) log(n log q) 4log
(nlog q)
(nlog q)
): ):
Theorem. Modulo plausible conjectures, we have, uniformly in q: Theorem Modulo plausible conjectures, we have, uniformly in q:
Mq (n) = O((n log q) log(n log q)): Mq (n) = O((n log q) log(n log q)):
The top-level focus menu also allows you to specify an aspect ratio for your
presentation. Traditional projectors use a ratio of 4:3 or 5:4. When connecting
your laptop to a widescreen television or certain recent projectors, you may
need to select a ratio of 16:9 or 8:5 instead. In case of doubt, we recommend to
opt for a 4:3 or 8:5 ratio.
When preparing a presentation, it is sometimes nice to see all screens in succes-
sion, rather than editing them one by one. This can be achieved by selecting the
Paper page mode from the icon menu on the focus toolbar or using Docu-
ment Page Format Page rendering paper. Alternatively, the Panorama mode
allows you to see miniature versions of all your slides on a single screen. The
paper and panorama page modes are also useful whenever you need to reor-
ganize your presentation. Indeed, they allow you to select ranges of screens
and to copy and paste them.
Compressed. When using this default unrolling style, the branches that
have not been unrolled are simply ignored. As a consequence, if the
unroll tag is followed by other text, then this subsequent text will move
downwards while unrolling.
Phantoms. When using this style, the branches that have not yet been
unrolled are “displayed” using invisible ink. If the unroll tag has not
completely been unrolled, then there will be blank lines between the
unroll tag and subsequent text (if any).
Greyed. For this style, the branches that have not yet been unrolled are
“pre-displayed” using lightly visible ink.
These primitive unrolling tags can be combined with the various kinds of item
lists described in section 3.6. For instance, Insert Fold Unroll Itemize inserts
a standard item list that can be unrolled progressively according to the default,
compressed unrolling style. Using the standard mechanism of structured vari-
ants (see section 2.7), one may next replace the itemize and unroll tags by any
of their variants.
Inside a list that can be unrolled, pressing ↩ creates a new unrollable branch
with a list item. Sometimes you may want to unroll more than one item at
once; in that case, you have to manually insert additional items to the branch,
e.g. by typing \ i t e m ↩ .
A variant of unrolling is unfolding, in which case there are exactly two branches,
one of which is always visible, and one of which can be “folded”. Different
folding styles are available through Insert Fold Folded. Some of the rendering
styles display a button that may be pushed in order to fold or unfold. The
input-output fields inside computer algebra sessions are also foldable.
Yet another variant of folded structures is available through Insert Fold Sum-
marize. The tags in this menu are switches with two branches, again with
different rendering styles.
When using TEXMACS in combination with an external plug-in, such as a com-
puter algebra system, you will notice that all input-output fields in sessions are
foldable. In addition, you can create so-called “executable switches” using the
items in the Insert Fold Executable submenu. This allows you to switch back
and forth between a given input and the corresponding output.
We already explained that switches may be nested in a natural way. The same
holds for the other tags that we have just described. Moreover, in the Insert
Fold Traversal menu, you may specify whether unrolled and unfolded struc-
tures should be folded back after traversal.
170 LAPTOP PRESENTATIONS
9.4 Overlays
The mechanisms of switches, unrolling, and unfolding cover the most frequent
kinds of traversal of a slide show. However, there are cases in which more
complex successions are needed. For example, imagine that, for a given screen,
we wish to highlight all occurrences of the variable x in red on the next screen
(see Figure 9.3). This could be achieved by using a switch tag: we copy the
whole screen to both the first and second branch of the switch, and then color
red all instances of x in the second branch. However, this solution has the
disadvantage that any a posteriori modification on the slide has to be made
both in the first and in the second branch.
TEXMACS provides the “overlay” mechanism for this kind of more complex
successions of screens. You may insert a pile of overlays using Insert Fold
Overlays Standard. At the start, the pile contains a unique overlay, but new
overlays can then be added using the standard keyboard shortcuts ⌥→ and
⌥← for structured insertion. When applied to overlays, the standard keys F10
and F11 for traversing the presentation have the effect of moving up and down
in the pile of overlays.
By default, all text that is typed by the user will be visible on all overlays. But,
using the filters in the menu Insert Fold Overlay, it is also possible to create
text that is only visible on specified overlays in the pile. There are four basic
types of visibility filters:
Visible from here on. Text that is visible on this and all subsequent over-
lays.
Visible until here. Text that is visible on this and all previous overlays.
Visible except here. Text that is visible on all but the current overlay.
Alternate from here on. The alternate text will be used on this and all sub-
sequent overlays.
Alternate until here. The alternate text will be used on this and all pre-
vious overlays.
Alternate only here. The alternate text will only be used on this overlay.
Alternate except here. The alternate text will be used on all but the current
overlay.
Notice that the implementation of alternations still relies on the shown* and
hidden* tags. In particular, when using the Greyed type of overlays, the
“hidden” alternative will only be greyed out, and superposed with the “shown”
one.
When editing overlays, the focus bar indicates the overlay that you are cur-
rently working on. It also allows you to quickly jump to any of the other
overlays. Similarly, if your cursor is inside a visibility filter, then the focus
bar indicates the overlays on which the tag will be in “shown” state using a
bold font. You may also control the slide on which the visibility changes.
9.5 Decorations
In order to decorate your laptop presentations, TEXMACS provides a few extra
markup elements: granite, manila-paper, metal, pine, ridged-paper, and rough-
paper. These tags will put your content on a nice, natural background, as
illustrated in Figure 9.4. When using the beamer style, these decorations are
available in the Insert Prominent menu.
172 LAPTOP PRESENTATIONS
9.7 Animations
Each animation in a presentation comes with its own individual player and it
starts as soon as it appears. For example when unrolling a list of animations,
a new animation will appear and be played every time that you press F11 ; the
animations that were already started before will just keep playing. You may
use the ⌃F12 keystroke in order to replay all currently visible animations.
The most basic animations allow you to make some content appear or disap-
pear gradually. TEXMACS provides various ways for doing this in the menus
Insert Animation Appear and Insert Animation Vanish.
For instance, assume that you wish to let the greeting “Hello
Hello world”
world grad-
ually fade in. After typing the text, it suffices to select it, and apply Insert
Animation Appear Fade. On the focus toolbar, you will see a Duration field
that you may use to specify the length of the animation. The duration can
also be decreased or increased using the shortcuts ⌘← and ⌘→ . We recom-
mend durations between 0.25s and 1s. Besides fading in, TEXMACS supports
gradual sliding (Translate), progressive uncovering (Progressive), and zooming
in (Zoom): see Figure 9.5.
174 LAPTOP PRESENTATIONS
Figure 9.6. Sliding in and progressive appearance of text for various directions.
For each of the appearance and vanishing effects, the focus toolbar also con-
tains fields with additional parameters for the animation. In the case of fading
in, this allows you to specify the initial intensity. In the case of translations,
you may specify the direction in which the sliding takes place, either using
the icon, or using the more detailed fields Start x and Start y. The default
direction for both Translate and Progressive is from left to right. The effect of a
few other directions is illustrated in Figure 9.6.
The appearance and vanishing animations are special cases of “alterations”.
When applying a general translation Insert Animation Alter Translate to
some piece of text, you may specify arbitrary positions for both the start and
the end. This may be useful if you want to insert an animation that shows the
“end credits” (or references) for your presentation. In that case, you should
specify 0 for both Start x and End x, take −1 for Start y, and 1 for End y. Notice
that the animations described so far only work for inline content. In order to
apply them to block content (i.e. text that runs over multiple lines or para-
graphs), you should put your text inside a table and enable line wrapping.
t=0 t= 4 t= 2 t= 4 t=1
1 1 3
daddy
Thanks to Thanks to Thanks to Thanks to Thanks to
granny
mommy mommy mommy mommy mommy
sissy
daddy daddy daddy daddy daddy
Thanks to
granny granny granny granny granny
mommy
sissy sissy sissy sissy sissy
daddy
Figure 9.7. Animation for the end credits.
9.7 ANIMATIONS 175
t = t0 = 0 t= 3 t= 3 t = t1 = 1
1 2
you wish to progressively embolden some text, then you may proceed as fol-
lows:
1. Select the text and embolden it using Format Font effects Embold.
2. Set the initial emboldening strength to 0 in the focus toolbar.
3. Select the text (together with the embold tag) and do Insert Animation
Animate.
4. In the time line, go to the last control frame of the animation.
5. Set the final emboldening strength to the desired value.
6. Watch your animation by pressing the button.
You may re-edit the animation using the icon on the animation toolbar. It is
also possible to replay the animation as many times as you wish using the
button or ⌃F12 .
Concerning the timeline, we note that the current frame is indicated via an
asterisk *, whereas control frames are indicated using plus signs +. You may
suppress a control frame using the button, and replace the entire anima-
tion by the current frame using . When animating a graphical picture, the
timeline contains a few additional icons that allow you to specify when newly
inserted objects should become visible or invisible. For example, assume that
we are editing an animation of ten seconds and that the current frame cor-
responds to the frame when t = 5s. If you are in the default mode, then a
newly inserted curve will be visible between t = 5s and t = 10s. In the mode,
it will rather be visible between t = 0s and t = 5s. In the mode, the curve will
be visible throughout the whole animation.
A A A A
Ink in
B B B B
A A A A
Ink out
B B B B
Fade in
Fade out
Animated
Ink out. The same as Ink in, but it the reverse direction. This allows you for
instance to obtain a “retracting arrow”.
Fade out. Smoothly decrease the opacity from 100% down to 0%.
For more general animations, you may use Focus Status Animated. This
option works similarly to the morphing mechanism that we explained in the
previous section: the animation toolbar displays a time line and you may edit
the control points of your graphical object at different times. The last row in
Figure 9.11 shows an example: we first drew the filled glass at t = 1, then ani-
mated the object, and finally moved the two upper control points of the yellow
liquid at t = 0 so as to coincide with the two lower control points.
Graphical animations of the type that we just described have the advantage
that they behave similarly to ordinary graphical objects in many respects. For
example, it is easy to move an entire animation to a different place in the pic-
9.8 EXPORTING BEAMER PRESENTATIONS 179
ture or to copy and paste it. On the other hand, the control points can only be
edited in the individual time frames attached to the animation.
• Although the PDF reference format specifies mechanisms for the inclu-
sion of animations and 3D graphics, most PDF viewers do not implement
these features. For this reason, TEXMACS animations are not exported
to PDF.
• Various other “dynamic” types of markup are not exported to PDF. For
instance, you may run an external computer algebra system inside a
TEXMACS presentation, but only the final output can be exported to PDF.
In this chapter, we discuss some of the general editing facilities that are imple-
mented in TEXMACS. Of course, this includes basic operations that can also be
found in other editors: “cut and paste”, “search and replace”, etc. But, more
interestingly, some of these facilities take advantage of the additional struc-
ture of TEXMACS documents. Typical examples of structured editing features are
“structured cursor movement” and “structured variants”. Traditional opera-
tions such as “search and replace” can also exploit the document structure. For
instance, when searching x in math mode, you will only find matches that are
also in math mode.
You can select text and formulas by moving the mouse while holding the left
button. In order to delete the selected region, use Edit Cut or ⌃w ; to copy it, use
Edit Copy or ⌘w . Next, paste it as many times as you want using Edit Paste
or ⌃y . Alternatively, you may copy a selected region using the middle mouse
button.
It is also possible to change the text properties of a selected region. For instance,
in order to make some black text red, you select it using the left mouse button
and select the desired red color in Format Color. Similarly, if you select
a formula and click on Insert Fraction, then the formula becomes the numer-
ator of the new fraction.
When using the copy and paste mechanism to communicate with another
application, TEXMACS and the application first have to agree on a data format.
TEXMACS accepts multiple formats for pasted text; by default, it uses its own
format for copying. Copying and pasting data in other formats is possible
using Edit Copy to, Cut to, and Paste from. For instance, a LATEX formula can
be pasted inside a TEXMACS formula using Edit Paste from LaTeX. You may
also specify your preferred default import and export formats using Tools
Miscellaneous Import selections as and Export selections as.
By default, copying and pasting uses the “primary clipboard”. Using the Edit
Copy to, Cut to, and Paste from menus, you may specify as many other clip-
boards as you like. This allows you to keep multiple selections in memory,
ready to be pasted.
180
10.2 SEARCH AND REPLACE 181
There are two ways to make selections using the keyboard. The first way is
to use the cursor keys ← , → , etc. while simultaneously holding down the shift
key ⇧ . Alternatively, you may press ⌃␣ once to set a starting position. When
moving around using the cursor keys, the text between the starting position
and the current position keeps being selected. The selection gets cleared by
pressing ⌃g .
Notice that the ⌃␣ shortcut also allows you to make structured selections. You
may select the current word by pressing ⌃␣ twice. Each additional time you
press ⌃␣ results in the selection of the smallest structure that encompasses
the current selection. Ultimately, when the entire document gets selected,
pressing ⌃␣ once more clears the selection.
You can start searching text by pressing ⌃s or Edit Search. Doing this, a new
special “search toolbar” will appear below the main text, just above the footer.
When typing text in the search field of the toolbar, all occurrences of this text
will be highlighted in the main document. Moreover, one “principal” occur-
rence will be highlighted in red and you may navigate through all occurrences
using ⇞ and ⇟ (or ↑ and ↓ , or ↩ ). Using ↖ and ↘ , you may jump to the first
and last occurrences. As soon as you press the escape key ⎋ , the search toolbar
will be closed, searching stops, and focus returns to the main document.
During a search, TEXMACS only looks for text in the same mode and language as
at the position where you started your search. In other words, when searching
for x in math-mode, you will not find any x's in ordinary text (which are usu-
ally irrelevant). As a current limitation, the search string on the search toolbar
can only contain ordinary text and no math-symbols or structured text. Below,
we will discuss a mechanism that allows you to search for more general math-
ematical symbols and formulas.
In order to replace text, you should use Edit Replace or press ⌃= . This will
cause a special “replace toolbar” to appear below the main text, just above the
footer. The search field of this bar contains the string to search for, whereas the
replace field contains the string to replace with. Again, you may use the ⇞ and
⇟ keys in order to navigate through the occurrences of the search string. When
pressing ⇥ or ↩ in the search field, focus will be moved to the replace field.
You may still use the ⇞ and ⇟ keys in order to navigate through the occur-
rences of the search string. In addition, pressing ↩ will replace the principal
occurrence of the search string by the replace string. Using ⇧↩ , you may undo
the last replacement. You may replace all remaining occurrences by pressing
⌃↩ . As in searching, the query-replace command is mode and language sensi-
tive.
182 SPECIAL EDITING FACILITIES
When using the structured search and replace widgets, TEXMACS also imple-
ments a few additional special tags for enhancing structured searching. First
of all, it can happen that you need to search for certain content inside a special
context. For example, you might want to search for all occurrences of the letter
“a” inside a strong tag. When searching for a, as above, TEXMACS will highlight
all strong tags that contain the letter “a”. In order to highlight the letters “a”
themselves, you should first insert the strong tag inside an empty search field
using F6 . You next type ⌃? to insert a special select-region tag, and finally
enter the letter “a” inside this tag.
More precisely, given a highlighted incorrect word, the spell bar proposes a list
of possible corrections. You may select one of these corrections by typing the
corresponding number or by pressing the corresponding button on the spell
bar. In the absence of a suitable correction, you may explicitly enter one inside
the Correct field on the spell bar, followed by ↩ .
It may also happen that a correct word was not in the dictionary. In that case
you may add it to the dictionary by typing + or by pushing on the spell bar.
If you are not sure, but temporarily wish to accept the word, then you may
press ⇥ or .
If your document contains text in other languages, don't forget to correctly
specify the language for every piece of foreign text using Insert Language. In
that case, TEXMACS will automatically use the corresponding dictionaries when
performing a spell check.
It is possible to gradually undo the changes you made in a document from the
moment that you launched TEXMACS. This can be done via Edit Undo or using
the keystroke ⌘[ . Undone changes can be “redone” using Edit Redo or ⌘] .
TEXMACS maintains the entire “history tree” of all your edits. This history is not
necessarily linear; multiple branches in the history tree may arise as follows:
type “a”, undo the insertion of “a”, type “b”, and then again undo the insertion
of “b”. At this point, there are two redo options: the reinsertion of “a” and the
reinsertion of “b”. In such cases, Edit Redo becomes a menu in which you can
select the appropriate branch.
The undo system takes into account changes in the document itself only. In
particular, modifications of most of the global document properties can not be
undone. This includes modifications of the document style, the page size, the
main font, etc. The same remark applies to any modifications outside TEXMACS
that were triggered by your actions. For instance, in a computer algebra ses-
sion, you can undo your edits inside TEXMACS, but not the computations in the
external computer algebra system.
a a a a a
b c| d b|c d b c|d b | d b c d
c |
Figure 10.2. Assume that the cursor is at|inside the left-most tree. Then the four other trees
respectively correspond to the insertion of a new node at the left ( ⌥← ), at the right ( ⌥→ ),
above ( ⌥↑ ) or below ( ⌥↓ ).
Most keyboard shortcuts for structured cursor movements can also be used in
combination with the ⇧ -key so as to simultaneously select text while moving
around.
10.7 STRUCTURED VARIANTS 185
Figure 10.3. Assume that the cursor is at | inside the left-most matrix. Then pressing the
keys ⌥⌫ and ⌥⌦ respectively result in the next two matrices. Pressing ⌃⌫ replaces the
matrix by the content of the cell with the cursor, leaving you with the b at the right-hand
side.
The behavior may be different in special contexts. For instance, inside tables
or trees, the above shortcuts rather correspond to cell-by-cell or node-by-node
cursor movement. In addition, these cases associate vertical cursor movements
to ⌘⌥↑ , ⌘⌥↓ , ⌘⌥⇞ , and ⌘⌥⇟ .
For instance, assuming that you are inside a theorem, pressing ⌃⇥ several times
will change the theorem into a proposition, a lemma, a corollary, a conjecture,
and finally back into a theorem. The ⌃⇧⇥ key allows you to cycle in the reverse
direction: theorem → conjecture → corollary → lemma → proposition → the-
orem. Note that you may also select the desired variant in Focus Theorem
or using the Theorem menu on the focus bar.
In the case of mathematical formulas, the ⌃⇥ shortcut allows you to change an
inline formula such as a 2 + b 2 = c 2 into the displayed formula
a 2 + b 2 = c 2.
The editor takes care of potential “trailing spaces and punctuation signs”.
TEXMACS also provides the ⌃# shortcut for turning numbered environments
into unnumbered ones and vice versa (which is equivalent to the icon on the
focus bar). This works for most common environments like theorems, remarks,
tables, equations, etc. Notice that ⌃# also turns an unnumbered itemize envi-
ronment into an enumeration and vice versa, whereas ⌃⇥ allows you to cycle
between the available kinds of list items (bullets, dashes, arrows, etc.).
Folding and unfolding provides yet another interesting example of toggling
between several environments. Inside a computer algebra session such as
(( x−1 1)
(( x − x + x − x + x − x + 1 1 ))
4 3 2
( 8 7 5 4 3
)
you may click on “Pari]” in order to fold the output (i.e. only the input remains
visible) and click once again in order to unfold back to the original state. The
⌃* shortcut achieves the same effect. There are various other foldable envi-
ronments, most of which are available through Insert Fold.
⌘⌃⇥ , ⌘⌃⇧⇥ . Cycle among the available length units for specifying the geom-
etry.
⌘⌃[ , ⌘⌃] . Decrease or increase the step size when positioning or resizing.
Spaces. Both horizontal and vertical spaces from the Format Space menu.
You should put the cursor just after the space tag for the shortcuts to
apply.
Box modifiers. The tags move, shift, resize, extend, clipped, smash, inflate
from the Format Adjust menu.
Assume that we have two versions old.tm and new.tm of the same document.
In order to see the changes, first load the newer version new.tm, then click on
Version Compare With older version, and select the older version old.tm. The
buffer will still be named new.tm, and the changes between both versions will
be indicated by special markup. If there are any changes, then the cursor will
be positioned at the first difference. Similarly, you may compare the current
buffer with a newer version on disk using Version Compare With newer ver-
sion.
It is possible to go through all the differences between the old and new versions
either from the items in the submenu Version Move, or using the keyboard
shortcuts ⌃↑ and ⌃↓ . You may also use the general structured navigation
shortcuts ⌃↖ , ⌃↘ , ⌃⇞ , and ⌃⇟ .
The visualization style can be specified individually for each individual change,
via Version Show or the keyboard shortcuts ⌃← (old version), ⌃→ (new ver-
sion) and ⌃| (both versions). One may also cycle through the different styles
using the structured variant key ⌃⇥ . If you selected some text, then the above
actions will apply to the whole selection. In particular, by selecting the entire
file, you can visualize the older or the newer version, or both versions.
When going through the changes between two versions, it is possible to retain
either one or the other version for each individual difference. Assuming that
the cursor is inside a given difference, this can be done via the submenu Ver-
sion Retain. Alternatively, you may use the shortcuts ⌃1 , ⌃2 , and ⌃↩ to retain
the old, new, and currently displayed version, respectively. If both versions are
displayed, then ⌃↩ retains the new version. After retaining one of the versions,
we automatically jump to the next difference, which can then be processed.
If you selected some text, then any of the above actions will retain the appro-
priate version for each of the differences in the selection. This applies in partic-
ular to the case when you select the entire document. A more conservative
approach to process all differences between two versions is to first review them
with ⌃↑ and ⌃↓ while selecting your preferred versions with ⌃← and ⌃→ . Only
at the very end, once you are sure about your choices, you select the entire
document and click on Version Retain Current version.
10.9 VERSIONING TOOLS 189
The old version of a text text with some words. Old version
The new version of a text with some extra words. New version
The oldnew version of a text text with some extra words. Both versions
Figure 10.4. Three ways to display the differences between two versions.
After making some changes to a file under version control, the version inside
the editor or on disk no longer corresponds to the version in the repository.
Using Version Commit, the current version can be committed to the reposi-
tory. When doing so, you will be prompted for a small explanatory message
about the changes that you have made. A file that is not yet under version
control can be added to the version control system using Version Register.
Registering a file does not commit it to the repository: you still have to use
Version Commit in order to do so.
If the repository version of the file was modified while you were editing the
local one, then you may merge both versions using Version Update. No mech-
anisms for conflict resolution have been implemented yet, although this is
planned for the future.
Chapter 11
Scientific computations
A major feature of TEXMACS is the capability to delegate mathematical com-
putations to external plug-ins and present the results inside the editor. For
computer algebra systems and other scientific software, this is typically done
in shell-like sessions: you simply type the commands to be evaluated, after
which TEXMACS presents the results in a nice, graphical way. Some systems
can also be used in alternative ways, e.g. in order to evaluate a selected expres-
sion inside a formula, or as the computational engine of a spreadsheet.
One special plug-in that is always supported is SCHEME. This purified variant
of LISP is one of the standard extension languages for the GNU project. Many
aspects of the TEXMACS user interface (such as the menus, the keyboard short-
cuts, etc.) can be extended or customized using the SCHEME programming lan-
guage (see chapter 14). SCHEME sessions can in particular be used to test such
customizations on-the-fly.
Another plug-in that is usually present is BASH, the “Bourne-Again Shell”. This
allows you to evaluate operating system commands from within the editor.
The availability of additional plug-ins depends on the software that is installed
on your computer. TEXMACS automatically activates a plug-in whenever the
corresponding external program is detected on your computer. See Help Plug-
ins for the list of existing plug-ins and specific documentation on each of them.
191
192 SCIENTIFIC COMPUTATIONS
another session, you are actually continuing the previous session at another
place in your documents. In particular, if you launched a long computation,
then you will have to wait until it completes.
Some plug-ins allow you to interrupt long computations using Focus Inter-
rupt execution, or using the icon on the focus toolbar (assuming that your
cursor is inside the session). This makes it possible to proceed with other com-
putations in the current environment of your session. Unfortunately, “soft
interruptions” of this kind have been implemented in very few plug-ins only,
for the time being.
You may always force the external application to quit using Focus Close ses-
sion or , at the expense of losing your computational environment. When
pressing ↩ in the input of a system that is not, or no longer running, the system
will be restarted automatically. In order to re-evaluate all fields of an existing
session, you may use Focus Evaluate Evaluate all. Similarly, Evaluate above
and Evaluate below allow you to evaluate all fields above or below the current
field. Whenever a long computation had to be interrupted using Focus Close
session, this may be used to restore the same working environment as just
before the problematic command.
Let us emphasize that the execution of commands via external plug-ins is done
in a completely asynchronous manner. This allows you to continue typing
while a long computation is in progress. It also means that sessions of dif-
ferent plug-ins can be run in parallel. In fact, the same mechanism can be
exploited to launch multiple instances of the same plug-in. More precisely,
when inserting a session using Insert Session Other, you may specify both
a “session type” (Shell, Pari, Maxima, etc.) and a “session name” (the default
name is “default”). Only sessions with the same name and type will share the
same physical process; by varying names, it thus becomes possible to simul-
taneously run multiple instances of the same plug-in.
We finally note that different rules apply in the case of the SCHEME plug-in.
Indeed, since SCHEME is the extension language of TEXMACS, the SCHEME plug-
in is permanently running: there is no need to start it and no way to stop or
interrupt it.
session is shown below. If MAXIMA is present on your system, then you may
put your cursor in one of the inputs, perform some edits, and try to re-execute
it. The welcome message before the first input is only displayed when a new
session is started.
Maxima 5.25.1 http://maxima.sourceforge.net
using Lisp SBCL 1.0.51
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) diff (x^x^x, x)
x
(%o1) x x (x x log (x) (log (x) + 1) + x x−1)
(%i2) integrate (%o1, x)
xlog(x)
(%o2) ee log(x)
line and ⇧↩ may be used in order to evaluate the input field. Note that cer-
tain plug-ins come with built-in heuristics for testing whether the input has
been completed; if not, then ↩ will insert a new line.
Certain plug-ins allow you to type the mathematical input in a graphical, two
dimensional form. If so, this input method can be enabled using Focus Input
mode Mathematical input; it is usually also possible to copy and paste output
back into the input. However, this may not work perfectly for all plug-ins.
Also bear in mind that the mathematical input mode may preempt key combi-
nations that are also needed to type certain commands. For instance, the key $
is redefined inside math mode, so you have to type ⇧F5 $ in order to enter the
dollar symbol.
Example 11.2. The session from example 11.1 becomes as follows when using
mathematical input (Focus Input options Mathematical input):
x
(%i1) diff(x x , x)
x
(%o1) x x (x x log (x) (log (x) + 1) + x x−1)
(%i2) %o1 dx
xlog(x)
(%o2) ee log(x)
x5
(%i3) dx
x 2 − x + 17
2x−1
239 log (x 2 − x + 17) 1361 arctan 67 3 x 4 + 4 x 3 − 96 x 2 − 396 x
(%o3) + +
2 67 12
There are also a few output options that are worth mentioning. The evalua-
tion time of individual input fields is reported when Focus Output options
Show timings is enabled. This includes the time that TEXMACS used in order
to process the input and the output, so these timings should only be used as
indications: benchmark tables should instead be computed directly inside the
plug-in.
Computer algebra systems occasionally tend to generate large expressions that
cannot be rendered on a single line. By default, such expressions are rewritten
by TEXMACS so as to make line breaking possible. This means that wide frac-
a
tions b are allowed to be rewritten under the form a/b and similarly for square
roots, matrices, etc. Although this is important for printing purposes, it also
can make the output more difficult to read. If you are not interested in printing
out your computations, then you may wish to turn off the rewriting mecha-
nism, using Focus Preferences Do not break up large formulas.
−1 1
((
1 1
+
11 1
+
1 1
4 log(x) 24 log(x)2 2 log(x)3 x 4
1
+ −
5
))
1
5 log(x) 12 log(x)2
+((
O ((
1
log(x)3
1
x5
+ Ox 6
1
x
))))
⇑ Linear algebra
Caas] invert (( 0a b
c
))
b
[[[ −1
a ac ]]]
[[ 0 1
c
]]
Figure 11.1. The framed input style for computer algebra sessions.
Figure 11.2. The ringbinder notebook style for computer algebra sessions.
196 SCIENTIFIC COMPUTATIONS
TEXMACS provides facilities to write neat interfaces for computer algebra sys-
tems and other external scientific software. However, the extent to which these
facilities are exploited by individual plug-ins rests on the shoulders of the devel-
opers of these plug-ins [18, 19, 20]. Multiline and mathematical input/output
are examples of features that are exploited by several plug-ins, but not all. Let
us describe a few others that were not mentioned so far.
Tab-completion
This mechanism allows for the automatic completion of long instructions using
the tab key ⇥ , after typing the first few characters. For instance, when typing
mathi in a PARI/GP session and pressing ⇥ , one obtains mathilbert(|). The
command mathilbert is used for the computation of Hilbert matrices:
Pari] mathilbert(3)
(( 1 1 1
))
%1 = ( )))
2 3
(((1
2
1
3
1
4 ))
((
1
3
1
4
1
5
)
Tab-completion is a nice tool not only for experienced users, but also for
beginners who are still learning the precise names of potentially numerous
commands. If there exist multiple completions, then pressing the tab key ⇥
several times allows you to cycle through the list of all possibilities.
Syntax highlighting
Modern program editors often use special colors for names of important
instructions, comments, function declarations, and special constants. This tech-
nique of syntax highlighting makes programs more readable and several TEXMACS
plug-ins support it. For instance, inside SCHEME sessions, commands that have
actually been defined are rendered using a special color. This makes it pos-
sible to spot typos just by looking at the colors:
Eukleides
A B C right 5, 35 deg
draw
(A.B.C) C
circle(A, B, C)
end
label
A -135 deg
B -45 deg A B
C 45 deg
A, B, C right
end
Figure 11.3. Example of an executable switch for the EUKLEIDES plug-in. On the left, we
showed the unevaluated EUKLEIDES commands that describe the picture. On the right-
hand side, you see the result after pressing ⌃* . Hitting ⌃* once more allows you to
switch back to the source code.
Example 11.3. Executable input fields can be used for educational purposes, by
allowing parts of the document to be modified and recomputed by the reader.
For instance, evaluation of
The derivative of x x equals diff(function,x).
The second derivative is given by diff(derivative,x).
yields
The derivative of x x equals x x (log (x) + 1).
The second derivative is given by x x (log (x) + 1)2 + x x−1.
The first occurrence of x x is an input field with name function. Its first deriv-
ative is computed using an executable input field with name derivative. If
the reader changes the input function x x into something else and presses ↩ ,
then both the first and second derivatives will be updated automatically.
11.3 SPREADSHEETS 199
11.3 Spreadsheets
Recent versions of TEXMACS include a rudimentary support for spreadsheets.
The current implementation still requires speed optimizations, so it is only
suitable for small tables that fit on a single page. One advantage with respect
to more widely used systems such as EXCEL is the ability to perform the under-
lying mathematical computations using any plug-in that qualifies as a scripting
language. Besides basic arithmetical operations, this makes it possible to per-
form more complex operations on cells such as symbolic differentiation or
polynomial factorization.
From a technical point of view, spreadsheets are similar to the executable
switches that were discussed in the previous section. The main difference is
that the input fields are now organized in a table. Consequently, references
indicate a row and a column rather than a name.
Assuming that you selected a scripting language in the menu Document Scripts,
say MAXIMA, you may enter a new spreadsheet using Insert Table Textual
spreadsheet or Numeric spreadsheet. You may edit the spreadsheet as an ordi-
nary table, except that the ↩ key will attempt to reevaluate the cells of the table.
If the contents of a cell are preceded by =, then the cell will be considered as an
input-output switch. More precisely, the input is a formula that will be evalu-
ated using the current scripting language. After evaluation using ↩ , only the
result of the evaluation is shown in the cell. Pressing ↩ once more allows you
to switch back and edit the input expression. Within formulas, one may refer
to other cells using names such as c5 for the third row and the fifth column.
Example 11.4. On the left-hand side of the figure below, we have displayed
a simple table with formulas for evaluating the sums of the first two items of
each row. On the right-hand side, we have shown the result after evaluation.
1 10 =a1+b1 1 10 11
100 1000 =a2+b2 100 1000 1100
Example 11.5. As illustrated in Figure 11.5, the cells may contain mathematical
formulas and the spreadsheet may take advantage of any of the capacities of
the scripting language.
sin(x 2) sin(x 2)
=diff(a1,x) 2 x cos (x 2)
=diff(a2,x) 2 cos (x 2) − 4 x 2 sin (x 2)
=diff(a3,x) −12 x sin (x 2) − 8 x 3 cos (x 2)
TEXMACS supports a few special notations for applying operations on all cells
in a subtable. Following EXCEL, you may use the notation c3:d5 for indicating
all cells c3, c4, c5, d3, d4, d5 in the block from c3 to d5. An alternative notation
,..., for the range operator : can be entered by typing , , . In a similar way, you
may enter the special notation +⋅ ⋅ ⋅ + by typing + + . For instance, c3+⋅ ⋅ ⋅ + d5
stands for the sum of all cells between c3 and d5.
Example 11.6. The figure below shows how to sum the contents of a range of
cells. Notice that each empty cell evaluates to zero.
Note that copying and pasting of subtables works in the same way as for ordi-
nary tables, with the additional property that names of cells are renumbered
automatically, as well as any references to cells in the formulas. Automatic
renumbering is also applied when inserting new columns or rows, or when
removing existing ones.
We already mentioned the similarity between spreadsheets and executable
switches. Both mechanisms can actually be combined in a natural way. On
the one hand, references to executable switches (created using \ ? ) can also be
used inside spreadsheet cells. Conversely, each spreadsheet carries an invis-
ible Ref field. If you select the spreadsheet, then you can edit this field on the
focus bar. The Ref field of the spreadsheet is used as a prefix for referring to
its cells from outside the table or from within other spreadsheets. For instance,
if Ref equals sheet, then sheet-c4 refers to the field c4 inside the spreadsheet.
The same mechanism applies if you need to refer to this cell in another spread-
sheet.
The next step is to make sure that TEXMACS has been installed on both com-
puters. The remote TEXMACS installation will mainly be used in order to detect
those plug-ins that can be used on the remote computer.
When everything has been set up in this way, select Insert Session Remote in
order to open the remote plug-in selector. Add the name of the remote server
by typing its name or IP address and clicking on Add. After a small pause, the
remote server should appear in the list together with the remote plug-ins that
are supported. You may now simply select the plug-in you want to use from
the list. Notice that remote plug-ins may take a few seconds in order to boot.
Servers that have been added to the list of remote plug-in servers will be
remembered the next time you start TEXMACS. You may use the buttons Remove
and Update in order to remove a server from the list and to update the list
of supported remote plug-ins.
Chapter 12
Get it your way
12.1 Creating macros
12.1.1 Hello Nebuchadnezzar
We have encountered an avalanche of markup elements throughout this book.
Why add your own ones on top of the existing? One possible reason is that
you may wish to save time by introducing abbreviations for lengthy names or
notations. Let us see how to do this by defining your own macros.
Assume that we need the name of a king for our new novel and that Neb-
uchadnezzar seems to be the perfect candidate. Then it is natural to introduce a
new macro king as an abbreviation for Nebuchadnezzar. The easiest way to do
this is to open the “macro definition widget” using Tools Macros New macro.
At the place of enter-name, you may enter the name of your macro: “king”.
The corresponding body “Nebuchadnezzar” can be typed below the ≔ sign.
When done (see Figure 12.1), simply click on Ok. Now that your macro has
been defined, you can use it as many times as you wish by typing \ k i n g ↩ :
Hello Nebuchadnezzar!
Nebuchadnezzar: my beloved leader.
Bye, bye, Nebuchadnezzar.
One big advantage of using macros for abbreviations and special notations
is that it suffices to modify the macro definitions whenever you change your
mind: by positioning your cursor right after one of the king tags, you can edit
the corresponding macro using Focus Preferences Edit macro. Just change
the body of the macro to “Arikesari Maravarman Nindraseer Nedumaaran”,
if this is your new hero, and all Nebuchadnezzars will mutate accordingly.
202
12.1 CREATING MACROS 203
with the additional constraint that the symbols x and n can be changed each
time the macro is used.
After entering the name of the macro as in the previous example, you may use
the ⌥→ shortcut in order to insert additional macro arguments, say x and n.
When entering the body of the macro, these arguments can be used inside the
body by typing \ x ↩ and \ n ↩ . The resulting macro definition should look
like Figure 12.2. When applying the macro using \ d i a g ↩ , an empty and
editable slot is provided for each argument. Notice that only the first top-left
occurrence of the parameter x can be edited, although the second one at the
bottom-right will be updated accordingly during modifications.
The widget for macro editing is mainly intended for quick definitions of simple
macros. In particular, you may miss the menus and the toolbars of the usual
editor. Nevertheless, most of the usual keyboard shortcuts do work, as well
as the contextual menus that appear when pressing the right mouse button (if
your mouse has a single button, then you should hold the control key ⌃ while
pressing that button). Whenever some keyboard shortcuts are preempted by
the operating system, we also recall from section 2.3.5 that you may emulate
the modifier keys ⌃ , ⌥ , and ⌘ using ⎋ . For instance, ⌥→ is equivalent to ⎋ ⎋ → .
You may have noticed that we used the \ key both for applying the diag macro
and for inserting the macro arguments x and n. The behavior of the \ key is
context-dependent indeed. Inside the definition of a macro with arguments x
and n, typing \ x ↩ will lead to the insertion of the macro argument x. In a
context where the diag macro is defined, TEXMACS will automatically apply this
macro when typing \ d i a g ↩ . Notice that macro arguments are indicated
204 GET IT YOUR WAY
Figure 12.3. Browsing the list of all macros using the macros editor.
In Figure 12.3, we selected “Source mode” for editing the body of the macro, as
indicated by the pull-down menu at the bottom-left of the window. This mode
is usually most convenient for editing complex macros, whereas the default text
mode tends to be more suitable for simple, visually oriented macros. We also
notice that the macro editor shows macro definitions in an abridged manner:
inside style files and packages the definition from Figure 12.3 would read
hassignjacronymjhmacrojbodyjhwithjfont-shapejsmall-capsjbodyiii
Before we explain the presentation and syntax of source code in full detail,
let us first analyze the customization of an existing macro on a more complex
example.
hassignjproofj
hmacrojbodyj
hrender-proofjhproof-textijbodyiii
The prefix “render-” is used for submacros that specifically control the graph-
ical layout. In this case, the arguments of render-proof are the (potentially
translated) text “Proof” and the actual proof body. This additional level of
indirection allows for the specification of alternative proof texts:
hassignjrender-proofj
hmacrojwhichjbodyj
hsurroundjjhhtabj0.5fnj0ihqedij
hrender-remarkjwhichj
bodyiiii
206 GET IT YOUR WAY
The surround primitive provides a way to decorate large blocks of text (so-
called “block markup”) at the left and at the right. In this case, the proof text is
decorated with the end-of-proof symbol □, which is produced using the macro
qed. The symbol is preceded by a “horizontal tab” that flushes it to the right
margin. It now suffices to change the definition of the qed macro to ■. The
above proof then reads:
hassignjrender-remarkj
hmacrojwhichjbodyj
hrender-enunciationjhremark-namejwhichhremark-sepiijbodyiii
As you can see here, render-remark depends on its turn on a yet more central
macro render-enunciation, which is also used for theorems and exercises. This
additional level of indirection is due to the fact that the bodies of major the-
orem-like enunciations are usually emphasized, whereas proofs, remarks, and
other less prominent enunciations do not the change the font of the main body.
Examination of the definition of render-remark also reveals the possibility to
specify an alternative rendering for the names of remarks (e.g. REMARK 2.3)
and the separator between this name and the corresponding body (usually a
dot). Further investigations lead us to the source code of render-enunciation:
hassignjrender-enunciationj
hmacrojwhichjbodyj
hpadded*j
hsurroundjwhichjhyes-indent*ij
bodyiiii
We have now reached the explicit graphical layout macro padded* that is used
to add vertical whitespace before and after the enunciation.
hassignjpadded*j
hmacrojbodyj
hpadded-normaljlarge-padding-abovejlarge-padding-belowj
bodyiii
proof
padded*
you may change these style parameters. The padded-normal macro is defined
directly in terms of typesetting primitives that cannot be further customized:
hassignjpadded-normalj
hmacrojbeforejafterjbodyj
hsurroundjhvspace*jbeforeihno-indentijhhtabj0fnjfirstihvspacejafterij
bodyiii
Figure 12.4 summarizes the recursive dependencies of the proof macro. Once
again: before customizing an existing macro defined by the selected style, it is
recommended to investigate its dependency tree and carefully identify those
submacros that control the behavior that you wish to change.
1
. (12.2)
x2 + y2
frac (12.3)
1 concat
x rsup +y rsup
2 2
The nodes of the tree are labeled by markup elements (internal primitives or
user-defined macros) and the leaves of the tree are ordinary text strings.
Pursuing our conceptual perspective, one should distinguish between the
abstract document tree and its graphical rendering. In particular, (12.3) is just
an attempt to represent such a tree in a graphically pleasing way. The default
rendering (12.2) is another representation and the “source code” rendering is
yet another possible representation:
hfracj1jxhrsupj2i+yhrsupj2ii
The main virtue of “source code” with respect to other renderings is that it aims
to make the full structure as transparent as possible. But even though TEXMACS
proposes a default “source code” rendering, there is no intrinsic reason to
prefer any particular such rendering over another one. For instance, scheme
expressions provide an alternative that only involves plain ASCII text:
12.1. Notice that x 2 is represented as xhrsupj2i and not as hrsupjxj2i. This is more convenient for
wysiwyg editing purposes, since you do not need to specify the precise mathematical expression
that is being superscripted.
12.2 PILGRIMAGE TO THE SOURCE 209
Angular Scheme
hassignjquick-theoremj (assign “quick-theorem”
hmacrojbodyj (macro “body”
hsurroundjhno-indentiTheorem. jj (surround (no-indent)“Theorem. ” “”
bodyiii (arg “body”))))
Functional LATEX
assign (quick-theorem, assignfquick-theoremgf
macro (body, macrofbodygf
surround (no-indentTheorem. , , surroundfno-indentTheorem. gfgf
body))) bodyggg
Figure 12.5. Different styles for rendering the same source tree.
First of all, you may choose your preferred “Main presentation style”
among “angular”, “scheme”, “functional”, and “LATEX”, as illustrated in the
Figure 12.5.
Secondly, you may wish to reserve a special treatment for certain tags, such as
the formatting tags concat and document for horizontal and vertical concate-
nation. In the menu Tags with a special rendering you may specify to which
extent you want to treat such tags in a special way:
Raw. No tags receive a special treatment.
Format. All tags are rendered as source code, except for the formatting tags
concat and document.
Normal. In addition to the formatting tags, a few other tags like compound,
value, and arg are rendered in a succinct way.
Maximal. At the moment, this option is not yet implemented. The inten-
tion is to allow you to write your own customizations and to allow for
a special rendering of basic mathematical operations such as plus.
These different options are illustrated in Figure 12.6.
Raw Format
hassignjquick-theoremj
hmacrojbodyj hassignjquick-theoremj
hdocumentj hmacrojbodyj
hsurround jhconcat jhno-indentijThe- hsurroundjhno-indentiTheorem. jj
orem. ijj hargjbodyiiii
hargjbodyiiiii
Normal Maximal
hassignjquick-theoremj hassignjquick-theoremj
hmacrojbodyj hmacrojbodyj
hsurroundjhno-indentiTheorem. jj hsurroundjhno-indentiTheorem. jj
bodyiii bodyiii
None Inline
hassignj
quick-theoremj hassignj
hmacroj quick-theoremj
bodyj hmacroj
hsurroundj bodyj
hconcatj hsurroundj
hno-indentij hno-indentiTheorem. j
Theorem. ij j
j bodyiii
bodyiii
Normal All
hassignjquick-theoremj
hmacrojbodyj hassign j quick-theorem jhmacro j body jhdocument j
hsurroundjhno-indentiTheorem. jj hsurroundjhno-indentiTheorem. jjbodyiiii
bodyiii
Another thing that can be controlled by the user is whether the presentation
of tags should be compact or stretched out across several lines. In general, so-
called inline tags are more readable when represented in a compact way. Inline
tags are used for small pieces of content in the middle of a paragraph, such
as a reference or an inline formula. On the other hand, block tags are used for
longer pieces of content that may span over several paragraphs, such as proofs
or item lists. In source code rendering, they typically look better when they are
stretched out over several lines. Note that certain tags (like em for emphasized
text) can be used both as inline and as block tags.
The Compactification menu proposes several levels of compactification:
None. The tags are all stretched out across several lines.
Inline. All non-inline tags are stretched out across several lines.
Normal. All inline arguments at the start of the tag are represented in a
compact way. As soon as we encounter a block argument, the remainder
of the arguments are stretched out across several lines.
Inline arguments. All inline arguments are represented in a compact way
and only block tags are stretched out across several lines.
All. All source code is represented in a compact way.
The visual effect of the different levels of compactification is illustrated in
Figure 12.7.
Finally, the Closing style menu allows you to specify the way closing tags
should be rendered when the tag is stretched out across several lines. The
rendering can either be minimalistic, compact, long, or recall the matching
opening tag. The different options are illustrated in Figure 12.8.
12.2 PILGRIMAGE TO THE SOURCE 211
Minimal Compact
assign quick-theorem hassignjquick-theoremj
macro body hmacrojbodyj
surround hno-indentiTheorem. j hsurroundjhno-indentiTheorem. jj
body bodyiii
Long Repeat
hassignjquick-theoremj hnassignjquick-theoremi
hmacrojbodyj hnmacrojbodyi
hsurroundjhno-indentiTheorem. jj hnsurroundjhno-indentiTheorem. ji
body body
i h/surroundi
i h/macroi
i h/assigni
When designing your macros, you will quickly find out that TEXMACS macros
have a dual character. Simple macros such as an abbreviation or a notation
for diagonal matrices are usually visual in nature and best edited in the same
way as ordinary text. More complex macros behave more like programs with
local variables and subprograms. The source code representation tends to be
more convenient for editing such macros. The borderline between textual data
and macro programming is blurry: sometimes both aspects can be found in the
same macro definition.
TEXMACS fully acknowledges this data-or-program duality and provides a few
mechanisms to locally switch between normal and source style rendering. One
typical use case is to quickly examine (and possibly modify) the “source code”
of a small portion of text. For example, assume that we wish to study the
markup that was used in order to produce “brown” and “jumps” in the frag-
ment
Then it suffices to select “brown fox jumps” and press ⌘- (when activating
the source tool using Tools Source macros tool, you may also use Source
Activation Deactivate):
The quick hwith j color j brown j browni fox hmove j jumps j j 0.5exi
over the lazy dog.
This technique inserts an additional (invisible) inactive* tag around the selec-
tion. You have to remove this tag in order to switch back to the original presen-
tation, e.g. by placing your cursor after the “x” in “fox” and pressing ⌃⌫ . Recall
that the source code for the entire document can be edited using Document
Source Edit source tree.
212 GET IT YOUR WAY
Conversely, when editing a macro definition in source mode, you may prefer
the usual non-source rendering for the more graphical portions of text. Con-
sider for instance the definition
hassignjnew-iconjhmacrojhiconjtm_new_x4.pngiii
You may prefer the following presentation that was obtained by selecting hiconj
tm_new_x4.pngi and pressing ⌘+ :
hassignjnew-iconjhmacroj ii
hassignjdiagjhmacrojvarjdimj(((
( var
1
⋅⋅
𝟎 )))ii
(( 𝟎 ⋅
vardim ))
Here we activated the usual rendering for the matrix using ⌘+ , but switched
back to source code rendering for the arguments var and dim using ⌘- .
M = \left( \begin{array}{ccc}
1 & \alpha_{1,2} & \alpha_{1,3}\\
0 & 1 & \alpha_{2,3}\\
0 & 0 & 1
\end{array} \right) (12.6)
over
( 1 𝛼1
M = ((( 0
1,2 𝛼1,3
)) (12.7)
(0 0
𝛼2,3
1
))
12.3 GROUPING YOUR MACROS TOGETHER 213
With an appropriate editor like TEXMACS, we do not only claim that (12.5)
and (12.7) can be entered faster than (12.4) and (12.6): we may also regard them
as a better way to represent “source code”.
if (cond) hop = 2;
else holala= 3;
However, the precise formatting policy does not appear in the document, so
manual intervention will be necessary if the variable cond is renamed c, or if
the variable holala is renamed hola.
TEXMACS is not really intended to be a program editor yet, so no tools are pro-
vided for dealing with the above example in an automatic way. Nevertheless,
the discussion applies in a lesser extent to the source code mode in TEXMACS.
New users may feel somewhat constrained by the document structure and dis-
oriented by the fact that ASCII-style editing habits not always apply. These
disadvantages are still felt by more experienced users, but compensated by the
benefits of the structured editing facilities. Nevertheless, it remains a challenge
to make it even easier and more natural to edit source code.
12.3.1 Preambles
The macro editor is an efficient tool for the definition of simple notations and
for basic customizations of existing macros. The resulting macro (re-)defin-
itions are automatically stored in the preamble of your document. More experi-
enced TEXMACS users often do not use the macro editor and prefer to directly
edit the preamble using ⌘⌥p or Document Part Show preamble. This has the
advantage that you see all macro definitions at once. By putting them in a
suitable order, you may also enhance their readability.
Preambles are edited much in the same way as ordinary documents, except
that you are in source mode. Copying and pasting in particular continues
to work as usual. This is a powerful technique for the definition of complex
macros: first design a prototype macro application in an ordinary document,
next copy and paste it into the body of your macro definition in the preamble,
and finally perform the appropriate replacements of text by macro arguments.
214 GET IT YOUR WAY
Besides macros, you may also edit environment variables using the macro
editor. Examples of environment variables are the page size, the left margin,
the text color, or the number of the current subsection. Some of these environ-
ment variables can also be modified more directly using the Document menu.
For example, the main text color for the document can be selected using Doc-
ument Colors Foreground.
Just like the \ key allows you to apply a macro whenever it is defined (see
section 12.1.2), you may use it in order to obtain the value of any available envi-
ronment variable. For example, \ c o l o r ↩ yields the value of the current
text color. Inside source code, TEXMACS uses a green color for such environ-
ment variables, as in color.
The preamble contains style customizations that apply to one individual doc-
ument. If you are particularly pleased with some of your customizations, then
you may wish to bundle them in a style package that can be reused in other
documents. One efficient way to start a new style package is Tools Macros
Extract style package: this collects all existing customizations in your current
document (both macros and environment variables) and puts them into a new
style package.
Style packages are similar to usual TEXMACS documents, except that you
edit them in source mode, just like preambles. When saving them to disk,
you should also use the .ts extension instead of .tm. The native TEXMACS
style packages are stored in the directory $TEXMACS_PATH/packages, where
$TEXMACS_PATH points to the directory where you installed TEXMACS. You must
put your own style packages in the same directory as the files that use them or in
the directory $TEXMACS_HOME_PATH/packages, where $TEXMACS_HOME_PATH
points to ~/.TeXmacs on UNIX systems and to C:\Documents and
settings\user_name \Application Data\TeXmacs on WINDOWS. After
saving your style package in this way, you may apply it to any of your TEXMACS
files using Document Style Add package Add other package.
Style files are a variant of style packages. Style files control the main document
style, whereas style packages contain customizations that can be combined
with other style files or packages. Style files must be complete in the sense
that all major markup elements (such as section, theorem, equation, bibliog-
raphy, strong, etc.) should be defined. Style packages typically contain extra
personal notations or customizations of existing markup elements.
The complete style of your current document can be extracted using Tools
Macros Extract style file. When saving style files to disk, you should again use
the .ts extension. Native style files are stored in $TEXMACS_PATH/styles.
You should put your own style files in $TEXMACS_HOME_PATH/styles or in
the same directory as the files that use them. The main style is selected using
Document Style and user-defined styles are automatically listed there.
12.4 THE STYLE-SHEET LANGUAGE 215
12.4.1 Assignments
All user-defined TEXMACS macros and style variables are stored in the “current
typesetting environment”. This environment associates tree values to string
variables. Variables whose values are macros correspond to new primitives.
The others are ordinary environment variables. The primitives for operating
on the environment are available from Source Define.
You may permanently change the value of an environment variable using the
assign primitive, as in the example
hassignjhijhmacrojHi there!ii
You may also locally change the values of one or several environment vari-
ables using the with primitive:
hwithjfont-seriesjboldjcolorjredjBold red texti
The with primitive can also be used for local redefinitions of macros:
hwith j strong j hmacro j body j hwith j font-series j bold j color j red j bodyii j hstrong j
strongi texti
The value of an environment variable may be retrieved using the value primi-
tive, as in the following code to increase a counter:
hassignjmy-counterjhplusjmy-counterj1ii
Here we recall that the default rendering of hvalue j my-counteri inside source
code is my-counter (see sections 12.2.2 and 12.3.1). Our example actually shows
that both left-hand sides of assignments and values of environment variables
are emphasized in green, which should help to locate environment variables
inside source code. Similarly, macro arguments can be recognized by their
brown color.
We recall that the value of an existing environment variable can be retrieved
using the \ key. For instance, \ m y - c o u n t e r ↩ yields my-counter. In
source mode, you may also use the keyboard shortcuts ⌘⌃= , ⌘⌃w , and ⌘⌃v
to produce assign, with, and value tags.
216 GET IT YOUR WAY
hassignjmy-macrojhmacrojx1j ⋅ ⋅ ⋅ jxnjbodyii
hmy-macrojy1j⋅ ⋅ ⋅jyni
Inside the body of the macro, the arg primitive may be used to retrieve the
values of the arguments to the macro. Notice that the default rendering of hargj
namei inside source code is name:
It is possible to call a macro with fewer or more arguments than the expected
number. Superfluous arguments are simply ignored. Missing arguments take
the nullary uninit primitive (with rendering ?) as value:
hassignjheyj
hmacrojfirstjsecondj
hifj
hequaljsecondj?ij
Hey first, you look lonely today...j
Hey first and second, you form a nice couple!iii
hassignjmy-macro-copyjmy-macroi
However, when using this style of macro programming, one should keep in
mind that TEXMACS macros use a call-by-name evaluation strategy, contrary to
functional programming languages such as SCHEME (see section 12.4.4 below).
The compound tag may be used to apply macros that are the result of a com-
putation:
hassignjoverloaded-hij
hmacrojnamej
hcompoundj
hifjhnice-weatherijhappy-hijsad-hiij
nameiii
12.4 THE STYLE-SHEET LANGUAGE 217
Most TEXMACS presentation tags can be divided in two main categories: inline
tags and block tags. Inline tags are used for small pieces of text, whereas block
tags can contain text that spans over several paragraphs. For instance, frac is
a typical inline tag, whereas theorem is a typical block tag. Some tags (such as
strong) are inline if their argument is inline and block otherwise.
The most primitive inline tag concat is used for horizontal concatenation:
hconcat j hwith j color j blue j bluei j hem j emphasisii is rendered as blueemphasis.
Similarly, the most primitive block tag document is used for vertical succes-
sions of paragraphs: hdocumentjFirstjSecondjThirdi is rendered as
First
Second
Third
The concat and document tags are so common that their names are actu-
ally hidden for the default rendering of source code (see section 12.2.2 and
Figure 12.6).
LeftTop Right
Bottom
instead of the expected
LeftTop
BottomRight
If you need to surround a block tag with inline text, then you must use the
surround primitive:
hassignjmy-theoremj
hmacrojbodyj
hsurroundjhno-indentihwithjfont-seriesjboldjTheorem. ijhright-flushij
bodyiii
In this example, we surrounded the body of the theorem with the bold text
“Theorem.” on the left and a “right-flush” on the right-hand side. Flushing
to the right is important in order to make the blue bounding box around the
theorem look nice when editing the body of the theorem.
218 GET IT YOUR WAY
In most cases, TEXMACS does a good job in determining which tags are inline
and which ones are not. However, you sometimes may wish to force a tag to
be a block environment. For instance, the tag very-important defined by
hassignjvery-importantjhmacrojbodyjhwithjfont-seriesjboldjcolorjredjbodyiii
may be used both as an inline tag and as a block environment. When placing
your cursor just before the with-tag and hitting ↩ followed by ⌫ , you obtain
hassignjvery-importantj
hmacrojbodyj
hwithjfont-seriesjboldjcolorjredjbodyiii
These actions inserted a document tag around the body of the macro. The doc-
ument tag itself is invisible (you should select Tags with special rendering raw
in Document Source Preferences to make it visible), but its presence is indi-
cated through the stretched rendering. Since the body of the macro is now a
block, your tag very-important automatically becomes a block environment as
well.
hassignjeqnarray*j
hmacrojbodyj
hwithjpar-modejcenterjmodejmathjmath-displayjtruejpar-sepj0.45fnj
hsurround j hno-page-break*ihvspace* j 0.5fni j hvspace j 0.5fnihno-
indent*ij
htformatj
htwithjtable-hyphenjyij
htwithjtable-widthj1parij
htwithjtable-min-colsj3ij
htwithjtable-max-colsj3ij
hcwithj1j-1j1j1jcell-hpartj1ij
hcwithj1j-1j-1j-1jcell-hpartj1ij
bodyiiiii
The use of surround indicates that eqnarray* is a block environment and the use
of tformat specifies that it is also a tabular environment. Moreover, the twith
and cwith are used to specify further formatting information: since we are a
block environment, we enable hyphenation and let the table extend over the
whole paragraph (unused space being equally distributed over the first and
last columns). Furthermore, we have specified that the table contains exactly
three columns.
12.4 THE STYLE-SHEET LANGUAGE 219
hassignjlabeled-theoremj
hmacrojidjbodyj
hsurroundj
hconcatj
hno-indentij
hflagjId: idjbluejidij
hwithjfont-seriesjboldjTheorem. iij
hright-flushij
bodyiii
More generally, the specific tag with first argument “screen” may be used to
display visual hints that are removed when printing the document (see sec-
tion 7.6.2).
hassignjnew-theoremj
hmacrojnamejtextj
hquasij
hassignjhunquotejnameij
hmacrojbodyj
hsurroundjhno-indentihstrongjhunquotejtexti. ijhright-flushij
bodyiiiiii
hassignjtheoremj
hmacrojbodyj
hsurroundjhno-indentihstrongjTheorem. ijhright-flushij
bodyiii
It should be noticed that the TEXMACS conventions for evaluation are slightly
different then those from conventional functional languages such as SCHEME.
We recall that SCHEME is the extension language for TEXMACS; see chapter 14 for
a short introduction. The subtle differences between the style-sheet language
and SCHEME are motivated by our objective to make it as easy as possible for
the user to write macros for typesetting purposes. Assuming that you know
the basics of SCHEME, it is instructive to examine the differences on a few exam-
ples.
When TEXMACS calls a macro hmacro j x1 j ⋅ ⋅ ⋅ j xn j bodyi with arguments y1, . . . ,
yn, the argument variables x1, . . . , xn are bound to the unevaluated expressions
y1, . . . , yn, and the body is evaluated with these bindings. The evaluation of yi
takes place each time the argument xi is actually used during the evaluation of
the macro. In particular, when applying the macro hmacrojxjx and again xi to
an expression y, the expression y is evaluated twice.
In SCHEME, the literal bodies of SCHEME macros are evaluated twice, whereas
the arguments of functions are evaluated only once. On the other hand, when
retrieving a variable (whether it is an argument or an environment variable),
the value is not evaluated. Consequently, a TEXMACS macro
hassignjfoojhmacrojxjhblahjxjxiii
(define-macro (foo x)
`(let ((x (lambda () ,x)))
(blah (x) (x)))
hassignjfoojhmacrojxjhevaljhblahjhquote-argjxijhquote-argjxiiiii
hassignjfunjhmacrojxjhwithjx*jxjhblahjhquote-valuejx*ijhquote-valuejx*iiiii
Here the primitives quote-arg and quote-value are used to retrieve the value of
an argument or an environment variable. The TEXMACS primitives eval, quote,
quasiquote, and unquote behave in the same way as their SCHEME analogues.
The quasi primitive is a shortcut for quasi-quotation followed by evaluation.
are quite fragile: they only apply to inline content and it is recommended
that the various alternatives only affect the rendering, not the structure. For
instance, consider the fragment
hassignjweirdj
hmacrojbodyj
hifjhmy-conditionijHi body!jhlabeljbody iiii
In the “then part” of the if primitive, the body argument is a regular macro
argument that can be edited by the user (we say that it is accessible). In the
“else part”, the body argument is a hidden parameter that should be deacti-
vated before you can edit it. To remain on the safe side, TEXMACS considers the
body argument of the weird macro to be inaccessible, even when it is rendered
according to the “then part”.
The if primitive for conditional typesetting can be entered using ⌘⌃? and is by
far the most important control flow primitive. We recommend to mainly use
it in combination with the compound primitive, as follows:
hassignjrich-appendixj
hmacrojtitlejbodyj
hcompoundj
hifjhlong-documentijchapter-appendixjsection-appendixij
titlej
bodyiii
hassignjrich-appendixj
hmacrojtitlejbodyj
hifj
hlong-documentij
hchapter-appendixjtitlejbodyij
hsection-appendixjtitlejbodyiiii
hassignjheyj
hmacrojfirstjsecondj
hifj
hequaljsecondj?ij
Hey first, you look lonely today...j
Hey first and second, you form a nice couple!iii
222 GET IT YOUR WAY
However, TEXMACS is not clever enough to detect which arguments are optional
and which arguments are accessible. This information should be specified
manually using the drd-props primitive; see the reference guide for more infor-
mation.
hassignjnew-importantj
hmacrojnamej
hquasij
hconcatj
hassignj
hunquotejnameij
hmacrojxjhwithjfont-seriesjboldjxiiij
hassignj
hunquotejhmergejnamej-rediij
hmacrojxjhwithjfont-seriesjboldjcolorjredjxiiiiiii
Here we use the merge primitive in order to concatenate two strings. Precise
positioning is possible through appropriate computations with lengths:
hassignjcenter-axisjhmacrojbodyjhmovejbodyjjhminusj0.5exj0.5hiiii
The purpose of this macro is to vertically center the argument at the position
of the fraction bar. This is achieved by moving it up by half the height 0.5 ex
of an x-character and then back down by half the height 0.5 h of the argument
itself (the length unit h is automatically defined to be the height of the main
body inside the move primitive).
Chapter 13
Designing with style
The previous chapter gave a first introduction to the stylesheet language and
how to add your own macros. We are now ready to dive deeper into this topic
and investigate how to design complete document styles and style packages.
Scientific documents use a variety of style elements: section titles, item lists,
theorems, headers, etc. New document styles are meant to offer the complete
functionality of the built-in styles, but with a special design, which might for
instance be dictated by the “graphical charter” of a journal. Since it would be
cumbersome to redevelop all standard macros from scratch, new styles are
typically designed as customizations of existing ones. The bulk of this chapter
is dedicated to explaining how this works.
Advanced users may also design style packages for new types of functionality
such as literate programming or interactive courses. Such style packages are
usually accompanied by extensions to the editor itself, in the form of keyboard
shortcuts, special menu entries, or more complex editing routines. The next
chapter gives a first glimpse of how to develop such enhancements.
We recall that one of the main aims of beautiful typesetting and graphical
design is to be “invisible”: readers should focus on content and not be dis-
tracted by typesetting details. This is a quite delicate task which is really a
job for experts on typography. Entire books have been written on this topic;
see for instance [4, 40].
With the advent of typesetting software, the bulk of the traditional design tasks
reduces to the development of high quality document styles. A priori, this still
requires the same kind of expertise, so why would you want to this your-
self? One reason could be that you wish to reproduce the style of a particular
223
224 DESIGNING WITH STYLE
journal. But maybe you just got bored aping your colleague next door and
prefer to have some fun creating your own distinctive style instead.
If you go down this road and design your own style, then it is tempting to
introduce all kinds of fancy decorations for standard environments, such as
boxes around theorems, drop shadows for section titles, your favorite pictures
for list items, etc. Keep in mind that such phantasies may quickly saturate and
irritate your readers. Instead, we invite you to search for more subtle ways to
distinguish yourself. This can often be achieved through the careful selection
of a few fonts, or by modifying some spacings or separators. For example, the
simple use of a sans serif font for theorems will already distinguish your style
from all built-in TEXMACS styles:
Notice that it is not necessary to refrain from all forms of ornaments. For
instance, it may be all right to use the following type of main section titles:
My fancy section
Although such titles are somewhat “aggressive”, they tend to occur only a few
times in a document. As long as this is the only fantasy in your document
style, this remains acceptable, while immediately ensuring a distinctive look
and feel.
Another thing that you should worry about is related to the dual “data
versus program” nature of TEXMACS macros that we first mentioned in sec-
tion 12.2.3. Now the programming side becomes more significant when macros
are grouped together in style files or packages. In many respects, the develop-
ment of style files is analogous to writing software libraries, with macros in the
role of library functions and subroutines. Besides aesthetical considerations, it
is therefore important to think about issues like dependencies, maintainability,
and orthogonality (i.e. how well do your macros combine with macros from
other packages?).
Once again, you should be guided by the notion of simplicity. The simpler
your personal customizations are and the more they rely on standard mecha-
nisms, the more likely they will continue to work well with future versions of
TEXMACS and in combination with other style packages. For example, if your
macros crucially depend on some obscure internal macro that you found in one
of the TEXMACS style packages, then they will break down if the internal macro
happens to disappear in a future version of TEXMACS. Similarly, your macros
may fail to work in combination with alternate styles that do not implement
the required internal macro. For similar reasons, you should avoid complex
macros that adjust the typesetting process in subtle ways: ongoing progress
in the TEXMACS typesetter may make it difficult to maintain such macros.
13.2 ANATOMY OF A STYLE PACKAGE 225
Before you start designing your own style files, we recommend you take a
closer look at the existing style files. One fairly complete example is the svjour
base style for articles published by SPRINGER VERLAG. This style is selected
using Document Style Article Springer svjour. After selecting this style,
you may open the corresponding source file using Document Style Edit style.
The first line of the svjour style file specifies the style packages on which
the style is based. It essentially uses the same style packages as the standard
article style, together with one additional package std-latex:
huse-package jstdjenv-basejenv-mathjenv-floatjenv-programjheader-articlej
title-basejsection-articlejstd-latexi
The std-latex package is useful when adapting a LATEX style file to TEXMACS,
since it provides several macros that allow you to specify global style para-
meters in “the LATEX way”. For instance, the svjour style uses the following
lines to specify the global margins and text width—both for single and double
column articles:
hassignjtex-odd-side-marginjhmacrojhifjhequaljpar-columnsj1ij0ptj-30ptiii
hassignjtex-even-side-marginjhmacrojhifjhequaljpar-columnsj1ij0ptj-30ptiii
hassignjtex-text-widthjhmacrojhifjhequaljpar-columnsj1ij25.5ccj17.8cmiii
The remainder of the svjour style file redefines some of the most significant
macros that determine the layout of articles. One may distinguish the following
main categories:
• Theorem-like environments.
Let us briefly study how some of these customizations were carried out for
svjour. More general and detailed explanations will be provided in the sec-
tions below.
226 DESIGNING WITH STYLE
hassignjsmallerjhmacrojxjhwithjfont-base-sizej9jpar-sepj2ptjxiii
Sectional macros
After the main document font and page layout, the rendering of section titles
is the next most significant characteristic of a scientific document style. Most
journals use bold, emphasized, or small capital fonts, and carefully specify the
amount of vertical space to be inserted before and after titles. Styles that were
adapted from LATEX by means of the std-latex package may reproduce TEX-
style rubber spaces using the tex-len macro. For instance, svjour renders main
section titles in the following way:
hassignjsection-titlej
hmacrojnamej
hsectional-normal-boldj
hconcatj
hvspace*jhtex-lenj21ddj4ptj4ptiij
hnormal-sizejnameij
hvspacejhtex-lenj10.5ddj4ptj4ptiiiiii
Theorem-like environments
Scientific articles require many technical markup elements like theorems, enu-
merations, algorithms, technical pictures, etc. Full-fledged styles may redefine
the rendering of such markup elements. The standard TEXMACS styles con-
tain a large number of macros that allow you to customize specific rendering
aspects. For instance, the main rendering of theorem-like environments is con-
trolled through the render-theorem macro. But it is also possible to change the
font for the text “THEOREM 3.6.” using theorem-name, as well as the separator
“.” after the number using theorem-sep. For our example svjour style, we
essentially have
hassignjtheorem-namejhmacrojnamejhwithjfont-seriesjboldjnameiii
hassignjtheorem-sepjhmacroj. ii
hassignjrender-theoremj
hmacrojwhichjbodyj
hpadded-normalj1fnj1fnj
hsurroundjhtheorem-namejwhichhtheorem-sepiijj
hwithjfont-shapejitalicjbodyiiiii
rendering then proceeds in two steps: one first has to collect and reorganize
the data in an appropriate way and then call lower-level rendering macros
in an appropriate order. Here one has to keep in mind that a lot of informa-
tion (keywords, subject classifiers, affiliations, etc.) is optional or may need
to be recombined (various authors with multiple affiliations).
It is recommended that style files only customize the final rendering macros
for title and abstract information. The title mainly consists of a succession of
“blocks” that are rendered using the doc-title-block macro. Specific kinds of
information are rendered using dedicated macros doc-render-title, doc-subtitle,
doc-date, etc. For example, the rendering of the main document title is defined
as follows for the svjour style:
hassignjdoc-render-titlej
hmacrojxj
hsurroundjjhvspacej11.24ptij
hdoc-title-block jhlarger jhwith j math-font-series jboldj font-series jboldj
xiiiiii
Before going deeper into the technical details about how to control specific
style elements, let us first discuss a few general tips for the development of
style packages.
hassignjorig-lemmajlemmai
hassignjlemmajhmacrojbodyjhwithjcolorjredjhorig-lemmajbodyiiii
Alternatively, if only the text inside the lemma should be rendered in red, then
you may do:
hassignjorig-lemmajlemmai
hassignjlemmajhmacrojbodyjhorig-lemmajhwithjcolorjredjbodyiiii
hprovidejuncolored-lemmajlemmai
hassignjlemmajhmacrojbodyjhwithjcolorjredjhuncolored-lemmajbodyiiii
At the end of section 13.7, the redefinition of inc-theorem shows a more robust
but subtle mechanism for customizing existing macros.
230 DESIGNING WITH STYLE
Local customizations
Another frequent situation is that you only want to modify the rendering of a
tag when it is used inside another one. On the web, the Cascading Style Sheet
language (CSS) provides a mechanism for doing this. In TEXMACS, you may sim-
ulate this behavior by redefining macros inside a with. For example, imagine
that we want to suppress the inter-paragraph space inside lists within the-
orem-like environments. Then we may use:
hassignjorig-render-theoremjrender-theoremi
hassignjrender-theoremj
hmacrojnamejbodyj
hwithjorig-render-listjrender-listj
hwithjrender-listjhmacrojxjhorig-render-listjhwithjpar-par-sepj0fnjxiiij
horig-render-theoremjnamejbodyiiiii
On the one hand, this mechanism is a bit more complex than CSS, where it
suffices to respecify the par-par-sep attribute of lists inside theorems. On the
other hand, it is also more powerful, since the render-theorem macro applies to
all theorem-like environments at once.
Internationalization
Certain tags like theorems, figures, or bibliographies need to print English text
like “Theorem”, “Figure”, or “References”. In order to allow this text to be cus-
tomized, such tags usually come with companion macros theorem-text, figure-
text, bibliography-text, etc. For example, the svjour style redefines the figure-
text macro to print “Fig.” instead of “Figure”. In order to automatically trans-
13.3 SOME TIPS BEFORE THINGS GET TECHNICAL 231
late the text from English into the current language, you should pass it as an
argument to the localize macro. For instance, the section-base package con-
tains the following default definition of bibliography-text:
hassignjbibliography-textjhmacrojhlocalizejBibliographyiii
Style files for TEX/LATEX are particularly complex and ill-behaved, with lots of
auxiliary macros and style parameters without clear semantics. For this reason,
the built-in LATEX converters perform rather poorly on style files. TEXMACS pro-
vides equivalents for some of the most important LATEX styles. If you wish
to mimic another style, then we recommend that you proceed as follows:
• Try to import the LATEX style file. Most of the structure will be lost,
but the converter sometimes manages to import at least a few macros
and environment variables. The result of the conversion may therefore
provide a reasonable start for the development of a TEXMACS equivalent
for your LATEX style.
• Add a line huse-package jstd-latexi to your style file and customize the
utility macros from that package in order to specify the most important
layout parameters.
Concerning the third step, we notice that TEXMACS does not always use the
same conventions as TEX/LATEX when it comes to global layout parameters.
For example, the style parameters \oddsidemargin and \evensidemargin
for left margins on odd and even pages do not mean what you would think,
since TEX automatically adds one extra inch. The std-latex package provides
macros tex-odd-side-margin and tex-even-side-margin that mimic this somewhat
twisted behavior in TEXMACS. Various other style parameters \textwidth,
\topmargin, \jot, \abovedisplayskip, etc. admit similar analogues tex-
text-width, tex-top-margin, tex-jot, tex-above-display-skip.
232 DESIGNING WITH STYLE
The std-latex package also defines a macro tex-len with three arguments
default-length, plus, and minus that emulates the syntax of TEX rubber
lengths. For example, htex-lenj1 emj0.5 emj0.25 emi stands for the rubber length
with default, minimal, and maximal values 1 em, 0.75 em, and 1.5 em, respec-
tively. The corresponding TEXMACS syntax for this rubber length is htmlen j
0.75 em j 1 em j 1.5 emi. See pages 62 and 7.1 for more information on TEXMACS
lengths.
hassignjpage-typejletteri
hassignjpage-oddj1.25ini
hassignjpage-evenj1.25ini
hassignjpage-rightj1.25ini
Recall from section 3.10 that the margins may be different on even and odd
pages; the environment variables page-odd and page-right correspond to the left
and right margins on odd pages.
Note that the environment variables for page layout are quite different in
TEXMACS and TEX/LATEX. In order to make it easier to adapt LATEX style files to
TEXMACS, we have therefore provided the std-latex package, which emulates
the environment variables of TEX/LATEX. Typically, this allows you specify
the global layout using declarations such as
hassignjtex-odd-side-marginjhmacroj20ptii
hassignjtex-even-side-marginjhmacroj20ptii
hassignjtex-text-widthjhmacroj33pcii
principal section name appear on even pages, together with the current page
number and a wide underline.
hassignjheader-primaryj
hmacrojtitlejnrjtypej
hassignjpage-even-headerj
hquasiquotej
hwide-std-underlinedj
hpage-the-pageihhtabj5mmihunquotejtitleiiiiii
The first stage is fairly complex, since one has to deal with various optional
data fields and potentially multiple authors with multiple affiliations. Var-
ious styles may present the data in different orders and one has to decide how
to present common affiliations among coauthors (see section 3.3.1 for a few
common styles). Since the required rewritings are rather intricate, they are
not performed by TEXMACS macros, but rather through “external” SCHEME rou-
tines whose precise description falls beyond the scope of this book.
The second stage is more straightforward: for each kind of title information,
there is a corresponding rendering macro that can be customized by particular
styles. For instance, the main title, an optional subtitle, the creation date, and
miscellaneous extra title fields are rendered using the macros doc-title, doc-
subtitle, doc-date, and doc-misc. So if the date should appear in a bold italic
typeface and at a distance of at least 0.5 fn from the other title fields, then you
may redefine doc-date as
hassignjdoc-datej
hmacrojxj
hsurroundjhvspace*j0.5fnijhvspacej0.5fnij
hdoc-title-blockjhwithjfont-shapejitalicjfont-seriesjboldjxiiiii
The helper macro doc-title-block should be used for rendering atomic blocks of
title information; many styles implement this macro by centering title blocks,
whereas other styles rather align them to the left. TEXMACS also uses the macro
doc-make-title for encapsulating all title information. You may specify an
amount of padding between titles and the main text by customizing this macro.
234 DESIGNING WITH STYLE
hassignjsectional-sepjhmacroj – ii
sectional titles typically look as follows:
Similarly, x-post-sep prints the separator between the section title and subse-
quent text. The x-title and x-numbered-title macros respectively specify how
to render unnumbered and numbered section titles. Usually, the user only
needs to modify x-title, since x-numbered-title is based on x-title. However, if
the numbers have to be rendered in a particular way, then it may be necessary
to redefine x-numbered-title. For instance, consider the redefinition
hassignjsubsection-numbered-titlej
hmacrojnamej
hsectional-normalj
hwithjfont-seriesjboldjhthe-subsectioni. inameiii
Notice that the sectional-normal macro comes from the section-base style
package. You may find several similar macros sectional-normal-italic, sectional-
centered-bold, etc. there for some of the most frequent ways to render section
titles.
There are two main rendering styles for sectional titles. By default, paragraphs
and subparagraphs use a “short” rendering style, with a body that starts imme-
diately after the title:
All other sectional tags use a “long” rendering style, in which case the section
title takes a separate line on its own:
My section
Blah, blah, and more blahs...
• The call-back macro x-clean can be used for resetting some counters
when a new section is started. For example, in order to prefix all stan-
dard environments by the section counter, you may use the following
lines:
hassignjsection-cleanjhmacrojhreset-subsectionihreset-std-enviii
hassignjdisplay-std-envjhmacrojnrjhsection-prefixinrii
236 DESIGNING WITH STYLE
• The call-back macro x-toc should be used in order to customize the way
new sections appear in the table of contents.
hnew-theoremjexperimentjExperimenti
hassignjrender-theoremj
hmacrojwhichjbodyj
hpadded-normalj1fnj1fnj
hsurroundjhtheorem-namejwhichhtheorem-sepiijj
hwithjfont-shapejitalicjpar-leftjhplusjpar-leftj1.5fnijbodyiiiii
13.7 CUSTOMIZING NUMBERED TEXTUAL ENVIRONMENTS 237
The macros render-theorem and render-remark are both based on the macro
render-enunciation. The only difference between theorems and remarks is that
theorems typically use an italic font. Note that proofs are rendered using
render-proof; this macro is based on render-remark.
hassign j theorem-name jhmacro j name jhwith j color jdark redj font-series jboldj font-
shapejsmall-capsjnameiii
hassignjtheorem-sepjhmacroj: ii
All numbered environments such as sections and theorems come with coun-
ters section-nr, theorem-nr, etc. In order to increase, reset, or display the counter
theorem-nr, you should use the companion macros inc-theorem, reset-theorem,
and display-theorem. By redefining these macros, you may customize the way
in which environments are numbered. For instance, by redefining inc-theorem,
you may force theorems to reset the counter of corollaries:
hquasij
hassignj
inc-theoremj
hmacrojhcompoundjhunquotejinc-theoremiihreset-corollaryiiii
Notice the trick with quasi and unquote in order to take into account any addi-
tional action that might have been undertaken by the previous value of the
macro inc-theorem. Indeed, hunquote j inc-theoremi gets replaced by the pre-
vious value of the macro inc-theorem. This macro has zero arguments and
hcompoundjhunquotejinc-theoremii simply evaluates its body.
238 DESIGNING WITH STYLE
hassignjsection-cleanjhmacrojhreset-subsectionihreset-std-enviii
hassignjdisplay-std-envjhmacrojnrjhsection-prefixinrii
hassignjrender-listj
hmacrojbodyj
hsurroundj
hno-page-break*ihvspace*j0.5fnij
hright-flushihvspacej0.5fnihno-indent*ij
hwithjpar-leftjhplusjpar-leftj3fnijpar-rightjhplusjpar-rightj3fnijbodyiiii
This redefinition affects the rendering of all list environments (itemize, enu-
merate, etc.) and reduces their right margin by 3 fn:
• This text, which has been made so long that it does not fit on a
single line, is indented on the right-hand side by 3 fn.
• Once again: this text, which has been made so long that it does
not fit on a single line, is indented on the right-hand side by 3 fn.
13.8 CUSTOMIZING LIST ENVIRONMENTS 239
In a similar way, you may customize the rendering of list items by redefining
the macros aligned-item and compact-item. Both these macros take the text
for marking the item as their only argument (e.g. a bullet or a number). The
macro aligned-item aligns the marker to the right (so that subsequent text is
left-aligned), whereas compact-item aligns it to the left (so that subsequent text
may not be aligned).
For example, consider the following redefinition of aligned-item:
hassignjaligned-itemj
hmacrojxj
hconcatj
hvspace*j0.5fnij
hwithjpar-firstj-3fnjhyes-indentiij
hresizejhembbbjxijhminusj1rj2.5fnijjhplusj1rj0.5fnijiiii
Then items inside all list environments with aligned items will be “blackboard
emboldened”:
Items in aligned description lists are rendered using aligned-item.
First condition.
Second condition.
Items in compact description lists are rendered using compact-item.
Gnus and gnats. Nice beasts.
Micros and softies. Evil beings.
In this example, we used hresize jhembbb j xijhminus j1rj2.5fnijjhplus j1rj0.5fniji
to put hembbb j xi inside a box of width 3 fn: the new left limit of the box is
2.5 fn to the left of the original right limit 1 r; the new right limit is 0.5 fn
farther to the right. We next used hwithjpar-firstj-3fnjhyes-indentii to move the
resulting box 3 fn to the left, thereby aligning it to the right13.1.
Remark 13.4. Both aligned-item and compact-item are inline macros. They are
also base macros for various other internal macros aligned-space-item, long-
compact-strong-dot-item, etc. that are used for the rendering of the different
types of lists (itemize-arrow, description-long, etc.).
The std-list package also provides a macro new-list to define new lists. Its
syntax is hnew-listjnamejitem-render jitem-transformi, where name is the name of
the new list environment, item-render an (inline) macro for rendering the item
and item-transform an additional transformation that is applied on the item text.
For instance, the enumerate-roman environment is defined by
hnew-listjenumerate-romanjaligned-dot-itemjhmacrojxjhnumberjxjromaniii
13.1. There are simpler ways to achieve the same effect, but the way we presented here has the
advantage that the alignment remains correct when boxes are moved during line breaking.
Chapter 14
Extend beyond imagination
One major feature of TEXMACS is the possibility to extend the editor using the
GUILE-SCHEME extension language. Such extensions can be simple, like a per-
sonal boot file with frequently used keyboard shortcuts, or more complex,
like a plug-in with special editing routines for documents of a particular type.
The SCHEME language can also be used interactively from within the editor
or invoked by special markup like “actions”.
Why SCHEME? The choice may indeed seem somewhat odd if you are accus-
tomed to more conventional programming languages such as C++, JAVA,
or PYTHON. In particular, SCHEME's heavily parenthesized syntax may scare
more than one person. But it turns out that this baroque syntax has several
advantages for our application. For one thing, it is easy to learn. More impor-
tantly, it enables us to treat programs and data in a uniform manner, which
is particularly useful in the light of section 12.2.3. Other major advantages of
SCHEME are its interactivity and high level of abstraction.
This chapter starts with a crash course on SCHEME [56]. There are several more
extensive books on this topic, such as [15, 11, 52]. We also recommend to take
a look at the GUILE reference manual [22], since this is the SCHEME implemen-
tation on which TEXMACS is currently based.
The rest of the chapter provides an introduction to programming TEXMACS
extensions in SCHEME. More explanations on this subject can be found in Help
Scheme extensions. It is also instructive to take a look at those TEXMACS source
files that are written in SCHEME. These files can be found in the progs subdi-
rectory of the path $TEXMACS_PATH where you installed TEXMACS. For instance,
$TEXMACS_PATH/progs/math/math-kbd.scm lists the keyboard shortcuts in
math mode.
240
14.1 A QUICK INTRODUCTION TO SCHEME 241
#\c, . . . ), strings ("hi", "there", . . . ) and symbols (x, fun, gnu2018, my-sym,
x/3*,...). The following mini-session shows a few typical computations with
such objects:
Scheme] (> 3 2)
#t
Scheme] (if (> 2 3) "yes" "no")
"no"
Scheme] (string->list "Bonjour")
(#\B #\o #\n #\j #\o #\u #\r)
Scheme] (string-append "Hi" " " "there" "!")
"Hi there!"
Scheme] (string->symbol "hop@boeh!stuff*")
hop@boeh!stuff*
Scheme] (symbol? 'my-sym)
#t
One difference between strings and symbols is the notation, since strings need
to be double quoted. Moreover, strings are literal constants, just like the num-
bers 2 and 3.14, whereas symbols are evaluated by SCHEME. One may prevent
a SCHEME expression from being evaluated using ' as a prefix operator; this
explains why we used 'my-sym in order to obtain the symbol my-sym. From a
computational point of view, symbols are sometimes more efficient: the equality
of two symbols can be checked in unit time, whereas all characters in two
strings need to be compared.
Symbols are also used as names for variables and functions. We note that
SCHEME is very flexible when it comes to names of functions: all characters can
be used except for whitespace and the special characters ()[]{}#.,;'"`\. This
makes it possible to use suggestive names string->symbol and symbol? for
converters and predicates. Also note that the dash - tends to be used (instead
of _) as a connector for multiple-word function names such as string-append.
In particular, many function names are prefixed by the type of their principal
argument.
Scheme] (stree->tree
`(concat "My name is " (strong ,my-name) "."))
My name is John.
Notice that (lambda (g) (apply g xs)) stands for the function that takes g
as input and that returns (apply g xs).
Yet another powerful feature of SCHEME is the possibility to enrich the lan-
guage with new primitives, through the declaration of SCHEME macros. This is
done using the keyword define-macro that has a similar syntax as define,
but with the difference that the return value is evaluated a second time.
Local variables in SCHEME are introduced using the keyword let*, whereas
set! can be used to assign a new value to such a variable:
Scheme] (define (foo x)
(let* ((a (* x x))
(b (+ a x)))
(set! a (* a b))
(+ a x)))
Scheme] (foo 100)
101000100
The if primitive can be used both as an instruction and as an expression that
returns a value. SCHEME programmers also frequently rely on the cond prim-
itive which provides an elegant abbreviation for expressions like
(if c1 expr1
(if c2 expr2
...))
14.2 CUSTOMIZING THE GRAPHICAL USER INTERFACE 245
For instance:
So far, we have seen how to execute SCHEME commands from interactive ses-
sions. In order the develop more permanent SCHEME code for TEXMACS, the
simplest method is to create a personal boot file that should be named
$TEXMACS_HOME_PATH/progs/my-init-texmacs.scm
Every time you launch TEXMACS from the command line, this should display
Hello world! on your terminal.
246 EXTEND BEYOND IMAGINATION
You may use the command kbd-map in order to define new keyboard short-
cuts. For example, if you wish to be able to start a new definition by typing
D e f . (and similarly for lemmas, propositions, and theorems), then it suffices
to add the following code to your personal boot file:
(kbd-map
("D e f ." (make 'definition))
("L e m ." (make 'lemma))
("P r o p ." (make 'proposition))
("T h ." (make 'theorem)))
(kbd-map
(:mode in-math?)
("p i" "<mathpi>")
("p i var" (insert '(concat "<mathpi>" (rsup "2"))))
("p i var var" "2*<mathpi>*<mathi>"))
(kbd-map
("C-M-return" (insert '(vspace "2fn"))))
(menu-bind hello-menu
(-> "Opening"
("Dear Sir" (insert "Dear Sir,"))
("Dear Madam" (insert "Dear Madam,")))
(-> "Closing"
("Yours sincerely" (insert "Yours sincerely,"))
("Greetings" (insert "Greetings,"))))
Simple menu entries are of the form (label cmd), whereas -> is used in order
to create submenus. The menu hello-menu needs to be attached to one of
the standard menus in order to be accessible through the interface. Top-level
menus for your personal use should be added to texmacs-extra-menu (so
that they will appear just before the Focus menu):
(menu-bind texmacs-extra-menu
(=> "Hello" (link hello-menu))
(former))
You may use assuming or when for conditional menus; in the case of when,
the conditional menu items are greyed whenever the condition is not met. In
order to add hello-menu to insert-menu under the condition that we are
using the letter style, you may proceed as follows:
(menu-bind insert-menu
(former)
(assuming (style-has? "letter-style")
--- ;; horizontal separating bar
(link hello-menu)))
248 EXTEND BEYOND IMAGINATION
Scheme trees. We have already encountered the type stree of scheme trees
in section 14.1.2; for instance, the scheme tree (frac (concat "a"
a2
(rsup "2")) "b+c") represents the formula b + c . Scheme trees can in
principle be manipulated using stand-alone SCHEME programs that do
not even require TEXMACS to be installed on your computer.
TEXMACS trees. The type tree of TEXMACS trees is a data type that is hard-
coded in the C++ source code of TEXMACS. It can in particular be used
to represent active document fragments that are visible in TEXMACS win-
dows. The tree type is an extension to the SCHEME language that is
specific to TEXMACS and that is only available inside the editor.
Hybrid trees. Often, it is also convenient to mix the above types of trees
into a super-type tm of so-called hybrid trees. More precisely, a hybrid
tree is either a string, a tree, or a list of the form (l x1 ... xn), where
l is a symbol and x1, . . ., xn are other hybrid trees.
Scheme] ht
(math (concat <tree <frac|a<rsup|2>|b+c>> "+" <tree
<frac|a<rsup|2>|b+c>>))
Scheme] (tm->tree ht)
a2 a2
+
b+c b+c
The predicates stree?, tree?, and tm? can be used to test whether a given
SCHEME object is a tree of type stree, tree, or tm:
One special TEXMACS tree is the root tree (root-tree). Each open TEXMACS
document is a child of the root tree and vice versa. Arbitrary subtrees of the
root tree are called active trees and each such subtree is aware of its position
inside the root tree. Using dedicated SCHEME routines from the tree API, this
allows us to make changes in documents simply by assigning new values to
active TEXMACS trees. In order to use these routines, one first has to import
them from the appropriate module:
The following routine can then be implemented to clear the buffer being edited:
0
frac 1
concat b+c
2
1
a rsup
0
2
The primitives tree-set, tree-ref, and tm-ref can be used for the modifi-
cation and retrieval of subtrees along paths:
Scheme] (tm-ref st 0 1 0)
"2"
Scheme] (tree-set tt 0 1 0 "3")
3
Scheme] (tm->tree `(math ,ht))
a3 a3
+
b+c b+c
Another useful macro for writing editing routines is with-innermost: it looks
for the innermost tree at the current cursor position that matches a certain
predicate, assigns this tree to a local variable, and then runs some code. If the
predicate cannot be matched, then nothing is done. If a tag is provided instead
of a predicate, then we test whether the root of the tree is labeled by that tag.
250 EXTEND BEYOND IMAGINATION
(tm-define (hello)
(insert "Hello"))
(tm-define (hello)
(:mode in-math?)
(insert-go-to "hello()" '(6)))
The keyword :mode specifies that the second declaration only applies in math-
mode, when (in-math?) evaluates to #t. The order in which routines are over-
loaded is important. TEXMACS first tries the latest (re)definition. If this definition
does not satisfy the requirements, then it tries the before-last (re)definition,
and so on until an implementation is found that matches the requirements.
In particular, if we swap the two declarations in the above example, then the
general unconditional definition of hello will always prevail. If the two dec-
larations are made inside different modules, then it is up to the user to ensure
that the modules are loaded in the appropriate order.
14.4 TYPESETTING VIA SCHEME 251
(tm-define (hello)
(if (in-math?)
(insert-go-to "hello()" '(6))
(former)))
The TEXMACS stylesheet language is very convenient for the design of simple
and moderately complex macros. Certain macros however may require rewrit-
ings that are easier to program in a full-fledged language like SCHEME. In this
section, we give a few examples of how this can be done.
Let us start with the traditional “hello world” example. Using the TEXMACS
stylesheet language, one may implement a macro hello as follows:
hassignjhellojhmacrojnamejHello name!ii
252 EXTEND BEYOND IMAGINATION
The same effect can be achieved using the following external SCHEME function:
(tm-define (ext-hello t)
(:secure #t)
`(concat "Hello " ,t "!"))
The :secure directive is added in order to indicate that the function can safely
be used from within the stylesheet language: you don't want to destroy your
hard disk merely by opening a TEXMACS document. In order to use the function
ext-hello, we still need to create a TEXMACS macro hello that calls this func-
tion. This is done as follows:
hassignjhellojhmacrojbodyjhexternjext-hellojhquote-argjbodyiiii
hdrd-propsjhellojarityj1jaccessiblejalli
The header of the extern-demo style package also declares a variable extern-
demo-dtd that can be used to conditionally define editing functions for this
style package. First of all, we may introduce a new editing mode for the style
package:
(texmacs-modes
(in-extern-demo% (style-has? "extern-demo-dtd")))
The % suffix is reserved for mode declarations. The above declaration also
defines the corresponding predicate in-extern-demo?. At a second stage, we
may add a keyboard shortcut for the macro hello from the previous subsection:
(kbd-map
(:mode in-extern-demo?)
("H i" (make 'hello)))
14.4 TYPESETTING VIA SCHEME 253
In a similar way, you may create personal style packages and SCHEME modules
in the directories
$TEXMACS_HOME_PATH/packages
$TEXMACS_HOME_PATH/progs
We recall that $TEXMACS_HOME_PATH defaults to the .TeXmacs subdirectory of
your home directory.
Let us now consider a more useful example of how to extend the typesetter
with functionality that is written in SCHEME. Assume that we wish to highlight
all occurrences of a subexpression such as x inside a given mathematical for-
mula. This might for instance be handy for laptop presentations.
We start with the SCHEME function ext-highlight that recursively traverses
a given TEXMACS tree t and marks all subtrees that are equal to st:
The condition (forall? tree? l) checks whether all elements in the list l
are TEXMACS trees. It can recursively be verified that our routine returns the
original tree t if and only if no hits were found. This property is important
because it ensures that the highlighted tree remains accessible.
Next we add the following code to the corresponding stylesheet:
(( xx xx xx ⋅x⋅ ⋅ ⋅x⋅ ))
1 2 3 n
((( ⋅ ⋅ x x x x ⋅ )))
n 1 2 3
(( x ⋅ ⋅ ⋅ x x x ))
n 1 2 3
(( x x ⋅ ⋅ ⋅ x x ))
3 n 1
n
2
2 3 ⋅ 1
(tm-define ((circulant-row l) i)
(let* ((n (length l))
(h (sublist l (- n i) n))
(t (sublist l 0 (- n i)))
(m (append h t))
(r (map (lambda (x) `(cell ,x)) m)))
`(row ,@r)))
(tm-define (ext-circulant t)
(:secure #t)
(let* ((l (tree-children t))
(n (length l))
(m (map (circulant-row l) (.. 0 n))))
`(matrix (table ,@m))))
hassignjcirculantjhxmacrojljhexternjext-circulantjhquote-argjliiii
hdrd-propsjcirculantjarityjhtuplejrepeatj1j1ijaccessiblejalli
14.1. Answer: this is due to the fact that x is a substring of x + y, but not a subtree. In order to
correct the bug, we would need to add extra cases in the routine ext-highlight that also treat
occurrences of st as a substring of t.
Bibliography
[1] O. Arsac, S. Dalmas, and M. Gaëtano. The design of a customizable component to display
and edit formulas. In ACM Proceedings of the 1999 International Symposium on Symbolic and
Algebraic Computation, July 28–31, pages 283–290. 1999.
[2] B. Beeton, A. Freytag, and M. Sargent III, Unicode support for mathematics, http://
www.unicode.org/reports/tr25/tr25-13.pdf, (2012).
[3] T. Bray, J. Paoli, C. M. Sperberg-McQueen, E. Maler, and F. Yergeau, Extensible markup lan-
guage (XML) 1.0 (fifth edition), http://www.w3.org/TR/xml/, (2008).
[4] R. Bringhurst. The Elements of Typographic Style. Harley and Marks, 4 edition, 2012.
[5] The Chicago Manual of Style. University of Chicago Press, 17th edition, 2017.
[6] CollabNet, Subversion, https://subversion.apache.org/, (2001).
[7] B. Collins-Sussman, B. W. Fitzpatrick, and C. M. Pilato. Version control with Subversion.
O'Reilly, 2nd edition, 2009.
[8] J. Cristy et al, ImageMagick, https://imagemagick.org/, (1990).
[9] Dafont, https://www.dafont.com/fr/, (2000).
[10] E. Dahlström, P. Dengler, A. Grasso, C. Lilley, C. McCormack, D. Schepers, and J. Watt, Scal-
able Vector Graphics (SVG) 1.1 (second edition), http://www.w3.org/TR/SVG/, (2011).
[11] R. K. Dybvig. The SCHEME programming language. Mit Press, 2009.
[12] H. Fernandes, Gnu Dr. Geo, http://drgeo.eu/, (1996).
[13] The Document Foundation, LibreOffice, http://www.libreoffice.org, (2013).
[14] H. W. Fowler. A Dictionary of Modern English Usage. Oxford University Press, 1926.
[15] D. P. Friedman and M. Felleisen. The Little Schemer. MIT Press, 1996.
[16] M. Goossens, F. Mittelbach, and A. Samarin. The LaTeX Companion. Addison-Wesley, Reading,
Massachusetts, 1993.
[17] M. Grevisse. Le Bon Usage. De Boeck Supérieur (groupe Albin Michel), 16th edition, 2016.
[18] A. G. Grozin. TeXmacs interfaces to Maxima, MuPAD and Reduce. In V. P. Gerdt, editor,
Proc. Int. Workshop Computer algebra and its application to physics, number 11-2001-279 in JINR
E5, page 149. Dubna, June 2001. Arxiv cs.SC/0107036.
[19] A. G. Grozin, TeXmacs-Maxima interface, Arxiv cs.SC/0506226, (June 2005).
[20] A. G. Grozin. TeXmacs-Reduce interface. CoRR, abs/1204.3020, 2012.
[21] M. Gubinelli, J. van der Hoeven, F. Poulain, and D. Raux. GNU TeXmacs: towards a scientific
office suite. In Mathematical Software - ICMS 2014 - 4th International Congress, Seoul, South
Korea, August 5-9, 2014. Proceedings, pages 562–569. 2014.
[22] Guile reference manual, https://www.gnu.org/software/guile/docs/docs-1.8/
guile-ref/, (2010).
[23] D. Harvey and J. van der Hoeven. Integer multiplication in time O(nlog n). Technical Report,
HAL, 2019. http://hal.archives-ouvertes.fr/hal-02070778.
[24] J. van der Hoeven. GNU TeXmacs: a free, structured, wysiwyg and technical text editor. In
Daniel Filipo, editor, Le document au XXI-ième siècle, volume 39–40, pages 39–50. Metz, 14–17
mai 2001. Actes du congrès GUTenberg.
[25] J. van der Hoeven. GNU TeXmacs User Manual. HAL, 2013. http://hal.archives-
ouvertes.fr/hal-00785535.
[26] J. van der Hoeven. Towards semantic mathematical editing. JSC, 71:1–46, 2015.
[27] J. van der Hoeven. Mathematical font art. In Gert-Martin Greuel, Thorsten Koch, Peter Paule,
and Andrew Sommese, editors, Mathematical Software – ICMS 2016: 5th International Con-
ference, Berlin, Germany, July 11-14, 2016, Proceedings, pages 522–529. Cham, 2016. Springer
International Publishing.
[28] J. van der Hoeven, A. Grozin, M. Gubinelli, G. Lecerf, F. Poulain, and D. Raux. GNU TeX-
macs: a scientific editing platform. ACM Commun. Comput. Algebra, 47(1/2):59–61, 2013.
255
256 BIBLIOGRAPHY
[29] J. van der Hoeven, G. Lecerf, and D. Raux. Preserving syntactic correctness while editing
mathematical formulas. In I. Kotsireas and E. Martínez-Moro, editors, Proc. Applications of
Computer Algebra 2015, volume 198 of Springer Proceedings in Mathematics and Statistics, pages
459–471. Cham, 2015. Springer.
[30] M. Hohenwarter et al, GeoGebra, http://www.geogebra.org, (2001).
[31] R. Huddleston and G. K. Pullum. The Cambridge Grammar of the English Language. Cambridge
University Press, 2002.
[32] B. Jackowski, J. Nowacki, and J. Ludwichowski, The TEX Gyre collection of fonts, http://
www.gust.org.pl/projects/e-foundry/tex-gyre/, (2006).
[33] A. Jaffer, T. Lord, M. Bader et al, GNU Guile, http://gnu.org/software/guile, (1993).
[34] G. Kahana, Hummus, https://pdfhummus.com, (2011).
[35] S. Kimball, P. Mattis et al, Gimp, the GNU Image Manipulation Program, https://
www.gimp.org/, (1996).
[36] D. E. Knuth. The TEXbook, volume A of Computers and Typesetting. Addison-Wesley, 1984.
[37] D. E. Knuth. Computer Modern Typefaces, volume E of Computers and Typesetting. Addison-
Wesley, 1986.
[38] L. Lamport. LaTeX, a document preparation system. Addison Wesley, 1994.
[39] A. Larsson et al, Dia, a drawing program, https://wiki.gnome.org/Apps/Dia, (1998).
[40] A. Lawson. Anatomy of a Typeface. Hamish Hamilton, 1990.
[41] W3C M. Smith, HTML: the markup language (an HTML language reference), http://
www.w3.org/TR/html-markup/, (2012).
[42] Microsoft, Office, https://www.office.com/, (1990).
[43] O. Patashnik. BibTeXing. Documentation for general BibTeX users, 1988.
[44] S. Pinker. The sense of style. Penguin, 2014.
[45] M. Pool et al, GNU Bazaar, http://bazaar.canonical.com/, (2005).
[46] G. K. Pullum. Punctuation and human freedom. Natural Language & Linguistic Theory, pages
419–425, 1984.
[47] Qt, https://www.qt.io/, (1995).
[48] J. Richter-Gebert, H. Crapo, and U. Kortenkamp, Cinderella.2, The Interactive Geometry Soft-
ware, http://cinderella.de, (2013).
[49] D. Roundy et al, Darcs, http://darcs.net/, (2003).
[50] Roy Rosenzweig Center for History and New Media, Zotero, http://www.zotero.org,
(2013).
[51] R. E. Silverman. Git pocket guide. O'Reilly, 2013.
[52] M. Sperber, R. K. Dybvig, M. Flatt, A. Van Straaten, R. Findler, and J. Matthews. Revised 6
report on the algorithmic language Scheme. Journal of Functional Programming, 19(S1):1–301,
2009. http://www.r6rs.org/final/r6rs.pdf.
[53] R. Stallman et al, GNU Emacs, https://www.gnu.org/software/emacs/, (1985).
[54] STI Pub companies, STIX fonts project, http://www.stixfonts.org/, (2010).
[55] W. Strunk, Jr. and E. B. White. The Elements of Style. Macmillan, Third edition, 1979.
[56] G. J. Sussman and Jr. G. L. Steele, Scheme, http://www.schemers.org/, (1975).
[57] The Bibdesk Team, Bibdesk, http://bibdesk.sourceforge.net/, (2002).
[58] The Inkscape Team, Inkscape, http://www.inkscape.org, (2003).
[59] Han Thê Thanh. Micro-typographic extensions to the TEX typesetting system. PhD thesis, Masaryk
University Brno, 2000.
[60] F.-N. Thomas and M. Turner. Clear and Simple as the Truth: Writing Classic Prose. Princeton
University Press, 1996.
[61] Toptal designers, Subtle patterns, https://www.toptal.com/designers/
subtlepatterns/, (2011).
[62] L. Torvalds et al, Git, https://git-scm.com/, (2006).
[63] D. Turner, R. Wilhelm, W. Lemberg et al, Freetype, https://www.freetype.org/, (1996).
[64] Unicode Consortium, Unicode, http://www.unicode.org/, (1991).
[65] Wikimedia Foundation, Wikimedia, https://www.wikimedia.org, (2003).
[66] J. M. Williams. Toward clarity and grace. The University of Chicago Press, 1990.
Index
⇧ . . . . . . . . . . . . . . . . . . . . . 28 article .. .. . . . . . . . . . . . .
225
⌃ . . . . . . . . . . . . . . . . . . . 28, 31 .
artistic table .. . . . . . . . . . . . .
101
⌥ . . . . . . . . . . . . . . . . . . . 28, 31 aspect ratio . .. . . . . . . . . . . . .
168
⌘ . . . . . . . . . . . . . . . . . . . 28, 31 assign . . . . .. . . . . . . . . . . . .
215
⎋ . . . . . . . . . . . . . . . . . . . 29, 33 attach to master . . . . . . . . . . . . .
126
⇥ . . . . . . . . . . . . . . . . 29–30, 68–69 attached . . . . . . . . . . . . . . . . ..
61
↩ . . . . . . . . . . . . . . . . . . . . . 29 author . . . . . . . . . . . . . . . . . .
122
ACM computing class . . . . . . . . . . 50 Author . . . . . . . . . . . . . . . . . ..
48
SCHEME session . . . . . . . . . . . . . 191 axis . . . . . . . . . . . . . . . . . .
98, 162
AMS subject classification . . . . . . . . 50 backslash key \ . . . . . . . . . . .
. . 30
#f . . . . . . . . . . . . . . . . . . 240, 245 baseline . . . . . . . . . . . . . . . .
. . 98
#t . . . . . . . . . . . . . . . . . . . . 240 BASH . . . . . . . . . . . . . . . . .
. 191
$TEXMACS_HOME_PATH . . . . 214, 245, 253 beamer . . . . . . . . . . . . . . . .
. . 64
$TEXMACS_PATH . . . . . . . . . . 214, 240 beamer . . . . . . . . . . . . . . .166, 171
' . . . . . . . . . . . . . . . . . . . . 242 beamer aspect ratio . . . . . . . . .
. . 168
, . . . . . . . . . . . . . . . . . . . . 242 beamer theme . . . . . . . . . . .
. . 167
,@ . . . . . . . . . . . . . . . . . . . . 242 Bezier curve . . . . . . . . . . . .
. . 156
` . . . . . . . . . . . . . . . . . . . . 242 BIBDESK . . . . . . . . . . . . . . .
. . 112
abbreviation . .. . . . . . . . . . . . . 56 bibliographic database . . . . . . .
. . 112
abbrv . . . . . . . . . . . . . . . . . . 114 edit . . . . . . . . . . . . . . .
. . 121
abstract . . . . . . . . . . . . . 50, 227, 234 export entries . . . . . . . . . .
. . 124
accented character . . . . . . . . . . . . 47 import entries . . . . . . . . . .112, 124
accessible . . . . . . . . . . . . . . . . 221 new entries . . . . . . . . . . .
. . 123
acm . . . . . . . . . . . . . . . . . . . 114 search . . . . . . . . . . . . . .
. . 123
acmconf . . . . . . . . . . . . . . . . 139 versioning . . . . . . . . . . .
. . 124
acronym . .. . . . . . . . . . . . . . . 56 bibliography . . . . . . . . . 112, 114, 125
action . .. .. . . . . . . . . . . . . . 106 BibTeX . . . . . . . . . . . . . . . 112, 116
.
active tree .. . . . . . . . . . . . . . 249 big figure . . . . . . . . . . . . . . . . 110
acute . . . .. . . . . . . . . . . . . . . 47 big operator . . . . . . . . . . . . . . . . 76
Add . . . . .. . . . . . . . . . . . . . 201 big table . . . . . . . . . . . . . . . . 90, 110
address . . .. . . . . . . . . . . . . . . 48 black . . . . . . . . . . . . . . . . . . . 60
affiliation . .. . . . . . . . . . . . . . . 48 blackboard bold letter . . . . . . . . . . 68
aligned-item . . . . . . . . . . . . 227, 239 blackboard embold . . . . . . . . . . . 147
alignment . . . . . . . . . . . . . . . . . 53 block . . . . . . . . . . . . . . . . . . . 89
alpha . . . . . . . . . . . . . . . . . . 114 block content . . . . . . . . . . . . . . . 97
alt key ⌥ . . . . . . . . . . . . . . . 28, 31 block markup . . . . . . . . . . . . . 51, 56
ancient . . . . . . . . . . . . . . . . . . 61 block tag . . . . . . . . . . . . . . 210, 217
and . . . . . . . . . . . . . . . . . . . 245 Block . . . . . . . . . . . . . . . . . . 189
animation . . . . . . . . . . . . . . . . 173 blur . . . . . . . . . . . . . . . . . . . 149
appear . . . . . . . . . . . . . . . . . 173 bold . . . . . . . . . . . . . . . . . . 60, 147
appendix . . . . . . . . . . . . . . . . . 51 bold letter . . . . . . . . . . . . . . . . . 68
arc . . . . . . . . . . . . . . . . . . . . 156 border . . . . . . . . . . . . . . . . . . . 94
arg . . . . . . . . . . . . . . . . . . . 216 BOURBAKI . . . . . . . . . . . . . . . . . 20
arrow . . . . . . . . . . . . . . . . . 69, 81 bracket . . . . . . . . . . . . . . . . . . 77
arrow with text . . . . . . . . . . . . . 158 breve . . . . . . . . . . . . . . . . . . . 47
art pen . . . . . . . . . . . . . . . . . . 61 buffer . . . . . . . . . . . . . . . . . . . 37
257
258 INDEX
doc-author-block . . . . . . . . . . .
234 Document
doc-render-title . . . . . . . . . . . .
228 Source
doc-title-block . . . . . . . . . . . . .
228 Edit source tree . . . . . . . 207, 211
document . . . . . . . . . . . . . . .
217 Preferences . . . . . . . . . 208, 218
document abstract . . . . . . . . .227, 234 Source tree . . . . . . . . . . . 208
document bibliography . . . . . .
. . 125 Style . . . . . . . . . . . . . . . . 47, 214
document in project . . . . . . . .
. . 125 Add package
document metadata . . . . . . . .
. . . 50 Add other package . .. . . 214
document style . . . . . . . . . . 15, 39, 47 Example
document title . . . . . . . . . 48, 227, 233 extern-demo . . . . . . 252
document update . . . . . . . . . . . . 104 Article . . . . . . . . . . . . . 15, 48
Document . . . . . . . . . . . . . . . 35, 39 article . . . . . . . . . . . . . . . 48
Bibliography . . . . . . . . . . . . . 125 Springer
Colors llncs . . . . . . . . . . . . 15
Foreground . . . . . . . . . . . 214 svjour . . . . . . . . . . 225
Font . . . . . . . . . . . . . . . . . . 58 Beamer . . . . . . . . . . . . . . 15
Informative flags beamer . . . . . . . . . . . . . . 48
Detailed . . . . . . . . . . . . 70, 105 book . . . . . . . . . . . . . . . . 48
Language . . . . . . . . . . . . . 46, 132 Book . . . . . . . . . . . . . . . . 48
Metadata . . . . . . . . . . . . . . . 50 Edit style . . . . . . . . . . . . . 225
Page . . . . . . . . . . . . . . . . . . 64 Education
Breaking exam . . . . . . . . .. . .. 48
Page breaking algorithm letter . . . . . . . . . . . .. . .. 48
professional . . . . . . . 135 Update . . . . . . . . . . . . .. . . 104
sloppy . . . . . . . . . . 135 All . . . . . . . . . . . 104, 108, 110
Format List of figures . . . . . . . . . . 110
Orientation . . . . . . . . . . 64 Table of contents . . . . . . . . 108
Page rendering . . . . . . . . 64 documentation . . . . . . . . . . . . 39–40
beamer . . . . . . . . . . 64 dot . . . . . . . . . . . . . . . . . . 71, 86
paper . . . . 64, 104, 108, 126 dots . . . . . . . . . . . . . . . . . . 71, 146
papyrus . . . . . . . . 64, 126 DR. GEO . . . . . . . . . . . . . . . . . 165
screen . . . . . . . . . . . 64 DRATEX . . . . . . . . . . . . . . . . . 197
Page type . . . . . . . . . . . 64 draw over . . . . . . . . . . . . . . . . 151
Headers . . . . . . . . . . . . . . 65 drawing . . . . . . . . . . . . . . . 106, 151
Margins . . . . . . . . . . . . 65, 138 drd-props . . . . . . . . . . . . . . . . 222
Same screen margins as on paper Due to . . . . . . . . . . . . . . . . . . . 52
.. . .. . .. . .. . .. . .. 64 Dynamic
Page rendering Next . . . . . . . . . . . . . . . . . 179
paper . . . . . . . . . . . . 136 Edit . . . . . . . . . . . . . . . . . . 26, 34
Paragraph . . . . . . . . . . . . . . . 61 Copy . . . . . . . . . . . . . 91, 163, 180
Advanced Copy to . . . . . . . . . . . . . . . 180
Extra interline space . . . . . 142 BibTeX . . . . . . . . . . . . 122, 124
Minimal line separation . . . 143 Correct
Column separation . . . . . . . 139 Correct all . . . . . . . . . . . ..
85
First indentation . . . . . . . . . 142 Correct manually . . . . . . . ..
85
Interline space . . . . . . . . . . 142 Cut . . . . . . . . . . . . . . . . .
180
Interparagraph space . . . . . . 142 Cut to . . . . . . . . . . . . . . . .
180
Line breaking . . . . . . . . . . 131 Paste . . . . . . . . . . . . 91, 163, 180
normal . . . . . . . . . . . . 131 Paste from . . . . . . . . . . . . . . 180
professional . . . . . . . . . 131 BibTeX . . . . . . . . . . . . . . 122
Number of columns . . . . . . . 139 LaTeX . . . . . . . . . . . . . . 180
Part Preferences . . . . . . . . . . . . . . 36
Show preamble . . . . . . . . . 213 Convert
Scripts . . . . . . . . . . . . 30, 198–199 BibTeX . . . . . .. . .. . . 122
Maxima . . . . . . . . . . . . . 197 Pdf . . . . . . . .. . .. . .. 14
260 INDEX
Focus Focus
Cell Input mode
Dissociate joined cells . . .. . . 100 Multiline input . . . . . . . . . . 193
Height Input options
Adjust limits . . . . . .. . .. 94 Mathematical input . . . . . . . 194
Ajust limits Insert above . . . . . . . . . . . . . 121
None . . . . . . . . . . . 101 Insert argument after . . 38, 50, 113, 168
Horizontal alignment . . . . . . . 95 Insert argument before . . . . . . 38, 168
Join selected cells . . . . . . . . 100 Insert below . . . . . . . . . . . . . 121
Line wrapping . . . . . . . . . . . 96 Insert subtable . . . . . . . . . . . 101
Top . . . . . . . . . . . . . . 89 Interrupt execution . . . . . . . . . 192
Operation mode . . . . . . . . . . 92 Keywords . . . . . . . . . . . . . . . 50
Column . . . . . . . . . . . . 92 Last similar . . . . . . . . . . . . . . 38
Columns . . . . . . . . . . . . 96 Length . . . . . . . . . . . . . . . . 141
Entire table . . . . . . . . . . 92 Line arrows . . . . . . . . . . . . . 161
Row . . . . . . . . . . . . . . 92 Line dashes . . . . . . . . . . . . 82, 160
Padding . . . . . . . . . . . . . . 95 Unit . . . . . . . . . . . . . . . 160
Vertical alignment . . . . . . . . . 95 Other . . . . . . . . . . . . 161
Width . . . . . . . . . . . . . . . 93 Make floating . . . . . . . . . . . . 138
Stretch factor . . . . . . . . . 93 Marginal note sep . . . . . . . . . . 138
Close session . . . . . . . . . . . . 192 Miscellaneous . . . . . . . . . . . . . 48
Next similar . . . . . . . . . . . . 20, 38
Color
Other . . . . . . . . . . . . . . 159
Note . . . . . . . . . . . . . . . . . . 48
Palette . . . . . . . . . . . . . . 159
Numbered . . . . . . . . . . . 52, 55, 66
Date . . . . . . . . . . . . . . . . .. 48
Output options
Delete . . . . . . . . . . . . . . . .. 38
Show timings . . . . . . . . . . 194
Describe . . . . . . . . . . . . 20, 39–40
Overlay mode . . . . . . . . . . . . 172
Draw . . . . . . . . . . . . . . . . . 172
Paper . . . . . . . . . . . . . . . . . 40
Draw over
Papyrus . . . . . . . . . . . . . . . . 40
Draw under . . . . . . . . . . . 153
Preferences . . 26, 38–39, 53, 55, 137, 167
Due to . . . . . . . . . . . . . . . .. 52
Compact Lists . . . . . . . . . . . 55
Duration . . . . . . . . . . . . . . . 173
Degraded threshold
Effect pen . . . . . . . . . . . . . . 149
Other . . . . . . . . . . . . 148
Gaussian . . . . . . . . . . . . . 149
Edit macro . . . . . . 18, 39, 202, 204
Motion . . . . . . . . . . . . . . 149
Edit source . . . . . . . . . . 18, 39
Oval . . . . . . . . . . . . . . . 149
Rectangular . . . . . . . . . . . 149 European numbering style . . 26, 52
End x . . . . . . . . . . . . . . . . 174 Footnote sep . . . . . . . . . . 137
End y . . . . . . . . . . . . . . . . 174 Framed input fields . . . . . . . 194
Enter graphics . . . . . . . . . . . . 153 Framed titles . . . . . . . . . . 167
Evaluate Hanging theorems . . . . . . . 167
Evaluate above . . . . . . . . . 192 Highlight incorrect formulas . . . 85
Evaluate all . . . . . . . . . . . 192 Large padding above . . . . . . 206
Evaluate below . . . . . . . . . 192 Large padding below . . . . . . 206
Exit graphics . . . . . . . . . . . . 153 Locus color . . . . . . . . . . . 106
Exit left . . . . . . . . . . . . . . . . 38 Marginal note width . . . . . . . 138
Exit right . . . . . . . . . . . . . . . 38 Padding above . . . . . . . . . 54, 142
First similar . . . . . . . . . . . . . . 38 Padding below . . . . . . . . . 54, 142
Go to anchor . . . . . . . . . . . . 139 Page float sep . . . . . . . . . . 139
Help . . . . . . . . . . . . . . . . . . 40 Page fnote barlen . . . . . . . . 137
Horizontal alignment Page fnote sep . . . . . . . . . 137
Left . . . . . . . . . . . .. . . 138 Paragraph display numbers . . . . 51
Right . . . . . . . . . . . .. . . 138 Prefix by section number . . . . . 52
Input mode Ring binder notebook style . . . 194
Mathematical input . . . .. . . 194 Style parameters . . . . . . . . 148
262 INDEX
Focus Focus
Preferences Table
Visited color . . . . . . . . . . . 106 Size
Previous similar . . . . . . . . . . 20, 38 Set number of rows .. . . 90, 97
Remove argument after . . . . . . . . 38 Special
Remove argument before . . . . . . . 38 Table breaking . . . . . . . . 99
Rename . . . . . . . . . . . . . . . 111 Vertical alignment . . . . . . . 98–99
Resize . . . . . . . . . . . . . . . 90–91 Bottom . . . . . . . . . . . . . 98
Running author . . . . . . . . . . . . 48 Bottom baseline . . . . . . . . 99
Running title . . . . . . . . . . . . . 48 Middle . . . . . . . . . . . . . 98
Search in database . . . . . . . . . 113 Middle baseline . . . . . . . . 99
Search . . . . . . . . . . . . . . 113 Specific baseline . . . . . . . . 99
Session Top . . . . . . . . . . . . . . 98
Clear all fields . . . . . . . . . .193 Top baseline . . . . . . . . . . 99
Create subsession . . . . . . . .193 Width . . . . . . . . . . . . . . . 97
Fold all fields . . . . . . . . . .193 Paragraph . . . . . . . . . . . 97
Split session . . . . . . . . . . .193 Theorem . . . . . . . . . . . . . . . 186
Unfold all fields . . . . . . . . .193 Time evolution . . . . . . . . . . . 175
Set file name . . . . . . . . . . . .114 Reverse . . . . . . . . . . . . . 175
Set length . . . . . . . . . . . . . .141 Title . . . . . . . . . . . . . . . . . 172
Set width . . . . . . . . . . . . . .107 Today . . . . . . . . . . . . . . . . . 48
Set x-offset . . . . . . . . . . . . .107 Vertical alignment
Set y-offset . . . . . . . . . . . . .107 Bottom . . . . . . . . . . . . .
138
Show hidden . . . . . . . . . . . . .
39 Center . . . . . . . . . . . . . .
138
Snap . . . . . . . . . . . . . . . . .164 Top . . . . . . . . . . . . . . .
138
All . . . . . . . . . . . . . . . .164 foldable . . . . . . . . . . . . . . . . .
193
Curve intersections . . . . . . .164 folded . . . . . . . . . . . . . . . . . .
169
Curve points . . . . . . . . . . .164 font . . . . . . . . . . . . . . . . . .
57, 226
Grid lines . . . . . . . . . . . .164 case . . . . . . . . . . . . . . . .
. . 60
Grid points . . . . . . . . . . .164 category . . . . . . . . . . . . . .
. . 61
Grid-curve intersections . . . .164 collection . . . . . . . . . . . . .
. . 58
None . . . . . . . . . . . . . . .164 database . . . . . . . . . . . . .
. . 58
Snap distance . . . . . . . . . .165 device . . . . . . . . . . . . . . .
. . 61
Text borders . . . . . . . . . . .165 effects . . . . . . . . . . . . . . .
. 147
Text corners . . . . . . . . . . .164 family . . . . . . . . . . . . . . .
. . 60
Text padding . . . . . . . . . .165 management . . . . . . . . . . .
. . 57
Start x . . . . . . . . . . . . . . . .174 selection . . . . . . . . . . . . . .
. . 58
Start y . . . . . . . . . . . . . . . .174 serif . . . . . . . . . . . . . . . .
. . 60
Status . . . . . . . . . . . . . . . .177 shape . . . . . . . . . . . . . . .
. . 60
Animated . . . . . . . . . . . .178 size . . . . . . . . . . . . . . . .
. . 60
Fade in . . . . . . . . . . . . .178 slant . . . . . . . . . . . . . . . .
. . 60
Fade out . . . . . . . . . . . . .178 spacing . . . . . . . . . . . . . .
. . 61
Ink in . . . . . . . . . . . . 177–178 stretch . . . . . . . . . . . . . . .
. . 60
Ink out . . . . . . . . . . . . . . 178 weight . . . . . . . . . . . . . .
. . 60
Style . . . . . . . . . . . . . . . . . 114 footer . . . . . . . . . . . . . . . . .
65, 226
Superscript footnote . . . . . . . . . . . . . . . .
. 137
Subscript . . . . . . . . . . . . . 20 for-each . . .. . . . . . . . . . . .
. 220
Table . . . . . . . . . . . . . . . . . 97 Format . . . .. . . . . . . . . . . .
. . 35
Border . . . . . . . . . . . . . . . 98 Adjust . . .. . . . . . . . . 78, 143, 187
Height . . . . . . . . . . . . . . . 97 Clip . .. . . . . . . . . . . . . 144
Horizontal alignment . . . . . . . 98 Extend .. . . . . . . . . . . . . 143
Padding . . . . . . . . . . . . . . 98 Inflate .. . . . . . . . . . . . . 143
Size . . . . . . . . . . . . . . . . 97 Move . .. . . . . . . . . . . . . 143
Minimal number of rows . . 102 Reduce . . . . . . . . . . . . 78, 143
Set number of columns . . 90, 97 Resize .. . . . . . . . . . . 143–144
INDEX 263
Format Format
Adjust Page
Shift . . . . . . . . . . . .. . . 143 This page header . . . . . . . . . 65
Smash . . . . . . . . . . .. . . 143 This page number . . . . . . . . . 65
Break Paragraph . . . . . . . . . 36, 61–63, 139
Group Advanced . . . . . . . . . . . . . 63
Horizontal . . . . . . . . . 45, 133 Character contraction . . . . 135
Vertical . . . . . . . . . . . 136 Character expansion . . . . 135
Line break . . . . . . . . . . 132–133 Intercharacter stretching . . 133
New line . . . . . . . . . . . 132–133 Use margin kerning . . . . . 135
No line break . . . . . . . . . . 132 Alignment
Page break after Column separation . . . . . . 63
New page . . . . . . .. . . 136 Interline space . . . . . . . . . 62
No page break . . . . .. . . 136 Justified . . . . . . . . . . . . 61
Page break before Number of columns . . . . . . 63
New double page . . . . . . 136 Basic
No page break . . . . . . . . 136 Alignment . . . . . . . . . 36, 61
Cell . . . . . . . . . . . . . . . . 92, 95 Centered . . . . . . . . . . 61
Alignment . . . . . . . . . . . . . 95 Justified . . . . . . . . . . 61
Block content . . . . . . . . . . . 97 justify . . . . . . . . . . . 36
Border . . . . . . . . . . . . . . . 94 Left . . . . . . . . . . . . 61
Line wrapping . . . . . . . . . . . 96 Left margin . . . . . . . . 62
Padding . . . . . . . . . . . . . . 95 Right . . . . . . . . . . . . 61
Text height correction . . . . . . . 94 Right margin . . . . . . . . 62
Width . . . . . . . . . . . . . . . 93 First indentation . . . . . . 61–62
Stretch . . . . . . . . . . . . . 93 Interparagraph space . . . . . 61
Color . . . . . . . . . . . . . . . . 101 Number of columns . . . . . . . 139
Display style Space . . . . . . . . . . . . . . 186–187
on . . . . . . . . . . . . . . . .. 66 Special
Font . . . . . . . . . . . . . . . . 58, 101 Decorate atoms . . . . . . . . . 146
Family . . . . . . . . . . . . . 58–59 Phantom . . . . . . . . . . . . . 144
Ok . . . . . . . . . . . . . . . . . 59 Repeat object . . . . . . . . . . 146
Sample text . . . . . . . . . . . . 59 Specific . . . . . . . . . . . . . . . 145
Size . . . . . . . . . . . . . . . . 58 Even pages . . . . . . . . . . . 146
Standard . . . . . . . . . . . . . . 59 Html . . . . . . . . . . . . . . . 145
Style . . . . . . . . . . . . . . 58–59 Image . . . . . . . . . . . . . . 145
Font effects . . . . . . . . . . . . . 147 LaTeX . . . . . . . . . . . . . . 145
Condensed . . . . . . . . . . . 135 Odd pages . . . . . . . . . . . . 146
Degraded . . . . . . . . . . . . 148 Printer . . . . . . . . . . . . . . 145
Distorted . . . . . . . . . . . . 148 Screen . . . . . . . . . . . . . . 145
Embold . . . . . . . . . . . . . 177 TeXmacs . . . . . . . . . . . . . 145
Extended . . . . . . . . . . . . 135 Table . . . . . . . . . . . . . . . . . 97
Gnawed . . . . . . . . . . . . . 148 Alignment . . . . . . . . . . . . . 98
Magnify horizontally . . . . . . 135 Border . . . . . . . . . . . . . . . 98
Slanted . . . . . . . . . . . . . 176 Height . . . . . . . . . . . . . . . 97
Graphical effects . . . . . . . . . . 149 Large tables
Blur . . . . . . . . . . . . . . . 149 Enable page breaking . . . . . 99
Erode . . . . . . . . . . . . . . 149 Padding . . . . . . . . . . . . . . 98
Outline . . . . . . . . . . . . . 149 Width . . . . . . . . . . . . . . . 97
Thicken . . . . . . . . . . . . . 149 Transform . . . . . . . . . . . . . . 144
Hyphenate as . . . . . . . . . . . 46, 132 Dilate . . . . . . . . . . . . . . 144
Line break . . . . . . . . . . . . . . . 45 Rotate . . . . . . . . . . . . . . 144
Page . . . . . . . . . . . . . . . . . . 64 Skew . . . . . . . . . . . . . . . 144
Page number rendering . . . . . . 65 Whitespace . . . . . . . . . . . . . 140
This page footer . . . . . . . . . . 65 Horizontal space . . . . . . . 70, 141
264 INDEX
Format hat . . .. . . . . . . . . . . . . . . . . 47
Whitespace head . . .. . . . . . . . . . . . . . . . 241
Horizontal space header .. . . . . . . . . . . . . . . 65, 226
Custom tab . . . . . . . . .
141 help . . .. . . . . . . . . . . . . . . 39–40
Stretchable . . . . . . . . .
140 Help . . . . . . . . . . . . . . . . . . 35, 40
Tab . . . . . . . . . . . . .
141 About . . . . . . . . . . . . . . . . . 41
Rigid . . . . . . . . . . . . . . . .
43 Full manuals . . . . . . . . . . . . . . 41
Rigid box . . . . . . . . . .141–142 Compile article . . . . . . . . . . 41
Tab . . . . . . . . . . . . .
. . 146 Compile book . . . . . . . . . . . 41
Vertical space after . . . . .
. . 141 Future plans . . . . . . . . . . . . . . 41
Vertical space before . . . .
. . 141 Help us . . . . . . . . . . . . . . . . 41
former . . . . . . . . . . . . . . .247, 251 Interfacing . . . . . . . . . . . . . 23, 41
formula breaking . . . . . . . . . .
. . 194 Manual . . . . . . . . . . . . . . . . 40
fraction . . . . . .. . . . . . . . .
. . . 75 Browse . . . . . . . . . . . . . . . 41
Fraktur letter . . .. . . . . . . . .
. . . 69 Plug-ins . . . . . . . . . . . . . . 41, 191
frame . . . . . . . . . . . . . . . .
. . . 54 Reference guide . . . . . . . . . . 41, 215
framed input fields . . . . . . . . .
. . 194 Scheme extensions . . . . . . . . 41, 240
function application. . . . . . . .
. 70, 86 Search
Gaussian pen . . ... . . . . . . .
. . 149 Documentation . . . . . . . . 26, 40
generic . . . . . . . . . . . . . .
. . . 65 hidden . . . . . . . . . . . . . . . . . 171
GEOGEBRA . . . . . . . . . . . . .
. . 165 hidden argument . . . . . . . . . . . . . 39
geometric construction . . . . . . .
. . 165 history . . . . . . . . . . . . . . . . . 190
homepage . . . . . . . . . . . . . . . . . 48
GHOSTSCRIPT . . . . . . . . . . . .
. . 108
homoglyph . . . . . . . . . . . . . . 67, 86
GIMP . . . . . . . . . . . . . . . .
. . 151
GIT . . . . . . . . . . . . . . . 22, 124, 187
Homoglyph substitutions . . . . . . . . . 85
horizontal
glossary . . . . . . . . . . . . . . . . . 110
alignment . . . . . . .. . .. . .. . 95
entry . . . . . . . . . . . . . . . . 110
group . . . . . . . . .. . .. . .. 133
glyph contraction . . . . . . . . . . . . 134
whitespace . . . . . .. . .. . .. 140
glyph expansion . . . . . . . . . . . . 134 HTML . . . . . . . . . . 20, 22, 51, 106, 145
gnaw . . . . . . . . . . . . . . . . . . 150 hybrid command . . . . . . . . . . . . . 30
gnawed . . . . . . . . . . . . . . . . . 148 hybrid tree . . . . . . . . . . . . . . . 248
GNU BAZAAR . . . . . . . . . . . . . 187 hyperlink . . . . . . . . . . . . . . . . 106
Go .. . .. . .. . . . . . . . . . . . 26, 35 hyphen . . . . . . . . . . . . . . . . . . 44
Back . .
. .. . . . . . . . . . . . . . 35 non-breaking . . . . . . . . . . . . 132
Forward. .. . . . . . . . . . . . . . 35 hyphenation . . . . . . . . . . . . . 46, 131
grain control . . . . . . . . . . . . . . 189 ieeetr . . . . . . . . . . . . . . . . . 114
graphical animation . . . . . . . . . . 177 if . . . . . . . . . . . . . . . . . . . . 220
graphical effect . . . . . . . . . . . . . 149 if . . . . . . . . . . . . . . . . . . 244, 247
graphical screen . . . . . . . . . . . . 172 ifac . . . . . . . . . . . . . . . . . . 139
graphical-macros . . . . . . . . . . 158 image . . . . . . . . . . . . . . . . . . 106
graphics mode . . . . . . . . . . . . . 151 IMAGEMAGICK . . . . . . . . . . . . . 108
grave . . . . . . . . . . . . . . . . . . . 47 in . . . . . . . . . . . . . . . . . . . . . 62
Greek letter . . . . . . . . . . . . . . . . 68 in-math? . . . . . . . . . . . . . . . . 250
greyed . . . . . . . . . . . . . . . . 57, 169 indentation . . . . . . . . . . . . . . 61, 63
grid . . . . . . . . . . . . . . . . . . . 153 index . . . . . . . . . . . . . . . . . . 109
grid curves . . . . . . . . . . . . . . . 164 entry . . . . . . . . . . . . . . . . 109
grid points . . . . . . . . . . . . . . . 164 inflate . . . . . . . . . . . . . . . . 143, 187
grid-curve intersections . . . . . . . . 164 informative flag . . . . . . . . . . 136, 141
group . . . . . . . . . . . . . . . . . . 163 ink in . . . . . . . . . . . . . . . . . . 177
GUILE . . . . . . . . . . . . . . . . . . 240 ink out . . . . . . . . . . . . . . . . . 178
guillemets . . . . . . . . . . . . . . . . . 44 INKSCAPE . . . . . . . . . . . . . . . . 151
hand-drawn curve . . . . . . . . . . . 158 inline formula . . . . . . . . . . . . . . 66
handwritten . . . . . . . . . . . . . . . 61 inline markup . . . . . . . . . . . . 51, 56
hanging punctuation . . . . . . . . . . 135 inline tag . . . . . . . . . . . . . . 210, 217
INDEX 265
Insert Insert
Import entry . . . . . . . . . . . 124–125 Presentation tag
Import selected entries . . . . . . . 124 Strike through . . . . . . . . . 57. .
Itemize . . . . . . . . . . . . . . . . 54 Subscript . . . . . . . . . . . 57. .
Language . . . . . . . . . . 46, 132, 183 Superscript . . . . . . . . . . 57. .
Last name . . . . . . . . . . . . .. 122 Underline . . . . . . . . . . . 57. .
Line . . . . . . . . . . . . . . . .. 155 Prominent . . . . . . . . . 53, 61, 63, 171
Link Centered . . . . . . . . . . . . . . 54
Action . . . . . . . . . . . . . . 106 Compact . . . . . . . . . . . . . . 63
Alternate . . . . . . . . . . . . 111 Framed . . . . . . . . . . . . . . 54
Bibliography . . . . . . . . . 125 Indent . . . . . . . . . . . . . . . 63
Index . . . . . . . . . . . . 111 Left aligned . . . . . . . . . . . . 53
Citation Lines around . . . . . . . . . . . 54
Detailed . . . . . . . . . . . 114 Ornament . . . . . . . . . . . . . 54
Invisible . . . . . . . . . . . 114 Overlined . . . . . . . . . . . . . 54
Visible . . . . . . . . . . . . 113 Padded . . . . . . . . . . . . 54, 142
Executable input field . . . . . . 198 Quotation . . . . . . . . . . . . . 53
Field reference . . . . . . . . . . 198 Quote . . . . . . . . . . . . . . . 53
Glossary entry . . . . . . . . . . 110 Right aligned . . . . . . . . . . . 54
Hyperlink . . . . . . . . . . . . 106 Underlined . . . . . . . . . . . . . 54
Include . . . . . . . . . . . . . 126 Verse . . . . . . . . . . . . . . . 53
Index entry . . . . . . . . . 109, 111 Resize objects . . . . . . . . . . . . 163
Interject . . . . . . . . . . . 109 Rotate objects . . . . . . . . . . . . 163
Input field . . . . . . . . . . . . 198 Section . . . . . . . . . . . . . . 25, 51
Label . . . . . . . . . . . . . . . 105 Section . . . . . . . . . . . . . 228
Reference . . . . . . . . . . . . 105 Semantics . . . . . . . . . . . . . . . 88
Reference to note . . . . . . . . 138 Other . . . . . . . . . . . . . . . 87
Text for note . . . . . . . . . . 138 Session . . . . . . . . . . . . . . . 191
Long text . . . . . . . . . . . . . . 158 Other . . . . . . . . . . . . . . 192
Mathematics . . . . . . . . . . . . 82, 158 Remote . . . . . . . . . . . . . 201
Displayed formula . . . . . . . . . 66 Scheme . . . . . . . . . . . 191, 240
Equations . . . . . . . . . . . 90, 105 Shell . . . . . . . . . . . . . . . 191
Inline formula . . . . . . . . . . . 66 Set properties . . . . . . . . . . . . 163
Several equations . . . . . . . 67, 96 Size tag . . . . . . . . . . . . . . 56–57
Move objects . . . . . . . . . . . . 163 Slides . . . . . . . . . . . . . . . . 172
N-th root . . . . . . . . . . . . . . . 75 Symbol . . . . . . . . . . . . . . . . 73
Negation . . . . . . . . . . . . . . . 76 Arrow . . . . . . . . . . . . . . . 73
Note Big operator . . . . . . . . . . . . 76
Floating algorithm . . . . . . . . 138 Binary operator . . . . . . . . . . 71
Floating figure . . . . . . . . . . 138 Binary relation . . . . . . . . . 67, 72
Floating object . . . . . . . . . 138 Miscellaneous . . . . . . . . . . . 73
Floating table . . . . . . . . . . 138 Negation . . . . . . . . . . . . . . 72
Footnote . . . . . . . . . . . . . 137 Table . . . . . . . . . . . . . . . 89–90
Marginal note . . . . . . . . . . 138 Big table . . . . . . . . . . . . 90, 110
Overlays . . . . . . . . . . . . . . . 172 Centered block . . . . . . . . . . 90
Insert overlay after . . . . . . . 172 Choice . . . . . . . . . . . . . . . 90
Insert overlay before . . . . . . 172 Determinant . . . . . . . . . . . . 90
Particle . . . . . . . . . . . . . . . 122 Matrix . . . . . . . . . . . . . 80, 90
Point . . . . . . . . . . . . . . . . . 155 Numeric spreadsheet . . . . . . 199
Polygon . . . . . . . . . . . . . . . 156 Plain tabular . . . . . . . . . . . . 90
Presentation tag . . . . . . . . . . . . 57 Small table . . . . . . . . . . . 90, 110
Greyed . . . . . . . . . . . . . . . 57 Stack . . . . . . . . . . . . . . . . 90
Light . . . . . . . . . . . . . . . . 57 Textual spreadsheet . . . . . . . 199
Overline . . . . . . . . . . . . . . 57 Wide block . . . . . . . . . . . 89, 93
Pastel . . . . . . . . . . . . . . . 57 Text . . . . . . . . . . . . . . . . 76, 157
INDEX 267
new double page . . . . . . . . . . . . 136 PDF . . . . . . . . . 24, 50–51, 106, 148, 179
new line . . . . . . . . . . . . . . . . . 132 pen . . . . . . . . . . . . . . . . . . . . 61
new page . . . . . . . . . . . . . . . . 136 Perlin noise . . . . . . . . . . . . . . . 148
new-exercise . . . . . . . . . . . . . . 236 phantom . . . . . . . . . . . . . . 144, 169
new-list . . . . . . . . . . . . . . . 227, 239 picture . . . . . . . . . . . . . . . 106, 151
new-remark . . . . . . . . . . . . . . 236 size . . . . . . . . . . . . . . . . . 151
new-theorem . . . . . . . . . . . . 219, 236 unit . . . . . . . . . . . . . . . . . 153
No clustering . . . . . . . . . . . . . . . 50 plain . . . . . . . . . . . . . . . . . . 114
non-breaking plug-in . . . . . . . . . . . . . . . . 23, 191
hyphen . .. . .. . . . . . . . . 44, 132 poetry . . . . . . . . . . . . . . . . . . . 53
space . . .. . .. . . . . . . . . 45, 132 point . . . . . . . . . . . . . . . . . . 155
null? . . . . . . . . . . . . . . . . . . 242 style . . . . . . . . . . . . . . . . . 162
number-long-article . . . . . . . . 238 polygon . . . . . . . . . . . . . . . . . 155
numbering . . . . . . . . . . . . . . . . 52 polyline . . . . . . . . . . . . . . . . . 155
oblique . . . . . . . . . . . . . . . . . . 60 position . . . . . . . . . . . . . . . . . 186
office suite . . . . . . . . . . . . . . . . 21 POSTSCRIPT . . . . . . . . . . . . . . . 108
Ok . . . . . . . . . . . . . . . . . . . . 103 POWERPOINT . . . . . . . . . . . . . . 179
opacity . . . . . . . . . . . . . . . . . 159 preamble . . . . . . . . . . . . . . . 17, 213
operator . . . . . . . . . . . . . . . . . . 70 presentation . . . . . . . . . . . . . . . 16
or . . . . . . . . . . . . . . . . . . . . 245 presentation mode . . . . . . . . . . . 166
orientation . . . . . . . . . . . . . . . . 64 prime . . . . . . . . . . . . . . . . . . . 75
ornament . . . . . . . . . . . . . . . . . 54 progressive . . . . . . . . . . . . . . . 173
outline . . . . . . . . . . . . . . . . 61, 149 project . . . . . . . . . . . . . . . . . 125
outlined emboss . . . . . . . . . . . . 150 Project . .. . ..
. . . . . . . . . . . . 126
outlined engrave . . . . . . . . . . . . 150 prologue . . ..
. . . . . . . . . . . . . 51
oval pen . . . . . . . . . . . . . . . . . 149 proportional ..
. . . . . . . . . . . . . 61
overbrace . . . . . . . . . . . . . . . . . 79 protrusion . ..
. . . . . . . . . . . . 135
overlay . . . . . . . . . . . . . . . . . 170 pt . . . . . . . .
. . . . . . . . . . . . . 62
Overlay . . . . . . . . . . . . . . . . . 172 punctuation . . .
. . . . . . . . . . . . . 42
overline . . . . . . . . . . . . . . . . . . 57 PYTHON . . . . .. . . . . . . . . . . . 240
padded . . . . . . . . . . . . . . . . 54, 142 quasi . . . . . .
. . . . . . . . 219–220, 237
padded-normal . . . . . . . . . . . . . 227 quasiquote . . .. . . . . . . . . . . . 220
padding . . . . . . . . . . . . . . . . . . 95 quasi-quote . . .
. . . . . . . . . . . . 242
pag . . . . . . . . . . . . . . . . . . . . 62 quotation . . . .
. . . . . . . . . . . . . 53
page quote . . . . . .
. . . . . . . . . . . 44, 242
break . . . . . . . . . . . . . . . . 136 quote . . . . . .
. . . . . . . . . . . . 220
breaking . . . . . . . . . . . . . . 135 quote-arg . . . .
. . . . . . . . . . . . 220
extension . . . . . . . . . . . . . . 135 quote-value . . . . . . . . . . . . . . 220
footer . . . . . . . . . . . . . . . 65, 226 rectangular pen .
. . . . . . . . . . . . 149
header . . . . . . . . . . . . . . . 65, 226 reduce . . . . .. . . . . . . . . . . . 143
layout . . . . . . . . . . . . . . . . 232 reference . . . .
. . . . . . . . . . . . 105
margin . . . . . . . . . . . . . . . . 65 remark . . . . .. . . . . . . . . . . 52, 236
reduction . . . . . . . . . . . . . . 135 remote control .. . . . . . . . . . . . 166
size . . . . . . . . . . . . . . . . . . 64 remote plug-in .. . . . . . . . . . . . 200
type . . . . . . . . . . . . . . . . . . 64 Remove . . . . .. . . . . . . . . . . . 201
PALATINO . . . . . . . . . . . . . . . . 127 render-abstract . . . . . . . . . . . . 234
panorama mode . . . . . . . . . . . . 166 render-enunciation . . . . . . . . . . 236
paper . . . . . . . . . . . . . . . . . . . 64 render-list . . . . . . . . . . . . . 227, 238
papyrus . . . . . . . . . . . . . . . . . . 64 repeat . . . . . . . . . . . . . . . . . . 146
par . . . . . . . . . . . . . . . . . . 62, 97 replace . . . . . . . . . . . . . . . . . 181
PARI/GP . . . . . . . . . . . . . . . . 196 toolbar . . . . . . . . . . . . . . . . 27
paste . . . . . . . . . . . . . . . . . . 163 resize . . . . . . . . . . . 143, 163, 186–187
path . . . . . . . . . . . . . . . . . . . 249 retaining a version . . . . . . . . . . . 188
pattern . . . . . . . . . . . . . . . 101, 146 retro . . . . . . . . . . . . . . . . . . . . 61
pc . . . . . . . . . . . . . . . . . . . . . 62 return key ↩ . . . . . . . . . . . . . . . 29
INDEX 269
Version View . . . . . . . . . .. . . . . . . .
28, 35
Compare Animation toolbar .. . . . . . .176–177
With older version . .. . .. . . 188 Presentation mode . . . . . . .
. . 166
File Remote control . .. . . . . . .
. . 166
Compare . . . . .. . . . . . . . 189 Show panorama . .. . . . . . .
. . 166
Grain . . . . . . . . . . . . . . . . 189 weight . .. . .. . .. . . . . . .
. . . 60
History . . . . . . . . . . . . . . . 190 when . . . . . . . . .. . . . . . .
. . 247
Move . . . . . . . . . . . . . . . . 188 while . . . . . . . . .. . . . . . .
. . 220
Register . . . . . . .. . . . . . . . 190 whitespace . . . . . .. . . . . 43, 140–141
Retain . . . . . . . .. . . . . . . . 188 wide . . . . . . . . .. . . . . . . . . . 60
Current version .. . . . . . . . 188 wide accent . . . . . .. . . . . . . . . . 79
Show . . . . . . . . . . . . . . . . 188 wide block . . . . . .. . . . . . . . . . 89
Update . . . . . . . .. . . . . . . . 190 with . . . . . . . . . .. . . . . . . . . 215
versioning . . .. . .. . . . . . . . . 187 with-innermost . . .. . . . . . . . . 249
vertical wysiwyg . . . . . . .. . . . . . . . 13, 18
alignment . . . . . . . . . . . . . .. 95 XFIG . . . . . . . . . .. . . . . . . . . 107
group . . . . . . . . . . . . . . . . 136 XML . . . . . . . . . .. . . . . . . . 20, 51
whitespace . . . . . . . . . . . . . 141 zoom . . . . . . . . .. . . . . . . 153, 173
videos . . . . . . . . . . . . . . . . . .. 41 ZOTERO . . . . . . . .. . . . . . . . . 112