-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
titlecase not used for related entries #22
Comments
We need to avoid using the redefined version of the macros that might come with dashed (not that big of an issue) or authoryear changes (print title instead of name).
Thank you very much for reporting this issue.
I will investigate the related issue of how exactly the title should be formatted when it replaces the author and will then released a fixed version. In the meantime here is a workaround \documentclass{article}
\usepackage[style=ext-authoryear]{biblatex}
\DeclareFieldFormat[article,incollection,inproceedings,inbook,unpublished]{titlecase:title}{\MakeSentenceCase*{#1}}
\newbibmacro*{plain:author}{%
\ifboolexpr{
test \ifuseauthor
and
not test {\ifnameundef{author}}
}
{\printnames{author}%
\iffieldundef{authortype}
{}
{\setunit{\printdelim{authortypedelim}}%
\usebibmacro{authorstrg}}}
{}}
\newbibmacro*{plain:editor}{%
\ifboolexpr{
test \ifuseeditor
and
not test {\ifnameundef{editor}}
}
{\printnames{editor}%
\setunit{\printdelim{editortypedelim}}%
\usebibmacro{editorstrg}%
\clearname{editor}}
{}}
\newbibmacro*{plain:editor+others}{%
\ifboolexpr{
test \ifuseeditor
and
not test {\ifnameundef{editor}}
}
{\printnames{editor}%
\setunit{\printdelim{editortypedelim}}%
\usebibmacro{editor+othersstrg}%
\clearname{editor}}
{}}
\newbibmacro*{plain:translator}{%
\ifboolexpr{
test \ifusetranslator
and
not test {\ifnameundef{translator}}
}
{\printnames{translator}%
\setunit{\printdelim{translatortypedelim}}%
\usebibmacro{translatorstrg}%
\clearname{translator}}
{}}
\newbibmacro*{plain:translator+others}{%
\ifboolexpr{
test \ifusetranslator
and
not test {\ifnameundef{translator}}
}
{\printnames{translator}%
\setunit{\printdelim{translatortypedelim}}%
\usebibmacro{translator+othersstrg}%
\clearname{translator}}
{}}
\makeatletter
\newbibmacro*{related:default}[1]{%
\entrydata*{#1}{%
\usedriver
{\DeclareNameAlias{sortname}{default}%
\ifnameundef{savedauthor}
{\ifnameundef{savededitor}
{}
{\ifnamesequal{editor}{savededitor}
{\clearname{editor}}
{}}}
{\ifnamesequal{author}{savedauthor}
{\clearname{author}}
{}}%
\letbibmacro*{author}{plain:author}%
\letbibmacro*{editor}{plain:editor}%
\letbibmacro*{editor+others}{plain:editor+others}%
\letbibmacro*{translator}{plain:translator}%
\letbibmacro*{translator+others}{plain:translator+others}%
\ifbibmacroundef{date+extradate}
{}
{\renewbibmacro*{date+extradate}{}%
\renewbibmacro*{bbx:ifmergeddate}{\@secondoftwo}}%
\renewbibmacro*{pageref}{}%
\renewbibmacro*{related:init}{}}
{\thefield{entrytype}}}}
\makeatother
\begin{filecontents}{\jobname.bib}
@unpublished{Peirce1880,
title = {A {Boolian} Algebra with One Constant},
author = {Peirce, Charles Sanders},
date = {1880},
annotation = {Unpublished, c. 1880},
howpublished = {Manuscript},
related = {Peirce1933a},
relatedtype = {editedas}
}
@book{Peirce1933,
title = {Collected Papers},
author = {Peirce, Charles Sanders},
editor = {Hartshorne, Charles and Weiss, Paul},
date = {1933},
volume = {4},
publisher = {Harvard University Press},
location = {Cambridge, M.A.},
}
@inbook{Peirce1933a,
title = {A {Boolian} Algebra with One Constant},
origdate = {1880},
crossref = {Peirce1933},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cite{Peirce1880}
\printbibliography
\end{document} |
Come to think of it, the same underlying issue also occurs with the standard styles, you just can't see it. I'm wondering if and how this could be fixed in standard |
Thanks! I can't really say I understand why the absence of an |
(I mean, it knows it's still a title since the quotation marks are there, so whatever bit of code puts the quotation marks around the title in the related entry should be changed from using |
Changed the fix to use the It may be another few days before I release a fixed version of |
The fix will be disabled for |
\documentclass{article}
\usepackage[style=ext-authoryear]{biblatex}
\DeclareFieldFormat[article,incollection,inproceedings,inbook,unpublished]{titlecase:title}{\MakeSentenceCase*{#1}}
\begin{filecontents}{\jobname.bib}
@unpublished{Peirce1880,
title = {A {Boolian} Algebra with One Constant},
author = {Peirce, Charles Sanders},
date = {1880},
annotation = {Unpublished, c. 1880},
howpublished = {Manuscript},
related = {Peirce1933a},
relatedtype = {editedas}
}
@book{Peirce1933,
title = {Collected Papers},
author = {Peirce, Charles Sanders},
editor = {Hartshorne, Charles and Weiss, Paul},
date = {1933},
volume = {4},
publisher = {Harvard University Press},
location = {Cambridge, M.A.},
}
@inbook{Peirce1933a,
title = {A {Boolian} Algebra with One Constant},
origdate = {1880},
crossref = {Peirce1933},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cite{Peirce1880}
\printbibliography
\end{document} gives the expected result with that version.
|
Describe the bug
Changing the casing of titles using the
titlecase:
mechanism doesn't work in the formatting ofrelated
entries. I haveto make titles of journal articles etc. sentence case, but the title of a
related
entry is still title cased.To Reproduce
Example attached.
test.zip
Expected behaviour
Title of original and related entry should both have sentence casing applied.
Output

Additional context
ext-authoryear.bbx 2021/04/22 v0.12b
The text was updated successfully, but these errors were encountered: