1

Suppose that I have a .bib file as follows

@book{latexcompanion,
    author    = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
    title     = "The \LaTeX\ Companion",
    year      = "1993",
    publisher = "Addison-Wesley",
    address   = "Reading, Massachusetts",
}

Can I write something like

A well-known {\LaTeX} book~\cite{latexcompanion}
is published by \bibfield{latexcompanion}{publisher}.

where the hypothetical bibfield macro would insert the publisher field of the latexcompanion entry ("Addison-Wesley" in this case)?

1

1 Answer 1

5

The biblatex packages has low-level commands that offer this functionality (see Section 3.8.7 of the manual). I want to try giving a general solution, especially for the publisher field you need to use.

Find out the data type of the needed field

In Section 2.2.2 of the biblatex manual, there is a list of pre-defined data fields and their respective type. From the list, we see that publisher is a list.

Use the corresponding low level cite command for the data type

Since publisher is a list, we use the corresponding \citelist command. (For example, for date we would use \citefield, since it is a field.)

Our code building on your MWE becomes:

\documentclass{article}
\usepackage{biblatex}
\begin{document}
     \citelist{latexcompanion}{publisher}
\end{document}
2
  • Thanks! How can I cite custom fields with this? If I add a field chaptercount to the .bib, I get 'chaptercount' undefined or not a field when I use \citefield. Commented Jan 13, 2017 at 8:52
  • This worked for me for custom fields: tex.stackexchange.com/a/111851/16069 Commented Jan 13, 2017 at 10:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .