5

In some academic circles, such as theoretical physics, during a presentation it is customary for the talking author to cite himself using only his initials, while leaving the remaining author names unchanged as per the citation style.

For instance, if my initials are DCG and I cite a paper that has me as an author, it should show up as:

[Lima, DCG, Horvath, 2010]

Is there any way to make this automatic in LaTeX? I use powerdot for presentations and natbib for references, and I have found nothing of the sort in their documentations. Maybe there is a way to replace the strings generated by BibTeX in the second LaTeX run, but I have no idea how to do it.

diabonas
  • 25,784
  • 1
    The easiest method is to modify the .bbl file when the presentation is complete and the .bbl file is in its definitive form. Otherwise it would be necessary to act on the .bib file. – egreg Feb 11 '12 at 15:06
  • Yes, that would work, but I would like a more automatic method, such as a command to be introduced somewhere in the source code, so I don't have to worry about it later. – Sir Whiteout Feb 11 '12 at 15:38
  • 3
    This should easily be done with biblatex, which is easier to customize due to its use of LaTeX macros rather than the awkward bibtex language. – Timothée Poisot Feb 11 '12 at 16:17
  • Some Biblatex solutions: http://tex.stackexchange.com/q/22135/10119, and I am sure it can be done with biber too… I just can't find the question where this was implemented. – ienissei Apr 15 '12 at 07:03

1 Answers1

7

In relation to the comments I want to provide an approach using biblatex.

First of all I changed the definition of the output of authors and replace the name stored in \highlightname with the initials saved in the macro \shortform.

The main idea is inspired by P. Lehmann.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{test1,
  author          = {Goossens, Michel and Mittelbach, Frank
                     and Samarin, Alexander},
  title           = {The LaTeX Companion},
  publisher       = {Addison-Wesley},
  location        = {Reading, Mass.},
  year            = {1994},

}

@Book{test2,
  author          = {Mittelbach, Frank and Goossens, Michel
                     and Samarin, Alexander},
  title           = {The LaTeX Companion},
  publisher       = {Addison-Wesley},
  location        = {Reading, Mass.},
  year            = {1994},

}

@Book{test3,
  author          = {Mittelbach, Frank and Samarin, Alexander
                     and Goossens, Michel},
  title           = {The LaTeX Companion},
  publisher       = {Addison-Wesley},
  location        = {Reading, Mass.},
  year            = {1994},
} 
\end{filecontents}
\usepackage[style=authoryear,minnames=8,maxnames=10]{biblatex}

\addbibresource{\jobname.bib}
\newcommand*{\mknamesignature}[5]{\def#1{#2|#3|#4|#5}}
\mknamesignature{\highlightname}{Goossens}{Michel}{}{}
\def\shortform{MG}
\makeatletter
\DeclareNameFormat{labelname}{%
  \begingroup
  \mknamesignature{\currentsignature}{#1}{#3}{#5}{#7}%
  \ifdefequal{\highlightname}{\currentsignature}%
    {\let\mkbibnamefirst=\@gobble%
     \def\mkbibnamelast{\shortform\@gobble}%
     \let\mkbibnameprefix=\@gobble%
     \let\mkbibnameaffix=\@gobble}%
    {}%
  \ifnum\value{listcount}=1\relax
    \usebibmacro{name:last-first}{#1}{#3}{#5}{#7}%
    \ifblank{#3#5}
      {}
      {\usebibmacro{name:revsdelim}}%
  \else
    \usebibmacro{name:first-last}{#1}{#3}{#5}{#7}%
  \fi
  % Ende der Gruppe
  \endgroup
  \usebibmacro{name:andothers}}
\makeatother
\begin{document}
Test

\cite{test1}

\cite{test2}

\cite{test3}

\printbibliography
\end{document}

enter image description here

EDIT 1: Fixed spacing problem

Marco Daniel
  • 95,681