#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: Syntax \begin_inset CommandInset label LatexCommand label name "part:markdown:syntax" \end_inset \end_layout \begin_layout Itemize Overview ( \begin_inset CommandInset ref LatexCommand formatted reference "overview" \end_inset ) \end_layout \begin_deeper \begin_layout Itemize Philosophy ( \begin_inset CommandInset ref LatexCommand formatted reference "philosophy" \end_inset ) \end_layout \begin_layout Itemize Inline HTML ( \begin_inset CommandInset ref LatexCommand formatted reference "html" \end_inset ) \end_layout \begin_layout Itemize Automatic Escaping for Special Characters ( \begin_inset CommandInset ref LatexCommand formatted reference "autoescape" \end_inset ) \end_layout \end_deeper \begin_layout Itemize Block Elements ( \begin_inset CommandInset ref LatexCommand formatted reference "block" \end_inset ) \end_layout \begin_deeper \begin_layout Itemize Paragraphs and Line Breaks ( \begin_inset CommandInset ref LatexCommand formatted reference "p" \end_inset ) \end_layout \begin_layout Itemize Headers ( \begin_inset CommandInset ref LatexCommand formatted reference "header" \end_inset ) \end_layout \begin_layout Itemize Blockquotes ( \begin_inset CommandInset ref LatexCommand formatted reference "blockquote" \end_inset ) \end_layout \begin_layout Itemize Lists ( \begin_inset CommandInset ref LatexCommand formatted reference "list" \end_inset ) \end_layout \begin_layout Itemize Code Blocks ( \begin_inset CommandInset ref LatexCommand formatted reference "precode" \end_inset ) \end_layout \begin_layout Itemize Horizontal Rules ( \begin_inset CommandInset ref LatexCommand formatted reference "hr" \end_inset ) \end_layout \end_deeper \begin_layout Itemize Span Elements ( \begin_inset CommandInset ref LatexCommand formatted reference "span" \end_inset ) \end_layout \begin_deeper \begin_layout Itemize Links ( \begin_inset CommandInset ref LatexCommand formatted reference "link" \end_inset ) \end_layout \begin_layout Itemize Emphasis ( \begin_inset CommandInset ref LatexCommand formatted reference "em" \end_inset ) \end_layout \begin_layout Itemize Code ( \begin_inset CommandInset ref LatexCommand formatted reference "code" \end_inset ) \end_layout \begin_layout Itemize Images ( \begin_inset CommandInset ref LatexCommand formatted reference "img" \end_inset ) \end_layout \end_deeper \begin_layout Itemize Miscellaneous ( \begin_inset CommandInset ref LatexCommand formatted reference "misc" \end_inset ) \end_layout \begin_deeper \begin_layout Itemize Backslash Escapes ( \begin_inset CommandInset ref LatexCommand formatted reference "backslash" \end_inset ) \end_layout \begin_layout Itemize Automatic Links ( \begin_inset CommandInset ref LatexCommand formatted reference "autolink" \end_inset ) \end_layout \end_deeper \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/syntax.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/syntax.text" target "/projects/markdown/syntax.text" \end_inset \end_layout \end_inset . \end_layout \begin_layout Standard \begin_inset CommandInset line LatexCommand rule offset "0.5ex" width "100col%" height "1pt" \end_inset \end_layout \begin_layout Standard Markdown is intended to be as easy-to-read and easy-to-write as is feasible. \end_layout \begin_layout Standard Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters -- including \begin_inset CommandInset href LatexCommand href target "http://docutils.sourceforge.net/mirror/setext.html" name "Setext" \end_inset \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset CommandInset href LatexCommand href name "http://docutils.sourceforge.net/mirror/setext.html" target "http://docutils.sourceforge.net/mirror/setext.html" \end_inset \end_layout \end_inset , \begin_inset CommandInset href LatexCommand href target "http://www.aaronsw.com/2002/atx/" name "atx" \end_inset \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset CommandInset href LatexCommand href name "http://www.aaronsw.com/2002/atx/" target "http://www.aaronsw.com/2002/atx/" \end_inset \end_layout \end_inset , \begin_inset CommandInset href LatexCommand href target "http://textism.com/tools/textile/" name "Textile" \end_inset \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset CommandInset href LatexCommand href name "http://textism.com/tools/textile/" target "http://textism.com/tools/textile/" \end_inset \end_layout \end_inset , \begin_inset CommandInset href LatexCommand href target "http://docutils.sourceforge.net/rst.html" name "reStructuredText" \end_inset \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset CommandInset href LatexCommand href name "http://docutils.sourceforge.net/rst.html" target "http://docutils.sourceforge.net/rst.html" \end_inset \end_layout \end_inset , \begin_inset CommandInset href LatexCommand href target "http://www.triptico.com/software/grutatxt.html" name "Grutatext" \end_inset \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset CommandInset href LatexCommand href name "http://www.triptico.com/software/grutatxt.html" target "http://www.triptico.com/software/grutatxt.html" \end_inset \end_layout \end_inset , and \begin_inset CommandInset href LatexCommand href target "http://ettext.taint.org/doc/" name "EtText" \end_inset \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset CommandInset href LatexCommand href name "http://ettext.taint.org/doc/" target "http://ettext.taint.org/doc/" \end_inset \end_layout \end_inset -- the single biggest source of inspiration for Markdown's syntax is the format of plain text email. \end_layout \begin_layout Standard To this end, Markdown's syntax is comprised entirely of punctuation characters, which punctuation characters have been carefully chosen so as to look like what they mean. E.g., asterisks around a word actually look like *emphasis*. Markdown lists look like, well, lists. Even blockquotes look like quoted passages of text, assuming you've ever used email. \end_layout \begin_layout Standard Markdown's syntax is intended for one purpose: to be used as a format for \emph on writing \emph default for the web. \end_layout \begin_layout Standard Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags. The idea is \emph on not \emph default to create a syntax that makes it easier to insert HTML tags. In my opinion, HTML tags are already easy to insert. The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a \emph on publishing \emph default format; Markdown is a \emph on writing \emph default format. Thus, Markdown's formatting syntax only addresses issues that can be conveyed in plain text. \end_layout \begin_layout Standard For any markup that is not covered by Markdown's syntax, you simply use HTML itself. There's no need to preface it or delimit it to indicate that you're switching from Markdown to HTML; you just use the tags. \end_layout \begin_layout Standard The only restrictions are that block-level HTML elements -- e.g. \family typewriter
\family default , \family typewriter \family default , \family typewriter
\family default
, 
\family typewriter

\family default , etc. -- must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra (unwanted) \family typewriter

\family default tags around HTML block-level tags. \end_layout \begin_layout Standard For example, to add an HTML table to a Markdown article: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout This is a regular paragraph. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout

\end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout
Foo
\end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout This is another regular paragraph. \end_layout \end_inset \end_layout \begin_layout Standard Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can't use Markdown-style \family typewriter *emphasis* \family default inside an HTML block. \end_layout \begin_layout Standard Span-level HTML tags -- e.g. \family typewriter \family default , \family typewriter \family default , or \family typewriter \family default -- can be used anywhere in a Markdown paragraph, list item, or header. If you want, you can even use HTML tags instead of Markdown formatting; e.g. if you'd prefer to use HTML \family typewriter \family default or \family typewriter \family default tags instead of Markdown's link or image syntax, go right ahead. \end_layout \begin_layout Standard Unlike block-level HTML tags, Markdown syntax \emph on is \emph default processed within span-level tags. \end_layout \begin_layout Standard In HTML, there are two characters that demand special treatment: \family typewriter < \family default and \family typewriter & \family default . Left angle brackets are used to start tags; ampersands are used to denote HTML entities. If you want to use them as literal characters, you must escape them as entities, e.g. \family typewriter < \family default , and \family typewriter & \family default . \end_layout \begin_layout Standard Ampersands in particular are bedeviling for web writers. If you want to write about \begin_inset Quotes els \end_inset AT&T \begin_inset Quotes ers \end_inset , you need to write \begin_inset Quotes els \end_inset \family typewriter AT&T \family default \begin_inset Quotes ers \end_inset . You even need to escape ampersands within URLs. Thus, if you want to link to: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout http://images.google.com/images?num=30&q=larry+bird \end_layout \end_inset \end_layout \begin_layout Standard you need to encode the URL as: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout http://images.google.com/images?num=30&q=larry+bird \end_layout \end_inset \end_layout \begin_layout Standard in your anchor tag \family typewriter href \family default attribute. Needless to say, this is easy to forget, and is probably the single most common source of HTML validation errors in otherwise well-marked-up web sites. \end_layout \begin_layout Standard Markdown allows you to use these characters naturally, taking care of all the necessary escaping for you. If you use an ampersand as part of an HTML entity, it remains unchanged; otherwise it will be translated into \family typewriter & \family default . \end_layout \begin_layout Standard So, if you want to include a copyright symbol in your article, you can write: \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 and Markdown will leave it alone. But if you write: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout AT&T \end_layout \end_inset \end_layout \begin_layout Standard Markdown will translate it to: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout AT&T \end_layout \end_inset \end_layout \begin_layout Standard Similarly, because Markdown supports inline HTML ( \begin_inset CommandInset ref LatexCommand formatted reference "html" \end_inset ), if you use angle brackets as delimiters for HTML tags, Markdown will treat them as such. But if you write: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout 4 < 5 \end_layout \end_inset \end_layout \begin_layout Standard Markdown will translate it to: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout 4 < 5 \end_layout \end_inset \end_layout \begin_layout Standard However, inside Markdown code spans and blocks, angle brackets and ampersands are \emph on always \emph default encoded automatically. This makes it easy to use Markdown to write about HTML code. (As opposed to raw HTML, which is a terrible format for writing about HTML syntax, because every single \family typewriter < \family default and \family typewriter & \family default in your example code needs to be escaped.) \end_layout \begin_layout Standard \begin_inset CommandInset line LatexCommand rule offset "0.5ex" width "100col%" height "1pt" \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 but spaces or tabs is considered blank.) Normal paragraphs should not be intended with spaces or tabs. \end_layout \begin_layout Standard The implication of the \begin_inset Quotes eld \end_inset one or more consecutive lines of text \begin_inset Quotes erd \end_inset rule is that Markdown supports \begin_inset Quotes eld \end_inset hard-wrapped \begin_inset Quotes erd \end_inset text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type's \begin_inset Quotes eld \end_inset Convert Line Breaks \begin_inset Quotes erd \end_inset option) which translate every line break character in a paragraph into a \family typewriter
\family default tag. \end_layout \begin_layout Standard When you \emph on do \emph default want to insert a \family typewriter
\family default break tag using Markdown, you end a line with two or more spaces, then type return. \end_layout \begin_layout Standard Yes, this takes a tad more effort to create a \family typewriter
\family default , but a simplistic \begin_inset Quotes eld \end_inset every line break is a \family typewriter
\family default \begin_inset Quotes erd \end_inset rule wouldn't work for Markdown. Markdown's email-style blockquoting ( \begin_inset CommandInset ref LatexCommand formatted reference "blockquote" \end_inset ) and multi-paragraph list items ( \begin_inset CommandInset ref LatexCommand formatted reference "list" \end_inset ) work best -- and look better -- when you format them with hard breaks. \end_layout \begin_layout Standard Markdown supports two styles of headers, \begin_inset CommandInset href LatexCommand href target "http://docutils.sourceforge.net/mirror/setext.html" name "Setext" \end_inset \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset CommandInset href LatexCommand href name "http://docutils.sourceforge.net/mirror/setext.html" target "http://docutils.sourceforge.net/mirror/setext.html" \end_inset \end_layout \end_inset and \begin_inset CommandInset href LatexCommand href target "http://www.aaronsw.com/2002/atx/" name "atx" \end_inset \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset CommandInset href LatexCommand href name "http://www.aaronsw.com/2002/atx/" target "http://www.aaronsw.com/2002/atx/" \end_inset \end_layout \end_inset . \end_layout \begin_layout Standard Setext-style headers are \begin_inset Quotes eld \end_inset underlined \begin_inset Quotes erd \end_inset using equal signs (for first-level headers) and dashes (for second-level headers). 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 H1 \end_layout \begin_layout Plain Layout ============= \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout This is an H2 \end_layout \begin_layout Plain Layout ------------- \end_layout \end_inset \end_layout \begin_layout Standard Any number of underlining \family typewriter = \family default 's or \family typewriter - \family default 's will work. \end_layout \begin_layout Standard Atx-style headers use 1--6 hash characters at the start of the line, corresponding to header levels 1--6. 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 H1 \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout ## This is an H2 \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout ###### This is an H6 \end_layout \end_inset \end_layout \begin_layout Standard Optionally, you may \begin_inset Quotes eld \end_inset close \begin_inset Quotes erd \end_inset atx-style headers. This is purely cosmetic -- you can use this if you think it looks better. The closing hashes don't even need to match the number of hashes used to open the header. (The number of opening hashes determines the header level.) : \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout # This is an H1 # \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout ## This is an H2 ## \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout ### This is an H3 ###### \end_layout \end_inset \end_layout \begin_layout Standard Markdown uses email-style \family typewriter > \family default characters for blockquoting. If you're familiar with quoting passages of text in an email message, then you know how to create a blockquote in Markdown. It looks best if you hard wrap the text and put a \family typewriter > \family default before every line: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, \end_layout \begin_layout Plain Layout > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. \end_layout \begin_layout Plain Layout > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. \end_layout \begin_layout Plain Layout > \end_layout \begin_layout Plain Layout > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse \end_layout \begin_layout Plain Layout > id sem consectetuer libero luctus adipiscing. \end_layout \end_inset \end_layout \begin_layout Standard Markdown allows you to be lazy and only put the \family typewriter > \family default before the first line of a hard-wrapped paragraph: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, \end_layout \begin_layout Plain Layout consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. \end_layout \begin_layout Plain Layout Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse \end_layout \begin_layout Plain Layout id sem consectetuer libero luctus adipiscing. \end_layout \end_inset \end_layout \begin_layout Standard Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding additional levels of \family typewriter > \family default : \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout > This is the first level of quoting. \end_layout \begin_layout Plain Layout > \end_layout \begin_layout Plain Layout > > This is nested blockquote. \end_layout \begin_layout Plain Layout > \end_layout \begin_layout Plain Layout > Back to the first level. \end_layout \end_inset \end_layout \begin_layout Standard Blockquotes can contain other Markdown elements, including headers, lists, and code blocks: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout > ## This is a header. \end_layout \begin_layout Plain Layout > \end_layout \begin_layout Plain Layout > 1. This is the first list item. \end_layout \begin_layout Plain Layout > 2. This is the second list item. \end_layout \begin_layout Plain Layout > \end_layout \begin_layout Plain Layout > Here's some example code: \end_layout \begin_layout Plain Layout > \end_layout \begin_layout Plain Layout > return shell_exec("echo $input | $markdown_script"); \end_layout \end_inset \end_layout \begin_layout Standard Any decent text editor should make email-style quoting easy. For example, with BBEdit, you can make a selection and choose Increase Quote Level from the Text menu. \end_layout \begin_layout Standard Markdown supports ordered (numbered) and unordered (bulleted) lists. \end_layout \begin_layout Standard Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list markers: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout * Red \end_layout \begin_layout Plain Layout * Green \end_layout \begin_layout Plain Layout * Blue \end_layout \end_inset \end_layout \begin_layout Standard is equivalent to: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout + Red \end_layout \begin_layout Plain Layout + Green \end_layout \begin_layout Plain Layout + Blue \end_layout \end_inset \end_layout \begin_layout Standard and: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout - Red \end_layout \begin_layout Plain Layout - Green \end_layout \begin_layout Plain Layout - Blue \end_layout \end_inset \end_layout \begin_layout Standard Ordered lists use numbers followed by periods: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout 1. Bird \end_layout \begin_layout Plain Layout 2. McHale \end_layout \begin_layout Plain Layout 3. Parish \end_layout \end_inset \end_layout \begin_layout Standard It's important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. The HTML Markdown produces from the above list is: \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. Bird
  2. \end_layout \begin_layout Plain Layout
  3. McHale
  4. \end_layout \begin_layout Plain Layout
  5. Parish
  6. \end_layout \begin_layout Plain Layout
\end_layout \end_inset \end_layout \begin_layout Standard If you instead wrote the list in Markdown like this: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout 1. Bird \end_layout \begin_layout Plain Layout 1. McHale \end_layout \begin_layout Plain Layout 1. Parish \end_layout \end_inset \end_layout \begin_layout Standard or even: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout 3. Bird \end_layout \begin_layout Plain Layout 1. McHale \end_layout \begin_layout Plain Layout 8. Parish \end_layout \end_inset \end_layout \begin_layout Standard you'd get the exact same HTML output. The point is, if you want to, you can use ordinal numbers in your ordered Markdown lists, so that the numbers in your source match the numbers in your published HTML. But if you want to be lazy, you don't have to. \end_layout \begin_layout Standard If you do use lazy list numbering, however, you should still start the list with the number 1. At some point in the future, Markdown may support starting ordered lists at an arbitrary number. \end_layout \begin_layout Standard List markers typically start at the left margin, but may be indented by up to three spaces. List markers must be followed by one or more spaces or a tab. \end_layout \begin_layout Standard To make lists look nice, you can wrap items with hanging indents: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. \end_layout \begin_layout Plain Layout Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, \end_layout \begin_layout Plain Layout viverra nec, fringilla in, laoreet vitae, risus. \end_layout \begin_layout Plain Layout * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. \end_layout \begin_layout Plain Layout Suspendisse id sem consectetuer libero luctus adipiscing. \end_layout \end_inset \end_layout \begin_layout Standard But if you want to be lazy, you don't have to: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. \end_layout \begin_layout Plain Layout Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, \end_layout \begin_layout Plain Layout viverra nec, fringilla in, laoreet vitae, risus. \end_layout \begin_layout Plain Layout * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. \end_layout \begin_layout Plain Layout Suspendisse id sem consectetuer libero luctus adipiscing. \end_layout \end_inset \end_layout \begin_layout Standard If list items are separated by blank lines, Markdown will wrap the items in \family typewriter

\family default tags in the HTML output. For example, this input: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout * Bird \end_layout \begin_layout Plain Layout * Magic \end_layout \end_inset \end_layout \begin_layout Standard will turn into: \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
  • Bird
  • \end_layout \begin_layout Plain Layout
  • Magic
  • \end_layout \begin_layout Plain Layout
\end_layout \end_inset \end_layout \begin_layout Standard But this: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout * Bird \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout * Magic \end_layout \end_inset \end_layout \begin_layout Standard will turn into: \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
  • Bird

  • \end_layout \begin_layout Plain Layout
  • Magic

  • \end_layout \begin_layout Plain Layout
\end_layout \end_inset \end_layout \begin_layout Standard List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be intended by either 4 spaces or one tab: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout 1. This is a list item with two paragraphs. Lorem ipsum dolor \end_layout \begin_layout Plain Layout sit amet, consectetuer adipiscing elit. Aliquam hendrerit \end_layout \begin_layout Plain Layout mi posuere lectus. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout Vestibulum enim wisi, viverra nec, fringilla in, laoreet \end_layout \begin_layout Plain Layout vitae, risus. Donec sit amet nisl. Aliquam semper ipsum \end_layout \begin_layout Plain Layout sit amet velit. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout 2. Suspendisse id sem consectetuer libero luctus adipiscing. \end_layout \end_inset \end_layout \begin_layout Standard It looks nice if you indent every line of the subsequent paragraphs, but here again, Markdown will allow you to be lazy: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout * This is a list item with two paragraphs. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout This is the second paragraph in the list item. You're \end_layout \begin_layout Plain Layout only required to indent the first line. Lorem ipsum dolor \end_layout \begin_layout Plain Layout sit amet, consectetuer adipiscing elit. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout * Another item in the same list. \end_layout \end_inset \end_layout \begin_layout Standard To put a blockquote within a list item, the blockquote's \family typewriter > \family default delimiters need to be indented: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout * A list item with a blockquote: \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout > This is a blockquote \end_layout \begin_layout Plain Layout > inside a list item. \end_layout \end_inset \end_layout \begin_layout Standard To put a code block within a list item, the code block needs to be indented \emph on twice \emph default -- 8 spaces or two tabs: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout * A list item with a code block: \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout \end_layout \end_inset \end_layout \begin_layout Standard It's worth noting that it's possible to trigger an ordered list by accident, by writing something like this: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout 1986. What a great season. \end_layout \end_inset \end_layout \begin_layout Standard In other words, a \emph on number-period-space \emph default sequence at the beginning of a line. To avoid this, you can backslash-escape the period: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout 1986 \backslash . What a great season. \end_layout \end_inset \end_layout \begin_layout Standard Pre-formatted code blocks are used for writing about programming or markup source code. Rather than forming normal paragraphs, the lines of a code block are interpreted literally. Markdown wraps a code block in both \family typewriter
\family default
 and 
\family typewriter

\family default
 tags.
\end_layout

\begin_layout Standard
To produce a code block in Markdown, simply indent every line of the
 block by at least 4 spaces or 1 tab. For example, given this input:
\end_layout
\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\footnotesize\ttfamily}"
inline false
status collapsed

\begin_layout Plain Layout

This is a normal paragraph:
\end_layout

\begin_layout Plain Layout


\end_layout

\begin_layout Plain Layout

    This is a code block.
\end_layout

\end_inset
\end_layout

\begin_layout Standard
Markdown will generate:
\end_layout
\begin_layout Standard
\begin_inset listings
lstparams "basicstyle={\footnotesize\ttfamily}"
inline false
status collapsed

\begin_layout Plain Layout

This is a normal paragraph:

\end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout
This is a code block.
\end_layout

\begin_layout Plain Layout

\end_layout \end_inset \end_layout \begin_layout Standard One level of indentation -- 4 spaces or 1 tab -- is removed from each line of the code block. For example, this: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout Here is an example of AppleScript: \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout tell application "Foo" \end_layout \begin_layout Plain Layout beep \end_layout \begin_layout Plain Layout end tell \end_layout \end_inset \end_layout \begin_layout Standard will turn into: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

Here is an example of AppleScript:

\end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout
tell application "Foo"
\end_layout

\begin_layout Plain Layout

    beep
\end_layout

\begin_layout Plain Layout

end tell
\end_layout

\begin_layout Plain Layout

\end_layout \end_inset \end_layout \begin_layout Standard A code block continues until it reaches a line that is not indented (or the end of the article). \end_layout \begin_layout Standard Within a code block, ampersands ( \family typewriter & \family default ) and angle brackets ( \family typewriter < \family default and \family typewriter > \family default ) are automatically converted into HTML entities. This makes it very easy to include example HTML source code using Markdown -- just paste it and indent it, and Markdown will handle the hassle of encoding the ampersands and angle brackets. For example, this: \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 will turn into: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout
<div class="footer">
\end_layout

\begin_layout Plain Layout

    &copy; 2004 Foo Corporation
\end_layout

\begin_layout Plain Layout

</div>
\end_layout

\begin_layout Plain Layout

\end_layout \end_inset \end_layout \begin_layout Standard Regular Markdown syntax is not processed within code blocks. E.g., asterisks are just literal asterisks within a code block. This means it's also easy to use Markdown to write about Markdown's own syntax. \end_layout \begin_layout Standard You can produce a horizontal rule tag ( \family typewriter
\family default ) by placing three or more hyphens, asterisks, or underscores on a line by themselves. If you wish, you may use spaces between the hyphens or asterisks. Each of the following lines will produce a horizontal rule: \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 \end_layout \begin_layout Plain Layout *** \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout ***** \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout - - - \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout --------------------------------------- \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout _ _ _ \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset CommandInset line LatexCommand rule offset "0.5ex" width "100col%" height "1pt" \end_inset \end_layout \begin_layout Standard Markdown supports two style of links: \emph on inline \emph default and \emph on reference \emph default . \end_layout \begin_layout Standard In both styles, the link text is delimited by [square brackets]. \end_layout \begin_layout Standard To create an inline link, use a set of regular parentheses immediately after the link text's closing square bracket. Inside the parentheses, put the URL where you want the link to point, along with an \emph on optional \emph default title for the link, surrounded in quotes. 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](http://example.com/ "Title") inline link. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout [This link](http://example.net/) has no title attribute. \end_layout \end_inset \end_layout \begin_layout Standard Will produce: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

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

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

This link has no \end_layout \begin_layout Plain Layout title attribute.

\end_layout \end_inset \end_layout \begin_layout Standard If you're referring to a local resource on the same server, you can use relative paths: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout See my [About](/about/) page for details. \end_layout \end_inset \end_layout \begin_layout Standard Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout This is [an example][id] reference-style link. \end_layout \end_inset \end_layout \begin_layout Standard You can optionally use a space to separate the sets of brackets: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout This is [an example] [id] reference-style link. \end_layout \end_inset \end_layout \begin_layout Standard Then, anywhere in the document, you define your link label like this, on a line by itself: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout [id]: http://example.com/ "Optional Title Here" \end_layout \end_inset \end_layout \begin_layout Standard That is: \end_layout \begin_layout Itemize Square brackets containing the link identifier (optionally indented from the left margin using up to three spaces); \end_layout \begin_layout Itemize followed by a colon; \end_layout \begin_layout Itemize followed by one or more spaces (or tabs); \end_layout \begin_layout Itemize followed by the URL for the link; \end_layout \begin_layout Itemize optionally followed by a title attribute for the link, enclosed in double or single quotes. \end_layout \begin_layout Standard The link URL may, optionally, be surrounded by angle brackets: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout [id]: "Optional Title Here" \end_layout \end_inset \end_layout \begin_layout Standard You can put the title attribute on the next line and use extra spaces or tabs for padding, which tends to look better with longer URLs: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout [id]: http://example.com/longish/path/to/resource/here \end_layout \begin_layout Plain Layout "Optional Title Here" \end_layout \end_inset \end_layout \begin_layout Standard Link definitions are only used for creating links during Markdown processing, and are stripped from your document in the HTML output. \end_layout \begin_layout Standard Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are \emph on not \emph default case sensitive. E.g. these two links: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout [link text][a] \end_layout \begin_layout Plain Layout [link text][A] \end_layout \end_inset \end_layout \begin_layout Standard are equivalent. \end_layout \begin_layout Standard The \emph on implicit link name \emph default shortcut allows you to omit the name of the link, in which case the link text itself is used as the name. Just use an empty set of square brackets -- e.g., to link the word \begin_inset Quotes eld \end_inset Google \begin_inset Quotes erd \end_inset to the google.com web site, you could simply write: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout [Google][] \end_layout \end_inset \end_layout \begin_layout Standard And then define the link: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout [Google]: http://google.com/ \end_layout \end_inset \end_layout \begin_layout Standard Because link names may contain spaces, this shortcut even works for multiple words in the link text: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout Visit [Daring Fireball][] for more information. \end_layout \end_inset \end_layout \begin_layout Standard And then define the link: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout [Daring Fireball]: http://daringfireball.net/ \end_layout \end_inset \end_layout \begin_layout Standard Link definitions can be placed anywhere in your Markdown document. I tend to put them immediately after each paragraph in which they're used, but if you want, you can put them all at the end of your document, sort of like footnotes. \end_layout \begin_layout Standard Here's an example of reference links in action: \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 Using the implicit link name shortcut, you could instead write: \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 \end_layout \begin_layout Plain Layout [Yahoo][] or [MSN][]. \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout [google]: http://google.com/ "Google" \end_layout \begin_layout Plain Layout [yahoo]: http://search.yahoo.com/ "Yahoo Search" \end_layout \begin_layout Plain Layout [msn]: http://search.msn.com/ "MSN Search" \end_layout \end_inset \end_layout \begin_layout Standard Both of the above examples will produce the following HTML 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 \end_layout \begin_layout Plain Layout Yahoo \end_layout \begin_layout Plain Layout or MSN.

\end_layout \end_inset \end_layout \begin_layout Standard For comparison, here is the same paragraph written using Markdown's inline link style: \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](http://google.com/ "Google") \end_layout \begin_layout Plain Layout than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or \end_layout \begin_layout Plain Layout [MSN](http://search.msn.com/ "MSN Search"). \end_layout \end_inset \end_layout \begin_layout Standard The point of reference-style links is not that they're easier to write. The point is that with reference-style links, your document source is vastly more readable. Compare the above examples: using reference-style links, the paragraph itself is only 81 characters long; with inline-style links, it's 176 characters; and as raw HTML, it's 234 characters. In the raw HTML, there's more markup than there is text. \end_layout \begin_layout Standard With Markdown's reference-style links, a source document much more closely resembles the final output, as rendered in a browser. By allowing you to move the markup-related metadata out of the paragraph, you can add links without interrupting the narrative flow of your prose. \end_layout \begin_layout Standard Markdown treats asterisks ( \family typewriter * \family default ) and underscores ( \family typewriter _ \family default ) as indicators of emphasis. Text wrapped with one \family typewriter * \family default or \family typewriter _ \family default will be wrapped with an HTML \family typewriter \family default tag; double \family typewriter * \family default 's or \family typewriter _ \family default 's will be wrapped with an HTML \family typewriter \family default tag. E.g., this input: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout *single asterisks* \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout _single underscores_ \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout **double asterisks** \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout __double underscores__ \end_layout \end_inset \end_layout \begin_layout Standard will produce: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout single asterisks \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout single underscores \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout double asterisks \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout double underscores \end_layout \end_inset \end_layout \begin_layout Standard You can use whichever style you prefer; the lone restriction is that the same character must be used to open and close an emphasis span. \end_layout \begin_layout Standard Emphasis can be used in the middle of a word: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout un*fucking*believable \end_layout \end_inset \end_layout \begin_layout Standard But if you surround an \family typewriter * \family default or \family typewriter _ \family default with spaces, it'll be treated as a literal asterisk or underscore. \end_layout \begin_layout Standard To produce a literal asterisk or underscore at a position where it would otherwise be used as an emphasis delimiter, you can backslash escape it: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout \backslash *this text is surrounded by literal asterisks \backslash * \end_layout \end_inset \end_layout \begin_layout Standard To indicate a span of code, wrap it with backtick quotes ( \family typewriter ` \family default ). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout Use the `printf()` function. \end_layout \end_inset \end_layout \begin_layout Standard will produce: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

Use the printf() function.

\end_layout \end_inset \end_layout \begin_layout Standard To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout ``There is a literal backtick (`) here.`` \end_layout \end_inset \end_layout \begin_layout Standard which will produce this: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

There is a literal backtick (`) here.

\end_layout \end_inset \end_layout \begin_layout Standard The backtick delimiters surrounding a code span may include spaces -- one after the opening, one before the closing. This allows you to place literal backtick characters at the beginning or end of a code span: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout A single backtick in a code span: `` ` `` \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout A backtick-delimited string in a code span: `` `foo` `` \end_layout \end_inset \end_layout \begin_layout Standard will produce: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

A single backtick in a code span: `

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

A backtick-delimited string in a code span: `foo`

\end_layout \end_inset \end_layout \begin_layout Standard With a code span, ampersands and angle brackets are encoded as HTML entities automatically, which makes it easy to include example HTML tags. Markdown will turn this: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout Please don't use any `` tags. \end_layout \end_inset \end_layout \begin_layout Standard into: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

Please don't use any <blink> tags.

\end_layout \end_inset \end_layout \begin_layout Standard You can write this: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout `—` is the decimal-encoded equivalent of `—`. \end_layout \end_inset \end_layout \begin_layout Standard to produce: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout

&#8212; is the decimal-encoded \end_layout \begin_layout Plain Layout equivalent of &mdash;.

\end_layout \end_inset \end_layout \begin_layout Standard Admittedly, it's fairly difficult to devise a \begin_inset Quotes eld \end_inset natural \begin_inset Quotes erd \end_inset syntax for placing images into a plain text document format. \end_layout \begin_layout Standard Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: \emph on inline \emph default and \emph on reference \emph default . \end_layout \begin_layout Standard Inline image syntax looks like this: \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) \end_layout \begin_layout Plain Layout \end_layout \begin_layout Plain Layout ![Alt text](/path/to/img.jpg "Optional title") \end_layout \end_inset \end_layout \begin_layout Standard That is: \end_layout \begin_layout Itemize An exclamation mark: \family typewriter ! \family default ; \end_layout \begin_layout Itemize followed by a set of square brackets, containing the \family typewriter alt \family default attribute text for the image; \end_layout \begin_layout Itemize followed by a set of parentheses, containing the URL or path to the image, and an optional \family typewriter title \family default attribute enclosed in double or single quotes. \end_layout \begin_layout Standard Reference-style image syntax looks like this: \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 \end_inset \end_layout \begin_layout Standard Where \begin_inset Quotes eld \end_inset id \begin_inset Quotes erd \end_inset is the name of a defined image reference. Image references are defined using syntax identical to link references: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout [id]: url/to/image "Optional title attribute" \end_layout \end_inset \end_layout \begin_layout Standard As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can simply use regular HTML \family typewriter \family default tags. \end_layout \begin_layout Standard \begin_inset CommandInset line LatexCommand rule offset "0.5ex" width "100col%" height "1pt" \end_inset \end_layout \begin_layout Standard Markdown supports a shortcut style for creating \begin_inset Quotes eld \end_inset automatic \begin_inset Quotes erd \end_inset links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this: \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 Markdown will turn this into: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout http://example.com/ \end_layout \end_inset \end_layout \begin_layout Standard Automatic links for email addresses work similarly, except that Markdown will also perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting spambots. For example, Markdown will turn this: \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 into something like this: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout address@exa \end_layout \begin_layout Plain Layout mple.com \end_layout \end_inset \end_layout \begin_layout Standard which will render in a browser as a clickable link to \begin_inset Quotes eld \end_inset address@example.com \begin_inset Quotes erd \end_inset . \end_layout \begin_layout Standard (This sort of entity-encoding trick will indeed fool many, if not most, address-harvesting bots, but it definitely won't fool all of them. It's better than nothing, but an address published in this way will probably eventually start receiving spam.) \end_layout \begin_layout Standard Markdown allows you to use backslash escapes to generate literal characters which would otherwise have special meaning in Markdown's formatting syntax. For example, if you wanted to surround a word with literal asterisks (instead of an HTML \family typewriter \family default tag), you can backslashes before the asterisks, like this: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout \backslash *literal asterisks \backslash * \end_layout \end_inset \end_layout \begin_layout Standard Markdown provides backslash escapes for the following characters: \end_layout \begin_layout Standard \begin_inset listings lstparams "basicstyle={\footnotesize\ttfamily}" inline false status collapsed \begin_layout Plain Layout \backslash backslash \end_layout \begin_layout Plain Layout ` backtick \end_layout \begin_layout Plain Layout * asterisk \end_layout \begin_layout Plain Layout _ underscore \end_layout \begin_layout Plain Layout {} curly braces \end_layout \begin_layout Plain Layout [] square brackets \end_layout \begin_layout Plain Layout () parentheses \end_layout \begin_layout Plain Layout # hash mark \end_layout \begin_layout Plain Layout + plus sign \end_layout \begin_layout Plain Layout - minus sign (hyphen) \end_layout \begin_layout Plain Layout . dot \end_layout \begin_layout Plain Layout ! exclamation mark \end_layout \end_inset \end_layout \end_body \end_document