1

In my .bib file I have two references under the same reference name (not the authors' name. I guess there should be a professional term for the reference name). When I call that name out of the .bib file I receive an error where \printbibliography is located. The two references are:

@article{lopez2011cavitation,
    title={Cavitation in elastomeric solids: I—A defect-growth theory},
    author={Lopez-Pamies, Oscar and Idiart, Martin I and Nakamura, Toshio},
    journal={Journal of the Mechanics and Physics of Solids},
    volume={59},
    number={8},
    pages={1464--1487},
    year={2011},
    publisher={Elsevier}
}

@article{lopez2011cavitation,
    title={Cavitation in elastomeric solids: II—Onset-of-cavitation surfaces for Neo-Hookean materials},
    author={Lopez-Pamies, Oscar and Nakamura, Toshio and Idiart, Mart{\'\i}n I},
    journal={Journal of the Mechanics and Physics of Solids},
    volume={59},
    number={8},
    pages={1488--1505},
    year={2011},
    publisher={Elsevier}
}

How can I cite these two references that can be differentialble in the text. Any suggestion is appreciated.

MWE

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=chicago-authordate,]{biblatex}
\addbibresource{TexStackExc.bib}
\begin{document}
    \renewcommand{\labelenumi}{\arabic{enumi}}
    \begin{enumerate}
        \item \cite{alopez2011cavitation}
        \item \cite{blopez2011cavitation}
    \end{enumerate} 
    \newpage
    \printbibliography  
\end{document}

And the content of TexStackExc.bib is

@article{alopez2011cavitation,
    title={Cavitation in elastomeric solids: I—A defect-growth theory},
    author={Lopez-Pamies, Oscar and Idiart, Martin I and Nakamura, Toshio},
    journal={Journal of the Mechanics and Physics of Solids},
    volume={59},
    number={8},
    pages={1464--1487},
    year={2011},
    publisher={Elsevier}
}

@article{blopez2011cavitation,
    title={Cavitation in elastomeric solids: II—Onset-of-cavitation surfaces for Neo-Hookean materials},
    author={Lopez-Pamies, Oscar and Nakamura, Toshio and Idiart, Martin I},
    journal={Journal of the Mechanics and Physics of Solids},
    volume={59},
    number={8},
    pages={1488--1505},
    year={2011},
    publisher={Elsevier}
}

Answer as an edit

The source of error was the author name, Mart{\'\i}n. I replaced {\'\i} with i and also deleted the temporary files and now it prints the bibliography with no error.

Reza
  • 319
  • 5
    You can't use the same key for two bib entries, change one of them. – Ulrike Fischer Dec 29 '17 at 17:54
  • I did. Then I receive this error at \printbibliography.

    'babel/polyglossia' detected but 'csquotes' missing.

    Plus I cannot cite any other key after these two in .bib file.

    – Reza Dec 29 '17 at 17:57
  • Didi you rerun biber after changing one of the keys? – Mico Dec 29 '17 at 17:58
  • 3
    It would help you would mentioned which error you get. A complete example would be a good idea too. – Ulrike Fischer Dec 29 '17 at 17:58
  • 1
    If I should guess: replace the \'\i with í in the bib-file. – Ulrike Fischer Dec 29 '17 at 18:04
  • The dash in I—A and II—Onset could also be problematic if your settings are not right. But Ulrike's guess about í is good. – moewe Dec 29 '17 at 18:09
  • I actually removed \'\i as well as the dash. But seems the problem is the keys. Because with the original names it well typesetes everything. Without printing the bibliography I receive no error. – Reza Dec 29 '17 at 18:13
  • The actual, underlying problem is very, very unlikely to be the key names. What you describe seems to suggest that the entries contain a character that is bad, and that character is only printed in the bibliography. If you removed the characters you need to delete the temporary files before you recompile. – moewe Dec 29 '17 at 18:18
  • 1
    All the evidence points to the í being problematic here. I can compile your second MWE without a problem, but if I add in Mart{\'\i}n again, I get the error Error: Unicode char ́ (U+301) – moewe Dec 29 '17 at 18:21
  • @moewe That is absolutely correct. Following your comment, I had to remove the temporary files. Now I proceed with no error. Thank you! – Reza Dec 29 '17 at 18:30
  • 1
    @UlrikeFischer Do you want to write an answer, or do we close this as a duplicate of https://tex.stackexchange.com/q/251261/35864? – moewe Dec 29 '17 at 18:33
  • If you use a key twice biber will complete ignore the second entry, so errors in this entry will not be visible. – Ulrike Fischer Dec 29 '17 at 18:35

1 Answers1

4

When you use a key twice (lopez2011cavitation in your example) biber will ignore the second entry. It writes a warning about this in the .blg-file:

  [252] Utils.pm:169> WARN - Duplicate entry key: 'lopez2011cavitation' in file 'test.bib', skipping ...

This means that errors in this entry are not visible.

When you change the key names to avoid the duplicate the second entry is used too and the \'\i leads to an known error, see e.g. Input encoding error after upgrading from Biber 1.9 to Biber 2.1, or https://tex.stackexchange.com/a/268579/2388 (they are more similar questions).

Ulrike Fischer
  • 327,261