THE INRSTEX REFERENCE BOOK

Michael J. Ferguson INRS-Télécommunications Montréal

Rapport technique de l’INRS-Télécommunications no. 84-19 (révision, juillet 1991)

Les Publications INRS–Télécommunications, Montréal

This is a DRAFT version of an introduction to INRSTEX and to TEX in general. All suggestions for improvements will be greatly welcome.

Copyright \begin{matrix}c \\ ◯ \end{matrix} Michael J. Ferguson, INRS-Télécommunications, all rights reserved. TEX is copyright by the American Mathematical Society. INRSTEX is copyright by INRS–Télécommunications and Michael J. Ferguson.

This version of the INRSTEX REFERENCE BOOK is produced

using a PostScript Laser Printer using a modified version DVIALW developed by INRS-Télécommunications.

Preface

This volume is a reference manual for INRSTÊX and TEX82. It should not be considered a substitute for the TEXbook. Indeed, when there is a conflict between the two it should be assumed that the TEXbook is correct. This author expresses an immense debt of gratitude to Donald Knuth, the Grand TEXWizard, originator of TEX, and the author of the TEXbook[1]. Indeed many of the macros that have been used for this book have been borrowed from those used for the production of the TEXbook.

Any deficiencies in the aesthetics of the layout of this book lie with the author and not the TEX that was used to produce it. TEX is an exceedingly powerful system. Full exploitation of its capabilities will probably be limited to a few persons. However, it is possible, and will indeed happen, that there will be a number of systems based on TEX that will be simple to use and aesthetically pleasing … at least in your local environment. INRSTÊX is one of these.

This book is organized so that the information may be accessed in two ways. The main objective is to introduce the names and syntax of commands used in TEX. TEX is an extensible language. By this it is meant that it is possible, and indeed quite easy, to add commands of your own to the set supplied. The TEXbook[1] discusses in detail those that are primitives in the language and those that have been added in the basic package known as plain. There are about 300 primitive and 600 more in plain. This book introduces enhancements under the name of INRSTÊX. These constitute a document preparation package that make both an author’s and secretary’s life considerably easier. Several hundred more commands are added in INRSTÊX.

However, these large numbers should not be considered too frightening. A very large number of the commands are for special symbols. In fact for most users, the most useful commands are the ones added to make the production of documents reasonably simple and automatic. However, automatic has its limitations. On the one hand there is the very real difference between people on what constitutes a beautiful layout, and on the other there is the problem of describing linguistically an algorithm or recipe for that individual beauty.

In fact beauty is usually compromised by expediency. The additional commands described for the various styles, books, reports, and letters attempt to balance the two. As much as possible is done automatically. There will be compromises that are not always appropriate. However, there is always a way, usually simple, to specifically modify a single item. Actions of this sort are only taken as a last resort. The problem is that subsequent changes in other parts may make the specific local change all wrong. It is probably a truism that there is never a final version of a document.

The best time for

planning a book is while you are doing the dishes.

Agatha Christie

No man but a blockhead ever wrote except for money.

Boswell’s “Life of Johnson (1709-1784)” [April 5, 1776]

Table of Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii

Chapter 1 TEX and INRSTÊX . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1 The TEX language — primitive, plain, and extended . . . . . . . . . . . 2 1.2 TEX editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Generic Typesetting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 INRSTÊX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.5 English and French — Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.6 Scope of Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Chapter 2 TEX COMMANDS:

DESCRIPTION FORM . . . . . . . . . . . . . . . . . . . . . 7

2.1 Commands TO TEX and INRSTÊX . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2 TEX Command Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Chapter 3 SPECIAL CHARACTERS and

ACCENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.1 Control Characters - Meaning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2 Control Characters - Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.3 INRSTÊX Special Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.4 Special Text Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.5 Opening and Closing Quotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.6 Ordinary Accents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.7 Accents on Mathematical Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Chapter 4 STARTING STOPPING and

FINISHING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

4.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.2 Document Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.3 Preparing the File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.4 TEXing a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.5 Additional Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.6 TEXprint — Printing your Document . . . . . . . . . . . . . . . . . . . . . . . 21 4.7 The “Final” Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.8 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Chapter 5 BASIC IDEAS and

TERMINOLOGY . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5.1 Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.2 Glue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.3 Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.4 Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.5 Penalties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.6 Grouping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.7 Tokens and Token Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5.8 Definitions or Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.9 Assignments and Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Chapter 6 OVERFULL BOXES and OTHER

DISASTERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

6.1 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 6.2 Overfull Boxes — Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Chapter 7 FONTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

7.1 Fonts in a Font Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 7.2 Document Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 7.3 Additional Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 7.4 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 7.5 New Font Families . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Chapter 8 DIMENSIONS NUMBERS and

GLUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

8.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 8.2 Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

8.2.1 Dimension Allocation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 8.3 Numbers or Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 8.4 Glue and Skips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 8.5 Assignments: Giving dimensions, counts, and skips

values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 8.6 Arithmetic with Dimensions, Numbers and Glue . . . . . . . . . . . . . 39

Chapter 9 GLUE – REVISITED . . . . . . . . . . . . . . . . . . . . . . . 41

9.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 9.2 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

Chapter 10 PARAGRAPH CONTROL . . . . . . . . . . . . . . . 45

10.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 10.2 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Chapter 11 SPACING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

11.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 11.2 Basic Spacing Mechanisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 11.3 Verbatim or “No Fill” Forms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 11.4 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

Chapter 12 BREAKS and NOBREAKS . . . . . . . . . . . . . . 57

12.1 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Chapter 13 MATHEMATICS: SYMBOLS

FONTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

13.1 Ordinary Fonts in Mathematics . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 13.2 Mathematical Symbol Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 13.3 Greek Letters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 13.4 Calligraphic Capitals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 13.5 Ords, Operators, and Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 13.6 Brackets or Delimiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 13.7 Common Mathematical Functions . . . . . . . . . . . . . . . . . . . . . . . . . 67 13.8 Build Your Own Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

Chapter 14 MATHEMATICS: EQUATION

SETUP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

14.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 14.2 Mathematic Equation Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 14.3 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

Chapter 15 BASIC BOX COMMANDS . . . . . . . . . . . . . . 79

15.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 15.2 Vertical and Horizontal Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 15.3 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

Chapter 16 BASIC ALIGNMENT . . . . . . . . . . . . . . . . . . . . . 87

16.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 16.2 Tabs for Alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 16.3 The \halign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 16.4 INRSTÊX Table Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 16.5 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

Chapter 17 SIMPLE DEFINITIONS or

MACROS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

17.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 17.2 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 17.3 WARNING — Clever Definitions . . . . . . . . . . . . . . . . . . . . . . . . . 109

Chapter 18 LISTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

18.1 Command List – Making Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 18.2 Making Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 18.3 Command Forms – Making Lists . . . . . . . . . . . . . . . . . . . . . . . . . 114 18.4 Command Forms – List Spacing Parameters . . . . . . . . . . . . . . . 116

Chapter 19 FOOTNOTES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

19.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 19.2 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

Chapter 20 FIGURE and TABLE

INSERTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

20.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 20.2 Possible Figures – TEXGraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 20.3 Figure and Table Captions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 20.4 Deferred Inserts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 20.5 Deferred Figures or Table Inserts . . . . . . . . . . . . . . . . . . . . . . . . . 123 20.6 Full Page Figure/Table Inserts . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 20.7 Complications and Unusual Cases . . . . . . . . . . . . . . . . . . . . . . . . 126 20.8 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

Chapter 21 MULTICOLUMN FORMAT . . . . . . . . . . . . 131

21.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 21.2 Multicolumn Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 21.3 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

Chapter 22 CHAPTER and SECTION

HEADS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

22.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 22.2 Command Forms — Making Head Forms . . . . . . . . . . . . . . . . . . 136 22.3 Command Forms — Number Formats . . . . . . . . . . . . . . . . . . . . . 138 22.4 Command Forms — Section Head Spacing . . . . . . . . . . . . . . . . . 139 22.5 Major Modifications of the Section Head Formats . . . . . . . . . . 139

Chapter 23 AUTONUMBERING REFERENCING and TAGGING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

23.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 23.2 Tagging Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 23.3 Tag Insertion Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 23.4 Valid Tag Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 23.5 Numbering Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 23.6 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

Chapter 24 CITATIONS or REFERENCE

LISTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

24.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 24.2 Making Citations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 24.3 Prelude Citations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 24.4 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

Chapter 25 TABLES of CONTENTS and

FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

25.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 25.2 Making Lists of Contents, Figures, Tables . . . . . . . . . . . . . . . . . 155 25.3 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

Chapter 26 HEADERS FOOTERS and PAGE

NUMBERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

26.1 COMMAND LIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 26.2 Page Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 26.3 Header and Footer Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 26.4 Header and Footer Text/Sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

Chapter 27 PAGES: SIZES

MAGNIFICATION . . . . . . . . . . . . . . . . . . . . . . . 167

27.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 27.2 Page Size Setting and Margins . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 27.3 Magnification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 27.4 Internal and Computed Sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

Chapter 28 TEXING PARTS of

DOCUMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

28.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 28.2 Subdocument Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 28.3 Automatic Saving of Status of a Subdocument . . . . . . . . . . . . . 174 28.4 Command Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

Chapter 29 DOCUMENT STYLES . . . . . . . . . . . . . . . . . . . 177

29.1 Paperstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 29.2 INRS Report Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

Chapter 30 TEXGraph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

30.1 Command List - TEXGraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 30.2 The Inclusion of Encapsulated PostScript . . . . . . . . . . . . . . . . . . 180 30.3 TEXGraph Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 30.4 Simple TEXGraphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 30.5 Simple Vector Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

30.5.1 Text in Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 30.6 Rotated Graphics and Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191

30.6.1 Circles, Arcs and Fills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 30.7 Advanced TEXGraphics and Segments. . . . . . . . . . . . . . . . . . . . . 194

30.7.1 Segment Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 30.7.2 Segment Command Summaries . . . . . . . . . . . . . . . . . . . . . 197

30.8 Slide Making . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 30.9 Some Additional Command Forms – TEXGraph . . . . . . . . . . . . 202

APPENDIX A COMMAND INDEX . . . . . . . . . . . . . . . . . 203

CHAPTER 1: TEX and INRSTÊX

Beauty in things exists in the mind which contemplates them.

Essays on Tragedy, David Hume (1711-1776)

Chapter 1  TEX and INRSTÊX

TEX is a typesetting system^{†} developed by Prof. Donald Knuth of Stanford University for the production of beautiful books. The intent was to automatically duplicate the format of the second edition of a text whose first edition was typeset, for the most part, manually. It has grown, and is becoming the basis of some very powerful document production systems.

TEX is many things. It is first and foremost a language in which to tell a computer how to beautifully typeset text — all sorts of text. It allows for the use of symbols such as ⋆, that are not found on your normal typewriter to be produced by typing \star using letters that usually are. It goes beyond the simple single character and makes it possible to display a mathematics equation such as

∑_{n=1}^{k} n^{2} = \frac{n(n + 1)}{2}

in the middle of the page by just typing

† In fact TEX is a very versatile system providing a powerful language facility that can be

used to create author aids for the production of documents. INRSTÊX is an example

of an integrated version of such aids.

Draft Version:  1991/9/5

$$
\sum_{n=1}^k n^2 = {n(n+1)\over 2}
$$

It produces better looking words by moving the “a” closer to the “T” in such words as “Tag” to compensate for the visual effect of the overhang of the top of the “T”. It produces better looking paragraphs by absorbing the whole paragraph before attempting to break lines. This means that decisions near the top will not lead to disasters later on. It produces better looking pages by considering what is on the following page before attempting to break the present one. This prevents such visual disruptions as those caused by single line paragraphs at the top or bottom of pages.

TEX is rapidly becoming the basis of document preparation systems, including INRSTÊX described in this book. Documents are made up of parts that are not usually thought of in terms of how they look. Parts such as sections, paragraphs, lists, footnotes, chapters, introductions or prefaces. TEX has very powerful facilities for creating systems for dealing with these parts and making decisions on how they should be displayed. These facilities really make up a language whose primitive parts are used to make more powerful parts.

1.1 The TEX language — primitive, plain, and extended

As with most systems, the more complex parts are built from more primitive parts. Primitives in TEX supply the fundamental facilities for both typesetting and language extension. The first set of extensions are those in the plain package supplied with a raw TEX system. The definitive description of the TEX primitives, and the associated extension plain, is in the TEXbook of Donald Knuth. The TEXbook shows how to use these commands and explores some of the implications.

The TEXbook is aimed at all users of TEX — the system builder and the end user. This book is aimed primarily at the end user and more especially the user of INRSTÊX. It briefly discusses the basic text and page building philosophy on which TEX is based. It gathers together most, but not all of the commands in the TEXbook and displays their required syntax, and gives some uses. It does not explore them too deeply. Further examples will be found in the TEX Example Book that will be published as soon as it is compiled.

In addition it describes INRSTÊX, a document preparation system that has been built on top of plain. At present, this includes styles for papers, reports, and books. In addition it aids in the preparation of documents by automatically generating, tables of contents, simple indexes, and numbering such as chapters, sections, equations, tables. Finally it allows for symbolic referencing of any of these parts.

1.2 TEX editors

Any text editor can be used to create a TEX document. Only those characters normally found on a keyboard are used and there are facilities in TEX to allow for those special keyboards and screen systems that can display different characters. For instance it might be that a French keyboard has the letter é on it and the screen can display it in that form. This can be encoded as single key and translated by TEX. Less capable keyboards would actually type a \'e to obtain the é.

Another feature that makes life easier for producing a document on a text editor is the ability to match a left { with a right }. TEX uses these extensively to group things together and sometimes can get upset in quite mysterious ways when they do not. It is also quite useful to be able to edit several parts of the document at the same time. Newer editors allow this.

A TEX editor does not really exist … for a number of reasons. A major objective of such an editor would be as a means of catching (TEX) errors on input and to facilitate modifications of the file for better layout. An editor of that sort must know an awful lot, not only about TEX, but also your extended version. Another objective would be to allow coordinated views of the input file and the TEXprinted output, so that the effect of both major and minor changes would be evident. This is conceivable, but still for the future.

It is possible to argue that an editor that “showed you what you get” is ideal for a document preparation and typesetting system. The difficulty with this argument is that there is no language that adequately encompasses the graphics on the screen with the place of, say a summation sign, ∑ in a mathematical equation. In some cases the semantics of the resulting document is varied by a change in the display format and in other cases it is not. In some cases different semantic objects, such as an IF in a computer program and the if in a sentence are distinguished by font style, and sometimes not. At the document level, it is the semantics of the entity that is important. It may or may not show up in a format change.

1.3 Generic Typesetting

The opposite extreme to the “see what you get” school is the giving of semantic tags to each entity in the document and deciding later how they will be displayed. This means that it is possible to change your mind about the way a, say keyword, will be displayed and change it consistently throughout the document. This approach appears to be possible in a constrained environment and has been successfully applied by DIGITAL[2] to the production of their manuals for the VAX11/780. TEX can be the basis of such a system too.

1.4 INRSTÊX

INRSTÊX is a system to aid in the preparation of documents in several languages using ordinary fonts. The system, excluding its graphics component, is usable with any TEX system but is most useful, when using ordinary cm fonts with an MLTEX system. The graphics component will work with any reasonable PostScript printer and driver. The version at INRS/BNR uses a modified version of Nelson Beebe’s DVIALW on the VAX/VMS and the IBM PC and uses Tom Rokiki’s DVIPS on the UNIX workstations. The two languages actually used are French and English. The pieces, all relatively independent, are as follows:

• the INRSTÊX macro package kernel. This includes all the facilities needed for

∘ section and chapter heads,

∘ lists,

∘ easy tables,

∘ floating figure and table insertions,

∘ footnotes,

∘ automatic generation of table of contents, list of figures, and list

of tables, ∘ automatic numbering of equations, section heads, etc., ∘ symbolic referencing of equations, sections, etc., ∘ optional margin notes to aid in keeping track of symbolic refer-

ences, ∘ automatic generation of citation lists (IEEE style only) ∘ a subdocument feature for building large documents in pieces.

• additional packages for special forms. The modular form of the kernel allows for modifications of what is inside and out. At the present these include

∘ a verbatim style using typewriter fonts for such things as program listings,

∘ a several document styles including a <<PAPER STYLE>>, <<BOOK STYLE>>, <<REPORT STYLE>>. Some of these are rather specialized.

∘ TEXgraph, a graphics system for drawing figures and inserting external figures. This uses the graphics primitives of a PostScript printer. It is inside rather than outside the TEX system.

∘ memo macros including graphics for letterhead,

∘ slide making including graphics for letterhead,

• templates for various styles. This makes their use as easy as filling in blanks.

• MLTeX is an extension to TEX 3.+ that allows hyphenation of words with explicitly accented letters words while using ordinary cm fonts.

• DVIALW, a PostScript driver, written by Nelson Beebe has been modified by INRS to allow inline PostScript for TEXGraph. There is also a version of TEXGraph that will work with Tom Rokiki’s DVIPS.

INRSTÊX may be viewed from several perspectives.

• At the user level, it is a set of procedures that augment the plain macros supplied with TEX. These aid the author in building a document by making shuffling of such things as sections, equations, figures, and tables sufficiently painless that they will be done. It helps the secretary/typist by making it easier to respond to changes. To work most effectively, the author, at the pencil input level, should be aware of the power of the system.

• At the document formatting level, parameters and features are available to modify various spacings, headers, footers, etc.

• At the document design level, the various internal formatting forms are available, independently of the housekeeping functions for the automatic generation of section, equation, and figure numbers, or such things as the table of contents.

1.5 English and French — Together

INRSTÊX supports both English and French document preparation, and is easily extendable to other languages . It does this through the generation of messages and various forms from within the INRSTÊX kernel and through the TÊX extension that allows for language dependent hyphenation of words with and without accents. An example of a kernel form variation is the change from “Chapter” to “Chapitre” when a \chapterhead is called in French rather than in English. \englishversion calls the English forms and \versionfrancaise the French forms.

1.6 Scope of Book

This book will introduce the first version of the document preparation system, to be called INRSTÊX, that is used at INRS/BNR. It will describe virtually all of the symbols and commands that have been introduced in the TEXbook with the exception of those used for symbol definitions and output routines. All of the accessible and changeable parameters will be listed and grouped according to function.

Most chapters will begin with a list of commands that will be discussed in that chapter. Some discussion of where and how these will be used and what will be accomplished using them follows. Then there will be a list of the individual commands with their normal usage syntax. An index of these commands will be found at the end of the book.

Chapter 2 TEX COMMANDS:

DESCRIPTION

FORM

In this book commands, command parameters, and characters that you might be expected to type in at a terminal are shown in typewriter font. Thus a file that would typeset the 23^{rd} psalm below

The Lord is my shepherd, I shall not want; He maketh me to lie down in green pastures, He leadth me beside the still waters; He restoreth my soul.

is given by

\beginnarrowtext 1in
\eightpoint
\obeylines
The Lord is my shepherd, I shall not want;
He maketh me to lie down in green pastures,
He leadth me beside the still waters;
He restoreth my soul.
\endnarrowtext
\bye

The actual commands and their meaning will be described in later chapters. However, it should be possible to guess what they do from their common sense meaning (noting, of course that a \ starts a command). When a listing is shown in this manner, it is assumed that each line is terminated by a <return>. The <return>, abbreviated by <cr> will only be explicitly shown when there might be some confusion.

2.1 Commands TO TEX and INRSTÊX

A command is the way to tell TEX to do something. TEX responds to both verbose, single character commands, and one implicit command. Verbose commands always start with an escape character which for most TEX systems, and in this book, is the backslash \. The command name is a string of letters and the end of the command is shown by a non-letter, usually a blank, although a number such as 1, or a special character such as { or , will do.

A typical verbose command might be the \beginnarrowtext used above. It takes a parameter which is a dimension and is delimited by a final space. The form of the command description would be \beginnarrowtext <indent dimen>␣. Note that the brackets < and > should not be typed. If a parameter or entity in the command is optional it is enclosed in square brackets [...]. For example, the = when setting the outer page size as in

\houterpagesize [=] <page size dimen> is optional. Readability suggests

that they should be included. Verbose commands ignore spaces between the command and the following text.

Single character commands are not preceded by a \, obviously, and exist primarily to improve readability and ease of typing. An example is ^for superscripting or ~ to tie two words together. The major difference between these and the verbose commands is that spaces or blanks after them are not ignored.

Finally, TEX has one implicit command, namely a blank line, which signifies the end of a paragraph and hence is equivalent to \par. Several blank lines are equivalent to only one. In addition, a line that has only a TEX comment, for example

%This line is a TeX comment because it starts with a %

is a blank line. \par and blank lines are not allowed in \halign or in display mathematics mode.

2.2 TEX Command Description

The general form used to describe TEX commands is

\<command> <parameters>

If blank space is shown in the description, that space is optional and there can be several of them. In fact the command can be split at that point and placed on the next line with no ensuing problems. On the other hand a ␣ implies that the blank space must be there.

Finally the commands are shown preceded by one of •, ⋄, or ⋆, and are primitive, plain, or INRSTÊX respectively.

The life is so short, the craft so long to learn.

Aphorisms, Hippocrates (460-400 BC)

Chapter 3 SPECIAL CHARACTERS

and

ACCENTS

This chapter discusses special characters, both those that are single keys (usually) on the terminal but are used for special purposes and those, non mathematics, that end up in the final text as single characters. An example of the first is the { used for grouping (see Chapter 5 information on grouping) and an example of the latter is the copyright sign \begin{matrix}c \\ ◯ \end{matrix} that is obtained by typing \copyright. For special mathematics symbols see Chapter 13.

Section 3.1 discusses the special characters that do not normally print and are used by TEX and INRSTÊX for control purposes. Section 3.2 tells how to print them in the text.

A second set of special use characters, usually single keys, are really single character commands to TEX and INRSTÊX. Their behaviour varies depending on the circumstances. In most cases, they can be used with little or no thought. Occasionally errors in use might cause some confusion. For instance, in INRSTÊX the “|” is interpreted as a vertical bar or rule in normal text and mathematics, but as a column separator with a vertical rule while building tables using INRSTÊX’s \begintable...\endtable commands. The complete set of these commands for INRSTÊX is given in Section 3.3.

The rest of this chapter discusses the second class of special text characters, and the means of inserting them in the text. Section 3.4 shows how to obtain such interesting characters as the British Pound “£” paragraph symbol “¶”.

Quotes, both English “… ” and French ^{⟨⟨} … ^{⟩⟩} are discussed in Section 3.5. Accents on ordinary text letters are in Section 3.6 and on mathematics in Section 3.7.

3.1 Control Characters - Meaning

TEX and INRSTÊX have reserved the following control characters for the uses indicated. None of these characters will be actually printed in the text.

\ . . . . . . . . . . . . . . . . . escape character … starts all control and

command sequences

{} . . . . . . . . . . . . . . . .  grouping brackets

% . . . . . . . . . . . . . . . . indicates the end of a line in a TEX file. Anything after the % will be ignored by TEX while processing the file. This is used for comments.

\@ . . . . . . . . . . . . . . . .  superscript sign
_. . . . . . . . . . . . . . . . .  subscript sign

& . . . . . . . . . . . . . . . . . alignment character used to align

characters from line to line

$ . . . . . . . . . . . . . . . . .  mathematics mode indicator
$<expression>$ . .  mathematics mode start and end

$$<expression>$$ display mathematics mode … start and

end

# . . . . . . . . . . . . . . . . . parameter indicator for definitions and in

alignment preambles

~ . . . . . . . . . . . . . . . . . the tie character … really an unbreakable space between words. For instance, the space between the initials in D.E. Knuth allows the last name to be split from the initials at the end of the line. The sequence D.E.~Knuth will leave the space but not allow the break.

3.2 Control Characters - Printing

The control characters

{     }     #     $     %     &      _\     ~     ^

are obtained by the control sequences

$\{$    $\}$   \#    \$    \%    \&     \_
 $\backslash$   \^{ }   \~{ }

respectively, except as accents. The last two are actually obtained by “accenting” a space. In mathematics the “ ˆ ” and the “ ˜ ” must be obtained using the mathematic accents (see Section 3.7) as \hat{ } or \tilde{ }. The net effect of this is that all characters are available in any mode.

3.3 INRSTÊX Special Characters

INRSTÊX special characters are all active — meaning that they are single character control sequences. The complete list is given below. They are used for specifying column separators in tables.

|

this is a | in normal text, a | Rel in mathematics (see Chapter 13). While making a table inside INRSTÊX

\begintable ... \endtable, the | is a

vertical rule or line column that is used to separate data columns and must not be used in mathematics inside tables – use \vrt (see Chapter 16).

" the double quote should not be used in ordinary text. INRSTÊX will give you a gentle reminder to either `` or ''. It will then put the ”in the text. The " is used while making tables for indicating a rule column where the rule is omitted.

3.4 Special Text Symbols

TEX supplies a number of special symbols that can be used in ordinary text, and some admonitions about those that should not. There are three kinds of dashes in normal typeset material and TEX supplies all three. They are - – — and are produced by - -- and --- respectively. They are known officially as the dash, endash, and emdash. They are used as hyphens, word separators, and idea separators, respectively. These are recognized by TEX as ligatures. Although the English ligatures such as “ff” and “ffi” are recognized by TEX, most in other languages are not.^{†} These require special symbols. In addition there are special symbols such as \begin{matrix}c \\ ◯ \end{matrix} and … that are also useful. Here is a list supplied by plain

\aa, \AA . .  the å and Å
\ae, \AE . .  the ligature æ or Æ
\copyright  the copyright symbol \begin{matrix}c \\ ◯ \end{matrix}

\dag. . . . . . . the dagger †. The math mode $\dagger$ looks similar but incorporates the spacing of a binary operator.

\ddag . . . . . the double dagger ‡. The math mode $\ddagger$ looks similar but incorporates the spacing of a binary operator.

\dots . . . . .  dots in text … like so
{\it\$} …  the nonobvious British Pound £
{\it\&} …  the script ampersand &
\i . . . . . . . . .  the dotless ı for use in î
\j . . . . . . . . .  the dotless ȷ for use in ĵ
\l, \L ….  the ł and Ł
\o, \O ….  the ø and Ø
\oe, \OE . .  the ligature œ or Œ
\P . . . . . . . . .  the paragraph symbol ¶
\S . . . . . . . . .  the section symbol §
\ss . . . . . . . .  the ß

† However, it is easy to modify TEX so that it does recognize those ligatures. Meanwhile,

it is necessary to live with the mechanism given.

Draft Version:  1991/9/5

3.5 Opening and Closing Quotes

The “double quote”, " on the keyboard should not be used, except in its accent form \" to be described later in Section 3.6 on accents. For the \englishversion of INRSTÊX, opening double quotes may be obtained either with the `` in plain or using \ldq. The closing double quotes may be obtained similarly using the '' or the \rdq. When \versionfrancaise is in force, \ldq and \rdq when used like so \ldq guillemets\rdq^{‡} will give ^{⟨⟨} guillemets^{⟩⟩}. Note that the \rdq is an ordinary command that will delete spaces following it.

3.6 Ordinary Accents

The ordinary accents supplied in plain are for the occasional insertion of a foreign language in English text. The mechanisms are complete, and the accents are quite well placed, but the method of obtaining them from keyboards with special characters is not built in. In TEX, the accent always precedes the letter accented. Thus \'ecole gives école, and fran\c cais gives français. Note the annoying space after the \c in the word. This form of input reduces the readability of the text. Agreement is needed to obtain a consistent multilanguage format.

The following is a list of the ordinary accents in TEX specified by plain.

\`<char> . . . . . . . .  accent grave as in à
\'<char> . . . . . . . .  accent acute as in é
\^<char> . . . . . . . .  circumflex or “hat” as in ô
\"<char> . . . . . . . .  umlaut as in ö
\~<char> . . . . . . . .  tilde as in ñ
\=<char> . . . . . . . .  long vowel as in ō
\.<char> . . . . . . . .  dot accent as in ȧ
\b␣<char>. . . . . . .  accent bar-under as in d̄, note space ␣
\c␣<char>. . . . . . .  accent cedilla as in ç, note space ␣
\d␣<char>. . . . . . .  accent dot-under as in o., note space ␣
\u␣<char>. . . . . . .  accent breve as in ŏ, note space ␣
\v␣<char>. . . . . . .  “check” as in ǒ
\H␣<char>. . . . . . .  long Hungarian umlaut as in ő
\t␣<char><char>  tie-after accent as in ao

‡ This is the best we can do with the present fonts

Draft Version:  1991/9/5

3.7 Accents on Mathematical Symbols

Placing accents on mathematical symbols requires a certain amount of care. Plain TEX gives an extra set of commands that are to be used for characters in mathematics mode. All of the following should be used when in mathematics mode. Note the required space ␣, in almost all cases.

<char>' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  the prime as in x′
<char>'' . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  the double prime as in x′′
\acute␣<char> . . . . . . . . . . . . . . . . . . . . . . .  as in x́
\bar␣<char> . . . . . . . . . . . . . . . . . . . . . . . . .  as in x̄
\breve␣<char> . . . . . . . . . . . . . . . . . . . . . . .  as in x̆
\check␣<char> . . . . . . . . . . . . . . . . . . . . . . .  as in x̌
\dot␣<char> . . . . . . . . . . . . . . . . . . . . . . . . .  as in ẋ
\ddot␣<char> . . . . . . . . . . . . . . . . . . . . . . . .  as in ẍ
\grave␣<char> . . . . . . . . . . . . . . . . . . . . . . .  as in x̀
\hat␣<char> . . . . . . . . . . . . . . . . . . . . . . . . .  as in x̂
\tilde␣<char> . . . . . . . . . . . . . . . . . . . . . . .  as in x̃
\vec␣<char> . . . . . . . . . . . . . . . . . . . . . . . . .  as in x⃗

\widehat␣<char>[<char>][<char>] . .  as in x̂, x̂y, x̂yz
\widetilde␣<char>[<char>][<char>]  as in x̃, x̃y, x̃yz

When using these in a technical paper or report, it is probably better to make a short definition for the accented character. This will reduce typing and facilitate the changing the style consistently throughout the paper. It is a very simple form of generic typesetting.

Chapter 4 STARTING

STOPPING

and FINISHING

This chapter discusses the commands that are required to actually process a TEX or INRSTÊX document, and to answer the “?” when TEX runs into an error. Section 4.6 gives the most important options available in TEXprint, the program that actually prints the INRSTÊX file.

Since the initial production of a document is almost always in the “draft” mode, the INRSTÊX default is \draftversion. This mode includes the “Draft Version : Date” at the bottom of the page and margin notes that include tags and their values. This version of the book was a produced with \draftversion but with \marginnotesfalse for all but this chapter and the one on auto numbering and tagging (23). The really final version of this book will probably be produced with \finalversion. Section 4.7 discusses the changes to make when processing the “final” version of a document.

INRSTÊX, especially in conjunction with Multilingual TÊX, supports both English and French … in the same document on a paragraph by paragraph basis. English, both for INRSTÊX messages and hyphenation is the default

and is called by \englishversion. \versionfrancaise invokes French mes-

sages, hyphenation, and spacing. To change only the hyphenation and spacing, \ehyph is used for English and \fhyph is used for French.

                                                                                   start ==> 4
                                                                                    printing <-- 4.6
                                                                                    auto <-- 23
                                                                                    finalversion <-- 4.7

4.1 Command List

The commands in this list are organized in three sections, Creation, Termination and Language, TEXprint, and “?” answer and interrupt. The Language commands include those related to choosing the particular language (French or English) and efficient commands for just changing spacing and hyphenation rules and not the messages.

Creation, Termination and Language Commands

⋄ \bye
⋆ \done
⋆ \draftversion
⋆ \ehyph
• \end
⋆ \englishversion
⋆ \fhyph

                                 ⋆ \finalversion
                                 • \hyphenation
                                 ⋆ \language
                                 ⋆ \marginnotestrue
                                 ⋆ \marginnotesfalse
                                 ⋆ \versionfrancaise

4.2 Document Creation

To create a document, you first need something to write. Enter the text into a file on whatever system you are using. In this book it is assumed that the system you are using is a VAX11/780 running the VMS operating system with the appropriate file names or system conventions.

There are basically three steps to producing a document. The first is to enter the information, with all of the appropriate TEX conventions into a file. The second is for TEX to process it, and the third is for TEXprint, TEX’s printing system to print it out. Any output device that supports typesetting can be used if it has been properly configured for TEX. This could be a dot matrix printer (heaven forbid), a phototypesetter such as the Alphatype, or PostScript laser printer.

4.3 Preparing the File

All that is required to prepare the file is to create the file using your favourite editor. You might try the example given in Chapter 2. A file of TEX commands is normally given the name <your file name>.tex and it can be referred to by only <your file name> with TEX automatically extending it. To tell INRSTÊX that the your file has is completed, the command \done should be the last command in the file. TEX will ignore everything after a

                                                                                   startcom ==> 4.1
                                                                                   Doc ==> 4.2
                                                                                   docprep ==> 4.3
                                                                                    descom <-- 2

\done. \done not only terminates the file, it also fills the last page so that the spacing is correct. The primitive command for TEX to terminate processing is \end. This is not recommended while using INRSTÊX because the last page is not reasonably processed and it will terminate processing while inside a subdocument, something not ordinarily desired (see Chapter 28 for discussion on the details of subdocuments).

Plain TEX supplies the command \bye which has an \end imbedded in it and also cleans up the last page. \done is similar but has a few additional features including a compatibility with the \subdocumentmacros commands. \done is recommended for use in INRSTÊX.

4.4 TEXing a File

After the file has been completed, you leave the editor and return to the operating system where you will be greeted by the prompt of a $ sign. For example if the 23^{rd} psalm file is called psalm23.tex then

$inrstex psalm23

This will submit the job. If you forget to put in your file name, TEX will return with its interactive prompt, the *, and ask you for a file name. At this point you will see the following on your screen.

This is MLTeX, Version 3.1+
(psalm23.tex [1] )
Output written on psalm23.dvi (1 page, 540 bytes).

Do not be deceived. INRSTÊX was indeed loaded … the evidence will be in the psalm23.lis file. The directories containing the files are completely given, and will be yours instead of that shown. The psalm23.log shows that INRSTÊX was indeed preloaded. This file contains

This is MLTeX, Version 3.1+ (format=inrs3_mlb 91.8.22)  2 SEP 1991 02:59
**&/usr/users/u1/mike/inrstex/inrs3_mlb psalm23
(psalm23.tex [1] )
Output written on psalm23.dvi (1 page, 540 bytes).

The version numbers, for both TEX and INRSTÊX will vary with time and installation. If you are not using MLTEX the two “version” lines will be more like

This is TeX, Version 3.14
or
This is TeX, Version 3.14 (format=inrs3_mlb 91.8.22)  2 SEP 1991 02:59

                                                                                    subdoc <-- 28
                                                                                   subfile ==> 4.4

for the terminal and list file respectively.

The default form of the interaction of TEX with you is to stop on an error. At an error, the display will halt and TEX gives you a “ ? ” as a prompt. At this point if you reply with an x or an e, the job will terminate cleanly and you can print what you have to that point. An s will cause TEX to continue, but not to pause for further errors; a <cr> will continue to the next error; an r is like s but will not stop even if it cannot find a file; a q is a nonstop mode that also suppresses all output to your terminal.

Sometimes TEX seems to be in deep trouble and cannot extricate itself. At this point ^C or <control> C will send TEX a message that it should stop. It will after the end of its present command, and return to you the “ ? ”. At that point an x will terminate the job, and give you output that you can print. If all else fails, a ^Y will terminate the job, uncleanly, and there will be no help to fix it.

Sometimes TEX stops with an *. When this happens TEX is looking for a command. Usually an \end or \done will satisfy it and terminate cleanly.

Finally, TEX sometimes has trouble reading a file and asks for another name. The only way out of this, cleanly, is to give it a file name. You should have an empty or null.tex in your directory for such eventualities. This will allow TEX to continue whereupon a ^C will interrupt.

4.5 Additional Files

Whenever TEX processes a job (your file), it creates an internal name that is referred to in a TEX file as \jobname. This is the same as the file name submitted to TEX or INRSTÊX without the .tex extension.

Both TEX and INRSTÊX use this \jobname to create other files with different extensions. All TEX and INRSTÊX jobs create create a second file called \jobname.lis. In this file is a complete listing of the messages and prompts sent to your terminal along with information about problems that may have existed. It is useful for correcting errors. If there is any output that can be printed, this is placed in a file with the name \jobname.dvi. This is the file used by TEXprint.

In addition to these two files, INRSTÊX creates and uses files for special purposes such as building table of contents, lists of figures, or citation lists. These are only produced when some automatic feature of INRSTÊX is active. The complete list of these files is

\jobname.ctg created by the first \cite command used to accumulate the citation tags for a list of citations or references.

                                                                                   additionalfiles ==> 4.5

\jobname.cfm NOT created by INRSTÊX but by the user. This file holds the citation forms to be used when actually printing the citation in the list of citations.

\jobname.dvi created by TEX for any (partly)

successful TEX or INRSTÊX job. This is used by TEXprint.

\jobname.fig  created with a \openlistfile{fig} and

used to accumulate the figure list.

\jobname.lis created by TEX for all jobs. This contains the terminal messages and errors along with more detail on overfull boxes.

\jobname.tag  created by \autonumberingon and used

to accumulate the tags and other special information necessary for symbolic references to sections, equations, etc in the text.

\jobname.tbl  created with a \openlistfile{tbl} and

used to accumulate the table list.

\jobname.toc  created with a \openlistfile{toc} and

used to accumulate the table of contents.

4.6 TEXprint — Printing your Document

After TEX has successfully produced your .dvi file it is submitted for printing, using the same example, by

$dvialw psalm23 -b

INRSTÊX makes the same irrational assumptions of drivers as other macro packages such as plain, namely that the initial position on the page is at (1in, 1in). However these assumptions are not hard wired. INRSTÊX has two commands \hprintoffset and \vprintoffset which are given default values of 1in respectively. These may be changed at will.

⋆ \hprintoffset = <dimen>

This offsets, horizontally, INRSTÊX’s natural margins, which would be flush with the top of the page by <dimen>. The default is \hprintoffset = 1in

                                                             printing ==> 4.6

⋆ \vprintoffset = <dimen>

This offsets, vertically, INRSTÊX’s natural margins, which would be flush with the top of the page by <dimen>. The default is \vprintoffset = 1in

The -b option prints the pages backwards, really normal, order from the lowest number to the highest. A simple batch file can hide this messiness^{†} use

HELP DVIALW to find a list of all the command line options.. The

most important command line option that you can use gives the ability to print only a few pages of the file. DVIALW reports output pages as [p{l}] where p is the physical page number and l is the logical page number. The first example will print from physical page 6 to the end of the document. The second example from page 6 to page 12, and the third example from page 6 to page 12 in steps of 2, ie pages 6, 8, 10, and 12.

$dvialw psalm23 -b -o6
$dvialw psalm23 -b -o6:12
$dvialw psalm23 -b -o6:12:2

4.7 The “Final” Version

INRSTÊX has number of features that are quite useful while putting together a document but which appear in the “draft” version but not in the “final” version. The default for INRSTÊX is \draftversion. This puts all the tags in the margin and puts “Draft Version: date”^{†} at the bottom of the page. To create the final version the command \finalversion should be put at the very beginning of your document.

4.8 Command Forms

Creation and Termination Commands

⋄ \bye

Cleanly terminates a file. Actual meaning is “\par \vfill \supereject \end”. However, it will also terminate TEX processing if found in a subdocument. See Chapter 28 for details.

                                                                                   finalversion ==> 4.7
                                                                                   stcomforms ==> 4.8
                                                                                    subdoc <-- 28

† For the INRS/BNR VAX

† version préliminaire: date en français

Draft Version:  1991/9/5

⋆ \done

This is the only way to terminate a document or subdocument in INRSTÊX without creating problems. Does everything \bye does along with checking whether certain groups are properly ended.

⋆ \draftversion

This is the INRSTÊX default form. It prints margin notes when tags and autonumbering are used and puts a draft version note in the bottom margin. It is turned off using \finalversion.

• \end

Terminates a TEX job, even if it is in a subdocument. See Chapter 28.

⋆ \englishversion  \ehyph

This is the default for INRSTÊX. All the messages are in English, along with the various headings such as Chapter, and Appendix. Hyphenation is done by English rules, as is sentence and word spacing. \ehyph just invokes English hyphenation rules and does not affect messages. The other version that exists

is \versionfrancaise
⋆ \finalversion

This removes the marginal notes and the “Draft Version” note in the bottom margin. It should be used for the “final” copy.

⋆ \hyphenation{<exceptions>}

This command is used to correct hyphenation of a specific word when TEX does it incorrectly. It is generally needed only for English. Without TÊX, the word is entered into the hyphenation exception table. With TÊX, it is entered into the hyphenation table corresponding to the language that is active at the time the command is executed. For example, if English (\language=0) is active, then \hyphenation{man-u-script} will enter the word “manuscript” into the hyphenation exception table with possible hyphens at those places where there is a “ - ”.

⋆ \language [=] <integer>

Normally this command will not need to be used. INRSTÊX has \language=0 for English and \language=1 for French. Additional languages may be added. If INRSTÊX is used in conjunction TÊX, then \language is an integer parameter; otherwise, it is a \count. For details on TÊX, see “A Multilingual TÊX”.

                                                                                    subdoc <-- 28

⋆ \marginnotestrue  \marginnotesfalse

If \marginnotestrue, then the margin notes will be produced. They will not be produced when \marginnotesfalse. These can be used to override the

defaults in \draftversion and \finalversion.
⋆ \versionfrancaise  \fhyph

This will produce French titles, messages, and spacing. When used with Multilingual TÊX, it also produces French hyphenation. \fhyph just invokes French hyphenation rules and does not affect messages. It should be placed at the beginning of the file.

TEXprint Commands

These commands are dependent upon the actual print driver that is being used. For DVIALW the following command line switches are used:

DVIALW Command line options

-b : Print the file in normal order. The default is to print the file beginning with the last page.

-c# : Select the number of copies to print ... each page is printed # times. eg -c42 will print 42 copies of each page.

-h : Select landscape printing.

-i : Select Legal printing.

-o : Select output page range ... all numbers are the ”physical”page numbers, not the logical pages. DVIALW reports page output in the format of [pl] where where p is the ”physical’ page number and l is the ”logical’ page number.

-o# specifies start page

-o#:# specifies start page and end page

-o#:#:# specifies start page, end page and step

-r : Select manual feed. The laserwriter will wait for the insertion of manual pages.

-x#<dim> : Set left margin. -x0in sets the left margin to 0in.

-y#<dim> : Set top margin. -y0in sets the top margin to 0in.

Chapter 5 BASIC IDEAS

and

TERMINOLOGY

This chapter introduces some more terminology used in TEX and INRSTÊX. These are boxes, glue, dimensions, modes, penalties, groups, tokens, token lists, definitions, macros, assignments and parameters.

5.1 Boxes

TEX can be imagined as assembling boxes, in various modes, much in the same way that a child builds a castle. Pages are formatted by glueing together such boxes. This page has some of the component boxes outlined so you can see them. In fact this paragraph is surrounded by a box that is made up by TEX’s page paragraph builder, when it pastes together a page. However this process starts from the bottom up. First letters are glued together horizontally to make the word letters. Then all the words in a paragraph are glued together, with appropriate interword spacing, in a single long line. Finally this long line is broken into page-width lines in the nicest way.

A horizontal box, one with a horizontal list such as the words in a paragraph, is an \hbox. A vertical box, for example the one that contains the vertical list of \hboxes for the lines, is called a \vbox. The most important \vbox for TEX is the one that is used to collect the lines that make up the page. This is box 255, and it is on this box that the page builder works. There are, in fact, 256 boxes available to use. Some of these have been already used by plain or an extension package.

5.2 Glue

Boxes are not the whole story. Between boxes there is glue. This glue can stretch or shrink and is stretched or shrunk in order to make a list of boxes inside another, such as words on a line, evenly fill out the line. This is how words are right justified on a line. When there is not enough stretch or shrink available, TEX complains about an underfull or overfull box. Overfull boxes are indicated on the document with an ugly black vertical line at the end of the offending box. Underfull boxes cause error messages and the glue is stretched beyond its limits. When glue is inserted, it shows up as blanks or white space. More detail on glue will be found in Chapter 8.

5.3 Dimensions

Boxes have dimensions that consist of a <decimal number> and a two letter unit of measurement such as in for inches or cm for cm. Thus “2.54cm” is another way of saying “1in”. When TEX is processing some text looking for a dimension, it reads the next two letters after a number and attempts to interpret this as a unit of measure, whether or not there is a space or non letter following. More details on dimensions will be found in Chapter 8.

5.4 Modes

When TEX is putting together a horizontal list of boxes, such as characters in a line, it is said to be in the horizontal mode. The result of working on a horizontal list of boxes is a horizontal box.

If TEX is putting together boxes inside another horizontal box, it is in the internal horizontal mode. Lines are assembled as a vertical list to create vertical boxes. When assembling vertical list of boxes to makeup a page, TEX is said to be in vertical mode. When processing a vertical list of boxes to make up a vertical box it is in the internal vertical mode. TEX’s page builder is in action when TEX is in vertical mode. When in internal vertical mode it is not. In fact this is about the only difference between the two modes.^{‡}

‡ This was not the case in TEX78.

Draft Version:  1991/9/5

TEX has two other modes, mathematics mode, and display mathematics mode. It is in these modes that mathematical equations, subscripts, and superscripts are produced. You cannot create subscripts and superscripts in non mathematics mode. Mathematics mode is used to imbed mathematics or mathematical symbols amongst normal text. Display mathematics will create a displayed equation.

For the most part TEX will flip from one mode to another automatically when it meets a command that should occur in one of the specific modes.

5.5 Penalties

TEX does its work by assigning penalties to various visually disturbing aspects of the page. It then tries to make the total of these penalties as low as possible, and when it happens, confidently declares that the best possible job has been done. Sometimes the results are not as nice as either you or TEX would like. TEX not liking it means that there was no feasible way to do things, such as build a paragraph, or break a page without violating the norms of good taste as embodied in such things as glue stretching badness on a line. The result is underfull or overfull boxes. In some cases, the result is just plain awful. TEX has about 40 parameters, and the various extensions many more. Any of these may be changed to improve a given situation. In fact, since TEX actually assigns penalties based on the context or state of a page, the penalty approach will theoretically satisfy any objective. Difficulties arise in choosing the penalties to match your objectives and upon obtaining a consensus on objectives. The playing with penalties is an advanced occupation.

5.6 Grouping

One of the most important ideas in TEX, is that of a group. Commands in INRSTÊX of the form \begin... \end..., the inside of boxes and fields in an \halign always form a group. The {...} also form a group unless they are being used to determine the parameters for a definition.

A group allows for an action to be restricted to a small locality, and to easily revert to the previous form when going outside the group. For instance, this paragraph is set in roman type. The command \bf causes everything after it to appear in bold face type until there is something like a \rm to return it back to normal. However if the \bf were placed inside a group, the effect of the command will be undone when leaving the group without you having to remember what to undo. To insert some bold face type in the midst of roman type just enclose it in a group like {\bf bold face type} and the roman will magically reappear after the group.

Both {...} and the \begingroup...\endgroup pairs define groups. The major difference is that the text inside {...} is absorbed by TEX immediately as a single entity while the passing through a \begingroup just causes TEX to note that it has gone into another level of grouping.

Braces {...} are most useful to define parameter groups for definitions For instance the command \sqrt{<math expression>} uses the {...} to determine exactly what should be under the square root sign. They are also useful for short groups within the body of the text.

However, for major, long groups the \begingroup...\endgroup pair should be used. For instance, in INRSTÊX, \beginappendices begins a group which is ended when you say \endappendices. While inside that group special changes to the format of equation numbers and section references are occurring. When the group is left, these are undone. In fact, in INRSTÊX, any command that has the form \begin... will enter a group and have a corresponding \end... associated with it that must be used to properly leave the group.

While TEX is still reading commands, before it has settled down to actually doing its work, braces and \begingroup...\endgroup pairs do not need to match. This is a perfectly valid grouping {...\begingroup...}...\endgroup. In fact { ...\endgroup is not a valid grouping. When the information in the TEX commands get finally deep down inside TEX, all groups are the same and if a group is opened it must eventually be closed. This is possible because of the special way that TEX destroys braces while it is digesting commands. TEX

never destroys \begingroup...\endgroup pairs.

5.7 Tokens and Token Lists

When TEX reads your file, it immediately changes the input characters tokens. In this sense a command like \begingroup is a single token. A token list is simply a list of tokens. One of the features of TEX that is used in INRSTÊX is the named token list. For instance, INRSTÊX defines the token list \chaptername to be the chapter name. This chapter has a name

\chaptername = {Basic Ideas\cr and\cr Terminology}

Note that there are \cr in this list that do not give any trouble. To insert the contents of a token list into the text, the command \the\chaptername is used. The following

Basic Ideas and Terminology is obtained by

\centerline{\vbox{\halign{\strut\hss #\cr
                 \the\chaptername \cr}}}

5.8 Definitions or Macros

Both TEX and INRSTÊX let the user define their own commands. These are of the form \<name> and are single tokens. The terms definitions and macros are to be considered identical. If for some reason your name occurs frequently in your text, the following would make typing easier:

\def\mjf{Michael J. Ferguson}

would allow for “Michael J. Ferguson, Michael J. Ferguson, Michael J. Ferguson” to be inserted in the text by merely typing “\mjf, \mjf, \mjf”. More details on definitions will be found in Chapter 17 and in the TEXbook.

All the internal INRSTÊX macro definitions have an @ as the second letter. Since an @ is not normally allowed in definition names there is no danger that you will inadvertently redefine a command that is used by INRSTÊX but is not found in the command index (following page 203).

5.9 Assignments and Parameters

Parameters in TEX and INRSTÊX are used to keep and allow modification of such things as page sizes, list spacing, or page margins. They are all modified by

\<parameter name> [=] <new value>

where the “=” is optional. For example

\houterpagesize = 8in

will change the width of the page to eight inches.

There is no one on earth who does what is right

all the time and never makes a mistake.

Ecclesiastes Chap. 7, Verse 20

Chapter 6 OVERFULL BOXES

and

OTHER DISASTERS

Sometimes TEX and INRSTÊX have trouble making a best decision that is good enough. The result of this is a message that there is an overfull or underfull box. Chapter 10 suggests increasing the value of \tolerance and \pretolerance so that TEX will accept worse looking lines. This is fine except that the result is less than beautiful.

TEX indicates an overfull box by putting a big ugly black line at the end. This book has a few overfull boxes to demonstrate how they look. This chapter suggests ways of both avoiding and hiding overfull boxes.

6.1 Command Forms

• \hfuzz [=] <dimen> . . . . . . . . TEX tells of overfull horizontal boxes only if they are overfull by more than <dimen>. Plain default is 0.1pt.

• \overfullrule [=] <dimen> TEX places a rule or line of width <dimen> at the end of an overfull box and of the same height as the box.

• \vfuzz [=] <dimen> . . . . . . . . TEX tells of overfull vertical boxes only if they are overfull by more than <dimen>. Plain default is 0.1pt.

6.2 Overfull Boxes — Action

The recommended way to handle an overfull box is to rewrite the passage that is causing the offence. This will generally work quite well if the box is an isolated event. It has the feature of not destroying the beauty of the document.

However, if you want to hear about overfull boxes but don’t want the black marks let \overfullrule = 0pt. If you don’t want to hear about them, increase the size of \hfuzz and \vfuzz. \finalversion increases \hfuzz and obliterates the black marks.

Overfull vboxes are quite rare, as are underfull hboxes. If there is an underfull hbox, check it very carefully. The most likely error is not putting in glue to fill in the box. An example would be using \line instead of \centerline.

Underfull vboxes are not as rare. They result when the vboxes on the page are quite large and the glue between them is not very stretchy. Pages with figures, tables or multicolumn format are the most likely candidates. The only solution may be a rearrangement of material in the document, forced filling of the bottom of the page. TEX provides a \raggedbottom command that puts glue at the bottom of a short page to prevent it from being stretched out. Whether this is an adequate solution to the problem is a matter of aesthetic debate. In general, information about over and under full boxes is desirable.

When TEX indicates that there is an underfull box, it stretches, unless \raggedbottom is active, all stretchable glue. This may result in pages that look strange. Only glue between paragraphs, before and after display mathematics, between all list items, and before section … heads is stretchable. Interline glue is not stretchable either in Plain or INRSTÊX. In extreme cases (badness greater 10000) the page will have very disturbing spacing indeed.

Chapter 7  FONTS

INRSTÊX has available to it a large number of fonts.^{†} Fonts are available as members of a “family” or individually. Font families consist of various styles (normal) Roman, Boldface, Italic, Slanted, and Mathematics symbols at the different point sizes.

7.1 Fonts in a Font Family

A font family consists of a number of fonts and mathematical symbols that have been chosen to satisfy the size requirements of sub and subsub scripts. The family sizes available are \twelvepoint, \tenpoint, \ninepoint, and \eightpoint.^{‡} To call a specific style of font in a font family it is necessary to use the simple abbreviation of \rm for roman, \it for text italic, \sl for slanted, \bf for bold, and \tt for a fixed spacing typewriter like font. \tt is in the tenpoint typewriter font. In addition, a font family has three big fonts called respectively, \bigfont, \biggfont, and \bigggfont. These are all roman fonts and are approximately 1.2, 1.44, and 1.78 times the basic family point size. There is also a smallerfont that is called through \smallerfont. These fonts are all changed when the point size family is changed.

† The ease of availability of different fonts is determined by the power of the local texprint

program. A “font manager” to find obscure fonts is a necessity if a wide range of fonts

are needed … or desired.

‡ In TEX there are 72.26666 points to the inch (about 28.45 points to the cm).

Draft Version:  1991/9/5

7.2 Document Font

INRSTÊX has the important idea of a document and along with it a document font family. This is the default font for the document and the basis of the sizes of the fonts found in the headers, footers, section heads, or footnotes among others. For example the section head font is called \sheadfont and is only changed when the document font family is changed and not by merely calling a point size family. The change in the document font is made naming a par-

ticular <point size font family> as an argument of a \documentstyle

command. For instance \documentstyle{\twelvepoint} would create a document with the text twelve point Roman. The fonts for chapter and section heads, footnotes, headers, and footers would also be appropriately modified. This feature means that you could run \eightpoint text through several sections without modifying the section head fonts. On the other hand, a change in document font will change the entire document and can be done at any time or even within a group. \documentstyle{\tenpoint} set the document font set of this book to tenpoint.

7.3 Additional Fonts

A new font, assuming that it exists, must first be defined and then called.

For example, \font\fivermsca = cmr5 scaled 2074 defines a five point Ro-

man font magnified by 2.074, or to about 10 points. The “5 point” is its design size. To call the font, use \fivermsca, usually inside a group to limit its effect. For instance “this was produced by” the following “{\fivermsca this was produced by}”. Note that a scaled five point font is wider than a ten point form. The command is

⋆ \font\<fontname> [scaled <number>]

This defines a new font with the name \<fontname>. The scaling is optional. The scale values are 4 digit integers, 1000 times greater than the nominal size.

Thus \font\fvx = ambx5 scaled 1000 is identical to \font\fvx = ambx5.

To actually use the font, the command \<fontname> is called.

Some examples are as follows:

⋆ \fivei . . . . . . . . . . . . . . . . . .  Fivepointmathitalic
⋆ \fiverm . . . . . . . . . . . . . . . . .  Five point Roman
⋆ \fivebf . . . . . . . . . . . . . . . . .  Five point bold

\font\sixrm=cmr6. . . . . . .  Six point Roman

  \font\sixbf=cmbx6 . . . . .  Six point Bold

  \font\eighteenrm=cmr17 Eighteen (Seventeen?)

point Roman

  \font\tendu=cmdunh10 . .  Ten point Dunhill

\font\twelvess=cmss12. Twelve point special San Serif
\font\tenu=cmu10. . . . . . .  Ten point unslanted italic

Note that \fivei is a mathematics italic font. In this font the space has been defined to have zero width and the character set is different than that found in a typical Roman type font.

7.4 Command Forms

The four complete point size families are

⋆ \twelvepoint Calls the twelvepoint font family
⋆ \tenpoint …  Calls the tenpoint font family
⋆ \ninepoint . .  Calls the ninepoint font family
⋆ \eightpoint.  Calls the eightpoint font family

Point Size Relative Fonts

⋆ \bf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bold in current font family

(tenpoint)

⋆ \it . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  Italic in current font family (eightpoint)
⋆ \rm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  Roman in current font family (eightpoint)

⋆ \tt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  Typewriter in current font family
                                           (eightpoint)

⋆ \bigggfont . . . . . . . . . . . . . . . . . . . . . . Biggg font in current

(eightpoint)

⋆ \biggfont . . . . . . . . . . . . . . . . . . . . . . . Bigg font in current (eightpoint)
⋆ \bigfont . . . . . . . . . . . . . . . . . . . . . . . .  Big font in current (eightpoint)

⋆ \cheadfont . . . . . . . . . . . . . . . . . . . . . . chapterhead in current

(tenpoint)

⋆ \documentstyle{<font family>}  Sets document font family to <font
                                   family>

⋆ \footerfont . . . . . . . . . . . . . . . . . . . . .  footerfont of current document font
⋆ \footnotefont . . . . . . . . . . . . . . . . . .  footnote font (family) of current document font
⋆ \headerfont . . . . . . . . . . . . . . . . . . . . .  header font of current document font
⋆ \smallerfont. . . . . . . . . . . . . . . . . . . .  this is smaller relative to tenpoint

⋆ \sheadfont . . . . . . . . . . . . . . . . . . . . . . Section head font of current

document font

⋆ \ssheadfont . . . . . . . . . . . . . . . . . . . . . Subsection head font of current

document font

⋆ \sssheadfont. . . . . . . . . . . . . . . . . . . . Subsubsection head font of current

document font

⋆ \dsssheadfont . . . . . . . . . . . . . . . . . . Diminished section head font of

current document font

⋆ \captionnumfont . . . . . . . . . . . . . . . . Caption label and number font of

current document font

⋆ \captiontitlefont. . . . . . . . . . . . . . Caption title font of current document

font

⋆ \captionbodyfont . . . . . . . . . . . . . . . Caption body font of current document

font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7.5 New Font Families

It is easy to produce a new font family that is compatible with INRSTÊX– just modify the \tenpoint definition that is in the inrsfont.tex file.

Chapter 8  DIMENSIONS NUMBERS and GLUE

TEX is very concerned with the sizes of boxes and letters and the amount of freedom to place letters, lines and boxes on a page. Along with the normal page numbers, INRSTÊX keeps track of, among others, chapters, sections, subsections and equation numbers. This means that TEX has dimensions, numbers, or counters, and glue. This chapter introduces the valid units of measure and the forms for glue.

8.1 Command List

• \advance • \multiply • \divide

                     • <units of measure>
                          cm em ex in
                          mu pt sp

                                            ⋄ \newcount ⋄ \newdimen ⋄ \newskip

8.2 Dimensions

    A dimension, or <dimen>, consists of a [+ -]<decimal number><unit of

measure>. The <decimal number> can be an integer, (called a number in the TEXbook), or include a decimal point and a decimal fraction. The plus or minus signs are optional.

TEX recognizes English, Metric, Printers, and font relative <units of measure>. Some examples, but not all, are

cm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  centimeters … meters are unknown
em . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  the width of an “M” in the current font
ex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  the height of an “x” in the current font
in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  inches … feet and yards are unknown

mu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . math units, there are 18 to an em …

used only in math mode

pt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  72.2666 points to an inch

sp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . scaled points … TEX’s internal measure.

There are 16384 sp to a pt

  <scale factor>\dp<box number>  the depth of box <box number> scaled
                                   by <scale factor>
  <scale factor>\ht<box number>  the height of box <box number> scaled
                                   by <scale factor>
  <scale factor>\wd<box number>  the width of box <box number> scaled
                                   by <scale factor>

The last three are dimensions, which may be scaled, of boxes and the previous two, em and ex are relative to a font. This means that a change in the font will automatically cause these values to change. Most measurements, involving spacing should be font dependent. sp, scaled points are TEX’s internal dimension measure. All TEX arithmetic involving dimensions is done with integers.

8.2.1 Dimension Allocation

TEX has 256 registers available for storing dimensions. These are named internally using integers from 0 to 255. However, both plain and INRSTÊX use some of the 256. To obtain a new one, use \newdimen\<dimen name>. TEX will assign the next free dimension register to the name \<dimen name>. For instance INRSTÊX uses this mechanism to obtain a dimension for the horizontal and vertical dimensions of the outer page, namely \houterpagesize and \vouterpagesize respectively. If you only want to use a dimension register within a single macro definition, then \dimen0 to \dimen9 are available.

8.3 Numbers or Integers

TEX supplies 256 integer registers or counters. A number of these are already used. For instance \count0, the 0 counter is used for page numbering.

To obtain a new count use \newcount\<count name>.

8.4 Glue and Skips

Glue is the basis for spacing. It consists of three components, a nominal size, a stretch and a shrink. The general form of glue is <nominal dimen>

[plus <stretch dimen>] [minus <shrink dimen>]. The <nominal dimen>

is required in all glue assignments but the stretch and shrink are optional. If they are not specified, they are set to zero. The use of stretch and shrink glue is used for creating ragged right borders on a page.

To obtain a new glue variable, use \newskip\<skip or glue name>. Specified glues are used for skips, and spacing. For instance, the skip at the end of a list in INRSTÊX is just one of many allocated for various spacings in TEX

8.5 Assignments: Giving dimensions, counts, and skips values

The general form of counter, dimension, and glue assignments are

\<count name> [=] <integer, dimen, glue>

The assignment result is always an <integer>.

\<dimen name> [=] < dimen, glue>

The assignment result is always a <dimen>.

\<skip or glue name> [=]  <dimen>
      [plus <dimen>] [minus<dimen>]

The assignment result is always a <glue>.

The quantities in the [...] are optional. Neither the square [ ] nor angle brackets < > are typed. If a dimension variable is made equal to a glue variable, the stretch and shrink parts of the glue variable are lost. If a counter or integer is made equal to a dimension, the fractional part of the dimension is lost.

8.6 Arithmetic with Dimensions, Numbers and Glue

TEX supplies three commands for doing arithmetic with dimensions and such. Addition, and subtraction are handled by \advance, multiplication by an integer by \multiply, and division by an integer by \divide

\advance \<count, dimen, glue name> by [+ -]<count, dimen, glue>

The result is of the appropriate type, <count>, <dimen> or <glue> with extra parameters set to zero.

\multiply \<count, dimen, glue name> by [+ -]<integer>

All parts of the <glue> are multiplied by the integer.

\divide \<count, dimen, glue name> by [+ -]<integer>

All parts of the <glue> are divided by the integer. There is another way to effect arithmetic. This is to note that the \wd, \ht, and \dp can take scale factors. Thus multiplication of dimensions is possible if the required dimension is acquired by a box.

Chapter 9  GLUE – REVISITED

Glue is the binder that lets TEX do its job. This chapter discusses some preset forms of glue and their uses. Along with glue parameters there are a number of special commands for inserting glue. The most interesting have different degrees of infinity, namely \hfil, \hfill, \hfilneg, \hss, and their vertical counterparts.

Because of the special spacing requirements of mathematics, TEX defines skips and spacing that are valid in mathematics mode only. Examples are the

are the special preset mu glues of \thickmuskip, \medmuskip, \thinmuskip.

The \newskip and \newmuskip commands allocate skip (or really glue) or muskip registers respectively for special uses. For example the specific glues surrounding section heads are held in glue registers.

It should be noted that the various \...muskip do not cause horizontal spacing in math mode by themselves. They are used with \mskip to actually cause the insertion of the glue.

9.1 Command List

⋄ \hfil \hfill
⋄ \hfilneg
⋄ \hss
⋄ \medmuskip

                     ⋄ \newskip
                     ⋄ \newmuskip
                     ⋄ \thickmuskip
                     ⋄ \thinmuskip

                                            ⋄ \vfil \vfill
                                            ⋄ \vfilneg
                                            ⋄ \vss

9.2 Command Forms

⋄ \hfil \hfill
⋄ \hfilneg
⋄ \hss

These are all various forms of horizontal (or math) mode commands that insert infinite quantities of glue. \hfil, \hfill, \hfilneg, and \hss insert plus

1fil, plus 1fill, minus 1fil, and plus 1fil minus 1fil. The first two

are stretch glues, the third is shrink glue and the last is both. It should be noted that when TEX tries to stretch or shrink glue values, they vary according to their value. If there exists both fil and finite value glue in a box or line, then all the stretch if it is plus glue or shrink if it is minus glue will be in the section with the fil glue. If there is fill glue and either fil or finite glue, then all the stretch or shrink will be in the fill sections. Similarly with filll glue, which is not supplied in as readily usable form. The difference in behaviour between \hfil and \hss is that \hss glue will allow the contents of a box to spill outside without resulting in an overfull box while \hfil will only fill or push contents to the edge of the box. The major use for these glues are to center or to force stuff to either edge of a box. For instance this

\line{\vrule \hfil one \hfil two \hfil three
         \hfill four \hfil five \hfil six
         \hfill seven \hfil eight \hfil nine\vrule}

gives

one two three  four five six  seven eight nine

⋄ \medmuskip
This is a preset mu glue. \medmuskip = 4mu plus 2mu minus 4mu for use with

\mskip. This is .

⋄ \newskip\<skip name>

This assigns a new skip or glue register to the name \<skip name>. Glue values

may be assigned to it by \<skip name> [=] <glue>.
⋄ \newmuskip\<muskip name>

This assigns a new muskip or muglue register to the name \<muskip name>. Glue values may be assigned to it by \<muskip name> [=] <muglue>.

⋄ \thickmuskip
  This is a preset mu glue. \thickmuskip = 5mu plus 5mu for use with \mskip.

This is .

⋄ \thinmuskip

This is a preset mu glue. \thinmuskip = 3mu for use with \mskip. This is

⋄ \vfil \vfill
⋄ \vfilneg
⋄ \vss

These are the vertical analogues to the infinite horizontal glues and act in much the same manner. See the section on \hfil ....

The Beautiful arises from the perceived harmony of an object, whether sight or sound, with inborn and

constitutive rules of judgment and imagination: and it is always intuitive.

On the Principles of General Criticism,

Samuel Taylor Coleridge (1772-1834)

Chapter 10 PARAGRAPH

CONTROL

Contrary to intuition, TEX indicates where paragraphs end rather than where they begin. This chapter discusses some of the parameters used in controlling the justification, spacing, hyphenation,and indentation in paragraphs. A paragraph can be built in either vertical or internal vertical mode, the latter is the same as being inside a vertical box. When parameters are set inside a vertical box, they are undone when leaving the box. When building a paragraph, TEX is in horizontal mode. All parameters are local to a box or group unless explicitly made \global. The parameters discussed here control interword spacing in a paragraph, with and without hyphenation, the indentation, interparagraph vertical skips, and the justification of the lines. Some advanced features can force a paragraph to be either a line shorter or longer than its best length. Some of these features are for fine tuning and will probably not be used except on the final pass of a book. Others, such as those involving paragraph indentation, justification of lines, or certain special effects will see more use.

For instance, this paragraph has had its margins pushed in by 1.5 inch on either side by the use of

                      \beginnarrowtext 1.5in

and has had each of the resulting lines centered on the page with the

                       \paragraphcenterline

command. This latter command is in fact used by INRSTÊX to center, and prevent hyphenation in titles.

A second example is illustrated in this paragraph with the \veryraggedright command. This prevents hyphenation and causes the paragraphs to have no right justification. Although it is probably not useful for ordinary text, it is used in section headings, table of contents, and figure captions, to automatically display verbose text.

Another useful command, \obeylines, is especially for such things as addresses. It changes the carriage return <cr> from a space to real line terminator. For instance the address

H.J. Common 3479 Dreary Lane Lostville

was produced by

\begingroup
\obeylines
H.J. Common
3479 Dreary Lane
Lostville
\endgroup

Note that the \obeylines is inside a group to limit its effect to just the one paragraph. This is really the only way to undo the effect of some commands and has the advantage of returning to the state before entry into the group. Note also that the address is indented. The indentation is the value of the current \parindent.

Finally there are two other parameters of general interest. These are \rightskip and \leftskip. Whenever TEX finds the end of a paragraph, it checks the current values of \rightskip and \leftskip and appends this amount of glue on the end of each line while it is making the paragraph. This paragraph was set with \rightskip = 1cm right here and \leftskip = 3cm right here. Note that it affected the entire paragraph. The entire paragraph is inside a group. In fact a \par \endgroup was put at the end to make sure that TEX knew that the paragraph ended before leaving the group.

10.1 Command List

⋆ \beginnarrowtext
• \discretionary
⋆ \endnarrowtext
• \everyparagraph
• \hangafter
• \hangindent
⋆ \hyphenatecapitals
• \indent

                     • \leftskip
                     • \looseness
                     • \noindent
                     ⋄ \obeylines
                     ⋄ \obeyspaces
                     • \par
                     ⋆ \paragraphcenterline
                     • \parindent

                                            • \parshape
                                            • \parskip
                                            • \pretolerance
                                            ⋄ \raggedright
                                            • \rightskip
                                            • \tolerance
                                            ⋄ \ttraggedright
                                            ⋆ \veryraggedright

10.2 Command Forms

⋆ \beginnarrowtext <dimen>␣

This narrows the size of the margins on both the left and right hand side by <dimen>. It starts a group and is terminated by an \endnarrowtext. The raggedness of the outer level is preserved inside the narrowtext group.

• \discretionary{<prebreak text>}{<postbreak text>}{<nobreak text>}

This command allows a discretionary break, like a word hyphenation, but will produce different text if the break occurs than when it does not. One use is for hyphenating German. If there is a break, the <prebreak text> goes on the first line and the <postbreak text> goes on the second line. If there is nobreak, the <nobreak text> is used.

⋆ \endnarrowtext

This terminates the group started by the \beginnarrowtext and reverts back to the pre narrow text format.

• \everyparagraph [=] {<token string>}

This command allows for the insertion of the <token string> at the beginning of every paragraph, just after the paragraph indentation on the first line and just before any text.

• \hangafter [+ -] <integer>

This command controls the application of indentation to the next paragraph. If the sign is positive or does not exist, the indentation applies to all lines in the paragraph after the first <integer> lines. If the sign is negative, it applies to the lines up to and including the <integer> line. This command lasts for only the present paragraph.

• \hangindent [=] [+ -] <dimen>

This command is used in conjunction with \hangafter and determines the amount and position of the indentation. If the sign is positive or does not exist the indentation will be at the left margin. If the sign is negative, the

indentation is at the right margin. Indentation means that the width of the paragraph is reduced by the value of <dimen>. This command lasts for only the present paragraph. For instance this

           paragraph was set with \hangindent = 2cm \hangafter = 3.
⋆ \hyphenatecapitals [=] <integer>

When the integer is not equal to 0, TEX will attempt to hyphenate words with uppercase letters.

• \indent

Changes to horizontal mode and causes the paragraph to be indented by the \parindent. If used in the middle of a paragraph, there will be a space inserted the size of the \parindent.

• \leftskip [=] <dimen> [plus <dimen>] [minus <dimen>]
• \rightskip [=] <dimen> [plus <dimen>] [minus <dimen>]

These commands move the edge of the column or page to the center by <dimen> to the center. The \leftskip works on the left hand edge and the \rightskip on the right hand edge. They work on the page and also inside

boxes. The optional glue specifications determine the raggedness of the placement of the paragraph line on the page. For instance this paragraph was

 set with \leftskip 0pt plus 1fil. and \rightskip 0pt plus 1fil. The

1fil glue will produce a very ragged column. The effect is to allow for any badness and to suppress all hyphenation. Note the odd spacing in the last line. It is due to the 1fil added to the last line of every paragraph.

• \looseness [=] [+ -] <integer>

This command will cause TEX to try and make the current paragraph an <integer> number of lines shorter if the sign is − and longer if it is + or does not exist than the natural best number of lines. It is the way of fine tuning the size of a paragraph.

• \noindent

This command changes to horizontal mode and prevents the next paragraph from being indented. If it used in the middle of a paragraph, it produces a space equal to the current \parindent.

⋄ \obeylines

This causes TEX to end lines at the same place as they are ended in the input text. This command changes a line into a very short paragraph so that each line is indented by the \parindent.

⋄ \obeyspaces

This makes a space active and causes TEX to obey them, except at the start of a new line. It can be used in conjunction with \obeylines to obtain a very rough positioning of text on a page. Except with the typewriter fonts, where all characters have the same width, the two together will not produce text that is positioned as it is seen on the screen editor. Precise placement of text and columns should always be done using the alignment capabilities of TEX, namely \halign and its relatives.

This paragraph has been produced with \obeylines and \obeyspaces inside a group. The group is there to keep their effect local to this paragraph only. Note that all the lines start at the left hand margin.

This was produced by

{\obeylines \obeyspaces \parskip = 0pt
This paragraph
     has     been produced  with |\obeylines|
 and |\obeyspaces| inside a group. The
group    is there to keep their effect local to this
paragraph
only. Note that all the lines
start at the left hand margin.}

• \par

This command indicates the end of the current paragraph. A completely blank line is equivalent to a \par.

⋆ \paragraphcenterline

This command takes a line in a paragraph and centers it. It also prevents

hyphenation. A forced break occurs if the command \cr is placed \cr

as shown at the end of the line. This means that if you do not like the way INRSTÊX does the line splitting, you can do it yourself … or at least command it.

• \parindent [=] <dimen>

This sets the indentation at the beginning of each paragraph to <dimen>.

• \parshape <number of lines> <indent 1> <line length 1>
       ... <indent n> <line length n>

This command is flexible way of controlling the shape of the current paragraph. The <number of lines> is the number of lines for which parameters are being given. In this case assumed to be n. The <indent i> is the indentation of line i and <line length i> is the specified length of that line. All lines from and including n will have the same indentation and length as line n. A \parshape lasts for only one paragraph. If there is a \hangindent \hangafter pair also in force for the current paragraph, the \parshape takes precedence. TEX does not get upset if the number of actual lines in the paragraph is less than n.

• \parskip [=] <dimen>

This sets the size of the vertical skip that is automatically inserted between paragraphs.

• \pretolerance [=] <integer>
• \tolerance [=] <integer>

These two parameters set the amount of badness that TEX is willing to tolerate in a line before succumbing to an overfull box. If <integer> is 10000 or more, horrendously bad lines will be allowed and there never will be any overfull boxes. TEX makes two passes through a paragraph. The first time it allows words to be hyphenated but tries to keep each line badness below the <integer> value of \pretolerance. The second time it tries the same thing, without hyphenation, but keeping the badness below the <integer> value of \tolerance. The optimal choice of these parameters depends on your aversion to hyphenation, and your acceptance of less than beautiful paragraphs without rewriting.

⋄ \raggedright

This command allows the right hand margin to have a ragged edge. It is done by judiciously choosing the glue parameters for a \rightskip. The balancing allows for hyphenation, and does not produce lines that are too short. This paragraph was set with the present parameters for \raggedright. Note that it is possible to have overfull boxes.

⋄ \ttraggedright

This is similar to \raggedright but for use when using \tt font.

⋄ \veryraggedright

This is similar to \raggedright but for use primarily in titles and captions where raggedness and no hyphenation is wanted.

It is a very sad thing that nowadays there is so little useless information.

Oscar Wilde (1854-1900)

Chapter 11  SPACING

This chapter discusses the various mechanisms in TEX for creating and controlling spaces in a document. All spacing involves the insertion of glue that may or may not have stretch or shrink. This chapter also includes a

description of \beginttverbatim...\endttverbatim that allows text to be

inserted in a typewriter font with the original spacing. It is useful for such things as computer listings.

You should never need to use \vskip or \hskip or its relatives while using INRSTÊX … except perhaps when trying to place boxes on a page. INRSTÊX has easily modified parameters for all spacing. If you don’t like the spacing before or after an \shead, check first that there is no

underfull box and then modify \prsheadskipsize and \posheadskipsize as

necessary.

11.1 Command List

⋆ \beginttverbatim
⋄ \bigskip
⋆ \endttverbatim
⋄ \enskip
• \hskip
• \kern
⋄ \medskip
• \mkern

                                 • \mskip
                                 ⋄ \quad
                                 ⋄ \qquad
                                 ⋄ \smallskip
                                 ⋆ \spacing
                                 • \vglue
                                 • \vskip

11.2 Basic Spacing Mechanisms

The basic spacing commands in TEX are \hskip, \vskip, and \mskip that are used in horizontal, vertical and mathematics mode respectively. All

of these take <glue> in the standard form of [+ -] <dimen> [plus <dimen>]
[minus <dimen>] except \mskip which must have <mudimen> or units of mu.

The stretch and shrink parameters are optional but the first <dimen> is not. In general TEX allows for line or page breaks to occur after glue in a list. If spacing is desired without the possibility of breaks or glue disposal, then the commands \kern and \mkern are used. These are the ones used for placing accents.

When TEX breaks a page or a line, the glue at the beginning of the line or page is discarded, unless it is put there via a \kern. This means that a special command is needed to force glue at the top of a page. This command is \vglue. It is like \vskip but works at the top of the page.

Special preset skips in vertical mode are \smallskip, \medskip, \bigskip and for horizontal mode \quad, \qquad, and \enspace. The latter three are font size dependent and also will work in math mode.

Finally \spacing is an INRSTÊX command that allows for a changing of the spacing between the lines of a document. For instance \spacing{1.5} will produce 1.5 line spacing. \spacing modifies the vertical skip that TEX puts between adjacent lines. However, lists, the various types of section heads, figure and table captions, and footnotes are all forced to be single spacing. All those forms that have an \every... may be modified. For example \everylist = {\spacing{1.5}} will force every list to have 1.5 spacing. If \everysublist and \everysubsublist have not been modified, sublists and subsublists will also be spacing 1.5.

11.3 Verbatim or “No Fill” Forms

INRSTÊX supplies, as an external command list, a method of producing a listing with the same spacing that exists in the original form. This is only supplied for typewriter \tt fonts as these are the only monospaced fonts available. For a monospaced font, all characters are the same width so that it is possible to ensure that spacing will be identical to that seen on a normal typewriter or terminal screen. All characters except the backslash “ \ ” are allowed. For example

This is
     an example

        where the
              first word of each
                    line starts below the
                         second one of
                                the previous line.

It was given by the following code

\beginttverbatim
This is
     an example
        where the
              first word of each
                    line starts below the
                         second one of
                                the previous line.
\endttverbatim

11.4 Command Forms

⋆ \beginttverbatim

Begins a section of “verbatim” or “no fill” mode in typewriter font. All characters except the backslash “ \ ” are allowed. This form must terminate with an \endttverbatim. At the cost of a one character offset, the \def\@{\char'134} will drop a \ in using \@.

⋄ \bigskip

Vertical skip of size .

⋆ \endttverbatim

Ends a section of “verbatim” or “no fill” mode in typewriter font. All characters except the backslash “ \ ” are allowed. This form must begin with a

\beginttverbatim.
⋄ \enskip

Horizontal skip of – one \enspace or .5em.

• \hskip [+ -] <dimen> [plus <dimen>] [minus <dimen>]

This is the basic positive and negative skip in horizontal mode.

• \kern [+ -] <dimen>

This produces an unbreakable space vertically, in vertical mode, and horizontally, in horizontal mode.

• \mkern [+ -] <decimal number>mu

This is the basic unbreakable space in math mode. It is always in mu units. Note that there are 18 mu to an em. For instance $]\mkern -1mu[$ gives ][.

• \mskip [+ -] <mudimen> [plus <mudimen>] [minus <mudimen>]

A <mudimen> is <decimal number>mu. This is the basic horizontal math mu skip with glue. It is valid only in math mode.

⋄ \medskip

This is a vertical skip of the size .

⋄ \quad \qquad

These are horizontal skips of 1em and 2em respectively. They correspond in this font to and respectively.

⋄ \smallskip

This is a vertical skip of the size .

⋆ \spacing {<decimal number>}

The spacing becomes <decimal number> times the normal spacing. The normal spacing is usually referred to as single spacing.

• \vglue [=] [+ -] <dimen> [plus <dimen>] [minus <dimen>]

This puts nondiscardable glue into a vertical list. It is usually used to put a vertical skip at the top of a page.

• \vskip [=] [+ -] <dimen> [plus <dimen>] [minus <dimen>]

This is the standard vertical skip command. If used in horizontal mode, it automatically causes a switch to vertical mode.

Chapter 12  BREAKS and NOBREAKS

TEX controls the breaking of lines and pages by the judicious insertion of penalties, both positive and negative. A negative penalty will encourage a break and a positive penalty will inhibit it. The commands in this chapter either inhibit or cause breaks. In addition, most of them have some form of vertical skip. All but \linebreak are intended to be used in vertical mode. In all cases, the use of a \...break in horizontal mode will first cause a change to (internal) vertical mode where the penalty will be applied. A penalty of ±10000 is the same as ± infinity.

12.1 Command Forms

Since the commands generally do not take parameters, the command list is being dispensed with.

⋄ \allowbreak …  no penalty for a break … \penalty 0
⋄ \break . . . . . . . . .  causes a break … \penalty 10000

⋄ \bigbreak . . . . . encourages break and vskips the maximum of the \bigskipamount and

                    the \lastskip . . . \penalty -200 . . .

skip is ⋄ \bye . . . . . . . . . . . terminates a document and vertical

fills the page

• \discretionary a discretionary break or hyphen. The

form is \discretionary{<pre  break
text>}{<post  break

text>}{<text>}. If there is a break, the <pre break text> goes on the first line

and the <post break text> goes on the

second line. If there is nobreak, the <text> is used.

⋆ \done . . . . . . . . . . terminates a document and vertical fills the page and does some tests on groups used in INRSTÊX.

⋆ \end . . . . . . . . . . . terminates a document without doing

any fill on the last page

⋄ \filbreak . . . . . encourages a break with \penalty -200 and vertical fils the page. It is useful for address lists where it is desirable not to split an individual address at a page boundary

⋄ \eject . . . . . . . . . causes a column or page break but does not vertical fill the page. Its use usually causes underfull boxes.

⋆ \ejectcolumn . . causes a column break (equivalent to a page break in single column) and vertical fills the page

⋆ \ejectpage …. causes a page break and vertical fills the page … in multicolumn this will cause a new page, not just a new column

⋄ \goodbreak ….  encourages a break … \penalty -200

⋆ \linebreak …. forces a line break in horizontal mode and fils the line forcing the words to the left side of the line

⋄ \medbreak . . . . . encourages break and vskips the maximum of the \medskipamount and

the \lastskip . . . \penalty -100 . . .

skip is

⋄ \nobreak. . . . . . . does not allow a break … \penalty

10000

⋆ \penaltybreak.  form
\penaltybreak{<penalty>}{<skip

size>} … this is a generalization of \medbreak allowing arbitrary penalties and skip sizes

⋄ \smallbreak … encourages break and vskips the

maximum of the \smallskipamount and
the \lastskip . . . \penalty -50 . . .

skip is

Yet what are all such gaieties to me

Whose thoughts are full of indices and surds?

x^{2} + 7x + 53

= \frac{11}{3}.

Four Riddles, Lewis Carroll (1832-1898)

Chapter 13 MATHEMATICS:

SYMBOLS

FONTS

TEX supplies a vast array of mathematical symbols, both in fixed and extensible forms. For the most part, the symbols mentioned are available only in mathematics mode. Other symbols that are useful in regular text mode have been listed in Section 3.4 This chapter describes the symbols available. These symbols can be used in any font size that is on the system. Although it is possible to build your own symbols from simpler ones, it takes a little care to make sure that they are the correct size for all possible uses.

13.1 Ordinary Fonts in Mathematics

The mathematics symbol font contains characters that are very similar to to text italic font. The major difference is the spacing. For instance is in ordinary italic but F or instance, is in math italic and was invoked with $For\␣instance$, where \␣ forces the space. However, it is an easy matter to put roman or bold letters in mathematics by just using $x={\bf the\ spot}$ to obtain x = the spot. The real fun comes with something like the following:

x⃗ = 2x⃗x⃗

which is given by

\def\xbf{{\vec{\bf x}}}
$$
\xbf = 2^{\xbf^\xbf}
$$

Note that the bold face is scaled correctly up into the superscripts. The extra {…} are necessary so that the third \xbf will look like a single token to the second \@.

13.2 Mathematical Symbol Types

Some symbols, even though they may look the same are given different command sequences in TEX. The reason for this is that their use demands different spacing and line breaking when in mathematics mode. For this reason there are four mathematics symbols for a vertical bar |, namely \mid, \left\vert, \right\vert, and \vert. The first is a relation – called Rel – like the =; the second and third are opening and closing brackets like ( and ) — TEX calls these openings and closings; and the last is an ordinary — called Ord — symbol like ∞. Two other types are large operators — called Op — like ∑ and binary operators — called Bin — like +. Finally there is the punctuation — called Punct — like the period.

13.3 Greek Letters

All the Greek letters are of type Ord. They are all assumed to be in mathematics mode.

\alpha {\rm A} A . . . . . . . . . . . . . . . . . .  α A A
\beta {\rm B} B. . . . . . . . . . . . . . . . . . . .  β B B

  \gamma \Gamma {\mit\Gamma}. . . . . . .  γ Γ Γ
  \delta \Delta {\mit\Delta} . . . . .  δ Δ Δ

\epsilon {\rm E} E . . . . . . . . . . . . . . . .  ϵ E E
\varepsilon . . . . . . . . . . . . . . . . . . . . . . . .  ε
\zeta {\rm Z} Z. . . . . . . . . . . . . . . . . . . .  ζ Z Z
\eta {\rm H} H . . . . . . . . . . . . . . . . . . . . .  η H H

  \theta \Theta {\mit\Theta} . . . . .  θ Θ Θ

\vartheta. . . . . . . . . . . . . . . . . . . . . . . . . . .  ϑ
\iota {\rm I} I. . . . . . . . . . . . . . . . . . . .  ι I I
\kappa {\rm K} K . . . . . . . . . . . . . . . . .  κ K K

\lambda \Lambda {\mit\Lambda} .  λ Λ Λ

\mu {\rm M} M . . . . . . . . . . . . . . . . . . . . .  μ M M
\nu {\rm N} N . . . . . . . . . . . . . . . . . . . . . .  ν N N
\xi \Xi {\mit\Xi} . . . . . . . . . . . . . . . .  ξ Ξ Ξ
o {\rm O} O . . . . . . . . . . . . . . . . . . . . . . . .  o O O
\pi \Pi {\mit\Pi} . . . . . . . . . . . . . . . . .  π Π Π
\varpi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  ϖ
\rho {\rm R} R . . . . . . . . . . . . . . . . . . . . .  ρ R R

\sigma \Sigma {\mit\Sigma}. . . . . . .  σ Σ Σ

\tau {\rm T} T . . . . . . . . . . . . . . . . . . . . .  τ T T

\upsilon \Upsilon {\mit\Upsilon}  υ Υ Υ
\phi \Phi {\mit\Phi}. . . . . . . . . . . . . .  ϕ Φ Φ

\varphi . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  φ
\chi {\rm X} X . . . . . . . . . . . . . . . . . . . . .  χ X X

\psi \Psi {\mit\Psi}. . . . . . . . . . . . . .  ψ Ψ Ψ
\omega \Omega {\mit\Omega}. . . . . . .  ω Ω Ω

13.4 Calligraphic Capitals

These look like A… Z and are obtained in math mode by the construction

{\cal <capital letter>} while in math mode.

13.5 Ords, Operators, and Relations

The following is a composite list of the symbols of type ordinary, relation and operator supplied by plain. The type is specified along with the symbol. The meaning of the type abbreviations has been given in Section 13.2.

Bin + + Bin − - Rel = =

Rel ≠ \not= \ne \neq

Rel < <

Rel ≮ \not<

Rel > >

                                 Rel ≯ \not>
                                 Ord ℵ \aleph
                                 Ord ⨿ \amalg
                                 Ord ^{}\angle
                                 Rel ≈ \approx
                                 Rel ≉ \not\approx

Bin ∗ \ast or *

Rel ≍ \asymp
Ord \ \backslash
Op ⋂ \bigcap
Bin ◯ \bigcirc
Op ⋃ \bigcup
Op ⨀ \bigodot
Op ⨁ \bigoplus
Op ⨂ \bigotimes
Op ⨆ \bigsqcup
Bin ▽ \bigtriangledown
Bin △ \bigtriangleup
Op ⨄ \biguplus
Op ⋁ \bigvee
Op ⋀ \bigwedge
Ord ⊥ \bot
Rel ▷◁ \bowtie
Bin • \bullet
Bin ∩ \cap
Bin · \cdot
Bin ∘ \circ
Ord ♣ \clubsuit
Rel ≅ \cong
Rel ≅ \not\cong
Op ∐ \coprod
Bin ∪ \cup
Bin † \dagger
Rel ⊣ \dashv
Bin ‡ \ddagger
Ord ♢ \diamondsuit
Bin ⋄ \diamond
Bin ÷ \div
Rel ≐ \doteq
Rel ⇓ \Downarrow
Rel ↓ \downarrow
Ord ℓ \ell
Ord ∅ \emptyset
Rel ≡ \equiv
Rel ≢ \not\equiv
Ord ∃ \exists
Ord ♭ \flat

                                   Ord ∀ \forall
                                   Ord ⌢ \frown
                                   Rel ≥ \ge \geq
                                   Rel ≱ \not\geq

Rel ≫ \gg

                                   Rel ≫̸ \not\gg
                                   Ord h̄ \hbar
                                   Ord ♡ \heartsuit
                                   Rel ↩ \hookleftarrow
                                   Rel ↪ \hookrightarrow

Ord ℑ \Im

                                   Ord ı \imath
                                   Ord ∞ \infty
                                   Op ∫ \int

Rel ∈ \in

                                   Rel ∉ \not\in
                                   Ord ȷ \jmath
                                   Rel ⇐ \Leftarrow
                                   Rel ← \leftarrow
                                   Rel ↽ \leftharpoondown
                                   Rel ↼ \leftharpoonup
                                   Rel ⇔ \Leftrightarrow
                                   Rel ↔ \leftrightarrow
                                   Rel ≤ \le \leq
                                   Rel ≰ \not\leq

Rel ≪ \ll

                                   Rel ≪̸ \not\ll
                                   Rel ⟸ \Longleftarrow
                                   Rel ⟵ \longleftarrow
                                   Rel ⟺ \Longleftrightarrow
                                   Rel ⟷ \longleftrightarrow
                                   Rel ⟼ \longmapsto
                                   Rel ⟹ \Longrightarrow
                                   Rel ⟶ \longrightarrow
                                   Rel ↦ \mapsto
                                   Rel | \mid
                                   Rel ⊧ \models

Bin ∓ \mp

                                   Ord ∇ \nabla
                                   Ord ♮ \natural

Rel ↗ \nearrow
Rel ↖ \nwarrow
Ord ¬ \neg \lnot
Rel ∋ \ni \owns
Bin ⊙ \odot
Op ∮ \oint
Bin ⊖ \ominus
Bin ⊕ \oplus
Bin ⊘ \oslash
Bin ⊗ \otimes
Rel ∥ \parallel
Ord ∂ \partial
Bin ⊥ \perp

Bin ± \pm

Rel ⪯ \preceq
Rel ⪯̸ \not\preceq
Rel ≺ \prec
Rel ⊀ \not\prec
Ord ′ \prime
Op ∏ \prod
Rel ∝ \propto

Ord ℜ \Re

Rel ⇒ \Rightarrow
Rel → \rightarrow
Rel ⇁ \rightharpoondown
Rel ⇀ \rightharpoonup
Rel ⇀ ↽ \rightleftharpoons
Bin \ \setminus
Ord ♯ \sharp
Rel ≃ \simeq
Rel ≄ \not\simeq
Rel ∼ \sim
Rel ≁ \not\sim
Rel ⌣ \smile
Ord ♠ \spadesuit
Bin ⊓ \sqcap
Bin ⊔ \sqcup
Rel ⊑ \sqsubseteq
Rel ⋢ \not\sqsubseteq

                                   Rel ⊒ \sqsupseteq
                                   Rel ⋣ \not\sqsupseteq
                                   Ord ⋆ \star
                                   Rel ⊆ \subseteq
                                   Rel ⊈ \not\subseteq
                                   Rel ⊂ \subset
                                   Rel ⊄ \not\subset
                                   Rel ⪰ \succeq
                                   Rel ⪰̸ \not\succeq
                                   Rel ≻ \succ
                                   Rel ⊁ \not\succ
                                   Op ∑ \sum
                                   Rel ⊇ \supseteq
                                   Rel ⊉ \not\supseteq
                                   Rel ⊃ \supset
                                   Rel ⊅ \not\supset
                                   Ord √ \surd
                                   Rel ↘ \searrow
                                   Rel ↙ \swarrow
                                   Bin × \times
                                   Bin ⊤ \top
                                   Bin ◁ \triangleleft
                                   Bin ▷ \triangleright
                                   Ord △ \triangle
                                   Bin ⊎ \uplus
                                   Rel ⇑ \Uparrow
                                   Rel ↑ \uparrow
                                   Rel ⇕ \Updownarrow
                                   Rel ↕ \updownarrow
                                   Ord ∥ \Vert or \|
                                   Ord | \vert or |
                                   Rel ⊢ \vdash
                                   Bin ∨ \lor \vee
                                   Bin ∧ \land \wedge

Ord ℘ \wp Bin ≀ \wr

13.6 Brackets or Delimiters

TEX supplies a large variety of delimiters or brackets, some of different sizes and others that grow to be the correct size. Here is a list of the delimiters supplied by plain.

\big\Arrowvert.  center part of double up arrow – ‖
\big\arrowvert.  center part of up arrow – |
\langle . . . . . . . . .  left angle bracket – ⟨
\rangle . . . . . . . . .  right angle bracket – ⟩
\big\bracevert.  center part of large braces – |
\{ or \lbrace …  left brace – {
\} or \rbrace …  right brace – }
[ or \lbrack ….  left square bracket – [
] or \rbrack ….  right square bracket – ]
\lceil . . . . . . . . . .  left ceiling – ⌈
\rceil . . . . . . . . . .  right ceiling – ⌉
\lfloor . . . . . . . . .  left floor – ⌊
\rfloor . . . . . . . . .  right floor – ⌋
\big\lgroup ….  large left paren without middle – {
\big\rgroup ….  large right paren without middle – }

\big\lmoustache  – {
\big\rmoustache  – }

/ . . . . . . . . . . . . . . . .  slash – /
\backslash . . . . .  reverse slash – \
| or \vert. . . . . . .  vertical bar – |
\| or \Vert . . . . .  double vertical bar – ∥
\downarrow . . . . .  down arrow – ↓
\Downarrow . . . . .  double down arrow – ⇓
\uparrow . . . . . . . .  up arrow – ↑
\Uparrow . . . . . . . .  double up arrow – ⇑
\updownarrow …  up-and-down arrow – ↕
\Updownarrow …  double up-and-down arrow – ⇕
( . . . . . . . . . . . . . . . .  left paren – (
) . . . . . . . . . . . . . . . .  right paren – )

Two very powerful operators exist for the delimiters, namely \left and \right. They must be used in pairs as

             $\left<delimiter> ...\right<delimiter>$,

where the <delimiter> is one of the above. The result of these operators is a pair of braces that grow the correct size for the particular formula in which they are used. This saves you from the problem of measuring. A \right. implies there is nothing at the place of the right delimiter and \left. similarly on the left. This allows a delimiter on only one side of a formula but to still have the operators match in pairs.

Finally there is a second set of four pairs of operators, \bigl, \Bigl, \biggl, \Biggl and the corresponding right hand ones \bigr, \Bigr, \biggr, and \Biggr. These produce big, but fixed size delimiters for instance we have

$$
 \bigl\{\quad
\Bigl[\quad
\biggl\lfloor\quad
\Biggl\Updownarrow\quad\Biggr\Updownarrow
\quad\biggr\rfloor
\quad\Bigr]
\quad\bigr\}
$$

produces

{ [ ⌊ ⇕ ⇕ ⌋ ] }

13.7 Common Mathematical Functions

Certain functions such as sin, cos, and limsup for example are shown in mathematics text in Roman font. In addition some like lim sometimes take limits that should be placed in the same way as the limits on the large operators (Op). For example

$$
\limsup_{t \leftrightarrow \infty}
$$

gives

lim sup_{t↔∞}

There are 32 of these already defined in plain. They are

\arg
\arccos
\arcsin
\arctan
\cot
\coth
\cosh
\cos
\csc
\det
\deg

                      \dim
                      \exp
                      \gcd
                      \hom
                      \inf
                      \ker
                      \lg
                      \liminf
                      \limsup
                      \lim
                      \ln

                                             \log
                                             \max
                                             \min
                                             \Pr
                                             \sec
                                             \sin
                                             \sinh
                                             \sup
                                             \tanh
                                             \tan

13.8 Build Your Own Symbols

There are several advanced facilities in TEX for building your own symbols. However, there is one rather simple form using \buildrel <superscript>

\over <relation>. For example \buildrel \triangle  \over = gives =^{△}.

Chapter 14 MATHEMATICS:

EQUATION

SETUP

TEX makes the typesetting of the most difficult expressions relatively easy. This chapter lists and shows examples of the special forms supplied by plain. For the finer points of mathematic equation setup, the reader is referred to the TEXbook [1]. For more advanced mathematics macro and accenting capabilities, the AMSTEX [2] package is recommended.

INRSTÊX supplies all that is in plain plus

• an autonumbering feature, using \aneq, \aneqtag, or \autoeqnum for equations,

• a \math and \displaymath for those who don’t like $,

   • a \leftequationnumbering and \rightequationnumbering that will

magically shift all the equation numbers from the side specified by the form,

• and a \mathopen command that will cause aligned equations to increase their spacing.

The two basic commands \math and \displaymath can be used to invoke either scriptstyle or displaystyle mathematics in running text. For instance

 \math{\sum_0^n} gives ∑_{0}^{n} while \displaymath{\sum_0^n} gives ∑_{0}^{n}.

In addition there is a tagging mechanism that enables the symbolic referencing of equations, both forward and backward.

14.1 Command List

⋄ \abovewithdelims
⋄ \atop
⋄ \atopwithdelims
⋆ \aneq   \aneqtag
⋆ \autoeqnum
⋄ \bordermatrix
⋄ \cases
⋄ \cdot
⋄ \cdots
⋄ \choose
⋄ \ddots
⋆ \displaymath
⋄ \eqalign
⋄ \eqalignno
⋄ \eqno
⋄ \ldots
⋆ \leftequationnumbering
⋄ \leqno
⋄ \leqalignno

                                 ⋆ \math
                                 ⋆ \mathopen
                                 ⋄ \matrix
                                 • \noalign
                                 ⋄ \openup
                                 ⋄ \over
                                 ⋄ \overbrace
                                 ⋄ \overline
                                 ⋄ \overwithdelims
                                 ⋄ \phantom
                                 ⋄ \pmatrix
                                 ⋆ \rightequationnumbering
                                 ⋄ \smash
                                 ⋆ \sphantom
                                 ⋄ \sqrt
                                 ⋄ \underbrace
                                 ⋄ \underline
                                 ⋄ \vphantom

14.2 Mathematic Equation Basics

To put some mathematics, either symbols or expressions, in running text you must surround them by a pair of single $ like $<expression>$. An example is $x^y$ gives x^{y}. Mathematics in running text will be broken at the end of line at spaces in the expression. To prevent a break but preserve a space insert the tie ~ into the expression. Thus $x~=~y+1$, giving x = y + 1 will prevent a break around the = sign. To obtain display equations use form

 $$
 <display mathematics forms>
 $$

There should be no blank lines or \par within <display mathematics>. Mysterious errors will result. To have a display expression end a sentence, the last character before the equation number should be a period.

Superscripting and subscripting can occur only in mathematics mode. The \@ is the superscript character and _is the subscript character. The braces {<super,subscript characters>} are necessary to tell TEX what material goes where. The example below shows the result of different use of braces.

2^{x}yz_{u}vw : 2_{uvw}^{xyz} : 2^{xyz_{u}vw} : 2^{xyz_{uvw}}.

is given by

$$
2^xyz_uvw : 2^{xyz}_{uvw} : 2^{xyz_uvw} : 2^{xyz_{uvw}}.
$$

Finally, in commands that produce alignments, the & is used to separate items and the \cr to end a line. Examples of their use will be found in such commands as \matrix and \eqalign. Equation numbers are put in using either the automatic numbering commands \aneq, \aneqtag, \autoeqnum, or the normal manual numbering forms \eqno for right hand numbers or \leqno for lefthand numbers.

14.3 Command Forms

This is a list of commands that are given in plain, along with some examples and the form of the parameters for their use.

⋄ \above..  \atop..  \over..  functions
     {<parm1> \atop <parm2>}
     {<parm1> \choose <parm2>}
     {<parm1> \over <parm2>}
     {<parm1> \atopwithdelims<left delim><right delim>  <parm2>}
     {<parm1> \overwithdelims<left delim><right delim> <parm2>}
     {<parm1> \abovewithdelims<left delim><right delim>
            <bar thickness>  <parm2>}

These forms are all used for putting <parm1> on top of <parm2> as might happen in a fraction. The difference between them is that \atop puts no line or bar between the <parms> while \over does, and \choose puts in no bar but does enclose the <parms> in large parens as is normally done in a binomial coefficient. The forms \...delims allow for the specifcation of delimiters around the <parms> that may be different than parens. Finally the <bar thickness> in the \abovewithdelims allows for the thickness of the line or bar between the <parms> to be a specified <dimen>. As an example

\frac{37}{45} : {n \atop α} : \binom{10}{r} : \{\frac{f(x)}{g(y)}\} : ]{α \atop β}[ : ⟨\frac{209}{h(y)}⟩

is given by

$$
{37 \over 45} : {n \atop \alpha} : {10 \choose r}
: {f(x) \overwithdelims\{\} g(y)}
: {\alpha \atopwithdelims][ \beta}
: {209 \abovewithdelims\langle\rangle 2pt h(y)}
$$

⋆ \aneq   \aneqtag{<tag>}
⋆ \autoeqnum{<tag>}

When autonumbering is on these commands will automatically number equations. \aneq and \aneqtag{<tag>} inserts a bracketed equation number in the correct place in the equation depending on whether it is an \eqalign,

\eqalignno, or \leqalignno. The \autonumeq{<tag>} inserts a number with-

out brackets. The <tag> allows for references to the equation. If autonumbering is off, the \aneq results in nothing and the two forms with <tag> insert the <tag> — without the < > of course. For example, autonumbering is on,

x ≡ y  (14.1)

is given by

$$
x \equiv y      \aneq
$$

and

f(x) ≈ Kx^{−3/2}  (14.2.a)
≈ 0  x ≫ 0  (14.2.b)

is given by

$$
\eqalignno{ f(x)&\approx K x^{-3/2}   & (\autoeqnum{eqfx}.a) \cr
                &\approx 0 \qquad x \gg 0   & (\ref{eqfx}.b) \cr}
$$

The eqfx is the equation tag. However, the tag for eqfx does not make it to the margin! A better way to do this, and one that guarantees that the tag for eqfx makes it to the margin is as follows:

{\silenttrue \autoeqnum{eqfx}}
$$
\eqalignno{ f(x)&\approx K x^{-3/2}   & (\ref{eqfx}.a) \cr
                &\approx 0 \qquad x \gg 0   & (\ref{eqfx}.b) \cr}
$$

The \silenttrue turns on a switch in \autoeqnum{<...>} that prevents it from writing out its value. In this case, the \autoeqnum{<...>} is in vertical mode so that the tag for eqfx will now make it to the margin. The command \ref{eqfx} will produce the (equation) number corresponding to eqfx. This construction allows both lines of the equation to have the same main equation number.

⋄ \bordermatrix{<top 0>&<top 1>&<top 2>&...&<top n>\cr
              <side 1>&<first row>\cr
                  ...
              <side m>&<last row>\cr}

The \bordermatrix places parens around the <rows> in the same way as \pmatrix and then places the <top i> items above and the <side i> items to the left hand side outside the parens. Thus

( \begin{matrix}R\C & Col1 & Col2 & Col3 \\ Row1 & a & b & c \\ Row2 & ∑{n \atop ℓ=1} & & α \\ Row3 & v = 0 & γ & 1000.0 \end{matrix} )

is given by

$$
\bordermatrix{ R\backslash C&  Col 1 & Col 2 & Col 3 \cr
                 Row 1      &   a    &   b   &   c   \cr
                 Row 2 &\sum_{\ell=1}^n &    & \alpha \cr
                 Row 3 & v=0         &\gamma & 1000.0\cr}
$$

⋄ \cases{<first math>&<first condition>\cr
         ...
        <last math>&<last condition>\cr}

This allows for a very simple way of stacking a set of possibilities in an equation and putting a large brace on the left hand side. The <...math> is the mathematics, and is in display math mode, and the <...condition> is the condition and is in internal horizontal mode … not math mode. Thus

G(x) = \{ \begin{matrix}|x| & for x < 0 \\ x^{2} & for x ≥ 0 \end{matrix}

is given by

$$
G(x) = \cases{\vert x\vert & for $x<0$ \cr
                    x^2    & for $x\ge 0$ \cr}
$$

⋄ \eqalign ...
  \eqalign{ <left first row> &<right first row>\cr
                      ...
            <left last row>  &<right last row>\cr}
  \eqalignno{<left first row> &<right first row>&<first eq.no>\cr
                      ...
             <left last row>  &<right last row>&<last eq.no>\cr}
  \leqalignno{<left first row>&<right first row>&<first eq.no>\cr
                      ...
              <left last row> &<right last row>&<last eq.no>\cr}

All three of these commands allow for a list of equations, or expressions to be aligned on a single point within the expression. This is usually a relation such as = or ≫ although any point is possible. The \eqalignno and \leqalignno have an extra field at the end of each row for an equation number, which will be printed on the right for the former and on the left for the latter. Note that in both cases the actual <eq.no> field appears on the right. Any of the <left ...> or <right ...> or <... eq.no.> may be omitted. A major difference between \eqalign and \eqalignno is that the latter always is as wide as the page while the former is its natural width. \openup<dimen>, immediately after the opening $$, is used to increase the spacing between the lines of an \eqalign or its relatives by <dimen>. A font relative <unit of measure> such as ex is recommended with 1ex to start. To obtain a lefthand equation number with \eqalign, or ordinary display mathematics, use \leqno. INRSTÊX supplies automatic equation numbering and ways of having a document change from left to right hand equation numbering or vice versa. See

\lefhandequationnumbering and \righthandequationnumbering. For auto-

matic equation numbering use \autoeqnum{tag}, \aneq and \aneqtag. An example of an \eqalign is

\begin{aligned}F (x) & = ∫_{−∞}^{x} H(y)dy \\ & = x^{3/2} \\ G(z) & ≪ 1 \end{aligned}  (12)

which is given by

$$
\eqalign{F(x)  &=\int_{-\infty}^x H(y)dy \cr
               &=x^{3/2} \cr
         G(z)  &\ll 1 \cr}
    \eqno (12)
$$

Notice the equation number is centered on the right hand side. An example

for \eqalignno is

F (x) = ∫_{−∞}^{x} H(y)dy
= x^{3/2}  (2.i)

and

G(z) ≪ 1  (2.ii)

is given by

$$
\openup 1ex
\eqalignno{F(x)  &=\int_{-\infty}^x H(y)dy \cr
               &=x^{3/2} &(2.i)\cr
\noalign{and}
         G(z)  &\ll 1 &(2.ii)\cr}
$$

The use of \noalign {<text>} places the and at the margin and maintains the alignment of the = and ≪. This technique will not work with \eqalign because it does not necessarily take up the full width of the page. Note again the placement of the equation numbers.

• \eqno <reference>   \leqno <reference>

\eqno and \leqno are used to put an equation <reference>, usually a number, at the right or left hand side, respectively, of an equation. It can be used with any display mathematics except \[l]eqalignno.

⋆ \leftequationnumbering   \rightequationnumbering

These commands when used with the auto equation numbering commands

\aneq, \aneqtag{<tag>} or \autoeqnum{<tag>} will result in completely left

or right hand equation numbers whether \eqalignno or \leqalignno is used. However \eqno and \leqno still result in right and left hand equation numbers respectively.^{†}

• \noalign {<text>}

This is used in mathematics to insert text that you want at the left hand

margin between lines in an \eqalignno or \leqalignno. See the \eqalignno

example.

† These defaults are subject to negotiation and change. It is quite easy to make the equation

sides independent of \eqno and \leqno.

Draft Version:  1991/9/5

⋄ \openup <dimen>

This is used in display mathematics $$\openup ... $$ to increase spacing between lines in an \eqalign, \eqalignno, or \leqalignno. The dimension should be <decimal number>ex for font size independence. It does not work

with \cases or \matrix.
• \over ... \under ...
     \overline{<math>}    \underline{<math>}
     \overbrace{<math>}   \underbrace{<math>}

These commands put lines and braces on top or under the <math> expressions. Thus

\overline{αβγ} : \underline{2_{y}^{x}} : \underbrace{\overbrace{H(x) = u + g(x, y)}}

is given by

$$
\overline{\alpha\beta\gamma} : \underline{2^x_y} :
\underbrace{\overbrace{H(x)=u+g(x,y)}}
$$

⋄ \dots ... \cdot \cdots \ldots \ddots

These produce dots of various flavours. Thus

[·] : [⋯] : […] : [...]

are given by

$$
[\cdot] : [\cdots] : [\ldots] : [\ddots]
$$

⋆ \mathopen{<dimen or glue>}

This will cause all of the horizontal alignments, such as \eqalign, \eqalignno,

\halign, \cases, \matrix, \bordermatrix, \pmatrix, and the table macros

within the group to be spread apart by <dimen or glue>. Its effect on tables with rules or lines is probably undesirable. It should be used only within a group such as that implied by $$ ... $$.

⋄ \matrix{<entry 11>&<entry 12>&...&<entry 1n>\cr
         <second row>\cr
            ...
         <last row> \cr}
  \pmatrix{<several rows>\cr}

The \matrix entry allows for the production of matrices or arrays with an arbitrary number of rows and columns. Thus

\{ \begin{matrix}a & b & c \\ ∑{n \atop ℓ=1} & & α \\ v = 0 & γ & 1000.0 \end{matrix} \}

is given by

$$
\left\{
   \matrix{       a        &   b   &  c \cr
           \sum_{\ell=1}^n &       & \alpha \cr
               v=0         &\gamma & 1000.0\cr}
\right\}
$$

Note that the braces {..} were in addition to the rows generated by \matrix.

\pmatrix is identical to \left( \matrix{<rows>\cr} \right). This just

saves the placement of the braces.

⋄ \phantom{<math>}    \vphantom{<math>}    \sphantom{<hlist>}

\phantom builds a box the same size as <math> but prints a blank. \vphantom is a box of the same height and depth as <math> but of zero width … a custom made strut. \sphantom is used when strange expansions such as messages create errors using a \vphantom. All three are used for controlling spacing.

⋄ \sqrt{<math>}

This puts a square root sign around a <math> expression. Thus $\sqrt{2}$ gives \sqrt{2}.

⋄ \smash{<math>}

This leaves the <math> expression in a box of height and depth zero. It is useful for certain kinds of superposition.

Chapter 15  BASIC BOX COMMANDS

TEX’s major preoccupation is to make boxes. This chapter discusses the basic commands that create and use boxes. Boxes can be acquired, measured, split, copied, and squashed. TEX allows almost anything that can be done on a page to be done inside a box.

15.1 Command List

• \box
⋆ \boxit
• \boxmaxdepth
• \copy
⋄ \centerline
• \dp
• \everyhbox
• \everyvbox
• \hbox
• \ht
• \hrule

                      ⋄ \leftline
                      ⋄ \line
                      ⋄ \llap
                      • \lower
                      ⋄ \newbox
                      • \raise
                      ⋄ \rightline
                      ⋄ \rlap
                      • \setbox
                      ⋆ \strut
                      • \unhbox

                                             • \unhcopy
                                             • \unvbox
                                             • \unvcopy
                                             • \vbox
                                             • \vcenter
                                             • \vrule
                                             • \vsplit
                                             • \vtop
                                             • \wd
                                             ⋆ \zerocenteredbox

15.2 Vertical and Horizontal Boxes

There are two kinds of boxes, horizontal and vertical. This differentiation is only one of use, not of quality. All boxes have a height \ht, width \wd, and depth \dp, and reference point. The reference point is at the left hand end of the baseline of the box.

⟵  wd  ⟶ ↑ ; | ; ht ; | ; ↓ ↑ ; dp ; ↓

⇐ Reference Point

⇐ Baseline

Horizontal lists of boxes are lined up along their baselines. Vertical lists of boxes are lined up along their reference points.

The major difference is that an \hbox contains a horizontal list of commands and boxes and assembles these on a horizontal line while a \vbox contains vertical list of commands and boxes and assembles them on top of each other in a vertical list.

While inside a horizontal box, TEX is said to be in internal horizontal mode. This is the mode that is wanted when there is some centering or other coercive placement of text on a line required. The inside of a vertical box is known as internal vertical mode. Almost anything that can be done on a page can also be done inside a vertical box. The width of a \vbox is determined in the following way: if the mode inside the box is never changed from vertical, the box width is the natural width of the material inside; if the mode in the box changes to either horizontal or mathematics, the width of the box is the current value of \hsize. If it has not been changed, \hsize will probably be the width of a page. The mode in the box will be changed to horizontal if there is either mathematics or ordinary text placed in the box without first being enclosed in an \hbox such as a \centerline.

One box is very special, namely box 255. This box is the page building box and only material in this box is acted upon by the page builder and breaker. When TEX is in this box, it is said to be in (non-internal) vertical mode. Although only box 255 can be worked upon by the page builder, other boxes can be split, using rules similar to the page builder by the \vsplit command. It is possible then to accumulate text in a long vertical box for future splitting when the length of the box is known. A newbox is acquired by \newbox. Text is placed in a box using the \setbox command and removed using any one of a number of \box, \copy or \unvbox commands, with various effects on the box contents. Boxes may be superimposed by forcing their height, depth, and width to be zero, making sure there is appropriate internal glue to allow the contents to spill out and prevent overfull boxes. The commands \rlap and \llap allow for horizontal superposition of \hboxes. As might be expected, the effects can be interesting.

Box registers are numbered from 0 to 255. \newbox\<box name> allocates an unused box number and assigns it the symbolic name \<box name> which now can be used wherever there is a need for a box number.

The following example does not result in an overfull box and illustrates a number of the commands in this section. The intent is to acquire a box, put a character into it, coerce its size down to a point, and then to move it around so that the result is an overlapping pattern of the character. The result is

.⨀ ⨀ ⨀

It is obtained, with accompanying explanation, by

   \newbox\testbox    %allocates a newbox called \testbox
   \setbox\testbox = \vbox{\hbox{$\bigodot$\hss}\vss}
           % sets the box \testbox to be a \vbox -- the \vss
           % and \hss prevent the overfull box
      \dp\testbox=0pt \ht\testbox=0pt \wd\testbox=0pt
           % the size of \testbox is now 0 -- the \vss and
           % \hss above leave the reference point in the upper
           % lefthand corner
   \centerline{.\copy\testbox \lower1ex\copy\testbox
         \hskip .5em \lower1ex\copy\testbox}
           % the . is for reference --- the centerline puts it
           % in the middle of the page

15.3 Command Forms

• \box{<named box>}

This command takes the <named box>, whether a \vbox or \hbox, and places it at that point in the present list. The resulting <named box> is now empty.

⋆ \boxit{<line thickness>}{<border separation>}{<box, vlist>}

\boxit takes the box, or vertical list and puts a box around it with a border separated from the <box> by <border separation> and a having a thickness

of <line thickness>. For example

Center

is given by

\centerline{\boxit{2pt}{3pt}{\hbox{Center}}}

• \boxmaxdepth [=] <dimen>

This sets the maximum box depth to <dimen>. If the natural depth of the box is greater than <dimen>, the box is raised (increasing its natural height) until the depth does equal <dimen>.

• \copy{<named box>}

This takes the <named box> and puts it in the present list. The box contents are not destroyed.

⋄ \line{<horizontal list>}
⋄ \centerline{<horizontal list>}
⋄ \leftline{<horizontal list>}
⋄ \rightline{<horizontal list>}

\line is an \hbox the same size as \hsize, the natural size of the enclosing box such as a page. \leftline, \centerline, \rightline respectively take the <horizontal list> and force it to the left, middle, and right parts of the box.

\line is identical to \hbox to \hsize{<horizontal list>}. \leftline is
\line{<horizontal list>\hss}, \centerline is \line{\hss<horizontal
list>\hss}, and \rightline is \line{\hss<horizontal list>}.

• \box dimensions ... \dp \ht \wd
• \dp<named box> [=] <dimen>
     \ht<named box> [=] <dimen>
     \wd<named box> [=] <dimen>

The commands \dp \ht \wd refer to the depth, height, and depth of the <named box>. The form above sets the <named box> to these dimensions.

• <scale factor>\dp<named box>
     <scale factor>\ht<named box>
     <scale factor>\wd<named box>

These forms are all valid <dimen> and can be used when ever a <dimen> is valid. For instance \hsize = .378\wd\testbox is a valid assignment for \hsize as long as \testbox is a valid box number. These forms are useful for some types of arithmetic.

• \everyhbox = {<token list>}
• \everyvbox = {<token list>}

This command inserts the <token list> as the first set of commands whenever an \hbox or \vbox, respectively is entered by TEX.

• \hbox <box spec>{<horizontal list>}
• \vbox <box spec>{<vertical list>}

These insert \hbox and \vbox respectively, according to the <box spec> and containing the <... list>. The <box spec> is a specification sequence for the box.

• <box spec>

The <box spec> is one of the following:

   to <dimen>  this sets a \hbox to width <dimen> or a
                 \vbox to height <dimen> ; if <dimen> is

\hsize, the box is the natural width of the surrounding box or page <nothing> . . this lets the box take on its natural

width or height

• \vbox{\hsize [=] <dimen> <text>}

This creates a \vbox with a specified horizontal dimension. This box will accept almost anything that can be put on a page including display mathematics, \centerline, and ordinary text. It is the basic mechanism for creating boxes that look like pages for future pasting up into a page.^{†}

• \hrule [height <dimen>] [width <dimen>] [depth <dimen>]
• \vrule [height <dimen>] [width <dimen>] [depth <dimen>]

These commands create lines of the specified height, width, and depth. Any or all of the parameters may be omitted. The \vrule is used in horizontal mode and the \hrule is used in vertical mode. If there is no dimension given the rule is the natural size of the enclosing box. For instance, on a page the enclosing box is the page itself. Thus

\par \hrule

gives a line across the entire page. Rules are used to make the lines in the \boxit macro earlier in this section.

⋄ \llap{<text>}
⋄ \rlap{<text>}

These commands allow <text> to be superimposed on the text around it. The \rlap creates a box of width 0pt and forces the <text> out to the right. \llap does the same thing but to the left. Thus \rlap{A}$\odot$ and A\llap{$\odot$} give the same result namely A ⊙, and A ⊙ respectively. This is a way to put text into either margin.

• \lower<dimen><box>
• \raise<dimen><box>

These commands work only in (internal) horizontal mode. They lower or raise the <box> by the <dimen>. An example of their use was illustrated in the previous section.

† This replaces the \hbox par <dimen>{<...>} in TEX78.

Draft Version:  1991/9/5

• \setbox<named box> [=] <box>{<list>}

This is the basic command for putting contents in a <named box>. The <box> is any valid \hbox or \vbox including a <box spec> if desired. The <list> is either vertical or horizontal depending upon the box type.

⋆ \strut

\strut is a \vrule of zero width, with height and depth for normal baseline spacing in the current font point size family. It is useful in \vbox{\hsize

<dimen> \strut <text> \strut}. The two \struts will ensure correct spac-

ing when boxes of this sort are stacked upon each other.

• \unhbox{<named hbox>}
• \unhcopy{<named hbox>}
• \unvbox{<named vbox>}
• \unvcopy{<named vbox>}

These commands take the contents of the <named box>, remove the outer box, unset the internal glue, and put it in the list at this point. The ..box forms destroy the contents of the box and leave it void, while the ..copy forms do not.

• \vcenter{<vertical list>}

This command works in math or display math mode only. It creates a vbox out of the <vertical list> and sets the reference baseline in the center of the resultant box. It is used for centering expressions in display mathematics.

• \vsplit<named box> to <dimen>

A new vbox with height <dimen> and maximum depth \splitmaxdepth is created from the contents of <named box>. Any remains are left in the <named box>. This is useful for some simple multicolumn forms.

• \vtop <box spec>{<vertical list>}

This command creates a vbox with the baseline reference of that box being the baseline of the first box in the <vertical list>. This is useful in the following way. This quotation The plans of the diligent lead surely to abundance, but every one that is hasty comes only to want.

This quotation comes from Proverbs 21, Verse 5. It suggests care.

is given by

\centerline{\veryraggedright
  \vtop{\hsize 1.8in The plans of the diligent lead
                   surely to abundance, but every
                   one that is hasty comes only to
                   want.}
  \hss
  \vtop{\hsize 1.8in This quotation comes from {\it Proverbs
                   21, Verse 5}. It suggests care.}
       }

Note that these are lined up on the first rows.

⋆ \zerocenteredbox {<text>}

This creates an hbox of zero height and depth with the width of the <text>. Thus a \zerocenteredbox{\bf point} gives point with the placement as shown. The reference point of the box is at the center of the text which effectively lowers it to the baseline. This command is intended for use in making tables. See Chapter 16 for more details.

Chapter 16  BASIC ALIGNMENT

Since letters in most fonts are variable width, the only sure way to ensure that words, numbers or vertical rules line up is to tell TEX to put them in the right place. Old ways of placing text on the editor’s screen will not work. The basic way of doing this in TEX is through the alignment commands.

The most common use of alignment commands is to make tables, but the uses go well beyond this. For instance, the \eqalign for display mathematics is built using the basic \halign command.

Plain TEX provides two basic alignment formats. The first is the tabbing form that is very similar to tabs on a typewriter, and the second is the more basic \halign form. In fact the tabbing form is built from the basic \halign.

INRSTÊX supplies a set of commands for building tables, especially those involving lines (commonly called vertical and horizontal rules). The intent of these commands is to produce tables that are easy to specify and that look, on the editing screen, somewhat like the final product. The commands are built from the \halign and preserve all the power of this basic command. They commands are discussed in Section 16.4.

Details on the basic uses of the \halign can be found in the chapter on alignment in the TEXbook and examples of INRSTÊX tables and uses in the TEX Example Book … to be published.

16.1 Command List

The command list in this section is organized into tabbing, \halign, and INRSTÊX table commands. The \halign commands are useful in the table form.

Tabbing Commands

⋄ \+ ... \cr
⋄ \cleartabs

                                 ⋄ \settabs <integer> \columns
                                 ⋄ \tabalign ...\cr

Plain TEX halign Commands

• &
• #
• \cr
• \halign
⋄ \hidewidth
⋄ \ialign
⋄ \multispan
• \noalign

                                 ⋄ \oalign
                                 • \omit
                                 ⋄ \openup
                                 • \span
                                 ⋆ \strut
                                 • \tabskip
                                 • \valign

INRSTÊX Table Commands

⋆ |

⋆ "
⋆ \|
⋆ ~
⋆ \:
⋆ \-
⋆ \br  \er
⋆ \begintable
⋆ \begintableformat
⋆ \endtable
⋆ \endtableformat
⋆ \center
⋆ \displaymath
⋆ \everytable
⋆ \fulltablerule

                                 ⋆ \left
                                 ⋆ \math
                                 ⋆ \midtabglue
                                 ⋆ \modifystrut \mst
                                 ⋆ \right
                                 ⋆ \sa
                                 ⋆ \sprule
                                 ⋆ \tablespread
                                 ⋆ \tcs
                                 ⋆ \thrule
                                 ⋆ \tr
                                 ⋆ \tvrule
                                 ⋆ \use
                                 ⋆ \zerocenteredbox \zb

16.2 Tabs for Alignment

TEX supplies a format that behaves similarly, but not identically, to tabs on an ordinary typewriter. The \settabs <integer> \columns sets tabs so that there are <integer> number of columns across the page. Once set, these tabs stay set until changed or leaving the group in which they were defined. TEX uses the command \+ to indicate the beginning of a row, the & to indicate the next column, and the \cr to indicate the end of the row. If the text for one column is too wide for that column it will spill over into the next. If it spills, and there is text in the next column, they will superimpose. An example is given below.

\settabs 3 \columns
\+This is text in the first Column &THIS IS TEXT IN THE
  SECOND COLUMN & This is text in the third column \cr
\+First Column &&Third Column\cr

which gives This is text in the first Column THIS IS TEXT IN THE SECOND COLUMN

This is text in the third column

First Column  Third Column

Note the mess in the first row. The second is better formed. For some simple tables, without rules or lines. This may be the simplest way.

If a line starts with the form

\settabs\+<sample first column>& ... &<sample last column>\cr
\+<first real text row>\cr
   ...

then TEX will set the tabs as indicated by the sample row, and will not actually print it in the text. To use this, look ahead in the table and find the widest fields. These, and some extra space, can be used to set the tabs.

The tabbing format is even more versatile than this. Suppose that there are 2 tabs set. If the input row \+ ... \cr has a third or more &, then this new tab is added to the set of tabs. Furthermore, the command \cleartabs will remove all tabs to the right of the current one, in effect making it the last one in a row. The result is that it is possible to set tabs that change from row to row. For example

\+\cleartabs
This text &is to the &left and \cr
\+        &this row lines up with the ``is'' \cr
\+        &          &but this one with the ``left'' \cr
\+        &\cleartabs This &row sets new tabs \cr
\+        & &so this lines up with ``row''\cr

gives the following

This text is to the left and

this row lines up with the “is”

but this one with the “left”

This row sets new tabs

so this lines up with “row”

Note the tab location change in the fourth row. Indentation of computer programs is relatively simple with these mechanisms.

16.3 The \halign

The fundamental alignment command, which is in fact used to build the tabbing commands in the previous section and the INRSTÊX table commands in the next, is the \halign . While inside an \halign, TEX is in internal horizontal mode. This means that text may be centered or justified by the appropriate use of the infinite glues such as \hss. It also means that $...$, \math, or \displaymath are required to switch, perhaps back, into math mode.

A <preamble>\cr, terminated by the first \cr, describes the pattern of the alignment. This pattern is used for every row of the alignment but there are a set of commands \span, \multispan, and \omit that allow for the skipping or merging of several adjacent columns. This makes it easy to have text that spans several columns. Finally, between each column, there is the provision for placing \tabskip glue. This glue allows the entire set of columns to stretch or shrink to fill the page as desired. Some special variants of \halign such as \ialign, force the \tabskip glue to be zero.

Detailed use of the \halign and its associated commands will be found in the TEXbook with examples in the TEX Example Book. The command descriptions in Section 16.5 give some insight into their use.

16.4 INRSTÊX Table Commands

INRSTÊX supplies a set of commands designed to reduce the pain in making tables. The major intent of the commands is to make have the tables being designed appear on the editor screen in a reasonable manner. Although the commands appear to avoid the basic \halign commands and forms of \cr, &, and #, their insertion in the tables are not precluded by the structure. The loss by doing this will be some readability but the gain is flexibility.

The INRSTÊX table commands really use two different types of columns: rule columns for insertion (or omission) of vertical rules and data columns for the insertion of normal data entries. Generally it is assumed that every data column is separated by a rule column. In addition, INRSTÊX requires that there be a rule column at the left and right hand sides. INRSTÊX makes the insertion or omission of a vertical rule or column as simple as placing a " or a | in the text.

A now classic table for demonstrating the table making skills of a set of macros is shown below. This is reported in the TEXbook and originally was found in [1]. The resulting table is not identical to that in the TEXbook. It is, however, very close.

AT&T Common Stock

Year  Price Dividend
1971  41–54  $2.60
2  41–54  2.70
3  46–55  2.87
4  40–53  3.24
5  45–52  3.40
6  51–59  .95*

* (first quarter only)

This table is given by the following:

\centerline{
\begintable
\begintableformat
\center " \center " \center
\endtableformat
\br{} \sa{Dividend} "\sa{Dividend} "\sa{Dividend}  \er{} %sample line
\-
\br{\:|} \use{3}    AT\&T Common Stock         \er{|}
\-
\br{\:|}     Year |   Price |  Dividend       \er{|}
\-
\br{\:|}     1971 | 41--54  |    \$2.60        \er{|}
\-
\br{\:|}     ~~~2 | 41--54  |     ~2.70        \er{|}
\-
\br{\:|}     ~~~3 | 46--55  |     ~2.87        \er{|}
\-
\br{\:|}     ~~~4 | 40--53  |     ~3.24        \er{|}
\-
\br{\:|}     ~~~5 | 45--52  |     ~3.40        \er{|}
\-
\br{\:|}     ~~~6 | 51--59  |     ~~.95\rlap*  \er{|}
\-
\br{\:}\use{3} \left{* (first quarter only)}
\endtable
}

The basic structure of the table is given by this example. A \begintable... \endtable pair delineates it, while the row format is defined inside the pair

\begintableformat... \endtableformat. The entirely optional sample row,

immediately after the \endtableformat forces all three columns the same width. This use the fact that Dividends was the largest word which was then put in a sample command \sa{..} in each of the three columns. This row, which is invisible in the final table effectively set the width of the columns. The ~ is a space that is exactly the width of a number. Thus the data is lined up in the desired way. The | are separators that insert vertical rules or lines and also allow spaces to be ignored after the data in a column. This makes the columns look nicer and more readable. Other details about this table will be apparent later.

The INRSTÊX table commands have been designed to be most useful when the following conventions are obeyed:

A rule column is defined in the table format using a ". Successive data columns are separated by a rule column. The actual rule is inserted in the text with a | or omitted with a " rather than being put in the format.

A rule column is appended to each end of the table format statement. In general this means that there is a rule column on both sides of the table. The actual insertion or not of the rule is very easy.

Struts for maintaining row height are inserted in each row rather than in the table format.

The commands make it very easy to include struts, and insert or omit rules as needed. In fact it is no more difficult than inserting a & in the appropriate place. The advantage of following this discipline is that partial horizontal lines (rules) are quite easy, as is the exact vertical placement of items in different data columns.

The basic format for building a table is

\begintable
<special table forms>
\begintableformat
<table format>
\endtableformat
<first row>
    ...
<last row>
\endtable

Each row has the form

\br{<..>}  <item> | <item> " <item> ... | <item> \er{<..>}

where the | means to put in a vertical rule and the " means to leave it out of the corresponding rule column. The \br{..} and \er{..} signify the beginning and end of the row respectively. The \br{..} and \er{..} are intended for rules and/or struts if needed. For instance a \br{\:|} indicates that this line has a standard strut \: and a standard vrule. The \br{\: height 2pt} indicates that this row has no strut but that the initial vrule has a height of 2pt. The strut could just as easily been put in the \er{\:} instead. The form \br{} or \br{"} indicates a row with no initial strut or vrule.

INRSTÊX supplies a second flavour of vrule that is user definable. The command \| may be used in exactly the same way as |. The insides of the \| are defined by redefining a command \sprule, a special rule.

An INRSTÊX table format is a template for the table, and corresponds to the normal preamble in an \halign. In fact any valid \halign preamble may be used in the table format, as long as the # are replaced by ##. However, INRSTÊX adds a rule column to the beginning and end of the format list for beginning and terminating rules. Thus a repeating field specification, which is indicated by an (extra) & in the format should not start at a vrule indicator or the result will be two adjacent rules.

Simple column formats are indicated by the use of the commands \left,

\center, \right, \math, and \displaymath. The two \..math forms are

never used alone but rather in conjunction with the first three. These forms are always separated^{†} by ", which allows for, but does not put in, a vertical rule. The simplest table format, and probably the most useful is

\begintableformat
&\center
\endtableformat

This is a repeating format, as indicated by the &, and thus allows for any number of columns. The data in each column is centered.

Another simple table format example is

\begintableformat
\left " \right " \math\center
\endtableformat

This table would have three data columns; the first data column is ordinary text, left justified; the second data column is right justified text; and the last data column is centered mathematics. Each data column is separated by a rule column indicated by ". INRSTÊX will add rule columns to the left and right hand ends of the specification. The commands \right, \left, and \center insert the appropriate glues and spacing at the both sides of the column. The width of this spacing \tcs, the table column separation, is a dimen. This may be modified if desired for all tables by putting it in the \everytable token list or for a specific table by placing it in the <special table forms>.

† In fact any field of the form &<optional stuff>##<optional stuff>& is acceptable.

Draft Version:  1991/9/5

The following is a repeating column specification:

\begintableformat
\left " \right " &\math\center
\endtableformat

This is identical to the previous one except that the data column format and the implicit rule column added by INRSTÊX, \math\center ", is repeated indefinitely. For almost all tables, the only & that should appear in the table format is that indicating the start of a repeating field.

Horizontal rules are specified by \- for the standard \tr width rule. An hrule the full width of the table should appear all by itself on a line between an \er and the following \br, or immediately after the table format. Other \noalign commands may be inserted as desired. A partial horizontal rule is specified using an \msp, the special INRSTÊX version of the multispan, and the \-.

INRSTÊX does place some restrictions on the automatic insertion of tabskip glue. Hopefully these will be minor. INRSTÊX sets the initial and final tabskip glues to 0pt. This should create no problems. A parameter \midtabglue may be modified. This is set just after the first rule column and is turned off at the last rule column. Finally \tablespread = {to <dimen>} will force the table to be <dimen> wide, assuming there is enough tabskip glue available.

The following set of commands produce the rather contrived table on the following page.

\centerline{
\begintable
\begintableformat
 &\center
\endtableformat
\-
\br{\:|} \use{6}             XYZABC     \er{|\mst{\:}{3pt}{3pt}\rlap{ \it ** i}}
\-
\br{\:|} \use{3}   XYZ          | \use{3}    ABC    \er{|\mst{\:}{2pt}{2pt}}
\-
\br{\:|}      X   |  Y    |   Z |   A  |   B  |  C  \er{|}
\-
\br{\:|} 372.466  | 493.7 "  45 | 124 \|  489 | 280 \er{|}

\-
\br{\:|} 372.40~  | 493.7 |  45 | 124  |  489 | 280 \er{|}
\br{|}            "       "     | \use{3}\-         \er{|}
\br{\:|} 372.~~~  | 493.7 |  45 | 124  |  489 | 280 \er{|\rlap{ \it ** ii}}
\-
\br{\:|} \use{2}          | 832 | abc  |  774 |$\int$\er{|\mst{$\int$}{0pt}{3pt}}
\br{|} \use{2}\zb{XY/A}   |\use{4}\-                \er{|}
\br{\:|} \use{2}          | qrr | aaa  |  799 |     \er{|\rlap{ \it ** iii}}
\-
\endtable}

The actual table is

XYZABC  ** i
XYZ  ABC
X  Y  Z A B C
372.466 493.7 45 124 489 280
372.40 493.7 45 124 489 280
372.  493.7 45 124 489 280 ** ii
832 abc 774 ∫

XY/A

qrr aaa 799  ** iii

This example illustrates the power and flexibility of the commands. Row i shows the modification of the standard strut, which is 2.5ex high and .9ex deep, by changing the height and depth. The \mst is used again in row iii where some extra space is added at the bottom of the integral sign, but not at the top. The \mst takes three arguments or parameters. The first is the character from which the strut is derived, the second is the additional space on the top of the character and the third is on the bottom. The first two rows of this table had additional space at both the top and bottom while the “integral” row had changes only at the bottom. This fine tuning of tables can improve their visual form immensely. Row iii demonstrates the use of a \zb or “zero-centered box” for putting items in the center of larger boxes. This row with the \zb has no struts. In addition, the \zb boxes are centered and have zero height and depth. This means that they take up no vertical space so that a partial horizontal line or rule may be inserted. This is done with the \use{4}\- which tells INRSTÊX to use 4 (data) columns for the horizontal rule.

Many variations exist. The commands available in INRSTÊX for tables are described in the following section.

16.5 Command Forms

The command forms in this section are organized under three different headings, tabbing, basic \halign, and INRSTÊX table commands.

Tabbing Commands

⋄ \+<text>&<text> ... &<text>\cr

This is the command for entering a line of text in the tab format. The <text> in each column is optional and will spill over into the next column if there is no room. If there are n tabs set, all & beyond the n will set tabs at the location they appear in the text. The \cr terminates the line. See Section 16.2 for examples.

⋄ \cleartabs

This command clears tabs to the right of the current one, on all subsequent lines. See Section 16.2 for examples.

⋄ \tabalign ... \cr

This is a non \outer form of \+ and can be used in definitions.

Basic \halign Command Forms

⋄ \halign{<preamble>\cr <first row>\cr ... <last row>\cr}

This is the basic alignment command. It is necessary to be in (internal) vertical or display math mode to use it. The <preamble> describes a template or form for interpreting the text fields in following rows. Each field in an \halign is like an individual \hbox whose size is calculated by TEX. Between each of these field boxes is \tabskip glue that is allowed to stretch or shrink in order to vary the overall size of the alignment. An example of a preamble that creates three columns, the first left justified, the second centered and the third right justified is

<preamble> --> #\hss &\hss #\hss&\hss #

The # shows where the text in that particular column should be placed, with respect to the glue, and the & indicates the end of the field.

$$
\halign{#\hss &\hss #\hss&\hss #\cr
 This particular & example & will give the text \cr
 shown           &below in its& \TeX\ form.\cr
 It              &could &have had mathematics, $x^y$ too.\cr}
$$

will in fact produce, as promised,

This particular example  will give the text
shown below in its TEX form.
It  could have had mathematics, x^{y} too.

The $$...$$ is a convenient way of centering the \halign. If the preamble has an extra & in its definition, then TEX pretends that the pattern between the extra & and the \cr is repeated an infinite number of times. This means that it is quite easy to define a single \halign that can be used even when the number of columns is unknown. If the <preamble> above were replaced by &<preamble>, then the entire sequence of left, center, right justified columns would be repeated.

⋄ \hidewidth

This command is used to allow an entry in an alignment field to stick out the side of the field. If it is used on both sides, of an entry, the width of the column is unaffected by that field. This is used when column widths should be determined by the data entries and not the titles. It is probably not to useful in a pure INRSTÊX table format.

⋄ \ialign{<preamble>\cr <first row>\cr ... <last row>\cr}

This is identical to an \halign except that the \tabskip glue has been preset to be zero.

⋄ \multispan {<integer>}

This effectively combines the <integer> number of columns into one column and leaves the simple # template or pattern. Note that any implicit spacing at the edges of the column is lost.

• \noalign {<text>}

This will place the <text> between this and the following row of an alignment. It must be the first token after the \cr. It has many uses including placing horizontal separator lines in tables.

⋄ \oalign{<first row>\cr ... &<last row>\cr} This creates a vertical list

of the elements in each of the rows. There is only one element allowed in each row. For instance

$$
\oalign{this\cr is\cr a\cr vertical\cr list\cr}
$$

gives this is a vertical list

Note that there are no struts in the rows.

• \omit

If \omit is the first token after the &, or the replacing \span, then the template pattern for that field is replaced with the simple #. Any tabskip glue is left intact.

• \span

This command in the text fields of an \halign can be used to replace the &. When this is done, the template or formats of the adjacent columns are butted against each other and results in both data fields placed in a box of the combined size of both columns, including any tabskip glue. This command in the preamble field of an \halign will cause the following command to be expanded. INRSTÊX uses this to transfer the information in format field to the actual \halign of the table.

• \valign{<preamble>\cr <first column>\cr ... <last column>\cr}

This is the vertical equivalent of the \halign.

INRSTÊX Table Command Forms

⋆ |

This command will put a vertical rule of width \tr at the point indicated. It should be used only in the text rows and not in the format. The " should be used to represent a rule column in the format. This command removes spaces to its left or, equivalently to the right of the item in the previous data column.

⋆ "

In text rows this is used to leave the vertical rule out of a rule column. In the format it is used to indicate the existence of a rule column. As a matter of style, INRSTÊX data columns should always be separated by a rule column. If there is no rule, this is indicated in the text rows by using " instead of |. This command removes spaces to its left or, equivalently to the right of the item in the previous data column.

⋆ \|

This command is used in text rows to insert a rule that has been defined by the command name \sprule. The default for this rule is a thick vertical rule.

⋆ ~

This is used to force a space exactly the width of the numerals “0”. Since all numerals are the same width, this enables the lining up of numeric data. If it is used in text mode in a table, it will still tie but the space will be slightly larger than outside tables.

⋆ \:

This command puts a strut of height 2.5ex and depth .9ex. A strut is an invisible vrule of width 0pt. Thus the definition of \: is \vrule height 2.5ex depth .9ex width 0pt. A \: may be modified in place by putting a new height, depth or width immediately after it. This command removes spaces to its left or, equivalently to the right of the item in the previous data column.

⋆ \-

This command draws a horizontal line across the table. If it is used between rows it draws a line the entire width of the table. If it used in a data column, it draws a line the width of the column. It is commonly used in conjunction with \use. The commands \use{3}\- will draw a horizontal line across 3 columns.

⋆ \br{<rules..>}   \er{<rules..>}

These two commands are used at the beginning and end of row respectively. Since INRSTÊX places a rule column at the beginning and end of each table the <rules..> are put into those columns. This information includes struts for spacing, such as \: or |for the entry of a vertical rule. \er removes spaces to its left or, equivalently to the right of the item in the previous data column.

⋆ \begintable ... \endtable

This is the command that is used to begin a table. It starts a group and must have a corresponding \endtable. There is a corresponding \everytable token list.

⋆ \begintableformat ... \endtableformat

This command starts the format definition of the table. It must have an associated \endtableformat. INRSTÊX searches for this \endtableformat before actually processing the format information. Disaster ensues if it is not there. INRSTÊX adds a rule column to the beginning and the end of all formats. A valid format is given below

\begintableformat
\center " &\right " \hss A.B ## \hss " \center &X##X& \math\left
\endtableformat

Note that the ## must always appear as a pair rather than as single # in the ordinary \halign preamble. The " indicates a rule column. The & before the \right indicates that the format from this point to the end, including the additional rule column inserted by INRSTÊX will be infinitely repeated. The &X##X& indicates a column with an X on either side of the data position. If an " were put in this position in the row, a column of XX would result. The simplest format, and perhaps the most useful is

\begintableformat
&\center
\endtableformat

which results in a potentially infinite number of centered data columns separated by rule columns. If any individual data item needs a different format, the use of a \left{data} or similar form may be used.

⋆ \center  \center{<argument>}

The first form of \center is used in a table format statement to create a centered data column. The second form is used in the data position of a data column to override the column format given in the format statement. Thus if the column format were \center, an entry of \left{<text>} would put the <text> at the left of the column. If the format entry were \math\left then a data column entry of \center{<text>} would center the <text> in the column but would still be in mathematics mode. An entry of \omit\center{<text>} would center the data, remove the mathematics mode, and remove the spacing at both sides of the data entry. This latter aspect would not show up with

\center but would with \left or \right.
⋆ \displaymath{<argument>}

In the table format, this command must be used with one of \center, \right, or \left, or any other valid data column specification. For example, a data column where the input data needs to be in display mathematics format and then right justified is given by \displaymath\right. In the text rows, this command will take the <argument> and put it in display mathematics format. It will not affect the table format specification of \right,

\left or \center.
⋆ \everytable

This is a token list of commands that should be executed for every table. For instance

\everytable ={\ninepoint}

will make very table with \ninepoint fonts.

⋆ \fulltablerule{<dimen>}

This draws a horizontal line across the width of the entire table of thickness <dimen>. \tr is used in vertical rules for widths and should be used here. For instance \fulltablerule{2.5\tr} will draw a horizontal line 2.5 times the thickness of the vertical rule given by |which has the width \tr.

⋆ \left

This command behaves identically to \center but left justifies the data entry. See \center for more details.

⋆ \math{<argument>}

This command is similar to \displaymath except that it sets up a normal text mathematics mode. Thus \math{\alpha} is equivalent to $\alpha$. In a table format, it is used in conjunction with the \center, \right, and \left. Thus \math\center produces a data column in text mathematics mode.

⋆ \midtabglue [=] <glue>

Changing the <glue> value of this parameter will insert tabskip glue into the internal columns in the table. The first and last column tabskip glues are set to 0pt plus 1fill. This is really only useful in conjunction with \tablespread when it is required that a table stretch to a bigger size.

⋆ \modifystrut{<original>}{<add to height>}{<add to depth>}
\mst = \modifystrut

\modifystrut and its abbreviation \mst will create and insert a strut that is <add to height> higher and <add to depth> lower. These latter are dimensions and may be negative. The <original> may be a strut or a complete expression. <original> could even be a duplication of the row, as long as the row contained no explicit & characters and excluding the \br and \er. However, the arguments of the \br and \er could be included.

⋆ \right

This command behaves identically to \center but right justifies the data entry. See \center for more details.

⋆ \sa{<text>}

This command creates an empty box of zero height and depth with the width of the natural width of <text>. It is, in effect, a horizontal strut and is used to create columns that have the minimum width as others in the table, without measuring. It was used to make a sample line in the AT&T table in Section 16.4.

⋆ \sprule

This is the name of the command that is inserted in a rule column by the command \|. It is usually a rule but in fact is unrestricted. It is initially definded as a vrule of width 2.5\tr.

⋆ \tablespread = {<halign specification>}

This is a token list that can include any specification that is valid for an \halign, or equivalently a box. See Chapter 15 for details. A simple example is when a table is supposed to be exactly 8cm — assuming that its natural width is less. Then a \tablespread = {to 8cm}, added just after the \begintable, along with the default tabskip glue, will produce it. An example is the AT&T table at the beginning of the section.

AT&T Common Stock

Year  Price  Dividend
1971  41–54  $2.60
2  41–54  2.70
3  46–55  2.87
4  40–53  3.24
5  45–52  3.40
6  51–59  .95*

* (first quarter only)

⋆ \tcs

This dimension is the spacing inserted to the left and right of every data column by INRSTÊX through the use of the \left, \center and \right commands. It may be modified by \tcs = <new dimen>.

⋆ \thrule{<height>}

This command is used to insert a horizontal rule of thickness <height> across an entire data column. The command \use{3}\thrule{2.5\tr} will insert a horizontal line across three data columns, and omit the intervening vertical rules, if any.

⋆ \tr

This dimension is the basic table line dimension, being the width of vertical lines and the height of horizontal lines (rules). It defaults to the natural width and height of TEX vrules and hrules, namely .4pt. It may be modified by \tr

= <new dimen>.

⋆ \tvrule{<width>}

This is a vertical line or rule with width <width>. The default value of <width>, which is a dimen, is \tr.

⋆ \use{<number of data columns>}

This command effectively merges the next <number of data columns> into one and uses the format or template of the last one. Thus if the last template is \center, then \use{4} Table will put Table in the center of these four columns. If the last column had a \left format but it was still desired to center Table then \use{4} \center{Table} will do the job. This is INRSTÊX’s version of \multispan especially tailored to the idea of rule and data columns.

⋆ \zerocenteredbox{<text>}
 \zb = \zerocenteredbox

\zerocenteredbox and its abbreviation \zb will take the <text> and put it in a box, centered, and of zero height and depth. It automatically checks modes so that it will work correctly even with display math templates. It is used to place rows of data so that they are visually between data entries in other columns. For instance, the following table had its last two rows done this way.

SERVICE

CANONICAL Fully Dynamic Complete Switched Switched
NETWORK Connected Allocation Broadcast Complete Broadcast

Broadcast

Fully v v v (N − 1)v (N − 1)v

Connected Simplex Tree

v/(N − 1) v v/(N − 1) v v

Collection

and is given by

\centerline{
\begintable
\begintableformat
 \left"&\center
\endtableformat
\fulltablerule{2.5\tr}
\br{\:\|}        \| \use{5}                SERVICE                      \er{\|}
\br{\|}          \| \use{5}\-                                           \er{\|}
\br{\:\|}CANONICAL\| Fully  | Dynamic  | Complete | Switched | Switched \er{\|}

Command Forms 105

\br{\:\|}NETWORK \|Connected|Allocation|Broadcast | Complete |Broadcast \er{\|}
\br{\:\|}        \|         |          |          | Broadcast|          \er{\|}
\fulltablerule{3\tr}%---------------------------------------------------------
\br{\:\|} Fully  \|         |          |          |          |          \er{\|}
\br{\|}          \|\zb{$v$} |\zb{$v$}|\zb{$v$}|\zb{$(N-1)v$}|\zb{$(N-1)v$}\er{\|}
\br{\:\|}Connected\|        |          |          |          |          \er{\|}
\- %--------------------------------------------------------------------------
\br{\:\|}Simplex Tree\|     |          |          |          |          \er{\|}
\br{\|}       \|\zb{$v/(N-1)$}|\zb{$v$}|\zb{$v/(N-1)$}|\zb{$v$}|\zb{$v$}\er{\|}
\br{\:\|}Collection\|       |          |          |          |          \er{\|}
\fulltablerule{2.5\tr} %------------------------------------------------------
\endtable
}

If names are not

correct, language will not be in accordance with the truth

of things.

Confucius

Chapter 17

SIMPLE

DEFINITIONS

or MACROS

TEX makes it easy to invent definitions to make your typing job easier. This chapter describes the simplest form of definitions. More complex definitions and some of the subtleties are found in the TEXbook.

This chapter also introduces the idea that definitions can be modified by such primitive commands as \outer, \long, and \global.

Simple definitions consist of those that have zero or more arguments and that do not use advanced commands such as \futurelet, \aftergroup, \edef,

\catcode, \bgroup, \egroup, \afterassignment. These commands and their

use may be found in the TEXbook and the definition package that actually is used to develop plain or INRSTÊX.

If you wish to write complex definitions, please see the warning at the end of this chapter.

17.1 Command List

{• \def \atop ⋄ \gdef}               • \global ; • \let   • \long ; • \outer

17.2 Command Forms

• \def\<def name> <parameter form>{<replacement text>}

This is the basic command for creating new definitions or, as they are sometimes called, macros. The <def name> is the name given to the definition and must consist of letters, upper or lower case only. The <parameter form> is the form for which TEX is looking after it sees the \<def name> in the text. Parameters

in the <parameter form> are indicated by #<integer> where <integer> is

from 1 to 9, in order. TEX then puts the parameter values that it found into the <replacement text> and then puts that text in the place of \<def name> and all of the parameters that it has eaten while filling in the <parameter form>. Some examples follow:

Simple Replacements — No Parameters

These are the simplest form of definitions. In this case there are no parameters and the <replacement text> directly replaces the \<def name>␣… ␣. The ␣… ␣ is there to emphasize that all the blanks after the \<def name> are eaten by TEX. Suppose that the sequence αβγ kept occurring in the text. Then

\abg\␣ defined by \def\abg{$\alpha\beta\gamma$} will produce αβγ in its
place. In this example the <replacement text> is $\alpha\beta\gamma$. A

second example is the problem of putting italic correction in the text, keeping the italic inside the group defined by the {...}. The <replacement text> then should be {\it italic correction\/} including the braces. Thus the

correct definition, if \itc is to be the <def name>, is \def\itc{{\it italic
correction\/}}.

Simple Replacements — Simple Parameter List

These definitions have the <parameter form> of #1, #1#2, …, #1#2...#9. An example is \def\up#1{$^{#1}$}. When \up is used, the next token, either a character, command, or entire group inside a {...} is absorbed as #1 and put into the position of #1 in the replacement text. Thus \up{**} becomes $^{**}$ which is then put in the text in place of the entire \up{**}. Note that ** and not {**} is the parameter for \up. The {...} were used to delimit ** so that TEX knew that both of them together should be #1. “Thus\up{**}” gives “Thus^{∗∗}”. Note that a definition made inside a group only lasts as long as the group lasts. At that point the definition becomes what it was previous to the group.

⋄ \gdef\<def name> <parameter form>{<replacement text>}

This is identical to \global\def and can be used in exactly the same way as \def. The major difference is that a \<def name> defined with a \gdef does not disappear at the end of the group in which it is defined.

• \global

The command \global will cause either the definition, assignment, or definition equivalence (\let) to be global, ie not disappear at the end of the group. This should be used with care and sparingly.

• \let\<def a> [=] \<def b> This command makes the command \<def a>
be equivalent to, both in <parameter form> and <replacement text>, as

\<def b> at the time that the \let is called. This command is very useful for such things as \let\sheadfont = \twelvess. It should be used with care or a circle of definitions may be produced.

• \long

A \def may be preceded by a \long to give a \long\def. When this is done the parameters #1 … may contain either \par or, equivalently, blank lines. Without the \long, a \par in a #1 will cause an error. This is a safety feature to allow TEX to isolate errors before the origin is completely lost. \long should be used with extreme care.

• \outer

A \def may be preceded by \outer to give an \outer\def. A definition so preceded may not be used in any other definition. Again this is a safety feature to catch errors before it is too late. For example, all of the section head definitions in INRSTÊX, \shead and its relatives, are declared \outer.

It is possible to have a \outer\long\global\def.

17.3 WARNING — Clever Definitions

It is possible tell TEX very complex things. The danger and difficulty for debugging increases dramatically as you start to exercise fine control over how TEX processes the text.

The simplest extension to the forms above is to use the fact that the <parameter form> can include tokens other than #<integer>. This additional freedom allows for the input of parameters without requiring that they be placed in {...}.

The second level of extension is to use the various \if... \else ... \fi forms to control the actual text that will be placed in the text and even the placing of definitions inside definitions.

The next level of complexity arises when the macro builder attempts to control when TEX expands the various definitions and macros that make up the

<parameter forms> and the <replacement text>. For instance, this must be

done when writing out both the page number and the section number while accumulating information for making a table of contents. This requires extreme care.

The final level of complexity occurs when the macro writer attempts to control how, and when TEX tokenizes its input. Doing this correctly requires exquisite care. For instance, conditionally modifying the catcodes of input on the fly will prevent that input from being passed as a parameter to a macro. TEX tokenizes once and forever. Although making a character active for an entire document is relatively simple, flipping it back and forth is error prone.

Chapter 18  LISTS

Plain TEX supplies two commands for lists, \item, and \itemitem, that create list items with indentations of one and two times the paragraph indentation respectively. INRSTÊX supplies a complete set of commands for three levels of lists. In addition, spacing of list items may be controlled by either tightening or loosening the list item spacing. The basic set of commands specify the beginning and end of a list, sublist, and subsublist. All items in a list are introduced by \listitem or its abbreviation \li.

The commands for making lists are given first and the list of the various glues for spacing is given in Section 18.4.

18.1 Command List – Making Lists

⋆ \beginlist \bl
⋆ \beginsublist \bsl
⋆ \beginsubsublist \bssl
⋆ \everylist
⋆ \everysublist
⋆ \everysubsublist
⋆ \endlist \el
⋆ \endsublist \esl

                                 ⋆ \endsubsublist \essl
                                 ⋄ \item
                                 ⋄ \itemitem
                                 ⋆ \listitem \li
                                 ⋆ \loosenlist
                                 ⋆ \samplemark
                                 ⋆ \tightenlist

18.2 Making Lists

Lists and their associated items can appear in either vertical or internal vertical mode. They also work in multicolumn format and in conjunction with \narrowtext. In INRSTÊX the type of list is specified and not the actual list item. All list items, whether they appear in a list or a subsublist are called the same way. As elsewhere in INRSTÊX, every \begin..list must have an

accompanying \end..list. Each \begin..list ... \end..list matching

pair form a group; thus it is possible to change the fonts or any other parameter and that change affects only the present group and all of its internal groups. This is an important benefit of designating lists instead of list items. The main text of a list is indented a fixed amount and the list item herald, if it exists, is placed one quad to the left of the main text.

INRSTÊX also supplies three token lists \everylist, \everysublist, and \everysubsublist. These are token lists the contents of which are emptied inside the list group every time the corresponding \begin...list is called. These may be used for changing the list indentations, fonts, or individual item skips. Anything done in an outer list is of course valid in the sub lists. For instance if the list indent was required to be one inch and the list spacing to be 1 then

\everylist = {\listindentsize = 1in \spacing{1}}

would do the job.

The list commands can be used as the basis of specialized lists such as citation references.

Things to note about lists are

• There are three levels of lists, lists, sublists, and subsublists.

∘ A list, sublist, subsublist starts a group. The group localizes the effect of

changes. ♣ List items are indicated in the same way at all levels. ⋄ Display mathematics is acceptable within lists. This is an example.

∮_{|z|<1} \frac{e^{−kz}}{(1 − z)} dz

It can also have a second paragraph that is a part of this item. This paragraph could even have a narrowed portion

Wise men lay up knowledge but the babbling of a fool brings ruin near. Proverbs Ch. 10, Vs. 14

• It is possible to tighten the list here but it would not do much good as this is the last subitem.

NOTE: The Note: herald is so large that it sticks into the actual list item. This can be seen on this line.

⋆ This is a more normal size herald.

The previous list is actually produced by

\beginlist
\li $\bullet$ There are three levels of lists, {\it lists},
      {\it sublists}, and {\it subsublists}.
\beginsublist
\eightpoint
\li $\circ$ A list, sublist, subsublist starts a group.
        The group localizes the effect of changes.
\li $\clubsuit$ List items are indicated in the same way at
        all levels.
\li $\diamond$ Display mathematics is acceptable within lists.
        This is an example.
    $$
     \oint_{\vert z\vert < 1} {e^{-kz} \over (1-z)} dz
    $$
It can also have a second paragraph that is a part of this
item. This paragraph could even have a narrowed portion
\beginnarrowtext .5in
\tenpoint \it \noindent
Wise men lay up knowledge but the babbling
of a fool brings ruin near.
\bf Proverbs Ch.~10, Vs.~14
\endnarrowtext
\li $\bullet$ It is possible to tighten the list here
    but it would not do much good as this is the last
    subitem.
\endsublist
\li NOTE: The {\it Note:} herald is so large that it sticks
          {\bf into} the actual list item. This can be seen
          on this line.
\li $\star$ This is a more normal size herald.
\endlist

The command \samplemark{<list item mark>} can be used to create a list where the \listitemmarksize is one \enspace larger than the sample mark

and the \listindent, \sublistindent, and \subsublistindent inside the

same group are modified accordingly.

18.3 Command Forms – Making Lists

⋆ \beginlist \bl

This begins a list, starts a group, and should always have a matching \endlist. \bl is an approved abbreviation of \beginlist.

⋆ \beginsublist \bsl

This begins a sublist, starts a group, and should always have a matching \endsublist. A sublist may exist without a surrounding list. \bsl is an approved abbreviation of \beginsublist.

⋆ \beginsubsublist \bssl

This begins a subsublist, starts a group, and should always have a matching \endsubsublist. A subsublist may exist without a surrounding list or sublist. \bssl is an approved abbreviation of \beginsubsublist.

⋆ \endlist \el

These commands terminate a list and its associated group. \el is an approved abbreviation for \endlist

⋆ \endsublist \esl

These commands terminate a sublist and its associated group. \esl is an approved abbreviation for \endsublist

⋆ \endsubsublist \essl

These commands terminate a subsublist and its associated group. \essl is an approved abbreviation for \endsubsublist

⋆ \everylist [=] {<token list>}

The <token list> is inserted in the front of the list by the \beginlist. It is inserted soon enough to affect the list item parameters, and all parameters of the sublists and subsublists but too late to affect the prelist spacing.

⋆ \everysublist [=] {<token list>}

The <token list> is inserted in the front of the sublist by the \beginsublist. It is inserted soon enough to affect the list item parameters, and all parameters of the subsublists but too late to affect the presublist spacing.

⋆ \everysubsublist [=] {<token list>}

The <token list> is inserted before the subsublist by the \beginsubsublist. It is inserted soon enough to affect the list item parameters but too late to affect the presubsublist spacing.

⋄ \item

This is similar to \listitem but does not need to be surrounded by a list. It always indents by the \parindent.

⋄ \itemitem

This is similar to \listitem but does not need to be surrounded by a list. It always indents by twice the \parindent.

⋆ \listitem <listitem mark>␣ \li

This is the normal way to designate a list item. The <listitem mark> is the first string of characters after the \listitem and is terminated by blank, ␣. The <listitem mark> is placed to the left of the first character in the list item with a total width of \listitemmarksize. At least one \enspace exists between the end of the <listitem mark> and the first character in the list item. If the <listitem mark> is larger than the space allotted, It will stick into the list item. A list item continues until the list ends or a new list item begins.

⋆ \loosenlist

This command loosens the spacing between list items in the present and all enclosed lists by a factor of 4 = 1/.25. It will undo a single \tightenlist at the same level.

⋆ \samplemark{<listitem mark>}

This command is used to create lists with marks that may be of quite different size than that assumed by the defaults. All marks and indents contained in the same list and sublists will be changed. This command must be used before the first list item to affect the present list. The \listitemmarksize is one

\enspace larger than the sample mark and the \listindent, \sublistindent,

and \subsublistindent inside the same group are modified accordingly.

⋆ \tightenlist

This command tightens the spacing between list items in the present and all enclosed lists by a factor of .25 = 1/4. It will undo a single \loosenlist at the same level.

18.4 Command Forms – List Spacing Parameters

All of the parameters are set via assignments such as \...skip [=] <glue, dimen>. Their use should be obvious from their names. Note that \pr... is the skip that precedes and \po... is post the list in question. For example, \prsublistskip is the skip that occurs before the start of a sublist and \posublistskip that which follows. Where a list, sublist, and/or subsublist start or finish at the same place, the maximum skip is chosen.

⋆ \listindent [=] <dimen>
⋆ \listitemmarksize [=] <dimen>
⋆ \listitemskip [=] <glue>
⋆ \polistskip [=] <glue>
⋆ \posublistskip [=] <glue>
⋆ \posubsublistskip [=] <glue>
⋆ \prlistskip [=] <glue>

                                 ⋆ \prsublistskip [=] <glue>
                                 ⋆ \prsubsublistskip [=] <glue>
                                 ⋆ \sublistindent [=] <dimen>
                                 ⋆ \subsublistindent [=] <dimen>
                                 ⋆ \sublistitemskip [=] <glue>
                                 ⋆ \subsublistitemskip [=] <glue>

Chapter 19  FOOTNOTES^{‡}

INRSTÊX supplies a simple but powerful footnote^{†} capability. This replaces the \footnote command in plain. Do not use \footnote in \title or any of the section head commands. The footnote will get lost. If you must footnote a title or section head, then use \up{<mark>} where you call out the footnote and \sfootnote with the same <mark> in the vertical list of the surrounding page. For those of you who wish to change the default formats there is an \everyfootnote={<token list>} that will be inserted at the beginning of every footnote list.

19.1 Command List

⋄ \dimen\footins
⋆ \everyfootnote
⋆ \footnote
⋆ \footnotefont

                                 ⋄ \footnoterule
                                 ⋄ \skip\footins
                                 ⋆ \sfootnote
                                 ⋆ \up

‡ This really should not have been footnoted. However to obtain the correct placement

of the ‡, $\sphantom{\cheadfont S}^\ddagger$ was actually used. This footnote leads

to a large number of problems. It will show up in the automatic listing of the table

of contents and the header text. To prevent this, the \let\ftn=\relax is placed im-

mediately after the \chapterhead and just before \maketoclist produces the table of

contents.

† For making footnotes like this, even with imbedded mathematics, ie ∫_{0}^{∞} g(x)dx, or font

changes.

Draft Version:  1991/9/5

19.2 Command Forms

⋆ \everyfootnote = {<token list>}

The <token list> is inserted before every footnote list. It could be used, for instance, to change the spacing between lines or any other default feature that is found undesirable.

⋆ \footnote{<math mode mark>}{<text>}

The <math mode mark> is the marker that is placed on the word that is being footnoted. Note that it is in math mode. This command should be used only in (internal) horizontal mode. If the footnote gets lost for some reason, use the \up{<math mode mark>} at the appropriate place in the text and \sfootnote with the same <math mode mark>. The \sfootnote should be in the vertical list of the main page.

⋆ \footnotefont

The footnote font (really an entire family) … it is set when the document font is set or specifically.

⋄ \footnoterule

The footnote line at the bottom of a page. This is modified by redefining it

through a \def\footnoterule{<new definition>}.
⋆ \up{<math mode mark>} This command superscripts the <math mode mark>

to the preceding character. It assumes that the current font family is active. Since the \cheadfont in the title is much bigger than the default \tenpoint

of this book, {\cheadfont FOOTNOTES\up{\ddagger}} would look like this

FOOTNOTES^{‡}.

⋄ \skip\footins [=] <dimen>

This sets the initial skip before the first footnote to <dimen>.

⋄ \dimen\footins [=] <dimen>

This sets the maximum height allowed for footnotes to <dimen>. If this maximum height is exceeded, the footnotes spill over to the next page. It is set in INRSTÊX at 10in.

⋆ \sfootnote{<math mode mark>}{<text>}

This should be used for footnotes that appear in the vertical mode. It is necessary if the original footnote to be called out is too deep inside vertical boxes. An example of this is the \title, the various section and chapter

heads, and the \captionbox in a \figureinsert or \tableinsert. It should

not be used in either horizontal or internal vertical mode.

Example is always more efficacious than precept.

Rasselas, Samuel Johnson (1709-1784)

Chapter 20 FIGURE

and

TABLE INSERTS

INRSTÊX supplies two basic commands \figureform and \tableform that places figures in the current position, writes to the appropriate files for the generation of lists of figures and tables, and does automatic numbering

if \autonumberingon. The commands \figureinsert and \tableinsert are

identical except that the figure is put in place only if there is room on the current page. Otherwise, it is placed at the top of the following page.

INRSTÊX also provides three commands for delayed insertion of text.

These are \begintopinsert, \beginmidinsert, and \beginpageinsert,

which will place the text at the top of the page, in place if there is room, or take the full next page, respectively. These commands are terminated, by

an \endtopinsert, \endmidinsert and \endpageinsert respectively.

Finally, \ejectinserts forces deferred figures or tables to be printed so that they do not spill over into following chapters. This may be necessary, for example, before a set of appendices.

20.1 Command List

⋆ \beginmidinsert
⋆ \beginpageinsert
⋆ \begintopinsert
⋆ \captionbox
⋆ \captionnumfont
⋆ \captiontextfraction
⋆ \captiontitlefont
⋆ \captionbodyfont
⋆ \captionbody

                     ⋆ \captionbodyon
                     ⋆ \captionbodyoff
                     ⋆ \centergraph
                     ⋆ \centerplotfile
                     ⋆ \ejectinserts
                     ⋆ \endmidinsert
                     ⋆ \endpageinsert
                     ⋆ \endtopinsert
                     ⋆ \figureform

                                            ⋆ \figureinsert
                                            ⋆ \figurelabel
                                            ⋆ \rect
                                            ⋆ \tableform
                                            ⋆ \tableinsert
                                            ⋆ \tablelabel
                                            ⋆ \topcaptiontrue
                                            ⋆ \topcaptionfalse

20.2 Possible Figures – TEXGraph

INRSTÊX supplies a \rect <hdim> by <vdim> that will put an empty rectangle in the position of the actual figure. The addition of TEXGraph allows for the insertion of actual figures. A TEXGraph figure may be centered using \centergraph{<figure>}. An external plot file, may be placed in position by the use of \centerplotfile{<filename>}. Both these commands use information supplied by TEXGraph to determine the amount of space to leave. All files must be processed to be TEXGraph compatible. For details on TEXGraph, see “An Introduction to TEXGraph”.

20.3 Figure and Table Captions

INRSTÊX supplies a number of facilities for captions. A specific example is given as Figure 20.1. The caption is broken down into four parts. The first is the Fig. whose value is determined by \figurelabel that is language dependent. The second part is the number that may or may not be automatically generated. These font of these first two parts is determined by \captionnumfont. The second and third parts are the caption title and caption body respectively. The caption title will appear in the list of figures while the caption body will

not. \captiontitlefont and \captionbodyfont determine the fonts of these

latter two sections respectively. INRSTÊX defaults both these to \rm at the moment. \captionbodyon, which is the default, allows the \captionbody to be printed. However the command \captionbodyoff will turn off the printing of everything inside a \captionbody. This is done when the list of figures or tables are made using a \makefiglist or \maketbllist although it is not really necessary as the \captionbody is not even written out to a list file. Finally if \topcaptiontrue, the caption is placed above the figure while if it is false, the default, it is placed below.

20.4 Deferred Inserts

INRSTÊX supplies^{†} commands of the form \begin<type>insert and corresponding \end<type>insert. These commands form a group and take the <text> between the \begin... and \end... and insert it, or defer it as the spacing warrants. A <type> of top will put the <text> at the top of the current page, if there is room, or on the next page if there is not. mid will put it at the location it is called out, if there is room, or at the top of the next page if there is not. page will reserve the entire next page for the <text>.

20.5 Deferred Figures or Table Inserts

The basic command \figureform takes three parameters, the figure number or tag, the figure caption, and the figure itself as described in Section 20.2. It places the figure in the text at the present position whether there is room or not. Usually the desirable effect is to defer the figure until the following page if there is not enough room on the present one. The command \figureinsert does just that. The following command will insert the figure as shown. Autonumbering is on.

\begingroup
\let\captionnumfont = \twelvebfxsca % scaled 10pt
\let\captiontitlefont = \twelvess
\let\captionbodyfont=\tenss
\figureinsert{dummyfig}{This is not a very
    Exciting Figure \captionbody{-- It does show though it is
    entirely possible to use the font freedom to create a less
    than pleasing final result. The group here prevents this
    disaster from spreading.}}{\rect 4cm by 6cm}
\endgroup

The spacing between the figure and the caption is determined by the value of \captionskip. If new values are desired, these are produced by \captionskip

= <dimen>.

† The commands in this section are essentially plain commands. They have been renamed

to maintain consistency with the \begin... and \end... conventions of INRSTÊX.

Draft Version:  1991/9/5

Fig. 20.1 This is not a very Exciting Figure – It does

show though it is entirely possible to use the font freedom to create a less than pleasing final result. The group here prevents this disaster from spreading.

Figure 20.2 uses the facilities of TEXGraph and a deferred insert. Assume that \target is the graphics description for the figure. The figure is called out here.

The commands were

\def\target{\btg \unitscale .5
            \move h:2 v:2
            \lcir r:1.5 \pfill p:.7
            \lcir r:1  \pfill p:.5
            \lcir r:.5  \pfill p:.3
            \move h:4 v:4
             \etg}
\figureinsert{target}{This is a
      Figure Insertion Involving Graphics}{\centergraph{\target}}

TEXGraph commands are documented in “texgraph.doc”.

The format of the \tableform and \tableinsert commands is the same with the last argument replaced by the table itself or an \input{<filename>}

Fig. 20.2 This is a Figure Insertion Involving Graphics

that would bring in the file. The “Fig.” in the caption is in the command

\figurelabel. There is an equivalent \tablelabel.

20.6 Full Page Figure/Table Inserts

Full page figure/table inserts are complicated by the need to position the caption differently if the figure/table exists or not. The following is used for a full page figure if there is no figure and the caption is required at the bottom of the page.

\beginpageinsert
\captionskip = 0pt plus 1 fill % pushes caption to bottom of page
\figureform{<tag or number>}{<title>}{} % note empty last parameter
\endpageinsert

If there is a figure, it will be placed at the top of the page and the caption, a \captionskip below it. The commands for this are

\beginpageinsert
\figureform{<tag or number>}{<title>}{<figure>}
\endpageinsert

Tables are inserted similarly.

To insert a table or figure vertically on a page, TEXGraph must be used.

20.7 Complications and Unusual Cases

Insertions are not without there complications. The following problems can occur:

• Two or more figure insertions reverse their order: This will occur when there is room to insert the second figure called out but not the first. Solutions(?): call them out in different order; use \figureform to force the insertion and accept the consequences; make the figures smaller.

• A figure has one or two lines of text below it: This will happen if the inserted figure is almost a full page. It is even possible to have an almost blank page preceding it. Solution: Change the \figureinsert to an full page insert as described in Section 20.6.

• Two full page figures in row are really parts 1 and 2 of the same figure: This is complication both with the automatic numbering of the figures and the list of figures. The solution is somewhat complicated. Only the numbering problem is considered here. See Chapter 23 for the details on autonumbering. Solution:

\silent{\autofignum{<figtag>}}
\begingroup
\autonumberingoff
\beginpageinsert
\figureform{\ref{<figtag>}(a)}{<part (a) caption>}{<fig a>}
\endpageinsert
\beginpageinsert
\figureform{\ref{<figtag>}(b)}{<part (b) caption>}{<fig a>}
\endpageinsert
\endgroup

• Figures from a previous chapter or section spill over into the next: Solution: Follow the last figure with \ejectinserts. If a new page is required, follow this by \ejectpage.

20.8 Command Forms

⋆ \beginmidinsert
⋆ \beginpageinsert
⋆ \begintopinsert

These basic deferred text insertion commands start a group and define the beginning of <text> that will be inserted either in place or at the top of the next page if there is no room, on the entire next page, or at the top of the page respectively.

⋆ \captionbox{<number text>}{<title>}

This command is used for captioning figures or tables. If the <number text> plus the <title> is shorter than \captiontextfraction of the size of the enclosing box or page, the two are centered. If the total is greater, the title is put in a box, in ragged format and will be automatically broken if it takes more than the one line. The spacing is always one. \captiontextfraction is defaulted to 0.8. The captionbox is used in both \figureform and \tableform but is available for other captioning as necessary.

⋆ \captionbody{<text>}

This command is optionally placed in title field of a caption. it is used to write an essay about a figure or table that you do not want to turn up in the list of figures or tables. It is printed if \captionbodyon and is not printed if

\captionbodyoff. \captionbodyon is the default. The \captionbody is not

written out to the .fig or .tbl file.

⋆ \captionbodyon \captionbodyoff
\captionbodyon allows a \captionbody text to be output – \captionbodyoff

prevents it. The default in normal text is \captionbodyon but in lists of figures

or tables produced by \makefiglist or \maketbllist is \captionbodyoff.
⋆ \captionbodyfont

This command sets font of the body of the caption of a Figure or Table. The material affected by this font will not appear in a list of tables or figures. The default is the same as current active font.

⋆ \captionnumfont

This command sets font of the herald Fig. and the number. It is set in a consistent way as part of the document font specification in a font family. The default is the same as the \ssheadfont.

⋆ \captiontitlefont

This command sets font of the title of a Figure or Table. The default is the same as current active font.

⋆ \captionskip [=] <dimen>

This command sets the spacing between the figure/table and the following \captionbox. It is assigned 0pt plus 1fill to force the caption box to the bottom of the page for a full page figure.

⋆ \captiontextfraction

This value controls the fraction of the width of the page that will be used to determine whether the caption text is set as a single line or as several lines. It

is defined in inrsdef.tex as \def\captiontextfraction{0.8}.
⋆ \ejectinserts

This command forces out all of the inserts, be they footnotes or deferred figures and leaves the position at the end of the last insert. If a new page is desired, the \ejectinserts should be followed by an \ejectpage.

⋆ \endmidinsert
⋆ \endpageinsert
⋆ \endtopinsert

These commands terminate their respective \begin..insert and close the group.

⋆ \figureform{<tag or number>}{<title>}{<figure box>}

This is the basic command for inserting and captioning space for a figure in a document. If autonumbering is on, the <tag or number> becomes the tag for the figure for in text reference. The actual text inserted in the figure caption

is \figurelabel<figure number> where the <figure number> is computed

determined from the tag value. For instance “\ref{dummyfig}” gives “20.1”. If autonumbering is off, the text of the <tag or number> is inserted. The <figure box> should take up the same amount of space as the actual figure, less captions. If the .fig file is open, the \figtoc command with its <number>, <title> and <page number> arguments are written to it.

⋆ \figureinsert{<tag or number>}{<title>}{<figure box>}

This is equivalent to

\beginmidinsert
\figureform{<tag or number>}{<title>}{<figure box>}|
\endmidinsert

The effect is to place the figure at the present location, if there is enough room on the page, or defer it to the top of the next page if there is not. See Section 20.7 for complications.

⋆ \figurelabel

This command is defined to give the text that precedes the <figure number> in the caption. In INRSTÊX this is “Fig. ”. This is modified by redefining it

with a \def\figurelabel {<new label>}.
⋆ \rect <horizontal dimen> by <vertical dimen>

This creates a line boxed rectangle with the dimensions given and then places

it in a \centerline.
⋆ \tableform{<tag or number>}{<title>}{<table>}

This command is almost identical to \figureform except that the listfile is .tbl, the prenumber caption, which is “Table ” is defined by the command \tablelabel, and the final argument will usually be the actual table.

⋆ \tableinsert{<tag or number>}{<title>}{<figure box>}

This is equivalent to

\beginmidinsert
\tableform{<tag or number>}{<title>}{<figure box>}|
\endmidinsert

The effect is to place the table at the present location, if there is enough room on the page, or defer it to the top of the next page if there is not. See Section 20.7 for complications.

⋆ \tablelabel

This command is defined to be the prestring to the table number. It defaults to “Table ”. This is modified by redefining it with a \def\tablelabel {<new

label>}.

Chapter 21 MULTICOLUMN

FORMAT

INRSTÊX supplies a reasonably versatile multicolumn format mechanism. The rest of this chapter is set in the multicolumn format with two columns it was called using

\beginmulticolumnformat
\tolerance = 1000
\intercolumnsep = {\quad \vrule\quad}
\numberofcolumns = 2

21.1 Command List

⋆ \balancecolumnsize
⋆ \beginmulticolumnformat
⋆ \endmulticolumnformat
⋆ \ejectcolumn
⋆ \ejectpage
⋆ \firstcolumnoffset
⋆ \intercolumnsep
⋆ \numberofcolumns

21.2 Multicolumn Usage

Multicolumn format is begun using

\beginmulticolumnformat.

and is terminated with an

\endmulticolumnformat.

Narrow columns in multicolumn format can make it difficult to produce nice looking lines. This is why the \tolerance was increased above while in this two column mode. When the number of columns is specified, above it was 2, the current space taken by the intercolumn separator and the first column offset is used to compute the size of the columns. This hopefully will not be of negative width. From this point all input will be put in multicolumn format. Footnotes, inserts, and the like that occur while multicolumn format is in force will migrate to the appropriate places in the column.^{†} Figures, tables will all behave as if the column were a page. Footnotes and inserts that occur before or after multicolumn format will be placed in the appropriate place but with respect to the entire page rather than the individual column. A column is completed using an \ejectcolumn while an \ejectpage will complete all the columns on the page.

INRSTÊX does not produce balanced columns automatically. However, there is a way of hand balancing. When the multicolumn format is ended, INRSTÊX computes an estimate of the column length that is needed to produce balanced columns on the last page. If this amount is en-

tered by using \balancecolumnsize

[=] <dimen> command somewhere on the page preceding the last page, the next time the file is processed, INRSTÊX will use <dimen> as the vertical size of the columns on the last page. It may take a few trials to determine the correct value for the <dimen>. In this instance

† This footnote migrated down to the bottom of this page

                                  \balancecolumnsize=165pt

was inserted here.

21.3 Command Forms

                                 ⋆ \balancecolumnsize
                                          [=] <column length>

This command, when inserted somewhere on the second to last page or before the multicolumnformat starts if it takes less than a page, will produce columns with vertical size

                                  <column length>.
                                 ⋆ \beginmulticolumnformat

This begins multicolumn format and a group.

                                 ⋆ \endmulticolumnformat

This ends multicolumn format and terminates the group.

                                 ⋆ \ejectcolumn

This ends and vertical fills a column. When not in multicolumn format, it will act as an \ejectpage.

                                 ⋆ \ejectpage

This command ends and fills the current column. It then terminates the entire page, leaving blank columns as necessary.

⋆ \firstcolumnoffset
[=] <dimen>

This command reduces the horizontal size by amount of 2<dimen>. The reduction will show up evenly on both side of the page. The INRSTÊX default is 0pt.

⋆ \intercolumnsep
[=] {<token list>}

The <token list> is inserted between every column. The vertical lines in this chapter are a result of the \vrule when the multicolumn format was first called. INRSTÊX defaults to a pure spacing of 2em.

⋆ \numberofcolumns
      [=] <integer>

This sets the number of columns and computes the horizontal size of the column. The various offsets should be set before this is called. This command should be called before any <text> is submitted to the multicolumn page.

The chief virtue that language can have is clearness, and nothing detracts from it so much as the use of unfamiliar words.

On the Natural Faculties, Galen

Chapter 22  CHAPTER and SECTION HEADS

INRSTÊX supplies commands for creating chapter and section heads. The default style of the heads are those given in this book. They form the basis of the style that naturally results from the use of INRSTÊX. Some changes in style such as the fonts used are quite easy; others require more care.

This chapter introduces the commands for creating section heads, whether they occur during the initial part of the document or within appendices. All of the commands have the same format with or without autonumbering or automatic generation of table of contents in force.

INRSTÊX considers that a document consists of a prelude part that will include the preface, table of contents, and other special summaries, an interlude consisting of chapters and sections, appendices, which may appear at the end of a document or at the end of a chapter, and a postlude which would include, perhaps, an index, references, and even appendices. The prelude, appendices, and postlude are enclosed by a \begin...\end... pair that form a group and set up the styles appropriate for that section.

The forms that introduce sections, tables of contents, or chapters all have commands of the form \...head, such as \shead, where the head is supposed invoke images of starting a unit. In INRSTÊX, all commands that have a \begin... have an accompanying \end... and all create a group. The \...head commands are key elements in controlling the setting and incrementing of the various numbers used in the document. In addition, they have a relatively complex, but accessible format part that can be modified if required.

The section head commands \chead, \shead, \sshead, \ssshead, and \dssshead stand for chapterhead, sectionhead, subsectionhead, subsubsectionhead, and diminished subsubsectionhead. This is the only example of commands in INRSTÊX for which the abbreviations exist without the full forms. This is primarily for typing and visual convenience in the original file. The fonts used have the same abbreviated form.

If an \shead is immediately followed by an \sshead or any other sectionhead form, there is a chance that they may be split apart if they occur at the bottom of the page. To prevent this, and to make the spacing reasonable, the command \nosheadbreak must be placed in between the two commands. The general spacing parameters are given in Section 22.4.

If the .toc file is open for making a table of contents list, each section head form writes information to this file. The actual form sent is determined by the definition of a \...tocout form. For instance the \shtocout is defined

as \def\shtocout{\string\shtoc}. The \shtoc is an INRSTÊX form that

produces a section head line in the table of contents.

22.1 Command List

⋆ \Alphabetic
⋆ \alphabetic
⋆ \Appendix
⋆ \beginappendices
⋆ \beginprelude
⋆ \Chapter
⋆ \chapterstartform
⋆ \chead
⋆ \cheadfont
⋆ \chnum
⋆ \chtagreplaceformat
⋆ \chnumform
⋆ \chtocout
⋆ \endappendices
⋆ \endprelude

                     ⋆ \dssshead
                     ⋆ \dsssheadfont
                     ⋆ \dssshtocout
                     ⋆ \innerchead
                     ⋆ \innerdssshead
                     ⋆ \innershead
                     ⋆ \innersshead
                     ⋆ \innerssshead
                     ⋆ \nosheadbreak
                     ⋆ \preludehead
                     ⋆ \prtocout
                     ⋆ \shead
                     ⋆ \sheadfont
                     ⋆ \shnum
                     ⋆ \shnumform

                                            ⋆ \shtagreplaceformat
                                            ⋆ \shtocout
                                            ⋆ \sshead
                                            ⋆ \ssheadfont
                                            ⋆ \sshnum
                                            ⋆ \sshnumform
                                            ⋆ \sshtocout
                                            ⋆ \ssshead
                                            ⋆ \sssheadfont
                                            ⋆ \ssshnum
                                            ⋆ \ssshnumform
                                            ⋆ \ssshtocout
                                            ⋆ \UpperRoman

22.2 Command Forms — Making Head Forms

The commands in this section are very similar in form and will be described in together. There are six predefined <head types>: prelude, c (chapter), s, ss, sss, and dsss. All but prelude and dsss take two arguments in their

\<head type>head form.

Number format and font commands are discussed in Section 22.3.

⋆ \chead{<number or tag>}{<title>}
⋆ \preludehead{<title>}
⋆ \shead{<number or tag>}{<title>}
⋆ \sshead{<number or tag>}{<title>}
⋆ \ssshead{<number or tag>}{<title>}
⋆ \dssshead{<title>}

All of these commands create the various forms of section or chapter heads indicated by the command name. The <number or tag> field is interpreted as a tag if autonumbering is on or inserted as is into the appropriate place if is not. The lack of this field in \dssshead and \preludehead implies that it is impossible to tag or refer to these document parts except through their, presumably known, titles. The tag replacement format and associated \<head type>hnumform are discussed separately in Section 22.3.

There are some restrictions in the use of the <title> field. This should not include \footnote, \cite, or \ref commands. If it is absolutely necessary to use these, see Chapter 19 to see how to get around the \footnote restriction, and use \quietref{<tag>} for the other two. Quiet is not quite silent.

⋆ \Appendix

This command defines the actual form that will be seen in an \shead used for appendices. It is defined as “Appendix” in \englishversion and “Appendice”

in \versionfrancaise.
⋆ \beginappendices  \endappendices

These commands are intended to enclose the appendices that occur at the end of a chapter or book. They reset the special auto numbers, and change the format of the numbers when an \shead or its relatives are called. \chead should not be called in an appendix. Since the \begin...\end... pair form a group, changes that only affect the appendices are easily made.

⋆ \beginprelude  \endprelude

These commands are intended to enclose the prelude that occurs at the the start of a document. Preludes usually include such entities as prefaces, tables of contents, figures, and tables, acknowledgments, distribution lists or perhaps executive summaries. Since the \begin...\end... pair form a group, changes that only affect the prelude parts are easily made.

⋆ \Chapter

This command defines the actual form used in a \chead. It is defined as

“Chapter” in \englishversion and “Chapitre” in \versionfrancaise.
⋆ \chapterstartform = {<special pre chapter tests>}

The token list for this command is executed inside \chead before the first page of the chapter is produced. For this book it was used to check whether the chapter starting page was odd. If it was not, a “quote” page was produced.

22.3 Command Forms — Number Formats

The number formats when autonumbering is in force are defined using a few commands. First the fonts in the various head forms are called \<head type>headfont. These are defined when a document font size (see Chapter 7) is defined. For example \documentfont{\tenpoint} determined the document font family for this book. The individual fonts may be changed, although it is not recommended, by changing the \<head type>headfont. For example, \let\sheadfont = \twelvedu will change the section head font for the rest of the document, or until the end of the group if it is called within a group. A change of this sort will not modify the other fonts.

The number formats are modified by changing the \<head type>hnumform

such as \chnumform, \shnumform, \sshnumform, \ssshnumform, respectively

for the chapter and the various section heads. \Alphabetic{<integer>},

\alphabetic{<integer>}, and \UpperRoman{<integer>} are used to change

the format of an integer (counter) to either the equivalent uppercase letter, lowercase letter or uppercase roman numeral. The INRSTÊX forms for \<head

type>hnumform are
\def\<head type>hnumform{\the\<head type>hnum}

for all <head type> except that in appendices \shnumform is defined to be

\def\shnumform{\Alphabetic{\the\shnum}}

This effectively changes the appendix numbering to be roman capitals.

The command \chtagreplaceformat is the actual command that is used to place the “Chapter 22” at the beginning of this chapter. The two definitions involved in this replacement are

\def\chtagreplaceformat {Chapter \chtagrefformat}
\def\chtagrefformat {\chnumform}

The \shtagreplaceformat is defined similarly and is used in \sheads.

A change in the form of the command written to the table of contents file may be obtained simply by redefining the appropriate \...tocout.

22.4 Command Forms — Section Head Spacing

The spacing both before and after the various \...heads are determined by the following parameters. Stretch and shrink glue should be specified to give TEX some freedom to break pages.

⋆ \prsheadskip [=] <glue> . . .  pre shead skip
⋆ \posheadskip [=] <glue> . . .  post shead skip
⋆ \prssheadskip [=] <glue> . .  pre sshead skip
⋆ \possheadskip [=] <glue> . .  post sshead skip
⋆ \prsssheadskip [=] <glue>.  pre ssshead skip
⋆ \posssheadskip [=] <glue>.  post ssshead skip
⋆ \prdsssheadskip [=] <glue>  pre dssshead skip
⋆ \podsssheadskip [=] <glue>  post dssshead skip

22.5 Major Modifications of the Section Head Formats

    INRSTÊX has separate \cheadformat, \preludeheadformat, and a very

general section head format. These are easily modifiable without upsetting any of the houskeeping. Any format that satisfies the input parameter constraints will work.

⋆ \cheadformat{<chapter>}{<text>}

The <chapter> is the chapter identifier. In this chapter it was Chapter 22. The <text> is title of the chapter. The particular form was built using

\vcenter and \halign.
⋆ \gensheadformat{<font>}{<number>}{<text>}{<separator>}

This command uses four parameters. The first is the font, the second the number, the third is the title of the section and the fourth is the separator between the number and the text. The form that is used checks the number to see if it is empty. If it is, the <text> is placed flush left. The <text> is actually placed in a \vbox with \veryraggedright spacing so that there will be no hyphenation and long titles will automatically split. Details are in

secthead.tex.
⋆ \preludheadformat{<title>}

This command is defined with one parameter that is assumed to be the title of the particular section. Since this one is quite simple the default definition is given as

\def\preludeheadformat#1{\centerline{\sheadfont #1}\vskip 1cm}

Chapter 23 AUTONUMBERING

REFERENCING

and TAGGING

INRSTÊX provides facilities for automatic numbering and referencing of chapters, sections, equations, figures, and tables. Both the number of a chapter, equation, … and its page may be referenced. In addition there are general features for defining your own special numbers and tags. For instance, it is possible to obtain a new number for, say problem exercises, by just calling \newautonum{ex}. This will create all the commands necessary for referencing, resetting, and autoincrementing these numbers.

Chapters, sections, subsections, etc, are also autonumbered and can be referenced through tags. For instance this chapter has the tag auto. To insert the value of the tag in the text, it is only necessary to type \ref{auto}, which in this case gives 23 without any extra braces brackets or periods. Details of creating tags for chapters and sections are discussed in Chapter 22 starting on page 135.

INRSTÊX also supplies facilities for automatically numbering and creating paper or journal citations (sometimes called confusingly, at least here, references). These are discussed in Chapter 24, page 149. The facilities for creating lists of tables or figures are found in Chapter 25 starting on page 155^{†}.

                                                                                   auto ==> 23
                                                                                    auto <-- 23
                                                                                    shead <-- 22
                                                                                    shead <-- 135
                                                                                    cite <-- 24
                                                                                    cite <-- 149
                                                                                    toc <-- 25
                                                                                    toc <-- 155

† One must be careful not to overdo an easily used facility.

Draft Version:  1991/9/5

23.1 Command List

⋆ \aneq
⋆ \aneqtag
⋆ \autonumberingon
⋆ \autonumberingoff
⋆ \autoreferencingon
⋆ \autoreferencingoff
⋆ \autoeqnum
⋆ \autotblnum
⋆ \autofignum
⋆ \auto<type>num
⋆ \inputtagfiles
⋆ \newautonum
⋆ \newtag
⋆ \numberbychapter
⋆ \numberbysection

                                 ⋆ \Prerefform
                                 ⋆ \Postrefform
                                 ⋆ \pageref \pref
                                 ⋆ \pagequietref \pqref
                                 ⋆ \pagetagsoff
                                 ⋆ \pagetagson
                                 ⋆ \quietref \qref
                                 ⋆ \ref
                                 ⋆ \silent
                                 ⋆ \specialnumberscontinuous
                                 ⋆ \<type>tagrefformat
                                 ⋆ \<type>num
                                 ⋆ \<type>tagreplaceformat
                                 ⋆ \<type>numform

23.2 Tagging Conventions

Such items as section heads, equations, figures, and tables may be given symbolic “tags” so that references to them will be correct even if there are deletions, insertions, or shufflings. “Normal” tags refer to the section, equation, or figure numbers while “page” tags refer to the page where the item occurred. Page tags are turned on with the \pagetagson command and turned off with

\pagetagsoff. The default is \pagetagsoff.

The tagging system within INRSTÊX is designed to work best when the autonumbering features are on. It is designed so that both forward and backward references are possible. This is done by saving the tags in a file while TEX is processing. The next time the document is processed, the use of the

command \autonumberingon or \autoreferencingon will bring in the latest

version of the tag file. As tags are generated, the new definitions and values replace the old ones. When there is a reference to a tag that has not yet been (newly) defined, the old value is used. To guarantee that the tag references are correct, the document should be processed twice. This, of course is only necessary on the “final” version.

All tags, whether they are for chapters, sections, equations, citations, or specials must be unique within the entire document. This allows for the value of a tag, which is usually a number, may be referred to by \ref{<tag>} or \quietref{<tag>} and the page number where it occurred by \pref{<tag>}

                                                                                   autocomlist ==> 23.1
                                                                                   tagcon ==> 23.2

or \pqref{<tag>}, no matter the type being tagged. The quiet forms of the refs do not create margin notes and do not check to see if a tag actually exists. Thus both \qref{<tag>} and \pqref{<tag>} will give an error if <tag> does not exist. The quiet forms must be used inside section heads and are recommended whenever the ref is passed as a parameter to som other command. The tag value does not have any additional brackets or braces around it. For instance, if an equation was given a tag of theq, and that was eventually given the value of 2.11 where the first number is the section or chapter and the second is the equation number, then \ref{theq} would insert 2.11 into the text. To obtain “Eq. (2.11)” in the text it is necessary to type ``Eq. (\ref{theq})'', the (…) being put in explicitly.

In almost all instances, the actual tag is generated automatically by the autonumbering forms. However, the \newtag{<tag>}{<tagvalue>} command will create a tag with the name <tag> and the value <tagvalue> for \ref and the current page number for \pref.

Sometimes it is necessary to create the tag silently, ie without any trace in the text. Although \newtag does not insert into the text, \auto...num does.

The commands {\silenttrue \auto...num{<tag>}} will cause the \...num

to increment but nothing will be placed in the text. T his is preferred to

\silent{<text>}. Note that {\silenttrue <text>} will normally put the

<text> in the document.

23.3 Tag Insertion Formats

When a new tag and auto number is created, there are a number of reference forms for that tag that are also created. These are

\<type>tagrefformat
\<type>tagreplaceformat
\<type>numform

The first governs the format of the initial replacement of the <tag> when it created. The default in \newautonum{<type>} is to make it the same

as \<type>tagrefformat. The second,\<type>tagrefformat is the format

for inserting the tag value when it is actually referred to in the text. The third \<type>numform is set initially equal to \the\<type>num, the value of the counter corresponding to <type>. This may be modified if something other than simple arabic numerals are wanted. \newautonum{<type>} defines

\<type>tagrefformat to be equivalent to “\Prerefform  \<type>numform
\Postrefform”. The commands \Prerefform and \Postrefform are defined
by \numberbysection, \numberbychapter and modified when inside Appen-

dices.

                                                                                   refformats ==> 23.3

23.4 Valid Tag Forms

Any character except the following “\ $ % & _^{ } " |” are valid as, and within tags.

23.5 Numbering Conventions

There are basically two types of autonumbers in INRSTÊX, those that deal with chapters, sections, subsections, subsubsections, and appendices, and the special ones defined for equations, tables, figures, or any created especially for that document.

Associated with every autonumber is a count with the name \<type>num. For instance the count associated with equations is \eqnum and that with subsections is \sshnum. However, when the number is actually inserted into the text, it is not the raw number that is inserted, but rather some formatted version. The formatting appends to the basic count, either nothing, or the numbers corresponding the chapter or section where the number was first created. The actual formatting depends upon what type of numbering format is in force.

For instance, for a document with chapters, the ordinary convention is

to number the specials as “<chapter number>.<special number>”. If the

document has sections but no chapters, and if \numberbysection has been called, the format is “<section number>.<special number>”. The default in INRSTÊX is neither of these but is continuous numbering. This means that the specials have the form “<special number>” and are not reset, except in appendices, throughout the document. Continuous numbering of specials is

forced by \specialnumberscontinuous.

Appendices are treated specially. The specials are reset upon entering an appendix, and the reference formats always include the appendix number. The appendix number is usually an uppercase roman letter, although other formats are possible.

23.6 Command Forms

⋆ \aneq  \aneqtag{<tag>}

These commands are specials for use in display math mode to create equation numbers. They increment the equation counter \eqnum, and insert either a left or right hand equation number as appropriate, with the equation number surrounded by brackets like (<num>). This is provided to reduce the amount of typing required. The \aneqtag{<tag>} also creates a <tag> possible reference.

                                                                                   validtag ==> 23.4
                                                                                   numcon ==> 23.5
                                                                                   autocomforms ==> 23.6

⋆ \autonumberingon

This command turns automatic numbering on. It brings in the tag file with name \jobname.tag, if it exists, and opens a new version for writing the tags generated by that TEX processing run. The \jobname is the file name of the TEX file without the normal .tex extension. No errors will result if this command is called several times.

⋆ \autonumberingoff

This command turns automatic numbering off and closes the tag file. INRSTÊX

defaults to \autonumberingoff.
⋆ \autoreferencingon

This command turns automatic referencing on. It brings in the tag file with

name \jobname.tag, if it exists. A \ref{<tag>} will result in the <tagvalue>

being put in the text. A \pref{<tag>} will result in the page number where <tag> was last defined being put in the text. No errors will result if this command is called several times. INRSTÊX defaults to referencing being active but does not automatically bring in a .tag file.

⋆ \autoreferencingingoff

This command turns referencing off. Both \ref{<tag>} and \pref{<tag>} will result in the <tag> being put in the text.

⋆ \auto<type>num{<tag>}

This is the basic command for incrementing the <type> number and creating a tag for that number with the tag name of <tag> and the tag value of the number in the correct format given the numbering form in force. INRSTÊX defines three basic types, eq for equations, fig, for figures, and tbl for tables. The tag is written to the .tag file.

⋆ \inputtagfiles [=] {<input command><file name> ...}

In some cases it may be useful to bring in a file or list of files of tags other than

those in \jobname.tag. \inputtagfiles is a <token list> of commands of

the type given. For instance the master file for this book was called th.tex while the file for this chapter was called thauto.tex. If \autonumberingon is called when TEXing this chapter by itself, the tag file brought in will have the name thauto.tag. To use the th.tag file it is only necessary to put

\inputtagfiles  = {\inputwithcheck{th.tag} } in the chapter file.

⋆ \newautonum{<type>}

This command creates all the necessary commands for using and referring to the autonumber of <type>. The <type>s defined by INRSTÊX are eq, fig, and tbl, corresponding to equations, figures, and tables respectively. It is recommended, but not required that <type> be restricted to 3 or fewer characters. This allows for a consistent use of <type> as the extension of list file used for eventually creating a table of items for the table of contents part of a document. For instance, the equation numbering was created with \newautonum{eq}. This created the

counter \eqnum, and the commands \eqnumform, \eqtagreplaceformat, and

\eqtagrefformat. Any of these can be changes at will. However, care must be taken if consistent numbering formats is to be maintained.

⋆ \newtag{<tag>}{<tag value>}
⋆ \newttag{<tag>}{<tag value>}
⋆ \newptag{<tag>}

This creates a (normal) tag with reference name <tag> and value <tag value> and a page tag with the reference name<tag> and the current page value. These tags are written out to the .tag file if it is open. Page tags will get lost if they are produced inside a box that is never inserted in the text. This occurs for all

text inside a \silent{<text>}. \newttag{<tag>}{<tag value>} creates and

writes a normal tag while \newptag{<tag>} creates and writes a page tag.

⋆ \numberbychapter

This command will cause specials to be reset at the beginning of each new chapter, and to append the chapter number to any tag reference and to the original tag replacement.

⋆ \numberbysection

This command will cause specials to be reset at the beginning of each new section, and to append the section number to any tag reference and to the original tag replacement.

⋆ \pagequietref{<tag>} \pqref{<tag>}

This is a putting the page number in the text that corresponds to any <tag> that has been previously defined. It does not attempt to create a margin note nor does it check to see if the <tag> is valid. This allows the reference to be used in such places as section heads, titles, captionboxes. In fact it must be used in any place where the surrounding text is written to a special file or the terminal. Page references are always from the previous version.

⋆ \pageref{<tag>}  \pref{<tag>}

This is the basic command for inserting the page number corresponding to any <tag> that has been previously defined. Page references are always from the previous version.

⋆ \pagetagson \pagetagsoff

These commands turn page tags on and off respectively. The default is off. It is important to wait until the page containing the item is actually output before turning off page tags. The page tags are actually generated when the page is output … not before.

⋆ \quietref{<tag>} \qref{<tag>}

This is a putting the <tagvalue> in the text that corresponds to any <tag> that has been previously defined. It does not attempt to create a margin note nor does it check to see if the <tag> is valid. This allows the reference to be used in such places as section heads, titles, captionboxes. In fact it must be used in any place where the surrounding text is written to a special file or the terminal.

⋆ \ref{<tag>}

This is the basic command for inserting the <tagvalue> for any <tag> that has been previously defined.

⋆ \silent{<text>}

This command expands the <text> inside a vbox, but without ever having it enter the document. This is a way to call out a \figureinsert in order to create the normal tags and list files without it actually appearing in the text. Page tags will not be created in this case. Note that tags defined inside a \silent may not appear in the margin. The actual mechanism used is \setbox0 = \vbox{<text>}. See Chapter 15 for more details on box commands.

⋆ \specialnumberscontinuous

This command will prevent the special numbers from being reset at any point in the document, except appendices. A reference to a special number tag will result in the value of the appropriate counter with no section or chapter numbers added. All special numbers are treated the same way.

                                                                                    basbox <-- 15

Always verify your references.

Martin Joseph Routh (1755-1854)

Chapter 24

CITATIONS

or REFERENCE

LISTS

INRSTÊX provides facilities for automatic numbering and creation of citation or reference lists. The listing format supported is that of the IEEE, which numbers citations sequentially in the order that they are called out in the document. For short lists (about 40-60 citations), the actual citation forms may be in random order. For very long lists, the citation form file must be ordered in the same manner as the citations should appear in the document. Page referencing for citations is not supported.

24.1 Command List

⋆ \citenum
⋆ \cite
⋆ \citeform
⋆ \citetagvalue
⋆ \closecitationtagfile
⋆ \initcitetag{<integer>}

                                 ⋆ \inputciteformfiles
                                 ⋆ \inputcitetagfiles
                                 ⋆ \lastcitetag{<integer>}
                                 ⋆ \makecitationlist
                                 ⋆ \makelongcitationlist

24.2 Making Citations

A citation is made in a document using a format such as [\cite{<citation tag>}] where the <citation tag> may be of any valid tag form (see Section 23.4, page 144). If a \cite is used in internal vertical mode, for example in a section or chapter head title, then the margin notes will disappear. If it used in any field that may become a tag, then disaster will occur. This latter should never happen. When the first \cite is called, the citation tag file is opened automatically and tag generated for this citation, and the numerical value is placed in the text. Subsequently, a \cite will define a new tag if it is the first time it has been called and place the numerical value in the text. The command \citeref{<tag>} will place the numerical value of the citation in the text but will neither open the citation tag file if it is closed nor define a new tag if it is undefined. If a citation is to be defined but the value should

not be put in the text, then {\silenttrue \cite{<citation tag>}} should

be used.

The actual citation forms are maintained in a separate file whose default name is \jobname.cfm. The command \makecitationlist does not require that the citation forms in the .cfm file be in the same order and may include citation forms that are not even used. However, because of limitations on TEX’s internal memory, the maximum number of citations in a .cfm file used by \makecitationlist is limited to approximately 40 to 60. If TEX runs out of memory it is necessary to use \makelongcitationlist instead. When using this command, the .cfm file may be of any length but the citation forms must be in the correct order, and include only those actually cited in the document. This must be done by some program external to INRSTÊX.

The citation form command in the .cfm file is \citeform{<citation

tag>}{<TeX citation form macro>}. The <TeX citation form macro> is

of any form but will usually be a special \listitem. The actual number of the particular citation being written is held in the command \citetagvalue. This command should be placed at that place in the <TeX citation form macro> where the citation number should appear.

The first call to the \cite command will open the \jobname.ctg file where the tags for the citations are stored. Then \initcitetag{<integer>} where <integer> is one less than the lowest number in the citation list is written. This number allows for several independent citation lists to exist in a single document, for instance at the end of each chapter. When the file is

closed, either with a \makecitationlist or a \closecitationtagfile, an
\lastcitenum{<integer>} is written. The <integer> is the current value of
the \citenum.

To make a citation list the following is required:

\beginlist % citations are usually listitems ... should be group

\frenchspacing % suppresses extra space after periods
<initial macros \ejectpage, make Reference header
       and set up list>
\makecitationlist % or \makelongcitationlist
\endlist

The actual list of macros is inserted, in order by \makecitationlist or by \makelongcitationlist. The latter must be used if there are too many citations for TEX’s memory. In that case the \jobname.cfm file must be sorted and contain only those citations actually used. These commands automatically close the \jobname.ctg file, if it is open.

24.3 Prelude Citations

Occasionally citations appear in the prelude of a document, sometimes through a section head and hence in the table of contents. Usually the citation numbers should be those that occur later in the text rather than the ones that would occur naturally. The \cite in the prelude causes the citation tag file to open prematurely and the \citenum to be incremented incorrectly. To get around this problem, use the following procedure:

\begingroup % limits effect to initial section
\inputwithcheck{<filename>.ctg} %inputs the .ctg file if it exists
\let\cite=\citeref % cites only refer now
<text with \cites>
\endgroup % where you want citations to behave normally

24.4 Command Forms

⋆ \citenum

\citenum is the counter that holds the current largest citation number used. This number is equal to or larger than that set by \initcitetag{<integer>}.

⋆ \cite{<citation tag>}

This command places the citation number, corresponding to the <citation tag> in the text, without any surrounding brackets or braces. If the <citation tag> has not been defined, or if it was defined for a previous citation list, the \citenum is increased by one, and a tag is created with that new value.

Multiple citations may be called in a single place by [\cite{<citetag1>}, \cite{<citetag2>}, ...]. However, there is no sorting capability so that the numbers may appear out of sequential order. The first \cite opens the citation tag file. {\silenttrue \cite{<citetag>}} will define and increment the citation counter but will not insert the citation value in the text.

⋆ \citeform{<citation tag>}{<TeX macro form>}

This is the form that must be used in the file \jobname.cfm file that actually contains the list of citations. The <citation tag> is the same on used in the text when the citation is called out. The <TeX macro form> is the TEX macro that will actually be inserted into the reference list. This must contain all the information needed to produce the final form of the citation. Since the actual citation number is being supplied by INRSTÊX, it is necessary to include the TEX command \citetagvalue in the place required in the text. For instance, if the \listitem command was being used as the basic form, and if the citation tag were [Knut84], then an appropriate \citeform for the TEXbook would be

\citeform{[Knut84]}{\listitem \citetagvalue D.E. Knuth,
        {\bf \TeX book}, {\it Addison Wesley Pub. Co.}, 1984}

⋆ \citetagvalue

This command contains, at the time of a \citeform execution, the number of that particular citation.

⋆ \closecitationtagfile

This closes the \jobname.ctg file, if it is open. Since the .ctg file is closed automatically whenever \makecitationlist is called, this command is seldom used.

⋆ \initcitetag{<integer>}

This command is written into the .ctg file when it is opened. It establishes the minimum value of \citenum for this list. The actual reference value is determined by subtracting this value from the <tagvalue>.

⋆ \inputciteformfiles
          [=] { \inputwithcheck{<first form file>}
                  ...
                \inputwithcheck{<last form  file>} }

This is a token list of files, each prefaced by \inputwithcheck, that contain the citations for a particular citation list. The command \inputwitcheck determines whether the file exists before trying to open it. The default is

\inputwithcheck{\jobname.cfm}.
⋆ \inputcitetagfiles
          [=] { \inputwithcheck{<first tag file>}
                  ...
                \inputwithcheck{<last tag file>} }

This is a token list of files, each prefaced by \inputwithcheck, that contain the citation tags for a particular citation list. The command \inputwitcheck determines whether the file exists before trying to open it. The default is

\inputwithcheck{\jobname.ctg}. The \jobname.ctg file contains the tags

for the citation list. These tags are in order of call out and numbered sequentially. It also includes the \initcitetag command.

⋆ \lastcitetag{<integer>}

This command is written into the .ctg file when it is closed either by

a \closecitationtagfile or a \makecitationlist. It is used to reset

\citenum when using successive independent citation lists.

⋆ \makecitationlist

This command reads in the \jobname.cfm file. It then reads the \jobname.ctg file and converts the list of citation tags into a correctly ordered list of citations. The citation forms in the \jobname.cfm file may be in any order and may include ones that are not used. Any formatting control commands such as

\beginlist ... \endlist must be placed around it.
⋆ \makelongcitationlist

This command reads in the \jobname.cfm file and assigns citation numbers to the citation forms in the order that they appear. Errors from those indicated by the \citetagvalue are reported. The citation forms in the \jobname.cfm file must be in the same order as called out in the document and include only those that are actually used. Any formatting control commands such as \beginlist ... \endlist must be placed around it.

List of Figures

This is given by

\centerline{\sheadfont List of Figures}
\bigskip
\makefiglist

Chapter 25

TABLES

of CONTENTS

and FIGURES

INRSTÊX is able to generate tables of contents, figures, and tables automatically. It also has general capabilities to create files that can be used to generate other lists that involve page numbers.

25.1 Command List

⋆ \chtoc
⋆ \chtocout
⋆ \dssshtoc
⋆ \dssshtocout
⋆ \figtoc
⋆ \figtocout
⋆ \inputfigfiles
⋆ \inputtblfiles
⋆ \inputtocfiles
⋆ \intdssshtoc

                      ⋆ \intssshtoc
                      ⋆ \makefiglist
                      ⋆ \maketbllist
                      ⋆ \maketoclist
                      ⋆ \newtocfile
                      ⋆ \openlistfile
                      ⋆ \prtoc
                      ⋆ \prtocout
                      ⋆ \shtoc
                      ⋆ \shtocout

                                             ⋆ \sshtoc
                                             ⋆ \ssshtoc
                                             ⋆ \ssshtocout
                                             ⋆ \tbltoc
                                             ⋆ \tbltocout
                                             ⋆ \tocbox
                                             ⋆ \tocfill
                                             ⋆ \writelistfile

25.2 Making Lists of Contents, Figures, Tables

The distinguishing feature of list files in INRSTÊX is that they contain a combination of commands, section or figure numbers, and page numbers. INRSTÊX creates these files by the command \openlistfile{<file

extension>} and gives them the name \jobname.<file extension>. This

command effectively initializes the building process for the particular list. <file extension> must be one to three characters. The file extensions for tables of contents, figures, and tables are .toc, .fig, and .tbl.

The command \writelistfile is used to actually put information into the file and the \make<file extension>list is used to bring it back in. Cur-

rently \maketoclist, \makefiglist, and \maketbllist are defined.

These files will contain a list of commands, in the correct order for eventually making the actual list. A typical command, in this case generated by the \chead at the beginning of the chapter would be

\chtoc{<chapter number>}{<chapter title>}{<page number>}

Actually the \chead command does this in two steps. The actual form executed inside the \chead is the command \chtocout. This is defaulted in

inrsdef.tex to be \def\chtocout{\string\chtoc}. A modification of the

definition of \chtocout will change the initial command string that is written to the .toc file. Theoretically, a different string could be written for each chapter if required. This same facility exists for all the .toc output forms.

INRSTÊX has already defined all of the \<type>toc commands listed in Section 25.1. However, all of these commands may be redefined for different formats. For instance INRSTÊX has defined \dssstoc and \ssstoc to be effectively null. This means that subsubsections and diminished subsections will not be automatically listed in the table of contents although the \ssstoc and \dssstoc commands are in the .toc file.

If a .toc file is open, whether or not autonumbering is on, the \chead,

\shead, \sshead, \ssshead, \dssshead, and \preludehead commands write

to the .toc file. The \figure command writes a \figtoc command to the .fig file and the \table command writes a \tbltoc command to the .tbl file.

Creating, writing, and inputting a new list file is not terribly difficult but uses moderately advanced macro techniques. Most of the recipe is given in the description of \writelistfile below. The rest can be determined by

examination of \makefiglist and \inputfigfiles.

25.3 Command Forms

⋆ \chtoc{<number>}{<title>}{<page number>}

This creates a chapter entry in the table of contents as given in the table of contents for this book.

⋆ \chtocout

Its default definition is \def\chtocout{\string\chtoc} and is the command executed in a \chead while producing a .toc entry.

⋆ \dssshtoc{<number>}{<title>}{<page number>}

This would create table of contents entry for a diminished section heading. Although \dssshtoc commands are written to the \jobname.toc file, they are defined as null in INRSTÊX. If you want them to appear in a table of contents place the command \let\dssshtoc = \intdssshtoc in the file just before the

\maketoclist is called. \intdssshtoc is \dssshtoc in disguise.
⋆ \dssshtocout
Its default definition is \def\dssshtocout{\string\dssshtoc} and is the

command executed in a \dssshead while producing a .toc entry.

⋆ \figtoc{<number>}{<title>}{<page number>}

This would create table of figures entry for a figure. INRSTÊX makes it identical

to \shtoc
⋆ \figtocout

Its default definition is \def\figtocout{\string\figtoc} and is the command executed in a \figureform or \figureinsert while producing a .toc entry.

⋆ \inputfigfiles

This is a token list, including the \inputwithcheck of the files that are used to make the figure list. INRSTÊX default is \inputwithcheck{\jobname.fig}. \the\inputfigfiles will actually cause the token list to be executed, ie in the default case the \jobname.fig will be read in.

⋆ \inputtblfiles

This is a token list, including the \inputwithcheck of the files that are used to make the table list. INRSTÊX default is \inputwithcheck{\jobname.tbl}. \the\inputtblfiles will actually cause the token list to be executed, ie in the default case the \jobname.tbl will be read in.

⋆ \inputtocfiles

This is a token list, including the \inputwithcheck of the files that are used to make the figure list. INRSTÊX default is \inputwithcheck{\newtocfile}. If a \jobname.toc file is open, \newtocfile becomes the previous version. If it is not, it is the most recent version.

⋆ \makefiglist

This executes \the\inputfigfiles which inserts the list of \figtoc commands into the text. All required \beginlist ... \endlist commands should be put around it.

⋆ \maketbllist

This executes \the\inputtblfiles which inserts the list of \tbltoc commands into the text. All required \beginlist ... \endlist commands should be put around it.

⋆ \maketoclist

This inserts the list of \<type>toc commands into the text by executing

\the\inputtocfiles. All required \beginlist ... \endlist commands

should be put around it.

⋆ \newtocfile

If a \jobname.toc file is open, \newtocfile becomes the previous version. If it is not, it is the most recent version. This allows for the table of contents to contain a reference to itself.

⋆ \prtoc{<title>}{<page number>}

This is the command form written into the .toc file by \preludeheader. The output format may be seen by looking at the Preface listing in the Table of Contents for this book.

⋆ \prtocout

Its default definition is \def\prtocout{\string\prtoc} and is the command executed in a \preludehead while producing a .toc entry.

⋆ \shtoc{<number>}{<title>}{<page number>}
⋆ \sshtoc{<number>}{<title>}{<page number>}
⋆ \ssshtoc{<number>}{<title>}{<page number>}

These three commands are written by the \shead, \sshead and \ssshead to the \jobname.toc file. Examples of the default INRSTÊX format for \shtoc may be seen in the Table of Contents. Although \ssshtoc commands are written to the \jobname.toc file, they are defined as null in INRSTÊX. If you want them to appear in a table of contents place the command \let\ssshtoc

= \intssshtoc in the file just before the \maketoclist is called. \intssshtoc

is \ssshtoc in disguise.

⋆ \shtocout
⋆ \sshtocout
⋆ \ssshtocout

These three commands are executed by the \shead, \sshead and \ssshead when writing to the \jobname.toc file. The defaults are defined in inrsdef.tex as

\def\shtocout{\string\shtoc}
\def\sshtocout{\string\sshtoc}
\def\ssshtocout{\string\ssshtoc}

⋆ \tbltoc<number>}{<title>}{<page number>}

This would create table of figures entry for a figure. INRSTÊX makes it identical

to \shtoc
⋆ \tbltocout

Its default definition is \def\tbltocout{\string\tbltoc} and is the command executed in a \tableinsert or \tableform while producing a .toc entry.

⋆ \tocbox{<indent>}{<number>}{<title>}{<pagenumber>}

This is the general form for producing an entry for a table of contents list. <indent> is a dimension and is the indentation from the left margin; <number> is the number form; <title> is the title of the item; and <pagenumber> is where it occurred. There is no interitem spacing as part of the definition. Thus

3.7.9 This is an incredibly long title to show you what happens when there is more than one line . . . . . . . . . . . . . 375

was produced by

\tocbox{4em}{3.7.9}{This is an incredibly long title to show you
        what happens when there is more than one line}{375}

⋆ \tocfill

This creates the dots across the page in the \..toc macros. It is useful for designing stylistically consistent new ones.

⋆ \writelistfile{<file extension}{\string\..toc}{<number>}{<arg>}

This is the basic command for writing to a list file. The \string allows the \..toc to be written into the file without ever being executed. {<number>} is expanded before it is written out while {<arg>} is not. \writelistfile adds one more argument, namely {<page number>}, to this command before actually writing it to the file. The complete command written is

\..toc{<number>}{<arg>}{<page number>}

An example for the first chapter of this book is

\chtoc {Chapter 1}{\tex \cr and\cr INRS\tex }{1}

Note that \tex is not expanded. An examination of any of the list files created by INRSTÊX will show some more examples. This command should be used whenever a write to a list file is required. It is used by INRSTÊX in all of the section and chapter heads, along with \figure and \table.

Chapter 26 HEADERS

FOOTERS

and PAGE NUMBERS

INRSTÊX supplies a large number of facilities for controlling the style of such things as headers, footers, and page numbering. This chapter discusses those facilities. Multicolumn formatting is discussed separately (see Chapter 21). Of special importance is the command \documentstyle{<page styles>}. This command sets the default values for the entire document. Thus

\documentstyle{\twelvepoint
               \normalheaderstyle
               \normalfooterstyle
               \vheadersize=1.5cm
               \vfootersize=2cm}

would set the entire document in \twelvepoint fonts, set the default header and footer styles to “normal”, and set the header and footer vertical sizes. \documentstyle does a \setpagesizes to ensure that the page sizes have been computed.

26.1 COMMAND LIST

⋆ \blankheaderstyle
⋆ \blankfooterstyle
⋆ \documentstyle
⋄ \folio
⋆ \footerfont
⋆ \footertext
⋆ \fullpagestyle
⋆ \headerfont
⋆ \headertext
⋆ \noheaderstyle
⋆ \nofooterstyle
⋆ \nopagenumberadvance

                                 ⋆ \normalpagestyle
                                 ⋆ \normalheaderstyle
                                 ⋆ \normalfooterstyle
                                 ⋆ \pagenumber
                                 ⋆ \romanpagenumber
                                 ⋆ \specialfootertext
                                 ⋆ \specialheadertext
                                 ⋆ \specialpagestyle
                                 ⋆ \titlepagestyle
                                 ⋆ \vheadersize
                                 ⋆ \vfootersize

26.2 Page Numbers

    Page numbers are assigned by \pagenumber [=] <new page number>

where <new page number> is an integer. Similarly roman numerals are as-

signed by \romanpagenumber [=] <new page number> again where <new page

number> is an integer. To print the current page number use \folio. This will give a lowercase roman or an ordinary integer. To obtain uppercase roman use \uppercase{\folio} where the number is expected to be roman. Roman numbers are actually held inside TEX as negative numbers and print out negative as well when the file is being processed.

Normally the page number advances at the end of each page. However, it is possible to prevent it from advancing for one page only, at a time, by

inserting \nopagenumberadvance into the file.
⋄ \folio

This prints out the current page number in either arabic or lower case roman as the case may be. \uppercase\folio produces an uppercase roman page number, or an integer, if the page number is not roman.

⋆ \nopagenumberadvance

This command in the file means that the page number will not advance for this page. It lasts for only one page.

⋆ \pagenumber [=] <new page number>

This assigns the pagenumber to be the integer value of <new page number>.

⋆ \romanpagenumber [=] <new page number>

This sets the pagenumber to be roman style with the integer value of <new

page number>.

26.3 Header and Footer Styles

Headers and footers appear at the top and bottom of a page respectively. In general they carry information such as page number, section number, or even report and paper type. In this book the footer does not exist and the header carries the chapter name and page number on even pages and the current section and page on odd pages. Three styles of header and footer are supported, blank, normal or special (with text), and none. Headers and footers are boxes with width \houterpagesize and height determined by the setting of \vheadersize = <dimen> and \vfootersize = <dimen> respectively. Blank headers/footers exist but have nothing printed in them. Normal (special) headers/footers have the normal (special) header/footer text printed, and no headers/footers have the space that is normally taken up by the header/footer box returned to the main page. The three headers styles are called by \blankheaderstyle, \normalheaderstyle, and \noheaderstyle. Similarly for footers. However, all of these styles last for one page only unless included as an argument to \documentstyle whereupon they become the default values of the document.

Finally several styles have been gathered together. \titlepagestyle h blanks out the header and footer, while \fullpagestyle which deletes both headers and footers. \normalpagestyle prints the text defined by

\headertext and \footertext while \specialpagestyle prints out the text
defined by \specialheadertext and \specialfootertext. All of these styles

last for one page only, whereupon the system reverts to the document style.

⋆ \blankheaderstyle  \blankfooterstyle

Does not allow the header/footer text to be printed and lasts for one page only.

⋆ \documentstyle{<list of style types>}

Sets the default or document style types to those in <list of style types>. The default style types may be changed as often as desired in any given document.

⋆ \fullpagestyle

This is equivalent to both \noheaderstyle and \nofooterstyle. It lasts one page only.

⋆ \noheaderstyle  \nofooterstyle

This effectively returns the space occupied by the header/footer to the inner page. Either one lasts for one page only.

⋆ \normalheaderstyle \normalfooterstyle

The normal header/footer text prints in the box assigned to it.

⋆ \normalpagestyle
This is equivalent to both \normalheaderstyle and \normalfooterstyle. It

lasts for one page only.

⋆ \specialheaderstyle \specialfooterstyle

The special header/footer text prints in the header/footer box on that particular page only.

⋆ \specialpagestyle
This is equivalent to both \specialheaderstyle and \specialfooterstyle.

It lasts for one page only.

⋆ \titlepagestyle
This is equivalent to \blankheaderstyle and \blankfooterstyle. It last

only one page.

26.4 Header and Footer Text/Sizes

The header and footer text should be thought of a token string that is being put into a box of the appropriate size and shape. Any logic to test pages for placing information in different ways on, say even or odd pages should be included in this text.

⋆ \headertext [=] {<token list>}
⋆ \footertext [=] {<token list>}
⋆ \specialheadertext [=] {<token list>}
⋆ \specialfootertext [=] {<token list>}

This is the text that creates the formats for the headers and footers in the various styles. The TEX commands that do the formatting are the <token list>. The defaults are no header and a footer with a centered page number for the <<PAPER STYLE>>, the ones in this book for the <<BOOK STYLE>>. Others will be indicated when those styles are discussed. The \special...text forms are used whenever a \special...style is in force.

⋆ \vheadersize [=] <dimen>
⋆ \vfooterersize [=] <dimen>

These commands set the size of the headers and footers respectively. In order to ensure that the correct innerpagesize results after a header or footer size change, they should be followed with a \setpagesizes. They should be made large enough to include all the \headertext or \footertext, and some additional white space.

It is when I am

struggling to be brief that I become unintelligible.

Ars Poetica, Horace (65-8 BC)

Chapter 27 PAGES:

SIZES

MAGNIFICATION

INRSTÊX has a number of page size parameters that are set to make the output possible on different devices, and to facilitate special formats. All page size parameter changes are made in assignment fashion with an optional [=] sign. All page size changes must be made inside a \documentstyle list in order to insure that they take effect. Figure 27.1 diagrams the various dimensions.

27.1 Command List

⋆ \documentstyle
⋆ \houterpagesize
⋆ \hpapersize
⋆ \leftmarginsize

                     ⋆ \leftmarginskip
                     • \mag
                     ⋄ \magstep
                     ⋆ \topmarginsize

                                            ⋆ \topmarginskip
                                            ⋆ \vouterpagesize
                                            ⋆ \vpapersize

27.2 Page Size Setting and Margins

These commands define and set the various page sizes. Only the outer and header, and paper commands should be changed. INRSTÊX also has some inner and column sizes. These are computed and should not be modified – although they are accessible. See Section 27.4, page 171 for details. All •

     \topmarginsize

•

  \vheadersize
\firstcolumnoffset

                     \firstcolumnoffset

•

\leftmarginsize

•

\houterpagesize

•

 \hinnerpagesize
  (computed)

•

  \vfootersize

•

  \vouterpagesize

•

                      \vinnerpagesize
                       (computed)

•

              \hpapersize

•

                                  \vpapersize

Fig. 27.1 Diagram of the various page dimensions. The actual printing area is determined by the computed dimensions \hinnerpagesize and

\vinnerpagesize. The outer dimensions are

normally specified. The \firstcolumnoffset is normally 0pt. dimension changes must be made inside a \documentstyle command or they will not necessarily take effect.

This section details the various parameters used to name and describe the parts of the printed page that can be varied. The general convention is that \h<name> names a horizontal dimension and \v<name> names the corresponding vertical dimension. The various <name>s are

outerpagesize this is the extent of the area allowed for printing. It includes all headers, footers,

footnotes . . . \vouterpagesize and

\houterpagesize are the vertical and horizontal forms

papersize …. this is the “physical” size of the paper and includes all the outerpagesizes plus margins. The actual vertical extent of the paper is \vpapersize and the actual width of the paper is is the size of \hpapersize. The default values are correct for 11in by 8.5in paper but must be increased for 14in by 8.5in (Legal size) paper.

\vsize . . . . . . . . the actual verticalsize of the present page. This is set at the time when the first material is submitted for putting on the page. In INRSTÊX it is usually the \vcolumnsize. It should be changed only with knowledge.

\hsize . . . . . . . . the actual horizontal size of the present box in which TEX is working. This may be a page or some box that is to be eventually placed on the page. This is set at the time when first material is submitted for putting on the page. In INRSTÊX \hsize is usually the

\hcolumnsize. . . . . . . . . . . . . . . .

Assignments are made in the normal way. The general form is \<dimen name> [=] <dimen> where <dimen> is a dimension. Thus the papersize, margins, and outer page sizes are set in INRSTÊX by

\documentstyle{\vpapersize = 11in
               \hpapersize = 8.5in
               \vouterpagesize=9in
               \houterpagesize=6.5in
               \leftmarginsize=1.25in
               \topmarginsize=1in}

These values are actually set for the paper style in papersty.tex.

27.3 Magnification

TEX is able to magnify an entire document through its \magnification parameter. The form is

• \mag [=] <1000 times scale factor>

The document is magnified by the <scale factor>, times any texprint magnification. It can appear only once and should appear at the beginning of the document. It should be used with extreme caution. The results may be too big for the output device. The plain form \magnification has been defined to be the same as \mag. The reason is that \magnification in plain also sets page sizes which is inappropriate here. TEXGraph will scale correctly when using \mag.

• \magstep<integer>

This is a valid magnification scaling for the \magnification command. The actual magnification is 1.2^{⟨integer⟩}. Thus <integer>=3 implies a magnification of 1.728.

In fact there are two points at which magnification can occur. The first is in the TEX document and the second is when it is printed. All that is important is the final magnification. A magnified document may be printed only if all the fonts are available at the magnifications requested. In general, magnification should be controlled by INRSTÊX so that TEXGraph will operate correctly.

27.4 Internal and Computed Sizes

INRSTÊX is actually in multicolumn mode at all times. The default though is just one column. In order to live in this world INRSTÊX understands inner and column sizes. The column sizes are the actual sizes that are used to for the text. The inner horizontal size is the sum of the column widths and the intercolumn spacing. To this is added a \leftcolumnoffset (twice) to obtain

the \houterpagesize. Normally the \leftcolumnoffset is zero. The effect

of a left column offset is to inset the pages with respect to the header/footer boxes whose width is the \houterpagesize. Thus

columnsize … this is the actual size of the column where the text is printed. Footnotes are inside the column. In single column format columnsize and innerpagesize are

                   the same (\vcolumnsize,
                   \hcolumnsize)

innerpagesize this is the size of the page left after the headers and footers have been removed

                   (\vinnerpagesize, \hinnerpagesize)

Divide et Impera

Ancient Roman political maxim

For example, when the

author prepared this manual, he did one chapter

at a time,

The TEXbook, Donald E. Knuth

Chapter 28 TEXING

PARTS

of DOCUMENTS

INRSTÊX allows for parts of documents,^{†} either complete sections or chapters to be processed individually for initial checking before TEXing the entier document. The individual files can be used without change in the final processing. In fact it is possible to TEX sections, combine them into a chapter, and then combine the chapters into a final document. With care, even parts of separate documents could be combined.

The system works best with the automatic numbering and creation features of INRSTÊX but these are not required. With care and a little luck, it is possible to re TEX a section of the “final” version without redoing the complete document.

It is also possible to increase to automatically save the status of a subdocument. This feature is not an integral part of INRSTÊX but an example used for this book is given in Section 28.3.

28.1 Command List

⋆ \inputsubdocument  ⋆ \following  ⋆ \subdocumentmacros

† INRSTÊX calls these subdocuments.

Draft Version:  1991/9/5

28.2 Subdocument Forms

The form required for creating a subdocument and TEXing it is quite simple. It should be of this form:

\subdocumentmacros{<macro list>}
<text>
\done

The <macro list> contains the information needed to TEX this part of the document by itself. Only one \subdocumentmacros command is allowed in a subdocument. This <macro list> is executed when the subdocument is processed by itself and completely ignored when it is processed as part of a larger document. A typical <macro list> for a chapter of this book was

\input helphdr
\following\chnum = 28
\pagenumber = 88

This list contained all the special macros for the book in the file helphdr.tex. Since the TEXing was being done on a chapter basis, the \following\chnum sets the next chapter number, and the \pagenumber set the pagenumber. If this were the third section in a chapter, then \following\shnum = 3, might be also included. If any special numbers ought to be set, they should be also inserted.

It should be emphasized that these numbers affect the subdocument when it is being processed by itself only. The normal INRSTÊX autonumbering will override them when it is being inserted as a subdocument. To insert a subdocument in another, use

\inputsubdocument{<filename>}

The \done in the subdocument will not terminate the processing. However, a

\bye or \end will.

28.3 Automatic Saving of Status of a Subdocument

The commands given below were intended to save the status of each chapter. It was assumed that a chapter had a <tag> and that the status was saved in a command that had the same name as that tag. The commands are stored in a file called status.tex. At the top of each subdocument the following two commands are inserted:

Automatic Saving of Status of a Subdocument 175

\ifundefined{writestatus} \input status \relax \fi %
\chcode{subdoc} % subdoc is the <tag> for this chapter

The first line essentially checks to see if the status definitions have been inputted. If they have not, they are brought in. The status.tex defines \chcode{<tag>} so it must be input before \chcode is called. The actual status definitions follow. They are probably only understandable to TEX writers and should be skipped by novices.

% Status commands for each chapter.
% these write out the chapter code, page number, and previous chapter number.
\newwrite\docstatus % gets new output file
\def\openstatusfile{\immediate\openout\docstatus=\jobname.sta}
           % this is called in the outer master program
\def\closestatusfile{\closeout\docstatus}
\def\writestatus#1{\immediate\write
          \docstatus{\string\chstatus//#1//\the\chnum//\the\pageno//}}
            % this writes out the actual string when the page is output
\def\chstatus//#1//#2//#3//{\expandafter\def\csname#1:\endcsname{\chnum=#2
                             \pagenumber=#3}}
            % this creates a command with the name #1 and sets values for
            % the chapter number and page number ... the only status of
            % interest here.
\def\getstatus#1{\csname#1:\endcsname}
            % executes the status with name #1
\def\chcode#1{\subdocumentmacros{\input helphdr \bookstyle % macros/style
                                    \input masth.sta % status file name
                                    \autonumberingon % opens local tag file
                                    \input masth.tag % master tag file
                                    \getstatus{#1}
                                    \def\writestatus##1{}%disables writestatus
                                      }
              \writestatus{#1}} % will write status unless disabled

Note that this imbeds a \subdocumentmacros inside the \chcode. The status is written unless \subdocumentmacros is actually executed.

28.4 Command Forms

⋆ \inputsubdocument{<file name>}

This command inserts the subdocument into the present part of the document. It encloses the subdocument in a group so that any changes to variables or commands made in that subdocument, unless they are specifically \global, will not affect the rest of the document. It disables the effect of \done, but not \bye or \end. It ignores everything that is inside the \subdocumentmacros command.

⋆ \following\...hnum

The \chead and various \s..head commands increment their respective number upon entering the command. The \following command automatically compensates for this. So \following\chnum = 4 before the \chead, means that the chapter beginning with the next \chead will be 4 and not 5. The same command also works for \shnum, \sshnum and \ssshnum.

⋆ \subdocumentmacros{<macros for subdocument>}

This is the means of introducing information to the subdocument that is needed to reasonably process the subdocument, but that might create disaster, or TEX overload if read in more than once. A single subdocument may have only one \subdocumentmacros command. Typical information included in this macro would be section numbers, chapter numbers, tag files, or citation files. No \outer command is allowed.

Chapter 29  DOCUMENT STYLES

INRSTÊX supplies a number of general and specialized document styles. It is also easy to create others within the basic structure given. The two basic styles supported by INRSTÊX is the (default) \paperstyle and the \bookstyle of which this is an example. Different styles are usually distinguished by different header/footer conventions, appendix placement and numbering, and perhaps default fonts.

In addition to the page changes, a few special commands exist that are introduced in the various styles. Since the \paperstyle the INRSTÊX default, all the \title, and abstract commands defined for that are available, and will work, for all styles.

29.1 Paperstyle

\paperstyle is the default style for INRSTÊXṪhere will be no messages indicating that you are using this style. This style is designed for 8.5in by 11in paper, \tenpoint fonts, no header, and a footer that consists of the page number centered at the bottom in this style “- 6 -”, where 6 would have been the page number. In addition to the normal features mentioned previously, there

is a \title command and a \beginabstract...\endabstract pair.

The description of the commands are:

⋆ \beginabstract...\endabstract

This command should enclose the entire abstract. The abstract font is the \smaller font and both sides are indented. The text is automatically prefaced by “Abstract:” in English and “Sommaire:” in French.

⋆ \title{<first row>\cr ... <last row>}

If the total length of the title is more than one line it is automatically broken into multiple lines with each line centered. However, if \cr are included as part of the title text, the lines will be broken there and centered. The title font,

called \titlefont is \bigfont.

29.2 INRS Report Style

This style is very similar to the basic \paperstyle. The only addition is a set of commands that create a cover. This style is called with either \formatinrs or \inrsreportstyle. The title, report date, author list, and report number are token lists. The actual cover is made with the command \faitepagetitre. An example of complete cover page is

\formatinrs
\titrederapport = {INRS\TeX REFERENCE BOOK}
\numeroderapport = {84-19}
\datederapport = {juin 1984}
\auteursderapport = {Michael J. Ferguson}
\faitepagetitre
\ejectpage
\done

Chapter 30  TEXGraph

The graphics package that is a part of INRSTÊX adds the following capabilities

• The production of a complete paper/report requiring no additional insertions (except perhaps colour photographs if required).

• The ability to insert a file, for example a plot or halftone, in Encapsulated PostScript Format (EPSF), and to automatically leave enough space in the text.

• The mixing of a vector graphics and TEX text. In fact TEX text may now be printed at any arbitrary angle.

The package requires a sensible PostScript driver. The basic requirements for the driver are as follows:

• The \special commands and the other information in the .dvi file are processed in the order they are found in the .dvi file. This is necessary in order to be able to rotate tables and arbitrary text … among other things.

• The driver does not perform PostScript save and restore commands around \special commands.

• The driver uses the code ps: is used to signal a file name and the code ps:: to signal inline code.

• The driver sets the currentpoint before entering a \special.

30.1 Command List - TEXGraph

⋆ \absoluteposition
⋆ \absolutescale
⋆ \arcc
⋆ \arcn
⋆ \arrowheadscale
⋆ \arrowheadsize
⋆ \arrowheadtype
⋆ \avec
⋆ \beginsegment
⋆ \beginTeXgraph \btg
⋆ \cavec
⋆ \cav
⋆ \centergraph
⋆ \centerplotfile
⋆ \clvec
⋆ \clv
⋆ \endsegment
⋆ \endTeXgraph \etg
⋆ \graphdim
⋆ \hgraphsize
⋆ \hgraphskip
⋆ \hpix

                                 ⋆ \htext
                                 ⋆ \includefile
                                 ⋆ \incscfile
                                 ⋆ \incscmvfile
                                 ⋆ \larc
                                 ⋆ \lcir
                                 ⋆ \linecap
                                 ⋆ \linejoin
                                 ⋆ \lpatt
                                 ⋆ \lvec
                                 ⋆ \move
                                 ⋆ \penwidth
                                 ⋆ \relativeposition
                                 ⋆ \relativescale
                                 ⋆ \rstext
                                 ⋆ \rtext
                                 ⋆ \segmentscale
                                 ⋆ \unitscale
                                 ⋆ \vgraphsize
                                 ⋆ \vgraphskip
                                 ⋆ \vpix
                                 ⋆ \vtext

30.2 The Inclusion of Encapsulated PostScript

All the commands that are used to include encapsulated PostScript files read the Boundingbox and leave enough space in the text for the graphics. The Boundingbox may be at either the beginning or the end of the file. However, if the Boundingbox is at the the end, it might take TEX some time to read the entire file to find it.

The simplest command for including a graphics file is

                  \centerplotfile{< file name >}.

For instance the (old) IEEE Communications Society logo was brought in simply by saying

 \medskip

\hrule
\centerplotfile{ieeelogo.ps}
\hrule
\medskip

right here.

The \hrule commands were put in to show how much space was left by TEXGraph. A slightly more complicated example illustrating both rotation and scaling is given below.

The code for this is

\hrule
\centergraph{ \btg
              \incscfile f:{ieeelogo.ps} sc:.3 d:45
              \etg}
\hrule

Notice that the computation of the space to leave was incorrect. This is due to the difficulty in performing the computations for obtaining the bounding box for an arbitrarily rotated and scaled figure.

The most general inclusion command is \incscmvfile which allows for arbitrary scaling, rotation, and offset. Finally, the rotation, scaling, and placement may be applied around any of the nine text box reference points described in Section 30.4.

30.3 TEXGraph Basics

TEXGraph has a number of capabilities that range from primitive to powerful. The following list of classes is for reference only. More detail will follow with examples in the various sections to follow. This section may be omitted on first reading.

TEXGraph Classes

• Drawing primitives consist of commands for circles, circular arcs, line vectors, vectors with arrowheads, spline curves, spline curves with arrowheads, line dotting commands, and various shades of gray for fills.

• There are commands for changing whether the distances specified are to be interpreted absolutely, with respect to an origin or relatively with respect to the present position.

• There is a command to change the (pen)width of the drawn lines and to change the interpreted scale of the units of distance.

• There is a command to change the default units. However, since arbitrary scaling of units is allowed, this command is of limited use except for those that visualize distances in different dimensions. The dimensions available are those available in INRSTÊX.

• There is a “graphical segment” which can be placed at any specific location. Distances inside a graphical segment are interpreted with respect to the segment origin. The distances inside a segment may be either relative or absolute with respect to the segment origin. There is a segment scale which allows for segments to be scaled relatively with respect to an overall graph.

• Text, with all the capabilities of INRSTÊX may be written at any arbitrary angle.

• TEXGraph keeps track of the maximum extent of a graph. These are available after the graph is terminated in the variables \hgraphsize and

\vgraphsize. \hgraphskip and \vgraphskip will cause a horizontal

or vertical skip of the appropriate graphsize. Unfortunately, these values may be incorrect for a number of reasons. These are

∘ Text may stick out the edge of the graph.

∘ A circle or arc center is outside the main graph area.

∘ The visible part of a circle or arc may be too far to the right. ∘ A vertical segment may have inadvertently reset the maximum

positions. In some cases it may be necessary to make a fake move to the lower

right hand corner of a graph to tell TEXGraph the correct size … after you have seen a preliminary version and know what it should be.

• All of TEX’s definitional capabilities are available. These can be used to replace a complex structure by a single command or to change the surface syntax of TEXGraph.

• Explicit use of grouping in TEXGraph, through {}, or \begingroup, \endgroup pairs is not allowed. This will foul up the positional record keeping inside. Groups may be produced only through the use of seg-

ments, namely the \beginsegment, \endsegment pair.

30.4 Simple TEXGraphics

TEXGraph will allow for rather sophisticated graphics. You can use the definition capabilities of INRSTÊX to create libraries of symbols for future use.

Directions in TEXGraph are described as horizontal, h:, increasing from left to right across the page and vertical, v:, increaseing from top to bottom down the page. Thus the fundamental directions are

Horizontal – h:<number>

Vertical – v:<number>

TEXGraph capabilities will be introduced slowly. The following diamond box

∑_{i=1}^{n} ρ_{n}

was put in place with

$$  % a convenient way to use displaymath spacing
\centergraph{
   \beginTeXgraphics % also known as \btg
      \move h:0 v:.5  % moves penup to (0,.5)
      \lvec h:.5 v:0  % draws a line to (.5,0)
      \lvec h:1 v:.5
      \lvec h:.5 v:.1
      \lvec h:0 v:.5
      \textref h:C v:C  % sets the reference point in the center.
      \move h:.5 v:.5
      \htext {$\sum_{i=1}^n \rho_n$} % horizontal text box
    \endTeXgraphics  % also known as \etg
      }
$$

The command \centergraph{<...>} uses the information about plot size to center the graphics horizontally and to leave enough room vertically.

Arguments for all TEXGraph primitive commands are delimited by spaces. The units of the dimensions are implicit, but changable. The default is inches. Thus h:<number> is the distance in the horizontal (to right) and v:<number> is the distance in the vertical (down) direction. The locations are absolute distances with respect to an origin in the upper left hand corner.

30.5 Simple Vector Forms

This introduces some baisc drawing commands. There must be either a space or an end of line after each <coordinate>␣. The dimensional units are implicit. We usually use <..> instead of the less economical <coordinate>.

⋆ \move h:<..> v:<..>

This is a move from the current position to the coordinates given by h:<..> v:<..>. The pen is up. It may be used to move the current reference point or to describe a boundary when creating a filled polygon.

⋆ \lvec h:<..> v:<..>

This draws a line from the current position to h:<..> v:<..>.

⋆ \clvec h1:<..> v1:<..> h2:<..> v2:<..> h3:<..> v3:<..>

This draws a Bezier spline curve from the current point to h3:<..> v3:<..> with respect to the control points h1:<..> v1:<..> and h2:<..> v2:<..>. These curves are very versatile and can create many effects, including loops, by varying the control points.

⋆ \clv  (<h1> <v1>)  (<h2> <v2>)  (<h3> <v3>)

This command is identical to \clvec but with a less verbose syntax.

Lines may be either solid of various widths, or dotted with custom patterns. In addition the ends of the lines may be of different shapes and joined with different defaults. In most cases you will not have to change the defaults in TEXGraph but the capability is there.

⋆ \penwidth <size>

This sets the width of the pen or line in the current units. The default is is .015 (in).

⋆ \linecap <integer>

This sets the end shapes of the lines using PostScript notation. The default is 1 or a round cap. A value of 0 is a butt cap with the line cut off square exactly to its length. A value of 2 is a square cap with the line extended by a square cap the thikness of half its width. For narrow lines the difference is negligible.

⋆ \linejoin <integer>

This sets the form in which lines join (PostScript notation). The default is 1 which corresponds to a round line join. A value of 0 is a mitre or pointed join while a value of 2 is a beveled or flattened join. For thin lines the differences are negligible.

⋆ \lpatt p:<pattern>

This sets the dotting pattern of the line in PostScript notation. The default is a solid line described by {[]}. The simplest form is {[a]} where the line is black for a pixels and white for 1. {[a b]} would mean a pixels black followed by b pixels white. A specification of [a1 b1 a2 b2] would be a cyclic pattern with the line black for the a? pixels and white for the corresponding b?.

TEXGraph alos supplies lines with arrowheads. These may be combined dotting patterns given above but a decision will have to be made as to whether you want the arrowhead itself dotted. There are three styles of arrowheads

triangle T, open O, and filled F. The size may also be varied.

There are no restriction on the direction of the arrows. The commands are

⋆ \avec h:<..> v:<..>

This draws a vector with an arrow head from the current position to h:<..>

v:<..>.
⋆ \cavec h1:<..> v1:<..> h2:<..> v2:<..> h3:<..> v3:<..>
⋆ \cav (<h1> <v1>) (<h2> <v2>) (<h3> <v3>)

These are the spline versions of the vectors with arrowheads.

⋆ \arrowheadtype t:<type>

The <type> is T O F for triangle, open, or filled respectively.

⋆ \arrowheadsize l:<length> w:<width>

The <length> and <width> are in the current units. The default is 0.16in by 0.04in. This size is independent of the current scales. This prevents arrowheads from disappearing as a graph is scaled.

⋆ \arrowheadscale This makes the arrowheadsize sensitive to the segment and unit scales in force when it is called. It is not global but is affected by the grouping imposed by \beginsegment and \endsegment pairs.

For most applications, the \arrowheadsize and the \arrowheadscale will not be needed.

The following example of a (partial) block diagram uses these commands.

This was produced by the following:

\centergraph{\btg
         \move h:0 v:.3
         \avec h:.5 v:.3 % arrow vector leading into box
         \move h:.5 v:.6 % moves to lower lefthand corner of box
         \lvec h:.5 v:0  % four sides
         \lvec h:1.5 v:0

         \lvec h:1.5 v:.6
         \lvec h:.5 v:.6
           \etg}

We can change the type of arrowhead on this and all subsequent arrow vectors by adding adding \arrowheadtype t:O before the \avec ... to give

This was produced by

\centergraph{\btg
         \move h:0 v:.3
         \arrowheadtype t:F % changes default filled
         \avec h:.5 v:.3 % arrow vector leading into box
         \move h:.5 v:.6 % moves to lower lefthand corner of box
         \lvec h:.5 v:0  % four sides
         \lvec h:1.5 v:0
         \lvec h:1.5 v:.6
         \lvec h:.5 v:.6
           \etg}

⋆ \unitscale <scale>

This command causes all subsequent units in this or enclosed segments to be scaled by the <scale>. Thus \unitscale 2.54 would have the effect of changing a figure where the units were originally in inches to be in centimetres.

Thus the entire graph is reduced to half size by adding \unitscale .5␣ at the very beginning.

Note that the arrowhead has not changed in size. The commands to do this are

\centergraph{\btg
         \unitscale .5  % causes all subsequent units to be multiplied
                          % by .5
         \move h:0 v:.3
         \arrowheadtype t:F % changes default filled
         \avec h:.5 v:.3 % arrow vector leading into box

188 CHAPTER 30: TEXGraph

\move h:.5 v:.6 % moves to lower lefthand corner of box
\lvec h:.5 v:0  % four sides
\lvec h:1.5 v:0
\lvec h:1.5 v:.6
\lvec h:.5 v:.6
  \etg}

If the arrowhead size needed to be reduced in the same scale it is necessary to add \arrowheadscale after the \unitscale and before the first arrowvector. Thus we get

This is produced by

\centergraph{\btg
\unitscale .5  % causes all subsequent units to be multiplied
                 % by .5
\move h:0 v:.3
\arrowheadscale % makes arrowhead size sensitive to scalings.
\arrowheadtype t:F % changes default filled
\avec h:.5 v:.3 % arrow vector leading into box
\move h:.5 v:.6 % moves to lower lefthand corner of box
\lvec h:.5 v:0  % four sides
\lvec h:1.5 v:0
\lvec h:1.5 v:.6
\lvec h:.5 v:.6
  \etg}

Finally we have an example with dotted Bezier splines.

which was given by

\centergraph{ \btg \lpatt p:{[20 30 20]}
                   \lvec h:0 v:2
                   \move h:0 v:0
                   \lpatt p:{[20 20 10 10]}
                  \cav (1 1) (2 1) (3 0)
                   \lpatt p:{[20 20]}
                  \move h:4 v:1
                  \cav (0 2) (5 2) (1 1)
               \etg
            }

This is off center because the width computation includes the (5 2) control point of the Bezier curve.

30.5.1 Text in Graphs

All text within TEXGraph is actually typeset by TEX. Since TEX does this so beautifully, it seems counter productive to do it otherwise. The commands for including text at various angles are

⋆ \htext {<text>}

This puts the text in a horizontal \hbox running from left to right.

⋆ \vtext {<text>}

This puts the text in a vertical \hbox going upwards.

⋆ \rtext d:<degrees> t:{<text>}

This puts text in an \hbox with an arbitrary rotation of <degrees>.

⋆ \rstext d:<degrees> sc:<scale> t:{<text>}

This puts text in an \hbox with an arbitrary rotation of <degrees> and scale

<scale>.

Text is placed in an \hbox. This box is located at the point in the graph where the \?text command is called. In order to make the exact placement of the box in a graph easier, the box is actually oriented at any one of nine reference points. The command is

⋆ \textref h:<L C R> v:<T C B>

The choices of L C R are Left, Center, and Right respectively in the horizontal and vertical positions.

The nine choices are shown below:

h:L v:T h:L v:C h:L v:B  h:R v:T h:R v:C h:R v:B h:C v:T h:C v:C h:C v:B •  • • • • • • •  •

These reference points move with the box as it is rotated or scaled.

As an example we add the following ρ = ∑_{i=1}^{n} ρ_{i} to the center of the block diagram used previously to give

ρ = ∑_{i=1}^{n} ρ_{i}

The commands to do this are

\centergraph{\btg
         \move h:1.0 v:.3 % moves to center of box
         \textref h:C v:C % sets text reference to dead center
         \htext {$\rho=\sum_{i=1}^{n}\rho_i$} % puts in text
         \move h:0 v:.3
         \avec h:.5 v:.3 % arrow vector leading into box
         \move h:.5 v:.6 % moves to lower lefthand corner of box
         \lvec h:.5 v:0  % four sides
         \lvec h:1.5 v:0
         \lvec h:1.5 v:.6
         \lvec h:.5 v:.6
           \etg}

Arbitrary rotation of text or graphics \rtext. This example uses \rtext

d:45 t:<text> in place of the \htext.

ρ = ∑_{i=1}^{n} ρ_{i}

Note that the text spills out over the edges of the box. There is no guarantee that the text will fit in the box. In fact if we take the horizontal example and

add a \unitscale .7 \arrowheadscale the following results:

ρ = ∑_{i=1}^{n} ρ_{i}

Note that the font is not scaled. If we use \rstext d:0 sc:.8 t:<...> we get

ρ = ∑_{i=1}^{n} ρ_{i}

30.6 Rotated Graphics and Text

It is possible to place graphics or text at any arbitrary direction on a page. It is only necessary to include it in a \vtext for vertical or an \rtext for an arbitrary rotation. However, it should be remembered that the reference point is that position on the page where the \?text was entered and that the text/graphics goes at the appropriate angle. The following shows a simple table angled on the page. To do this correctly, requires that you discover the size of the table.

PROJECT — Squidget Forms

Milestone Due Projected
A  Aug. 94 Jan. 95
B  Dec. 94 Dec. 95
A  Jan. 95  ?

Draft Version: 1991/9/5

This was done with the following set of commands. Note that a \def was used to make the construction easier to follow. \lvec was used rather than \move in order to make the origin movements visible.

\def\sample{
   \btg
   \lvec h;1 v:0
   \incscfile f:ieeelogo.ps sc:.25  d:0
   \lvec h:0 v:.5
   \htext{\begintable
            \begintableformat
             &\center
            \endtableformat
            \-
            \br{\:|}\use{3} PROJECT --- Squidget Forms  \er{|}
            \-
            \br{\:|} Milestone | Due      |  Projected    \er{|}
            \-
            \br{\:|}    A       | Aug. 94 | Jan. 95        \er{|}
            \-
            \br{\:|}    B       | Dec. 94 | Dec. 95        \er{|}
            \-
            \br{\:|}    A       | Jan. 95 | ?              \er{|}
            \-
          \endtable}
       \etg}
\medskip
\centergraph{
    \btg \textref h:C v:C
       \lvec h:0 v:1 % sets origin
       \rtext d:45 t:{\sample}
       \lvec h:2 v:2 % sets size of graph ...
    \etg}
\medskip

In fact, this example was first done as a separate file to learn the appropriate dimensions and then inputted in the appropriate place.

30.6.1 Circles, Arcs and Fills

TEXGraph uses the circle, arc, and fill commands of PostScript to produce curves. PostScript uses a polygonal fill on the inside of the curve. This means that the direction of the arcs are important.

    The commands are⋆ \lcir r:<radius>

This is a circle with the center at the current loaction and a radius of size <radius> in the current dimensions.

⋆ \arcc r:<radius> sd:<degrees> ed:<degrees>

This is an “unstroked”arc, ie equivalent to a \move in the counter clockwise direction from sd:<..> to ed:<..>. If this is used in a fill, the center of the circle is the beginning of the path.

⋆ \arcn r:<radius> sd:<degrees> ed:<degrees>

This is the same as \arcc except that it is counter clockwise.

⋆ \pfill p:<fraction>

This completes a path a fills the path with a shade of gray with p:0 being black and p:1 being white.

The angles are in the directions shown here.

90^{∘} 180^{∘}  270^{∘}  0^{∘}, 360^{∘}

Some shades of gray are as follows:

0  .1  .2  .3  .4 .5  .6  .7  .8  .9

An example of a use of arcs and fill is given below.

This logo is given by

\centergraph{\btg
                \arcc r:2 sd:0 ed:45
                \pfill p:.5
                \arcc r:1 sd:0 ed:45
                \pfill p:1  % fills the inside with white
                \move h:2 v:1.5 % to leave enough space
              \etg}

This shows that a fill of “white” (1) is opaque and obliterates the black or gray underneath. Note the single line of dots from the origin. Apparently there is some roundoff. This strategy is necessary in PostScript filling.

30.7 Advanced TEXGraphics and Segments

The most important advanced feature of TEXGraph is the graphical segment. These are delimited by \beginsegment \endsegment pairs. They are used to create graphical items that can be placed at any specific location in a graph. This capability, combined with TEX’s ability to create definitions allows for the creation of libraries of symbols. Segments are the only groups that should be used within a \btg \etg pair.^{!} A simple example of the use of this facility was the definition of a \fillbox to create the box with the fill pattern shown in Section 30.6.1. The definition was

\def\fillbox #1 {\move h:.4 v:0
                    \beginsegment
                     \absoluteposition
                     \lvec h:.5 v:0

! This is almost true. Groups may be used freely within the argument of either an

\??text.

Draft Version: 1991/9/5

                     \lvec h:.5 v:.5
                     \lvec h:0 v:.5
                     \pfill p:{#1}
                     \move h:.25 v:.55 \textref h:C v:T \htext{#1}
                   \endsegment
                   \move h:.4 v:0 % for symmetry
                   }

The relative position in outside the segment allows the boxes to be placed beside each other with even spacing and no additional instructions.

Each segment has a segment reference point. This is the location in the enclosing segment or \btg \etg, which is really just a special segment. Absolute positions within a segment are actually relative to the segment reference point. Relative positions are relative. The three boxes below

.3  .5  .7

were produced by

\medskip
 \centergraph{\btg \relativeposition
                 \fillbox .3
                 \fillbox .5
                 \fillbox .7
                \etg}
\medskip

Note that the space after the #1 in the definition for \fillbox means that the numbers are delimited by implicit space at the end of the line. If this space had been left out, only the first digit in each of the pattern numbers would have been read and the other would have been printed at some odd place on the page.

30.7.1 Segment Scaling

There are several scaling parameters that can be used with segments. In addition to the \unitscale there is a \segmentscale. Roughly speaking the \segmentscale is used to change the scale of the present and all enclosed segments while the \unitscale is used to set the nominal size of segment object. The major difference between the two is that segment scales accumulate while unitscales do not. An example is obtained using the \fillbox in a segment. The following three boxes illustrate the effect.

.5  .7  .9

This example should be studied carefully. The actual commands that produced it are

\centergraph{\btg \unitscale .3 % changes units
                 \segmentscale 2
                              % doubles scale of all enclosed segments
                              % actual scale is .3*2=.6
                 \fillbox .5
                 \move h:.8 v:0  % moves to right beyond box
                 \beginsegment
                  \unitscale .5 % now unit scale is .5
                  \segmentscale .7
                              % reduces scale by .5 -- actual scale is
                              % .5*2*.7=.7
                  \fillbox .7
                  \move h:.8 v:0
                  \beginsegment
                   \unitscale 1
                   \segmentscale .8  % actual scale is 1*2*.7*.8=1.12
                   \fillbox .9
                  \endsegment
                    % actual scale is back to .5*2*.7=.7
                \endsegment
                    % actual scale is back to .3*2=.6
              \etg}

Note how the segment scale accumulates while the unitscale does not. Note also that the scale reverts to that of the enclosing segment after an \endsegment.

It is possible to prevent a segment from being affected by the external segment scales by inserting the command \absolutescale. This is used for symbols that you wish to have the same size no matter the actual scale of the graph.

30.7.2 Segment Command Summaries

The following is a list of some of the important points concerning segments:

⋆ \beginsegment

This begins a graphical segment and a group. All locations within a segment are relative to the origin of the segment.

⋆ \endsegment

This terminates a segment and the group. The current location upon leaving a segment is the segment origin.

⋆ \unitscale <scale>

The <scale> multiplies the present segment and all enclosed segments unless they have their own \unitscale. A \unitscale may be changed at any time within a segment.

⋆ \segmentscale <scale>

The <scale> affects the present segment and all enclosed segments unless that segment is protected by an \absolutescale. Unlike \unitscale, the \segmentscale accumulates by multiplying the current scale value. The actual scale used for interpreting position numbers is the product of all of the enclosing segmentscales times the presently active unitscale.

⋆ \absoluteposition

All coordinates are to be interpreted with respect to the current origin. This will either be the graph origin or the origin of the current segment.

⋆ \relativeposition

Coordinate positions are interpreted relative to the previous position. If the previous command was the drawing of an arc or circle, the previous position is the center of the circle.

30.8 Slide Making

A specialized set of commands along with appropriate templates exist to create a transparency. All slides are “horizontal”. \fullform slides take up an entire 8.5 by 11 in. page and are intended for display. \textform slides are reduced for text. A \comment <text> // command is given that is suppressed when the \fullform is used but is printed when \textform is used. The text in the slides uses a general scaled font family in the file spfont.tex. This family is basically a scaled set of \tenpoint fonts. An example is given below:

There are two basic forms, the INRS form and a General form. An example of the \inrsform is given by

HOW TO MAKE SLIDES WITH INRSTÊX

Preliminaries

• Input the macro package with \input

               inrssl.tex.
             ∘ Decide whether \fullform or \textform.
             ∗ Decide whether \inrsform or \genform.

Making it.

             • Use \hslide <title>// <body> //.

• Use “//” as the delimiter.

INRS-Télécommunications

\input inrssl % brings in the slide macros
\textform % sets textform and size
\formscale .7 % further reduces the size of slide by .7
\beginmidinsert
\inrsform % sets the inrs form
\hslide HOW TO MAKE SLIDES WITH \intex//
\hd{Preliminaries}
\bl

\lb Input the macro package with {\tt \1input inrssl.tex}.
\lc Decide whether {\tt \1fullform} or {\tt \1textform}.
\last Decide whether {\tt \1inrsform} or {\tt \1genform}.
\el
\hd{Making it.}
\bl
\lb Use {\tt \1hslide <title>// <body> //}.
\lb Use {``//''} as the delimiter.
\el
//
\endmidinsert

This is the title

Split here

This is an internal header

• A listitem starting with a bullet.

∘ A listitem starting with a circle.

∗ A listitem starting with an asterisk.

General Engineering Inc.

General Engineering Inc.

An Important Presentation – Jan. 1, 2000

It is possible to add a comment to the bottom of the slide which only shows up when the slide is printed in textform. A comment is terminated with a //

This second slide was given by

\topdata = {General Engineering Inc.}
\botdata = {An Important Presentation}

\slidedate = {Jan. 1, 2000}
\genform % the general form that uses these token strings
\hslide This is the title \cr Split here //
\hd{This is an internal header}
\bl
\lb A listitem  starting with a bullet.
\lc A listitem starting with a circle.
\last A listitem starting with an asterisk.
\el
//  % the // terminates a slide
\comment
It is possible to add a comment to the bottom of the slide which
only shows up when the slide is printed in textform. A comment is
terminated with a {//} //

Arbitrary graphics may be included in a slide using normal TEXGraph commands. However, the included graphics may not scale correctly when moving from \fullform to \textform. Under these conditions is is necessary to include the test \iftextform <....> \else <...> \fi to switch between the modes.

The basic commands in the slide package

⋆ \input inrssl

This command will bring in the INRSTEX slide macro package.

⋆ \fullform

This chooses the full size form intended for creating the transparency. Any \comment is suppressed.

⋆ \textform

This chooses the text size of the slide and does not suppress the \comment text.

⋆ \formscale <scale>

The entire slide, text, internal graphics, and border, is scaled by the <scale> factor. This is done by directly by PostScript.

⋆ \hslide <title> // <text> // This is the basic command for making a slide. The title is terminated with a // and the slide body is also terminated with a //.

⋆ \comment <text> // This is a comment text which is printed in \textform but suppressed in \fullform.

⋆ \inrsform This will give the standard INRS-Télécommunications format with its logo on the top and nothing on the bottom. Text on the bottom may be

added using \botdata and \slidedate.
⋆ \genform

This is a completely general form where only the border is set.

⋆ \topdata ={<text>} This is printed in the \borderfont which is the same as the current slide body font. It is printed on the top line above the border with a current position at the left hand corner.

⋆ \botdata = {<b-text>}
⋆ \slidedate = {<s-date>}

These two token strings are printed on the bottom line centered and separated

by a –, ie as <b-text> - <s-date>.
⋆ \iftextform <...> \else <...> \fi

This is a switch that allows for different actions between fullform and textform. \textform is .578=1/1.728 the size of \fullform.

⋆ \lb \lc \last

These are three short forms for use in listitems starting with •, ∘, and * respectively.

⋆ \hd{<text>}

This gives a “header” inside a slide. It is equivalent to a \dssshead in normal text.

30.9 Some Additional Command Forms – TEXGraph

⋆ \begintexgraph \btg

This begins TEXGraph. It will bring in the TEXGraph macros the first time it is called. It starts a group and a \vbox.

⋆ \endtexgraph \etg

Finishes TEXGraph. It terminates the group started by \btg.

⋆ \graphdim <units>

This sets the default units of TEXGraph. Any valid TEX <unit> is valid such as in, cm, pt, or bp. The current default is in.

⋆ \hgraphsize

This maximum horizontal excursion of the graph as computed by TEXGraph. It is a dimension.

⋆ \hgraphskip
This actually \hskip \hgraphsize.
⋆ \hpix <number>/<unit>

This is the horizontal resolution in pixels/unit. The default is 300/in.

⋆ \vgraphsize

This maximum vertical excursion of the graph as computed by TEXGraph. It is a dimension.

⋆ \vgraphskip
This actually \vskip \vgraphsize.
⋆ \vpix <number>/<unit>

This is the vertical resolution in pixels/unit. The default is 300/in.

APPENDIX A  COMMAND INDEX

This Appendix contains an alphabetical list of the commands of INRSTÊX, with some information about their syntax and parameters, and the page in the book where they are more fully explained.

~ 99

\:  99

+ 63

\-  99

- 63 = 63 < 63 > 63

\aa, \AA  14
\above..  \atop..  \over..  functions
     {<parm1> \atop <parm2>}
     {<parm1> \choose <parm2>}
     {<parm1> \over <parm2>}
     {<parm1> \atopwithdelims<left delim><right delim>  <parm2>}
     {<parm1> \overwithdelims<left delim><right delim> <parm2>}
     {<parm1> \abovewithdelims<left delim><right delim>
            <bar thickness>  <parm2>}  71
\absoluteposition  197
\advance \<count, dimen, glue name> by [+ -]<count, dimen, glue>  40
\ae, \AE  14
\aleph  63
\allowbreak  57
\Alphabetic{<integer>}  138
\alphabetic{<integer>}  138

204 APPENDIX A: \alpha

\alpha {\rm A} A  62
\amalg  63
\aneq  \aneqtag{<tag>}  144
\angle  63
\Appendix  137
\approx  63
\arccos  68
\arcc r:<radius> sd:<degrees> ed:<degrees>  193
\arcn r:<radius> sd:<degrees> ed:<degrees>  193
\arcsin  68
\arctan  68
\arg  68
\arrowheadscale  186
\arrowheadsize l:<length> w:<width>  186
\arrowheadtype t:<type>  186
\ast  63
\asymp  64
\autoeqnum  142
\autofignum  142
\autonumberingon  145
\autonumberingoff  145
\autoreferencingon  145
\autoreferencingingoff  145
\autotblnum  142
\auto<type>num{<tag>}  145
\avec h:<..> v:<..>  186
\backslash  66
\backslash  64
\balancecolumnsize
        [=] <column length>  132
\beginabstract...\endabstract  178
\beginappendices  \endappendices  137
\beginlist \bl  114
\beginmidinsert  127
\beginmulticolumnformat  132
\beginpageinsert  127
\beginprelude  \endprelude  138
\beginsegment  197
\beginsublist \bsl  114
\beginsubsublist \bssl  114
\begintable ... \endtable  100
\begintableformat ... \endtableformat  100
\begintexgraph \btg  202
\begintopinsert  127
\beginttverbatim  55
\beta {\rm B} B  62
\bf  35
\big\Arrowvert  66
\big\arrowvert  66
\big\bracevert  66

                                            APPENDIX A: \captionbody{<text>}  205

\bigbreak  57
\bigcap  64
\bigcirc  64
\bigcup  64
\bigfont  35
\biggfont  35
\bigggfont  35
\biggl  67
\Biggl  67
\biggr  67
\Biggr  67
\big\lgroup  66
\bigl  67
\big\lmoustache  66
\bigodot  64
\bigoplus  64
\bigotimes  64
\big\rgroup  66
\bigr  67
\Bigr  67
\big\rmoustache  66
\bigskip  55
\bigsqcup  64
\bigtriangledown  64
\bigtriangleup  64
\biguplus  64
\bigvee  64
\bigwedge  64
\blankheaderstyle  \blankfooterstyle  163
\bordermatrix{<top 0>&<top 1>&<top 2>&...&<top n>\cr
              <side 1>&<first row>\cr
                  ...
              <side m>&<last row>\cr}  73
\botdata = {<b-text>}  201
\bot  64
\bowtie  64
\box dimensions ... \dp \ht \wd  83
\boxit{<line thickness>}{<border separation>}{<box, vlist>}  82
\boxmaxdepth [=] <dimen>  82
\box{<named box>}  82
<box spec>  83
\break  57
\br{<rules..>}   \er{<rules..>}  100
\buildrel <superscript> \over <relation>  68
\bullet  64
\bye  22
\bye  58
\cap  64
\captionbodyfont  36
\captionbody{<text>}  127

206  APPENDIX A: \captionbodyon

\captionbodyon \captionbodyoff  127
\captionbodyfont  127
\captionbox{<number text>}{<title>}  127
\captionnumfont  36
\captionnumfont  128
\captionskip [=] <dimen>  128
\captiontextfraction  128
\captiontitlefont  128
\captiontitlefont  36
\cases{<first math>&<first condition>\cr
         ...
        <last math>&<last condition>\cr}  74
\cavec h1:<..> v1:<..> h2:<..> v2:<..> h3:<..> v3:<..>  186
\cav (<h1> <v1>) (<h2> <v2>) (<h3> <v3>)  186
\cdot  64
\center  \center{<argument>}  101
\centerline{<horizontal list>}  82
\Chapter  138
\chapterstartform = {<special pre chapter tests>}  138
\cheadfont  35
\cheadformat{<chapter>}{<text>}  140
\chead{<number or tag>}{<title>}  137
\chi {\rm X} X  63
\chtagreplaceformat  139
\chtoc{<number>}{<title>}{<page number>}  156
\chtocout  157
\circ  64
\cite{<citation tag>}  151
\citeform{<citation tag>}{<TeX macro form>}  152
\citenum  151
\citetagvalue  152
\cleartabs  96
\closecitationtagfile  152
\clubsuit  64
\clvec h1:<..> v1:<..> h2:<..> v2:<..> h3:<..> v3:<..>  185
\clv  (<h1> <v1>)  (<h2> <v2>)  (<h3> <v3>)  185
\comment <text> //  201
\cong  64
\coprod  64
\copy{<named box>}  82
\copyright  14
\cosh  68
\cos  68
\coth  68
\cot  68
\<count name> [=] <integer, dimen, glue>  39
\csc  68
\cup  64
\dagger  64
\dag  14

APPENDIX A: \end 207

\dashv  64
\ddagger  64
\ddag  14
\def\<def name> <parameter form>{<replacement text>}  108
\deg  68
\delta \Delta {\mit\Delta}  62
\det  68
\diamond  64
\diamondsuit  64
\dimen\footins [=] <dimen>  118
\<dimen name> [=] < dimen, glue>  39
\<dimen name> [=] <dimen>  169
\dim  68
\discretionary{<pre  break  text>}{<post  break  text>}{<text>}  58
\discretionary{<prebreak text>}{<postbreak text>}{<nobreak text>}  47
\displaymath{<argument>}  101
\divide \<count, dimen, glue name> by [+ -]<integer>  40
\div  64
\documentstyle{<list of style types>}  163
\documentstyle  167
\documentstyle  163
\documentstyle{<font family>}  36
\documentstyle  167
\done  58
\done  23
\doteq  64
\dots ... \cdot \cdots \ldots \ddots  77
\downarrow  64
\Downarrow  64
\dp<named box> [=] <dimen>
     \ht<named box> [=] <dimen>
     \wd<named box> [=] <dimen>  83
\draftversion  23
\dsssheadfont  36
\dssshead{<title>}  137
\dssshtoc{<number>}{<title>}{<page number>}  157
\dssshtocout  157
DVIALW Command line options  24
\ehyph  23
\eightpoint  35
\ejectcolumn  132
\ejectcolumn  58
\eject  58
\ejectinserts  128
\ejectpage  132
\ejectpage  58
\ell  64
\emptyset  64
\end  58
\end  23

208 APPENDIX A: \endlist

\endlist \el  114
\endmidinsert  128
\endmulticolumnformat  132
\endnarrowtext  47
\endpageinsert  128
\endsegment  197
\endsublist \esl  114
\endsubsublist \essl  114
\endtexgraph \etg  202
\endtopinsert  128
\endttverbatim  55
\englishversion  \ehyph  23
\enskip  55
\epsilon {\rm E} E  62
\eqalign ...
  \eqalign{ <left first row> &<right first row>\cr
                      ...
            <left last row>  &<right last row>\cr}
  \eqalignno{<left first row> &<right first row>&<first eq.no>\cr
                      ...
             <left last row>  &<right last row>&<last eq.no>\cr}
  \leqalignno{<left first row>&<right first row>&<first eq.no>\cr
                      ...
              <left last row> &<right last row>&<last eq.no>\cr}  74
\eqno <reference>   \leqno <reference>  76
\equiv  64
\eta {\rm H} H  62
\everyfootnote = {<token list>}  118
\everyhbox = {<token list>}  83
\everylist [=] {<token list>}  114
\everyparagraph [=] {<token string>}  47
\everysublist [=] {<token list>}  114
\everysubsublist [=] {<token list>}  115
\everytable  101
\everyvbox = {<token list>}  83
\exists  64
\exp  68
\fhyph  24
\figtoc{<number>}{<title>}{<page number>}  157
\figtocout  157
\figureform{<tag or number>}{<title>}{<figure box>}  128
\figureinsert{<tag or number>}{<title>}{<figure box>}  129
\figurelabel  129
\filbreak  58
\finalversion  23
\firstcolumnoffset
      [=] <dimen>  133
\fivebf  34
\fivei  34
\fiverm  34

                                                 APPENDIX A: \houterpagesize  209

\flat  64
\folio  162
\following\...hnum  176
\font\<fontname> [scaled <number>]  34
\footerfont  36
\footertext [=] {<token list>}  164
\footnotefont  36
\footnotefont  118
\footnote{<math mode mark>}{<text>}  118
\footnoterule  118
\forall  64
\formatinrs  178
\formscale <scale>  200
\frown  64
\fullform  200
\fullpagestyle  163
\fulltablerule{<dimen>}  101
\gamma \Gamma {\mit\Gamma}  62
\gcd  68
\gdef\<def name> <parameter form>{<replacement text>}  109
\ge  64
\genform  201
\gensheadformat{<font>}{<number>}{<text>}{<separator>}  140
\geq  64
\gg  64
\global  109
\goodbreak  58
\graphdim <units>  202
\halign{<preamble>\cr <first row>\cr ... <last row>\cr}  96
\hangafter [+ -] <integer>  48
\hangindent [=] [+ -] <dimen>  48
\hbar  64
\hbox <box spec>{<horizontal list>}  83
\hcolumnsize  171
\hd{<text>}  201
\headerfont  36
\headertext [=] {<token list>}  164
\<head type>headfont  138
\heartsuit  64
\hfil \hfill  42
\hfilneg  42
\hfuzz [=] <dimen>  31
\hgraphsize  202
\hgraphskip  202
\hidewidth  97
\hinnerpagesize  171
\hom  68
\hookleftarrow  64
\hookrightarrow  64
\houterpagesize  169

\houterpagesize  167
\hpapersize  167
\hpapersize  169
\hpix <number>/<unit>  202
\hprintoffset = <dimen>  21
\hrule [height <dimen>] [width <dimen>] [depth <dimen>]  84
\hsize  169
\hskip [+ -] <dimen> [plus <dimen>] [minus <dimen>]  56
\hslide <title> // <text> //  201
\hss  42
\htext {<text>}  189
\hyphenatecapitals [=] <integer>  48
\hyphenation{<exceptions>}  23
\ialign{<preamble>\cr <first row>\cr ... <last row>\cr}  97
\iftextform <...> \else <...> \fi  201
\i  14
\imath  64
\Im  64
\indent  48
\inf  68
\infty  64
\in  64
\initcitetag{<integer>}  152
\inputciteformfiles
          [=] { \inputwithcheck{<first form file>}
                  ...
                \inputwithcheck{<last form  file>} }  152
\inputcitetagfiles
          [=] { \inputwithcheck{<first tag file>}
                  ...
                \inputwithcheck{<last tag file>} }  153
\inputfigfiles  157
\input inrssl  200
\inputsubdocument{<file name>}  175
\inputtagfiles [=] {<input command><file name> ...}  145
\inputtblfiles  157
\inputtocfiles  158
\inrsform  201
\inrsreportstyle  178
\intdssshtoc  157
\intercolumnsep
      [=] {<token list>}  133
\int  64
\intssshtoc  159
\iota {\rm I} I  63
\item  115
\itemitem  115
\it  35
{\it\$}  14
{\it\&}  14

APPENDIX A: \ln 211

\j  14
\jmath  64
\jobname  20
\kappa {\rm K} K  63
\ker  68
\kern [+ -] <dimen>  56
\lambda \Lambda {\mit\Lambda}  63
\land  65
\langle  66
\language [=] <integer>  23
\lastcitetag{<integer>}  153
\lb \lc \last  201
\lbrace  66
\lbrack  66
\lceil  66
\lcir r:<radius>  193
\Leftarrow  64
\leftarrow  64
\leftcolumnoffset  171
$\left<delimiter> ...\right<delimiter>$  67
\leftequationnumbering   \rightequationnumbering  76
\leftharpoondown  64
\leftharpoonup  64
\left  101
\leftline{<horizontal list>}  82
\leftmarginsize  167
\leftmarginskip  167
\leftrightarrow  64
\Leftrightarrow  64
\leftskip [=] <dimen> [plus <dimen>] [minus <dimen>]  48
\le  64
\leq  64
\let\<def a> [=] \<def b>  109
\lfloor  66
\lg  68
\lim  68
\liminf  68
\limsup  68
\linebreak  58
\linecap <integer>  185
\line{<horizontal list>}  82
\linejoin <integer>  185
\listindent [=] <dimen>  116
\listitem <listitem mark>  115
\listitemmarksize [=] <dimen>  116
\listitemskip [=] <glue>  116
\llap{<text>}  84
\ll  64
\l, \L  14
\ln  68

212 APPENDIX A: \lnot

\lnot  65
\log  68
\long  109
\Longleftarrow  64
\longleftarrow  64
\longleftrightarrow  64
\Longleftrightarrow  64
\longmapsto  64
\Longrightarrow  64
\longrightarrow  64
\looseness [=] [+ -] <integer>  49
\loosenlist  115
\lor  65
\lower<dimen><box>  84
\lpatt p:<pattern>  185
\lvec h:<..> v:<..>  184
\magstep<integer>  170
\mag [=] <1000 times scale factor>  170
\makecitationlist  153
\makefiglist  158
\makelongcitationlist  153
\maketbllist  158
\maketoclist  158
\mapsto  64
\marginnotestrue  24
\marginnotesfalse  24
\math{<argument>}  102
\mathopen{<dimen or glue>}  77
\matrix{<entry 11>&<entry 12>&...&<entry 1n>\cr
         <second row>\cr
            ...
         <last row> \cr}
  \pmatrix{<several rows>\cr}  78
\max  68
\medbreak  58
\medmuskip  42
\medskip  56
\mid  64
\midtabglue [=] <glue>  102
\min  68
\mkern [+ -] <decimal number>mu  56
\models  64
\modifystrut{<original>}{<add to height>}{<add to depth>}
\mst = \modifystrut  102
\move h:<..> v:<..>  184
\mp  64
\mskip [+ -] <mudimen> [plus <mudimen>] [minus <mudimen>]  56
\multiply \<count, dimen, glue name> by [+ -]<integer>  40
\multispan {<integer>}  97
\mu {\rm M} M  63

                                                APPENDIX A: \numberbysection  213

\nabla  64
\natural  64
\nearrow  65
\neg  65
\newautonum{<type>}  146
\newcount\<count name>  38
\newdimen\<dimen name>  38
\newmuskip\<muskip name>  42
\newptag{<tag>}  146
\newskip\<skip name>  42
\newskip\<skip or glue name>  39
\newtag{<tag>}{<tag value>}  146
\newtocfile  158
\newttag{<tag>}{<tag value>}  146
\ni  65
\ninepoint  35
\noalign {<text>}  98
\noalign {<text>}  76
\nobreak  58
\noheaderstyle  \nofooterstyle  164
\noindent  49
\nopagenumberadvance  162
\normalheaderstyle \normalfooterstyle  164
\normalpagestyle  164
\not\approx  63
\not\cong  64
\not\equiv  64
\not\geq  64
\not\gg  64
\not=  63
\not<  63
\not>  63
\not\in  64
\not\leq  64
\not\ll  64
\not\preceq  65
\not\prec  65
\not\simeq  65
\not\sim  65
\not\sqsubseteq  65
\not\sqsupseteq  65
\not\subseteq  65
\not\subset  65
\not\succeq  65
\not\succ  65
\not\supseteq  65
\not\supset  65
\numberbychapter  146
\numberbysection  146

214  APPENDIX A: \numberofcolumns

\numberofcolumns
      [=] <integer>  133
\nu {\rm N} N  63
\nwarrow  65
\oalign{<first row>\cr ... &<last row>\cr}  98
\obeylines  49
\obeyspaces  49
\odot  65
\oe, \OE  14
\oint  65
\omega \Omega {\mit\Omega}  63
\ominus  65
\omit  98
\o, \O  14
\openlistfile{<file extension>}  156
\openup <dimen>  77
\oplus  65
\oslash  65
\otimes  65
\outer  109
\overfullrule [=] <dimen>  31
\over ... \under ...
     \overline{<math>}    \underline{<math>}
     \overbrace{<math>}   \underbrace{<math>}  77
\owns  65
\pagenumber [=] <new page number>  162
\pagequietref{<tag>} \pqref{<tag>}  146
\pageref{<tag>}  \pref{<tag>}  147
\pagetagsoff  142
\pagetagson  142
\pagetagson \pagetagsoff  147
\paragraphcenterline  50
\parallel  65
\parindent [=] <dimen>  50
\par  50
\parshape <number of lines> <indent 1> <line length 1>
       ... <indent n> <line length n>  50
\parskip [=] <dimen>  51
\partial  65
\penaltybreak{<penalty>}{<skip size>}  59
\penwidth <size>  185
\perp  65
\pfill p:<fraction>  193
\phantom{<math>}    \vphantom{<math>}    \sphantom{<hlist>}  78
\phi \Phi {\mit\Phi}  63
\P  14
\pi \Pi {\mit\Pi}  63
\pm  65
\podsssheadskip [=] <glue>  139
\polistskip [=] <glue>  116

APPENDIX A: \rm 215

\posheadskip [=] <glue>  139
\possheadskip [=] <glue>  139
\posssheadskip [=] <glue>  139
\posublistskip [=] <glue>  116
\posubsublistskip [=] <glue>  116
\prdsssheadskip [=] <glue>  139
\preceq  65
\prec  65
\preludehead{<title>}  137
\preludeheadformat  139
\preludheadformat{<title>}  140
\pretolerance [=] <integer>  51
\prime  65
\Pr  68
\prlistskip [=] <glue>  116
\prod  65
\propto  65
\prsheadskip [=] <glue>  139
\prssheadskip [=] <glue>  139
\prsssheadskip [=] <glue>  139
\prsublistskip [=] <glue>  116
\prsubsublistskip [=] <glue>  116
\prtocout  158
\prtoc{<title>}{<page number>}  158
\psi \Psi {\mit\Psi}  63
\quad \qquad  56
\quietref{<tag>} \qref{<tag>}  147
\raggedbottom  32
\raggedright  51
\raise<dimen><box>  84
\rangle  66
\rbrace  66
\rbrack  66
\rceil  66
\rect <horizontal dimen> by <vertical dimen>  129
\ref{<tag>}  147
\Re  65
\relativeposition  197
\rfloor  66
\rho {\rm R} R  63
\Rightarrow  65
\rightarrow  65
\rightharpoondown  65
\rightharpoonup  65
\right  102
\rightleftharpoons  65
\rightline{<horizontal list>}  82
\rightskip [=] <dimen> [plus <dimen>] [minus <dimen>]  48
\rlap{<text>}  84
\rm  35

216  APPENDIX A: \romanpagenumber

\romanpagenumber [=] <new page number>  163
\rstext d:<degrees> sc:<scale> t:{<text>}  189
\rtext d:<degrees> t:{<text>}  189
\samplemark{<listitem mark>}  115
\sa{<text>}  102
<scale factor>\dp<named box>
     <scale factor>\ht<named box>
     <scale factor>\wd<named box>  83
\searrow  65
\sec  68
\segmentscale <scale>  197
\setbox<named box> [=] <box>{<list>}  85
\setminus  65
\sfootnote{<math mode mark>}{<text>}  119
\sharp  65
\sheadfont  36
\shead{<number or tag>}{<title>}  137
\shtagreplaceformat  139
\shtoc{<number>}{<title>}{<page number>}  159
\shtocout  159
\sigma \Sigma {\mit\Sigma}  63
\silent{<text>}  147
{\silenttrue \auto...num{<tag>}}  143
\silenttrue  73
\simeq  65
\sim  65
\S  14
\sinh  68
\sin  68
\skip\footins [=] <dimen>  118
\<skip or glue name> [=]  <dimen>
      [plus <dimen>] [minus<dimen>]  39
\slidedate = {<s-date>}  201
\smallbreak  59
\smallerfont  36
\smallskip  56
\smash{<math>}  78
\smile  65
\spacing {<decimal number>}  56
\spadesuit  65
\span  98
\specialfootertext [=] {<token list>}  164
\specialheadertext [=] {<token list>}  164
\specialheaderstyle \specialfooterstyle  164
\specialnumberscontinuous  147
\specialpagestyle  164
\splitmaxdepth  85
\sprule  102
\sqcap  65
\sqcup  65

APPENDIX A: \times 217

\sqrt{<math>}  78
\sqsubseteq  65
\sqsupseteq  65
\ssheadfont  36
\sshead{<number or tag>}{<title>}  137
\sshtoc{<number>}{<title>}{<page number>}  159
\sshtocout  159
\ss  14
\sssheadfont  36
\ssshead{<number or tag>}{<title>}  137
\ssshtoc{<number>}{<title>}{<page number>}  159
\ssshtocout  159
\star  65
\strut  85
\subdocumentmacros{<macros for subdocument>}  176
\sublistindent [=] <dimen>  116
\sublistitemskip [=] <glue>  116
\subseteq  65
\subset  65
\subsublistitemskip [=] <glue>  116
\subsublistindent [=] <dimen>  116
\succeq  65
\succ  65
\sum  65
\sup  68
\supseteq  65
\supset  65
\surd  65
\swarrow  65
\tabalign ... \cr  96
\tableform{<tag or number>}{<title>}{<table>}  129
\tableinsert{<tag or number>}{<title>}{<figure box>}  129
\tablelabel  130
\tablespread = {<halign specification>}  103
\tanh  68
\tan  68
\tau {\rm T} T  63
\tbltoc<number>}{<title>}{<page number>}  159
\tbltocout  159
\tcs  103
\tenpoint  35
\textform  200
\textref h:<L C R> v:<T C B>  190
\+<text>&<text> ... &<text>\cr  96
\theta \Theta {\mit\Theta}  62
\thickmuskip  43
\thinmuskip  43
\thrule{<height>}  103
\tightenlist  116
\times  65

218  APPENDIX A: \title{<first

\title{<first row>\cr ... <last row>}  178
\titlepagestyle  164
\tocbox{<indent>}{<number>}{<title>}{<pagenumber>}  159
\tocfill  160
\tolerance [=] <integer>  51
\topdata ={<text>}  201
\top  65
\topmarginsize  167
\topmarginskip  167
\triangle  65
\triangleleft  65
\triangleright  65
\tr  103
\tt  35
\ttraggedright  51
\tvrule{<width>}  104
\twelvepoint  35
\<type>numform  142
\<type>num  142
\<type>tagrefformat  142
\<type>tagreplaceformat  142
\unhbox{<named hbox>}  85
\unhcopy{<named hbox>}  85
\unitscale <scale>  187
\unitscale <scale>  197
<units of measure>
   cm em ex in
   mu pt sp  37
\unvbox{<named vbox>}  85
\unvcopy{<named vbox>}  85
\Uparrow  65
\uparrow  65
\updownarrow  65
\Updownarrow  65
\uplus  65
\up{<math mode mark>}  118
\uppercase\folio  162
\UpperRoman{<integer>}  138
\upsilon \Upsilon {\mit\Upsilon}  63
\use{<number of data columns>}  104
\valign{<preamble>\cr <first column>\cr ... <last column>\cr}  98
\varepsilon  62
\varphi  63
\varpi  63
\vartheta  63
\vbox <box spec>{<vertical list>}  83
\vbox{\hsize [=] <dimen> <text>}  84
\vcenter{<vertical list>}  85
\vcolumnsize  171
\vdash  65

APPENDIX A: \zeta 219

\vee  65
\versionfrancaise  \fhyph  24
\Vert  65
\vert  65
\veryraggedright  51
\vfilneg  43
\vfil \vfill  43
\vfooterersize [=] <dimen>  165
\vfootersize = <dimen>  163
\vfuzz [=] <dimen>  32
\vglue [=] [+ -] <dimen> [plus <dimen>] [minus <dimen>]  56
\vgraphsize  202
\vgraphskip  202
\vheadersize [=] <dimen>  165
\vheadersize = <dimen>  163
\vinnerpagesize  171
\vouterpagesize  167
\vouterpagesize  169
\vpapersize  169
\vpapersize  167
\vpix <number>/<unit>  202
\vprintoffset = <dimen>  22
\vrule [height <dimen>] [width <dimen>] [depth <dimen>]  84
\vsize  169
\vskip [=] [+ -] <dimen> [plus <dimen>] [minus <dimen>]  56
\vsplit<named box> to <dimen>  85
\vss  43
\vtext {<text>}  189
\wedge  65
\wp  65
\wr  65
\writelistfile{<file extension}{\string\..toc}{<number>}{<arg>}  160
\xi \Xi {\mit\Xi}  63
\zerocenteredbox{<text>}
 \zb = \zerocenteredbox  104
\zeta {\rm Z} Z  62