ted serbinski – entrepreneur & web architect
  • thoughts
  • about
  • contact



Popular content

  • 2 Guys Uncorked - Coming this January
  • Tracking External Links and "In-Network" Links with Google Analytics and jQuery
  • My First Podcast!
  • Sushi Go-Round, from London
  • Simplemenu 5.0 released
  • Rebuilding a BMW intake: S52 to M50 intake manifold conversion, day 7
  • Scheduler module: rewritten
  • Widescreen Mac Mail
  • Sudo on the Mac...
  • JavaScript Compression
more

Recent comments

  • thanks very much
    1 week 5 days ago
  • it is really nice written
    2 weeks 4 days ago
  • Hi, I have used the
    4 weeks 2 days ago
  • thankyou so much and for
    8 weeks 6 days ago
  • It’s typical for the
    10 weeks 3 days ago
more

Compose tips

  • Textile Help

    Block modifier syntax:

    CSS attributes can be applied to blocks (paragraphs, headers, etc.). CSS classes are specifed with "(class)"; CSS IDs are specified with "(#id)"; both can be specified with "(class#id)". An arbtirary CSS style can be applied by using "{style}". Finally, language attributes are applied using "[language]".

    Additionally, alignment and indentation shorthands are provided. To left-align, right-align, center, and justify text, use "<", ">", "=", and "<>", respectively. "(" left-indents a block 1em for each occurrence, and ")" right-indents similarly.

    Tables have additional options. "^", "-", and "~" specify top, middle, and bottom vertical alignment. The "_" attribute on a cell indicates that it is a table header.

    The examples below illustrate these attributes.

    textile input output

    Headings

    hx. (where x is 1 - 6)
    h1. Heading

    Heading

    h2(class). Heading with class

    Heading with class

    Paragraphs

    p=. Centered text

    Centered text

    p())(#id). Indented text with ID

    Indented text with ID

    Block quotes

    bq(class#id). Quote with class and ID
    Quote with class and ID
    bq[en]. English quote
    English quote

    Ordered lists

    {color: blue}# Attributes specified
    # before the first item
    # affect the whole list
    1. Attributes specified
    2. before the first item
    3. affect the whole list

    Unordered lists

    * Lists can have
    ## subitems or
    ## sublists
    * too
    • Lists can have
      1. subitems or
      2. sublists
    • too

    Footnotes

    fnx. (where x is 1 - 100)
    fn17. Footnote

    17 Footnote

    Tables

    |_. A|_. B|_. C|
    (dark). |very|simple|table|
    |<. left|=. center|>. right|
    |^{height:3em}. top|-. middle|~. bottom|
    A B C
    very simple table
    left center right
    top middle bottom

    Phrase modifier syntax:

    The class, ID, style, and language attributes described above also apply to the span phrase modifier as shown below.

    textile input output
    _emphasis_ emphasis
    __italic__ italic
    *strong* strong
    **bold** bold
    ??citation?? citation
    -delete text- deleted text
    +inserted text+ inserted text
    ^superscript^ superscript
    ~subscript~ subscript
    @code@ code
    %(class)span% span
    %{color:red;}span% span
    ==no textile== no textile
    "link text":url link text
    "link text(title)":url link text
    !imageurl!
    !imageurl(alt text)! alt text
    !imageurl!:url
    ABC(Always Be Closing) ABC
    Footnote reference[17] Footnote reference17
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <img> <pre>

  • Syntax highlighting of source code can be enabled with the following tags:

    • Generic syntax highlighting tags: "<code>", "<blockcode>".
    • Language specific syntax highlighting tags: .
    • PHP source code can also be enclosed in <?php ... ?> or <% ... %>, but additional options like line numbering are not possible here.

    Options and tips:

    • The language for the generic syntax highlighting tags can be specified with one of the attribute(s): type, lang, language. The possible values are: "c" (for C), "cpp" (for C++), "drupal5" (for Drupal 5), "drupal6" (for Drupal 6), "java" (for Java), "javascript" (for Javascript), "php" (for PHP), "python" (for Python), "ruby" (for Ruby).
    • Line numbering can be enabled/disabled with the attribute "linenumbers". Possible values are: "off" for no line numbers, "normal" for normal line numbers and "fancy" for fancy line numbers (every nth line number highlighted). The start line number can be specified with the attribute "start", which implicitly enables normal line numbering. For fancy line numbering the interval for the highlighted line numbers can be specified with the attribute "fancy", which implicitly enables fancy line numbering.
    • If the source code between the tags contains a newline (e.g. immediatly after the opening tag), the highlighted source code will be displayed as a code block. Otherwise it will be displayed inline.
    • Beside the tag style "<foo>" it is also possible to use "[foo]".

    Defaults:

    • Default highlighting mode for generic syntax highlighting tags: when no language attribute is specified, no syntax highlighting will be done.
    • Default line numbering: fancy line numbers (every 5 lines).

    Examples:

    You typeYou get
    <code>foo = "bar";</code>Inline code with the default syntax highlighting mode.
    <code>
    foo = "bar";
    baz = "foz";
    </code>
    Code block with the default syntax highlighting mode.
    <code lang="ruby" linenumbers="normal">
    foo = "bar";
    baz = "foz";
    </code>
    Code block with syntax highlighting for Ruby source code
    and normal line numbers.
    <code language="ruby" start="23" fancy="7">
    foo = "bar";
    baz = "foz";
    </code>
    Code block with syntax highlighting for Ruby source code,
    line numbers starting from 23
    and highlighted line numbers every 7th line.
Code examples and downloadable zip files of code are licensed under a Creative Commons License.
All other content, unless where noted, ©2010 Theodore Serbinski. All Rights Reserved.