git.iko.soy/typeable/pandoc
on master help sign in
Modified latex writer tests for new latex writer using prettyprinter.
18f150cfiddlosopher
tests/writer.latex+282−153
@@ -3,6 +3,7 @@
3\usepackage[utf8x]{inputenc}
3\usepackage[utf8x]{inputenc}
4\setlength{\parindent}{0pt}
4\setlength{\parindent}{0pt}
5\setlength{\parskip}{6pt plus 2pt minus 1pt}
5\setlength{\parskip}{6pt plus 2pt minus 1pt}
6+
6\newcommand{\textsubscript}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
7\newcommand{\textsubscript}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
7\usepackage[breaklinks=true]{hyperref}
8\usepackage[breaklinks=true]{hyperref}
8\usepackage[normalem]{ulem}
9\usepackage[normalem]{ulem}
@@ -10,6 +11,7 @@
10\usepackage{fancyvrb}
11\usepackage{fancyvrb}
11\usepackage{graphicx}
12\usepackage{graphicx}
12\usepackage{url}
13\usepackage{url}
14+
13\setcounter{secnumdepth}{0}
15\setcounter{secnumdepth}{0}
14\VerbatimFootnotes % allows verbatim text in footnotes
16\VerbatimFootnotes % allows verbatim text in footnotes
15\title{Pandoc Test Suite}
17\title{Pandoc Test Suite}
@@ -18,7 +20,8 @@
18\begin{document}
20\begin{document}
19\maketitle
21\maketitle
20
22
21−This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite.
23+This is a set of tests for pandoc. Most of them are adapted from
24+John Gruber's markdown test suite.
22
25
23\begin{center}\rule{3in}{0.4pt}\end{center}
26\begin{center}\rule{3in}{0.4pt}\end{center}
24
27
@@ -50,12 +53,13 @@ with no blank line
50
53
51Here's a regular paragraph.
54Here's a regular paragraph.
52
55
56+In Markdown 1.0.0 and earlier. Version 8. This line turns into a
53−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 looked like a list item.
57+list item. Because a hard-wrapped line in the middle of a paragraph
58+looked like a list item.
54
59
55Here's one with a bullet. * criminey.
60Here's one with a bullet. * criminey.
56
61
57−There should be a hard line break\\
62+There should be a hard line break\\here.
58−here.
59
63
60\begin{center}\rule{3in}{0.4pt}\end{center}
64\begin{center}\rule{3in}{0.4pt}\end{center}
61
65
@@ -78,8 +82,10 @@ sub status {
78A list:
82A list:
79
83
80\begin{enumerate}[1.]
84\begin{enumerate}[1.]
85+\item
81−\item item one
86+ item one
87+\item
82−\item item two
88+ item two
83\end{enumerate}
89\end{enumerate}
84Nested block quotes:
90Nested block quotes:
85
91
@@ -107,8 +113,10 @@ sub status {
107\end{quote}
113\end{quote}
108\begin{quote}
114\begin{quote}
109\begin{enumerate}[1.]
115\begin{enumerate}[1.]
116+\item
110−\item do laundry
117+ do laundry
118+\item
111−\item take out the trash
119+ take out the trash
112\end{enumerate}
120\end{enumerate}
113\end{quote}
121\end{quote}
114Here's a nested one:
122Here's a nested one:
@@ -154,52 +162,70 @@ These should not be escaped: \$ \\ \> \[ \{
154Asterisks tight:
162Asterisks tight:
155
163
156\begin{itemize}
164\begin{itemize}
165+\item
157−\item asterisk 1
166+ asterisk 1
167+\item
158−\item asterisk 2
168+ asterisk 2
169+\item
159−\item asterisk 3
170+ asterisk 3
160\end{itemize}
171\end{itemize}
161Asterisks loose:
172Asterisks loose:
162
173
163\begin{itemize}
174\begin{itemize}
175+\item
164−\item asterisk 1
176+ asterisk 1
165
177
178+\item
166−\item asterisk 2
179+ asterisk 2
167
180
181+\item
168−\item asterisk 3
182+ asterisk 3
169
183
170\end{itemize}
184\end{itemize}
171Pluses tight:
185Pluses tight:
172
186
173\begin{itemize}
187\begin{itemize}
188+\item
174−\item Plus 1
189+ Plus 1
190+\item
175−\item Plus 2
191+ Plus 2
192+\item
176−\item Plus 3
193+ Plus 3
177\end{itemize}
194\end{itemize}
178Pluses loose:
195Pluses loose:
179
196
180\begin{itemize}
197\begin{itemize}
198+\item
181−\item Plus 1
199+ Plus 1
182
200
201+\item
183−\item Plus 2
202+ Plus 2
184
203
204+\item
185−\item Plus 3
205+ Plus 3
186
206
187\end{itemize}
207\end{itemize}
188Minuses tight:
208Minuses tight:
189
209
190\begin{itemize}
210\begin{itemize}
211+\item
191−\item Minus 1
212+ Minus 1
213+\item
192−\item Minus 2
214+ Minus 2
215+\item
193−\item Minus 3
216+ Minus 3
194\end{itemize}
217\end{itemize}
195Minuses loose:
218Minuses loose:
196
219
197\begin{itemize}
220\begin{itemize}
221+\item
198−\item Minus 1
222+ Minus 1
199
223
224+\item
200−\item Minus 2
225+ Minus 2
201
226
227+\item
202−\item Minus 3
228+ Minus 3
203
229
204\end{itemize}
230\end{itemize}
205\subsection{Ordered}
231\subsection{Ordered}
@@ -207,144 +233,192 @@ Minuses loose:
207Tight:
233Tight:
208
234
209\begin{enumerate}[1.]
235\begin{enumerate}[1.]
236+\item
210−\item First
237+ First
238+\item
211−\item Second
239+ Second
240+\item
212−\item Third
241+ Third
213\end{enumerate}
242\end{enumerate}
214and:
243and:
215
244
216\begin{enumerate}[1.]
245\begin{enumerate}[1.]
217−\item One
246+\item
247+ One
218−\item Two
248+\item
249+ Two
250+\item
219−\item Three
251+ Three
220\end{enumerate}
252\end{enumerate}
221Loose using tabs:
253Loose using tabs:
222
254
223\begin{enumerate}[1.]
255\begin{enumerate}[1.]
256+\item
224−\item First
257+ First
225
258
259+\item
226−\item Second
260+ Second
227
261
262+\item
228−\item Third
263+ Third
229
264
230\end{enumerate}
265\end{enumerate}
231and using spaces:
266and using spaces:
232
267
233\begin{enumerate}[1.]
268\begin{enumerate}[1.]
234−\item One
269+\item
270+ One
235
271
236−\item Two
272+\item
273+ Two
237
274
275+\item
238−\item Three
276+ Three
239
277
240\end{enumerate}
278\end{enumerate}
241Multiple paragraphs:
279Multiple paragraphs:
242
280
243\begin{enumerate}[1.]
281\begin{enumerate}[1.]
282+\item
244−\item Item 1, graf one.
283+ Item 1, graf one.
245
284
246−Item 1. graf two. The quick brown fox jumped over the lazy dog's back.
285+ Item 1. graf two. The quick brown fox jumped over the lazy dog's
286+ back.
247
287
288+\item
248−\item Item 2.
289+ Item 2.
249
290
291+\item
250−\item Item 3.
292+ Item 3.
251
293
252\end{enumerate}
294\end{enumerate}
253\subsection{Nested}
295\subsection{Nested}
254
296
255\begin{itemize}
297\begin{itemize}
256−\item Tab
298+\item
299+ Tab
257−\begin{itemize}
300+ \begin{itemize}
258−\item Tab
301+ \item
302+ Tab
259−\begin{itemize}
303+ \begin{itemize}
260−\item Tab
304+ \item
305+ Tab
261−\end{itemize}
306+ \end{itemize}
262−\end{itemize}
307+ \end{itemize}
263\end{itemize}
308\end{itemize}
264Here's another:
309Here's another:
265
310
266\begin{enumerate}[1.]
311\begin{enumerate}[1.]
312+\item
267−\item First
313+ First
314+\item
268−\item Second:
315+ Second:
269−\begin{itemize}
316+ \begin{itemize}
270−\item Fee
317+ \item
318+ Fee
271−\item Fie
319+ \item
320+ Fie
272−\item Foe
321+ \item
322+ Foe
273−\end{itemize}
323+ \end{itemize}
324+\item
274−\item Third
325+ Third
275\end{enumerate}
326\end{enumerate}
276Same thing but with paragraphs:
327Same thing but with paragraphs:
277
328
278\begin{enumerate}[1.]
329\begin{enumerate}[1.]
330+\item
279−\item First
331+ First
280−
332+
333+\item
281−\item Second:
334+ Second:
282−
335+
283−\begin{itemize}
336+ \begin{itemize}
284−\item Fee
337+ \item
338+ Fee
285−\item Fie
339+ \item
340+ Fie
286−\item Foe
341+ \item
342+ Foe
287−\end{itemize}
343+ \end{itemize}
344+\item
288−\item Third
345+ Third
289
346
290\end{enumerate}
347\end{enumerate}
291\subsection{Tabs and spaces}
348\subsection{Tabs and spaces}
292
349
293\begin{itemize}
350\begin{itemize}
351+\item
294−\item this is a list item indented with tabs
352+ this is a list item indented with tabs
295
353
354+\item
296−\item this is a list item indented with spaces
355+ this is a list item indented with spaces
297
356
298−\begin{itemize}
357+ \begin{itemize}
358+ \item
299−\item this is an example list item indented with tabs
359+ this is an example list item indented with tabs
300
360
361+ \item
301−\item this is an example list item indented with spaces
362+ this is an example list item indented with spaces
302
363
303−\end{itemize}
364+ \end{itemize}
304\end{itemize}
365\end{itemize}
305\subsection{Fancy list markers}
366\subsection{Fancy list markers}
306
367
307\begin{enumerate}[(1)]
368\begin{enumerate}[(1)]
308\setcounter{enumi}{1}
369\setcounter{enumi}{1}
370+\item
309−\item begins with 2
371+ begins with 2
372+\item
310−\item and now 3
373+ and now 3
311−
374+
312−with a continuation
375+ with a continuation
313−
376+
314−\begin{enumerate}[i.]
377+ \begin{enumerate}[i.]
315−\setcounter{enumii}{3}
378+ \setcounter{enumii}{3}
379+ \item
316−\item sublist with roman numerals, starting with 4
380+ sublist with roman numerals, starting with 4
381+ \item
317−\item more items
382+ more items
318−\begin{enumerate}[(A)]
383+ \begin{enumerate}[(A)]
384+ \item
319−\item a subsublist
385+ a subsublist
386+ \item
320−\item a subsublist
387+ a subsublist
321−\end{enumerate}
388+ \end{enumerate}
322−\end{enumerate}
389+ \end{enumerate}
323\end{enumerate}
390\end{enumerate}
324Nesting:
391Nesting:
325
392
326\begin{enumerate}[A.]
393\begin{enumerate}[A.]
394+\item
327−\item Upper Alpha
395+ Upper Alpha
328−\begin{enumerate}[I.]
396+ \begin{enumerate}[I.]
397+ \item
329−\item Upper Roman.
398+ Upper Roman.
330−\begin{enumerate}[(1)]
399+ \begin{enumerate}[(1)]
331−\setcounter{enumiii}{5}
400+ \setcounter{enumiii}{5}
401+ \item
332−\item Decimal start with 6
402+ Decimal start with 6
333−\begin{enumerate}[a)]
403+ \begin{enumerate}[a)]
334−\setcounter{enumiv}{2}
404+ \setcounter{enumiv}{2}
405+ \item
335−\item Lower alpha with paren
406+ Lower alpha with paren
336−\end{enumerate}
407+ \end{enumerate}
337−\end{enumerate}
408+ \end{enumerate}
338−\end{enumerate}
409+ \end{enumerate}
339\end{enumerate}
410\end{enumerate}
340Autonumbering:
411Autonumbering:
341
412
342\begin{enumerate}
413\begin{enumerate}
414+\item
343−\item Autonumber.
415+ Autonumber.
344−\item More.
416+\item
417+ More.
345−\begin{enumerate}
418+ \begin{enumerate}
419+ \item
346−\item Nested.
420+ Nested.
347−\end{enumerate}
421+ \end{enumerate}
348\end{enumerate}
422\end{enumerate}
349Should not be a list item:
423Should not be a list item:
350
424
@@ -359,35 +433,46 @@ B. Williams
359Tight using spaces:
433Tight using spaces:
360
434
361\begin{description}
435\begin{description}
362−\item[apple] red fruit
436+\item[apple]
437+red fruit
438+\item[orange]
363−\item[orange] orange fruit
439+orange fruit
440+\item[banana]
364−\item[banana] yellow fruit
441+yellow fruit
365\end{description}
442\end{description}
366Tight using tabs:
443Tight using tabs:
367
444
368\begin{description}
445\begin{description}
369−\item[apple] red fruit
446+\item[apple]
447+red fruit
448+\item[orange]
370−\item[orange] orange fruit
449+orange fruit
450+\item[banana]
371−\item[banana] yellow fruit
451+yellow fruit
372\end{description}
452\end{description}
373Loose:
453Loose:
374
454
375\begin{description}
455\begin{description}
376−\item[apple] red fruit
456+\item[apple]
457+red fruit
377
458
459+\item[orange]
378−\item[orange] orange fruit
460+orange fruit
379
461
462+\item[banana]
380−\item[banana] yellow fruit
463+yellow fruit
381
464
382\end{description}
465\end{description}
383Multiple blocks with italics:
466Multiple blocks with italics:
384
467
385\begin{description}
468\begin{description}
386−\item[\emph{apple}] red fruit
469+\item[\emph{apple}]
470+red fruit
387
471
388contains seeds, crisp, pleasant to taste
472contains seeds, crisp, pleasant to taste
389
473
390−\item[\emph{orange}] orange fruit
474+\item[\emph{orange}]
475+orange fruit
391
476
392\begin{verbatim}
477\begin{verbatim}
393{ orange code block }
478{ orange code block }
@@ -464,15 +549,20 @@ So is \textbf{\emph{this}} word.
464
549
465So is \textbf{\emph{this}} word.
550So is \textbf{\emph{this}} word.
466
551
467−This is code: \verb!>!, \verb!$!, \verb!\!, \verb!\$!, \verb!<html>!.
552+This is code: \verb!>!, \verb!$!, \verb!\!, \verb!\$!,
553+\verb!<html>!.
468
554
469\sout{This is \emph{strikeout}.}
555\sout{This is \emph{strikeout}.}
470
556
557+Superscripts: a\textsuperscript{bc}d
471−Superscripts: a\textsuperscript{bc}d a\textsuperscript{\emph{hello}} a\textsuperscript{hello there}.
558+a\textsuperscript{\emph{hello}} a\textsuperscript{hello there}.
472
559
473−Subscripts: H\textsubscript{2}O, H\textsubscript{23}O, H\textsubscript{many of them}O.
560+Subscripts: H\textsubscript{2}O, H\textsubscript{23}O,
561+H\textsubscript{many of them}O.
474
562
475−These should not be superscripts or subscripts, because of the unescaped spaces: a\^{}b c\^{}d, a\ensuremath{\sim}b c\ensuremath{\sim}d.
563+These should not be superscripts or subscripts, because of the
564+unescaped spaces: a\^{}b c\^{}d, a\ensuremath{\sim}b
565+c\ensuremath{\sim}d.
476
566
477\begin{center}\rule{3in}{0.4pt}\end{center}
567\begin{center}\rule{3in}{0.4pt}\end{center}
478
568
@@ -486,7 +576,8 @@ These should not be superscripts or subscripts, because of the unescaped spaces:
486
576
487`He said, ``I want to go.''\,' Were you alive in the 70's?
577`He said, ``I want to go.''\,' Were you alive in the 70's?
488
578
579+Here is some quoted `\verb!code!' and a
489−Here is some quoted `\verb!code!' and a ``\href{http://example.com/?foo=1&bar=2}{quoted link}''.
580+``\href{http://example.com/?foo=1&bar=2}{quoted link}''.
490
581
491Some dashes: one---two---three---four---five.
582Some dashes: one---two---three---four---five.
492
583
@@ -499,22 +590,36 @@ Ellipses\ldots{}and\ldots{}and\ldots{}.
499\section{LaTeX}
590\section{LaTeX}
500
591
501\begin{itemize}
592\begin{itemize}
593+\item
502−\item \cite[22-23]{smith.1899}
594+ \cite[22-23]{smith.1899}
595+\item
503−\item \doublespacing
596+ \doublespacing
504−\item $2+2=4$
597+\item
598+ $2+2=4$
505−\item $x \in y$
599+\item
600+ $x \in y$
601+\item
506−\item $\alpha \wedge \omega$
602+ $\alpha \wedge \omega$
507−\item $223$
603+\item
604+ $223$
605+\item
508−\item $p$-Tree
606+ $p$-Tree
607+\item
509−\item $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
608+ $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
609+\item
510−\item Here's one that has a line break in it: $\alpha + \omega \times x^2$.
610+ Here's one that has a line break in it:
611+ $\alpha + \omega \times x^2$.
511\end{itemize}
612\end{itemize}
512These shouldn't be math:
613These shouldn't be math:
513
614
514\begin{itemize}
615\begin{itemize}
616+\item
515−\item To get the famous equation, write \verb!$e = mc^2$!.
617+ To get the famous equation, write \verb!$e = mc^2$!.
618+\item
516−\item \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if ``lot'' is emphasized.)
619+ \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if
620+ ``lot'' is emphasized.)
621+\item
517−\item Escaped \verb!$!: \$73 \emph{this should be emphasized} 23\$.
622+ Escaped \verb!$!: \$73 \emph{this should be emphasized} 23\$.
518\end{itemize}
623\end{itemize}
519Here's a LaTeX table:
624Here's a LaTeX table:
520
625
@@ -531,11 +636,16 @@ Cat & 1 \\ \hline
531Here is some unicode:
636Here is some unicode:
532
637
533\begin{itemize}
638\begin{itemize}
639+\item
534−\item I hat: Î
640+ I hat: Î
641+\item
535−\item o umlaut: ö
642+ o umlaut: ö
643+\item
536−\item section: §
644+ section: §
645+\item
537−\item set membership: ∈
646+ set membership: ∈
647+\item
538−\item copyright: ©
648+ copyright: ©
539\end{itemize}
649\end{itemize}
540AT\&T has an ampersand in their name.
650AT\&T has an ampersand in their name.
541
651
@@ -632,24 +742,31 @@ Foo \href{/url/}{biz}.
632
742
633\subsection{With ampersands}
743\subsection{With ampersands}
634
744
745+Here's a
635−Here's a \href{http://example.com/?foo=1&bar=2}{link with an ampersand in the URL}.
746+\href{http://example.com/?foo=1&bar=2}{link with an ampersand in the URL}.
636
747
637−Here's a link with an amersand in the link text: \href{http://att.com/}{AT\&T}.
748+Here's a link with an amersand in the link text:
749+\href{http://att.com/}{AT\&T}.
638
750
639Here's an \href{/script?foo=1&bar=2}{inline link}.
751Here's an \href{/script?foo=1&bar=2}{inline link}.
640
752
753+Here's an
641−Here's an \href{/script?foo=1&bar=2}{inline link in pointy braces}.
754+\href{/script?foo=1&bar=2}{inline link in pointy braces}.
642
755
643\subsection{Autolinks}
756\subsection{Autolinks}
644
757
645With an ampersand: \url{http://example.com/?foo=1&bar=2}
758With an ampersand: \url{http://example.com/?foo=1&bar=2}
646
759
647\begin{itemize}
760\begin{itemize}
761+\item
648−\item In a list?
762+ In a list?
763+\item
649−\item \url{http://example.com/}
764+ \url{http://example.com/}
765+\item
650−\item It should.
766+ It should.
651\end{itemize}
767\end{itemize}
768+An e-mail address:
652−An e-mail address: \href{mailto:nobody@nowhere.net}{\texttt{nobody@nowhere.net}}
769+\href{mailto:nobody@nowhere.net}{\texttt{nobody@nowhere.net}}
653
770
654\begin{quote}
771\begin{quote}
655Blockquoted: \url{http://example.com/}
772Blockquoted: \url{http://example.com/}
@@ -674,29 +791,41 @@ Here is a movie \includegraphics{movie.jpg} icon.
674
791
675\section{Footnotes}
792\section{Footnotes}
676
793
794+Here is a footnote
677−Here is a footnote reference,\footnote{Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.
795+reference,\footnote{ Here is the footnote. It can go anywhere after the footnote
796+reference. It need not be placed at the end of the document.
797+}
798+and
678−} and another.\footnote{Here's the long note. This one contains multiple blocks.
799+another.\footnote{ Here's the long note. This one contains multiple blocks.
679
800
680−Subsequent blocks are indented to show that they belong to the footnote (as with list items).
801+Subsequent blocks are indented to show that they belong to the
802+footnote (as with list items).
681
803
682\begin{Verbatim}
804\begin{Verbatim}
683 { <code> }
805 { <code> }
684\end{Verbatim}
806\end{Verbatim}
685−If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.
807+If you want, you can indent every line, but you can also be lazy
808+and just indent the first line of each block.
809+}
686−} This should \emph{not} be a footnote reference, because it contains a space.[\^{}my note] Here is an inline note.\footnote{This is \emph{easier} to type. Inline notes may contain \href{http://google.com}{links} and \verb!]! verbatim characters, as well as [bracketed text].
810+This should \emph{not} be a footnote reference, because it contains
811+a space.[\^{}my note] Here is an inline
812+note.\footnote{ This is \emph{easier} to type. Inline notes may contain
813+\href{http://google.com}{links} and \verb!]! verbatim characters,
814+as well as [bracketed text].
687}
815}
688
816
689\begin{quote}
817\begin{quote}
690−Notes can go in quotes.\footnote{In quote.
818+Notes can go in quotes.\footnote{ In quote.
691}
819}
692
820
693\end{quote}
821\end{quote}
694\begin{enumerate}[1.]
822\begin{enumerate}[1.]
823+\item
695−\item And in list items.\footnote{In list.
824+ And in list items.\footnote{ In list.
696}
825}
697\end{enumerate}
826\end{enumerate}
698−This paragraph should not be part of the note, as it is not indented.
827+This paragraph should not be part of the note, as it is not
828+indented.
699
829
700
830
701\end{document}
831\end{document}
702−