git.iko.soy/typeable/pandoc
on 2.0.2 help sign in
typeable/pandoc/test/latex-reader.latex
847 lines 13 kB history raw
1\documentclass{article}
2\usepackage[mathletters]{ucs}
3\usepackage[utf8x]{inputenc}
4\setlength{\parindent}{0pt}
5\setlength{\parskip}{6pt plus 2pt minus 1pt}
7\usepackage[breaklinks=true,unicode=true]{hyperref}
8\usepackage[normalem]{ulem}
9% avoid problems with \sout in headers with hyperref:
10\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
11\usepackage{enumerate}
12\usepackage{fancyvrb}
13\usepackage{graphicx}
14\usepackage{url}
16\setcounter{secnumdepth}{0}
17\VerbatimFootnotes % allows verbatim text in footnotes
18\title{Pandoc Test Suite}
19\author{John MacFarlane \and Anonymous}
20\date{July 17, 2006}
21\begin{document}
22\maketitle
24This is a set of tests for pandoc. Most of them are adapted from
25John Gruber's markdown test suite.
27\begin{center}\rule{3in}{0.4pt}\end{center}
29\section{Headers}
31\subsection{Level 2 with an \href{/url}{embedded link}}
33\subsubsection{Level 3 with \emph{emphasis}}
35Level 4
37Level 5
39\section[alt title ignored]{Level 1}
41\subsection{Level 2 with \emph{emphasis}}
43\subsubsection{Level 3}
45with no blank line
47\subsection{Level 2}
49with no blank line
51\begin{center}\rule{3in}{0.4pt}\end{center}
53\section{Paragraphs}
55Here's a regular paragraph.
57In Markdown 1.0.0 and earlier. Version 8. This line turns into a
58list item. Because a hard-wrapped line in the middle of a paragraph
59looked like a list item.
61Here's one with a bullet. * criminey.
63There should be a hard line break\\here.
65\begin{center}\rule{3in}{0.4pt}\end{center}
67\section{Block Quotes}
69E-mail style:
71\begin{quote}
72This is a block quote. It is pretty short.
74\end{quote}
75\begin {quote}
76Code in a block quote:
78\begin{verbatim}
79sub status {
80 print "working";
82\end{verbatim}
83A list:
85\begin{enumerate}[1.]
86\item
87 item one
88\item
89 item two
90\end{enumerate}
91Nested block quotes:
93\begin{quote}
94nested
96\end{quote}
97\begin{quote}
98nested
100\end{quote}
101\end{quote}
102This should not be a block quote: 2 \textgreater{} 1.
104Box-style:
106\begin{quote}
107Example:
109\begin{verbatim}
110sub status {
111 print "working";
113\end{verbatim}
114\end{quote}
115\begin{quote}
116\begin{enumerate}[1.]
117\item
118 do laundry
119\item
120 take out the trash
121\end{enumerate}
122\end{quote}
123Here's a nested one:
125\begin{quote}
126Joe said:
128\begin{quote}
129Don't quote me.
131\end{quote}
132\end{quote}
133And a following paragraph.
135\begin{center}\rule{3in}{0.4pt}\end{center}
137\section{Code Blocks}
139Code:
141\begin{verbatim}
142---- (should be four hyphens)
144sub status {
145 print "working";
148this code block is indented by one tab
149\end{verbatim}
150And:
152\begin{verbatim}
153 this code block is indented by two tabs
155These should not be escaped: \$ \\ \> \[ \{
156\end{verbatim}
158\begin{obeylines}
159this has \emph{two
160lines}
161\end{obeylines}
162\begin{center}\rule{3in}{0.4pt}\end{center}
164\section{Lists}
166\subsection{Unordered}
168Asterisks tight:
170\begin{itemize}
171\item
172 asterisk 1
173\item
174 asterisk 2
175\item
176 asterisk 3
177\end{itemize}
178Asterisks loose:
180\begin{itemize}
181\item
182 asterisk 1
184\item
185 asterisk 2
187\item
188 asterisk 3
190\end{itemize}
191Pluses tight:
193\begin{itemize}
194\item
195 Plus 1
196\item
197 Plus 2
198\item
199 Plus 3
200\end{itemize}
201Pluses loose:
203\begin{itemize}
204\item
205 Plus 1
207\item
208 Plus 2
210\item
211 Plus 3
213\end{itemize}
214Minuses tight:
216\begin{itemize}
217\item
218 Minus 1
219\item
220 Minus 2
221\item
222 Minus 3
223\end{itemize}
224Minuses loose:
226\begin{itemize}
227\item
228 Minus 1
230\item
231 Minus 2
233\item
234 Minus 3
236\end{itemize}
237\subsection{Ordered}
239Tight:
241\begin{enumerate}[1.]
242\item
243 First
244\item
245 Second
246\item
247 Third
248\end{enumerate}
249and:
251\begin{enumerate}[1.]
252\item
253 One
254\item
255 Two
256\item
257 Three
258\end{enumerate}
259Loose using tabs:
261\begin{enumerate}[1.]
262\item
263 First
265\item
266 Second
268\item
269 Third
271\end{enumerate}
272and using spaces:
274\begin{enumerate}[1.]
275\item
276 One
278\item
279 Two
281\item
282 Three
284\end{enumerate}
285Multiple paragraphs:
287\begin{enumerate}[1.]
288\item
289 Item 1, graf one.
291 Item 1. graf two. The quick brown fox jumped over the lazy dog's
292 back.
294\item
295 Item 2.
297\item
298 Item 3.
300\end{enumerate}
301\subsection{Nested}
303\begin{itemize}
304\item
305 Tab
306 \begin{itemize}
307 \item
308 Tab
309 \begin{itemize}
310 \item
311 Tab
312 \end{itemize}
313 \end{itemize}
314\end{itemize}
315Here's another:
317\begin{enumerate}[1.]
318\item
319 First
320\item
321 Second:
322 \begin{itemize}
323 \item
324 Fee
325 \item
326 Fie
327 \item
328 Foe
329 \end{itemize}
330\item
331 Third
332\end{enumerate}
333Same thing but with paragraphs:
335\begin{enumerate}[1.]
336\item
337 First
339\item
340 Second:
342 \begin{itemize}
343 \item
344 Fee
345 \item
346 Fie
347 \item
348 Foe
349 \end{itemize}
350\item
351 Third
353\end{enumerate}
354\subsection{Tabs and spaces}
356\begin{itemize}
357\item
358 this is a list item indented with tabs
360\item
361 this is a list item indented with spaces
363 \begin{itemize}
364 \item
365 this is an example list item indented with tabs
367 \item
368 this is an example list item indented with spaces
370 \end{itemize}
371\end{itemize}
372\subsection{Fancy list markers}
374\begin{enumerate}[(1)]
375\setcounter{enumi}{1}
376\item
377 begins with 2
378\item
379 and now 3
381 with a continuation
383 \begin{enumerate}[i.]
384 \setcounter{enumii}{3}
385 \item
386 sublist with roman numerals, starting with 4
387 \item
388 more items
389 \begin{enumerate}[(A)]
390 \item
391 a subsublist
392 \item
393 a subsublist
394 \end{enumerate}
395 \end{enumerate}
396\end{enumerate}
397Nesting:
399\begin{enumerate}[A.]
400\item
401 Upper Alpha
402 \begin{enumerate}[I.]
403 \item
404 Upper Roman.
405 \begin{enumerate}[(1)]
406 \setcounter{enumiii}{5}
407 \item
408 Decimal start with 6
409 \begin{enumerate}[a)]
410 \setcounter{enumiv}{2}
411 \item
412 Lower alpha with paren
413 \end{enumerate}
414 \end{enumerate}
415 \end{enumerate}
416\end{enumerate}
417Autonumbering:
419\begin{enumerate}
420\item
421 Autonumber.
422\item
423 More.
424 \begin{enumerate}
425 \item
426 Nested.
427 \end{enumerate}
428\end{enumerate}
429Should not be a list item:
431M.A. 2007
433B. Williams
435\begin{center}\rule{3in}{0.4pt}\end{center}
437\section{Definition Lists}
439Tight using spaces:
441\begin{description}
442\item[apple]
443red fruit
444\item[orange]
445orange fruit
446\item[banana]
447yellow fruit
448\end{description}
449Tight using tabs:
451\begin{description}
452\item[apple]
453red fruit
454\item[orange]
455orange fruit
456\item[banana]
457yellow fruit
458\end{description}
459Loose:
461\begin{description}
462\item[apple]
463red fruit
465\item[orange]
466orange fruit
468\item[banana]
469yellow fruit
471\end{description}
472Multiple blocks with italics:
474\begin{description}
475\item[\emph{apple}]
476red fruit
478contains seeds, crisp, pleasant to taste
480\item[\emph{orange}]
481orange fruit
483\begin{verbatim}
484{ orange code block }
485\end{verbatim}
486\begin{quote}
487orange block quote
489\end{quote}
490\end{description}
491\section{HTML Blocks}
493Simple block on one line:
495foo
496And nested without indentation:
498foo
499bar
500Interpreted markdown in a table:
502This is \emph{emphasized}
503And this is \textbf{strong}
504Here's a simple block:
506foo
507This should be a code block, though:
509\begin{verbatim}
510<div>
511 foo
512</div>
513\end{verbatim}
514As should this:
516\begin{verbatim}
517<div>foo</div>
518\end{verbatim}
519Now, nested:
521foo
522This should just be an HTML comment:
524Multiline:
526Code block:
528\begin{verbatim}
529<!-- Comment -->
530\end{verbatim}
531Just plain comment, with trailing spaces on the line:
533Code:
535\begin{verbatim}
536<hr />
537\end{verbatim}
538Hr's:
540\begin{center}\rule{3in}{0.4pt}\end{center}
542\section{Inline Markup}
544This is \emph{emphasized}, and so \emph{is this}.
546This is \textbf{strong}, and so \textbf{is this}.
548An \emph{\href{/url}{emphasized link}}.
550\textbf{\emph{This is strong and em.}}
552So is \textbf{\emph{this}} word.
554\textbf{\emph{This is strong and em.}}
556So is \textbf{\emph{this}} word.
558This is code: \verb!>!, \verb!$!, \verb!\!, \verb!\$!,
559\verb!<html>!.
561\sout{This is \emph{strikeout}.}
563Superscripts: a\textsuperscript{bc}d
564a\textsuperscript{\emph{hello}} a\textsuperscript{hello there}.
566Subscripts: H\textsubscript{2}O, H\textsubscript{23}O,
567H\textsubscript{many of them}O.
569These should not be superscripts or subscripts, because of the
570unescaped spaces: a\^{}b c\^{}d, a\ensuremath{\sim}b
571c\ensuremath{\sim}d.
573\begin{center}\rule{3in}{0.4pt}\end{center}
575\section{Smart quotes, ellipses, dashes}
577``Hello,'' said the spider. ``\,`Shelob' is my name.''
579`A', `B', and `C' are letters.
581`Oak,' `elm,' and `beech' are names of trees. So is `pine.'
583`He said, ``I want to go.''\,' Were you alive in the 70's?
585Here is some quoted `\verb!code!' and a
586``\href{http://example.com/?foo=1&bar=2}{quoted link}''.
588Some dashes: one---two---three---four---five.
590Dashes between numbers: 5--7, 255--66, 1987--1999.
592Ellipses\ldots{}and\ldots{}and\ldots{}.
594\begin{center}\rule{3in}{0.4pt}\end{center}
596\section{LaTeX}
598\begin{itemize}
599\item
600 \cite[22-23]{smith.1899}
601\item
602 \doublespacing
603\item
604 $2+2=4$
605\item
606 $x \in y$
607\item
608 $\alpha \wedge \omega$
609\item
610 $223$
611\item
612 $p$-Tree
613\item
614 $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
615\item
616 Here's one that has a line break in it:
617 $\alpha + \omega \times x^2$.
618\end{itemize}
619These shouldn't be math:
621\begin{itemize}
622\item
623 To get the famous equation, write \verb!$e = mc^2$!.
624\item
625 \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if
626 ``lot'' is emphasized.)
627\item
628 Escaped \verb!$!: \$73 \emph{this should be emphasized} 23\$.
629\end{itemize}
630Here's a LaTeX table:
632\begin{tabular}{|l|l|}\hline
633Animal & Number \\ \hline
634Dog & 2 \\
635Cat & 1 \\ \hline
636\end{tabular}
638A table with one column:
640\begin{tabular}{c}
641Animal \\
642Vegetable
643\end{tabular}
645\begin{center}\rule{3in}{0.4pt}\end{center}
647\section{Special Characters}
649Here is some unicode:
651\begin{itemize}
652\item
653 I hat: Î
654\item
655 o umlaut: ö
656\item
657 section: §
658\item
659 set membership: ∈
660\item
661 copyright: ©
662\end{itemize}
663AT\&T has an ampersand in their name.
665AT\&T is another way to write it.
667This \& that.
6694 \textless{} 5.
6716 \textgreater{} 5.
673Backslash: \textbackslash{}
675Backtick: `
677Asterisk: *
679Underscore: \_
681Left brace: \{
683Right brace: \}
685Left bracket: [
687Right bracket: ]
689Left paren: (
691Right paren: )
693Greater-than: \textgreater{}
695Hash: \#
697Period: .
699Bang: !
701Plus: +
703Minus: -
705\begin{center}\rule{3in}{0.4pt}\end{center}
707\section{Links}
709\subsection{Explicit}
711Just a \href{/url/}{URL}.
713\href{/url/}{URL and title}.
715\href{/url/}{URL and title}.
717\href{/url/}{URL and title}.
719\href{/url/}{URL and title}
721\href{/url/}{URL and title}
723\href{/url/with_underscore}{with\_underscore}
725\href{mailto:nobody@nowhere.net}{Email link}
727\href{}{Empty}.
729\subsection{Reference}
731Foo \href{/url/}{bar}.
733Foo \href{/url/}{bar}.
735Foo \href{/url/}{bar}.
737With \href{/url/}{embedded [brackets]}.
739\href{/url/}{b} by itself should be a link.
741Indented \href{/url}{once}.
743Indented \href{/url}{twice}.
745Indented \href{/url}{thrice}.
747This should [not][] be a link.
749\begin{verbatim}
750[not]: /url
751\end{verbatim}
752Foo \href{/url/}{bar}.
754Foo \href{/url/}{biz}.
756\subsection{With ampersands}
758Here's a
759\href{http://example.com/?foo=1&bar=2}{link with an ampersand in the URL}.
761Here's a link with an amersand in the link text:
762\href{http://att.com/}{AT\&T}.
764Here's an \href{/script?foo=1&bar=2}{inline link}.
766Here's an
767\href{/script?foo=1&bar=2}{inline link in pointy braces}.
769\subsection{Autolinks}
771With an ampersand: \url{http://example.com/?foo=1&bar=2}
773\begin{itemize}
774\item
775 In a list?
776\item
777 \url{http://example.com/}
778\item
779 It should.
780\end{itemize}
781An e-mail address:
782\href{mailto:nobody@nowhere.net}{nobody@nowhere.net}
784\begin{quote}
785Blockquoted: \url{http://example.com/}
787\end{quote}
788Auto-links should not occur here: \verb!<http://example.com/>!
790\begin{verbatim}
791or here: <http://example.com/>
792\end{verbatim}
793\begin{center}\rule{3in}{0.4pt}\end{center}
795\section{Images}
797From ``Voyage dans la Lune'' by Georges Melies (1902):
799\includegraphics{lalune.jpg}
801Here is a movie \includegraphics{movie.jpg} icon.
803\begin{center}\rule{3in}{0.4pt}\end{center}
805\section{Footnotes}
807Here is a footnote
808reference,\footnote{ Here is the footnote. It can go anywhere after the footnote
809reference. It need not be placed at the end of the document.
811and
812another.\footnote{ Here's the long note. This one contains multiple blocks.
814Subsequent blocks are indented to show that they belong to the
815footnote (as with list items).
817\begin{Verbatim}
818 { <code> }
819\end{Verbatim}
820If you want, you can indent every line, but you can also be lazy
821and just indent the first line of each block.
823This should \emph{not} be a footnote reference, because it contains
824a space.[\^{}my note] Here is an inline
825note.\footnote{ This is \emph{easier} to type. Inline notes may contain
826\href{http://google.com}{links} and \verb!]! verbatim characters,
827as well as [bracketed text].
830\begin{quote}
831Notes can go in quotes.\footnote{ In quote.
834\end{quote}
835\begin{enumerate}[1.]
836\item
837 And in list items.\footnote{ In list.
839\end{enumerate}
840This paragraph should not be part of the note, as it is not
841indented.
843\section{Escaped characters}
845\$ \% \& \# \_ \{ \}
847\end{document}