0

I am using Zotero to manage my references. Then, I export the .bib file (Biblatex) from Zotero.

The issue is there is an empty parentheses if there is no author. Also, if it is a web-page citation, there is an empty parentheses after the author's name.

    @online{shotts_learning_nodate,
    title = {Learning the shell - Lesson 1: What is the shell?},
    url = {https://linuxcommand.org/lc3_lts0010.php},
    author = {Shotts, William},
    urldate = {2020-12-14},}

The .bib code above results in an empty parentheses after the author's name.

@online{noauthor_what_nodate,
    title = {What is Linux?},
    url = {https://www.linux.com/what-is-linux/},
    titleaddon = {Linux.com},
    urldate = {2021-01-20},
    langid = {american},}

The .bib code above results in an empty parentheses, if there is no author.

Here is my LateX code

\documentclass[12pt,a4paper]{report}
\begin{document}
\usepackage[style=ieee]{biblatex}
\addbibresource{Exported_Items.bib}
\printbibliography[title={REFERENCES}]
\include{Chapter1}
\include{Chapter2}
\end{document}

The result is:

 [1] (). “What is linux?” Linux.com, [Online].
 Available:https://www.linux.com/what-is-linux/(visited on 01/20/2021).
 [2] W. Shotts. (). “Learning the shell - lesson 1: What is the shell?”
 [Online]. Available:https://linuxcommand.org/lc3_lts0010.php(visited
 on 12/14/2020).

Thank You.

Grabinuo
  • 101
  • See also https://tex.stackexchange.com/q/151217/35864 and to a lesser extent https://tex.stackexchange.com/q/328128/35864 – moewe Jan 22 '21 at 06:34

2 Answers2

0

First solution. Use the year field. For example:

@online{shotts_learning_nodate,
  title = {Learning the shell - Lesson 1: What is the shell?},
  url = {https://linuxcommand.org/lc3_lts0010.php},
  author = {Shotts, William},
  year = {2020},
  urldate = {2020-12-14},}

Second solution. Modify the @online driver so that if year is empty nothing is printed:

\begin{filecontents*}[overwrite]{Exported_Items.bib}
  @online{shotts_learning_nodate,
  title = {Learning the shell - Lesson 1: What is the shell?},
  url = {https://linuxcommand.org/lc3_lts0010.php},
  author = {Shotts, William},
  urldate = {2020-12-14},}

@online{noauthor_what_nodate, title = {What is Linux?}, url = {https://www.linux.com/what-is-linux/}, titleaddon = {Linux.com}, langid = {american},} \end{filecontents*}

\documentclass[12pt,a4paper]{report} \usepackage[style=ieee]{biblatex} \addbibresource{Exported_Items.bib}

\usepackage{xpatch} \xpatchbibdriver{online} {\printtext[parens]{\usebibmacro{date}}} {\iffieldundef{year}{}{\printtext[parens]{\usebibmacro{date}}}} {}{}

\begin{document} \cite{shotts_learning_nodate} \cite{noauthor_what_nodate} \printbibliography[title={REFERENCES}] \end{document}

Explanation. The driver @online (defined in ieee.bbx) uses this code to print the date field:

\DeclareBibliographyDriver{online}{%
...
  \printtext[parens]{\usebibmacro{date}}%
...
}

Consequently, if no date is declared, the macro above prints two parentheses without content (\printtext[parens]{...}).

Ivan
  • 4,368
0

For me the issue was solved by exporting the references from Zotero as Bibtex. Also, I kept Biblatex as the reference manager in Latex.

Grabinuo
  • 101