(You may want to look at the source of this file.)
You can set various document metadata at the beginning of the file. The most important items can be seen above.
Usually, you will want to give your text some structure with headings. The lines beginning with exclamation points are headings. The number of exclamation points determines the level of the heading: one means top-level heading, two means subheading, three means sub-subheading and so on.
For most part, you can use whitespace (spaces, tabs, and line breaks) the way you want to. There are two notable exceptions:
Because Stx doesn't generally care about the way you use whitespace, if you want to preserve the formatting of the source, you need to request it separately.
Three open curly braces ({{{) begin a preformatted text block, and three close curly braces (}}}) end it:
This is preformatted text.
To force a line break at a certain point in text,
end a line with double-slash //. This will begin
a new line
immediately.
Inline markup is what you put in your document to cause textual effects.
There are two kinds of emphasis, normal and strong. Normal emphasis is achieved by bracketing the phrase with underscores _ or slashes / — the choice is free.[1] Strong emphasis is given by bracketing with asterisks *.
[1] Actually, underscores are meant for
semantic
emphasis (marking a phrase especially noteworthy) whereas
slashes are meant for technical
emphasis (first occurrences of terms,
titles of cited works, text that is not to be taken literally).
Additionally, there is a special kind of emphasis that typesets the text in teletype font.
You can add footnotes[2] to the text by putting the footnote into double brackets ([[ and ]]). The footnote text must be separated from the brackets with a space ( ) or a dash (-).
[2] A footnote is a short comment to the text.
Enclose quotations in quotation marks " to produce the right
formatting. An upper- or lowercase c
in parentheses (c) produces
a copyright sign, and ™ produces a trademark sign.
Two dashes in a row -- produce long dashes
.
If you enable link abbreviations (see Stx markup reference), many expressions with brackets become links. Link data can be written right into the link, or placed indirectly into a link data block[3]. Another example. You can also point to sectional units, such as Sectioning.
[3] This is link data for the indirect link reference fn1
. Because
it does not look like anything link-like, it will be made into a
footnote.
A horizontal line can be achieved by putting two or more dashes -- on a line by themselves:
Lists give a document structure. Overuse of lists (demonstrated below) makes a document seem technical and reference-like. There are three kinds of lists:
What are they good for and how do you write them?
By the way, list items can have many paragraphs, too. As well as all other kinds of constructs, as long as you indent them relative to the list.
In itemised lists, you can use the dash (-) or the asterisk (*) as a list marker, but not within the same list.
Term-definition lists are a very versatile construct, and underused by many. If your list items are short and/or stand by themselves, you can use ordinary lists, but if you want to attach comments to the items, you are usually better off using term-definition lists.
For term-definition lists, the double-colon (::) at the end of a line is the magic marker that causes a line to turn into a term. A definition is anything that follows a term, indented.
An indented paragraph is taken to be a citation block. Citations, too, can be nested within one another and lists.
Those were the days, my friend,
I hope they'd never end..
Citation blocks are also good for indenting things that should stand out, such as mathematical formulae, examples, and noteboxes.