I have a quite long (in term of time) experience as a LaTeX user. Unfortunately I have never tried to customise it.
I now want to provide a custom class to member of a project in my department, mainly changing the title page and adding headers and footers.
EDIT: As I solved (thanks UlrikeFische) the error, I am now left with the actual issue. (If moderators think I should open a new questions, I will.)
I would also like to add multiple authors, so that the user simply calls \authors multiple times, and in the class I add them in a table (one for raw, together with email). I can also create a new command, like
\authandemail{First Author}{first.author@mail.com}
I would also like to redefine the \title command to have an optional short title (like \title[short title]{Long title}.
I then display the short title in the footer of the pages, and the main title in the title page
CURRENT STATUS OF TITLE PAGE:
\newcommand{\deliverabletitle}[2]{
\def\@shortdeltitle{#1}
\def\@deltitle{#2}
}
\newcommand{\deliverableversion}[1]{
\def\@deliverableversion{#1}
}
\renewcommand*{\maketitle}{%
\begin{titlepage}
%This to align on the left the text and on the right the image
\noindent
\parbox[t]{4cm}{\textbf{Title header}}%
\hfill
\raisebox{\dimexpr-\height+\baselineskip}{\includegraphics[width=2.5cm]{logo}}
\vfill
\centering
{\huge\bfseries\ifdefined\@deltitle
\@deltitle
\else
\fi\unskip\strut\par}
\vfill
\begin{tabular}[b]{|p{.25\textwidth}|p{.6\textwidth}|}
\hline
\multicolumn{2}{|l|}{University} \\
\multicolumn{2}{|l|}{Department} \\
\hline
Authors & \begin{minipage}{.6\textwidth}
\vspace{0.15cm}
{\@author \par}
\vspace{0.15cm}
\end{minipage} \\
\hline
Purpose & Deliverable \\
\hline
Revision & \@deliverableversion \\
\hline
Document Availability & \colorbox{red!50}{Confidential} \\
\hline
Date & \@date\\
\hline
\end{tabular}
\end{titlepage}
}
SOLVED ERROR:
Unfortunately when I try to redefine the \maketitle command I get an Undefined control sequence on the \end{document} in the main section.
This is my tentative \maketitle command (inspired by https://en.wikibooks.org/wiki/LaTeX/Title_Creation)
\renewcommand*{\maketitle}{%
\begin{titlepage}
{\raggedleft%
\includegraphics[width=4cm]{logo}\par
}\vspace{1cm}
\centering
{\huge\bfseries\@title\unskip\strut\par}
\vfill
\begin{tabular}[b]{|p{.3\textwidth}|p{.3\textwidth}|}
\hline
\multicolumn{2}{|l|}{Institution} \\
\multicolumn{2}{|l|}{My Dept} \\
\hline
Authors & \\
\hline
Purpose & Deliverable \\
\hline
Revision & $1.0$ \\
\hline
Document Availability & \colorbox{red!50}{Confidential} \\
\hline
Date & \@date\\
\hline
\end{tabular}
\end{titlepage}
}
The main document is
\documentclass[]{myclass}
\title{My project title}
\author{First Author}
\begin{document}
\maketitle
test
\end{document}
and I get the error on the closing \end{document}.
titlingpackage. – Bernard Aug 25 '17 at 09:06\maketitlecommand. The GUI was suppressing most of the log, while on the terminal I immediately saw the error. As the title is quite generic, I edit the question with the "real" question, i.e. multiple author and redefinition of the title command – Francesco Aug 25 '17 at 11:39\author{Walter Wombat \\ Mail \and Carl Capybara\\ Mail}– Johannes_B Aug 27 '17 at 06:51\andworks! I had to do a modifications to the template: redefine the\andcommand\renewcommand\and{\\}. I will update my question with the current status. I am missing only a couple of minor details and my class is ready! – Francesco Aug 28 '17 at 16:06tttitle, but the other stuff is what you also want to do. – Johannes_B Aug 28 '17 at 16:45\authorpart and command part I can accept it. Anyway I edited my question with my "current" solution – Francesco Aug 28 '17 at 20:17