7

Can I revise the following bibtex entry to avoid duplicating the author's name, without defining a @string?

@misc{key,
    author = "Joe Blogs",
    title = "Title",
    year = "2014",
    note = "Joe Blogs ...."
}

I know I can do the following:

@string { Blogs = "Joe Blogs" } 

@misc{key,
    author = Blogs,
    title = "Title",
    year = "2014",
    note = Blogs # " ...."
}

But this seems like overkill, because I have to define Blogs using @string.

Given that I have already defined "Joe Blogs" as the author field of "key", can I somehow reference the existing value?

UPDATE. I'm looking for 'standard' solutions, i.e., solutions which work with the bibtex tool, so LaTeX solutions are interesting, but no use to me. (I'm not actually using the bibtex tool, I'm using a PHP bibtex parser. But this is largely irrelevant for the purposes of this question, since the PHP bibtex parser I'm using is designed to the same specification as the bibtex tool.)

Answer. The answer appears to be no: bibtex fields cannot be referenced like variables.

  • 1
    Not with BibTeX, but maybe with biblatex. – Werner Jul 16 '14 at 18:57
  • In general, no; but maybe CrossTeX will be of interest to you. (Note: last update on seems to be from 2008.) – jon Jul 16 '14 at 19:05
  • I'm using the bibtex file in combination with [monperrus.net/martin/bibtexbrowser/], so I don't have the option to use biblatex nor CrossTeX. – user2768 Jul 16 '14 at 19:25
  • @user2768: So what is the output of BibTeXBrowser? A .bib or a .bbl? It seems like the output is a .bib. If that's the case, why can't you use biblatex? – Werner Jul 16 '14 at 20:37
  • @Werner, bibtexbrowser inputs a bib file and spits out HTML, e.g., astro.gla.ac.uk/?page_id=865 – user2768 Jul 17 '14 at 18:45
6

Not with BibTeX alone.

If you're using biblatex you can:

enter image description here

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@BOOK{A1,
   author = {Author One},
   title = {Alpha},
   publisher = {Publisher A},
   year = {2000},
   }

@BOOK{B2,
   author = {Author Two},
   title = {Beta},
   publisher = {Publisher B},
   year = {2001},
   }
\end{filecontents*}

\usepackage{biblatex}

\DeclareCiteCommand{\citeAuthor}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\usebibmacro{author}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\addbibresource{\jobname}
\begin{document}

Author of \cite{A1} is \citeauthor{A1} (\citeAuthor{A1}) in \citeyear{A1}.
Author of \cite{B2} is \citeauthor{B2} (\citeAuthor{B2}) in \citeyear{B2}.

\printbibliography

\end{document}
  • I'm sure this solution works, but I was looking for a "pure" bibtex solution. – user2768 Jul 17 '14 at 18:50

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.