1 % this is pseudo-package with some definitions exluded
2 % from madmutt-tex.xsl to madmutt.sty
3 % written for madmutt by:
4 % Rocco Rutte <pdmef@cs.tu-berlin.de>
7 \usepackage[american]{babel}
8 \usepackage{ifpdf,makeidx,listings,longtable,textcomp}
9 \usepackage[utf-8]{inputenc}
12 % options for pdf output
13 \usepackage[pdftex]{graphicx,thumbpdf}
14 \usepackage{ae,varioref,hyperref}
15 \hypersetup{breaklinks=true}
16 \newcommand{\web}[1]{\href{#1}{\nolinkurl{<#1>}}}
19 % options for non-pdf output
20 \usepackage[dvips]{graphicx,hyperref}
21 % we need a clue on breaking URLs here to always work:
22 % - hyperref does it for pdf output
23 % - breakurl does it for non-pdf + non-html output
24 % - don't do it for tex4ht output
26 \@ifpackageloaded{tex4ht}
28 % when doing tex4ht output, there's no need to
29 % break URLs at all since browsers will do that
30 \newcommand{\web}[1]{\href{#1}{\texttt{<#1>}}}
32 % when not producing tex4ht output (i.e. postscript),
33 % use breakurl.sty to break URLs
34 \usepackage{breakurl,varioref}
35 \newcommand{\web}[1]{\texttt{<}\burl{#1}\texttt{>}}
41 % no variables in toc, please!
42 \setcounter{tocdepth}{1}
44 % really call \appendix only once
46 \newcommand{\myappendix}[0]{
53 % from here on, these implement the madmutt-doc namespace,
54 % see Hacking Documentation for details
55 % madmutt-tex.xsl passes most of the content as-is so that
56 % we do it here via LaTeX rather than XSL for good reason...
58 \newcommand{\uglyesc}[1]{\lstinline[basicstyle=\ttfamily]{#1}}
60 \newcommand{\mailto}[1]{\href{mailto:#1}{\texttt{<#1>}}}
62 \newcommand{\man}[2][\empty]{\texttt{#2(\ifx#1\empty1\else#1\fi)}\index{#2@\texttt{#2(\ifx#1\empty1\else#1\fi)}}}
64 \newcommand{\pat}[2][0]{\ifnum #1=0\texttt{\char126 #2}\else\texttt{\char126 #2/=#2}\fi\index{\char126 #2@\texttt{\char126 #2/=#2}}}
66 \newcommand{\var}[1]{\uglyesc{$#1}\index{#1@\uglyesc{$#1}}}
68 \newcommand{\envvar}[1]{\var{#1}}
70 \newcommand{\hook}[1]{\hyperlink{#1-hook}{\texttt{#1-hook}}\index{#1-hook@\texttt{#1-hook}}}
72 \newcommand{\cmddef}[2]{Usage: \uglyesc{#1} #2\hypertarget{cmd:#1}{}\index{#1@\uglyesc{#1}}}
73 \newcommand{\cmdref}[1]{\hyperlink{cmd:#1}{\uglyesc{#1}}\index{#1@\uglyesc{#1}}}
75 \newcommand{\funcdef}[2]{\texttt{<#1>} (default: \texttt{#2})\hypertarget{func:#1}{}\index{#1@\uglyesc{<#1>}}}
76 \newcommand{\funcref}[1]{\hyperlink{func:#1}{\texttt{<#1>}}\index{#1@\uglyesc{<#1>}}}
78 \newcommand{\vardef}[1]{\subsection{\uglyesc{$#1}}\hypertarget{#1}{}\index{#1@\uglyesc{$#1}}}
79 \newcommand{\varref}[1]{\hyperlink{#1}{\uglyesc{$#1}}\index{#1@\uglyesc{$#1}}}
81 \newcommand{\rfc}[1]{\href{http://www.faqs.org/rfcs/rfc#1.html}{RfC #1}\index{RfC!#1}}
83 \newcommand{\key}[1]{\texttt{#1}}