I'm trying to create an automatic chapter head which displays the day of the week and date (kind of like a diary entry) I have a directory called "august" within which is a file called 01.tex. The parent file 08.tex (08 for August) calls for 01.tex. see my WME

main file 08.tex:







The errors I get:

./08/1.tex:1: Use of \@chapter doesn't match its definition. [\chapter{\lauddate}] ./08/1.tex:1: Argument of \@gobbletwo has an extra }. [\chapter{\lauddate}] ./08/1.tex:1: Paragraph ended before \@gobbletwo was complete. [\chapter{\lauddate}]

  • Use \DeclareRobustCommand instead \newcommad.
    – wipet
    Commented Aug 7, 2014 at 3:04
  • In my point of view this question needs more explanation
    – user31729
    Commented Aug 7, 2014 at 6:12
  • Thank you wipet, that works. Sorry for my ignorance but is this okay to do... is it a good practice or am I using duct tape on sloppy way of doing things (if you see what I mean)
    – theobear
    Commented Aug 7, 2014 at 16:06
  • @theobear This is a practice in LaTeX: usage of \DeclareRobustCommand for macros which are used in titles of chapters, sections. For normal macros, the \newcommand is sufficient. LaTeX isn't my business; you can read more about this in LaTeX manuals.
    – wipet
    Commented Aug 13, 2014 at 6:32
  • @wipet Want to write up an answer?
    – Johannes_B
    Commented Nov 9, 2014 at 16:39


You must log in to answer this question.

Browse other questions tagged .