Previous Section  < Free Open Study >  Next Section

Typographical Conventions

When doing (or talking about) detailed and complex text processing, being precise is important. The mere addition or subtraction of a space can make a world of difference, so I've used the following special conventions in typesetting this book:

  • A regular expression generally appears like figs/boxdr.jpgthisfigs/boxul.jpg . Notice the thin corners which flag "this is a regular expression." Literal text (such as that being searched) generally appears like 'this'. At times, I'll leave off the thin corners or quotes when obviously unambiguous. Also, code snippets and screen shots are always presented in their natural state, so the quotes and corners are not used in such cases.

  • I use visually distinct ellipses within literal text and regular expressions. For example [···] represents a set of square brackets with unspecified contents, while [ . . . ] would be a set containing three periods.

  • Without special presentation, it is virtually impossible to know how many spaces are between the letters in "ab", so when spaces appear in regular expressions and selected literal text, they are presented with the '' symbol. This way, it will be clear that there are exactly four spaces in 'a••••b'.

    I also use visual tab, newline, and carriage-return characters. Here's a summary of the four:

    a space character
    figs/tab.jpg a tab character
    figs/nl.jpg a newline character
    figs/cr.jpg a carriage-return character

  • At times, I use underlining, or shade the background to highlight parts of literal text or a regular expression (The figs/U25B4small.gif graphic is also used to mark specific sections of the regular expression.). In this example the underline shows where in the text the expression actually matches:

    Because figs/boxdr.jpgcatfigs/boxul.jpg matches 'It•indicates•your•cat•is···' instead of the word 'cat', we realize . . .

    In this example the underlines highlight what has just been added to an expression under discussion:

    To make this useful, we can wrap figs/boxdr.jpgSubject|Datefigs/boxul.jpg with parentheses, and append a colon and a space. This yields figs/boxdr.jpg (Subject|Date):• figs/boxul.jpg .

  • This book is full of details and examples, so to help you get the most out of it, I've provided an extensive set of cross references. They often appear in the text in a "see Section 3.4.2.6 notation. For example, it might appear like " . . . is described in Table 8-1 (see Section 8.3)."

    Previous Section  < Free Open Study >  Next Section