[Tex/LaTex] The bbl file is not generated and still malformed file bcf even if I still use \addbibresource{file.bib} in XeLaTeX

abntbiblatexxetex

I have already tried by middle of the following questions:

I use:

  • Manjaro Linux
  • XeTeX 3.14
  • Biber 2.12
  • Class abnetx2
  • Package biblatex-abnt

The version of bibtex: BibTeX 0.99d (TeX Live 2018/Arch Linux)

I ran like:

xelatex -synctex=1 -halt-on-error --shell-escape artigo.tex
biber artigo.tex

I also tried to run biber referencias.

It did not generate the bbl file.

Here is the code:

\documentclass[11pt, article, a4paper, oneside, sumario=tradicional, chapter=TITLE, section=TITLE, subsection=Title, subsubsection=title, subsubsubsection=title, english, german, greek, portuguese]{abntex2}

\usepackage{babel}
\usepackage[backend = biber, dateabbrev = false, giveninits, ittitles, justify, language = brazil, sorting = none, style = abnt, url = true]{biblatex}

\addbibresource{referencias.bib}

\begin{filecontents}{referencias.bib}
@article{antonioleitao,
    Address = {Campinas},
    author = {Antonio Leitão},
    date = {1996-10-08},
    Publisher = {UNICAMP},
    title = {Funções Recursivas},
    url = {http://www.dca.fee.unicamp.br/courses/EA072/lisp9596/node17.html},
    urldate = {2018-11-03}
}
\end{filecontents}


\begin{document}
\selectlanguage{brazil}
\frenchspacing 
\maketitle
\begin{resumoumacoluna}
 \vspace{\onelineskip}
   Blablabla
 \noindent
 \textbf{Palavras-chave}:
\end{resumoumacoluna}

\renewcommand{\resumoname}{Abstract}
\begin{resumoumacoluna}
 \begin{otherlanguage*}{english}
   \vspace{\onelineskip}
      Blablabla
   \noindent
   \textbf{Keywords}: 
 \end{otherlanguage*}  
\end{resumoumacoluna}

  \printbibliography

\end{document}

The xetex error log:

\myptabbox=\box87
\myptabboxwidth=\skip292
Package biblatex Info: XeTeX detected.
(biblatex)             Assuming input encoding 'utf8'.
Package biblatex Info: Automatic encoding selection.
(biblatex)             Assuming data encoding 'utf8'.
\openout4 = `artigo.bcf'.

Package biblatex Info: Trying to load bibliographic data...
Package biblatex Info: ... file 'artigo.bbl' not found.
No file artigo.bbl.
Package biblatex Info: Reference section=0 on input line 380.
Package biblatex Info: Reference segment=0 on input line 380.
Package lastpage Info: Please have a look at the pageslts package at
(lastpage)             https://www.ctan.org/pkg/pageslts
(lastpage)             ! on input line 380.

The biblatex error log:

[0] Config.pm:304> INFO - This is Biber 2.12
[1] Config.pm:307> INFO - Logfile is 'artigo.blg'
[39] biber:315> INFO - === Wed Dec 12, 2018, 18:22:11
[61] Utils.pm:209> ERROR - artigo.bcf is malformed, last biblatex run probably failed. Deleted artigo.bbl
[62] Biber.pm:114> INFO - ERRORS: 1

I also have checked:

biber --cache
No cache - you are not running the PAR::Packer executable version of biber

Best Answer

The posted .log file (which does not come from the MWE as shown in the question) shows a fatal error towards the end

./artigo.tex:384: Undefined control sequence.
<recently read> \theforeigntitle

l.384 

if such a fatal error aborts the TeX run it is possible that the .bcf file is not written out completely and hence corrupted. In that case Biber can't read the file properly and complains

[61] Utils.pm:209> ERROR - artigo.bcf is malformed, last biblatex run probably failed. Deleted artigo.bbl

The only way to get going again is by fixing all errors that you encounter when you compile your TeX file. This is always advised anyway, not only when you run Biber: Errors must be fixed, the output is not guaranteed to be valid if LaTeX encounters an error. Never ignore error messages.

Apparently the abntex2 class requires you to give the author, title and English title of the work in \autor, \titulo and \tituloestrangeiro, respectively if you want to print a title with \maketitle. Otherwise errors are thrown.

\documentclass[11pt, article, a4paper, oneside, sumario=tradicional, chapter=TITLE, section=TITLE, subsection=Title, subsubsection=title, subsubsubsection=title, english, german, greek, portuguese]{abntex2}

\usepackage{babel}
\usepackage[backend = biber, style = abnt]{biblatex}

\addbibresource{biblatex-examples.bib}


\begin{document}
\selectlanguage{brazil}
\titulo{Brazilian Title}
\tituloestrangeiro{English Title}
\autor{Gustavo}
\maketitle

\cite{sigfridsson}

\printbibliography
\end{document}

works and produces

Title page, an example citation and the bibliography

Related Question