\usepackage{color}

% Index
\usepackage{makeidx}
\makeindex
\newcommand\INDEX[1]{{#1}\index{#1}}

% Switch mostly to Helvetica
\usepackage{helvet}
\usepackage{sectsty}
\allsectionsfont{\sffamily}
\renewcommand*\figurename{\sffamily Figure}

% Source-Code Listings (Version 0.2)
\usepackage{listings}
\usepackage{lstpatch}
\lstloadlanguages{C,C++,csh,Perl}
\lstset{language=C++}
\lstset{basicstyle=\sffamily,frame=trlb}
\lstset{captionpos=b,xleftmargin=1cm,xrightmargin=1cm}
\lstset{morekeywords={record},keywordstyle=\bfseries}
\renewcommand*\lstlistingname{\sffamily Listing}

% \InsertListing{Caption}{Label}{Filename}
\newcommand\InsertListing[3]{\lstinputlisting[float=htb,caption={#1},label=#2]{#3}}  


% PDF Support
\definecolor{rltred}{rgb}{0.75,0,0}
\definecolor{rltgreen}{rgb}{0,0.5,0}
\definecolor{rltblue}{rgb}{0,0,0.75}
% Create a new ifpdf to allow conditional translation w/ and w/o PDF:
\newif\ifpdf
\ifx\pdfoutput\undefined
    \pdffalse          % we are not running PDFLaTeX
\else
    \pdfoutput=1       % we are running PDFLaTeX
    \pdftrue
\fi
\ifpdf
% PDF-only stuff
\usepackage[pdftex,
        colorlinks=true,
        urlcolor=rltblue,       % \href{...}{...} external (URL)
        filecolor=rltgreen,     % \href{...} local file
        linkcolor=rltred,       % \ref{...} and \pageref{...}
        pdftitle={Channel Archiver Manual},
        pdfauthor={Kay-Uwe Kasemir},
        pdfsubject={EPICS Channel Archiver},
        pdfkeywords={EPICS, Archiver, ChannelAccess},
        pagebackref,
        pdfpagemode=None,
        bookmarksopen=true]{hyperref}
\usepackage[pdftex]{graphicx}
\else
% Non-PDF Stuff
\usepackage[dvips]{graphicx}
\fi

\DeclareGraphicsExtensions{.png}
%\begin{figure}
%\centering
%\includegraphics[width=\textwidth]{math30.eps}
%\caption{Mathematica EPS-File}
%\end{figure}

\definecolor{red}{rgb}{0.5,0,0}
\newcommand\NOTE[0]{\noindent {\bf \color{red} Note:~}}

\hyphenation{phys-ics Ar-chive-En-gine}

