Text Formatting

Of course, you can type paragraphs into a Twine passage in Chapbook and it will display them as you would expect. But for other kinds of formatting, such as bold or italics, Chapbook follows the syntax of a popular markup language called Markdown.

The term 'markup language' might sound complex, but in reality it's just a set of conventions of how to represent formatting in plain text. For example, to make part of your text italicized when displayed, you type asterisks around it, *like so*.

If you've never used Markdown before, try using the dingus as you read this section. It's an online playground with a funny name that not only allows you to quickly see how text will be rendered, but also has a cheatsheet that summarizes the different formatting available to you. Bear in mind, however, that Chapbook has a few extra formatting options available to you above and beyond the standard Markdown set.

Italics and Boldface

To italicize a a phrase, type * or _ (a single underscore)1 around it.

TypedDisplayed
_Unconventional_ tastesUnconventional tastes
*Unconventional* tastesUnconventional tastes

To make a phrase boldface, type ** or __ (two underscores) around it.

TypedDisplayed
__Unconventional__ tastesUnconventional tastes
**Unconventional** tastesUnconventional tastes

It doesn't matter whether you use asterisks or underscores, so long as you're consistent in a single usage, and you can mix and match them in your text.

TypedDisplayed
**"I'll _murder_ you,"** she hissed."I'll murder you," she hissed.

Underlined text

Underlined text is often avoided on the web because underlining is used as a convention to mark text as a hyperlink, and in many case, italicizing text is preferable to underlining it.2 However, if you'd like to underline plain text, it can be done by writing <span style="text-decoration:underline"> and </span> around it.

(There is also a <u> HTML tag that originally was a signal to underline text, and still does so in many web browsers. But its meaning has changed to "text that is annotated in some way"; for example, underlined because it's misspelled.)

TypedDisplayed
This isn't a <span style="text-decoration:underline">link</span> but it feels like it should be.This isn't a link but it feels like it should be.

Monospaced Type

To set text in a monospaced typeface, like this, type backticks (`) around it.

TypedDisplayed
`Beep boop,` HAL commented.Beep boop, HAL commented.

Small Caps

If you'd like to set some text in small caps, type ~~ (two tildes) around it.

TypedDisplayed
Above the door was a ~~NO TRESPASSING~~ sign.Above the door was a NO TRESPASSING sign.

This convention, though not a part of original recipe Markdown, conflicts with some other Markdown dialects, which use ~~ for struck-out text, like so. To do this, type <del> and </del> around your text:

TypedDisplayed
At the bottom of the page, nearly completely covered by the government censor's pen, was that same code name you had seen before: <del>S-5900</del>.At the bottom of the page, nearly completely covered by the government censor's pen, was that same code name you had seen before: S-5900.

Line Breaks

If you'd like to insert a single line break, leave two spaces at the end of a line, or put a backslash (\) at the end of a line.

TypedDisplayed
After the final no there comes a yes \
And on that yes the future world depends.
After the final no there comes a yes
And on that yes the future world depends.

Section Breaks

A convention sometimes used in publishing to indicate a new scene, or a new line of thought is to separate the text using a series of asterisks, like this:

It had been a long day, and I fell asleep nearly instantly.

*   *   *

The following morning was no better than the day before.

To add a section break to your text, type *** (three asterisks) on a line by itself.

Lists

To created a bulleted list (or, in the parlance of the web, an unordered list), type *, -, or + at the beginning of a new line. It doesn't matter which character you use, but you do need to be consistent in each list.

TypedDisplayed
* Red
* Green
* Blue
  • Red
  • Green
  • Blue

To create a numbered list (also known as an ordered list), start each line either with a number and a period, or just a #. The numbering you use doesn't actually matter--you can have two items starting with 2. and the list will still be numbered correctly.

TypedDisplayed
# Red
# Green
# Blue
  1. Red
  2. Green
  3. Blue
1. Red
2. Green
3. Blue
  1. Red
  2. Green
  3. Blue

Why bother to specially format a numbered list? Just like in word processors, using this format will cause each item to be nicely indented, so that the second line of text of each item appears to the right of the initial number.

Ignoring Formatting Characters

Occasionally you'll want to use Markdown formatting characters as-is, without them initiating formatting. The simplest way to do this is to put a \ (backslash) in front of them.

TypedDisplayed
\*\* PLEASE EXIT NOW \*\*** PLEASE EXIT NOW **

Other Custom Styling

You can also enter HTML into a passage without any extra code surrounding it. It will be displayed exactly as you type it in. The library that Chapbook uses to render Markdown is sometimes inconsistent about how it treats HTML, however. It will always let HTML tags pass through as-is, but whether it interprets the contents of these tags as Markdown or HTML can depend on the exact situation. Unfortunately, the best way to test this is to experiment.

Blockquotes Don't Behave As You Might Expect

Chapbook formatting differs from standard Markdown in how it displays blockquotes--that is, a long stretch of text, often multiple paragraphs, that is indented to indicate it isn't part of the main text. Markdown uses > at the start of a line to indicate this. However, Chapbook uses the > to mark text as part of a fork instead. If you'd like to display a block quotation, put <blockquote> and </blockquote> around it.

TypedDisplayed
<blockquote>Call me Ishmael. Some years ago--never mind how long precisely--having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world.</blockquote>
Call me Ishmael. Some years ago--never mind how long precisely--having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world.
1

Underscores as italics have a tangled history behind them; they resemble underlines, which were more-or-less invented as a workaround for typewriters being unable to italicize words.

2

Underlines were originally a proofreading convention to tell typesetters to italicize the text, in fact.