<-    -c-    ->    

chapter 4

styling your fancy words

in light-markup systems, the input file is in plain-text, whereas output can be rendered in a browser, or an e-book file, or wherever.

so what we'll talk about, as we discuss this, is what you need to do -- in the input file -- in order to obtain the output that you want.

as our first example, let's consider italics.

as a plain-text file cannot "do" italics, you'll need to use regular plain-text characters to show what you'd like italicized in the output.

z.m.l. uses underscores to italicize words, the first underscore at the start of the word, the other one at the end of the word. easy.

this word is italicized.

and this phrase will be in italics.

take a look at the input, and you should note the underscores must go outside punctuation-characters next to the word (like parentheses) or "quote-marks" or phrase-terminators such as commas, or sentence-terminators like periods.

starting underscores must have white-space to their left; likewise, closing ones must have white-space to their right. for a phrase, each word must have its own underscores.

now, what you will see depends, of course, on whether you're viewing input or output.

if you're looking at the input, you'll see the underscores, and no italics (because, as we noted, the input file is plain-text).

but if instead you are viewing the output, you will see italics, and not underscores.

and this phrase will be in italics.

it probably seems like extra work to have to do each word individually, but we begin with this rigid definition because it is rock-solid, in the sense that it works dependably, without producing unexpected or unpleasant effects. (such as when you have underscores in a u.r.l.)

before long, we'll introduce more flexibility, and much more power. but this is our start.

bold words are indicated with asterisks, and subject to the same rules on white-space.

these words will be rendered in bold.

and this phrase will be bold too.

nice.