Update:
I decided to use Daniel's simple solution:
\newcommand\Einstein{Albert Einstein (1879-1955)\xdef\Einstein{Einstein}}
With this, the first use of \Einstein prints the full name with birthdates and all following uses of \Einstein print only his surname.
Now wanted to ask if there is a simple way to improve the command so that at every new chapter, the command jumps back to the default of printing the full name with birthdates at first use in that new chapter.
any simple ideas? I could do that, by invoking a \renewcommand at the beginning of the chapter, but, amybe there are smarter ways.
A few days ago I had an idea for a \newcommand which -- in my eyes -- would be kind of cool to have.
Imagine you wanted to write a lengthy text. In this text you mention a bunch of names of historical figures. Some of these figure reoccur at different parts of your text.
Imagine further that you want to provide their dates of birth and death -- but of course you do not want to provide them every time you mention them but only once, i.e., when you mention that name either (a) for the first time in your entire document or (b) for the first time in that part/chapter/section (should your text be book-length and contain several chapters)
For example you want to write in your *.tex-file:
This was one of the most important achievements by \Einstein -- in fact,
what \Einstein achieved is one of the most important achievements in the
science of physics as such.
The Output should be like:
This was one of the most important achievements by Albert Einstein (1879-1955) – in fact, what [Albert] Einstein achieved is one of the most important achievements in the science of physics as such.
Maybe you even want to omit Einstein's forename in the second occurrence, too -- this is what the [brackets] illustrate.
So, does anyone have an idea how such a command could be designed so that the date is printed only once at the first occurrence in the entire document (i.e., the case of (a) as mentioned above)? Maybe this command could even be tweak so that it also provides the option to print the dates of birth and death at the first occurrence in every part or chapter or section (i.e., the case of (b) as mentioned above)?
glossariespackage (especially acronyms) or similar packages. – Qrrbrbirlbel Nov 20 '13 at 09:14nameauth, it offers a lot of options. – DG' Nov 20 '13 at 10:09\newcommand\Einstein{Albert Einstein (1879-1955)\xdef\Einstein{Einstein}}would be such a macro that redefines itself on the first expansion. Of course a lot of sugar could be added around this mechanism to make it more accessible. – Daniel Nov 20 '13 at 13:20partorchapterorsection, right? – ClintEastwood Nov 20 '13 at 15:40acronympackage and then do a\preto{\part}{\acresetall}(\pretois from theetoolboxpackage) to have all acronyms reset at every part. There might be other packages that are even better suited. – Daniel Nov 20 '13 at 16:01\newcommandand would like to avoid using a whole package. Your solution is already almost what I was looking for as it gives an easy solution for what I described under (a). The further question about (b) would be a gimmick nice to have. If this could be easily implemented through a minor modification of your solution, it would be the perfect answer to my query. – ClintEastwood Nov 21 '13 at 10:24