TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

A similar question has been already asked here, but has not been answered yet for fragile commands such as eg. \@author?

What would be the right way to get detect if \author has been called with a value:



    author set \par
    author not set at all \par
    or set to \{\} () \par
    or to {\textbackslash}empty

share|improve this question
What's your issue? Fragile commands are relevant for writing to files. – Marco Daniel Mar 29 '13 at 15:14
up vote 8 down vote accepted

\@author isn't typically a fragile command (It depends on the Author's name I suppose) However testing its value is not related to fragile/robust distinctions.

Initialise the macro, say


then later test if it still has that value

    still empty
     author has been set
share|improve this answer
I am trying to write a .sty file. Means the output is set outside my file. So if anyone comes up with the idea to use a set up like \autho{Name1 \and Name2} the conditional blows up. I would like to make it failsafe (as it can be)... – kromo Mar 29 '13 at 16:37
@kromo why would it "blow up"? did you try it? I assume not. – David Carlisle Mar 29 '13 at 16:48
Works now. Don't know where the error came from. Only backdraw, my nice \@latex@warning don't work anymore (mine and the ones from \@author). ;-) Thanks! – kromo Mar 29 '13 at 17:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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