4

I'm just beginning to learn how to use latex and I already ran into a little bind. I've been using the Latex Document wiki as my guide. The editor I'm writing the typesetting in is TeXworks. So here is my code:

\documentclass[11pt, a4paper]{report}
\begin{document}
\title{it's so hard out here}
\author{your main man}
\date
\maketitle
\begin{abstract}
i'll start that right here
\end{abstract}


now it is time to g et to typesetting effectively
\end{document}

Now the problem I'm having is that my title information is not showing up when I convert to a pdf. Did I do something wrong?

  • 1
    Welcome to TeX.SX! I delete the latex3 tag, as it has nothing to do with latex3 basically – user31729 Feb 14 '15 at 3:18
  • 2
    Your \date command is wrongly used. It eat's up \maketitle and nothing is shown from the title. – user31729 Feb 14 '15 at 3:21
  • 1
    @ChristianHupfer I do wonder what would happen though if \maketitle were inserted again. Would TeX run itself into the ground? It's just a raw \def, right? – Sean Allred Feb 14 '15 at 3:27
  • @SeanAllred: I've just checked... you're right. TeX capacity exceeded ;-) – user31729 Feb 14 '15 at 3:28
  • 1
    @ChristianHupfer Just tested – looks like it expands \@date before it does the relaxation (which makes sense): TeX capacity exceeded, sorry [grouping levels=255]. …Huh :-) – Sean Allred Feb 14 '15 at 3:30
5

\date needs an argument, i.e. a date, 'enclosed' with a {} pair. If this is not prevalent, \date uses the next token it can find, i.e. \maketitle in the OP's post. This is bad of course, as \date itself is not used as long \maketitle is not issued.

Principally, \date is not necessary at all if the current date is requested. (\maketitle uses \today then)

\documentclass[11pt, a4paper]{report}

\begin{document}
\title{it's so hard out here}
\author{your main man}
\date{1/1/2015}
\maketitle
\begin{abstract}
i'll start that right here
\end{abstract}


now it is time to get to typesetting effectively
\end{document}

enter image description here

  • Thanks for the reply, when I was reading the latex wiki it mentioned that if I live the \date blank that it would insert the current date automatically. How would that action occur? Or should I continue with the basics I'm learning? – dc3rd Feb 14 '15 at 6:09
  • 1
    @dc3rd: I think you misinterpreted that statement. blank refers to \date{}, not just \date without {} – user31729 Feb 14 '15 at 8:20
  • @dc3rd: Errors of beginners, as we all did once ;-) (And still do :-)) – user31729 Feb 15 '15 at 13:44

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.