I am trying to create my own report template. The idea is that users have only to enter variables and focus on the contents. I tried to create an altered titlepage but get an error, my testreport.cls:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{testreport}[2017/04/02 v0.1 test report template]
\LoadClassWithOptions{article}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
% for the title page
\newcommand*{\client}[1]{{#1}}
\newcommand*{\project}[1]{{#1}}
\renewcommand*{\maketitle}{
\begin{titlepage}
\title
\\
\project
\\
\client
\\
\date
\\
\author
\end{titlepage}
}
And I have the following in my .tex file:
\documentclass{testreport}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\title{Custom class example}
\author{Yorian}
\date{\today}
\project{aa}
\client{BB}
\begin{document}
% Create title page
\maketitle
\end{document}
But I get an error:
! LaTeX Error: There's no line here to end.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.21 \maketitle
?
I don't see what's going wrong here. Any suggestions?
\title,\author, and\date, as well as\projectand\client, are all commands that take arguments. This doesn't seem to be the case in the template file, though. – Mico Apr 02 '18 at 13:15