%hevea book class with anchor links in headers
\input{bookcommon.hva}
\newcommand{\@book@attr}[1]{\@secid\envclass@attr{#1}}
\newcommand{\@titlesecanchor}{\@open{a}{class="section-anchor" href="\#\@sec@id@attr" aria-hidden="true"}\@print@u{xfeff}\@close{a}}
\@makesection
  {\part}{-2}{part}
  {\@opencell{class="center"}{}{}\@open{h1}{\@book@attr{part}}}%
  {\partname~\thepart}{\\}%
  {\@close{h1}\@closecell}
\newstyle{.part}{margin:2ex auto;text-align:center}
\@makesection
  {\chapter}{-1}{chapter}
   {\@open{h1}{\@book@attr{chapter}}}{\chaptername~\thechapter}{\quad}{\@close{h1}}
\@makesection
  {\section}{0}{section}
  {\@open{h2}{\@book@attr{section}}\@titlesecanchor}{\thesection}{\quad}{\@close{h2}}%
\@makesection
  {\subsection}{1}{subsection}
  {\@open{h3}{\@book@attr{subsection}}\@titlesecanchor}{\thesubsection}{\quad}{\@close{h3}}%
\@makesection
  {\subsubsection}{2}{subsubsection}
  {\@open{h4}{\@book@attr{subsubsection}}\@titlesecanchor}{\thesubsubsection}{\quad}{\@close{h4}}%
\@makesection
  {\paragraph}{3}{paragraph}
  {\@open{h5}{\@book@attr{paragraph}}\@titlesecanchor}{\theparagraph}{\quad}{\@close{h5}}%
\@makesection
  {\subparagraph}{4}{subparagraph}
  {\@open{h6}{\@book@attr{subparagraph}}\@titlesecanchor}{\thesubparagraph}{\quad}{\@close{h6}}%
\newcommand{\hacha@style}{book}%
\styleloadedtrue
