Here is my main file:
\documentclass{report}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[francais]{babel}
\include{definitions/pagetitre}
\title{Text}
\author{Text}
\sujet{Text}
\motsclefs{Text}
\datedebut{September 26th}
\datefin{December 3, 2005}
\superviseurs{Name1 \textsc{Blabla} (ACRONYM)}
\proverbe{A leader is someone who steps back from the entire system and tries to build a more collaborative, more innovative system that will work over the long term.}
\auteurproverbe{Robert Reich, United States Secretary of Labor (1993--1997)}
\begin{document}
\maketitle
\paragraph{Lorem ipsum}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur vestibulum risus nec dapibus aliquam. Phasellus ultricies egestas erat sed mollis. Etiam euismod tortor ut ante rutrum consequat. Nunc id sem convallis, iaculis diam quis, facilisis nulla. Aliquam leo lorem, ultricies.
\end{document}
And here is definitions/pagetitre.tex:
%%%%%%%% Feuilles de style page de titre %%%%%%%%%%
\makeatletter
\def\maketitle{%
\thispagestyle{empty}%\vbox to \vsize{%
\LARGE
\begin{flushright}%
\@sujet\\Â Â
\hrulefill
\end{flushright}%
\vfill
\begin{center}%
\textbf{\huge \@title}\\
\vspace{1cm}%
\Large{ \@author}%
\end{center}%
\par
\vfill
\large
\begin{tabularx}{\textwidth}{lX}%
\textbf{Keywords} & \@motsclefs\\[0.2cm]
\textbf{Dates} & \@datedebut --- \@datefin\\[0.2cm]
\textbf{Supervisors} & \@superviseurs
\end{tabularx}%
  %  }%
  \clearpage
\vfill
\Large
\emph{\og\@proverbe\fg}
\begin{flushright}
\@auteurproverbe
\end{flushright}
\vfill
\normalsize
%\clearpage
  }
\def\date#1{\def\@date{#1}}
\def\author#1{\def\@author{#1}}
\def\title#1{\def\@title{#1}}
\def\departement#1{\def\@departement{#1}}
\def\filiere#1{\def\@filiere{#1}}
\def\motsclefs#1{\def\@motsclefs{#1}}
\def\datedebut#1{\def\@datedebut{#1}}
\def\datefin#1{\def\@datefin{#1}}
\def\sujet#1{\def\@sujet{#1}}
\def\proverbe#1{\def\@proverbe{#1}}
\def\auteurproverbe#1{\def\@auteurproverbe{#1}}
\def\superviseurs#1{\def\@superviseurs{#1}}
% Valeurs par défaut
\proverbe{}
\auteurproverbe{}
\sujet{}
\departement{}
\filiere{}
\motsclefs{}
\datedebut{\today}
\datefin{\today}
\superviseurs{\@author}
Does anyone know why it does not compile? The error is LaTeX doesn't know the command \maketitle…
And when I delete the command \maketitle, it works, but the custom title doesn't appear at all.
Best Answer
As the error message states
tabularx
is not defined, so you need to loadtabularx
. Also there were some accented A in your page title file, look like a mis-encoding of utf8 no break space. I removed those and also added\noindent
before thetabularx
so that you can get a full width table (otherwise the line is over-full by 15pt = the paragraph indentation). Also use\input
not\include
.