# Display text on begin document [duplicate]

This question already has an answer here:

I'm developing my own documentclass. How can I make some text appear on the beginning of each document with this class?

For now I'm working with this in the class:

\newcommand{\showAtBegin}{Text}


And in each document...

\begin{document}
\showAtBegin


But there has to be a neat way.

-

## marked as duplicate by Peter Grill, Camil Staps, mafp, tohecz, KurtFeb 22 at 19:14

\AtBeginDocument{Text}