maruku 0.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/marutex +0 -1
- data/docs/Makefile +2 -2
- data/docs/index.html +7 -5
- data/docs/markdown_syntax.log +21 -21
- data/docs/markdown_syntax.pdf +0 -0
- data/docs/markdown_syntax.tex +110 -111
- data/docs/maruku.html +7 -5
- data/docs/maruku.log +30 -54
- data/docs/maruku.md +27 -13
- data/docs/maruku.pdf +0 -0
- data/docs/maruku.tex +75 -60
- data/docs/todo.md +1 -10
- data/lib/maruku/parse_span.rb +109 -38
- data/lib/maruku/to_latex.rb +23 -12
- data/tests/links.md +7 -0
- data/tests/sss06.md +10 -10
- metadata +1 -1
data/bin/marutex
CHANGED
data/docs/Makefile
CHANGED
data/docs/index.html
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
<?xml version='1.0'?>
|
2
2
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
3
3
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
4
|
-
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><title>Maruku, a Markdown interpreter</title><link href='style.css' rel='stylesheet' type='text/css' /></head><head><title>Maruku, a Markdown interpreter</title><link href='style.css' rel='stylesheet' type='text/css' /></head><body><h1>Mar<strong>u</strong>k<strong>u</strong>: a Markdown interpreter</h1><p>Maruku is a Markdown interpreter written in <a href='http://www.ruby-lang.org'>Ruby</a>.</p><p>Maruku allows you to write in an easy-to-read-and-write syntax, like this:</p><blockquote><p><a href='http://maruku.rubyforge.org/maruku.md'>This document in Markdown</a></p></blockquote><p>Then it can be translated to HTML:</p><blockquote><p><a href='http://maruku.rubyforge.org/maruku.html'>This document in HTML</a></p></blockquote><p>or Latex, which is then converted to PDF:</p><blockquote><p><a href='http://maruku.rubyforge.org/maruku.pdf'>This document in PDF</a></p></blockquote><p>Maruku implements the original <a href='http://daringfireball.net/projects/markdown/syntax'>Markdown syntax</a> (<a href='http://maruku.rubyforge.org/markdown_syntax.html'>HTML</a> or <a href='http://maruku.rubyforge.org/markdown_syntax.pdf'>PDF</a>, translated by Maruku).</p><p>Markdown implements also all the improvements in <a href='http://www.michelf.com/projects/php-markdown/extra/'>PHP Markdown Extra</a>.</p><p>Moreover, it implements ideas from <a href='http://fletcher.freeshell.org/wiki/MultiMarkdown'>MultiMarkdown</a>.</p><hr /><p><em>Table of contents</em>:</p><ul><li><p><a href='#download'>Download</a></p></li><li><p><a href='#usage'>Usage</a></p></li><li><p><a href='#extra'>Examples of PHP Markdown extra syntax</a></p></li><li><p><a href='#meta'>New metadata syntax</a></p></li><li><p><a href='#metalist'>List of metadata</a></p></li><li><p><a href='#maruku-and-bluecloth'>Maruku and Bluecloth</a></p></li><li><p><a href='#future'>Future developments</a></p><ul><li><a href='#future-export'>Export to other formats</a></li><li><a href='#future-syntax'>Syntax additions</a></li></ul></li></ul><hr /><h2 class='head' id='download'>Download</h2><p>The development site is <a href='http://
|
4
|
+
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><title>Maruku, a Markdown interpreter</title><link href='style.css' rel='stylesheet' type='text/css' /></head><head><title>Maruku, a Markdown interpreter</title><link href='style.css' rel='stylesheet' type='text/css' /></head><body><h1>Mar<strong>u</strong>k<strong>u</strong>: a Markdown interpreter</h1><p><a href='http://maruku.rubyforge.org/>'>Maruku</a> is a Markdown interpreter written in <a href='http://www.ruby-lang.org'>Ruby</a>.</p><p>Maruku allows you to write in an easy-to-read-and-write syntax, like this:</p><blockquote><p><a href='http://maruku.rubyforge.org/maruku.md'>This document in Markdown</a></p></blockquote><p>Then it can be translated to HTML:</p><blockquote><p><a href='http://maruku.rubyforge.org/maruku.html'>This document in HTML</a></p></blockquote><p>or Latex, which is then converted to PDF:</p><blockquote><p><a href='http://maruku.rubyforge.org/maruku.pdf'>This document in PDF</a></p></blockquote><p>Maruku implements the original <a href='http://daringfireball.net/projects/markdown/syntax'>Markdown syntax</a> (<a href='http://maruku.rubyforge.org/markdown_syntax.html'>HTML</a> or <a href='http://maruku.rubyforge.org/markdown_syntax.pdf'>PDF</a>, translated by Maruku).</p><p>Markdown implements also all the improvements in <a href='http://www.michelf.com/projects/php-markdown/extra/'>PHP Markdown Extra</a>.</p><p>Moreover, it implements ideas from <a href='http://fletcher.freeshell.org/wiki/MultiMarkdown'>MultiMarkdown</a>.</p><h3>Authors</h3><p>Maruku has been developed so far by <a href='http://www.dis.uniroma1.it/~acensi/'>Andrea Censi</a>. Contributors are most welcome!</p><hr /><p><em>Table of contents</em>:</p><ul><li><p><a href='#download'>Download</a></p></li><li><p><a href='#usage'>Usage</a></p></li><li><p><a href='#extra'>Examples of PHP Markdown extra syntax</a></p></li><li><p><a href='#meta'>New metadata syntax</a></p></li><li><p><a href='#metalist'>List of metadata</a></p></li><li><p><a href='#maruku-and-bluecloth'>Maruku and Bluecloth</a></p></li><li><p><a href='#future'>Future developments</a></p><ul><li><a href='#future-export'>Export to other formats</a></li><li><a href='#future-syntax'>Syntax additions</a></li></ul></li></ul><hr /><h2 class='head' id='download'>Download</h2><p>The development site is <a href='http://rubyforge.org/projects/maruku/'>http://rubyforge.org/projects/maruku/</a>.</p><p>Download current <a href='http://rubygems.rubyforge.org/'>gem</a> at <a href='http://rubyforge.org/frs/?group_id=2795'>http://rubyforge.org/frs/?group_id=2795</a> or try to install with:</p><pre style='background-color: #f0f0e0;'>$ gem install maruku
|
5
|
+
</pre><p>Anonymous access to the repository is possible with:</p><pre style='background-color: #f0f0e0;'>$ svn checkout svn://rubyforge.org/var/svn/maruku
|
6
|
+
</pre><p>If you want commit-access, just create an account on Rubyforge and <a href='http://www.dis.uniroma1.it/~acensi/contact.html'>drop me a mail</a>.</p><h2>Usage</h2><p>This is the basic usage:</p><pre class='ruby' style='background-color: #f0f0e0;'><span class='ident'>require</span> <span class='punct'>'</span><span class='string'>maruku</span><span class='punct'>'</span>
|
5
7
|
|
6
8
|
<span class='ident'>doc</span> <span class='punct'>=</span> <span class='constant'>Maruku</span><span class='punct'>.</span><span class='ident'>new</span><span class='punct'>(</span><span class='ident'>markdown_string</span><span class='punct'>)</span>
|
7
9
|
<span class='ident'>puts</span> <span class='ident'>doc</span><span class='punct'>.</span><span class='ident'>to_html</span>
|
@@ -14,14 +16,14 @@
|
|
14
16
|
</pre><h2 id='extra'>Examples of PHP Markdown Extra syntax</h2><ul><li><p>tables</p><pre style='background-color: #f0f0e0;'>Col1 | Very very long head | Very very long head|
|
15
17
|
-----|:-------------------:|-------------------:|
|
16
18
|
cell | center-align | right-align |
|
17
|
-
</pre><table class='example'><thead><tr><th>Col1</th><th>Very very long head</th><th>Very very long head</th></tr></thead><tbody><tr><td style='text-align: left;'>cell</td><td style='text-align: center;'>center-align</td><td style='text-align: right;'>right-align</td></tr></tbody></table></li><li><p>footnotes <sup id='fnref:1'><a href='#fn:1' rel='footnote'>1</a></sup></p><pre style='background-color: #f0f0e0;'>*footnotes [^foot]
|
19
|
+
</pre><table class='example'><thead><tr><th>Col1</th><th>Very very long head</th><th>Very very long head</th></tr></thead><tbody><tr><td style='text-align: left;'>cell</td><td style='text-align: center;'>center-align</td><td style='text-align: right;'>right-align</td></tr></tbody></table></li><li><p>footnotes <sup id='fnref:1'><a href='#fn:1' rel='footnote'>1</a></sup></p><pre style='background-color: #f0f0e0;'>* footnotes [^foot]
|
18
20
|
|
19
21
|
[^foot]: I really was missing those.</pre></li><li><p>Markdown inside HTML elememnts</p></li></ul><pre class='xml' style='background-color: #f0f0e0;'><span class='punct'><</span><span class='tag'>div</span> <span class='attribute'>markdown</span><span class='punct'>="</span><span class='string'>1</span><span class='punct'>"</span> <span class='attribute'>style</span><span class='punct'>="</span><span class='string'>border: solid 1px black</span><span class='punct'>"></span>
|
20
22
|
This is a div with Markdown **strong text**
|
21
23
|
<span class='punct'></</span><span class='tag'>div</span><span class='punct'>></span>
|
22
24
|
</pre><div style='border: solid 1px black'><p>This is a div with Markdown <strong>strong text</strong></p></div><ul><li><p>header ids</p><pre style='background-color: #f0f0e0;'>## Header ## {#id}</pre><p>For example, <a href='#download'>a link to the download</a> header.</p></li><li><p>definition lists</p><pre style='background-color: #f0f0e0;'>Definition list
|
23
25
|
: something very hard to parse
|
24
|
-
</pre><dl><dt>Definition list</dt><dd>something very hard to parse</dd></dl></li><li><p>abbreviations or <abbr title='Simple an abbreviation'>ABB</abbr> for short.</p></li></ul><h2 id='maruku-and-bluecloth'>Maruku and Bluecloth</h2><p>The other Ruby implementation of Markdown is <a href='http://www.deveiate.org/projects/BlueCloth'>Bluecloth</a>.</p><p>Maruku is much different in philosophy from Bluecloth: the biggest difference is that <em>parsing</em> is separated from <em>rendering</em>. In Maruku, an in-memory representation of the Markdown document is created. Instead, Bluecloth mantains the document in memory as a String at all times, and does a series of <tt style='background-color: #f0f0e0;'>gsub</tt> to transform to HTML
|
26
|
+
</pre><dl><dt>Definition list</dt><dd>something very hard to parse</dd></dl></li><li><p>abbreviations or <abbr title='Simple an abbreviation'>ABB</abbr> for short.</p></li></ul><h2 id='maruku-and-bluecloth'>Maruku and Bluecloth</h2><p>The other Ruby implementation of Markdown is <a href='http://www.deveiate.org/projects/BlueCloth'>Bluecloth</a>.</p><p>Maruku is much different in philosophy from Bluecloth: the biggest difference is that <em>parsing</em> is separated from <em>rendering</em>. In Maruku, an in-memory representation of the Markdown document is created. Instead, Bluecloth mantains the document in memory as a String at all times, and does a series of <tt style='background-color: #f0f0e0;'>gsub</tt> to transform to HTML.</p><p>The in-memory representation makes it very easy to export to various formats (altough, for, now)</p><p>Other improvements over Bluecloth:</p><ul><li><p>the HTML output is provided also as a <tt style='background-color: #f0f0e0;'>REXML</tt> document tree.</p></li><li><p>PHP Markdown Syntax support.</p></li></ul><h2 id='meta'>New meta-data syntax</h2><p>Maruku implements a syntax that allows to attach "meta" information to objects.</p><h3>Meta-data for the document</h3><p>Meta-data for the document itself is specified through the use of email headers:</p><pre style='background-color: #f0f0e0;'>Title: A simple document containing meta-headers
|
25
27
|
CSS: style.css
|
26
28
|
|
27
29
|
Content of the document
|
@@ -47,7 +49,7 @@ Paragraph 1 is a warning
|
|
47
49
|
</pre><p>Also, if the value is not present, it defaults to <tt style='background-color: #f0f0e0;'>true</tt>:</p><pre style='background-color: #f0f0e0;'>@ test
|
48
50
|
|
49
51
|
This paragraph has the attribute 'test' set.
|
50
|
-
</pre><hr /><h2 id='metalist'>List of meta-data</h2><dl><dt><strong><tt style='background-color: #f0f0e0;'>title</tt>, <tt style='background-color: #f0f0e0;'>subject</tt></strong></dt><dd><p>(document) Sets the title of the document
|
52
|
+
</pre><hr /><h2 id='metalist'>List of meta-data</h2><dl><dt><strong><tt style='background-color: #f0f0e0;'>title</tt>, <tt style='background-color: #f0f0e0;'>subject</tt></strong></dt><dd><p>(document) Sets the title of the document (HTML: used in the <tt style='background-color: #f0f0e0;'>TITLE</tt> element).</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>css</tt></strong></dt><dd><p>(document, HTML) Url of stylesheet.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>html_use_syntax</tt></strong></dt><dd><p>(document, HTML) Use the <a href='http://syntax.rubyforge.org/'><tt style='background-color: #f0f0e0;'>syntax</tt> library</a> to add source highlighting.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>latex_use_listings</tt></strong></dt><dd><p>(document, LaTex) Use fancy <tt style='background-color: #f0f0e0;'>listing</tt> package for better displaying code blocks.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>style</tt>, <tt style='background-color: #f0f0e0;'>id</tt>, <tt style='background-color: #f0f0e0;'>class</tt></strong></dt><dd><p>(any block object, HTML) Standard CSS attributes are copied.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>lang</tt></strong></dt><dd><p>(code blocks) Name of programming language (<tt style='background-color: #f0f0e0;'>ruby</tt>) for syntax highlighting (does not work yet)</p><p>Default for this is <tt style='background-color: #f0f0e0;'>code_lang</tt> in document.</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>code_show_spaces</tt></strong></dt><dd><p>Shows tabs and newlines (default is read in the document object).</p></dd><dt><strong><tt style='background-color: #f0f0e0;'>code_background_color</tt></strong></dt><dd><p>Background color for code blocks. (default is read in the document object).</p><p>The format is either a named color (<tt style='background-color: #f0f0e0;'>green</tt>, <tt style='background-color: #f0f0e0;'>red</tt>) or a CSS color of the form <tt style='background-color: #f0f0e0;'>#ff00ff</tt>.</p><ul><li><p>for <strong>HTML output</strong>, the value is put straight in the <tt style='background-color: #f0f0e0;'>background-color</tt> CSS property of the block.</p></li><li><p>for <strong>LaTeX output</strong>, if it is a named color, it must be a color accepted by the latex <tt style='background-color: #f0f0e0;'>color</tt> packages. If it is of the form <tt style='background-color: #f0f0e0;'>#ff00ff</tt>, Maruku defines a color using the <tt style='background-color: #f0f0e0;'>\color[rgb]{r,g,b}</tt> macro.</p><p>For example, for <tt style='background-color: #f0f0e0;'>#0000ff</tt>, the macro is called as: <tt style='background-color: #f0f0e0;'>\color[rgb]{0,0,1}</tt>.</p></li></ul></dd></dl><h3>Examples</h3><p>An example of this is the following:</p><pre style='background-color: #f0f0e0;'>@¬code_show_spaces;¬code_background_color:¬green
|
51
53
|
|
52
54
|
» ¬One¬space
|
53
55
|
» ¬¬Two¬spaces
|
@@ -71,4 +73,4 @@ This is an equation with label:
|
|
71
73
|
|
72
74
|
$ \alpha = \beta + \gamma $ (eq:1)
|
73
75
|
|
74
|
-
This is a reference to equation: please see (eq:1)</pre></li></ul><div class='footnotes'><hr /><ol><li id='fn:1'><p>I really was missing those.<a href='#fnref:1' rev='footnote'>↩</a></p></li
|
76
|
+
This is a reference to equation: please see (eq:1)</pre></li></ul><div class='footnotes'><hr /><ol><li id='fn:1'><p>I really was missing those.<a href='#fnref:1' rev='footnote'>↩</a></p></li></ol></div></body></html>
|
data/docs/markdown_syntax.log
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=pdflatex 2005.12.27) 25 DEC 2006
|
1
|
+
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) (format=pdflatex 2005.12.27) 25 DEC 2006 21:06
|
2
2
|
entering extended mode
|
3
3
|
**./markdown_syntax
|
4
4
|
(./markdown_syntax.tex
|
@@ -193,12 +193,12 @@ loading : Context Support Macros / PDF (2004.03.26)
|
|
193
193
|
\MPnumerator=\count113
|
194
194
|
\everyMPtoPDFconversion=\toks21
|
195
195
|
)
|
196
|
-
LaTeX Font Info: Try loading font information for OMS+cmr on input line
|
196
|
+
LaTeX Font Info: Try loading font information for OMS+cmr on input line 19.
|
197
197
|
(/sw/share/texmf-dist/tex/latex/base/omscmr.fd
|
198
198
|
File: omscmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
|
199
199
|
)
|
200
200
|
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10> not available
|
201
|
-
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line
|
201
|
+
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 19.
|
202
202
|
[1
|
203
203
|
|
204
204
|
{/Users/andrea/.texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
|
@@ -209,71 +209,71 @@ File: lstlang1.sty 2004/09/05 1.3 listings language file
|
|
209
209
|
File: lstmisc.sty 2004/09/07 1.3 (Carsten Heinz)
|
210
210
|
)
|
211
211
|
LaTeX Font Info: Font shape `OT1/cmtt/bx/n' in size <8> not available
|
212
|
-
(Font) Font shape `OT1/cmtt/m/n' tried instead on input line
|
212
|
+
(Font) Font shape `OT1/cmtt/m/n' tried instead on input line 92.
|
213
213
|
[2] [3] [4]
|
214
|
-
Overfull \hbox (17.10802pt too wide) in paragraph at lines 260
|
214
|
+
Overfull \hbox (17.10802pt too wide) in paragraph at lines 259--260
|
215
215
|
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
|
216
216
|
[]
|
217
217
|
|
218
218
|
|
219
|
-
Overfull \hbox (1.80768pt too wide) in paragraph at lines 261
|
219
|
+
Overfull \hbox (1.80768pt too wide) in paragraph at lines 260--261
|
220
220
|
[][][][][][][][][][][][][][][][][][][][][][]
|
221
221
|
[]
|
222
222
|
|
223
223
|
|
224
|
-
Overfull \hbox (22.20813pt too wide) in paragraph at lines 262
|
224
|
+
Overfull \hbox (22.20813pt too wide) in paragraph at lines 261--262
|
225
225
|
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
|
226
226
|
[]
|
227
227
|
|
228
228
|
|
229
|
-
Overfull \hbox (17.10802pt too wide) in paragraph at lines 264
|
229
|
+
Overfull \hbox (17.10802pt too wide) in paragraph at lines 263--264
|
230
230
|
[][][][][][][][][][][][][][][][][][][][][][][][][][][][]
|
231
231
|
[]
|
232
232
|
|
233
233
|
|
234
|
-
Overfull \hbox (17.10802pt too wide) in paragraph at lines 275
|
234
|
+
Overfull \hbox (17.10802pt too wide) in paragraph at lines 274--275
|
235
235
|
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
|
236
236
|
[]
|
237
237
|
|
238
238
|
|
239
|
-
Overfull \hbox (12.0079pt too wide) in paragraph at lines
|
239
|
+
Overfull \hbox (12.0079pt too wide) in paragraph at lines 276--278
|
240
240
|
[][][][][][][][][][][][][][][][][][][][][][][][][][][]
|
241
241
|
[]
|
242
242
|
|
243
243
|
|
244
|
-
Overfull \hbox (17.10802pt too wide) in paragraph at lines 279
|
244
|
+
Overfull \hbox (17.10802pt too wide) in paragraph at lines 278--279
|
245
245
|
[][][][][][][][][][][][][][][][][][][][][][][][][][][][]
|
246
246
|
[]
|
247
247
|
|
248
248
|
[5] [6] [7] [8] [9] [10] [11]
|
249
|
-
Overfull \hbox (12.0079pt too wide) in paragraph at lines 908
|
249
|
+
Overfull \hbox (12.0079pt too wide) in paragraph at lines 907--908
|
250
250
|
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
|
251
251
|
[]
|
252
252
|
|
253
253
|
[12] [13] [14]
|
254
|
-
Overfull \hbox (17.10802pt too wide) in paragraph at lines 1162
|
254
|
+
Overfull \hbox (17.10802pt too wide) in paragraph at lines 1161--1162
|
255
255
|
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
|
256
256
|
[]
|
257
257
|
|
258
258
|
|
259
|
-
Overfull \hbox (17.10802pt too wide) in paragraph at lines 1163
|
259
|
+
Overfull \hbox (17.10802pt too wide) in paragraph at lines 1162--1163
|
260
260
|
[][][][][][][][][][][][][][]
|
261
261
|
[]
|
262
262
|
|
263
263
|
|
264
|
-
Overfull \hbox (27.30824pt too wide) in paragraph at lines 1164
|
264
|
+
Overfull \hbox (27.30824pt too wide) in paragraph at lines 1163--1164
|
265
265
|
[][][][][][][][][][][][][][][][][][][]
|
266
266
|
[]
|
267
267
|
|
268
268
|
[15] [16] (./markdown_syntax.aux) )
|
269
269
|
Here is how much of TeX's memory you used:
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
270
|
+
4638 strings out of 94500
|
271
|
+
63817 string characters out of 1176113
|
272
|
+
140563 words of memory out of 1000000
|
273
|
+
7413 multiletter control sequences out of 10000+50000
|
274
274
|
6829 words of font info for 25 fonts, out of 500000 for 2000
|
275
275
|
580 hyphenation exceptions out of 1000
|
276
|
-
28i,6n,59p,
|
276
|
+
28i,6n,59p,967b,1470s stack positions out of 1500i,500n,5000p,200000b,5000s
|
277
277
|
PDF statistics:
|
278
278
|
500 PDF objects out of 300000
|
279
279
|
391 named destinations out of 131072
|
@@ -284,4 +284,4 @@ exmf-dist/fonts/type1/bluesky/cm/cmsy10.pfb></sw/share/texmf-dist/fonts/type1/b
|
|
284
284
|
luesky/cm/cmtt10.pfb></sw/share/texmf-dist/fonts/type1/bluesky/cm/cmr10.pfb></s
|
285
285
|
w/share/texmf-dist/fonts/type1/bluesky/cm/cmbx10.pfb></sw/share/texmf-dist/font
|
286
286
|
s/type1/bluesky/cm/cmbx12.pfb>
|
287
|
-
Output written on markdown_syntax.pdf (16 pages,
|
287
|
+
Output written on markdown_syntax.pdf (16 pages, 177829 bytes).
|
data/docs/markdown_syntax.pdf
CHANGED
Binary file
|
data/docs/markdown_syntax.tex
CHANGED
@@ -13,8 +13,7 @@
|
|
13
13
|
|
14
14
|
This copy is translated using \href{http://maruku.rubyforge.org}{Maruku}.
|
15
15
|
|
16
|
-
\href{http://daringfireball.net/projects/markdown/syntax}{Here} you can find the original by \
|
17
|
-
\colorbox{maruku_color0}{\tt \char77\char97\char114\char107\char100\char111\char119\char110\char46\char112\char108}.
|
16
|
+
\href{http://daringfireball.net/projects/markdown/syntax}{Here} you can find the original by \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char77\char97\char114\char107\char100\char111\char119\char110\char46\char112\char108}.
|
18
17
|
|
19
18
|
\begin{itemize}%
|
20
19
|
\item \hyperlink{overview}{Overview}
|
@@ -78,12 +77,12 @@ Markdown is not a replacement for HTML, or even close to it. Its syntax is very
|
|
78
77
|
|
79
78
|
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.
|
80
79
|
|
81
|
-
The only restrictions are that block-level HTML elements -- e.g. \colorbox{
|
80
|
+
The only restrictions are that block-level HTML elements -- e.g. \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char100\char105\char118\char62}, \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char116\char97\char98\char108\char101\char62}, \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char112\char114\char101\char62}, \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char112\char62}, 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) \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char112\char62} tags around HTML block-level tags.
|
82
81
|
|
83
82
|
For example, to add an HTML table to a Markdown article:
|
84
83
|
|
85
84
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
86
|
-
\lstset{backgroundcolor=\color{
|
85
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
87
86
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
88
87
|
\lstset{language=html}
|
89
88
|
|
@@ -98,20 +97,20 @@ This is a regular paragraph.
|
|
98
97
|
|
99
98
|
This is another regular paragraph.
|
100
99
|
|
101
|
-
\end{lstlisting}Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can't use Markdown-style \colorbox{
|
100
|
+
\end{lstlisting}Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can't use Markdown-style \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char42\char101\char109\char112\char104\char97\char115\char105\char115\char42} inside an HTML block.
|
102
101
|
|
103
|
-
Span-level HTML tags -- e.g. \colorbox{
|
102
|
+
Span-level HTML tags -- e.g. \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char115\char112\char97\char110\char62}, \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char99\char105\char116\char101\char62}, or \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char100\char101\char108\char62} -- 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 \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char97\char62} or \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char105\char109\char103\char62} tags instead of Markdown's link or image syntax, go right ahead.
|
104
103
|
|
105
104
|
Unlike block-level HTML tags, Markdown syntax {\em is} processed within span-level tags.
|
106
105
|
|
107
106
|
\hypertarget{autoescape}{}\subsubsection*{{Automatic Escaping for Special Characters}}
|
108
107
|
|
109
|
-
In HTML, there are two characters that demand special treatment: \colorbox{
|
108
|
+
In HTML, there are two characters that demand special treatment: \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60} and \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char38}. 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. \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char38\char108\char116\char59}, and \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char38\char97\char109\char112\char59}.
|
110
109
|
|
111
|
-
Ampersands in particular are bedeviling for web writers. If you want to write about 'AT\&T', you need to write '\colorbox{
|
110
|
+
Ampersands in particular are bedeviling for web writers. If you want to write about 'AT\&T', you need to write '\colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char65\char84\char38\char97\char109\char112\char59\char84}'. You even need to escape ampersands within URLs. Thus, if you want to link to:
|
112
111
|
|
113
112
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
114
|
-
\lstset{backgroundcolor=\color{
|
113
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
115
114
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
116
115
|
\lstset{language={}}
|
117
116
|
|
@@ -121,21 +120,21 @@ http://images.google.com/images?num=30&q=larry+bird
|
|
121
120
|
\end{lstlisting}you need to encode the URL as:
|
122
121
|
|
123
122
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
124
|
-
\lstset{backgroundcolor=\color{
|
123
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
125
124
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
126
125
|
\lstset{language={}}
|
127
126
|
|
128
127
|
\begin{lstlisting}
|
129
128
|
http://images.google.com/images?num=30&q=larry+bird
|
130
129
|
|
131
|
-
\end{lstlisting}in your anchor tag \colorbox{
|
130
|
+
\end{lstlisting}in your anchor tag \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char104\char114\char101\char102} 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.
|
132
131
|
|
133
|
-
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 \colorbox{
|
132
|
+
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 \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char38\char97\char109\char112\char59}.
|
134
133
|
|
135
134
|
So, if you want to include a copyright symbol in your article, you can write:
|
136
135
|
|
137
136
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
138
|
-
\lstset{backgroundcolor=\color{
|
137
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
139
138
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
140
139
|
\lstset{language=html}
|
141
140
|
|
@@ -145,7 +144,7 @@ So, if you want to include a copyright symbol in your article, you can write:
|
|
145
144
|
\end{lstlisting}and Markdown will leave it alone. But if you write:
|
146
145
|
|
147
146
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
148
|
-
\lstset{backgroundcolor=\color{
|
147
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
149
148
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
150
149
|
\lstset{language={}}
|
151
150
|
|
@@ -155,7 +154,7 @@ AT&T
|
|
155
154
|
\end{lstlisting}Markdown will translate it to:
|
156
155
|
|
157
156
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
158
|
-
\lstset{backgroundcolor=\color{
|
157
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
159
158
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
160
159
|
\lstset{language=html}
|
161
160
|
|
@@ -165,7 +164,7 @@ AT&T
|
|
165
164
|
\end{lstlisting}Similarly, because Markdown supports \hyperlink{html}{inline HTML}, if you use angle brackets as delimiters for HTML tags, Markdown will treat them as such. But if you write:
|
166
165
|
|
167
166
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
168
|
-
\lstset{backgroundcolor=\color{
|
167
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
169
168
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
170
169
|
\lstset{language={}}
|
171
170
|
|
@@ -175,14 +174,14 @@ AT&T
|
|
175
174
|
\end{lstlisting}Markdown will translate it to:
|
176
175
|
|
177
176
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
178
|
-
\lstset{backgroundcolor=\color{
|
177
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
179
178
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
180
179
|
\lstset{language=html}
|
181
180
|
|
182
181
|
\begin{lstlisting}
|
183
182
|
4 < 5
|
184
183
|
|
185
|
-
\end{lstlisting}However, inside Markdown code spans and blocks, angle brackets and ampersands are {\em always} 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 \colorbox{
|
184
|
+
\end{lstlisting}However, inside Markdown code spans and blocks, angle brackets and ampersands are {\em always} 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 \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60} and \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char38} in your example code needs to be escaped.)
|
186
185
|
|
187
186
|
|
188
187
|
\vspace{.5em} \hrule \vspace{.5em}
|
@@ -192,11 +191,11 @@ AT&T
|
|
192
191
|
|
193
192
|
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.
|
194
193
|
|
195
|
-
The implication of the "one or more consecutive lines of text" rule is that Markdown supports "hard-wrapped" text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type's "Convert Line Breaks" option) which translate every line break character in a paragraph into a \colorbox{
|
194
|
+
The implication of the "one or more consecutive lines of text" rule is that Markdown supports "hard-wrapped" text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type's "Convert Line Breaks" option) which translate every line break character in a paragraph into a \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char98\char114\char32\char47\char62} tag.
|
196
195
|
|
197
|
-
When you {\em do} want to insert a \colorbox{
|
196
|
+
When you {\em do} want to insert a \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char98\char114\char32\char47\char62} break tag using Markdown, you end a line with two or more spaces, then type return.
|
198
197
|
|
199
|
-
Yes, this takes a tad more effort to create a \colorbox{
|
198
|
+
Yes, this takes a tad more effort to create a \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char98\char114\char32\char47\char62}, but a simplistic "every line break is a \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char98\char114\char32\char47\char62}" rule wouldn't work for Markdown. Markdown's email-style \hyperlink{blockquote}{blockquoting} and multi-paragraph \hyperlink{list}{list items} work best -- and look better -- when you format them with hard breaks.
|
200
199
|
|
201
200
|
\hypertarget{header}{}\subsubsection*{{Headers}}
|
202
201
|
|
@@ -205,7 +204,7 @@ Markdown supports two styles of headers, \href{http://docutils.sourceforge.net/m
|
|
205
204
|
Setext-style headers are "underlined" using equal signs (for first-level headers) and dashes (for second-level headers). For example:
|
206
205
|
|
207
206
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
208
|
-
\lstset{backgroundcolor=\color{
|
207
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
209
208
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
210
209
|
\lstset{language={}}
|
211
210
|
|
@@ -216,12 +215,12 @@ This is an H1
|
|
216
215
|
This is an H2
|
217
216
|
-------------
|
218
217
|
|
219
|
-
\end{lstlisting}Any number of underlining \colorbox{
|
218
|
+
\end{lstlisting}Any number of underlining \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char61}'s or \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char45}'s will work.
|
220
219
|
|
221
220
|
Atx-style headers use 1-6 hash characters at the start of the line, corresponding to header levels 1-6. For example:
|
222
221
|
|
223
222
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
224
|
-
\lstset{backgroundcolor=\color{
|
223
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
225
224
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
226
225
|
\lstset{language={}}
|
227
226
|
|
@@ -235,7 +234,7 @@ Atx-style headers use 1-6 hash characters at the start of the line, correspondin
|
|
235
234
|
\end{lstlisting}Optionally, you may "close" 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.) :
|
236
235
|
|
237
236
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
238
|
-
\lstset{backgroundcolor=\color{
|
237
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
239
238
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
240
239
|
\lstset{language={}}
|
241
240
|
|
@@ -249,10 +248,10 @@ Atx-style headers use 1-6 hash characters at the start of the line, correspondin
|
|
249
248
|
|
250
249
|
\end{lstlisting}\hypertarget{blockquote}{}\subsubsection*{{Blockquotes}}
|
251
250
|
|
252
|
-
Markdown uses email-style \colorbox{
|
251
|
+
Markdown uses email-style \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char62} 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 \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char62} before every line:
|
253
252
|
|
254
253
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
255
|
-
\lstset{backgroundcolor=\color{
|
254
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
256
255
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
257
256
|
\lstset{language={}}
|
258
257
|
|
@@ -264,10 +263,10 @@ Markdown uses email-style \colorbox{maruku_color0}{\tt \char62} characters for b
|
|
264
263
|
> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
|
265
264
|
> id sem consectetuer libero luctus adipiscing.
|
266
265
|
|
267
|
-
\end{lstlisting}Markdown allows you to be lazy and only put the \colorbox{
|
266
|
+
\end{lstlisting}Markdown allows you to be lazy and only put the \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char62} before the first line of a hard-wrapped paragraph:
|
268
267
|
|
269
268
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
270
|
-
\lstset{backgroundcolor=\color{
|
269
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
271
270
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
272
271
|
\lstset{language={}}
|
273
272
|
|
@@ -279,10 +278,10 @@ Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
|
|
279
278
|
> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
|
280
279
|
id sem consectetuer libero luctus adipiscing.
|
281
280
|
|
282
|
-
\end{lstlisting}Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding additional levels of \colorbox{
|
281
|
+
\end{lstlisting}Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding additional levels of \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char62}:
|
283
282
|
|
284
283
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
285
|
-
\lstset{backgroundcolor=\color{
|
284
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
286
285
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
287
286
|
\lstset{language={}}
|
288
287
|
|
@@ -296,7 +295,7 @@ id sem consectetuer libero luctus adipiscing.
|
|
296
295
|
\end{lstlisting}Blockquotes can contain other Markdown elements, including headers, lists, and code blocks:
|
297
296
|
|
298
297
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
299
|
-
\lstset{backgroundcolor=\color{
|
298
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
300
299
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
301
300
|
\lstset{language={}}
|
302
301
|
|
@@ -319,7 +318,7 @@ Markdown supports ordered (numbered) and unordered (bulleted) lists.
|
|
319
318
|
Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list markers:
|
320
319
|
|
321
320
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
322
|
-
\lstset{backgroundcolor=\color{
|
321
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
323
322
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
324
323
|
\lstset{language={}}
|
325
324
|
|
@@ -331,7 +330,7 @@ Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list
|
|
331
330
|
\end{lstlisting}is equivalent to:
|
332
331
|
|
333
332
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
334
|
-
\lstset{backgroundcolor=\color{
|
333
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
335
334
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
336
335
|
\lstset{language={}}
|
337
336
|
|
@@ -343,7 +342,7 @@ Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list
|
|
343
342
|
\end{lstlisting}and:
|
344
343
|
|
345
344
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
346
|
-
\lstset{backgroundcolor=\color{
|
345
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
347
346
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
348
347
|
\lstset{language={}}
|
349
348
|
|
@@ -355,7 +354,7 @@ Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list
|
|
355
354
|
\end{lstlisting}Ordered lists use numbers followed by periods:
|
356
355
|
|
357
356
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
358
|
-
\lstset{backgroundcolor=\color{
|
357
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
359
358
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
360
359
|
\lstset{language={}}
|
361
360
|
|
@@ -367,7 +366,7 @@ Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list
|
|
367
366
|
\end{lstlisting}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:
|
368
367
|
|
369
368
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
370
|
-
\lstset{backgroundcolor=\color{
|
369
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
371
370
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
372
371
|
\lstset{language=html}
|
373
372
|
|
@@ -381,7 +380,7 @@ Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list
|
|
381
380
|
\end{lstlisting}If you instead wrote the list in Markdown like this:
|
382
381
|
|
383
382
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
384
|
-
\lstset{backgroundcolor=\color{
|
383
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
385
384
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
386
385
|
\lstset{language={}}
|
387
386
|
|
@@ -393,7 +392,7 @@ Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list
|
|
393
392
|
\end{lstlisting}or even:
|
394
393
|
|
395
394
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
396
|
-
\lstset{backgroundcolor=\color{
|
395
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
397
396
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
398
397
|
\lstset{language={}}
|
399
398
|
|
@@ -411,7 +410,7 @@ List markers typically start at the left margin, but may be indented by up to th
|
|
411
410
|
To make lists look nice, you can wrap items with hanging indents:
|
412
411
|
|
413
412
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
414
|
-
\lstset{backgroundcolor=\color{
|
413
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
415
414
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
416
415
|
\lstset{language={}}
|
417
416
|
|
@@ -425,7 +424,7 @@ To make lists look nice, you can wrap items with hanging indents:
|
|
425
424
|
\end{lstlisting}But if you want to be lazy, you don't have to:
|
426
425
|
|
427
426
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
428
|
-
\lstset{backgroundcolor=\color{
|
427
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
429
428
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
430
429
|
\lstset{language={}}
|
431
430
|
|
@@ -436,10 +435,10 @@ viverra nec, fringilla in, laoreet vitae, risus.
|
|
436
435
|
* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
|
437
436
|
Suspendisse id sem consectetuer libero luctus adipiscing.
|
438
437
|
|
439
|
-
\end{lstlisting}If list items are separated by blank lines, Markdown will wrap the items in \colorbox{
|
438
|
+
\end{lstlisting}If list items are separated by blank lines, Markdown will wrap the items in \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char112\char62} tags in the HTML output. For example, this input:
|
440
439
|
|
441
440
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
442
|
-
\lstset{backgroundcolor=\color{
|
441
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
443
442
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
444
443
|
\lstset{language={}}
|
445
444
|
|
@@ -450,7 +449,7 @@ Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
450
449
|
\end{lstlisting}will turn into:
|
451
450
|
|
452
451
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
453
|
-
\lstset{backgroundcolor=\color{
|
452
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
454
453
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
455
454
|
\lstset{language=html}
|
456
455
|
|
@@ -463,7 +462,7 @@ Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
463
462
|
\end{lstlisting}But this:
|
464
463
|
|
465
464
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
466
|
-
\lstset{backgroundcolor=\color{
|
465
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
467
466
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
468
467
|
\lstset{language={}}
|
469
468
|
|
@@ -475,7 +474,7 @@ Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
475
474
|
\end{lstlisting}will turn into:
|
476
475
|
|
477
476
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
478
|
-
\lstset{backgroundcolor=\color{
|
477
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
479
478
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
480
479
|
\lstset{language=html}
|
481
480
|
|
@@ -488,7 +487,7 @@ Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
488
487
|
\end{lstlisting}List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be intended by either 4 spaces or one tab:
|
489
488
|
|
490
489
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
491
|
-
\lstset{backgroundcolor=\color{
|
490
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
492
491
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
493
492
|
\lstset{language={}}
|
494
493
|
|
@@ -506,7 +505,7 @@ Suspendisse id sem consectetuer libero luctus adipiscing.
|
|
506
505
|
\end{lstlisting}It looks nice if you indent every line of the subsequent paragraphs, but here again, Markdown will allow you to be lazy:
|
507
506
|
|
508
507
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
509
|
-
\lstset{backgroundcolor=\color{
|
508
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
510
509
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
511
510
|
\lstset{language={}}
|
512
511
|
|
@@ -519,10 +518,10 @@ sit amet, consectetuer adipiscing elit.
|
|
519
518
|
|
520
519
|
* Another item in the same list.
|
521
520
|
|
522
|
-
\end{lstlisting}To put a blockquote within a list item, the blockquote's \colorbox{
|
521
|
+
\end{lstlisting}To put a blockquote within a list item, the blockquote's \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char62} delimiters need to be indented:
|
523
522
|
|
524
523
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
525
|
-
\lstset{backgroundcolor=\color{
|
524
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
526
525
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
527
526
|
\lstset{language={}}
|
528
527
|
|
@@ -535,7 +534,7 @@ sit amet, consectetuer adipiscing elit.
|
|
535
534
|
\end{lstlisting}To put a code block within a list item, the code block needs to be indented {\em twice} -- 8 spaces or two tabs:
|
536
535
|
|
537
536
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
538
|
-
\lstset{backgroundcolor=\color{
|
537
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
539
538
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
540
539
|
\lstset{language={}}
|
541
540
|
|
@@ -548,7 +547,7 @@ sit amet, consectetuer adipiscing elit.
|
|
548
547
|
\end{lstlisting}It's worth noting that it's possible to trigger an ordered list by accident, by writing something like this:
|
549
548
|
|
550
549
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
551
|
-
\lstset{backgroundcolor=\color{
|
550
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
552
551
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
553
552
|
\lstset{language={}}
|
554
553
|
|
@@ -558,7 +557,7 @@ sit amet, consectetuer adipiscing elit.
|
|
558
557
|
\end{lstlisting}In other words, a {\em number-period-space} sequence at the beginning of a line. To avoid this, you can backslash-escape the period:
|
559
558
|
|
560
559
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
561
|
-
\lstset{backgroundcolor=\color{
|
560
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
562
561
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
563
562
|
\lstset{language={}}
|
564
563
|
|
@@ -569,12 +568,12 @@ sit amet, consectetuer adipiscing elit.
|
|
569
568
|
|
570
569
|
\end{lstlisting}\hypertarget{precode}{}\subsubsection*{{Code Blocks}}
|
571
570
|
|
572
|
-
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 \colorbox{
|
571
|
+
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 \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char112\char114\char101\char62} and \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char99\char111\char100\char101\char62} tags.
|
573
572
|
|
574
573
|
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:
|
575
574
|
|
576
575
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
577
|
-
\lstset{backgroundcolor=\color{
|
576
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
578
577
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
579
578
|
\lstset{language={}}
|
580
579
|
|
@@ -586,7 +585,7 @@ This is a normal paragraph:
|
|
586
585
|
\end{lstlisting}Markdown will generate:
|
587
586
|
|
588
587
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
589
|
-
\lstset{backgroundcolor=\color{
|
588
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
590
589
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
591
590
|
\lstset{language=html}
|
592
591
|
|
@@ -599,7 +598,7 @@ This is a normal paragraph:
|
|
599
598
|
\end{lstlisting}One level of indentation -- 4 spaces or 1 tab -- is removed from each line of the code block. For example, this:
|
600
599
|
|
601
600
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
602
|
-
\lstset{backgroundcolor=\color{
|
601
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
603
602
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
604
603
|
\lstset{language={}}
|
605
604
|
|
@@ -613,7 +612,7 @@ Here is an example of AppleScript:
|
|
613
612
|
\end{lstlisting}will turn into:
|
614
613
|
|
615
614
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
616
|
-
\lstset{backgroundcolor=\color{
|
615
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
617
616
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
618
617
|
\lstset{language=html}
|
619
618
|
|
@@ -627,10 +626,10 @@ end tell
|
|
627
626
|
|
628
627
|
\end{lstlisting}A code block continues until it reaches a line that is not indented (or the end of the article).
|
629
628
|
|
630
|
-
Within a code block, ampersands (\colorbox{
|
629
|
+
Within a code block, ampersands (\colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char38}) and angle brackets (\colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60} and \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char62}) 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:
|
631
630
|
|
632
631
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
633
|
-
\lstset{backgroundcolor=\color{
|
632
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
634
633
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
635
634
|
\lstset{language={}}
|
636
635
|
|
@@ -642,7 +641,7 @@ Within a code block, ampersands (\colorbox{maruku_color0}{\tt \char38}) and angl
|
|
642
641
|
\end{lstlisting}will turn into:
|
643
642
|
|
644
643
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
645
|
-
\lstset{backgroundcolor=\color{
|
644
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
646
645
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
647
646
|
\lstset{language=html}
|
648
647
|
|
@@ -656,10 +655,10 @@ Within a code block, ampersands (\colorbox{maruku_color0}{\tt \char38}) and angl
|
|
656
655
|
|
657
656
|
\hypertarget{hr}{}\subsubsection*{{Horizontal Rules}}
|
658
657
|
|
659
|
-
You can produce a horizontal rule tag (\colorbox{
|
658
|
+
You can produce a horizontal rule tag (\colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char104\char114\char32\char47\char62}) by placing three or more hyphens or asterisks 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:
|
660
659
|
|
661
660
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
662
|
-
\lstset{backgroundcolor=\color{
|
661
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
663
662
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
664
663
|
\lstset{language={}}
|
665
664
|
|
@@ -688,7 +687,7 @@ In both styles, the link text is delimited by [square brackets].
|
|
688
687
|
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 {\em optional} title for the link, surrounded in quotes. For example:
|
689
688
|
|
690
689
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
691
|
-
\lstset{backgroundcolor=\color{
|
690
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
692
691
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
693
692
|
\lstset{language={}}
|
694
693
|
|
@@ -700,7 +699,7 @@ This is [an example](http://example.com/ "Title") inline link.
|
|
700
699
|
\end{lstlisting}Will produce:
|
701
700
|
|
702
701
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
703
|
-
\lstset{backgroundcolor=\color{
|
702
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
704
703
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
705
704
|
\lstset{language=html}
|
706
705
|
|
@@ -714,7 +713,7 @@ title attribute.</p>
|
|
714
713
|
\end{lstlisting}If you're referring to a local resource on the same server, you can use relative paths:
|
715
714
|
|
716
715
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
717
|
-
\lstset{backgroundcolor=\color{
|
716
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
718
717
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
719
718
|
\lstset{language={}}
|
720
719
|
|
@@ -724,7 +723,7 @@ See my [About](/about/) page for details.
|
|
724
723
|
\end{lstlisting}Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link:
|
725
724
|
|
726
725
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
727
|
-
\lstset{backgroundcolor=\color{
|
726
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
728
727
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
729
728
|
\lstset{language={}}
|
730
729
|
|
@@ -734,7 +733,7 @@ This is [an example][id] reference-style link.
|
|
734
733
|
\end{lstlisting}You can optionally use a space to separate the sets of brackets:
|
735
734
|
|
736
735
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
737
|
-
\lstset{backgroundcolor=\color{
|
736
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
738
737
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
739
738
|
\lstset{language={}}
|
740
739
|
|
@@ -744,7 +743,7 @@ This is [an example] [id] reference-style link.
|
|
744
743
|
\end{lstlisting}Then, anywhere in the document, you define your link label like this, on a line by itself:
|
745
744
|
|
746
745
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
747
|
-
\lstset{backgroundcolor=\color{
|
746
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
748
747
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
749
748
|
\lstset{language={}}
|
750
749
|
|
@@ -764,7 +763,7 @@ This is [an example] [id] reference-style link.
|
|
764
763
|
The following three link definitions are equivalent:
|
765
764
|
|
766
765
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
767
|
-
\lstset{backgroundcolor=\color{
|
766
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
768
767
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
769
768
|
\lstset{language={}}
|
770
769
|
|
@@ -778,7 +777,7 @@ The following three link definitions are equivalent:
|
|
778
777
|
The link URL may, optionally, be surrounded by angle brackets:
|
779
778
|
|
780
779
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
781
|
-
\lstset{backgroundcolor=\color{
|
780
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
782
781
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
783
782
|
\lstset{language={}}
|
784
783
|
|
@@ -788,7 +787,7 @@ The link URL may, optionally, be surrounded by angle brackets:
|
|
788
787
|
\end{lstlisting}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:
|
789
788
|
|
790
789
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
791
|
-
\lstset{backgroundcolor=\color{
|
790
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
792
791
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
793
792
|
\lstset{language={}}
|
794
793
|
|
@@ -801,7 +800,7 @@ The link URL may, optionally, be surrounded by angle brackets:
|
|
801
800
|
Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are {\em not} case sensitive. E.g. these two links:
|
802
801
|
|
803
802
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
804
|
-
\lstset{backgroundcolor=\color{
|
803
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
805
804
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
806
805
|
\lstset{language={}}
|
807
806
|
|
@@ -814,7 +813,7 @@ Link definition names may constist of letters, numbers, spaces, and punctuation
|
|
814
813
|
The {\em implicit link name} 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 "Google" to the google.com web site, you could simply write:
|
815
814
|
|
816
815
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
817
|
-
\lstset{backgroundcolor=\color{
|
816
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
818
817
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
819
818
|
\lstset{language={}}
|
820
819
|
|
@@ -824,7 +823,7 @@ The {\em implicit link name} shortcut allows you to omit the name of the link, i
|
|
824
823
|
\end{lstlisting}And then define the link:
|
825
824
|
|
826
825
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
827
|
-
\lstset{backgroundcolor=\color{
|
826
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
828
827
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
829
828
|
\lstset{language={}}
|
830
829
|
|
@@ -834,7 +833,7 @@ The {\em implicit link name} shortcut allows you to omit the name of the link, i
|
|
834
833
|
\end{lstlisting}Because link names may contain spaces, this shortcut even works for multiple words in the link text:
|
835
834
|
|
836
835
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
837
|
-
\lstset{backgroundcolor=\color{
|
836
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
838
837
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
839
838
|
\lstset{language={}}
|
840
839
|
|
@@ -844,7 +843,7 @@ Visit [Daring Fireball][] for more information.
|
|
844
843
|
\end{lstlisting}And then define the link:
|
845
844
|
|
846
845
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
847
|
-
\lstset{backgroundcolor=\color{
|
846
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
848
847
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
849
848
|
\lstset{language={}}
|
850
849
|
|
@@ -857,7 +856,7 @@ Visit [Daring Fireball][] for more information.
|
|
857
856
|
Here's an example of reference links in action:
|
858
857
|
|
859
858
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
860
|
-
\lstset{backgroundcolor=\color{
|
859
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
861
860
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
862
861
|
\lstset{language={}}
|
863
862
|
|
@@ -872,7 +871,7 @@ I get 10 times more traffic from [Google] [1] than from
|
|
872
871
|
\end{lstlisting}Using the implicit link name shortcut, you could instead write:
|
873
872
|
|
874
873
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
875
|
-
\lstset{backgroundcolor=\color{
|
874
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
876
875
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
877
876
|
\lstset{language={}}
|
878
877
|
|
@@ -887,7 +886,7 @@ I get 10 times more traffic from [Google][] than from
|
|
887
886
|
\end{lstlisting}Both of the above examples will produce the following HTML output:
|
888
887
|
|
889
888
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
890
|
-
\lstset{backgroundcolor=\color{
|
889
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
891
890
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
892
891
|
\lstset{language={}}
|
893
892
|
|
@@ -900,7 +899,7 @@ or <a href="http://search.msn.com/" title="MSN Search">MSN</a>.</p>
|
|
900
899
|
\end{lstlisting}For comparison, here is the same paragraph written using Markdown's inline link style:
|
901
900
|
|
902
901
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
903
|
-
\lstset{backgroundcolor=\color{
|
902
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
904
903
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
905
904
|
\lstset{language={}}
|
906
905
|
|
@@ -915,10 +914,10 @@ With Markdown's reference-style links, a source document much more closely resem
|
|
915
914
|
|
916
915
|
\hypertarget{em}{}\subsubsection*{{Emphasis}}
|
917
916
|
|
918
|
-
Markdown treats asterisks (\colorbox{
|
917
|
+
Markdown treats asterisks (\colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char42}) and underscores (\colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char95}) as indicators of emphasis. Text wrapped with one \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char42} or \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char95} will be wrapped with an HTML \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char101\char109\char62} tag; double \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char42}'s or \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char95}'s will be wrapped with an HTML \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char115\char116\char114\char111\char110\char103\char62} tag. E.g., this input:
|
919
918
|
|
920
919
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
921
|
-
\lstset{backgroundcolor=\color{
|
920
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
922
921
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
923
922
|
\lstset{language={}}
|
924
923
|
|
@@ -934,7 +933,7 @@ __double underscores__
|
|
934
933
|
\end{lstlisting}will produce:
|
935
934
|
|
936
935
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
937
|
-
\lstset{backgroundcolor=\color{
|
936
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
938
937
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
939
938
|
\lstset{language=html}
|
940
939
|
|
@@ -952,19 +951,19 @@ __double underscores__
|
|
952
951
|
Emphasis can be used in the middle of a word:
|
953
952
|
|
954
953
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
955
|
-
\lstset{backgroundcolor=\color{
|
954
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
956
955
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
957
956
|
\lstset{language={}}
|
958
957
|
|
959
958
|
\begin{lstlisting}
|
960
959
|
un*fucking*believable
|
961
960
|
|
962
|
-
\end{lstlisting}But if you surround an \colorbox{
|
961
|
+
\end{lstlisting}But if you surround an \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char42} or \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char95} with spaces, it'll be treated as a literal asterisk or underscore.
|
963
962
|
|
964
963
|
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:
|
965
964
|
|
966
965
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
967
|
-
\lstset{backgroundcolor=\color{
|
966
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
968
967
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
969
968
|
\lstset{language={}}
|
970
969
|
|
@@ -975,10 +974,10 @@ To produce a literal asterisk or underscore at a position where it would otherwi
|
|
975
974
|
|
976
975
|
\end{lstlisting}\hypertarget{code}{}\subsubsection*{{Code}}
|
977
976
|
|
978
|
-
To indicate a span of code, wrap it with backtick quotes (\colorbox{
|
977
|
+
To indicate a span of code, wrap it with backtick quotes (\colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char32\char96\char32}). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:
|
979
978
|
|
980
979
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
981
|
-
\lstset{backgroundcolor=\color{
|
980
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
982
981
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
983
982
|
\lstset{language={}}
|
984
983
|
|
@@ -988,7 +987,7 @@ Use the `printf()` function.
|
|
988
987
|
\end{lstlisting}will produce:
|
989
988
|
|
990
989
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
991
|
-
\lstset{backgroundcolor=\color{
|
990
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
992
991
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
993
992
|
\lstset{language=html}
|
994
993
|
|
@@ -998,7 +997,7 @@ Use the `printf()` function.
|
|
998
997
|
\end{lstlisting}To include a literal backtick character within a code span, you can backslash escape it:
|
999
998
|
|
1000
999
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1001
|
-
\lstset{backgroundcolor=\color{
|
1000
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1002
1001
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1003
1002
|
\lstset{language={}}
|
1004
1003
|
|
@@ -1008,7 +1007,7 @@ Use the `printf()` function.
|
|
1008
1007
|
\end{lstlisting}Or, if you prefer, you can use multiple backticks as the opening and closing delimiters:
|
1009
1008
|
|
1010
1009
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1011
|
-
\lstset{backgroundcolor=\color{
|
1010
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1012
1011
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1013
1012
|
\lstset{language={}}
|
1014
1013
|
|
@@ -1018,7 +1017,7 @@ Use the `printf()` function.
|
|
1018
1017
|
\end{lstlisting}Both of the previous two examples will produce this:
|
1019
1018
|
|
1020
1019
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1021
|
-
\lstset{backgroundcolor=\color{
|
1020
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1022
1021
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1023
1022
|
\lstset{language=html}
|
1024
1023
|
|
@@ -1028,7 +1027,7 @@ Use the `printf()` function.
|
|
1028
1027
|
\end{lstlisting}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:
|
1029
1028
|
|
1030
1029
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1031
|
-
\lstset{backgroundcolor=\color{
|
1030
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1032
1031
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1033
1032
|
\lstset{language={}}
|
1034
1033
|
|
@@ -1038,7 +1037,7 @@ Please don't use any `<blink>` tags.
|
|
1038
1037
|
\end{lstlisting}into:
|
1039
1038
|
|
1040
1039
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1041
|
-
\lstset{backgroundcolor=\color{
|
1040
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1042
1041
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1043
1042
|
\lstset{language=html}
|
1044
1043
|
|
@@ -1048,7 +1047,7 @@ Please don't use any `<blink>` tags.
|
|
1048
1047
|
\end{lstlisting}You can write this:
|
1049
1048
|
|
1050
1049
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1051
|
-
\lstset{backgroundcolor=\color{
|
1050
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1052
1051
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1053
1052
|
\lstset{language={}}
|
1054
1053
|
|
@@ -1058,7 +1057,7 @@ Please don't use any `<blink>` tags.
|
|
1058
1057
|
\end{lstlisting}to produce:
|
1059
1058
|
|
1060
1059
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1061
|
-
\lstset{backgroundcolor=\color{
|
1060
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1062
1061
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1063
1062
|
\lstset{language=html}
|
1064
1063
|
|
@@ -1077,7 +1076,7 @@ Markdown uses an image syntax that is intended to resemble the syntax for links,
|
|
1077
1076
|
Inline image syntax looks like this:
|
1078
1077
|
|
1079
1078
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1080
|
-
\lstset{backgroundcolor=\color{
|
1079
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1081
1080
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1082
1081
|
\lstset{language={}}
|
1083
1082
|
|
@@ -1089,15 +1088,15 @@ Inline image syntax looks like this:
|
|
1089
1088
|
\end{lstlisting}That is:
|
1090
1089
|
|
1091
1090
|
\begin{itemize}%
|
1092
|
-
\item An exclamation mark: \colorbox{
|
1093
|
-
\item followed by a set of square brackets, containing the \colorbox{
|
1094
|
-
\item followed by a set of parentheses, containing the URL or path to the image, and an optional \colorbox{
|
1091
|
+
\item An exclamation mark: \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char33};
|
1092
|
+
\item followed by a set of square brackets, containing the \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char97\char108\char116} attribute text for the image;
|
1093
|
+
\item followed by a set of parentheses, containing the URL or path to the image, and an optional \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char116\char105\char116\char108\char101} attribute enclosed in double or single quotes.
|
1095
1094
|
|
1096
1095
|
\end{itemize}
|
1097
1096
|
Reference-style image syntax looks like this:
|
1098
1097
|
|
1099
1098
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1100
|
-
\lstset{backgroundcolor=\color{
|
1099
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1101
1100
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1102
1101
|
\lstset{language={}}
|
1103
1102
|
|
@@ -1107,14 +1106,14 @@ Reference-style image syntax looks like this:
|
|
1107
1106
|
\end{lstlisting}Where "id" is the name of a defined image reference. Image references are defined using syntax identical to link references:
|
1108
1107
|
|
1109
1108
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1110
|
-
\lstset{backgroundcolor=\color{
|
1109
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1111
1110
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1112
1111
|
\lstset{language={}}
|
1113
1112
|
|
1114
1113
|
\begin{lstlisting}
|
1115
1114
|
[id]: url/to/image "Optional title attribute"
|
1116
1115
|
|
1117
|
-
\end{lstlisting}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 \colorbox{
|
1116
|
+
\end{lstlisting}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 \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char105\char109\char103\char62} tags.
|
1118
1117
|
|
1119
1118
|
|
1120
1119
|
\vspace{.5em} \hrule \vspace{.5em}
|
@@ -1125,7 +1124,7 @@ Reference-style image syntax looks like this:
|
|
1125
1124
|
Markdown supports a shortcut style for creating "automatic" 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:
|
1126
1125
|
|
1127
1126
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1128
|
-
\lstset{backgroundcolor=\color{
|
1127
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1129
1128
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1130
1129
|
\lstset{language={}}
|
1131
1130
|
|
@@ -1134,7 +1133,7 @@ Markdown supports a shortcut style for creating "automatic" links for URLs and e
|
|
1134
1133
|
\end{lstlisting}Markdown will turn this into:
|
1135
1134
|
|
1136
1135
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1137
|
-
\lstset{backgroundcolor=\color{
|
1136
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1138
1137
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1139
1138
|
\lstset{language=html}
|
1140
1139
|
|
@@ -1144,7 +1143,7 @@ Markdown supports a shortcut style for creating "automatic" links for URLs and e
|
|
1144
1143
|
\end{lstlisting}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:
|
1145
1144
|
|
1146
1145
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1147
|
-
\lstset{backgroundcolor=\color{
|
1146
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1148
1147
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1149
1148
|
\lstset{language={}}
|
1150
1149
|
|
@@ -1154,7 +1153,7 @@ Markdown supports a shortcut style for creating "automatic" links for URLs and e
|
|
1154
1153
|
\end{lstlisting}into something like this:
|
1155
1154
|
|
1156
1155
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1157
|
-
\lstset{backgroundcolor=\color{
|
1156
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1158
1157
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1159
1158
|
\lstset{language=html}
|
1160
1159
|
|
@@ -1170,10 +1169,10 @@ Markdown supports a shortcut style for creating "automatic" links for URLs and e
|
|
1170
1169
|
|
1171
1170
|
\hypertarget{backslash}{}\subsubsection*{{Backslash Escapes}}
|
1172
1171
|
|
1173
|
-
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 \colorbox{
|
1172
|
+
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 \colorbox[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}{\tt \char60\char101\char109\char62} tag), you can backslashes before the asterisks, like this:
|
1174
1173
|
|
1175
1174
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1176
|
-
\lstset{backgroundcolor=\color{
|
1175
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1177
1176
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1178
1177
|
\lstset{language={}}
|
1179
1178
|
|
@@ -1183,7 +1182,7 @@ Markdown allows you to use backslash escapes to generate literal characters whic
|
|
1183
1182
|
\end{lstlisting}Markdown provides backslash escapes for the following characters:
|
1184
1183
|
|
1185
1184
|
\lstset{columns=fixed,frame=shadowbox}\lstset{showspaces=false,showtabs=false}
|
1186
|
-
\lstset{backgroundcolor=\color{
|
1185
|
+
\lstset{backgroundcolor=\color[rgb]{0.941176470588235,0.941176470588235,0.87843137254902}}
|
1187
1186
|
\lstset{basicstyle=\ttfamily\footnotesize}
|
1188
1187
|
\lstset{language={}}
|
1189
1188
|
|