\documentclass[11pt,letterpaper]{book}
\setlength{\oddsidemargin}{0.5in}
\setlength{\topmargin}{0in}
\setlength{\evensidemargin}{0.3in}
\setlength{\textwidth}{5.75in}
\setlength{\textheight}{8.5in}
%\setlength{\oddsidemargin}{1.25in}
%\setlength{\evensidemargin}{0.5in}

% don't do this \usepackage{times}    % Better fonts than Computer Modern
\renewcommand{\sfdefault}{phv}
\renewcommand{\rmdefault}{ptm}
% don't replace tt -- old is better \renewcommand{\ttdefault}{pcr}
%\usepackage{apalike}
\usepackage{pslatex}
\usepackage{techref}
%\usepackage{epsfig}
\usepackage{verbatim}
\usepackage{moreverb}
\usepackage{graphicx}
\usepackage{xspace}
\usepackage{needspace}
%\usepackage{multicol}
%\usepackage{color}
%\usepackage{html}
\usepackage{hyperref}
\usepackage{array}
\usepackage{multirow}
\usepackage{longtable}
\usepackage{tabularx}
%\usepackage{version}
\usepackage{makeidx}
%\usepackage{showidx}
\usepackage[chapter]{algorithm}
\floatname{algorithm}{Listing}

\usepackage{syntax}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\fancyfoot[C]{\bfseries OpenImageIO Programmer's Documentation}
\renewcommand{\footrulewidth}{1pt}


\def\product{{\sffamily OpenImageIO}\xspace}
\def\OpenImageIO{{\sffamily OpenImageIO}\xspace}
\def\versionnumber{2.0}
\def\productver{\product\ {\sffamily \versionnumber}\xspace}
\def\producthome{{\codefont \$OPENIMAGEIO\_ROOT\_DIR}\xspace}
\def\ivbinary{{\codefont iv}\xspace}
\def\maketx{{\codefont maketx}\xspace}
\def\iconvert{{\codefont iconvert}\xspace}
\def\idiff{{\codefont idiff}\xspace}
\def\iinfo{{\codefont iinfo}\xspace}
\def\igrep{{\codefont igrep}\xspace}
\def\oiiotool{{\codefont oiiotool}\xspace}
\def\ImageSpec{{\codefont ImageSpec}\xspace}
\def\ImageInput{{\codefont ImageInput}\xspace}
\def\ImageOutput{{\codefont ImageOutput}\xspace}
\def\ParamBaseType{{\codefont ParamBaseType}\xspace}
\def\TypeDesc{{\codefont TypeDesc}\xspace}
\def\ParamValue{{\codefont ParamValue}\xspace}
\def\ParamValueList{{\codefont ParamValueList}\xspace}
\def\ImageBuf{{\codefont ImageBuf}\xspace}
\def\ImageBufAlgo{{\codefont ImageBufAlgo}\xspace}
\def\ImageCache{{\codefont ImageCache}\xspace}
\def\TextureSystem{{\codefont TextureSystem}\xspace}
\def\ROI{{\codefont ROI}\xspace}
\def\IBA{{\codefont ImageBufAlgo}\xspace}
\def\NULL{{\codefont NULL}\xspace}
\def\DeepData{{\codefont DeepData}\xspace}
%\def\opencall{{\codefont open()}\xspace}
\def\writeimage{{\codefont write\_image()}\xspace}
\def\writescanline{{\codefont write\_scanline()}\xspace}
\def\writetile{{\codefont write\_tile()}\xspace}
\def\readimage{{\codefont read\_image()}\xspace}
\def\readscanline{{\codefont read\_scanline()}\xspace}
\def\readtile{{\codefont read\_tile()}\xspace}
\def\AutoStride{{\codefont AutoStride}\xspace}
\def\cspan{{\codefont cspan}\xspace}
\def\stringview{{\codefont string\_view}\xspace}
\def\ustring{{\codefont ustring}\xspace}

\title{ 
{\Huge{\bf \product}
%\textregistered\ 
{\bf\sffamily \versionnumber} \medskip \\ \huge Programmer Documentation
% \\ \large (in progress)
} \bigskip }
\author{Editor: Larry Gritz \\
\emph{lg@openimageio.org}
 \bigskip \\
}
\date{{\large
Date: 5 Jan 2019
%\\ (with corrections, 18 Dec 2018)
}}


\include{macros}

\makeindex

\begin{document}
\frontmatter

\maketitle

\include{copyr}

\vspace*{2in}

\begin{centering}
\emph{I kinda like ``Oy-e-oh'' with a bit of a groaning Yiddish accent, as in\\
``OIIO, did you really write yet another file I/O library?''} \\
\end{centering}
\medskip
\begin{centering}
\center Dan Wexler \\
\end{centering}




\setcounter{tocdepth}{1}
\tableofcontents

\mainmatter

\include{oiiointro}

\part{The OpenImageIO Library APIs}

\include{imageioapi}
\include{imageoutput}
\include{imageinput}
\include{writingplugins}
\include{builtinplugins}
\include{imagecache}
\include{texturesys}
\include{imagebuf}
\include{imagebufalgo}
\include{pythonbindings}


\part{Image Utilities}

\include{oiiotool}

\chapter{The {\kw iv} Image Viewer}
\label{chap:iv}
\indexapi{iv}

The {\cf iv} program is a great interactive image viewer.  Because {\cf
  iv} is built on top on \product, it can display images of any formats
readable by \ImageInput plugins on hand.

\medskip

More documentation on this later.

\include{iinfo}
\include{iconvert}
\include{igrep}
\include{idiff}
\include{maketx}


\part{Appendices}
\begin{appendix}

%\include{typedesc}
\chapter{Building OpenImageIO}

\include{stdmetadata}


%\include{header}
\include{glossary}
\end{appendix}

\backmatter

%\bibliographystyle{alpha}	%% Select for [GH95]
\bibliographystyle{apalike}    %% Select for (Gritz and Hahn, 1995)
%\addcontentsline{toc}{chapter}{Bibliography}
%\bibliography{bmrtbib}

\addcontentsline{toc}{chapter}{Index}
\printindex

\end{document}


% Canonical figure
\begin{comment}
\begin{figure}[ht]
\noindent
\includegraphics[width=5in]{figures/bredow/foo} 
\caption{Caption
\label{fig:foo}}
\end{figure}
\end{comment}
