\documentclass{book}

\usepackage{cprog}
\usepackage{cc_manual}
\usepackage{pslatex}
\usepackage{epsfig}
\usepackage{cc_manual_index}
\usepackage{latex_converter}
\usepackage{makeidx}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{path}
\usepackage{ipe}
\usepackage{longtable}
\usepackage{ifthen}

\lcTex{
% set this to true for generating the pdf version of the manual (using
% ps2pdf from ghostscript).  If this is true when creating postscript,
% the table of contents (and several other things) will be blue.
\newboolean{usehyperref}
\setboolean{usehyperref}{false}

\ifthenelse{\boolean{usehyperref}}{
\usepackage[ps2pdf=true,
            colorlinks=true,
            linkcolor=blue,
            bookmarksnumbered=true,
            pdftitle={CGAL 2D & 3D Kernel Manual},
            pdfkeywords={computational geometry, generic programming,
                         algorithms, software library, C++},
            pdfborder={0 0 0}]{hyperref}
}{}
}

% page dimensions
% ---------------
\lcTex{
\textwidth 15.6cm 
\textheight 23 cm
% with pdf distilled via ps2pdf this shifts the text far too high on the page
\ifthenelse{\boolean{usehyperref}}{}{\topmargin -14mm}
\evensidemargin 3mm 
\oddsidemargin 3mm
}

% default column layout
% ---------------------
% This is the recommended layout. It may be changed inside main.tex.

\newcommand{\cgalColumnLayout}{\ccTexHtml{%
    \ccSetThreeColumns{Oriented_side}{}{\hspace*{10cm}}
    \ccPropagateThreeToTwoColumns}{}}

\gdef\ccNewRefManualStyle{\ccTrue}
\ccDefGlobalScope{CGAL::}
\marginparsep10mm
\marginparwidth15mm

\newcommand{\cgalrelease}{2.3}
\lcTex{\batchmode}

%% let HTML converter know it is dealing with a manual in multiple parts
%\ccMultiplePartsToc
%% make chapters start over at 1 for each part
%\ccNumberChaptersByPart

\makeindex

\sloppy

\begin{document}

\include{title}
\pagestyle{plain}
\pagenumbering{roman}
\setcounter{page}{0}
\include{preface}
\cleardoublepage
\tableofcontents

\cgalColumnLayout

% ???
% this needs to come after the cgalColumnLayout command, otherwise the
% arabic page numbers begin with 1 on the last page of the table of contents
% ???
\cleardoublepage
\pagenumbering{arabic}

\include{main}

\listofrefpages

\bibliographystyle{alpha}
\bibliography{../cgal-manual,geom}

\printindex
\end{document}

