--- :writing-paragraph-text: :title: Writing Paragraph Text :sections: :simple-paragraphs: Simple paragraphs: desc:

Paragraphs are separated by a blank line.

input: |- This is a paragraph. This is another paragraph output: |-

This is a paragraph.

This is another paragraph

Explicit paragraphs: desc:

You can explicitly identify a paragraph with p. (p-period-space) before the paragraph.

input: |- p. This is one paragraph. p. This is another. output: |-

This is one paragraph.

This is another.

:line-breaks: Line breaks: desc:

Lines that don’t have a blank line in between are part of the same paragraph.

input: |- Roses are red, Violets are blue, I'd like a sandwich; Perhaps even two. output: |-

Roses are red,
Violets are blue,
I’d like a sandwich;
Perhaps even two.

Line breaks in code: desc:

Line breaks in preformatted sections don’t become HTML breaks.

input: |-
          Mirror mirror
          on the wall...
          
output: |-
          Mirror mirror
          on the wall...
          
:typographers-quotes: Typographer's quotes: desc:

Straight quotation marks are converted into typographer’s quotes, which are easier on the eyes.

input: '"I said, ''hold the mayo'' twice!"' output:

“I said, ‘hold the mayo’ twice!”

Curly apostrophes: desc:

Apostrophes are also made curly.

input: We went to Steven's mother's house for a party. output:

We went to Steven’s mother’s house for a party.

:dashes: Dashes: desc:

Single hyphens between words become en dashes; double hyphens become em dashes. Hyphenated words are left alone.

input: I could be happy--fantastically happy--on twenty-one thousand a year if I only had to work 9 am - 1 pm. output:

I could be happy—fantastically happy—on twenty-one thousand a year if I only had to work 9 am – 1 pm.

En dash must have spaces: desc:

A dash, when it appears between words, must be surrounded by spaces.

input: June - July 1967 output:

June – July 1967

Em dash spaces optional: desc: |-

Em dashes may be set open or closed.

According to most American sources (e.g., The Chicago Manual of Style) and to some British sources (e.g., The Oxford Guide to Style), an em dash should always be set closed (not surrounded by spaces). But the practice in many parts of the English-speaking world, also the style recommended by The New York Times Manual of Style and Usage, sets it open (separates it from its surrounding words by using spaces) when it is being used parenthetically.

input: Please use the em dash closed--or open if you must -- but I prefer it closed. output:

Please use the em dash closed—or open if you must — but I prefer it closed.

:ellipses: Ellipses: desc:

Three periods become the ellipsis character.

input: He thought and thought ... and then thought some more. output:

He thought and thought … and then thought some more.

Ellipses without leading space: desc:

Consult your style manual for proper use of ellipses in conjunction with spaces and other punctuation.

input: '"Four score and seven years ago our fathers brought forth...a new nation...dedicated to the proposition that all men are created equal...."' output:

“Four score and seven years ago our fathers brought forth…a new nation…dedicated to the proposition that all men are created equal….”

:dimension-sign: Dimension sign: desc:

The lowercase letter x between numbers becomes a dimension sign.

input: 4 x 4 = 16 output:

4 × 4 = 16

Dimension with quotes: desc:

In RedCloth, quotes may be applied to the dimensions to represent feet and inches.

input: My office measures 5' x 5'6". output:

My office measures 5′ × 5′6".

Dimension spaces optional: desc:

Spaces between the numbers and the x are optional.

input: 4x4=16 output:

4×4=16

:registered-trademark-and-copyright-symbols: Registered, trademark, and copyright symbols: desc:

The copyright, registered, and trademark symbols can be produced by placing the letters in parentheses.

input: RegisteredTrademark(r), Trademark(tm), and Copyright (c) 2008 output:

RegisteredTrademark®, Trademark™, and Copyright © 2008

:acronyms: Acronyms: desc:

You can provide the definition for acronyms inside parentheses.

input: The EPA(Environmental Protection Agency) is measuring GHG(greenhouse gas) emissions. output:

The EPA is measuring GHG emissions.

:uppercase: Uppercase: desc:

Uppercase words are enclosed in a span element that can be styled to your liking. Administrators can disable this feature with :no_span_caps.

input: Many NASDAQ companies are ISO certified. output:

Many NASDAQ companies are ISO certified.

:page-layout: :title: Page Layout :sections: :headings: Headings: desc:

Headings convey a hierarchy of information on the page. They structure the document like an outline. Heading 1 is the most important or general and Heading 6 is the least important or most specific. Leave a blank line after every heading.

input: |- h1. This is a Heading 1 This might be an introductory paragraph on the general topic. h2. Heading 2 gets more specific Now we're getting into the details. output: |-

This is a Heading 1

This might be an introductory paragraph on the general topic.

Heading 2 gets more specific

Now we’re getting into the details.

:block-quotations: Block quotations: desc:

Block quotations designate long quotations where a paragraph break is appropriate. It ends with a blank line.

input: |- Even Mr. Sedaris, a noted luddite, has finally succumbed to doing his writing on a computer. The Internet, however, remains an idiotic trifle: bq. I've never seen the Internet. I don't have email. I just enjoy lying on the couch and reading a magazine. When people say, "You should visit my Web page," I'm always perplexed by it. Why? What do you do there? Haven't we all pondered that at one time or another? output: |-

Even Mr. Sedaris, a noted luddite, has finally succumbed to doing his writing on a computer. The Internet, however, remains an idiotic trifle:

I’ve never seen the Internet. I don’t have email. I just enjoy lying on the couch and reading a magazine. When people say, “You should visit my Web page,” I’m always perplexed by it. Why? What do you do there?

Haven’t we all pondered that at one time or another?

Citing block quotations: desc:

Block quotations may include a citation URL immediately following the period.

input: |- A standard Lorem Ipsum passage has been used since the 1500s: bq.:http://www.lipsum.com/ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. output: |-

A standard Lorem Ipsum passage has been used since the 1500s:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Extended block quotations: desc:

If your block quotation needs to go on for more than one paragraph, use two periods. The block quotation ends when a paragraph of a different type (such as an explicit paragraph or a header) is encountered.

input: |- bq.. This is one paragraph. Another paragraph, also part of the quote. p. A normal paragraph ends the quote. output: |-

This is one paragraph.

Another paragraph, also part of the quote.

A normal paragraph ends the quote.

:bullet-lists: Bullet lists: desc:

Make a bullet list with asterisks. Use more asterisks to make nested lists.

input: |- Textile has several advantages over HTML: * It's easier on the eyes * You don't have to write all those HTML tags ** By not writing the tags yourself, you're less likely to make coding mistakes ** It requires fewer keystrokes *** You don't wear out the keys on your keyboard as fast *** You won't wear out your fingers as fast * You can write it much quicker output: "

Textile has several advantages over HTML:

\n" :numbered-lists: Numbered lists: desc:

Start each item in your numbered list with a number sign. For nested lists, use more number signs.

input: |- How to make a PB&J: # Gather bread, peanut butter, and jelly # Slice the bread if necessary # Assemble the sandwich ## Spread peanut butter on one slice of bread ## Put jelly on another slice ## Put the two slices together # Enjoy output: "

How to make a PB&J:

\n
    \n\t
  1. Gather bread, peanut butter, and jelly
  2. \n\t
  3. Slice the bread if necessary
  4. \n\t
  5. Assemble the sandwich\n\t
      \n\t\t
    1. Spread peanut butter on one slice of bread
    2. \n\t\t
    3. Put jelly on another slice
    4. \n\t\t
    5. Put the two slices together
    6. \n\t
  6. \n\t
  7. Enjoy
  8. \n
" :mixed-nested-lists: Mixed nested lists: desc:

You can nest ordered lists inside unordered lists and vice-versa.

input: |- Three reasons to walk to work: # It saves fuel # It's good for your health ** Walking burns calories ** Time outside means lower stress # It's good for the environment output: "

Three reasons to walk to work:

\n
    \n\t
  1. It saves fuel
  2. \n\t
  3. It’s good for your health\n\t
  4. \n\t
  5. It’s good for the environment
  6. \n
" :definition-lists: Definition lists: desc:

Each term in a definition list starts with a dash. Put a := between the term and the definition. If your definition spans multiple lines, end the definition with =:

input: |- - coffee := Hot and black - tea := Also hot, but a little less black - milk := Nourishing beverage for baby cows. Cold drink that goes great with cookies. =: output: "
\n\t
coffee
\n\t
Hot and black
\n\t
tea
\n\t
Also hot, but a little less black
\n\t
milk
\n\t

Nourishing beverage for baby cows.

\n

Cold drink that goes great with cookies.

\n
" :footnotes: Footnotes: desc:

To reference a footnote, place the footnote number in square brackets. Don’t forget the corresponding footnote at the bottom of the page.

input: |- 42.7% of all statistics are made up on the spot.[1] fn1. "Dr. Katz":http://en.wikiquote.org/wiki/Steven_Wright output: |-

42.7% of all statistics are made up on the spot.1

1 Dr. Katz

:tables: Tables: desc:

Simple tables are made by separating each cell with vertical pipes. Begin the cell with _. to indicate the cell is a heading.

input: |- |_. name|_. age| |Walter|5| |Florence|6| output: "\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n
nameage
Walter5
Florence6
" Table cell attributes: desc:

You can make a table cell span rows or columns with a slash or backslash and the number to span. Classes, IDs, style, and alignment are also possible on table cells as with other elements.

input: "|{background:#ddd}. Cell with background|Normal|\n|\x02. Cell spanning 2 columns|\n|/2. Cell spanning 2 rows|one|\n|two|\n|>. Right-aligned cell|<. Left-aligned cell|" output: "\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n
Cell with backgroundNormal
Cell spanning 2 columns
Cell spanning 2 rowsone
two
Right-aligned cellLeft-aligned cell
" Table attributes: desc:

To apply attributes to the entire table, use the table. signature on a line by itself before the table data.

input: |- table(#prices). |Adults|$5| |Children|$2| output: "\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n
Adults$5
Children$2
" :divisions: Divisions: desc:

DIV tags are used to define a division or section in an HTML document. It has no inherent meaning, but is often used by designers and developers to group or style part of a page differently than another. You can easily create a div with Textile but most people who need a div just use HTML tags in their Textile.

input: div. A simple div. output:
A simple div.
:phrase-modifiers: :title: Phrase modifiers :sections: :strong-importance: Strong importance: desc:

Strong importance can be given to the text by surrounding it with asterisks. The strong text is commonly styled as bold.

input: Don't *ever* pull this lever. output:

Don’t ever pull this lever.

:stress-emphasis: Stress emphasis: desc:

To add emphasis to a stressed word or phrase, surround it with underscores. Emphasized text is typically styled as italics.

input: You didn't actually _believe_ it, did you? output:

You didn’t actually believe it, did you?

:stylistic-offset: Stylistic offset: desc:

To stylistically differentiate a word or phrase from the surrounding text without conveying any extra importance, place two asterisks on either side. Uses are key words in a document abstract, product names in a review, or other spans of text whose typical typographic presentation is boldened.

input: |- Search results for **Textile**: h4. ["**Textile** (markup language) - Wikipedia":http://en.wikipedia.org/wiki/Textile_(markup_language)] **Textile** is a lightweight markup language originally developed by Dean Allen and billed as a "humane Web text generator". **Textile** converts its marked-up text ... output: |-

Search results for Textile:

Textile (markup language) – Wikipedia

Textile is a lightweight markup language originally developed by Dean Allen and billed as a “humane Web text generator”. Textile converts its marked-up text …

:alternate-voice: Alternate voice: desc:

Double underscores surround a span of text in an alternate mood or voice, a technical term, an idiomatic phrase from another language, a thought, a ship name, or some other prose whose typical typographic presentation is italicized.

input: I just got the weirdest feeling of __déjà vu__. output:

I just got the weirdest feeling of déjà vu.

:citation: Citation: desc:

Cite the title of a work (e.g. a book, paper, essay, poem, score, song, script, film, TV show, game, sculpture, painting, theater production, play, opera, musical, exhibition, or anything other work whose title is italicized in traditional style guides) by surrounding it with two question marks on either side. This can be a work that is being quoted or referenced in detail (i.e. a citation), or it can just be a work that is mentioned in passing.

input: My wife's favorite book is ??The Count of Monte Cristo?? by Dumas. output:

My wife’s favorite book is The Count of Monte Cristo by Dumas.

:insertions-and-deletions: Insertions and deletions: desc:

To indicate a passage which has been deleted, surround it with minuses. To indicate an insertion, use pluses.

input: The news networks declared -Al Gore- +George W. Bush+ the winner in Florida. output:

The news networks declared Al Gore George W. Bush the winner in Florida.

Explicit insertion and deletion: desc:

If your insertion or deletion isn’t being recognized or is being confused with another modifier, you can make it more explicit by surrounding it with square brackets.

input: '[-this was deleted-][+this was added+] to the paragraph' output:

this was deletedthis was added to the paragraph

:superscript-and-subscript: Superscript and subscript: desc:

Superscript and subscript phrases are surrounded with caret and tilde characters, respectively.

input: | f(x, n) = log ~4~ x ^n^ output:

f(x, n) = log 4 x n

Tight superscript and subscript: desc:

If you want it without spaces around the super- and subscripted text, use square brackets.

input: f(x, n) = log[~4~]x[^n^] output:

f(x, n) = log4xn

:links: Links: desc:

Links have the text of the link in quotes, followed by a colon and the URL.

input: Learn more "about the company":/about and our "board of directors":../about#board. output:

Learn more about the company and our board of directors.

Link title: desc:

A title may be placed in parentheses at the end of the link text. Link titles help users predict where they are going. Jakob Nielsen recommends you use them sparingly and not assume the user will see them at all.

input: Visit our "parent company (Example Corporation)":http://example.com. output:

Visit our parent company.

Bracketed link: desc:

When the link isn’t surrounded by spaces or punctuation, or when the URL ending may be ambiguous, surround the link with square brackets.

input: This is a link to a ["Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language)]. output:

This is a link to a Wikipedia article about Textile.

Link alias: desc:

If you link to a URL repeatedly, you can replace the URL with a link alias defined elsewhere in the Textile document.

input: |- I'm really excited about "RedCloth":redcloth. I love it so much, I think I'll name my first child "RedCloth":redcloth. [redcloth]http://redcloth.org output:

I’m really excited about RedCloth. I love it so much, I think I’ll name my first child RedCloth.

Link attributes: desc:

Link attributes can be specified at the beginning of the link text followed by a period and space.

input: '"(my-class). This is a link with class":http://redcloth.org' output:

This is a link with class

:images: Images: desc:

Include an image by surrounding its URL with exclamation marks. Alt text can be provided in parentheses.

input: '!http://www.w3.org/Icons/valid-html401(This page is valid HTML)!' output:

This page is valid HTML

Image links: desc:

Images can be linked by putting a colon and the link URL after the image.

input: '!http://www.w3.org/Icons/valid-html401!:http://validator.w3.org/check?uri=referer' output:

:attributes: :title: Attributes :sections: :css-classes-and-ids: CSS classes and IDs: desc:

You can apply CSS classes and IDs to phrase modifiers or block modifiers.

input: p(my-class). This is a paragraph that has a class and this *(#special-phrase)emphasized phrase* has an id. output:

This is a paragraph that has a class and this emphasized phrase has an id.

CSS IDs: desc: '' input: p(#my-paragraph). This is a paragraph that has an id. output:

This is a paragraph that has an id.

CSS classes and IDs combined: desc:

You can specify both class and ID, but the class must always come first.

input: div(myclass#myid). This div has both a CSS class and ID. output:
This div has both a CSS class and ID.
:css-styles: CSS styles: desc:

Apply CSS styles directly to block or phrase modifiers by putting the style rules in curly braces.

input: p{color:blue;letter-spacing:.5em}. Spacey blue output:

Spacey blue

:language: Language: desc:

Specify the language of text with square brackets.

input: p[fr]. Parlez-vous français ? output:

Parlez-vous français ?

:alignment: Alignment: desc:

Text inside blocks can be aligned in four ways:

input: |- p<. align left p>. align right p=. centered p<>. justified justified justified justified justified justified justified justified justified output: |-

align left

align right

centered

justified justified justified justified justified justified justified justified justified

:indentation: Indentation: desc:

Text can be indented with single parentheses. For each left paren, left pad 1em. For each right paren, right pad 1em. They may be combined for left and right padding.

input: |- p(. Left pad 1em. p)). Right pad 2em. p(). Pad both left and right sides 1em. output: |-

Left pad 1em.

Right pad 2em.

Pad both left and right sides 1em.

:html-integration-and-escapement: :title: HTML Integration and Escapement :sections: :html-spans: HTML spans: desc:

You can enclose a bit of text in an HTML span tag by enclosing it in percent signs. Then you can apply attributes to the span (see attributes).

input: I can put in a %(myclass)span with a class% like this. output:

I can put in a span with a class like this.

:inline-code: Inline code: desc:

To mark code in your text, surround the code with at signs.

input: On the command line, you can just type @redcloth@. output:

On the command line, you can just type redcloth.

:block-code: Block code: desc:

You can insert a block of code with the bc. block signature.

input: |- bc. # Output "I love Ruby" say = "I love Ruby" puts say output: |-
# Output "I love Ruby"
          say = "I love Ruby"
          puts say
Extended block code: desc:

Use bc.. and the block of code will continue to include blank lines until it encounters another block signature such as p.

input: |- bc.. # Output "I love Ruby" say = "I love Ruby" puts say # Output "I *LOVE* RUBY" say['love'] = "*love*" puts say.upcase p. And that is how you do it. output: |-
# Output "I love Ruby"
          say = "I love Ruby"
          puts say

          # Output "I *LOVE* RUBY"
          say['love'] = "*love*"
          puts say.upcase

And that is how you do it.

:inline-html: Inline HTML: desc:

You can use HTML right in your paragraph text, presuming the site administrator has not set :filter_html or :sanitize_html restrictions.

input: I can use HTML directly in my Textile. output:

I can use HTML directly in my Textile.

:block-html: Block HTML: desc:

You can use HTML freely within your RedCloth 4 Textile. HTML tags on a line by themselves will not be mangled. Don’t forget to leave a blank line after any Textile, just like usual.

input: |-
h3. Your cart * Item one * Item two

output: "
\n
\n

Your cart

\n\n

\n
\n
" :no-textile: No Textile: desc:

You can have RedCloth skip a chunk of text with the <notextile> tag or double-equals.

input: |- Don't touch this! Use ==*asterisks*== to say something *strongly*. output: |- Don't touch this!

Use *asterisks* to say something strongly.

Notextile block: desc:

Notextile can also be used as a normal or extended Textile block.

input: |- notextile. This has *no* textile formatting, see? notextile.. And this notextile block Just keeps going and going. p. Until you end it with another block. output: |- This has *no* textile formatting, see? And this notextile block Just keeps going and going.

Until you end it with another block.

:preformatted-text: Preformatted text: desc:

Preformatted text can be put in a pre. block and its whitespace will be preserved. pre. is almost identical to bc., except that <code>...</code> tags are not used within the <pre> block.

input: |- pre. Text in a pre block is displayed in a fixed-width font. It preserves s p a c e s, line breaks and ascii bunnies. _ _ \`\ /`/ \ V / /. .\ =\ T /= / ^ \ {}/\\ //\ __\ " " /__ (____/^\____) output: |-
     Text in a pre block
          is displayed in a fixed-width
               font. It preserves
            s p a c e s, line breaks
               and ascii bunnies.
                    _     _
                    \`\ /`/
                     \ V /
                     /. .\
                    =\ T /=
                     / ^ \
                  {}/\\ //\
                  __\ " " /__
                 (____/^\____)
Extended preformatted: desc:

Use pre.. to make a block of extended preformatted text that continues until it encounters another block signature, like p.

input: |- pre.. All monospaced Even the blank lines p. But now a paragraph output: |-
All monospaced
Even the blank lines

But now a paragraph