#LyX File created by multimarkdown \lyxformat 413 \begin_document \begin_header \textclass memoir \begin_preamble \usepackage{listings} \usepackage{natbib} \usepackage{nomencl} \usepackage{booktabs} \usepackage{refstyle} \usepackage{varioref} \bibpunct{(}{)}{,}{a}{,}{,} \newref{part}{refcmd={Part \ref{#1} \vpageref{#1}}} \newref{chapt}{refcmd={Chapter \ref{#1} \vpageref{#1}}} \newref{secti}{refcmd={Section \ref{#1} \vpageref{#1}}} \newref{subse}{refcmd={Subsection \ref{#1} \vpageref{#1}}} \newref{subsu}{refcmd={Subsubsection \ref{#1} \vpageref{#1}}} \newref{parag}{refcmd={Paragraph \ref{#1} \vpageref{#1}}} \newref{subpa}{refcmd={Subparagraph \ref{#1} \vpageref{#1}}} \newref{tab}{refcmd={Table \ref{#1} \vpageref{#1}}} \newref{fig}{refcmd={Figure \ref{#1} \vpageref{#1}}} \end_preamble \options refpage \begin_modules \end_modules \bibtex_command default \cite_engine natbib_authoryear \end_header \begin_body \begin_layout Part Markdown: Basics \begin_inset CommandInset label LatexCommand label name "part:markdown:basics" \end_inset \end_layout \begin_layout Chapter Getting the Gist of Markdown's Formatting Syntax \begin_inset CommandInset label LatexCommand label name "chapt:gettingthegistofmarkdownsformattingsyntax" \end_inset \end_layout \begin_layout Standard This page offers a brief overview of what it's like to use Markdown. The \begin_inset CommandInset href LatexCommand href target "/projects/markdown/syntax" name "syntax page" \end_inset \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset CommandInset href LatexCommand href name "/projects/markdown/syntax" target "/projects/markdown/syntax" \end_inset \end_layout \end_inset provides complete, detailed documentation for every feature, but Markdown should be very easy to pick up simply by looking at a few examples of it in action. The examples on this page are written in a before/after style, showing example syntax and the HTML output produced by Markdown. \end_layout \begin_layout Standard It's also helpful to simply try Markdown out; the \begin_inset CommandInset href LatexCommand href target "/projects/markdown/dingus" name "Dingus" \end_inset \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset CommandInset href LatexCommand href name "/projects/markdown/dingus" target "/projects/markdown/dingus" \end_inset \end_layout \end_inset is a web application that allows you type your own Markdown-formatted text and translate it to XHTML. \end_layout \begin_layout Standard \series bold Note: \series default This document is itself written using Markdown; you can \begin_inset CommandInset href LatexCommand href target "/projects/markdown/basics.text" name "see the source for it by adding '.text' to the URL" \end_inset \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset CommandInset href LatexCommand href name "/projects/markdown/basics.text" target "/projects/markdown/basics.text" \end_inset \end_layout \end_inset . \end_layout \begin_layout Chapter Paragraphs, Headers, Blockquotes \begin_inset CommandInset label LatexCommand label name "chapt:paragraphsheadersblockquotes" \end_inset \end_layout \begin_layout Standard A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing spaces or tabs is considered blank.) Normal paragraphs should not be intended with spaces or tabs. \end_layout \begin_layout Standard Markdown offers two styles of headers: \emph on Setext \emph default and \emph on atx \emph default . Setext-style headers for \family typewriter

\family default and \family typewriter

\family default are created by \begin_inset Quotes eld \end_inset underlining \begin_inset Quotes erd \end_inset with equal signs ( \family typewriter = \family default ) and hyphens ( \family typewriter - \family default ), respectively. To create an atx-style header, you put 1--6 hash marks ( \family typewriter # \family default ) at the beginning of the line -- the number of hashes equals the resulting HTML header level. \end_layout \begin_layout Standard Blockquotes are indicated using email-style \begin_inset Quotes els \end_inset \family typewriter > \family default \begin_inset Quotes ers \end_inset angle brackets. \end_layout \begin_layout Standard Markdown: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout A First Level Header \end_layout \begin_layout Plain Layout ==================== \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout A Second Level Header \end_layout \begin_layout Plain Layout --------------------- \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout Now is the time for all good men to come to \end_layout \begin_layout Plain Layout the aid of their country. This is just a \end_layout \begin_layout Plain Layout regular paragraph. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout The quick brown fox jumped over the lazy \end_layout \begin_layout Plain Layout dog's back. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout ### Header 3 \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout > This is a blockquote. \end_layout \begin_layout Plain Layout > \end_layout \begin_layout Plain Layout > This is the second paragraph in the blockquote. \end_layout \begin_layout Plain Layout > \end_layout \begin_layout Plain Layout > ## This is an H2 in a blockquote \end_layout \end_inset \end_layout \begin_layout Standard Output: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

A First Level Header

\end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout

A Second Level Header

\end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout

Now is the time for all good men to come to \end_layout \begin_layout Plain Layout the aid of their country. This is just a \end_layout \begin_layout Plain Layout regular paragraph.

\end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout

The quick brown fox jumped over the lazy \end_layout \begin_layout Plain Layout dog's back.

\end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout

Header 3

\end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout
\end_layout \begin_layout Plain Layout

This is a blockquote.

\end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout

This is the second paragraph in the blockquote.

\end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout

This is an H2 in a blockquote

\end_layout \begin_layout Plain Layout
\end_layout \end_inset \end_layout \begin_layout Section Phrase Emphasis \begin_inset CommandInset label LatexCommand label name "secti:phraseemphasis" \end_inset \end_layout \begin_layout Standard Markdown uses asterisks and underscores to indicate spans of emphasis. \end_layout \begin_layout Standard Markdown: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout Some of these words *are emphasized*. \end_layout \begin_layout Plain Layout Some of these words _are emphasized also_. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout Use two asterisks for **strong emphasis**. \end_layout \begin_layout Plain Layout Or, if you prefer, __use two underscores instead__. \end_layout \end_inset \end_layout \begin_layout Standard Output: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

Some of these words are emphasized. \end_layout \begin_layout Plain Layout Some of these words are emphasized also.

\end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout

Use two asterisks for strong emphasis. \end_layout \begin_layout Plain Layout Or, if you prefer, use two underscores instead.

\end_layout \end_inset \end_layout \begin_layout Chapter Lists \begin_inset CommandInset label LatexCommand label name "chapt:lists" \end_inset \end_layout \begin_layout Standard Unordered (bulleted) lists use asterisks, pluses, and hyphens ( \family typewriter * \family default , \family typewriter + \family default , and \family typewriter - \family default ) as list markers. These three markers are interchangable; this: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout * Candy. \end_layout \begin_layout Plain Layout * Gum. \end_layout \begin_layout Plain Layout * Booze. \end_layout \end_inset \end_layout \begin_layout Standard this: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout + Candy. \end_layout \begin_layout Plain Layout + Gum. \end_layout \begin_layout Plain Layout + Booze. \end_layout \end_inset \end_layout \begin_layout Standard and this: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout - Candy. \end_layout \begin_layout Plain Layout - Gum. \end_layout \begin_layout Plain Layout - Booze. \end_layout \end_inset \end_layout \begin_layout Standard all produce the same output: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout \end_layout \end_inset \end_layout \begin_layout Standard Ordered (numbered) lists use regular numbers, followed by periods, as list markers: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout 1. Red \end_layout \begin_layout Plain Layout 2. Green \end_layout \begin_layout Plain Layout 3. Blue \end_layout \end_inset \end_layout \begin_layout Standard Output: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout
    \end_layout \begin_layout Plain Layout
  1. Red
  2. \end_layout \begin_layout Plain Layout
  3. Green
  4. \end_layout \begin_layout Plain Layout
  5. Blue
  6. \end_layout \begin_layout Plain Layout
\end_layout \end_inset \end_layout \begin_layout Standard If you put blank lines between items, you'll get \family typewriter

\family default tags for the list item text. You can create multi-paragraph list items by indenting the paragraphs by 4 spaces or 1 tab: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout * A list item. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout With multiple paragraphs. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout * Another item in the list. \end_layout \end_inset \end_layout \begin_layout Standard Output: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

\end_layout \end_inset \end_layout \begin_layout Section Links \begin_inset CommandInset label LatexCommand label name "secti:links" \end_inset \end_layout \begin_layout Standard Markdown supports two styles for creating links: \emph on inline \emph default and \emph on reference \emph default . With both styles, you use square brackets to delimit the text you want to turn into a link. \end_layout \begin_layout Standard Inline-style links use parentheses immediately after the link text. For example: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout This is an [example link](http://example.com/). \end_layout \end_inset \end_layout \begin_layout Standard Output: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

This is an \end_layout \begin_layout Plain Layout example link.

\end_layout \end_inset \end_layout \begin_layout Standard Optionally, you may include a title attribute in the parentheses: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout This is an [example link](http://example.com/ "With a Title"). \end_layout \end_inset \end_layout \begin_layout Standard Output: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

This is an \end_layout \begin_layout Plain Layout example link.

\end_layout \end_inset \end_layout \begin_layout Standard Reference-style links allow you to refer to your links by names, which you define elsewhere in your document: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout I get 10 times more traffic from [Google][1] than from \end_layout \begin_layout Plain Layout [Yahoo][2] or [MSN][3]. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout [1]: http://google.com/ "Google" \end_layout \begin_layout Plain Layout [2]: http://search.yahoo.com/ "Yahoo Search" \end_layout \begin_layout Plain Layout [3]: http://search.msn.com/ "MSN Search" \end_layout \end_inset \end_layout \begin_layout Standard Output: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

I get 10 times more traffic from Google than from Yahoo or MSN.

\end_layout \end_inset \end_layout \begin_layout Standard The title attribute is optional. Link names may contain letters, numbers and spaces, but are \emph on not \emph default case sensitive: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout I start my morning with a cup of coffee and \end_layout \begin_layout Plain Layout [The New York Times][NY Times]. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout [ny times]: http://www.nytimes.com/ \end_layout \end_inset \end_layout \begin_layout Standard Output: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

I start my morning with a cup of coffee and \end_layout \begin_layout Plain Layout The New York Times.

\end_layout \end_inset \end_layout \begin_layout Section Images \begin_inset CommandInset label LatexCommand label name "secti:images" \end_inset \end_layout \begin_layout Standard Image syntax is very much like link syntax. \end_layout \begin_layout Standard Inline (titles are optional): \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout ![alt text](/path/to/img.jpg "Title") \end_layout \end_inset \end_layout \begin_layout Standard Reference-style: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout ![alt text][id] \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout [id]: /path/to/img.jpg "Title" \end_layout \end_inset \end_layout \begin_layout Standard Both of the above examples produce the same output: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout alt text \end_layout \end_inset \end_layout \begin_layout Section Code \begin_inset CommandInset label LatexCommand label name "secti:code" \end_inset \end_layout \begin_layout Standard In a regular paragraph, you can create code span by wrapping text in backtick quotes. Any ampersands ( \family typewriter & \family default ) and angle brackets ( \family typewriter < \family default or \family typewriter > \family default ) will automatically be translated into HTML entities. This makes it easy to use Markdown to write about HTML example code: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout I strongly recommend against using any `` tags. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout I wish SmartyPants used named entities like `—` \end_layout \begin_layout Plain Layout instead of decimal-encoded entites like `—`. \end_layout \end_inset \end_layout \begin_layout Standard Output: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

I strongly recommend against using any \end_layout \begin_layout Plain Layout <blink> tags.

\end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout

I wish SmartyPants used named entities like \end_layout \begin_layout Plain Layout &mdash; instead of decimal-encoded \end_layout \begin_layout Plain Layout entites like &#8212;.

\end_layout \end_inset \end_layout \begin_layout Standard To specify an entire block of pre-formatted code, indent every line of the block by 4 spaces or 1 tab. Just like with code spans, \family typewriter & \family default , \family typewriter < \family default , and \family typewriter > \family default characters will be escaped automatically. \end_layout \begin_layout Standard Markdown: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout If you want your page to validate under XHTML 1.0 Strict, \end_layout \begin_layout Plain Layout you've got to put paragraph tags in your blockquotes: \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout
\end_layout \begin_layout Plain Layout

For example.

\end_layout \begin_layout Plain Layout
\end_layout \end_inset \end_layout \begin_layout Standard Output: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

If you want your page to validate under XHTML 1.0 Strict, \end_layout \begin_layout Plain Layout you've got to put paragraph tags in your blockquotes:

\end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout
<blockquote>
\end_layout

\begin_layout Plain Layout

    <p>For example.</p>
\end_layout

\begin_layout Plain Layout

</blockquote>
\end_layout

\begin_layout Plain Layout

\end_layout \end_inset \end_layout \end_body \end_document