1

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?

2

If you use entrysubtype = {newspaper} for those @articles 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 @articles.

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
    @helt In the preamble after biblatex has been loaded. – moewe Jun 22 '18 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.