% mkjobtexmf.ltx
%
% Copyright 2007, 2008, 2011 by Heiko Oberdiek.
%
% The file is part of project mkjobtexmf.
% 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}{2011/11/10}
\providecommand*{\VERSION}{0.8}

\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{mkjobtexmf}}
\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={mkjobtexmf},
}
\definecolor{linkcolor}{rgb}{0,0,.8}
\hypersetup{
  linkcolor=linkcolor,
}

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

\makeindex

\author{Heiko Oberdiek}
\title{Program \textsf{mkjobtexmf}}
\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{mkjobtexmf.tex}

\printindex

\end{document}
