git.iko.soy/typeable/pandoc
on rc/2.9.1.1 help sign in
typeable/pandoc/test/writer.latex
993 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{lmodern}
8\usepackage{amssymb,amsmath}
9\usepackage{ifxetex,ifluatex}
10\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
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
67\title{Pandoc Test Suite}
68\author{John MacFarlane \and Anonymous}
69\date{July 17, 2006}
71\begin{document}
72\maketitle
74This is a set of tests for pandoc. Most of them are adapted from John Gruber's
75markdown test suite.
77\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
79\hypertarget{headers}{%
80\section{Headers}\label{headers}}
82\hypertarget{level-2-with-an-embedded-link}{%
83\subsection{\texorpdfstring{Level 2 with an \href{/url}{embedded
84link}}{Level 2 with an embedded link}}\label{level-2-with-an-embedded-link}}
86\hypertarget{level-3-with-emphasis}{%
87\subsubsection{\texorpdfstring{Level 3 with
88\emph{emphasis}}{Level 3 with emphasis}}\label{level-3-with-emphasis}}
90\hypertarget{level-4}{%
91\paragraph{Level 4}\label{level-4}}
93\hypertarget{level-5}{%
94\subparagraph{Level 5}\label{level-5}}
96\hypertarget{level-1}{%
97\section{Level 1}\label{level-1}}
99\hypertarget{level-2-with-emphasis}{%
100\subsection{\texorpdfstring{Level 2 with
101\emph{emphasis}}{Level 2 with emphasis}}\label{level-2-with-emphasis}}
103\hypertarget{level-3}{%
104\subsubsection{Level 3}\label{level-3}}
106with no blank line
108\hypertarget{level-2}{%
109\subsection{Level 2}\label{level-2}}
111with no blank line
113\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
115\hypertarget{paragraphs}{%
116\section{Paragraphs}\label{paragraphs}}
118Here's a regular paragraph.
120In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
121Because a hard-wrapped line in the middle of a paragraph looked like a list
122item.
124Here's one with a bullet. * criminey.
126There should be a hard line break\\
127here.
129\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
131\hypertarget{block-quotes}{%
132\section{Block Quotes}\label{block-quotes}}
134E-mail style:
136\begin{quote}
137This is a block quote. It is pretty short.
138\end{quote}
140\begin{quote}
141Code in a block quote:
143\begin{verbatim}
144sub status {
145 print "working";
147\end{verbatim}
149A list:
151\begin{enumerate}
152\def\labelenumi{\arabic{enumi}.}
153\tightlist
154\item
155 item one
156\item
157 item two
158\end{enumerate}
160Nested block quotes:
162\begin{quote}
163nested
164\end{quote}
166\begin{quote}
167nested
168\end{quote}
169\end{quote}
171This should not be a block quote: 2 \textgreater{} 1.
173And a following paragraph.
175\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
177\hypertarget{code-blocks}{%
178\section{Code Blocks}\label{code-blocks}}
180Code:
182\begin{verbatim}
183---- (should be four hyphens)
185sub status {
186 print "working";
189this code block is indented by one tab
190\end{verbatim}
192And:
194\begin{verbatim}
195 this code block is indented by two tabs
197These should not be escaped: \$ \\ \> \[ \{
198\end{verbatim}
200\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
202\hypertarget{lists}{%
203\section{Lists}\label{lists}}
205\hypertarget{unordered}{%
206\subsection{Unordered}\label{unordered}}
208Asterisks tight:
210\begin{itemize}
211\tightlist
212\item
213 asterisk 1
214\item
215 asterisk 2
216\item
217 asterisk 3
218\end{itemize}
220Asterisks loose:
222\begin{itemize}
223\item
224 asterisk 1
225\item
226 asterisk 2
227\item
228 asterisk 3
229\end{itemize}
231Pluses tight:
233\begin{itemize}
234\tightlist
235\item
236 Plus 1
237\item
238 Plus 2
239\item
240 Plus 3
241\end{itemize}
243Pluses loose:
245\begin{itemize}
246\item
247 Plus 1
248\item
249 Plus 2
250\item
251 Plus 3
252\end{itemize}
254Minuses tight:
256\begin{itemize}
257\tightlist
258\item
259 Minus 1
260\item
261 Minus 2
262\item
263 Minus 3
264\end{itemize}
266Minuses loose:
268\begin{itemize}
269\item
270 Minus 1
271\item
272 Minus 2
273\item
274 Minus 3
275\end{itemize}
277\hypertarget{ordered}{%
278\subsection{Ordered}\label{ordered}}
280Tight:
282\begin{enumerate}
283\def\labelenumi{\arabic{enumi}.}
284\tightlist
285\item
286 First
287\item
288 Second
289\item
290 Third
291\end{enumerate}
293and:
295\begin{enumerate}
296\def\labelenumi{\arabic{enumi}.}
297\tightlist
298\item
299 One
300\item
301 Two
302\item
303 Three
304\end{enumerate}
306Loose using tabs:
308\begin{enumerate}
309\def\labelenumi{\arabic{enumi}.}
310\item
311 First
312\item
313 Second
314\item
315 Third
316\end{enumerate}
318and using spaces:
320\begin{enumerate}
321\def\labelenumi{\arabic{enumi}.}
322\item
323 One
324\item
325 Two
326\item
327 Three
328\end{enumerate}
330Multiple paragraphs:
332\begin{enumerate}
333\def\labelenumi{\arabic{enumi}.}
334\item
335 Item 1, graf one.
337 Item 1. graf two. The quick brown fox jumped over the lazy dog's back.
338\item
339 Item 2.
340\item
341 Item 3.
342\end{enumerate}
344\hypertarget{nested}{%
345\subsection{Nested}\label{nested}}
347\begin{itemize}
348\tightlist
349\item
350 Tab
352 \begin{itemize}
353 \tightlist
354 \item
355 Tab
357 \begin{itemize}
358 \tightlist
359 \item
360 Tab
361 \end{itemize}
362 \end{itemize}
363\end{itemize}
365Here's another:
367\begin{enumerate}
368\def\labelenumi{\arabic{enumi}.}
369\tightlist
370\item
371 First
372\item
373 Second:
375 \begin{itemize}
376 \tightlist
377 \item
378 Fee
379 \item
380 Fie
381 \item
382 Foe
383 \end{itemize}
384\item
385 Third
386\end{enumerate}
388Same thing but with paragraphs:
390\begin{enumerate}
391\def\labelenumi{\arabic{enumi}.}
392\item
393 First
394\item
395 Second:
397 \begin{itemize}
398 \tightlist
399 \item
400 Fee
401 \item
402 Fie
403 \item
404 Foe
405 \end{itemize}
406\item
407 Third
408\end{enumerate}
410\hypertarget{tabs-and-spaces}{%
411\subsection{Tabs and spaces}\label{tabs-and-spaces}}
413\begin{itemize}
414\item
415 this is a list item indented with tabs
416\item
417 this is a list item indented with spaces
419 \begin{itemize}
420 \item
421 this is an example list item indented with tabs
422 \item
423 this is an example list item indented with spaces
424 \end{itemize}
425\end{itemize}
427\hypertarget{fancy-list-markers}{%
428\subsection{Fancy list markers}\label{fancy-list-markers}}
430\begin{enumerate}
431\def\labelenumi{(\arabic{enumi})}
432\setcounter{enumi}{1}
433\item
434 begins with 2
435\item
436 and now 3
438 with a continuation
440 \begin{enumerate}
441 \def\labelenumii{\roman{enumii}.}
442 \setcounter{enumii}{3}
443 \tightlist
444 \item
445 sublist with roman numerals, starting with 4
446 \item
447 more items
449 \begin{enumerate}
450 \def\labelenumiii{(\Alph{enumiii})}
451 \tightlist
452 \item
453 a subsublist
454 \item
455 a subsublist
456 \end{enumerate}
457 \end{enumerate}
458\end{enumerate}
460Nesting:
462\begin{enumerate}
463\def\labelenumi{\Alph{enumi}.}
464\tightlist
465\item
466 Upper Alpha
468 \begin{enumerate}
469 \def\labelenumii{\Roman{enumii}.}
470 \tightlist
471 \item
472 Upper Roman.
474 \begin{enumerate}
475 \def\labelenumiii{(\arabic{enumiii})}
476 \setcounter{enumiii}{5}
477 \tightlist
478 \item
479 Decimal start with 6
481 \begin{enumerate}
482 \def\labelenumiv{\alph{enumiv})}
483 \setcounter{enumiv}{2}
484 \tightlist
485 \item
486 Lower alpha with paren
487 \end{enumerate}
488 \end{enumerate}
489 \end{enumerate}
490\end{enumerate}
492Autonumbering:
494\begin{enumerate}
495\tightlist
496\item
497 Autonumber.
498\item
499 More.
501 \begin{enumerate}
502 \tightlist
503 \item
504 Nested.
505 \end{enumerate}
506\end{enumerate}
508Should not be a list item:
510M.A.~2007
512B. Williams
514\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
516\hypertarget{definition-lists}{%
517\section{Definition Lists}\label{definition-lists}}
519Tight using spaces:
521\begin{description}
522\tightlist
523\item[apple]
524red fruit
525\item[orange]
526orange fruit
527\item[banana]
528yellow fruit
529\end{description}
531Tight using tabs:
533\begin{description}
534\tightlist
535\item[apple]
536red fruit
537\item[orange]
538orange fruit
539\item[banana]
540yellow fruit
541\end{description}
543Loose:
545\begin{description}
546\item[apple]
547red fruit
548\item[orange]
549orange fruit
550\item[banana]
551yellow fruit
552\end{description}
554Multiple blocks with italics:
556\begin{description}
557\item[\emph{apple}]
558red fruit
560contains seeds, crisp, pleasant to taste
561\item[\emph{orange}]
562orange fruit
564\begin{verbatim}
565{ orange code block }
566\end{verbatim}
568\begin{quote}
569orange block quote
570\end{quote}
571\end{description}
573Multiple definitions, tight:
575\begin{description}
576\tightlist
577\item[apple]
578red fruit
580computer
581\item[orange]
582orange fruit
584bank
585\end{description}
587Multiple definitions, loose:
589\begin{description}
590\item[apple]
591red fruit
593computer
594\item[orange]
595orange fruit
597bank
598\end{description}
600Blank line after term, indented marker, alternate markers:
602\begin{description}
603\item[apple]
604red fruit
606computer
607\item[orange]
608orange fruit
610\begin{enumerate}
611\def\labelenumi{\arabic{enumi}.}
612\tightlist
613\item
614 sublist
615\item
616 sublist
617\end{enumerate}
618\end{description}
620\hypertarget{html-blocks}{%
621\section{HTML Blocks}\label{html-blocks}}
623Simple block on one line:
625foo
627And nested without indentation:
629foo
631bar
633Interpreted markdown in a table:
635This is \emph{emphasized}
637And this is \textbf{strong}
639Here's a simple block:
641foo
643This should be a code block, though:
645\begin{verbatim}
646<div>
647 foo
648</div>
649\end{verbatim}
651As should this:
653\begin{verbatim}
654<div>foo</div>
655\end{verbatim}
657Now, nested:
659foo
661This should just be an HTML comment:
663Multiline:
665Code block:
667\begin{verbatim}
668<!-- Comment -->
669\end{verbatim}
671Just plain comment, with trailing spaces on the line:
673Code:
675\begin{verbatim}
676<hr />
677\end{verbatim}
679Hr's:
681\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
683\hypertarget{inline-markup}{%
684\section{Inline Markup}\label{inline-markup}}
686This is \emph{emphasized}, and so \emph{is this}.
688This is \textbf{strong}, and so \textbf{is this}.
690An \emph{\href{/url}{emphasized link}}.
692\textbf{\emph{This is strong and em.}}
694So is \textbf{\emph{this}} word.
696\textbf{\emph{This is strong and em.}}
698So is \textbf{\emph{this}} word.
700This is code: \texttt{\textgreater{}}, \texttt{\$}, \texttt{\textbackslash{}},
701\texttt{\textbackslash{}\$}, \texttt{\textless{}html\textgreater{}}.
703\sout{This is \emph{strikeout}.}
705Superscripts: a\textsuperscript{bc}d a\textsuperscript{\emph{hello}}
706a\textsuperscript{hello~there}.
708Subscripts: H\textsubscript{2}O, H\textsubscript{23}O,
709H\textsubscript{many~of~them}O.
711These should not be superscripts or subscripts, because of the unescaped
712spaces: a\^{}b c\^{}d, a\textasciitilde b c\textasciitilde d.
714\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
716\hypertarget{smart-quotes-ellipses-dashes}{%
717\section{Smart quotes, ellipses, dashes}\label{smart-quotes-ellipses-dashes}}
719``Hello,'' said the spider. ``\,`Shelob' is my name.''
721`A', `B', and `C' are letters.
723`Oak,' `elm,' and `beech' are names of trees. So is `pine.'
725`He said, ``I want to go.''\,' Were you alive in the 70's?
727Here is some quoted `\texttt{code}' and a
728``\href{http://example.com/?foo=1\&bar=2}{quoted link}''.
730Some dashes: one---two --- three---four --- five.
732Dashes between numbers: 5--7, 255--66, 1987--1999.
734Ellipses\ldots and\ldots and\ldots.
736\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
738\hypertarget{latex}{%
739\section{LaTeX}\label{latex}}
741\begin{itemize}
742\tightlist
743\item
744 \cite[22-23]{smith.1899}
745\item
746 \(2+2=4\)
747\item
748 \(x \in y\)
749\item
750 \(\alpha \wedge \omega\)
751\item
752 \(223\)
753\item
754 \(p\)-Tree
755\item
756 Here's some display math:
757 \[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\]
758\item
759 Here's one that has a line break in it: \(\alpha + \omega \times x^2\).
760\end{itemize}
762These shouldn't be math:
764\begin{itemize}
765\tightlist
766\item
767 To get the famous equation, write \texttt{\$e\ =\ mc\^{}2\$}.
768\item
769 \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if ``lot'' is
770 emphasized.)
771\item
772 Shoes (\$20) and socks (\$5).
773\item
774 Escaped \texttt{\$}: \$73 \emph{this should be emphasized} 23\$.
775\end{itemize}
777Here's a LaTeX table:
779\begin{tabular}{|l|l|}\hline
780Animal & Number \\ \hline
781Dog & 2 \\
782Cat & 1 \\ \hline
783\end{tabular}
785\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
787\hypertarget{special-characters}{%
788\section{Special Characters}\label{special-characters}}
790Here is some unicode:
792\begin{itemize}
793\tightlist
794\item
795 I hat: Î
796\item
797 o umlaut: ö
798\item
799 section: §
800\item
801 set membership: ∈
802\item
803 copyright: ©
804\end{itemize}
806AT\&T has an ampersand in their name.
808AT\&T is another way to write it.
810This \& that.
8124 \textless{} 5.
8146 \textgreater{} 5.
816Backslash: \textbackslash{}
818Backtick: `
820Asterisk: *
822Underscore: \_
824Left brace: \{
826Right brace: \}
828Left bracket: {[}
830Right bracket: {]}
832Left paren: (
834Right paren: )
836Greater-than: \textgreater{}
838Hash: \#
840Period: .
842Bang: !
844Plus: +
846Minus: -
848\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
850\hypertarget{links}{%
851\section{Links}\label{links}}
853\hypertarget{explicit}{%
854\subsection{Explicit}\label{explicit}}
856Just a \href{/url/}{URL}.
858\href{/url/}{URL and title}.
860\href{/url/}{URL and title}.
862\href{/url/}{URL and title}.
864\href{/url/}{URL and title}
866\href{/url/}{URL and title}
868\href{/url/with_underscore}{with\_underscore}
870\href{mailto:nobody@nowhere.net}{Email link}
872\href{}{Empty}.
874\hypertarget{reference}{%
875\subsection{Reference}\label{reference}}
877Foo \href{/url/}{bar}.
879With \href{/url/}{embedded {[}brackets{]}}.
881\href{/url/}{b} by itself should be a link.
883Indented \href{/url}{once}.
885Indented \href{/url}{twice}.
887Indented \href{/url}{thrice}.
889This should {[}not{]}{[}{]} be a link.
891\begin{verbatim}
892[not]: /url
893\end{verbatim}
895Foo \href{/url/}{bar}.
897Foo \href{/url/}{biz}.
899\hypertarget{with-ampersands}{%
900\subsection{With ampersands}\label{with-ampersands}}
902Here's a \href{http://example.com/?foo=1\&bar=2}{link with an ampersand in the
903URL}.
905Here's a link with an amersand in the link text:
906\href{http://att.com/}{AT\&T}.
908Here's an \href{/script?foo=1\&bar=2}{inline link}.
910Here's an \href{/script?foo=1\&bar=2}{inline link in pointy braces}.
912\hypertarget{autolinks}{%
913\subsection{Autolinks}\label{autolinks}}
915With an ampersand: \url{http://example.com/?foo=1\&bar=2}
917\begin{itemize}
918\tightlist
919\item
920 In a list?
921\item
922 \url{http://example.com/}
923\item
924 It should.
925\end{itemize}
927An e-mail address:
928\href{mailto:nobody@nowhere.net}{\nolinkurl{nobody@nowhere.net}}
930\begin{quote}
931Blockquoted: \url{http://example.com/}
932\end{quote}
934Auto-links should not occur here:
935\texttt{\textless{}http://example.com/\textgreater{}}
937\begin{verbatim}
938or here: <http://example.com/>
939\end{verbatim}
941\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
943\hypertarget{images}{%
944\section{Images}\label{images}}
946From ``Voyage dans la Lune'' by Georges Melies (1902):
948\begin{figure}
949\centering
950\includegraphics{lalune.jpg}
951\caption{lalune}
952\end{figure}
954Here is a movie \includegraphics{movie.jpg} icon.
956\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
958\hypertarget{footnotes}{%
959\section{Footnotes}\label{footnotes}}
961Here is a footnote reference,\footnote{Here is the footnote. It can go
962 anywhere after the footnote reference. It need not be placed at the end of
963 the document.} and another.\footnote{Here's the long note. This one contains
964 multiple blocks.
966 Subsequent blocks are indented to show that they belong to the footnote (as
967 with list items).
969\begin{Verbatim}
970 { <code> }
971\end{Verbatim}
973 If you want, you can indent every line, but you can also be lazy and just
974 indent the first line of each block.} This should \emph{not} be a footnote
975reference, because it contains a space.{[}\^{}my note{]} Here is an inline
976note.\footnote{This is \emph{easier} to type. Inline notes may contain
977 \href{http://google.com}{links} and \texttt{{]}} verbatim characters, as
978 well as {[}bracketed text{]}.}
980\begin{quote}
981Notes can go in quotes.\footnote{In quote.}
982\end{quote}
984\begin{enumerate}
985\def\labelenumi{\arabic{enumi}.}
986\tightlist
987\item
988 And in list items.\footnote{In list.}
989\end{enumerate}
991This paragraph should not be part of the note, as it is not indented.
993\end{document}