I have a long academic report to write and I am thinking of using the book class or the report class? However in both these classes the title page has the title in the centre. I want to make my own title page with a few images related to the report, the logo of my instititute etc.? How to do this?
[Tex/LaTex] Custom title page in report or book class
book-designreporttitles
Related Solutions
The problem is caused because the titlepage
environment sets the page counter to zero using
\setcounter{page}\z@
You can redefine titlepage
to avoid this (perhaps a patching would make the code shorter):
\documentclass[12pt,titlepage]{report}
\usepackage{lastpage}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[R]{Team \#3243 Page \thepage\ of \pageref{LastPage}}
\makeatletter
\renewenvironment{titlepage}
{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse\newpage
\fi
\thispagestyle{empty}%
%\setcounter{page}\z@
}%
{\if@restonecol\twocolumn \else \newpage \fi
}
\makeatother
\title{Title}
\author{Author}
\begin{document}
\fancypagestyle{empty}{
\fancyhf{}
\fancyhead[R]{Team \#3243 Page \thepage\ of \pageref{LastPage}}
}
\begin{titlepage}
\maketitle
\end{titlepage}
test
\end{document}
An image of the header in the title page:
and of the header in the test page:
I placed the redefinition of the empty page style in the body so you can easily make it local (in case, it shouldn't affect all pages with empty style) by grouping; otherwise, it can be moved to the preamble.
With simple tubulars and rules:
\documentclass{book}
\usepackage{libertinus}
\usepackage[svgnames,table]{xcolor}
\usepackage{tabularx}
\usepackage{url,ragged2e}
\renewcommand\tabularxcolumn[1]{m{#1}}
\usepackage{geometry}
\def\HUGE{\fontsize{1.6cm}{1.7cm}\selectfont}
\definecolor{ColA}{cmyk}{0.00,0.67,0.70,0.39}
\definecolor{ColB}{cmyk}{0.21,0.00,0.64,0.31}
\definecolor{ColC}{cmyk}{0.00,0.45,0.85,0.12}
\definecolor{ColD}{cmyk}{0.00,0.70,0.72,0.29}
\definecolor{ColE}{cmyk}{0.75,0.16,0.00,0.25}
\begin{document}
\begin{titlepage}
\newgeometry{margin=0mm}
\parindent=0pt\arrayrulecolor{white}\arrayrulewidth=1pt\tabcolsep=5pt
\begin{tabularx}{\linewidth}{@{} X |X |X |X @{}}
\multicolumn{4}{@{} c @{}}{%
\cellcolor{ColA}\rule[-1cm]{0pt}{3cm}\bfseries\large
\shortstack{\textcolor{white}{School of Mathematics}\\[1em]
\Large\textcolor{white}{XYZ University}}}\\\hline
%
\multicolumn{3}{@{} r| @{}}{%
\cellcolor{ColB}\rule[-6cm]{0pt}{12cm}%
\bfseries\textcolor{white}{\shortstack[l]{\HUGE Book Title\\[2cm]
\Large subtitle%
}} \hspace*{1.5cm}} & \cellcolor{ColC}\rule{\linewidth}{0pt}\\\hline
%
\rowcolor{ColA}%
\rule{0pt}{2cm} & & & \Centering\large\bfseries\textcolor{white}{Course code}\\\hline
%
\multicolumn{3}{@{} c| @{}}{%
\cellcolor{ColD}\rule[-4.1cm]{0pt}{8.2cm}%
\bfseries\large\shortstack[l]{Email: \url{me@domain.org}\\[0.5cm]
Website: \\[0.5cm]Phone: }} & \cellcolor{ColE}\rule{\linewidth}{0pt}\\\hline
%
\multicolumn{4}{@{} l @{}}{%
\cellcolor{ColA}\rule[-1cm]{0pt}{2.5cm} \large Address: }
\end{tabularx}
\end{titlepage}
\restoregeometry
foo
\end{document}
Best Answer
This is the extreme abuse of features provided by LaTex. This should serve as a model and the length parameters can be changed as per personal needs.
Option -- 2
One can simply use
titlepage
as an alternative. Here we don't use\title
and\author
but everything is done manually.