Commit 643004e1 authored by Simon Marlow's avatar Simon Marlow
Browse files

update to the latest Haddock style

parent 562b1643
......@@ -120,7 +120,7 @@ haskell.tex: haskell.verb
# cp index.html *.png *.gif haskell-report-html
haskell.dvi: haskell.tex haskell.ind ${PARTS}
haskell.pdf: haskell.tex haskell.ind haddock-style.tex ${PARTS}
haskell.pdf: haskell.tex haskell.ind haddock.sty ${PARTS}
haskell.ps : haskell.dvi
dvips haskell.dvi -o haskell.ps
......@@ -150,7 +150,7 @@ ht/classes.eps : classes.eps
$(CP) $< $@
.PHONY: html
html: $(HT_TEXS) ht/classes.eps ht/haddock-style.tex
html: $(HT_TEXS) ht/classes.eps ht/haddock.sty
cd ht && htlatex haskell.tex "haskell,2"
#########################################
......@@ -167,8 +167,7 @@ clean:
ht/*.4ct ht/*.4tc
$(RM) *.dvi *.log *.aux *.ilg *.blg *.toc *.bbl *.idx *.tmp *.out \
${PARTS} \
haskell.tex haskell.ps haskell.pdf *.o lex.yy.c haskell-report-html/* \
haddock-style.tex
haskell.tex haskell.ps haskell.pdf *.o lex.yy.c haskell-report-html/*
#########################################
......
% Haddock style sheet
% Modified version of the Haddock style sheet
\usepackage{tabulary} % see below
\newenvironment{haddocktitle}
{\begin{center}\bgroup\large\bfseries}
{\egroup\end{center}}
\newenvironment{haddockprologue}{\vspace{1in}}{}
\newcommand{\haddockmoduleheading}[1]{\chapter{\texttt{#1}}}
\newcommand{\haddockbeginheader}{\hrulefill}
\newcommand{\haddockendheader}{\hrulefill}
\newcommand{\haddockendheader}{\noindent\hrulefill}
% a little gap before the ``Methods'' header
\newcommand{\haddockpremethods}{\vspace{2ex}}
......@@ -9,22 +18,23 @@
% inserted before \\begin{verbatim}
\newcommand{\haddockverb}{\small}
% an identifier: we add an index entry
\newcommand{\haddockid}[1]{\haddocktt{#1}\indextt{#1}}
% an identifier: add an index entry
\newcommand{\haddockid}[1]{\haddocktt{#1}\index{#1@\texttt{#1}}}
% \newcommand{\haddockbeginconstrs}{\vspace{-2ex}\begin{tabular}{llp{4in}}}
\newcommand{\haddockbeginconstrs}{\begin{tabular}{@@{}llp{4in}}}
\newcommand{\haddockendconstrs}{\end{tabular}}
\newcommand{\haddockbeginargs}{\begin{tabular}{@@{}llp{4in}}}
\newcommand{\haddockendargs}{\end{tabular}}
% The tabulary environment lets us have a column that takes up ``the
% rest of the space''. Unfortunately it doesn't allow
% the \end{tabulary} to be in the expansion of a macro, it must appear
% literally in the document text, so Haddock inserts
% the \end{tabulary} itself.
\newcommand{\haddockbeginconstrs}{\begin{tabulary}{\linewidth}{@{}llJ@{}}}
\newcommand{\haddockbeginargs}{\begin{tabulary}{\linewidth}{@{}llJ@{}}}
\newcommand{\haddocktt}[1]{{\small \texttt{#1}}}
\newcommand{\haddockdecltt}[1]{{\small\bfseries \texttt{#1}}}
\makeatletter
\newenvironment{haddockdesc}
{\list{}{\labelwidth\z@@ \itemindent-\leftmargin
{\list{}{\labelwidth\z@ \itemindent-\leftmargin
\let\makelabel\haddocklabel}}
{\endlist}
\newcommand*\haddocklabel[1]{\hspace\labelsep\haddockdecltt{#1}}
......@@ -37,3 +47,7 @@
% couldn't get that to work reliably (the space seemed to stretch
% sometimes).
\newcommand{\haddockbegindoc}{\hfill\\[1ex]}
% spacing between paragraphs and no \parindent looks better
\parskip=10pt plus2pt minus2pt
\setlength{\parindent}{0cm}
......@@ -348,7 +348,7 @@
\hyphenation{Has-kell}
% Macros for Haddock output
\input{haddock-style}
\usepackage{haddock}
\begin{document}
......
% Haddock style sheet
% Modified version of the Haddock style sheet
\usepackage{tabulary} % see below
\newenvironment{haddocktitle}
{\begin{center}\bgroup\large\bfseries}
{\egroup\end{center}}
\newenvironment{haddockprologue}{\vspace{1in}}{}
\newcommand{\haddockmoduleheading}[1]{\chapter{\texttt{#1}}}
\newcommand{\haddockbeginheader}{\begin{quote}}
\newcommand{\haddockendheader}{\end{quote}}
......@@ -9,15 +18,16 @@
% inserted before \\begin{verbatim}
\newcommand{\haddockverb}{}
% an identifier: we add an index entry
\newcommand{\haddockid}[1]{\haddocktt{#1}\indextt{#1}}
% an identifier: add an index entry
\newcommand{\haddockid}[1]{\haddocktt{#1}\index{#1@\texttt{#1}}}
% \newcommand{\haddockbeginconstrs}{\vspace{-2ex}\begin{tabular}{llp{4in}}}
\newcommand{\haddockbeginconstrs}{\begin{tabular}{@{}llp{4in}}}
\newcommand{\haddockendconstrs}{\end{tabular}}
\newcommand{\haddockbeginargs}{\begin{tabular}{@{}llp{4in}}}
\newcommand{\haddockendargs}{\end{tabular}}
% The tabulary environment lets us have a column that takes up ``the
% rest of the space''. Unfortunately it doesn't allow
% the \end{tabulary} to be in the expansion of a macro, it must appear
% literally in the document text, so Haddock inserts
% the \end{tabulary} itself.
\newcommand{\haddockbeginconstrs}{\begin{tabulary}{\linewidth}{llL}}
\newcommand{\haddockbeginargs}{\begin{tabulary}{\linewidth}{llL}}
\newcommand{\haddocktt}[1]{{\texttt{#1}}}
\newcommand{\haddockdecltt}[1]{{\bfseries \texttt{#1}}}
......@@ -37,3 +47,7 @@
% couldn't get that to work reliably (the space seemed to stretch
% sometimes).
\newcommand{\haddockbegindoc}{}
% spacing between paragraphs and no \parindent looks better
\parskip=10pt plus2pt minus2pt
\setlength{\parindent}{0cm}
......@@ -75,6 +75,10 @@
% }
% don't center the text in our fboxes
div.center div.fbox { text-align: left; }
%
% get rid of borders on tables
table[rules] { border-left: 0;
border-right: 0; }
}
\EndPreamble
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment