3

So, my code is giving me this error and I can't find the reason for it. Below this line there are the lines from 241 to 259. In the log file, it says that the error is located on the line 252. It says:

/base-referencias.bib, line 252;
@Misc{condicoescontorno, (Error may have been on previous line)

@Manual{abnt3164,
  title        = {{ABNT NBR NM-ISO} 3164},
  organization = {Associa{\c c}\~ao Brasileira de Normas T\'ecnicas},
  year         = {2001},
  location     = {Rio de Janeiro},
  org-short    = {ABNT 3164},
  pages        = {5},
  subtitle     = {{M\'{a}quinas rodovi\'{a}rias -- Avalia{\c c}\~oes de laborat\'orio de estruturas protetoras -- Especifica{\c c}\~oes para o volume de deflex\~ao-limita{\c c}\~ao},
  timestamp    = {2016.01.16},
}

@Misc{condicoescontorno,
  author        = {Vitor T. Endo},
  title         = {Condi{\c c}\~oes de Contorno Essenciais e Naturais: parte II},
  year          = {2013},
  timestamp     = {2013.08.21},
  url           = {https://eaiconvergiu.wordpress.com/2013/08/21/condicoes-de-contorno-essenciais-e-naturais-parte-ii/},
  urlaccessdate = {30 de novembro de 2017},
}

Thank you!

siracusa
  • 13,411

1 Answers1

5

The immediate source of the problem is that the subtitle field of the abnt3164 entry isn't being terminated with two } symbols.

In addition, you can help assure that your code is (BibTeX-)bullet proof by writing {\'e} instead of \'e, {\'a} instead of \'{a}, {\~o} instead of \~o, and {\~a} instead of \~a. (Interestingly, your code already features {\c c}.) By placing the LaTeX code that generates the accented characters inside curly braces, one creates what's known as "brace groups" in BibTeX jargon; this greatly improves the odds that BibTeX will process the code correctly. Using brace groups can matter a lot for author and editor fields; however, it's also good practice for accented characters in all other fields. For more information on this topic, see the posting How to write “ä” and other umlauts and accented letters in bibliography? [Shameless self-citation alert!]

The following code uses the unsrtnat bibliography style; you're obviously free to choose a different bib style. Because the unsrtnat style doesn't recognize a field called subtitle, I had to merge the title and subtitle fields of the abnt3164 entry for the sake of this example. I also placed the title field of the condicoescontorno entry in a brace group, to prevent BibTeX from lowercasing its contents.

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{base-referencias.bib}
@Manual{abnt3164,
  title      = {{ABNT NBR NM-ISO} 3164. 
                {M{\'a}quinas rodovi{\'a}rias -- Avalia{\c c}{\~o}es de laborat{\'o}rio 
                de estruturas protetoras -- Especifica{\c c}{\~o}es para o volume de 
                deflex{\~a}o-limita{\c c}{\~a}o}},
  author     = {Associa{\c c}{\~a}o Brasileira de Normas T{\'e}cnicas},
  year       = {2001},
  address    = {Rio de Janeiro},
  org-short  = {ABNT 3164},
  pages      = {5},
  timestamp  = {2016.01.16},
}
@Misc{condicoescontorno,
  author     = {Vitor T. Endo},
  title      = {{Condi{\c c}{\~o}es de Contorno Essenciais e Naturais: parte II}},
  year       = {2013},
  timestamp  = {2013.08.21},
  url        = {https://eaiconvergiu.wordpress.com/2013/08/21/condicoes-de-contorno-essenciais-e-naturais-parte-ii/},
  urlaccessdate = {30 de novembro de 2017},
}
\end{filecontents}

\documentclass{article}
\usepackage[brazilian]{babel}% optional
\usepackage[hyphens]{xurl}   % for flexible line-break options in URL strings
\usepackage[numbers]{natbib}
\bibliographystyle{unsrtnat} % or some other suitable style

\begin{document}
\nocite{*}
\bibliography{base-referencias}
\end{document}
Mico
  • 506,678
  • 1
    Another comment about the code: If your TeX distribution isn't up to date, it may not contain the xurl package. If that's the case, load the url package. – Mico Oct 24 '18 at 05:15