%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% novathesisFiles/ChapStyles/vz34.sty
%% NOVA thesis configuration file
%%
%% Customization for the VZ34 chapter style
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\typeout{NT FILE novathesisFiles/ChapStyles/vz34.sty}%


%%=======================================================================
%% FLAGS
%%=======================================================================

% Guard against double-loading (both vz34 and vz43 use this flag).
\@ifundefined{ifNoChapNumber}{\newif\ifNoChapNumber}{}


%%=======================================================================
%% CHAPTER STYLE
%%=======================================================================

\makechapterstyle{VZ34}{%
  \renewcommand\chapternamenum{}
  \renewcommand\printchaptername{}
  \renewcommand\printchapternum{}
  \renewcommand\chapnumfont{\Huge\bfseries}
  \renewcommand\chaptitlefont{\Huge\bfseries\raggedright}
  \renewcommand\printchaptertitle[1]{%
    \ifNoChapNumber
      \begin{tabular}{@{}p{\textwidth}}%
        \chaptitlefont ##1%
      \end{tabular}%
    \else
      % The number column below is a narrow fixed 1cm -- "Appendix"/"Annex"
      % would never fit inside it, so print it as its own line above instead.
      \ifx\ntchapnumappendixname\@empty\else
        {\chapnumfont\ntchapnumappendixname\par}%
      \fi
      \begin{tabular}{@{}p{1cm}|!{\quad}p{\textwidth-1cm-2em-4\tabcolsep }}%
        \chapnumfont \thechapter%
        & \chaptitlefont ##1%
      \end{tabular}%
    \fi
    \NoChapNumberfalse%
  }%
  \renewcommand\printchapternonum{\NoChapNumbertrue}
}

\chapterstyle{VZ34}
