notes.kagcc

biblatex で publisher を本文で使う

結論から言うと,biber もキャッシュも使っている style も関係なくて,単に publisher は list なので,isbn とかと違って \citelist を使わないとダメというだけだった.

\citefield{key}{publisher} だとこんな感じになる:

citefield publisher はうまくいかない

publisher がそのまま表示される

biblatex の警告が以下

Package biblatex Warning: 'publisher' undefined or not a field
(biblatex)                at entry 'exampleBook' on input line 10.

セットアップはこの通り

% test.tex
\documentclass{article}
\usepackage[style=numeric-comp, backend=biber]{biblatex}
\bibliography{test}

\begin{document}

This is an inline numeric citation \cite{exampleBook}.

I want to cite its publisher: \citefield{exampleBook}{publisher}.

You will correctly use citelist: \citelist{exampleBook}{publisher}.

I can cite the ISBN: \citefield{exampleBook}{isbn}.

\printbibliography

\end{document}
# test.bib
@book{exampleBook,
	author = {Doe, John},
	title = {title of the book},
	publisher = {The Good Publisher},
	year = {2024},
	isbn = {123-4567890}
}
#!/usr/bin/env perl
# .latexmkrc
$pdflatex = "lualatex %O %S";
$pdf_mode = 1;
$dvi_mode = $postscript_mode = 0;

本当にかなり回り道をして,tex.stackexchange で尋ねねばと覚悟を決めてまとめたところで上記を悟り,解決して,すると突然これまで全く見つからなかった回答が発見される,という,あるある,という状況でした.めちゃくちゃ疲れた.

tags: