0

I want to use the name of an author from my sources in the plain text as small capitals. Can I achieve this by referencing to the bibtex or do I have to stick with the "hard coded" name.

This is what I want:

As EINSTEIN wrote in his source bla blub. [EIN04]

This is what I do:

As \textsc{Einstein} wrote in his source bla blub.\cite{Einstein1904}

This is what I somehow want to do:

As \somecommand{Einstein1904} wrote in his source bla blub. \cite{Einstein1904}

Does anybody know if there is a way to achieve this?

1
  • 2
    Welcome to TeX.SE. Please tell us whether you use bibtex or biblatex/Biber to create the formatted bibliography. If you use bibtex, please also reveal which bibliography style you employ, and whether you use a citation management package such as natbib.
    – Mico
    Nov 6 '19 at 13:39
1

In case you use biblatex this MWE should demonstrate how to access the author's name from the bibliography:

\documentclass{article}

\begin{filecontents}[overwrite]{my.bib}
@article{einstein1905,
    author =       {Einstein, Albert},
    title =        {Zur Elektrodynamik bewegter Körper},
    journal =      {Annalen der Physik},
    volume =       {322},
    number =       {10},
    year =         {1905},
}

@article{zweiDreistein2019,
    author =       {Zweistein, Anton and Dreistein, Berta},
    title =        {Neuste Erkenntnisse},
    journal =      {Annalen der Astrologie},
    volume =       {1},
    number =       {1},
    year =         {2019},
}
\end{filecontents}

\usepackage{biblatex}
\addbibresource{my.bib}

\begin{document}
\citename{einstein1905}{author} said: \ldots

\citename{zweiDreistein2019}{author} said: \ldots

\citeauthor{einstein1905} said: \ldots

\citeauthor{zweiDreistein2019} said: \ldots

Name in small caps:

\newcommand{\albertEinstein}{\textsc{\citename{einstein1905}{author}}}
\albertEinstein{} said: \ldots

\newcommand{\einstein}{\textsc{\citeauthor{einstein1905}}}
\einstein{} said: \ldots
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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