% dosepsbin.ltx
%
% Copyright 2011-2012 by Heiko Oberdiek.
%
% The file is part of project dosepsbin.
% It's free software; you may redistribute it and/or
% modify it under the same terms as Perl itself
% (Perl Artistic License/GNU General Public License, version 2).

\documentclass[a4paper,12pt]{article}

\providecommand*{\DATE}{2012/03/22}
\providecommand*{\VERSION}{1.2}

\usepackage[
  hmargin=1in,
  top=.75in,
  bottom=.5in,
  includefoot,
  headheight=14.5pt,
  footskip=40pt,
]{geometry}

\usepackage{fancyhdr}
\renewcommand*{\headrulewidth}{0pt}
\renewcommand*{\footrulewidth}{0.4pt}
\fancyhead{}
\fancyfoot[L]{\textsf{dosepsbin}}
\fancyfoot[C]{\DATE\ v\VERSION}
\fancyfoot[R]{\thepage}
\pagestyle{fancy}
\makeatletter
\let\ps@plain\ps@fancy
\makeatother

\makeatletter
\renewenvironment*{theindex}{%
  \section*{\indexname}%
  \setlength{\parindent}{0pt}%
  \setlength{\parskip}{0pt plus .3pt}%
  \let\item\@idxitem
}{%
  \clearpage
}
\makeatother

\usepackage{ifluatex}
\ifluatex
  \usepackage{fontspec}
\else
  \usepackage[T1]{fontenc}%
  \usepackage{lmodern}%
  \usepackage[utf8]{inputenc}%
\fi

\usepackage{makeidx}

\usepackage{hyperref}
\hypersetup{
  colorlinks,
  pdfauthor={Heiko Oberdiek},
  pdftitle={dosepsbin},
}
\definecolor{linkcolor}{rgb}{0,0,.8}
\hypersetup{
  linkcolor=linkcolor,
}

\usepackage{bookmark}
\bookmarksetup{
  open,
  numbered,
}

\makeindex

\author{Heiko Oberdiek}
\title{Program \textsf{dosepsbin}}
\date{\DATE\space v\VERSION}

% ignore minor overfull \hbox warnings
\setlength{\hfuzz}{1.5pt}

\begin{document}

\maketitle

\pdfbookmark[1]{\contentsname}{toc}
\tableofcontents

\makeatletter
\let\org@section\section
\def\section{\@ifstar\org@section\org@section}
\makeatother

\input{dosepsbin.tex}

\printindex

\end{document}
