%% main file for the C++ standard.
%%

%%--------------------------------------------------
%% basics
\documentclass[a4paper,10pt,oneside,openany,final]{memoir}

\usepackage[american]
           {babel}        % needed for iso dates
\usepackage[iso,american]
           {isodate}      % use iso format for dates
\usepackage[final]
           {listings}     % code listings
\usepackage{longtable}    % auto-breaking tables
\usepackage{ltcaption}    % fix captions for long tables
\usepackage{relsize}      % provide relative font size changes
\usepackage{textcomp}     % provide \text{l,r}angle
\usepackage{underscore}   % remove special status of '_' in ordinary text
\usepackage{parskip}      % handle non-indented paragraphs "properly"
\usepackage{array}        % new column definitions for tables
\usepackage[normalem]{ulem}
\usepackage{enumitem}
\usepackage{color}        % define colors for strikeouts and underlines
\usepackage{amsmath}      % additional math symbols
\usepackage{mathrsfs}     % mathscr font
\usepackage[final]{microtype}
\usepackage{multicol}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[pdftex, final]{graphicx}
\usepackage[pdftex,
            pdftitle={P0660},
            pdfsubject={P0660},
            pdfcreator={Josuttis, Baker, O'Neal, Sutter, William},
            bookmarks=true,
            bookmarksnumbered=true,
            pdfpagelabels=true,
            pdfpagemode=UseOutlines,
            pdfstartview=FitH,
            linktocpage=true,
            colorlinks=true,
            linkcolor=blue,
            plainpages=false
           ]{hyperref}
\usepackage{memhfixc}     % fix interactions between hyperref and memoir
\usepackage[active,header=false,handles=false,copydocumentclass=false,generate=std-gram.ext,extract-cmdline={gramSec},extract-env={bnf,simplebnf}]{extract} % Grammar extraction

\pdfminorversion=5
\pdfcompresslevel=9
\pdfobjcompresslevel=2

\renewcommand\RSsmallest{5.5pt}  % smallest font size for relsize

\input{layout}
\input{styles}
\input{macros}
\input{tables}
\usepackage{xcolor}
\definecolor{insertcolor}{RGB}{0,153,0}
\definecolor{diffcolor}{RGB}{0,153,153}

\makeindex[generalindex]
\makeindex[headerindex]
\makeindex[libraryindex]
\makeindex[grammarindex]
\makeindex[impldefindex]
\makeglossary[xrefindex]
\makeglossary[xrefdelta]

%%--------------------------------------------------
%% fix interaction between hyperref and other
%% commands
\pdfstringdefDisableCommands{\def\smaller#1{#1}}
\pdfstringdefDisableCommands{\def\textbf#1{#1}}
\pdfstringdefDisableCommands{\def\raisebox#1{}}
\pdfstringdefDisableCommands{\def\hspace#1{}}

%%--------------------------------------------------
%% add special hyphenation rules
\hyphenation{tem-plate ex-am-ple in-put-it-er-a-tor name-space name-spaces non-zero cus-tom-i-za-tion}

%%--------------------------------------------------
%% turn off all ligatures inside \texttt
\DisableLigatures{encoding = T1, family = tt*}

\begin{document}
\chapterstyle{cppstd}
\pagestyle{cpppage}

%%--------------------------------------------------
%% configuration
\input{config}

%%--------------------------------------------------
%% front matter
\frontmatter
\include{front}

%%--------------------------------------------------
%% main body of the document
\mainmatter
\setglobalstyles

%\include{intro}
%\include{lex}
%\include{basic}
%\include{expressions}
%\include{statements}
%\include{declarations}
%\include{classes}
%\include{overloading}
%\include{templates}
%\include{exceptions}
%\include{preprocessor}
%\include{lib-intro}
%\include{support}
%\include{concepts}
%\include{diagnostics}
%\include{utilities}
%\include{strings}
%\include{containers}
%\include{iterators}
%\include{algorithms}
%\include{numerics}
%\include{time}
%\include{locales}
%\include{iostreams}
%\include{regex}
%\include{atomics}
%\include{threads}
\include{jthreadP660}
\include{jthread}

%%--------------------------------------------------
%% appendices
\appendix
%\include{grammar}
%\include{limits}
%\include{compatibility}
%\include{future}

%%--------------------------------------------------
%% back matter
\backmatter
\include{back}


%%--------------------------------------------------
%% End of document
\end{document}
