-
Notifications
You must be signed in to change notification settings - Fork 0
Basic Textile formatting
The following instructions are courtesy of the Textile Language Development Team at https://textile-lang.com/
Textile processes text in units of blocks of text, which are separated by a blank line. Paragraphs are the default block type, therefore <p>…</p>
tags are added to plain text blocks. In order to identify special types of text blocks, a block signature is used. Block signatures are one to three characters terminated by a period, and are placed at the beginning of a text block. They include:
-
p.
a paragraph (default) -
h1.
–h6.
a heading from level 1 to 6 -
pre.
pre-formatted text -
bc.
a block of lines of code -
bq.
a quotation block -
###.
a comment block -
notextile.
no formatting (override Textile)
Extended blocks (with empty lines), are marked by two periods, e.g. bc..
or bq..
and are terminated with any other text block signature—usually p.
—to start a normal paragraph.
Some block signatures accept formatting modifiers, also for CSS or language specification. They include:
-
(
adds 1em of padding to the left for each(
character used -
)
adds 1em of padding to the right for each)
character used -
<
aligns to the left (floats to left for tables if combined with the)
modifier) -
>
aligns to the right (floats to right for tables if combined with the(
modifier) -
=
aligns to center (sets left, right margins toauto
for tables) -
<>
justifies text alignment -
{style rule}
a CSS style rule -
[language]
a language identifier (for alang
attribute) -
(class)
or(#id)
or(class#id)
for CSSclass
and/orid
attributes
The formatting modifiers can be combined. For example in order to right align a paragraph and set it in small type you would write:
p>{font-size:0.8em}. This is the documentation for Textile markup language.
Within a text block, any portion of the text can be modified by inline formatting signatures. They include:
-
*strong*
translates into<strong>strong</strong>
-
_emphasis_
translates into<em>emphasis</em>
-
**bold**
translates into<b>bold</b>
-
__italics__
translates into<i>italics</i>
-
-deleted text-
translates into<del>deleted text</del>
-
+inserted text+
translates into<ins>inserted text</ins>
-
^superscript^
translates into<sup>
superscript</sup>
-
~subscript~
translates into<sub>subscript</sub>
-
??citation??
translates into<cite>citation</cite>
-
%span%
translates into<span>span</span>
-
@code@
translates into<code>code</code>
Textile processing can also be omitted inline, then ==
signature is used to enclose the text portion to be left out. Any combination of inline formatting is permitted. For example:
_**-deleted bold emphasized text-**_
Results in: deleted bold emphasized text
Some text elements, like special characters or apostrophes, are automatically converted to their HTML or unicode equivalent. They include:
-
"quotation marks"
translate into curly “quotation marks”“
and”
-
'Apostrophes'
translate into curly ‘Apostrophes’‘
and’
-
Ampersand (&)
automatically escaped into&
-
Angle brackets (< or >)
automatically escaped into<
or>
-
A hyphen between whitespaces ( - )
translates into a short dash (–)–
-
Double hyphens ( -- )
translates into a long dash (—)—
-
The lowercase letter x
translates into a dimension sign (×) when placed between numbers×
-
Three periods (...)
translates into an ellipsis character (…)…
Special symbols can be created easily by the letters in parentheses or square brackets. They include:
-
(tm)
trademark: ™ -
(R)
registered: ® -
(C)
copyright: © -
(1/4)
one quarter: ¼ -
(1/2)
one half: ½ -
(3/4)
three quarters: ¾ -
(o)
degree: ° -
(+/-)
plus/minus: ±
Different kinds of lists are supported, and can be mixed together.
* A bulleted
* list example
Translates into:
- A bulleted
- list example
# A numbered
# list example
Translates into:
- A numbered
- list example
- A definition list item := An example definition
Translates into:
- A definition list item
- An example definition
In addition to the above, Textile supports formatting for tables, footnotes, links, images and many other elements.