\Preamble{xhtml,html5,mathml,2,sec-filename,info,fn-in,fonts}
% Logical elements
\NewLogicalBlock{codesample}
\SetTag{codesample}{figure}
\SetBlockProperty{codesample}{role}{doc-example}% set dPub property
\NewLogicalBlock{acknowledgements}
\SetTag{acknowledgements}{section}
\SetBlockProperty{acknowledgements}{role}{doc-acknowledgements}
\NewLogicalBlock{warning}
\SetTag{warning}{section}
\SetBlockProperty{warning}{role}{doc-notice}
% external stylesheet
\Configure{AddCss}{style.css}
% Declare graphics extensions
\DeclareGraphicsExtensions{.svg,.png,.jpg}
% Mini TOC
\Configure{crosslinks+}{%
\bgroup
% container for the page toc
\Configure{tableofcontents}{\IgnorePar\EndP\HCode{\Hnewline}\ShowPar}{}{}%
\TableOfContents[chapter,section,subsection]% Print table of contents before crosslinks
\egroup
\ifvmode\IgnorePar\fi\EndP%
\HCode{\Hnewline\Hnewline}}
{\ifvmode\IgnorePar\fi\EndP%
\HCode{}}{}{}
% configuration for TOC on the main page
\Configure{tableofcontents}{\IgnorePar\EndP\HCode{\Hnewline\Hnewline}\ShowPar}{}{}%
% close the element started in \Configure{crosslinks+}
\Configure{@/BODY}{\ifvmode\IgnorePar\fi\EndP\HCode{}}
% show only crosslinks to prev, main and next pages
\Configure{crosslinks*}{prev}{up}{next}{}
\Configure{texttt}{\HCode{}\NoFonts}{\EndNoFonts\HCode{}}
\Configure{verb}{\HCode{}\NoFonts}{\EndNoFonts\HCode{}}
\ConfigureEnv{texsource}{\BlockElementStart{codesample}{class="texsource"}}{\BlockElementEnd{codesample}{}}{}{}
\ConfigureEnv{shellcommand}{\BlockElementStart{codesample}{class="shellcommand"}}{\BlockElementEnd{codesample}{}}{}{}
\ConfigureEnv{htmlsource}{\BlockElementStart{codesample}{class="htmlsource"}}{\BlockElementEnd{codesample}{}}{}{}
\ConfigureEnv{acknowledgements}{\BlockElementStart{acknowledgements}{}}{\BlockElementEnd{acknowledgements}{}}{}{}
\ConfigureEnv{warning}{\BlockElementStart{warning}{}}{\BlockElementEnd{warning}{}}{}{}
\begin{document}
\EndPreamble