Textile test and cheat-sheet
A test post to test Markdown Textile and provide a quick reference for use in the Wordpress HTML editor and offline HTML editors. The WYSIWYG editors were not giving me the control I needed, but I didn’t want to suffer the pain of writing HTML…although I know it, it’s a distraction from writing.
Enter some more humane mark-up languages such as Markdown (and MarkDown extra), and Textile (best reference here; character macro cheatsheet also check out MT-Textile does that??? and an online generator). Kudos to author Brad Choate!
After flirting with Markdown, when I finally found a good reference for Textile, it transpires that Textile is very powerful. It does a good job of handling new lines, paragraph spacing, lists, text formatting, on the fly tables, etc., etc. So, here by way of testing and memory jogger are some Textile basics…
Text modifiers
Need white space either side, can span multiple words.
Textile Result *strong* strong ** bold ** _emphasis_ emphasis __ italic __ -deleted- deleted^superscript^ +inserted+ inserted ~subscript~ ++bigger++ bigger - - smaller - -
%{CSSrule}text% <span CSSrule>text<span> %{color:red}red% red %{background-color:red}red% red ==xxxx== Escapes xxxx
Notes
- Blank lines are ignored, except for separating blocks (see Blocks)
- Put a space on a blank line to force spacing
Lists
- Precede bullets with a blank line
- Start lines with *
- Start lines with multiple *’s to nesting
Single line breaks will preserve indenting, but no bullets
- Start lines with multiple *’s to nesting
- Start numbered bullets with #
- Multiple #’s to nest
- …etc.
Tables
Use pipe characters. Must be preceded and followed by blank line. Loads of options…see reference.
| cell | cell | cell |
| cell | cell | cell |
Start line with _ for header row >, <, =, Align left, right, centre ^, ~ Align top, bottom . At start of cell, follow with space. Span 2 horiz. cells
Links & Images
“Link text”:URL
Surround with white space or [ ]
!/path/to/img.jpg!
!(alignright)/path/to/img.jpg! (to apply CSS class)
p(#yourAnchorId). Use blocks & Textiles (class#id) modifier to set an anchor. Also works with e.g. h1(#anchorID). etc.
Character macros
- - en dash – – em dash … … elipsis (c) © (tm) ™ {L-} £ {1/2} etc. ½ {e’} etc. é ==xxxx== Escapes xxxx
Blocks
All block “signatures” should be preceded by a blank line, end with a period and be followed with a space. You can put text on the same line as the signature, e.g. headings. In between the signature and the period, you may use several parameters to further customize the block. Use two periods to force the block to extend until you use another block signature. Use a couple of spaces if you don’t want text. E.g. p(. will start a 1 em indented paragraph.
Signatures p. Paragraph. Newlines for XHTML content receive a
tag at the end of the line (with the exception of the last line in the paragraph)bq. Blockquote h_n_. Heading level n Parameters * Start each line with * for unordered list # Start each line with # for unordered list table Use this to set table attributes. {style rule} A CSS style rule. Style rules can span multiple lines. (class) or (#id) or (class#id) For CSS class and id attributes. >, <, =, Modifier characters for alignment. Right-justification, left-justification, centered, and full-justification. ( (one or more) Adds padding on the left. 1em per “(” character is applied. When combined with the align-left or align-right modifier, it makes the block float. ) (one or more) Adds padding on the right. 1em per “)” character is applied. When combined with the align-left or align-right modifier, it makes the block float.
Testing 1, 2, 3…
(Blank line above me - see it it’s a BR or not)
“James Bond”:imdb:Sean+Connery becomes James Bond
“Tangerine Dream”:amazon becomes Tangerine Dream
“Movable Type”:google becomes Movable Type
["MT plugins by Brad Choate":google:movable type plugin choate] becomes MT plugins by Brad Choate