I'm making a custom Latex class which I am basing on the article class. When compiling a document I get ! LaTeX Error: No \title given., even though I use \title in the document.

How can I solve this problem?

  • 5
    We need to know your custom code for the class. Add a MWE and attach the .cls.
    – osjerick
    Dec 1, 2013 at 23:00
  • Do you, by any chance, use \maketitle before using \title in your document?
    – jub0bs
    Dec 1, 2013 at 23:15

1 Answer 1


The error means \@title hadn't been defined by the time \maketitle is used.

So either you haven't used \title or used it in a local group, or redefined it not to define \@title.

  • I use \@title in the class to define a header for my class: how should I get at that information in a better way?
    – ase
    Dec 2, 2013 at 12:24
  • @adamse hard to say as you have not shown any code. But you can't use a command before it has been defined... Dec 5, 2013 at 9:22
  • My solution: supply a command \makeheadfoot that creates the header.
    – ase
    Dec 23, 2013 at 12:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .