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
allnocited or new nocitedstar? #319
Comments
A related issue I just noticed is that the order of \documentclass{article}
\usepackage[backend=biber, style=authoryear]{biblatex}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\perdatasource{\jobname-resource1.bib}
\step[nocited=true, final]
\step[entrynull]
}
}
}
\begin{filecontents*}[force]{\jobname-resource1.bib}
@article{A2014,
author = {First Author},
journal = {Journal A},
title = {First Paper},
note = {should appear in bib, because it was cited},
year = {2014}
}
@article{D2014,
author = {First Author},
journal = {Journal A},
title = {First Paper},
note = {should not be seen in bib},
year = {2014}
}
\end{filecontents*}
\begin{filecontents*}[force]{\jobname-resource2.bib}
@article{B2014,
author = {Another Author},
journal = {Journal B},
title = {Second Paper},
note = {should appear in bib, b/c it is in \jobname-resource2 and nocite was issued},
year = {2014}
}
@article{C2014,
author = {Next Author},
journal = {Journal C},
title = {Third Paper},
note = {should appear in bib, b/c it is in \jobname-resource2 and nocite was issued},
year = {2014}
}
\end{filecontents*}
\addbibresource{\jobname-resource1.bib}
\addbibresource{\jobname-resource2.bib}
\begin{document}
\nocite{*}
This is a citation \cite{A2014}
%\nocite{*}
\printbibliography
\end{document} with \begin{document}
%\nocite{*}
This is a citation \cite{A2014}
\nocite{*}
\printbibliography
\end{document} |
I've added the map verb |
But there is still the issue of order dependency. \documentclass{article}
\usepackage[backend=biber, style=authoryear]{biblatex}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[nocited=true, final]
\step[entrynull]
}
}
}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem \autocite{sigfridsson}
\nocite{*}
\printbibliography
\end{document} and \documentclass{article}
\usepackage[backend=biber, style=authoryear]{biblatex}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[nocited=true, final]
\step[entrynull]
}
}
}
\addbibresource{biblatex-examples.bib}
\begin{document}
\nocite{*}
Lorem \autocite{sigfridsson}
\printbibliography
\end{document} A similar effect can be observed with |
Well spotted - this was a bug - it was an assumption from a long time ago before the extra logic was put in for the cite/nocite sourcemaps. Hopefully fixed in DEV |
All tests seem to be working well now. Thank you. There are a few real-world use cases I want to check out, so I'll get back to you if there is an issue with one of those. |
I'd like to apply write a sourcemap that
entrynull
s an entry only if it was only cited via\nocite{*}
. In particular I don't want to null entries cited via an explicit\cite{<key>}
or via\nocite{<key>}
.First I thought that
allnocited
would do that, since it is documented as applying to entries included via\nocite{*}
. (What I actually want is something that applies to entries included solely because of\nocite{*}
.) Butallnocited
applies to all entries as soon as\nocite{*}
is used. (Soallnocited
only detects if the user had\nocite{*}
in their document? Is that right?)With
nocited
I can almost get there, but this filter also applies to entries that were explicitly\nocite
'd with\nocite{<key>}
.The desired result should show
I.e. would only skip
misc3
, which appears in the bibliography only because of\nocite{*}
and not for any other reason.I guess I'd need a
nocitedstar
that only applies to entries that were added solely because of\nocite{*}
i.e. is false if an entry was\cited
or explicitly\nocite
'd with\nocite{<key>}
.The text was updated successfully, but these errors were encountered: