git.iko.soy/typeable/pandoc
on 1.9.0.5 help sign in
typeable/pandoc/tests/latex-reader.latex
832 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\newcommand{\textsubscript}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
8\usepackage[breaklinks=true,unicode=true]{hyperref}
9\usepackage[normalem]{ulem}
10% avoid problems with \sout in headers with hyperref:
11\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
12\usepackage{enumerate}
13\usepackage{fancyvrb}
14\usepackage{graphicx}
15\usepackage{url}
17\setcounter{secnumdepth}{0}
18\VerbatimFootnotes % allows verbatim text in footnotes
19\title{Pandoc Test Suite}
20\author{John MacFarlane \and Anonymous}
21\date{July 17, 2006}
22\begin{document}
23\maketitle
25This is a set of tests for pandoc. Most of them are adapted from
26John Gruber's markdown test suite.
28\begin{center}\rule{3in}{0.4pt}\end{center}
30\section{Headers}
32\subsection{Level 2 with an \href{/url}{embedded link}}
34\subsubsection{Level 3 with \emph{emphasis}}
36Level 4
38Level 5
40\section[alt title ignored]{Level 1}
42\subsection{Level 2 with \emph{emphasis}}
44\subsubsection{Level 3}
46with no blank line
48\subsection{Level 2}
50with no blank line
52\begin{center}\rule{3in}{0.4pt}\end{center}
54\section{Paragraphs}
56Here's a regular paragraph.
58In Markdown 1.0.0 and earlier. Version 8. This line turns into a
59list item. Because a hard-wrapped line in the middle of a paragraph
60looked like a list item.
62Here's one with a bullet. * criminey.
64There should be a hard line break\\here.
66\begin{center}\rule{3in}{0.4pt}\end{center}
68\section{Block Quotes}
70E-mail style:
72\begin{quote}
73This is a block quote. It is pretty short.
75\end{quote}
76\begin {quote}
77Code in a block quote:
79\begin{verbatim}
80sub status {
81 print "working";
83\end{verbatim}
84A list:
86\begin{enumerate}[1.]
87\item
88 item one
89\item
90 item two
91\end{enumerate}
92Nested block quotes:
94\begin{quote}
95nested
97\end{quote}
98\begin{quote}
99nested
101\end{quote}
102\end{quote}
103This should not be a block quote: 2 \textgreater{} 1.
105Box-style:
107\begin{quote}
108Example:
110\begin{verbatim}
111sub status {
112 print "working";
114\end{verbatim}
115\end{quote}
116\begin{quote}
117\begin{enumerate}[1.]
118\item
119 do laundry
120\item
121 take out the trash
122\end{enumerate}
123\end{quote}
124Here's a nested one:
126\begin{quote}
127Joe said:
129\begin{quote}
130Don't quote me.
132\end{quote}
133\end{quote}
134And a following paragraph.
136\begin{center}\rule{3in}{0.4pt}\end{center}
138\section{Code Blocks}
140Code:
142\begin{verbatim}
143---- (should be four hyphens)
145sub status {
146 print "working";
149this code block is indented by one tab
150\end{verbatim}
151And:
153\begin{verbatim}
154 this code block is indented by two tabs
156These should not be escaped: \$ \\ \> \[ \{
157\end{verbatim}
158\begin{center}\rule{3in}{0.4pt}\end{center}
160\section{Lists}
162\subsection{Unordered}
164Asterisks tight:
166\begin{itemize}
167\item
168 asterisk 1
169\item
170 asterisk 2
171\item
172 asterisk 3
173\end{itemize}
174Asterisks loose:
176\begin{itemize}
177\item
178 asterisk 1
180\item
181 asterisk 2
183\item
184 asterisk 3
186\end{itemize}
187Pluses tight:
189\begin{itemize}
190\item
191 Plus 1
192\item
193 Plus 2
194\item
195 Plus 3
196\end{itemize}
197Pluses loose:
199\begin{itemize}
200\item
201 Plus 1
203\item
204 Plus 2
206\item
207 Plus 3
209\end{itemize}
210Minuses tight:
212\begin{itemize}
213\item
214 Minus 1
215\item
216 Minus 2
217\item
218 Minus 3
219\end{itemize}
220Minuses loose:
222\begin{itemize}
223\item
224 Minus 1
226\item
227 Minus 2
229\item
230 Minus 3
232\end{itemize}
233\subsection{Ordered}
235Tight:
237\begin{enumerate}[1.]
238\item
239 First
240\item
241 Second
242\item
243 Third
244\end{enumerate}
245and:
247\begin{enumerate}[1.]
248\item
249 One
250\item
251 Two
252\item
253 Three
254\end{enumerate}
255Loose using tabs:
257\begin{enumerate}[1.]
258\item
259 First
261\item
262 Second
264\item
265 Third
267\end{enumerate}
268and using spaces:
270\begin{enumerate}[1.]
271\item
272 One
274\item
275 Two
277\item
278 Three
280\end{enumerate}
281Multiple paragraphs:
283\begin{enumerate}[1.]
284\item
285 Item 1, graf one.
287 Item 1. graf two. The quick brown fox jumped over the lazy dog's
288 back.
290\item
291 Item 2.
293\item
294 Item 3.
296\end{enumerate}
297\subsection{Nested}
299\begin{itemize}
300\item
301 Tab
302 \begin{itemize}
303 \item
304 Tab
305 \begin{itemize}
306 \item
307 Tab
308 \end{itemize}
309 \end{itemize}
310\end{itemize}
311Here's another:
313\begin{enumerate}[1.]
314\item
315 First
316\item
317 Second:
318 \begin{itemize}
319 \item
320 Fee
321 \item
322 Fie
323 \item
324 Foe
325 \end{itemize}
326\item
327 Third
328\end{enumerate}
329Same thing but with paragraphs:
331\begin{enumerate}[1.]
332\item
333 First
335\item
336 Second:
338 \begin{itemize}
339 \item
340 Fee
341 \item
342 Fie
343 \item
344 Foe
345 \end{itemize}
346\item
347 Third
349\end{enumerate}
350\subsection{Tabs and spaces}
352\begin{itemize}
353\item
354 this is a list item indented with tabs
356\item
357 this is a list item indented with spaces
359 \begin{itemize}
360 \item
361 this is an example list item indented with tabs
363 \item
364 this is an example list item indented with spaces
366 \end{itemize}
367\end{itemize}
368\subsection{Fancy list markers}
370\begin{enumerate}[(1)]
371\setcounter{enumi}{1}
372\item
373 begins with 2
374\item
375 and now 3
377 with a continuation
379 \begin{enumerate}[i.]
380 \setcounter{enumii}{3}
381 \item
382 sublist with roman numerals, starting with 4
383 \item
384 more items
385 \begin{enumerate}[(A)]
386 \item
387 a subsublist
388 \item
389 a subsublist
390 \end{enumerate}
391 \end{enumerate}
392\end{enumerate}
393Nesting:
395\begin{enumerate}[A.]
396\item
397 Upper Alpha
398 \begin{enumerate}[I.]
399 \item
400 Upper Roman.
401 \begin{enumerate}[(1)]
402 \setcounter{enumiii}{5}
403 \item
404 Decimal start with 6
405 \begin{enumerate}[a)]
406 \setcounter{enumiv}{2}
407 \item
408 Lower alpha with paren
409 \end{enumerate}
410 \end{enumerate}
411 \end{enumerate}
412\end{enumerate}
413Autonumbering:
415\begin{enumerate}
416\item
417 Autonumber.
418\item
419 More.
420 \begin{enumerate}
421 \item
422 Nested.
423 \end{enumerate}
424\end{enumerate}
425Should not be a list item:
427M.A. 2007
429B. Williams
431\begin{center}\rule{3in}{0.4pt}\end{center}
433\section{Definition Lists}
435Tight using spaces:
437\begin{description}
438\item[apple]
439red fruit
440\item[orange]
441orange fruit
442\item[banana]
443yellow fruit
444\end{description}
445Tight using tabs:
447\begin{description}
448\item[apple]
449red fruit
450\item[orange]
451orange fruit
452\item[banana]
453yellow fruit
454\end{description}
455Loose:
457\begin{description}
458\item[apple]
459red fruit
461\item[orange]
462orange fruit
464\item[banana]
465yellow fruit
467\end{description}
468Multiple blocks with italics:
470\begin{description}
471\item[\emph{apple}]
472red fruit
474contains seeds, crisp, pleasant to taste
476\item[\emph{orange}]
477orange fruit
479\begin{verbatim}
480{ orange code block }
481\end{verbatim}
482\begin{quote}
483orange block quote
485\end{quote}
486\end{description}
487\section{HTML Blocks}
489Simple block on one line:
491foo
492And nested without indentation:
494foo
495bar
496Interpreted markdown in a table:
498This is \emph{emphasized}
499And this is \textbf{strong}
500Here's a simple block:
502foo
503This should be a code block, though:
505\begin{verbatim}
506<div>
507 foo
508</div>
509\end{verbatim}
510As should this:
512\begin{verbatim}
513<div>foo</div>
514\end{verbatim}
515Now, nested:
517foo
518This should just be an HTML comment:
520Multiline:
522Code block:
524\begin{verbatim}
525<!-- Comment -->
526\end{verbatim}
527Just plain comment, with trailing spaces on the line:
529Code:
531\begin{verbatim}
532<hr />
533\end{verbatim}
534Hr's:
536\begin{center}\rule{3in}{0.4pt}\end{center}
538\section{Inline Markup}
540This is \emph{emphasized}, and so \emph{is this}.
542This is \textbf{strong}, and so \textbf{is this}.
544An \emph{\href{/url}{emphasized link}}.
546\textbf{\emph{This is strong and em.}}
548So is \textbf{\emph{this}} word.
550\textbf{\emph{This is strong and em.}}
552So is \textbf{\emph{this}} word.
554This is code: \verb!>!, \verb!$!, \verb!\!, \verb!\$!,
555\verb!<html>!.
557\sout{This is \emph{strikeout}.}
559Superscripts: a\textsuperscript{bc}d
560a\textsuperscript{\emph{hello}} a\textsuperscript{hello there}.
562Subscripts: H\textsubscript{2}O, H\textsubscript{23}O,
563H\textsubscript{many of them}O.
565These should not be superscripts or subscripts, because of the
566unescaped spaces: a\^{}b c\^{}d, a\ensuremath{\sim}b
567c\ensuremath{\sim}d.
569\begin{center}\rule{3in}{0.4pt}\end{center}
571\section{Smart quotes, ellipses, dashes}
573``Hello,'' said the spider. ``\,`Shelob' is my name.''
575`A', `B', and `C' are letters.
577`Oak,' `elm,' and `beech' are names of trees. So is `pine.'
579`He said, ``I want to go.''\,' Were you alive in the 70's?
581Here is some quoted `\verb!code!' and a
582``\href{http://example.com/?foo=1&bar=2}{quoted link}''.
584Some dashes: one---two---three---four---five.
586Dashes between numbers: 5--7, 255--66, 1987--1999.
588Ellipses\ldots{}and\ldots{}and\ldots{}.
590\begin{center}\rule{3in}{0.4pt}\end{center}
592\section{LaTeX}
594\begin{itemize}
595\item
596 \cite[22-23]{smith.1899}
597\item
598 \doublespacing
599\item
600 $2+2=4$
601\item
602 $x \in y$
603\item
604 $\alpha \wedge \omega$
605\item
606 $223$
607\item
608 $p$-Tree
609\item
610 $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
611\item
612 Here's one that has a line break in it:
613 $\alpha + \omega \times x^2$.
614\end{itemize}
615These shouldn't be math:
617\begin{itemize}
618\item
619 To get the famous equation, write \verb!$e = mc^2$!.
620\item
621 \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if
622 ``lot'' is emphasized.)
623\item
624 Escaped \verb!$!: \$73 \emph{this should be emphasized} 23\$.
625\end{itemize}
626Here's a LaTeX table:
628\begin{tabular}{|l|l|}\hline
629Animal & Number \\ \hline
630Dog & 2 \\
631Cat & 1 \\ \hline
632\end{tabular}
634\begin{center}\rule{3in}{0.4pt}\end{center}
636\section{Special Characters}
638Here is some unicode:
640\begin{itemize}
641\item
642 I hat: Î
643\item
644 o umlaut: ö
645\item
646 section: §
647\item
648 set membership: ∈
649\item
650 copyright: ©
651\end{itemize}
652AT\&T has an ampersand in their name.
654AT\&T is another way to write it.
656This \& that.
6584 \textless{} 5.
6606 \textgreater{} 5.
662Backslash: \textbackslash{}
664Backtick: `
666Asterisk: *
668Underscore: \_
670Left brace: \{
672Right brace: \}
674Left bracket: [
676Right bracket: ]
678Left paren: (
680Right paren: )
682Greater-than: \textgreater{}
684Hash: \#
686Period: .
688Bang: !
690Plus: +
692Minus: -
694\begin{center}\rule{3in}{0.4pt}\end{center}
696\section{Links}
698\subsection{Explicit}
700Just a \href{/url/}{URL}.
702\href{/url/}{URL and title}.
704\href{/url/}{URL and title}.
706\href{/url/}{URL and title}.
708\href{/url/}{URL and title}
710\href{/url/}{URL and title}
712\href{/url/with_underscore}{with\_underscore}
714\href{mailto:nobody@nowhere.net}{Email link}
716\href{}{Empty}.
718\subsection{Reference}
720Foo \href{/url/}{bar}.
722Foo \href{/url/}{bar}.
724Foo \href{/url/}{bar}.
726With \href{/url/}{embedded [brackets]}.
728\href{/url/}{b} by itself should be a link.
730Indented \href{/url}{once}.
732Indented \href{/url}{twice}.
734Indented \href{/url}{thrice}.
736This should [not][] be a link.
738\begin{verbatim}
739[not]: /url
740\end{verbatim}
741Foo \href{/url/}{bar}.
743Foo \href{/url/}{biz}.
745\subsection{With ampersands}
747Here's a
748\href{http://example.com/?foo=1&bar=2}{link with an ampersand in the URL}.
750Here's a link with an amersand in the link text:
751\href{http://att.com/}{AT\&T}.
753Here's an \href{/script?foo=1&bar=2}{inline link}.
755Here's an
756\href{/script?foo=1&bar=2}{inline link in pointy braces}.
758\subsection{Autolinks}
760With an ampersand: \url{http://example.com/?foo=1&bar=2}
762\begin{itemize}
763\item
764 In a list?
765\item
766 \url{http://example.com/}
767\item
768 It should.
769\end{itemize}
770An e-mail address:
771\href{mailto:nobody@nowhere.net}{\texttt{nobody@nowhere.net}}
773\begin{quote}
774Blockquoted: \url{http://example.com/}
776\end{quote}
777Auto-links should not occur here: \verb!<http://example.com/>!
779\begin{verbatim}
780or here: <http://example.com/>
781\end{verbatim}
782\begin{center}\rule{3in}{0.4pt}\end{center}
784\section{Images}
786From ``Voyage dans la Lune'' by Georges Melies (1902):
788\includegraphics{lalune.jpg}
790Here is a movie \includegraphics{movie.jpg} icon.
792\begin{center}\rule{3in}{0.4pt}\end{center}
794\section{Footnotes}
796Here is a footnote
797reference,\footnote{ Here is the footnote. It can go anywhere after the footnote
798reference. It need not be placed at the end of the document.
800and
801another.\footnote{ Here's the long note. This one contains multiple blocks.
803Subsequent blocks are indented to show that they belong to the
804footnote (as with list items).
806\begin{Verbatim}
807 { <code> }
808\end{Verbatim}
809If you want, you can indent every line, but you can also be lazy
810and just indent the first line of each block.
812This should \emph{not} be a footnote reference, because it contains
813a space.[\^{}my note] Here is an inline
814note.\footnote{ This is \emph{easier} to type. Inline notes may contain
815\href{http://google.com}{links} and \verb!]! verbatim characters,
816as well as [bracketed text].
819\begin{quote}
820Notes can go in quotes.\footnote{ In quote.
823\end{quote}
824\begin{enumerate}[1.]
825\item
826 And in list items.\footnote{ In list.
828\end{enumerate}
829This paragraph should not be part of the note, as it is not
830indented.
832\end{document}