TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

marked as duplicate by Peter Grill, Camil Staps, mafp, yo', Kurt Feb 22 '13 at 19:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 9 down vote accepted

You just need

\AtBeginDocument{Text}
share|improve this answer

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