1

So, I am writing my first big document - but I try to remain simple. And I have some problems. I am trying to solve one at a time.

First the title page.

\documentclass[10pt,a4paper]{book}
\usepackage[a4paper]{geometry}

\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}

\usepackage{titling}
%\usepackage{showframe}
\usepackage{graphicx}
\usepackage{listings, multicol, color, fancyhdr,lastpage}
\usepackage[font=small,format=plain,labelfont=bf,up,textfont=it,up]{caption}
\usepackage[hyperindex=true,colorlinks=true,breaklinks=true,linkcolor=blue]{hyperref}

\title{\huge\bsc{Des chiffres et des lettres}}
\author{Stéphane \bsc{22Decembre Guedon}}
\date{13 mai 2015}

% fonte
\renewcommand{\familydefault}{\sfdefault}

\posttitle{
   \newline
   %\vspace{1cm}
   \Large\emph{Protéger ses communications en ligne\\et autres aspects de sa vie numérique}\\
   \vspace{5mm}
   \LARGE\emph{GnuPG et OpenPGP pour tous}\\
    }

\preauthor{
    \vspace{5mm}
    \includegraphics[width=0.9\textwidth]{./images/logo-gnupg}\\
    \vspace{1cm}\\
    }

\predate{version 1 du }

\begin{document}
\maketitle

%\frontmatter
%\include{preambule-court}  
\tableofcontents
\include{0-intro}
\include{1-alternatives}

…

\end{document}

I get the following errors:

Extra }, or forgotten \endgroup.
There's no line here to end.
Misplaced \crcr.
Extra }, or forgotten $.
\begin{center} on input line 55 ended by \end{tabular}.

All the errors refer precisely to the blank line just after \maketitle

2

The reason is that titling wants pairs \presomething{} … \postsomething{}: if one of them is here, the other must be too. I don't know if it's a bug or a feature. I managed to find a logo (not a vector logo, despite its .pdf extension), so I could compile:

\documentclass[10pt,a4paper]{book}
\usepackage[a4paper]{geometry}

\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage{titling}
%\usepackage{showframe}
\usepackage{graphicx}
\usepackage{listings, multicol, color, fancyhdr,lastpage}
\usepackage[font=small,format=plain,labelfont=bf,up,textfont=it,up]{caption}
\usepackage[hyperindex=true,colorlinks=true,breaklinks=true,linkcolor=blue]{hyperref}

\title{\huge\bsc{Des chiffres et des lettres}}
\author{Stéphane \bsc{22Decembre Guedon}}
\date{13 mai 2015}

% fonte
\renewcommand{\familydefault}{\sfdefault}
\pretitle{}

\posttitle{
   \newline
   %\vspace{1cm}
   \Large\emph{Protéger ses communications en ligne\\et autres aspects de sa vie numérique}\\
   \vspace{5mm}
   \LARGE\emph{GnuPG et OpenPGP pour tous}\\
    }

\preauthor{
    \vspace{5mm}
    \includegraphics[width=0.9\textwidth]{./images/logo-gnupg}\\
    \vspace{1cm}\\
    }

\postauthor{}
\predate{version 1 du }
\postdate{}

\begin{document}

\maketitle

\end{document} 

enter image description here

  • Do you have many others? :- o – Bernard Jun 24 '15 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.