1

The following MWE produces a bibliography entry as shown in the image below:

\documentclass{scrartcl}
\usepackage{xeCJK}
\usepackage[style=authoryear-ibid]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{literature.bib}
@book{qingshi1998,
    date = {1998},
    title = {Qingshi gao},
    titleaddon = {清史稿},
    location = {Beijing},
    publisher = {Zhonghua}
}
\end{filecontents}
\bibliography{literature}
\begin{document}
\nocite{*}
\printbibliography
\end{document}

enter image description here

The year is printed after the title and before the title addon. The problem here seems to be that there is no author specified: when I add a fictitious author, the date is correctly printed after the author and before the title.

According to the biblatex manual, an author is required for book type entries. However, I tried other entry types that don’t require an author and obtained the same result.

How can I keep the title and title addon in separate data fields, omit the author, but still have the year printed after the title addon?

2
  • 2
    Please make a short, but compilable test document. Aug 28, 2023 at 10:46
  • @samcarter_is_at_topanswers.xyz Done, thank you
    – Philipp
    Aug 30, 2023 at 9:09

1 Answer 1

1

If the field author (or any other field defined as label) is empty, the standard styles of biblatex use another field as label in the bibliography. In case of the authoryear style its shorttitle or, if that is empty too, simply title.

If you redefine the macro in a way that it uses title and titleaddon, you get the wanted result. As delimiter I chose a dot, but you can adjust it with biblatexs delimiter commands. I don't know if you use the shorttitle field. If not, it's OK this way. If you use it, but don't want it to get printed as label, you have to edit the particular condition.

Here your adapted MWE:

\documentclass{scrartcl}
\usepackage{xeCJK}
\usepackage[style=authoryear-ibid]{biblatex}

\begin{filecontents*}[overwrite]{literature.bib}
@book{qingshi1998,
    date = {1998},
    title = {Qingshi gao},
    titleaddon = {清史稿},
    location = {Beijing},
    publisher = {Zhonghua}
}

@book{qingshi1999,
    date = {1999},
    title = {Qingshi gao},
    shorttitle = {Gao},
    titleaddon = {清史稿},
    location = {Beijing},
    publisher = {Zhonghua}
}
\end{filecontents*}
\bibliography{literature}
\renewbibmacro*{labeltitle}{%
  \iffieldundef{label}
    {\iffieldundef{shorttitle}
       {\iffieldundef{titleaddon}{%
            \printfield{title}%
            \clearfield{title}%
            }{%
            \printfield{title}\addperiod\space\printfield[title]{titleaddon}%
            \clearfield{title}\clearfield{titleaddon}}
        }
       {\printfield[title]{shorttitle}
        }}
    {\printfield{label}}}
%\DeclareFieldFormat{title}{#1} Uncomment if you want title NOT in italics
\begin{document}
\nocite{*}
\printbibliography
\end{document}

There are more possibilities to adapt the use of fields as label for your bibliography. E.g. for other entrtypes etc. For the one you posted this solution works fine. If you need something more sophisticated, you can refine your question.

Edit: I updated the code a little bit. Now, it shows your regular example and one with a shorttitle (which, in this case, produces no sense in Chinese, I guess; apologise for that). Also, if the titleaddon is used as part of the label, it now is formatted the same way as title to keep it coherent. You could turn of emphasised titles by redefining it via \DeclareFieldFormat. To test it, just uncomment the particular command at the bottom of the praeambel and look how the Chinese font also changes its shape.

6
  • 2
    Usually punctuation commands like \adddot\addspace should not appear outside a \setunit or similar command in a bibmacro. Otherwise we bypass the punctuation buffer and may cause unwanted punctuation (though biblatex has other emergency features to prevent double punctuation, so the issue might not always present itself clearly). Also \adddot adds a dot, which (at least in biblatex speak) signifies the end of an abbreviation. ...
    – moewe
    Aug 30, 2023 at 15:32
  • 2
    ... Usually one would use \addperiod for a period/full stop. (The usual idiom is \addperiod\space, since the clean-up of \addspace is not needed after another \add....)
    – moewe
    Aug 30, 2023 at 15:32
  • 2
    The is a missing % after \iffieldundef{titleaddon}{, which would cause undesirable space if biblatex did not counter it. Still, it's better to add the space than to rely on secondary biblatex features. (Like with bare punctuation.)
    – moewe
    Aug 30, 2023 at 15:33
  • Added your edits. Thanks @moewe, again something learned ;). Biblatex has so many minor commands, sometimes you get lost...
    – lukeflo
    Aug 30, 2023 at 15:53
  • Thank you for your answer. I haven’t had time to check it out but will do and accept if it works.
    – Philipp
    Sep 1, 2023 at 6:10

You must log in to answer this question.

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