I am using Zotero + Better BibTex and using the biblatex package to generate a bibliography in APA citation style. I want to exclude url and urldate from academic journal @articles but retain them for newspaper @articles. I have been successful in suppressing urls from ALL articles using the code found here, but I do not see how to add entrysubtype fields to items in Zotero so that I can exclude urls from academic articles alone. Is there a way to enter entrysubtype in Zotero, or is there some other LaTex hack I can use based on an existing @article field?
If you use entrysubtype = {newspaper}
for those @article
s from a newspaper,
@article{frie2002,
author = {Jonathan Friedland},
title = {Across the Divide},
journal = {Guardian},
pages = {10-11},
date = {2002-01-15},
entrysubtype = {newspaper},
url = {https://www.theguardian.com/uk},
urldate = {2016-09-16},
}
you only need
\AtEveryBibitem{%
\ifboolexpr{test {\ifentrytype{article}} and not test {\iffieldequalstr{entrysubtype}{newspaper}}}
{\clearfield{url}%
\clearfield{urlyear}}
{}%
}
to delete the url
and urldate
for non-newspaper @article
s.
biblatex-apa
, however, also has a @newsarticle
entry type
@newsarticle{frie2002,
author = {Jonathan Friedland},
title = {Across the Divide},
newspaper = {Guardian},
pages = {10-11},
date = {2002-01-15},
url = {https://www.theguardian.com/uk},
urldate = {2016-09-16},
}
in which case you want
\AtEveryBibitem{%
\ifentrytype{newsarticle}
{\clearfield{url}%
\clearfield{urlyear}}
{}%
}
-
Where exactly has the
\AtEveryBibitem
stuff to be included? in the tex file I suppose, but where exactly? in the preamble? Before\addbibresource
, after it? somewhere else? – helt Jun 22 '18 at 11:20 -
1
entrysubtype
field and you use that in your code. github.com/retorquere/zotero-better-bibtex/issues/531 mentions the field, but github.com/andersjohansson/zotero-biblatex-translator/wiki/… seems a bit more pessimistic. You need a way to distinguish normal articles from newspaper ones andentrysubtype
is conceptually the best, if Zotero does not support that currently, maybe ask them nicely. – moewe Sep 16 '16 at 8:04