<-    -c-    ->    

chapter 15

preformatted text

some long-form texts have a need to present preformatted text, like computer source-code.

for such situations, you'll use the ` backtick.

inside a paragraph, or some other element, the backtick marks something as code, exactly like underscores mark italics and asterisks mark bold. specifically, backticks that surround text cause it to be displayed with the .html preformatted -- pre.

however, the backtick can also be used as a block tag, to signal that an entire chunk should be shown using the .html "code" tag.

while the " ` " can be used to start each line, that would cause the code in the input file to be "polluted" by those backticks, so it's often best to begin the chunk with an empty tag:

// who needs 4 characters to make a fence?
// the command is to not repeat oneself

~ // that is a tilde. // i always spell that word wrong

`
` // now is the time for all good men to
` // come to the aid of their good women

~
~ // the backtick code in the line above has
~ // signified that this chunk is source-code
~ // that should be shown with .html's "code"
~ // tag, i.e., monospaced and preformatted.
~ <script type=text/javascript>
~ $(document).ready(function () {
~ gdi=setInterval(function(){doit()},1000)
~ })
~ </script>
~ // this is known in light-markup circles as
~ // "a fenced block", since the backtick(s)
~ // up top sets a "fence" around the code.
~ // the code block is then usually followed
~ // by a closing "fence" of backtick(s), but
~ // in z.m.l., a blank line closes all elements,
~ // so we don't need a "closing" fence here.
~ // however, this does mean that the code
~ // cannot contain any blank lines inside it,
~ // so you must stay cognizant of that fact.
~ // comment out blank lines in your code.