0

I'm struggling with developing custom report class which reflects current requirements in the company. The goal is to encourage people to use LaTeX as main tool for reporting technical stuff. I would like to lower the entry threshold as much as possible. That's why class which takes care of all formatting seems to be a good idea. I'm almost there but need your support to solve problem related to custom cover page for each appendix. With current code I achieved this: enter image description here

But I want to get this (optional figure in frame, ToC will go to another page): enter image description here

I know this looks rather like cover page for main document but... anyway.

My class:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{myreport}[2018/08/29 My report LaTeX class]

\DeclareOption{twocolumn}{\OptionNotUsed}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ProcessOptions\relax
\LoadClass[onecolumn, 10pt]{report}

\RequirePackage[a4paper, left=2.5cm,right=2.5cm,top=2cm,bottom=3.5cm]{geometry}
\RequirePackage[toc, title]{appendix}
\RequirePackage{xpatch}
\RequirePackage{etoc}
\RequirePackage{lastpage}
\RequirePackage{fancyhdr}
\RequirePackage{xcolor}
%*********************************************************
% CUSTOM COLORS
%*********************************************************
\definecolor{MyBlue}{RGB}{0,65,101}
%*********************************************************
% SECTION REDEFINITION
%*********************************************************
\renewcommand\chapter{\@startsection {chapter}{1}{\z@}%
    {-3.5ex \@plus -1ex \@minus -.2ex}%
    {2.3ex \@plus.2ex}%
    {\normalfont\Large\bfseries\color{MyBlue}}}
\renewcommand\section{\@startsection {section}{2}{\z@}%
    {-3.5ex \@plus -1ex \@minus -.2ex}%
    {2.3ex \@plus.2ex}%
    {\normalfont\large\bfseries\color{MyBlue}}}
\renewcommand\subsection{\@startsection{subsection}{3}{\z@}%
    {-3.25ex\@plus -1ex \@minus -.2ex}%
    {1.5ex \@plus .2ex}%
    {\normalfont\normalsize\bfseries\color{MyBlue}}}
\renewcommand\subsubsection{\@startsection{subsubsection}{4}{\z@}%
    {-3.25ex\@plus -1ex \@minus -.2ex}%
    {1.5ex \@plus .2ex}%
    {\normalfont\normalsize\bfseries\color{MyBlue}}}
\renewcommand\paragraph{\@startsection{paragraph}{5}{\z@}%
    {3.25ex \@plus1ex \@minus.2ex}%
    {-1em}%
    {\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{6}{\parindent}%
    {3.25ex \@plus1ex \@minus .2ex}%
    {-1em}%
    {\normalfont\normalsize\bfseries}}

%*********************************************************
% COUNTERS FOR FIGURES AND TABLES INCLUDE SECTION NUMBER
%*********************************************************
\setcounter{secnumdepth}{4} %depth for numbering
\counterwithin{figure}{chapter}
\counterwithin{table}{chapter}

%*********************************************************
% CUSTOM APPENDIX 
%*********************************************************

\renewcommand\appendixname{Appendix}
\renewcommand\appendixtocname{Appendices}
\renewcommand\appendixpagename{Appendix}


%redefinition of appendices environment from 'appendix' package
%this set up ToC depth
\let\oldappendices\appendices
\def\appendices{\oldappendices\etocdepthtag.toc{mtappendix}\etocsettagdepth{mtchapter}{none}\etocsettagdepth{mtappendix}{subsection}}


%*********************************************************
% TITLE PAGE
%*********************************************************
\renewcommand*{\maketitle}{%

\thispagestyle{empty}
    \begin{center}


        \bfseries
        \huge Main Title Of The Document
        \vskip.5in
        \LARGE Task title
        \vskip.2in
        \vskip.2in
        \LARGE Rev no
        \vspace{10cm}   
    \end{center}
\newpage
}

%*********************************************************
% HEADER AND FOOTER STYLE
%*********************************************************
\pagestyle{fancy}
\fancyhead{}
\renewcommand{\headrulewidth}{0pt} % no line in header area
\fancyfoot{} % clear all footer fields
\renewcommand{\footrule}{{\color{MyBlue}\vskip-\footruleskip\vskip-\footrulewidth \hrule width\headwidth height \footrulewidth\vskip\footruleskip}}
\renewcommand{\footrulewidth}{3pt}
\renewcommand\thefootnote{\textcolor{red}{\arabic{footnote}}}
\fancyfoot[RE,LO]{\footnotesize \textcolor{MyBlue} {\vskip.3cm TaskNo XXX \ - Rev.XXX}} % other info in "inner" position of footer line
\fancyfoot[LE,RO]{\footnotesize \textcolor{MyBlue} {\vskip.3cm Page \thepage\ of \pageref{LastPage}}}           % page number in "outer" position of footer line

And example report which uses class above:

\documentclass[a4paper, 10pt]{myreport}

\begin{document}

\maketitle          %creates custom cover page
\tableofcontents    %creates main table of content
\newpage            %start first chapter from new page

%**************************  INPUT DOCUMENT CONTENT  **************************************
%******************************************************************************************
\chapter{Introduction}
Some text in main document.

%**************************  APPENDICIES  *************************************************
%****************************************************************************************** 


\begin{appendices}  

\chapter{Additional information}
\localtableofcontents

\section{Section 1}
Some text
\section{Section 2}
Some text

\end{appendices}

\end{document}

This is simplified version but I believe it's enough to show the case.

Obviously, I tried to do it myself before asking for your help but I'm here so result is known :)

This seems to be similar topic but I was not able to make it working for me. I would appreciate your comments. Thanks!

  • Are you trying to find where to put the cls file ? If yes have a look at --https://tex.stackexchange.com/questions/1137/where-do-i-place-my-own-sty-or-cls-files-to-make-them-available-to-all-my-te – js bibra Nov 27 '19 at 13:31
  • @jsbibra why asking about cls file location? I have submitted class and document which uses the class. My question is only about customization of appendix title page. – Tadeusz Szar Nov 27 '19 at 19:12

0 Answers0