Use unicode for smart punctuation in plain, markdown, rst formats.
This commit is contained in:
parent
163b0c0f8a
commit
ee51124412
5 changed files with 92 additions and 92 deletions
|
@ -372,14 +372,14 @@ inlineToMarkdown opts (Subscript lst) = do
|
||||||
inlineToMarkdown opts (SmallCaps lst) = inlineListToMarkdown opts lst
|
inlineToMarkdown opts (SmallCaps lst) = inlineListToMarkdown opts lst
|
||||||
inlineToMarkdown opts (Quoted SingleQuote lst) = do
|
inlineToMarkdown opts (Quoted SingleQuote lst) = do
|
||||||
contents <- inlineListToMarkdown opts lst
|
contents <- inlineListToMarkdown opts lst
|
||||||
return $ char '\'' <> contents <> char '\''
|
return $ char '‘' <> contents <> char '’'
|
||||||
inlineToMarkdown opts (Quoted DoubleQuote lst) = do
|
inlineToMarkdown opts (Quoted DoubleQuote lst) = do
|
||||||
contents <- inlineListToMarkdown opts lst
|
contents <- inlineListToMarkdown opts lst
|
||||||
return $ char '"' <> contents <> char '"'
|
return $ char '“' <> contents <> char '”'
|
||||||
inlineToMarkdown _ EmDash = return $ text "--"
|
inlineToMarkdown _ EmDash = return $ char '\8212'
|
||||||
inlineToMarkdown _ EnDash = return $ char '-'
|
inlineToMarkdown _ EnDash = return $ char '\8211'
|
||||||
inlineToMarkdown _ Apostrophe = return $ char '\''
|
inlineToMarkdown _ Apostrophe = return $ char '\8217'
|
||||||
inlineToMarkdown _ Ellipses = return $ text "..."
|
inlineToMarkdown _ Ellipses = return $ char '\8230'
|
||||||
inlineToMarkdown _ (Code str) =
|
inlineToMarkdown _ (Code str) =
|
||||||
let tickGroups = filter (\s -> '`' `elem` s) $ group str
|
let tickGroups = filter (\s -> '`' `elem` s) $ group str
|
||||||
longest = if null tickGroups
|
longest = if null tickGroups
|
||||||
|
|
|
@ -282,16 +282,16 @@ inlineToRST (Subscript lst) = do
|
||||||
inlineToRST (SmallCaps lst) = inlineListToRST lst
|
inlineToRST (SmallCaps lst) = inlineListToRST lst
|
||||||
inlineToRST (Quoted SingleQuote lst) = do
|
inlineToRST (Quoted SingleQuote lst) = do
|
||||||
contents <- inlineListToRST lst
|
contents <- inlineListToRST lst
|
||||||
return $ char '\'' <> contents <> char '\''
|
return $ char '‘' <> contents <> char '’'
|
||||||
inlineToRST (Quoted DoubleQuote lst) = do
|
inlineToRST (Quoted DoubleQuote lst) = do
|
||||||
contents <- inlineListToRST lst
|
contents <- inlineListToRST lst
|
||||||
return $ char '"' <> contents <> char '"'
|
return $ char '“' <> contents <> char '”'
|
||||||
inlineToRST (Cite _ lst) =
|
inlineToRST (Cite _ lst) =
|
||||||
inlineListToRST lst
|
inlineListToRST lst
|
||||||
inlineToRST EmDash = return $ text "--"
|
inlineToRST EmDash = return $ char '\8212'
|
||||||
inlineToRST EnDash = return $ char '-'
|
inlineToRST EnDash = return $ char '\8211'
|
||||||
inlineToRST Apostrophe = return $ char '\''
|
inlineToRST Apostrophe = return $ char '\8217'
|
||||||
inlineToRST Ellipses = return $ text "..."
|
inlineToRST Ellipses = return $ char '\8230'
|
||||||
inlineToRST (Code str) = return $ text $ "``" ++ str ++ "``"
|
inlineToRST (Code str) = return $ text $ "``" ++ str ++ "``"
|
||||||
inlineToRST (Str str) = return $ text $ escapeString str
|
inlineToRST (Str str) = return $ text $ escapeString str
|
||||||
inlineToRST (Math t str) = do
|
inlineToRST (Math t str) = do
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
% July 17, 2006
|
% July 17, 2006
|
||||||
|
|
||||||
This is a set of tests for pandoc. Most of them are adapted from
|
This is a set of tests for pandoc. Most of them are adapted from
|
||||||
John Gruber's markdown test suite.
|
John Gruber’s markdown test suite.
|
||||||
|
|
||||||
|
|
||||||
* * * * *
|
* * * * *
|
||||||
|
@ -35,13 +35,13 @@ with no blank line
|
||||||
|
|
||||||
# Paragraphs
|
# Paragraphs
|
||||||
|
|
||||||
Here's a regular paragraph.
|
Here’s a regular paragraph.
|
||||||
|
|
||||||
In Markdown 1.0.0 and earlier. Version 8. This line turns into a
|
In Markdown 1.0.0 and earlier. Version 8. This line turns into a
|
||||||
list item. Because a hard-wrapped line in the middle of a paragraph
|
list item. Because a hard-wrapped line in the middle of a paragraph
|
||||||
looked like a list item.
|
looked like a list item.
|
||||||
|
|
||||||
Here's one with a bullet. \* criminey.
|
Here’s one with a bullet. \* criminey.
|
||||||
|
|
||||||
There should be a hard line break
|
There should be a hard line break
|
||||||
here.
|
here.
|
||||||
|
@ -185,7 +185,7 @@ Multiple paragraphs:
|
||||||
|
|
||||||
1. Item 1, graf one.
|
1. Item 1, graf one.
|
||||||
|
|
||||||
Item 1. graf two. The quick brown fox jumped over the lazy dog's
|
Item 1. graf two. The quick brown fox jumped over the lazy dog’s
|
||||||
back.
|
back.
|
||||||
|
|
||||||
2. Item 2.
|
2. Item 2.
|
||||||
|
@ -201,7 +201,7 @@ Multiple paragraphs:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Here's another:
|
Here’s another:
|
||||||
|
|
||||||
1. First
|
1. First
|
||||||
2. Second:
|
2. Second:
|
||||||
|
@ -395,7 +395,7 @@ And this is **strong**
|
||||||
|
|
||||||
<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
|
<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
|
||||||
|
|
||||||
Here's a simple block:
|
Here’s a simple block:
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
|
@ -450,7 +450,7 @@ Code:
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
Hr's:
|
Hr’s:
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
@ -505,22 +505,22 @@ unescaped spaces: a\^b c\^d, a\~b c\~d.
|
||||||
|
|
||||||
# Smart quotes, ellipses, dashes
|
# Smart quotes, ellipses, dashes
|
||||||
|
|
||||||
"Hello," said the spider. "'Shelob' is my name."
|
“Hello,” said the spider. “‘Shelob’ is my name.”
|
||||||
|
|
||||||
'A', 'B', and 'C' are letters.
|
‘A’, ‘B’, and ‘C’ are letters.
|
||||||
|
|
||||||
'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.'
|
‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’
|
||||||
|
|
||||||
'He said, "I want to go."' Were you alive in the 70's?
|
‘He said, “I want to go.”’ Were you alive in the 70’s?
|
||||||
|
|
||||||
Here is some quoted '`code`' and a
|
Here is some quoted ‘`code`’ and a
|
||||||
"[quoted link](http://example.com/?foo=1&bar=2)".
|
“[quoted link](http://example.com/?foo=1&bar=2)”.
|
||||||
|
|
||||||
Some dashes: one--two -- three--four -- five.
|
Some dashes: one—two — three—four — five.
|
||||||
|
|
||||||
Dashes between numbers: 5-7, 255-66, 1987-1999.
|
Dashes between numbers: 5–7, 255–66, 1987–1999.
|
||||||
|
|
||||||
Ellipses...and...and....
|
Ellipses…and…and….
|
||||||
|
|
||||||
|
|
||||||
* * * * *
|
* * * * *
|
||||||
|
@ -533,20 +533,20 @@ Ellipses...and...and....
|
||||||
- $\alpha \wedge \omega$
|
- $\alpha \wedge \omega$
|
||||||
- $223$
|
- $223$
|
||||||
- $p$-Tree
|
- $p$-Tree
|
||||||
- Here's some display math:
|
- Here’s some display math:
|
||||||
$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
|
$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
|
||||||
- Here's one that has a line break in it:
|
- Here’s one that has a line break in it:
|
||||||
$\alpha + \omega \times x^2$.
|
$\alpha + \omega \times x^2$.
|
||||||
|
|
||||||
These shouldn't be math:
|
These shouldn’t be math:
|
||||||
|
|
||||||
- To get the famous equation, write `$e = mc^2$`.
|
- To get the famous equation, write `$e = mc^2$`.
|
||||||
- $22,000 is a *lot* of money. So is $34,000. (It worked if "lot"
|
- $22,000 is a *lot* of money. So is $34,000. (It worked if “lot”
|
||||||
is emphasized.)
|
is emphasized.)
|
||||||
- Shoes ($20) and socks ($5).
|
- Shoes ($20) and socks ($5).
|
||||||
- Escaped `$`: $73 *this should be emphasized* 23$.
|
- Escaped `$`: $73 *this should be emphasized* 23$.
|
||||||
|
|
||||||
Here's a LaTeX table:
|
Here’s a LaTeX table:
|
||||||
|
|
||||||
\begin{tabular}{|l|l|}\hline
|
\begin{tabular}{|l|l|}\hline
|
||||||
Animal & Number \\ \hline
|
Animal & Number \\ \hline
|
||||||
|
@ -662,15 +662,15 @@ Foo [biz](/url/ "Title with "quote" inside").
|
||||||
|
|
||||||
## With ampersands
|
## With ampersands
|
||||||
|
|
||||||
Here's a
|
Here’s a
|
||||||
[link with an ampersand in the URL](http://example.com/?foo=1&bar=2).
|
[link with an ampersand in the URL](http://example.com/?foo=1&bar=2).
|
||||||
|
|
||||||
Here's a link with an amersand in the link text:
|
Here’s a link with an amersand in the link text:
|
||||||
[AT&T](http://att.com/ "AT&T").
|
[AT&T](http://att.com/ "AT&T").
|
||||||
|
|
||||||
Here's an [inline link](/script?foo=1&bar=2).
|
Here’s an [inline link](/script?foo=1&bar=2).
|
||||||
|
|
||||||
Here's an [inline link in pointy braces](/script?foo=1&bar=2).
|
Here’s an [inline link in pointy braces](/script?foo=1&bar=2).
|
||||||
|
|
||||||
## Autolinks
|
## Autolinks
|
||||||
|
|
||||||
|
@ -693,7 +693,7 @@ Auto-links should not occur here: `<http://example.com/>`
|
||||||
|
|
||||||
# Images
|
# Images
|
||||||
|
|
||||||
From "Voyage dans la Lune" by Georges Melies (1902):
|
From “Voyage dans la Lune” by Georges Melies (1902):
|
||||||
|
|
||||||
![lalune](lalune.jpg "Voyage dans la Lune")
|
![lalune](lalune.jpg "Voyage dans la Lune")
|
||||||
|
|
||||||
|
@ -721,7 +721,7 @@ indented.
|
||||||
reference. It need not be placed at the end of the document.
|
reference. It need not be placed at the end of the document.
|
||||||
|
|
||||||
[^2]:
|
[^2]:
|
||||||
Here's the long note. This one contains multiple blocks.
|
Here’s the long note. This one contains multiple blocks.
|
||||||
|
|
||||||
Subsequent blocks are indented to show that they belong to the
|
Subsequent blocks are indented to show that they belong to the
|
||||||
footnote (as with list items).
|
footnote (as with list items).
|
||||||
|
|
|
@ -3,7 +3,7 @@ John MacFarlane; Anonymous
|
||||||
July 17, 2006
|
July 17, 2006
|
||||||
|
|
||||||
This is a set of tests for pandoc. Most of them are adapted from
|
This is a set of tests for pandoc. Most of them are adapted from
|
||||||
John Gruber's markdown test suite.
|
John Gruber’s markdown test suite.
|
||||||
|
|
||||||
|
|
||||||
* * * * *
|
* * * * *
|
||||||
|
@ -41,13 +41,13 @@ with no blank line
|
||||||
Paragraphs
|
Paragraphs
|
||||||
==========
|
==========
|
||||||
|
|
||||||
Here's a regular paragraph.
|
Here’s a regular paragraph.
|
||||||
|
|
||||||
In Markdown 1.0.0 and earlier. Version 8. This line turns into a
|
In Markdown 1.0.0 and earlier. Version 8. This line turns into a
|
||||||
list item. Because a hard-wrapped line in the middle of a paragraph
|
list item. Because a hard-wrapped line in the middle of a paragraph
|
||||||
looked like a list item.
|
looked like a list item.
|
||||||
|
|
||||||
Here's one with a bullet. * criminey.
|
Here’s one with a bullet. * criminey.
|
||||||
|
|
||||||
There should be a hard line break
|
There should be a hard line break
|
||||||
here.
|
here.
|
||||||
|
@ -196,7 +196,7 @@ Multiple paragraphs:
|
||||||
|
|
||||||
1. Item 1, graf one.
|
1. Item 1, graf one.
|
||||||
|
|
||||||
Item 1. graf two. The quick brown fox jumped over the lazy dog's
|
Item 1. graf two. The quick brown fox jumped over the lazy dog’s
|
||||||
back.
|
back.
|
||||||
|
|
||||||
2. Item 2.
|
2. Item 2.
|
||||||
|
@ -213,7 +213,7 @@ Nested
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Here's another:
|
Here’s another:
|
||||||
|
|
||||||
1. First
|
1. First
|
||||||
2. Second:
|
2. Second:
|
||||||
|
@ -388,7 +388,7 @@ Interpreted markdown in a table:
|
||||||
|
|
||||||
This is emphasized
|
This is emphasized
|
||||||
And this is strong
|
And this is strong
|
||||||
Here's a simple block:
|
Here’s a simple block:
|
||||||
|
|
||||||
foo
|
foo
|
||||||
This should be a code block, though:
|
This should be a code block, though:
|
||||||
|
@ -418,7 +418,7 @@ Code:
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
Hr's:
|
Hr’s:
|
||||||
|
|
||||||
|
|
||||||
* * * * *
|
* * * * *
|
||||||
|
@ -457,21 +457,21 @@ unescaped spaces: a^b c^d, a~b c~d.
|
||||||
Smart quotes, ellipses, dashes
|
Smart quotes, ellipses, dashes
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
"Hello," said the spider. "'Shelob' is my name."
|
“Hello,” said the spider. “‘Shelob’ is my name.”
|
||||||
|
|
||||||
'A', 'B', and 'C' are letters.
|
‘A’, ‘B’, and ‘C’ are letters.
|
||||||
|
|
||||||
'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.'
|
‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’
|
||||||
|
|
||||||
'He said, "I want to go."' Were you alive in the 70's?
|
‘He said, “I want to go.”’ Were you alive in the 70’s?
|
||||||
|
|
||||||
Here is some quoted 'code' and a "quoted link".
|
Here is some quoted ‘code’ and a “quoted link”.
|
||||||
|
|
||||||
Some dashes: one--two -- three--four -- five.
|
Some dashes: one—two — three—four — five.
|
||||||
|
|
||||||
Dashes between numbers: 5-7, 255-66, 1987-1999.
|
Dashes between numbers: 5–7, 255–66, 1987–1999.
|
||||||
|
|
||||||
Ellipses...and...and....
|
Ellipses…and…and….
|
||||||
|
|
||||||
|
|
||||||
* * * * *
|
* * * * *
|
||||||
|
@ -485,20 +485,20 @@ LaTeX
|
||||||
- \alpha \wedge \omega
|
- \alpha \wedge \omega
|
||||||
- 223
|
- 223
|
||||||
- p-Tree
|
- p-Tree
|
||||||
- Here's some display math:
|
- Here’s some display math:
|
||||||
\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}
|
\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}
|
||||||
- Here's one that has a line break in it:
|
- Here’s one that has a line break in it:
|
||||||
\alpha + \omega \times x^2.
|
\alpha + \omega \times x^2.
|
||||||
|
|
||||||
These shouldn't be math:
|
These shouldn’t be math:
|
||||||
|
|
||||||
- To get the famous equation, write $e = mc^2$.
|
- To get the famous equation, write $e = mc^2$.
|
||||||
- $22,000 is a lot of money. So is $34,000. (It worked if "lot"
|
- $22,000 is a lot of money. So is $34,000. (It worked if “lot”
|
||||||
is emphasized.)
|
is emphasized.)
|
||||||
- Shoes ($20) and socks ($5).
|
- Shoes ($20) and socks ($5).
|
||||||
- Escaped $: $73 this should be emphasized 23$.
|
- Escaped $: $73 this should be emphasized 23$.
|
||||||
|
|
||||||
Here's a LaTeX table:
|
Here’s a LaTeX table:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -615,13 +615,13 @@ Foo biz.
|
||||||
With ampersands
|
With ampersands
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
Here's a link with an ampersand in the URL.
|
Here’s a link with an ampersand in the URL.
|
||||||
|
|
||||||
Here's a link with an amersand in the link text: AT&T.
|
Here’s a link with an amersand in the link text: AT&T.
|
||||||
|
|
||||||
Here's an inline link.
|
Here’s an inline link.
|
||||||
|
|
||||||
Here's an inline link in pointy braces.
|
Here’s an inline link in pointy braces.
|
||||||
|
|
||||||
Autolinks
|
Autolinks
|
||||||
---------
|
---------
|
||||||
|
@ -646,7 +646,7 @@ Auto-links should not occur here: <http://example.com/>
|
||||||
Images
|
Images
|
||||||
======
|
======
|
||||||
|
|
||||||
From "Voyage dans la Lune" by Georges Melies (1902):
|
From “Voyage dans la Lune” by Georges Melies (1902):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -675,7 +675,7 @@ indented.
|
||||||
reference. It need not be placed at the end of the document.
|
reference. It need not be placed at the end of the document.
|
||||||
|
|
||||||
[^2]:
|
[^2]:
|
||||||
Here's the long note. This one contains multiple blocks.
|
Here’s the long note. This one contains multiple blocks.
|
||||||
|
|
||||||
Subsequent blocks are indented to show that they belong to the
|
Subsequent blocks are indented to show that they belong to the
|
||||||
footnote (as with list items).
|
footnote (as with list items).
|
||||||
|
|
|
@ -10,7 +10,7 @@ Pandoc Test Suite
|
||||||
:format: html latex
|
:format: html latex
|
||||||
|
|
||||||
This is a set of tests for pandoc. Most of them are adapted from
|
This is a set of tests for pandoc. Most of them are adapted from
|
||||||
John Gruber's markdown test suite.
|
John Gruber’s markdown test suite.
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
@ -50,13 +50,13 @@ with no blank line
|
||||||
Paragraphs
|
Paragraphs
|
||||||
==========
|
==========
|
||||||
|
|
||||||
Here's a regular paragraph.
|
Here’s a regular paragraph.
|
||||||
|
|
||||||
In Markdown 1.0.0 and earlier. Version 8. This line turns into a
|
In Markdown 1.0.0 and earlier. Version 8. This line turns into a
|
||||||
list item. Because a hard-wrapped line in the middle of a paragraph
|
list item. Because a hard-wrapped line in the middle of a paragraph
|
||||||
looked like a list item.
|
looked like a list item.
|
||||||
|
|
||||||
Here's one with a bullet. \* criminey.
|
Here’s one with a bullet. \* criminey.
|
||||||
|
|
||||||
There should be a hard line break
|
There should be a hard line break
|
||||||
here.
|
here.
|
||||||
|
@ -224,7 +224,7 @@ Multiple paragraphs:
|
||||||
|
|
||||||
1. Item 1, graf one.
|
1. Item 1, graf one.
|
||||||
|
|
||||||
Item 1. graf two. The quick brown fox jumped over the lazy dog's
|
Item 1. graf two. The quick brown fox jumped over the lazy dog’s
|
||||||
back.
|
back.
|
||||||
|
|
||||||
2. Item 2.
|
2. Item 2.
|
||||||
|
@ -244,7 +244,7 @@ Nested
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Here's another:
|
Here’s another:
|
||||||
|
|
||||||
|
|
||||||
1. First
|
1. First
|
||||||
|
@ -489,7 +489,7 @@ And this is **strong**
|
||||||
|
|
||||||
<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
|
<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
|
||||||
|
|
||||||
Here's a simple block:
|
Here’s a simple block:
|
||||||
|
|
||||||
|
|
||||||
.. raw:: html
|
.. raw:: html
|
||||||
|
@ -575,7 +575,7 @@ Code:
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
Hr's:
|
Hr’s:
|
||||||
|
|
||||||
|
|
||||||
.. raw:: html
|
.. raw:: html
|
||||||
|
@ -635,22 +635,22 @@ unescaped spaces: a^b c^d, a~b c~d.
|
||||||
Smart quotes, ellipses, dashes
|
Smart quotes, ellipses, dashes
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
"Hello," said the spider. "'Shelob' is my name."
|
“Hello,” said the spider. “‘Shelob’ is my name.”
|
||||||
|
|
||||||
'A', 'B', and 'C' are letters.
|
‘A’, ‘B’, and ‘C’ are letters.
|
||||||
|
|
||||||
'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.'
|
‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’
|
||||||
|
|
||||||
'He said, "I want to go."' Were you alive in the 70's?
|
‘He said, “I want to go.”’ Were you alive in the 70’s?
|
||||||
|
|
||||||
Here is some quoted '``code``' and a
|
Here is some quoted ‘``code``’ and a
|
||||||
"`quoted link <http://example.com/?foo=1&bar=2>`_".
|
“`quoted link <http://example.com/?foo=1&bar=2>`_”.
|
||||||
|
|
||||||
Some dashes: one--two -- three--four -- five.
|
Some dashes: one—two — three—four — five.
|
||||||
|
|
||||||
Dashes between numbers: 5-7, 255-66, 1987-1999.
|
Dashes between numbers: 5–7, 255–66, 1987–1999.
|
||||||
|
|
||||||
Ellipses...and...and....
|
Ellipses…and…and….
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
@ -664,21 +664,21 @@ LaTeX
|
||||||
- :math:`$\alpha \wedge \omega$`
|
- :math:`$\alpha \wedge \omega$`
|
||||||
- :math:`$223$`
|
- :math:`$223$`
|
||||||
- :math:`$p$`-Tree
|
- :math:`$p$`-Tree
|
||||||
- Here's some display math:
|
- Here’s some display math:
|
||||||
:math:`$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$`
|
:math:`$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$`
|
||||||
- Here's one that has a line break in it:
|
- Here’s one that has a line break in it:
|
||||||
:math:`$\alpha + \omega \times x^2$`.
|
:math:`$\alpha + \omega \times x^2$`.
|
||||||
|
|
||||||
These shouldn't be math:
|
These shouldn’t be math:
|
||||||
|
|
||||||
|
|
||||||
- To get the famous equation, write ``$e = mc^2$``.
|
- To get the famous equation, write ``$e = mc^2$``.
|
||||||
- $22,000 is a *lot* of money. So is $34,000. (It worked if "lot"
|
- $22,000 is a *lot* of money. So is $34,000. (It worked if “lot”
|
||||||
is emphasized.)
|
is emphasized.)
|
||||||
- Shoes ($20) and socks ($5).
|
- Shoes ($20) and socks ($5).
|
||||||
- Escaped ``$``: $73 *this should be emphasized* 23$.
|
- Escaped ``$``: $73 *this should be emphasized* 23$.
|
||||||
|
|
||||||
Here's a LaTeX table:
|
Here’s a LaTeX table:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -796,15 +796,15 @@ Foo `biz </url/>`_.
|
||||||
With ampersands
|
With ampersands
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
Here's a
|
Here’s a
|
||||||
`link with an ampersand in the URL <http://example.com/?foo=1&bar=2>`_.
|
`link with an ampersand in the URL <http://example.com/?foo=1&bar=2>`_.
|
||||||
|
|
||||||
Here's a link with an amersand in the link text:
|
Here’s a link with an amersand in the link text:
|
||||||
`AT&T <http://att.com/>`_.
|
`AT&T <http://att.com/>`_.
|
||||||
|
|
||||||
Here's an `inline link </script?foo=1&bar=2>`_.
|
Here’s an `inline link </script?foo=1&bar=2>`_.
|
||||||
|
|
||||||
Here's an `inline link in pointy braces </script?foo=1&bar=2>`_.
|
Here’s an `inline link in pointy braces </script?foo=1&bar=2>`_.
|
||||||
|
|
||||||
Autolinks
|
Autolinks
|
||||||
---------
|
---------
|
||||||
|
@ -832,7 +832,7 @@ Auto-links should not occur here: ``<http://example.com/>``
|
||||||
Images
|
Images
|
||||||
======
|
======
|
||||||
|
|
||||||
From "Voyage dans la Lune" by Georges Melies (1902):
|
From “Voyage dans la Lune” by Georges Melies (1902):
|
||||||
|
|
||||||
.. figure:: lalune.jpg
|
.. figure:: lalune.jpg
|
||||||
:align: center
|
:align: center
|
||||||
|
@ -865,7 +865,7 @@ indented.
|
||||||
reference. It need not be placed at the end of the document.
|
reference. It need not be placed at the end of the document.
|
||||||
|
|
||||||
.. [2]
|
.. [2]
|
||||||
Here's the long note. This one contains multiple blocks.
|
Here’s the long note. This one contains multiple blocks.
|
||||||
|
|
||||||
Subsequent blocks are indented to show that they belong to the
|
Subsequent blocks are indented to show that they belong to the
|
||||||
footnote (as with list items).
|
footnote (as with list items).
|
||||||
|
|
Loading…
Reference in a new issue