summaryrefslogtreecommitdiff
path: root/tests/lhs-test.latex
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lhs-test.latex')
-rw-r--r--tests/lhs-test.latex32
1 files changed, 25 insertions, 7 deletions
diff --git a/tests/lhs-test.latex b/tests/lhs-test.latex
index d34c21090..307fd948f 100644
--- a/tests/lhs-test.latex
+++ b/tests/lhs-test.latex
@@ -1,10 +1,28 @@
\documentclass{article}
\usepackage{amssymb,amsmath}
-\usepackage[mathletters]{ucs}
-\usepackage[utf8x]{inputenc}
-\usepackage[breaklinks=true,unicode=true,pdfborder={0 0 0}]{hyperref}
+\usepackage{ifxetex,ifluatex}
+\ifxetex
+ \usepackage{fontspec,xltxtra,xunicode}
+ \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
+\else
+ \ifluatex
+ \usepackage{fontspec}
+ \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
+ \else
+ \usepackage[utf8]{inputenc}
+ \fi
+\fi
+\ifxetex
+ \usepackage[setpagesize=false, % page size defined by xetex
+ unicode=false, % unicode breaks when used with xetex
+ xetex]{hyperref}
+\else
+ \usepackage[unicode=true]{hyperref}
+\fi
+\hypersetup{breaklinks=true, pdfborder={0 0 0}}
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
+\setlength{\emergencystretch}{3em} % prevent overfull lines
\setcounter{secnumdepth}{0}
@@ -12,7 +30,7 @@
\section{lhs test}
-\verb!unsplit! is an arrow that takes a pair of values and combines them to
+\texttt{unsplit} is an arrow that takes a pair of values and combines them to
return a single value:
\begin{verbatim}
@@ -20,9 +38,9 @@ unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
unsplit = arr . uncurry
-- arr (\op (x,y) -> x `op` y)
\end{verbatim}
-\verb!(***)! combines two arrows into a new arrow by running the two arrows on
-a pair of values (one arrow on the first item of the pair and one arrow on the
-second item of the pair).
+\texttt{(***)} combines two arrows into a new arrow by running the two arrows
+on a pair of values (one arrow on the first item of the pair and one arrow on
+the second item of the pair).
\begin{verbatim}
f *** g = first f >>> second g