summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-04-17 19:21:07 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-04-17 19:23:13 -0700
commit764f677530079d85078dfb5d3dd4cd367c905aeb (patch)
tree4aaa8d1767e6165bcafccc8ce95ee5ae57a2cbec /tests
parent28ca8566ab72e135d559e457e28d3f3f306a7b0e (diff)
parent9557eb6f8efafaff2e3a61e43e4cc7e4717ad9eb (diff)
Merge branch 'latex-tightlist' of https://github.com/jlduran/pandoc into jlduran-latex-tightlist
Conflicts: data/templates
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Writers/LaTeX.hs2
-rw-r--r--tests/lhs-test.latex2
-rw-r--r--tests/lhs-test.latex+lhs2
-rw-r--r--tests/writer.latex60
4 files changed, 36 insertions, 30 deletions
diff --git a/tests/Tests/Writers/LaTeX.hs b/tests/Tests/Writers/LaTeX.hs
index f083176d0..d1cfd3ddf 100644
--- a/tests/Tests/Writers/LaTeX.hs
+++ b/tests/Tests/Writers/LaTeX.hs
@@ -42,7 +42,7 @@ tests = [ testGroup "code blocks"
, testGroup "definition lists"
[ "with internal link" =: definitionList [(link "#go" "" (str "testing"),
[plain (text "hi there")])] =?>
- "\\begin{description}\n\\itemsep1pt\\parskip0pt\\parsep0pt\n\\item[{\\hyperref[go]{testing}}]\nhi there\n\\end{description}"
+ "\\begin{description}\n\\tightlist\n\\item[{\\hyperref[go]{testing}}]\nhi there\n\\end{description}"
]
, testGroup "math"
[ "escape |" =: para (math "\\sigma|_{\\{x\\}}") =?>
diff --git a/tests/lhs-test.latex b/tests/lhs-test.latex
index cf993af9b..a94a0540f 100644
--- a/tests/lhs-test.latex
+++ b/tests/lhs-test.latex
@@ -64,6 +64,8 @@
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
\setlength{\emergencystretch}{3em} % prevent overfull lines
+\newcommand{\tightlist}{%
+ \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}
\date{}
diff --git a/tests/lhs-test.latex+lhs b/tests/lhs-test.latex+lhs
index 746744cc8..b69a2add4 100644
--- a/tests/lhs-test.latex+lhs
+++ b/tests/lhs-test.latex+lhs
@@ -45,6 +45,8 @@
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
\setlength{\emergencystretch}{3em} % prevent overfull lines
+\newcommand{\tightlist}{%
+ \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}
\date{}
diff --git a/tests/writer.latex b/tests/writer.latex
index fab5c9325..63061649a 100644
--- a/tests/writer.latex
+++ b/tests/writer.latex
@@ -57,6 +57,8 @@
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
\setlength{\emergencystretch}{3em} % prevent overfull lines
+\newcommand{\tightlist}{%
+ \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}
\VerbatimFootnotes % allows verbatim text in footnotes
@@ -141,7 +143,7 @@ A list:
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
item one
\item
@@ -196,7 +198,7 @@ These should not be escaped: \$ \\ \> \[ \{
Asterisks tight:
\begin{itemize}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
asterisk 1
\item
@@ -219,7 +221,7 @@ Asterisks loose:
Pluses tight:
\begin{itemize}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
Plus 1
\item
@@ -242,7 +244,7 @@ Pluses loose:
Minuses tight:
\begin{itemize}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
Minus 1
\item
@@ -268,7 +270,7 @@ Tight:
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
First
\item
@@ -281,7 +283,7 @@ and:
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
One
\item
@@ -331,17 +333,17 @@ Multiple paragraphs:
\subsection{Nested}\label{nested}
\begin{itemize}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
Tab
\begin{itemize}
- \itemsep1pt\parskip0pt\parsep0pt
+ \tightlist
\item
Tab
\begin{itemize}
- \itemsep1pt\parskip0pt\parsep0pt
+ \tightlist
\item
Tab
\end{itemize}
@@ -352,14 +354,14 @@ Here's another:
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
First
\item
Second:
\begin{itemize}
- \itemsep1pt\parskip0pt\parsep0pt
+ \tightlist
\item
Fee
\item
@@ -381,7 +383,7 @@ Same thing but with paragraphs:
Second:
\begin{itemize}
- \itemsep1pt\parskip0pt\parsep0pt
+ \tightlist
\item
Fee
\item
@@ -424,7 +426,7 @@ Same thing but with paragraphs:
\begin{enumerate}
\def\labelenumii{\roman{enumii}.}
\setcounter{enumii}{3}
- \itemsep1pt\parskip0pt\parsep0pt
+ \tightlist
\item
sublist with roman numerals, starting with 4
\item
@@ -432,7 +434,7 @@ Same thing but with paragraphs:
\begin{enumerate}
\def\labelenumiii{(\Alph{enumiii})}
- \itemsep1pt\parskip0pt\parsep0pt
+ \tightlist
\item
a subsublist
\item
@@ -445,27 +447,27 @@ Nesting:
\begin{enumerate}
\def\labelenumi{\Alph{enumi}.}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
Upper Alpha
\begin{enumerate}
\def\labelenumii{\Roman{enumii}.}
- \itemsep1pt\parskip0pt\parsep0pt
+ \tightlist
\item
Upper Roman.
\begin{enumerate}
\def\labelenumiii{(\arabic{enumiii})}
\setcounter{enumiii}{5}
- \itemsep1pt\parskip0pt\parsep0pt
+ \tightlist
\item
Decimal start with 6
\begin{enumerate}
\def\labelenumiv{\alph{enumiv})}
\setcounter{enumiv}{2}
- \itemsep1pt\parskip0pt\parsep0pt
+ \tightlist
\item
Lower alpha with paren
\end{enumerate}
@@ -476,14 +478,14 @@ Nesting:
Autonumbering:
\begin{enumerate}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
Autonumber.
\item
More.
\begin{enumerate}
- \itemsep1pt\parskip0pt\parsep0pt
+ \tightlist
\item
Nested.
\end{enumerate}
@@ -502,7 +504,7 @@ B. Williams
Tight using spaces:
\begin{description}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item[apple]
red fruit
\item[orange]
@@ -514,7 +516,7 @@ yellow fruit
Tight using tabs:
\begin{description}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item[apple]
red fruit
\item[orange]
@@ -556,7 +558,7 @@ orange block quote
Multiple definitions, tight:
\begin{description}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item[apple]
red fruit
@@ -592,7 +594,7 @@ orange fruit
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
sublist
\item
@@ -718,7 +720,7 @@ Ellipses\ldots{}and\ldots{}and\ldots{}.
\section{LaTeX}\label{latex}
\begin{itemize}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
\cite[22-23]{smith.1899}
\item
@@ -741,7 +743,7 @@ Ellipses\ldots{}and\ldots{}and\ldots{}.
These shouldn't be math:
\begin{itemize}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
To get the famous equation, write \texttt{\$e\ =\ mc\^{}2\$}.
\item
@@ -768,7 +770,7 @@ Cat & 1 \\ \hline
Here is some unicode:
\begin{itemize}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
I hat: Î
\item
@@ -892,7 +894,7 @@ Here's an \href{/script?foo=1\&bar=2}{inline link in pointy braces}.
With an ampersand: \url{http://example.com/?foo=1\&bar=2}
\begin{itemize}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
In a list?
\item
@@ -958,7 +960,7 @@ Notes can go in quotes.\footnote{In quote.}
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
-\itemsep1pt\parskip0pt\parsep0pt
+\tightlist
\item
And in list items.\footnote{In list.}
\end{enumerate}