git.iko.soy/typeable/pandoc
on lowmem help sign in
typeable/pandoc/test/writer.latex
996 lines 18 kB history raw
1% Options for packages loaded elsewhere
2\PassOptionsToPackage{unicode}{hyperref}
3\PassOptionsToPackage{hyphens}{url}
4%
5\documentclass[
6]{article}
7\usepackage{amsmath,amssymb}
8\usepackage{lmodern}
9\usepackage{iftex}
10\ifPDFTeX
11 \usepackage[T1]{fontenc}
12 \usepackage[utf8]{inputenc}
13 \usepackage{textcomp} % provide euro and other symbols
14\else % if luatex or xetex
15 \usepackage{unicode-math}
16 \defaultfontfeatures{Scale=MatchLowercase}
17 \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
18\fi
19% Use upquote if available, for straight quotes in verbatim environments
20\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
21\IfFileExists{microtype.sty}{% use microtype if available
22 \usepackage[]{microtype}
23 \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
24}{}
25\makeatletter
26\@ifundefined{KOMAClassName}{% if non-KOMA class
27 \IfFileExists{parskip.sty}{%
28 \usepackage{parskip}
29 }{% else
30 \setlength{\parindent}{0pt}
31 \setlength{\parskip}{6pt plus 2pt minus 1pt}}
32}{% if KOMA class
33 \KOMAoptions{parskip=half}}
34\makeatother
35\usepackage{fancyvrb}
36\usepackage{xcolor}
37\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
38\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
39\hypersetup{
40 pdftitle={Pandoc Test Suite},
41 pdfauthor={John MacFarlane; Anonymous},
42 hidelinks,
43 pdfcreator={LaTeX via pandoc}}
44\urlstyle{same} % disable monospaced font for URLs
45\VerbatimFootnotes % allow verbatim text in footnotes
46\usepackage{graphicx}
47\makeatletter
48\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
49\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
50\makeatother
51% Scale images if necessary, so that they will not overflow the page
52% margins by default, and it is still possible to overwrite the defaults
53% using explicit options in \includegraphics[width, height, ...]{}
54\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
55% Set default figure placement to htbp
56\makeatletter
57\def\fps@figure{htbp}
58\makeatother
59\usepackage[normalem]{ulem}
60% Avoid problems with \sout in headers with hyperref
61\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
62\setlength{\emergencystretch}{3em} % prevent overfull lines
63\providecommand{\tightlist}{%
64 \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
65\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
66\ifLuaTeX
67 \usepackage{selnolig} % disable illegal ligatures
68\fi
70\title{Pandoc Test Suite}
71\author{John MacFarlane \and Anonymous}
72\date{July 17, 2006}
74\begin{document}
75\maketitle
77This is a set of tests for pandoc. Most of them are adapted from John Gruber's
78markdown test suite.
80\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
82\hypertarget{headers}{%
83\section{Headers}\label{headers}}
85\hypertarget{level-2-with-an-embedded-link}{%
86\subsection{\texorpdfstring{Level 2 with an \href{/url}{embedded
87link}}{Level 2 with an embedded link}}\label{level-2-with-an-embedded-link}}
89\hypertarget{level-3-with-emphasis}{%
90\subsubsection{\texorpdfstring{Level 3 with
91\emph{emphasis}}{Level 3 with emphasis}}\label{level-3-with-emphasis}}
93\hypertarget{level-4}{%
94\paragraph{Level 4}\label{level-4}}
96\hypertarget{level-5}{%
97\subparagraph{Level 5}\label{level-5}}
99\hypertarget{level-1}{%
100\section{Level 1}\label{level-1}}
102\hypertarget{level-2-with-emphasis}{%
103\subsection{\texorpdfstring{Level 2 with
104\emph{emphasis}}{Level 2 with emphasis}}\label{level-2-with-emphasis}}
106\hypertarget{level-3}{%
107\subsubsection{Level 3}\label{level-3}}
109with no blank line
111\hypertarget{level-2}{%
112\subsection{Level 2}\label{level-2}}
114with no blank line
116\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
118\hypertarget{paragraphs}{%
119\section{Paragraphs}\label{paragraphs}}
121Here's a regular paragraph.
123In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
124Because a hard-wrapped line in the middle of a paragraph looked like a list
125item.
127Here's one with a bullet. * criminey.
129There should be a hard line break\\
130here.
132\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
134\hypertarget{block-quotes}{%
135\section{Block Quotes}\label{block-quotes}}
137E-mail style:
139\begin{quote}
140This is a block quote. It is pretty short.
141\end{quote}
143\begin{quote}
144Code in a block quote:
146\begin{verbatim}
147sub status {
148 print "working";
150\end{verbatim}
152A list:
154\begin{enumerate}
155\def\labelenumi{\arabic{enumi}.}
156\tightlist
157\item
158 item one
159\item
160 item two
161\end{enumerate}
163Nested block quotes:
165\begin{quote}
166nested
167\end{quote}
169\begin{quote}
170nested
171\end{quote}
172\end{quote}
174This should not be a block quote: 2 \textgreater{} 1.
176And a following paragraph.
178\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
180\hypertarget{code-blocks}{%
181\section{Code Blocks}\label{code-blocks}}
183Code:
185\begin{verbatim}
186---- (should be four hyphens)
188sub status {
189 print "working";
192this code block is indented by one tab
193\end{verbatim}
195And:
197\begin{verbatim}
198 this code block is indented by two tabs
200These should not be escaped: \$ \\ \> \[ \{
201\end{verbatim}
203\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
205\hypertarget{lists}{%
206\section{Lists}\label{lists}}
208\hypertarget{unordered}{%
209\subsection{Unordered}\label{unordered}}
211Asterisks tight:
213\begin{itemize}
214\tightlist
215\item
216 asterisk 1
217\item
218 asterisk 2
219\item
220 asterisk 3
221\end{itemize}
223Asterisks loose:
225\begin{itemize}
226\item
227 asterisk 1
228\item
229 asterisk 2
230\item
231 asterisk 3
232\end{itemize}
234Pluses tight:
236\begin{itemize}
237\tightlist
238\item
239 Plus 1
240\item
241 Plus 2
242\item
243 Plus 3
244\end{itemize}
246Pluses loose:
248\begin{itemize}
249\item
250 Plus 1
251\item
252 Plus 2
253\item
254 Plus 3
255\end{itemize}
257Minuses tight:
259\begin{itemize}
260\tightlist
261\item
262 Minus 1
263\item
264 Minus 2
265\item
266 Minus 3
267\end{itemize}
269Minuses loose:
271\begin{itemize}
272\item
273 Minus 1
274\item
275 Minus 2
276\item
277 Minus 3
278\end{itemize}
280\hypertarget{ordered}{%
281\subsection{Ordered}\label{ordered}}
283Tight:
285\begin{enumerate}
286\def\labelenumi{\arabic{enumi}.}
287\tightlist
288\item
289 First
290\item
291 Second
292\item
293 Third
294\end{enumerate}
296and:
298\begin{enumerate}
299\def\labelenumi{\arabic{enumi}.}
300\tightlist
301\item
302 One
303\item
304 Two
305\item
306 Three
307\end{enumerate}
309Loose using tabs:
311\begin{enumerate}
312\def\labelenumi{\arabic{enumi}.}
313\item
314 First
315\item
316 Second
317\item
318 Third
319\end{enumerate}
321and using spaces:
323\begin{enumerate}
324\def\labelenumi{\arabic{enumi}.}
325\item
326 One
327\item
328 Two
329\item
330 Three
331\end{enumerate}
333Multiple paragraphs:
335\begin{enumerate}
336\def\labelenumi{\arabic{enumi}.}
337\item
338 Item 1, graf one.
340 Item 1. graf two. The quick brown fox jumped over the lazy dog's back.
341\item
342 Item 2.
343\item
344 Item 3.
345\end{enumerate}
347\hypertarget{nested}{%
348\subsection{Nested}\label{nested}}
350\begin{itemize}
351\tightlist
352\item
353 Tab
355 \begin{itemize}
356 \tightlist
357 \item
358 Tab
360 \begin{itemize}
361 \tightlist
362 \item
363 Tab
364 \end{itemize}
365 \end{itemize}
366\end{itemize}
368Here's another:
370\begin{enumerate}
371\def\labelenumi{\arabic{enumi}.}
372\tightlist
373\item
374 First
375\item
376 Second:
378 \begin{itemize}
379 \tightlist
380 \item
381 Fee
382 \item
383 Fie
384 \item
385 Foe
386 \end{itemize}
387\item
388 Third
389\end{enumerate}
391Same thing but with paragraphs:
393\begin{enumerate}
394\def\labelenumi{\arabic{enumi}.}
395\item
396 First
397\item
398 Second:
400 \begin{itemize}
401 \tightlist
402 \item
403 Fee
404 \item
405 Fie
406 \item
407 Foe
408 \end{itemize}
409\item
410 Third
411\end{enumerate}
413\hypertarget{tabs-and-spaces}{%
414\subsection{Tabs and spaces}\label{tabs-and-spaces}}
416\begin{itemize}
417\item
418 this is a list item indented with tabs
419\item
420 this is a list item indented with spaces
422 \begin{itemize}
423 \item
424 this is an example list item indented with tabs
425 \item
426 this is an example list item indented with spaces
427 \end{itemize}
428\end{itemize}
430\hypertarget{fancy-list-markers}{%
431\subsection{Fancy list markers}\label{fancy-list-markers}}
433\begin{enumerate}
434\def\labelenumi{(\arabic{enumi})}
435\setcounter{enumi}{1}
436\item
437 begins with 2
438\item
439 and now 3
441 with a continuation
443 \begin{enumerate}
444 \def\labelenumii{\roman{enumii}.}
445 \setcounter{enumii}{3}
446 \tightlist
447 \item
448 sublist with roman numerals, starting with 4
449 \item
450 more items
452 \begin{enumerate}
453 \def\labelenumiii{(\Alph{enumiii})}
454 \tightlist
455 \item
456 a subsublist
457 \item
458 a subsublist
459 \end{enumerate}
460 \end{enumerate}
461\end{enumerate}
463Nesting:
465\begin{enumerate}
466\def\labelenumi{\Alph{enumi}.}
467\tightlist
468\item
469 Upper Alpha
471 \begin{enumerate}
472 \def\labelenumii{\Roman{enumii}.}
473 \tightlist
474 \item
475 Upper Roman.
477 \begin{enumerate}
478 \def\labelenumiii{(\arabic{enumiii})}
479 \setcounter{enumiii}{5}
480 \tightlist
481 \item
482 Decimal start with 6
484 \begin{enumerate}
485 \def\labelenumiv{\alph{enumiv})}
486 \setcounter{enumiv}{2}
487 \tightlist
488 \item
489 Lower alpha with paren
490 \end{enumerate}
491 \end{enumerate}
492 \end{enumerate}
493\end{enumerate}
495Autonumbering:
497\begin{enumerate}
498\tightlist
499\item
500 Autonumber.
501\item
502 More.
504 \begin{enumerate}
505 \tightlist
506 \item
507 Nested.
508 \end{enumerate}
509\end{enumerate}
511Should not be a list item:
513M.A.~2007
515B. Williams
517\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
519\hypertarget{definition-lists}{%
520\section{Definition Lists}\label{definition-lists}}
522Tight using spaces:
524\begin{description}
525\tightlist
526\item[apple]
527red fruit
528\item[orange]
529orange fruit
530\item[banana]
531yellow fruit
532\end{description}
534Tight using tabs:
536\begin{description}
537\tightlist
538\item[apple]
539red fruit
540\item[orange]
541orange fruit
542\item[banana]
543yellow fruit
544\end{description}
546Loose:
548\begin{description}
549\item[apple]
550red fruit
551\item[orange]
552orange fruit
553\item[banana]
554yellow fruit
555\end{description}
557Multiple blocks with italics:
559\begin{description}
560\item[\emph{apple}]
561red fruit
563contains seeds, crisp, pleasant to taste
564\item[\emph{orange}]
565orange fruit
567\begin{verbatim}
568{ orange code block }
569\end{verbatim}
571\begin{quote}
572orange block quote
573\end{quote}
574\end{description}
576Multiple definitions, tight:
578\begin{description}
579\tightlist
580\item[apple]
581red fruit
583computer
584\item[orange]
585orange fruit
587bank
588\end{description}
590Multiple definitions, loose:
592\begin{description}
593\item[apple]
594red fruit
596computer
597\item[orange]
598orange fruit
600bank
601\end{description}
603Blank line after term, indented marker, alternate markers:
605\begin{description}
606\item[apple]
607red fruit
609computer
610\item[orange]
611orange fruit
613\begin{enumerate}
614\def\labelenumi{\arabic{enumi}.}
615\tightlist
616\item
617 sublist
618\item
619 sublist
620\end{enumerate}
621\end{description}
623\hypertarget{html-blocks}{%
624\section{HTML Blocks}\label{html-blocks}}
626Simple block on one line:
628foo
630And nested without indentation:
632foo
634bar
636Interpreted markdown in a table:
638This is \emph{emphasized}
640And this is \textbf{strong}
642Here's a simple block:
644foo
646This should be a code block, though:
648\begin{verbatim}
649<div>
650 foo
651</div>
652\end{verbatim}
654As should this:
656\begin{verbatim}
657<div>foo</div>
658\end{verbatim}
660Now, nested:
662foo
664This should just be an HTML comment:
666Multiline:
668Code block:
670\begin{verbatim}
671<!-- Comment -->
672\end{verbatim}
674Just plain comment, with trailing spaces on the line:
676Code:
678\begin{verbatim}
679<hr />
680\end{verbatim}
682Hr's:
684\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
686\hypertarget{inline-markup}{%
687\section{Inline Markup}\label{inline-markup}}
689This is \emph{emphasized}, and so \emph{is this}.
691This is \textbf{strong}, and so \textbf{is this}.
693An \emph{\href{/url}{emphasized link}}.
695\textbf{\emph{This is strong and em.}}
697So is \textbf{\emph{this}} word.
699\textbf{\emph{This is strong and em.}}
701So is \textbf{\emph{this}} word.
703This is code: \texttt{\textgreater{}}, \texttt{\$}, \texttt{\textbackslash{}},
704\texttt{\textbackslash{}\$}, \texttt{\textless{}html\textgreater{}}.
706\sout{This is \emph{strikeout}.}
708Superscripts: a\textsuperscript{bc}d a\textsuperscript{\emph{hello}}
709a\textsuperscript{hello~there}.
711Subscripts: H\textsubscript{2}O, H\textsubscript{23}O,
712H\textsubscript{many~of~them}O.
714These should not be superscripts or subscripts, because of the unescaped
715spaces: a\^{}b c\^{}d, a\textasciitilde b c\textasciitilde d.
717\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
719\hypertarget{smart-quotes-ellipses-dashes}{%
720\section{Smart quotes, ellipses, dashes}\label{smart-quotes-ellipses-dashes}}
722``Hello,'' said the spider. ``\,`Shelob' is my name.''
724`A', `B', and `C' are letters.
726`Oak,' `elm,' and `beech' are names of trees. So is `pine.'
728`He said, ``I want to go.''\,' Were you alive in the 70's?
730Here is some quoted `\texttt{code}' and a
731``\href{http://example.com/?foo=1\&bar=2}{quoted link}''.
733Some dashes: one---two --- three---four --- five.
735Dashes between numbers: 5--7, 255--66, 1987--1999.
737Ellipses\ldots and\ldots and\ldots.
739\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
741\hypertarget{latex}{%
742\section{LaTeX}\label{latex}}
744\begin{itemize}
745\tightlist
746\item
747 \cite[22-23]{smith.1899}
748\item
749 \(2+2=4\)
750\item
751 \(x \in y\)
752\item
753 \(\alpha \wedge \omega\)
754\item
755 \(223\)
756\item
757 \(p\)-Tree
758\item
759 Here's some display math:
760 \[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\]
761\item
762 Here's one that has a line break in it: \(\alpha + \omega \times x^2\).
763\end{itemize}
765These shouldn't be math:
767\begin{itemize}
768\tightlist
769\item
770 To get the famous equation, write \texttt{\$e\ =\ mc\^{}2\$}.
771\item
772 \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if ``lot'' is
773 emphasized.)
774\item
775 Shoes (\$20) and socks (\$5).
776\item
777 Escaped \texttt{\$}: \$73 \emph{this should be emphasized} 23\$.
778\end{itemize}
780Here's a LaTeX table:
782\begin{tabular}{|l|l|}\hline
783Animal & Number \\ \hline
784Dog & 2 \\
785Cat & 1 \\ \hline
786\end{tabular}
788\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
790\hypertarget{special-characters}{%
791\section{Special Characters}\label{special-characters}}
793Here is some unicode:
795\begin{itemize}
796\tightlist
797\item
798 I hat: Î
799\item
800 o umlaut: ö
801\item
802 section: §
803\item
804 set membership: ∈
805\item
806 copyright: ©
807\end{itemize}
809AT\&T has an ampersand in their name.
811AT\&T is another way to write it.
813This \& that.
8154 \textless{} 5.
8176 \textgreater{} 5.
819Backslash: \textbackslash{}
821Backtick: `
823Asterisk: *
825Underscore: \_
827Left brace: \{
829Right brace: \}
831Left bracket: {[}
833Right bracket: {]}
835Left paren: (
837Right paren: )
839Greater-than: \textgreater{}
841Hash: \#
843Period: .
845Bang: !
847Plus: +
849Minus: -
851\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
853\hypertarget{links}{%
854\section{Links}\label{links}}
856\hypertarget{explicit}{%
857\subsection{Explicit}\label{explicit}}
859Just a \href{/url/}{URL}.
861\href{/url/}{URL and title}.
863\href{/url/}{URL and title}.
865\href{/url/}{URL and title}.
867\href{/url/}{URL and title}
869\href{/url/}{URL and title}
871\href{/url/with_underscore}{with\_underscore}
873\href{mailto:nobody@nowhere.net}{Email link}
875\href{}{Empty}.
877\hypertarget{reference}{%
878\subsection{Reference}\label{reference}}
880Foo \href{/url/}{bar}.
882With \href{/url/}{embedded {[}brackets{]}}.
884\href{/url/}{b} by itself should be a link.
886Indented \href{/url}{once}.
888Indented \href{/url}{twice}.
890Indented \href{/url}{thrice}.
892This should {[}not{]}{[}{]} be a link.
894\begin{verbatim}
895[not]: /url
896\end{verbatim}
898Foo \href{/url/}{bar}.
900Foo \href{/url/}{biz}.
902\hypertarget{with-ampersands}{%
903\subsection{With ampersands}\label{with-ampersands}}
905Here's a \href{http://example.com/?foo=1\&bar=2}{link with an ampersand in the
906URL}.
908Here's a link with an amersand in the link text:
909\href{http://att.com/}{AT\&T}.
911Here's an \href{/script?foo=1\&bar=2}{inline link}.
913Here's an \href{/script?foo=1\&bar=2}{inline link in pointy braces}.
915\hypertarget{autolinks}{%
916\subsection{Autolinks}\label{autolinks}}
918With an ampersand: \url{http://example.com/?foo=1\&bar=2}
920\begin{itemize}
921\tightlist
922\item
923 In a list?
924\item
925 \url{http://example.com/}
926\item
927 It should.
928\end{itemize}
930An e-mail address:
931\href{mailto:nobody@nowhere.net}{\nolinkurl{nobody@nowhere.net}}
933\begin{quote}
934Blockquoted: \url{http://example.com/}
935\end{quote}
937Auto-links should not occur here:
938\texttt{\textless{}http://example.com/\textgreater{}}
940\begin{verbatim}
941or here: <http://example.com/>
942\end{verbatim}
944\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
946\hypertarget{images}{%
947\section{Images}\label{images}}
949From ``Voyage dans la Lune'' by Georges Melies (1902):
951\begin{figure}
952\centering
953\includegraphics{lalune.jpg}
954\caption{lalune}
955\end{figure}
957Here is a movie \includegraphics{movie.jpg} icon.
959\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
961\hypertarget{footnotes}{%
962\section{Footnotes}\label{footnotes}}
964Here is a footnote reference,\footnote{Here is the footnote. It can go
965 anywhere after the footnote reference. It need not be placed at the end of
966 the document.} and another.\footnote{Here's the long note. This one contains
967 multiple blocks.
969 Subsequent blocks are indented to show that they belong to the footnote (as
970 with list items).
972\begin{Verbatim}
973 { <code> }
974\end{Verbatim}
976 If you want, you can indent every line, but you can also be lazy and just
977 indent the first line of each block.} This should \emph{not} be a footnote
978reference, because it contains a space.{[}\^{}my note{]} Here is an inline
979note.\footnote{This is \emph{easier} to type. Inline notes may contain
980 \href{http://google.com}{links} and \texttt{{]}} verbatim characters, as
981 well as {[}bracketed text{]}.}
983\begin{quote}
984Notes can go in quotes.\footnote{In quote.}
985\end{quote}
987\begin{enumerate}
988\def\labelenumi{\arabic{enumi}.}
989\tightlist
990\item
991 And in list items.\footnote{In list.}
992\end{enumerate}
994This paragraph should not be part of the note, as it is not indented.
996\end{document}