git.iko.soy/typeable/pandoc
on rc/2.9.1.1 help sign in
typeable/pandoc/test/latex-reader.latex
842 lines 13 kB history raw
1\documentclass{article}
2\usepackage[utf8x]{inputenc}
4\usepackage{hyperref}
5\usepackage[normalem]{ulem}
6\usepackage{enumerate}
7\usepackage{setspace}
8\usepackage{fancyvrb}
9\usepackage{graphicx}
10\VerbatimFootnotes % allows verbatim text in footnotes
12\title{Pandoc Test Suite}
13\author{John MacFarlane \and Anonymous}
14\date{July 17, 2006}
16\begin{document}
17\maketitle
19This is a set of tests for pandoc. Most of them are adapted from
20John Gruber's markdown test suite.
22\begin{center}\rule{3in}{0.4pt}\end{center}
24\section{Headers}
26\subsection{Level 2 with an \href{/url}{embedded link}}
28\subsubsection{Level 3 with \emph{emphasis}}
30Level 4
32Level 5
34\section[alt title ignored]{Level 1}
36\subsection{Level 2 with \emph{emphasis}}
38\subsubsection{Level 3}
40with no blank line
42\subsection{Level 2}
44with no blank line
46\begin{center}\rule{3in}{0.4pt}\end{center}
48\section{Paragraphs}
50Here's a regular paragraph.
52In Markdown 1.0.0 and earlier. Version 8. This line turns into a
53list item. Because a hard-wrapped line in the middle of a paragraph
54looked like a list item.
56Here's one with a bullet. * criminey.
58There should be a hard line break\\here.
60\begin{center}\rule{3in}{0.4pt}\end{center}
62\section{Block Quotes}
64E-mail style:
66\begin{quote}
67This is a block quote. It is pretty short.
69\end{quote}
70\begin {quote}
71Code in a block quote:
73\begin{verbatim}
74sub status {
75 print "working";
77\end{verbatim}
78A list:
80\begin{enumerate}[1.]
81\item
82 item one
83\item
84 item two
85\end{enumerate}
86Nested block quotes:
88\begin{quote}
89nested
91\end{quote}
92\begin{quote}
93nested
95\end{quote}
96\end{quote}
97This should not be a block quote: 2 \textgreater{} 1.
99Box-style:
101\begin{quote}
102Example:
104\begin{verbatim}
105sub status {
106 print "working";
108\end{verbatim}
109\end{quote}
110\begin{quote}
111\begin{enumerate}[1.]
112\item
113 do laundry
114\item
115 take out the trash
116\end{enumerate}
117\end{quote}
118Here's a nested one:
120\begin{quote}
121Joe said:
123\begin{quote}
124Don't quote me.
126\end{quote}
127\end{quote}
128And a following paragraph.
130\begin{center}\rule{3in}{0.4pt}\end{center}
132\section{Code Blocks}
134Code:
136\begin{verbatim}
137---- (should be four hyphens)
139sub status {
140 print "working";
143this code block is indented by one tab
144\end{verbatim}
145And:
147\begin{verbatim}
148 this code block is indented by two tabs
150These should not be escaped: \$ \\ \> \[ \{
151\end{verbatim}
153\begin{obeylines}
154this has \emph{two
155lines}
156\end{obeylines}
157\begin{center}\rule{3in}{0.4pt}\end{center}
159\section{Lists}
161\subsection{Unordered}
163Asterisks tight:
165\begin{itemize}
166\item
167 asterisk 1
168\item
169 asterisk 2
170\item
171 asterisk 3
172\end{itemize}
173Asterisks loose:
175\begin{itemize}
176\item
177 asterisk 1
179\item
180 asterisk 2
182\item
183 asterisk 3
185\end{itemize}
186Pluses tight:
188\begin{itemize}
189\item
190 Plus 1
191\item
192 Plus 2
193\item
194 Plus 3
195\end{itemize}
196Pluses loose:
198\begin{itemize}
199\item
200 Plus 1
202\item
203 Plus 2
205\item
206 Plus 3
208\end{itemize}
209Minuses tight:
211\begin{itemize}
212\item
213 Minus 1
214\item
215 Minus 2
216\item
217 Minus 3
218\end{itemize}
219Minuses loose:
221\begin{itemize}
222\item
223 Minus 1
225\item
226 Minus 2
228\item
229 Minus 3
231\end{itemize}
232\subsection{Ordered}
234Tight:
236\begin{enumerate}[1.]
237\item
238 First
239\item
240 Second
241\item
242 Third
243\end{enumerate}
244and:
246\begin{enumerate}[1.]
247\item
248 One
249\item
250 Two
251\item
252 Three
253\end{enumerate}
254Loose using tabs:
256\begin{enumerate}[1.]
257\item
258 First
260\item
261 Second
263\item
264 Third
266\end{enumerate}
267and using spaces:
269\begin{enumerate}[1.]
270\item
271 One
273\item
274 Two
276\item
277 Three
279\end{enumerate}
280Multiple paragraphs:
282\begin{enumerate}[1.]
283\item
284 Item 1, graf one.
286 Item 1. graf two. The quick brown fox jumped over the lazy dog's
287 back.
289\item
290 Item 2.
292\item
293 Item 3.
295\end{enumerate}
296\subsection{Nested}
298\begin{itemize}
299\item
300 Tab
301 \begin{itemize}
302 \item
303 Tab
304 \begin{itemize}
305 \item
306 Tab
307 \end{itemize}
308 \end{itemize}
309\end{itemize}
310Here's another:
312\begin{enumerate}[1.]
313\item
314 First
315\item
316 Second:
317 \begin{itemize}
318 \item
319 Fee
320 \item
321 Fie
322 \item
323 Foe
324 \end{itemize}
325\item
326 Third
327\end{enumerate}
328Same thing but with paragraphs:
330\begin{enumerate}[1.]
331\item
332 First
334\item
335 Second:
337 \begin{itemize}
338 \item
339 Fee
340 \item
341 Fie
342 \item
343 Foe
344 \end{itemize}
345\item
346 Third
348\end{enumerate}
349\subsection{Tabs and spaces}
351\begin{itemize}
352\item
353 this is a list item indented with tabs
355\item
356 this is a list item indented with spaces
358 \begin{itemize}
359 \item
360 this is an example list item indented with tabs
362 \item
363 this is an example list item indented with spaces
365 \end{itemize}
366\end{itemize}
367\subsection{Fancy list markers}
369\begin{enumerate}[(1)]
370\setcounter{enumi}{1}
371\item
372 begins with 2
373\item
374 and now 3
376 with a continuation
378 \begin{enumerate}[i.]
379 \setcounter{enumii}{3}
380 \item
381 sublist with roman numerals, starting with 4
382 \item
383 more items
384 \begin{enumerate}[(A)]
385 \item
386 a subsublist
387 \item
388 a subsublist
389 \end{enumerate}
390 \end{enumerate}
391\end{enumerate}
392Nesting:
394\begin{enumerate}[A.]
395\item
396 Upper Alpha
397 \begin{enumerate}[I.]
398 \item
399 Upper Roman.
400 \begin{enumerate}[(1)]
401 \setcounter{enumiii}{5}
402 \item
403 Decimal start with 6
404 \begin{enumerate}[a)]
405 \setcounter{enumiv}{2}
406 \item
407 Lower alpha with paren
408 \end{enumerate}
409 \end{enumerate}
410 \end{enumerate}
411\end{enumerate}
412Autonumbering:
414\begin{enumerate}
415\item
416 Autonumber.
417\item
418 More.
419 \begin{enumerate}
420 \item
421 Nested.
422 \end{enumerate}
423\end{enumerate}
424Should not be a list item:
426M.A. 2007
428B. Williams
430\begin{center}\rule{3in}{0.4pt}\end{center}
432\section{Definition Lists}
434Tight using spaces:
436\begin{description}
437\item[apple]
438red fruit
439\item[orange]
440orange fruit
441\item[banana]
442yellow fruit
443\end{description}
444Tight using tabs:
446\begin{description}
447\item[apple]
448red fruit
449\item[orange]
450orange fruit
451\item[banana]
452yellow fruit
453\end{description}
454Loose:
456\begin{description}
457\item[apple]
458red fruit
460\item[orange]
461orange fruit
463\item[banana]
464yellow fruit
466\end{description}
467Multiple blocks with italics:
469\begin{description}
470\item[\emph{apple}]
471red fruit
473contains seeds, crisp, pleasant to taste
475\item[\emph{orange}]
476orange fruit
478\begin{verbatim}
479{ orange code block }
480\end{verbatim}
481\begin{quote}
482orange block quote
484\end{quote}
485\end{description}
486\section{HTML Blocks}
488Simple block on one line:
490foo
491And nested without indentation:
493foo
494bar
495Interpreted markdown in a table:
497This is \emph{emphasized}
498And this is \textbf{strong}
499Here's a simple block:
501foo
502This should be a code block, though:
504\begin{verbatim}
505<div>
506 foo
507</div>
508\end{verbatim}
509As should this:
511\begin{verbatim}
512<div>foo</div>
513\end{verbatim}
514Now, nested:
516foo
517This should just be an HTML comment:
519Multiline:
521Code block:
523\begin{verbatim}
524<!-- Comment -->
525\end{verbatim}
526Just plain comment, with trailing spaces on the line:
528Code:
530\begin{verbatim}
531<hr />
532\end{verbatim}
533Hr's:
535\begin{center}\rule{3in}{0.4pt}\end{center}
537\section{Inline Markup}
539This is \emph{emphasized}, and so \emph{is this}.
541This is \textbf{strong}, and so \textbf{is this}.
543An \emph{\href{/url}{emphasized link}}.
545\textbf{\emph{This is strong and em.}}
547So is \textbf{\emph{this}} word.
549\textbf{\emph{This is strong and em.}}
551So is \textbf{\emph{this}} word.
553This is code: \verb!>!, \verb!$!, \verb!\!, \verb!\$!,
554\verb!<html>!.
556\sout{This is \emph{strikeout}.}
558Superscripts: a\textsuperscript{bc}d
559a\textsuperscript{\emph{hello}} a\textsuperscript{hello there}.
561Subscripts: H\textsubscript{2}O, H\textsubscript{23}O,
562H\textsubscript{many of them}O.
564These should not be superscripts or subscripts, because of the
565unescaped spaces: a\^{}b c\^{}d, a\ensuremath{\sim}b
566c\ensuremath{\sim}d.
568\begin{center}\rule{3in}{0.4pt}\end{center}
570\section{Smart quotes, ellipses, dashes}
572``Hello,'' said the spider. ``\,`Shelob' is my name.''
574`A', `B', and `C' are letters.
576`Oak,' `elm,' and `beech' are names of trees. So is `pine.'
578`He said, ``I want to go.''\,' Were you alive in the 70's?
580Here is some quoted `\verb!code!' and a
581``\href{http://example.com/?foo=1&bar=2}{quoted link}''.
583Some dashes: one---two---three---four---five.
585Dashes between numbers: 5--7, 255--66, 1987--1999.
587Ellipses\ldots{}and\ldots{}and\ldots{}.
589\begin{center}\rule{3in}{0.4pt}\end{center}
591\section{LaTeX}
593\begin{itemize}
594\item
595 \cite[22-23]{smith.1899}
596\item
597 \doublespacing
598\item
599 $2+2=4$
600\item
601 $x \in y$
602\item
603 $\alpha \wedge \omega$
604\item
605 $223$
606\item
607 $p$-Tree
608\item
609 $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
610\item
611 Here's one that has a line break in it:
612 $\alpha + \omega \times x^2$.
613\end{itemize}
614These shouldn't be math:
616\begin{itemize}
617\item
618 To get the famous equation, write \verb!$e = mc^2$!.
619\item
620 \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if
621 ``lot'' is emphasized.)
622\item
623 Escaped \verb!$!: \$73 \emph{this should be emphasized} 23\$.
624\end{itemize}
625Here's a LaTeX table:
627\begin{tabular}{|l|l|}\hline
628Animal & Number \\ \hline
629Dog & 2 \\
630Cat & 1 \\ \hline
631\end{tabular}
633A table with one column:
635\begin{tabular}{c}
636Animal \\
637Vegetable
638\end{tabular}
640\begin{center}\rule{3in}{0.4pt}\end{center}
642\section{Special Characters}
644Here is some unicode:
646\begin{itemize}
647\item
648 I hat: Î
649\item
650 o umlaut: ö
651\item
652 section: §
653\item
654 set membership: ∈
655\item
656 copyright: ©
657\end{itemize}
658AT\&T has an ampersand in their name.
660AT\&T is another way to write it.
662This \& that.
6644 \textless{} 5.
6666 \textgreater{} 5.
668Backslash: \textbackslash{}
670Backtick: `
672Asterisk: *
674Underscore: \_
676Left brace: \{
678Right brace: \}
680Left bracket: [
682Right bracket: ]
684Left paren: (
686Right paren: )
688Greater-than: \textgreater{}
690Hash: \#
692Period: .
694Bang: !
696Plus: +
698Minus: -
700\begin{center}\rule{3in}{0.4pt}\end{center}
702\section{Links}
704\subsection{Explicit}
706Just a \href{/url/}{URL}.
708\href{/url/}{URL and title}.
710\href{/url/}{URL and title}.
712\href{/url/}{URL and title}.
714\href{/url/}{URL and title}
716\href{/url/}{URL and title}
718\href{/url/with_underscore}{with\_underscore}
720\href{mailto:nobody@nowhere.net}{Email link}
722\href{}{Empty}.
724\subsection{Reference}
726Foo \href{/url/}{bar}.
728Foo \href{/url/}{bar}.
730Foo \href{/url/}{bar}.
732With \href{/url/}{embedded [brackets]}.
734\href{/url/}{b} by itself should be a link.
736Indented \href{/url}{once}.
738Indented \href{/url}{twice}.
740Indented \href{/url}{thrice}.
742This should [not][] be a link.
744\begin{verbatim}
745[not]: /url
746\end{verbatim}
747Foo \href{/url/}{bar}.
749Foo \href{/url/}{biz}.
751\subsection{With ampersands}
753Here's a
754\href{http://example.com/?foo=1&bar=2}{link with an ampersand in the URL}.
756Here's a link with an amersand in the link text:
757\href{http://att.com/}{AT\&T}.
759Here's an \href{/script?foo=1&bar=2}{inline link}.
761Here's an
762\href{/script?foo=1&bar=2}{inline link in pointy braces}.
764\subsection{Autolinks}
766With an ampersand: \url{http://example.com/?foo=1&bar=2}
768\begin{itemize}
769\item
770 In a list?
771\item
772 \url{http://example.com/}
773\item
774 It should.
775\end{itemize}
776An e-mail address:
777\href{mailto:nobody@nowhere.net}{nobody@nowhere.net}
779\begin{quote}
780Blockquoted: \url{http://example.com/}
782\end{quote}
783Auto-links should not occur here: \verb!<http://example.com/>!
785\begin{verbatim}
786or here: <http://example.com/>
787\end{verbatim}
788\begin{center}\rule{3in}{0.4pt}\end{center}
790\section{Images}
792From ``Voyage dans la Lune'' by Georges Melies (1902):
794\includegraphics{lalune.jpg}
796Here is a movie \includegraphics{movie.jpg} icon.
798\begin{center}\rule{3in}{0.4pt}\end{center}
800\section{Footnotes}
802Here is a footnote
803reference,\footnote{ Here is the footnote. It can go anywhere after the footnote
804reference. It need not be placed at the end of the document.
806and
807another.\footnote{ Here's the long note. This one contains multiple blocks.
809Subsequent blocks are indented to show that they belong to the
810footnote (as with list items).
812\begin{Verbatim}
813 { <code> }
814\end{Verbatim}
815If you want, you can indent every line, but you can also be lazy
816and just indent the first line of each block.
818This should \emph{not} be a footnote reference, because it contains
819a space.[\^{}my note] Here is an inline
820note.\footnote{ This is \emph{easier} to type. Inline notes may contain
821\href{http://google.com}{links} and \verb!]! verbatim characters,
822as well as [bracketed text].
825\begin{quote}
826Notes can go in quotes.\footnote{ In quote.
829\end{quote}
830\begin{enumerate}[1.]
831\item
832 And in list items.\footnote{ In list.
834\end{enumerate}
835This paragraph should not be part of the note, as it is not
836indented.
838\section{Escaped characters}
840\$ \% \& \# \_ \{ \}
842\end{document}