e5573bca8f
* Removed setting of `subject` in PDF metadata. This used to be set to the subtitle, but really the subtitle need not give the subject. Also, `subtitle` can contain formatting, so we'd need, at least, a plain text version for this. * Moved `header-includes` before setting of `\title`, `\author`, etc. This allows these macros to be redefined. * Use `\subtitle` command for `subtitle`, instead of tacking it on to the title as before. We give a no-op fallback definition if it is not defined. This change should produce much better results in classes that support `\subtitle`. With the default article class, which does not define `\subtitle`, subtitles will no longer be printed unless the user defines `\subtitle` and redefines `\maketitle`. * Moved redefinitions of `\paragraph` and `\subparagraph` to before header-includes.
78 lines
2.2 KiB
Text
78 lines
2.2 KiB
Text
\documentclass[]{article}
|
|
\usepackage{lmodern}
|
|
\usepackage{amssymb,amsmath}
|
|
\usepackage{ifxetex,ifluatex}
|
|
\usepackage{fixltx2e} % provides \textsubscript
|
|
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
|
|
\usepackage[T1]{fontenc}
|
|
\usepackage[utf8]{inputenc}
|
|
\else % if luatex or xelatex
|
|
\ifxetex
|
|
\usepackage{mathspec}
|
|
\else
|
|
\usepackage{fontspec}
|
|
\fi
|
|
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
|
|
\newcommand{\euro}{€}
|
|
\fi
|
|
% use upquote if available, for straight quotes in verbatim environments
|
|
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
|
|
% use microtype if available
|
|
\IfFileExists{microtype.sty}{%
|
|
\usepackage{microtype}
|
|
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
|
|
}{}
|
|
\usepackage{hyperref}
|
|
\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref
|
|
\hypersetup{unicode=true,
|
|
pdfborder={0 0 0},
|
|
breaklinks=true}
|
|
\urlstyle{same} % don't use monospace font for urls
|
|
\usepackage{listings}
|
|
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
|
|
\setlength{\parindent}{0pt}
|
|
\setlength{\parskip}{6pt plus 2pt minus 1pt}
|
|
\setlength{\emergencystretch}{3em} % prevent overfull lines
|
|
\providecommand{\tightlist}{%
|
|
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
|
|
\setcounter{secnumdepth}{0}
|
|
% Redefines (sub)paragraphs to behave more like sections
|
|
\ifx\paragraph\undefined\else
|
|
\let\oldparagraph\paragraph
|
|
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
|
|
\fi
|
|
\ifx\subparagraph\undefined\else
|
|
\let\oldsubparagraph\subparagraph
|
|
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
|
|
\fi
|
|
|
|
\date{}
|
|
|
|
\begin{document}
|
|
|
|
\section{lhs test}\label{lhs-test}
|
|
|
|
\texttt{unsplit} is an arrow that takes a pair of values and combines them to
|
|
return a single value:
|
|
|
|
\begin{code}
|
|
unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
|
|
unsplit = arr . uncurry
|
|
-- arr (\op (x,y) -> x `op` y)
|
|
\end{code}
|
|
|
|
\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
|
|
\end{verbatim}
|
|
|
|
Block quote:
|
|
|
|
\begin{quote}
|
|
foo bar
|
|
\end{quote}
|
|
|
|
\end{document}
|