9

I'm new to this. And I understand nothing. Please, explain me what happen. I use

    \usepackage[utf8]{inputenc}
    \usepackage[
    backend=biber,
    style=authoryear,
    natbib=true,
    sorting=nyvt]{biblatex}
    \addbibresource{Ref.bib}

And I use

    \begin{document}
    My text \citep{cite1} bla-bla-bla \citep{cite2}.
    \newpage{}
    \printbibliography[title={References}]
    \end{document}

And all is good. Then I add

    bla-bla-bla \citep{troublecite}.

And I have "biber DocName: Command for 'biber DocName' gave return code 256" and "Entity: line 298: parser error : Extra content at the end of the document troublecite" Then I delete *.aux, *.bbl etc and I delete \citep{troublecite} - and all is fine again.

I try to delete this string out from my *.bib and add info by hands, I try to import citation file - but no positive result. And I don't know what to do. I have no ideas. Can anybody help me?

UPD

troublecite entry

@INCOLLECTION{Brainerd2005,
  author = {Brainerd, Elizabeth L. and Ferry‐Graham, Lara A.},
  title = {Mechanics of Respiratory Pumps},
  booktitle = {Fish Biomechanics},
  publisher = {Academic Press},
  year = {2005},
  volume = {23},
  series = {Fish Physiology},
  pages = {1 - 28},
  abstract = { abstract},
  doi = {http://dx.doi.org/10.1016/S1546-5098(05)23001-7},
  issn = {1546-5098},
  owner = {owner},
  timestamp = {2016.03.10},
  url = {http://www.sciencedirect.com/science/article/pii/S1546509805230017}
}

My Ref.bib

% This file was created with JabRef 2.7b.
% Encoding: UTF8

@ARTICLE{Mallatt1996,
  author = {Mallatt, Jon},
  title = {Ventilation and the origin of jawed vertebrates: a new mouth},
  journal = {Zoological Journal of the Linnean Society},
  year = {1996},
  volume = {117},
  pages = {329-404},
  number = {4},
  abstract = {abstract},
  citeseerurl = {http://onlinelibrary.wiley.com/doi/10.1111/j.1096-3642.1996.tb01658.x/abstract},
  doi = {10.1111/j.1096-3642.1996.tb01658.x},
  issn = {1096-3642},
  owner = {owner},
  publisher = {Blackwell Publishing Ltd},
  timestamp = {2014.04.03},
  url = {http://dx.doi.org/10.1111/j.1096-3642.1996.tb01658.x}
}

@ARTICLE{Mallatt1997,
  author = {Mallatt, Jon},
  title = {Shark Pharyngeal Muscles and Early Vertebrate Evolution},
  journal = {Acta Zoologica},
  year = {1997},
  volume = {78},
  pages = {279-294},
  number = {4},
  month = {Oct.},
  citeseerurl = {http://onlinelibrary.wiley.com/doi/10.1111/j.1463-6395.1997.tb01012.x/abstract},
  doi = {10.1111/j.1463-6395.1997.tb01012.x},
  issn = {1463-6395},
  owner = {owner},
  publisher = {Blackwell Publishing Ltd},
  timestamp = {2014.04.03},
  url = {http://dx.doi.org/10.1111/j.1463-6395.1997.tb01012.x}
}

@INCOLLECTION{Brainerd2005,
  author = {Brainerd, Elizabeth L. and Ferry‐Graham, Lara A.},
  title = {Mechanics of Respiratory Pumps},
  booktitle = {Fish Biomechanics},
  publisher = {Academic Press},
  year = {2005},
  volume = {23},
  series = {Fish Physiology},
  pages = {1 - 28},
  doi = {http://dx.doi.org/10.1016/S1546-5098(05)23001-7},
  issn = {1546-5098},
  owner = {owner},
  timestamp = {2016.03.10},
  url = {http://www.sciencedirect.com/science/article/pii/S1546509805230017}
}

@BOOK{Davidson1918,
  title = {The musculature of Heptanchus maculatus},
  publisher = {Univ. of California Press},
  year = {1918},
  author = {Davidson, Pirie},
  pages = {--},
  address = {Berkeley, Calif},
  owner = {owner},
  refid = {252461206},
  timestamp = {2014.04.02}
}

@BOOK{Zootomia1,
  title = {Практическая зоотомия позвоночных. Том 1. Низшие хордовые, бесчелюстные,
    рыбы. Учебное пособие для биологических специальностей университетов.},
  publisher = {"Высшая школа". Москва},
  year = {1976},
  author = {Гуртовой, Н. Н. and Матвеев, Б. С. and Дзержинский, Ф. Я.},
  volume = {1},
  pages = {353},
  owner = {owner},
  timestamp = {2014.04.03}
}

@comment{jabref-meta: selector_publisher:}

@comment{jabref-meta: selector_author:}

@comment{jabref-meta: selector_journal:}

@comment{jabref-meta: selector_keywords:}

@comment{jabref-entrytype: Manuscript: req[author;title;type;school;paper;year;pages] opt[address;month;note]}

My example-tex-file


\documentclass{article}
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\usepackage[
    backend=biber,
    style=authoryear,
    natbib=true,
    sorting=nyvt]{biblatex}
\addbibresource{Ref.bib}

\begin{document}
    \section{Фрагменты текста}
    \begin{flushleft}
    Он играет роль клапана \citep{Mallatt1996}.
    Troublecite here \citep{Brainerd2005}.
    Мы использовали номенклатуру \citep{Zootomia1}.
    Дополняя ее из других источников \citep{Davidson1918, Mallatt1997}.
    \end{flushleft}
\newpage{}
\printbibliography[title={References}]
\end{document}

.blg file

[0] Config.pm:300> INFO - This is Biber 0.9.9
[1] Config.pm:303> INFO - Logfile is 'example.blg'
[2] biber:145> INFO - === ЧÑв ÐÐ°Ñ 17, 2016, 03:47:59
[3] Biber.pm:271> INFO - Reading 'example.bcf'

Some compilation messages

! Package inputenc Error: Unicode char \u8:‐ not set up for use with LaTeX.
See the inputenc package documentation for explanation.
Type  H   for immediate help.
 ...
l.16 ...\textit{troublecite}~\citep{Brainerd2005}.
                                                   Мы использова...
?
! Emergency stop.
 ...
l.16 ...\textit{troublecite}~\citep{Brainerd2005}.
                                                   Мы использова...
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on example.log.
Latexmk: Found input bbl file 'example.bbl'
Latexmk: Found biber source file(s) [Ref.bib example.bcf]
Rule 'biber example': File changes, etc:
   Changed files, or newly in use since previous run(s):
      'example.bcf'
------------
Run number 2 of rule 'biber example'
Latexmk: applying rule 'biber example'...
------------
Entity: line 298: parser error : Extra content at the end of the document
    Brainerd2005
                                           ^
INFO - This is Biber 0.9.9
INFO - Logfile is 'example.blg'
INFO - Reading 'example.bcf'
Latexmk: Found biber source file(s) []
Rule 'pdflatex': File changes, etc:
   Changed files, or newly in use since previous run(s):
      'example.aux'
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
  biber example: Command for 'biber example' gave return code 256
  pdflatex: Command for 'pdflatex' gave return code 256
Latexmk: Use the -f option to force complete processing.
10
  • 4
    Welcome to TeX.SE. Please show us the troublecite entry.
    – Mico
    Mar 10, 2016 at 5:33
  • 1
    Please also show the contents of the .blg file (Biber's log file). As Mico commented it would be great to see a full example including the .bib entry. This is best done in an MWE that we can just copy and run on our machines, please read help on MWEs and help on MWEBs.
    – moewe
    Mar 10, 2016 at 6:46
  • 12
    One \cite to crash them all!!!
    – percusse
    Mar 17, 2016 at 2:05
  • 2
    @samcarter Would you like to type up an answer?
    – moewe
    Mar 17, 2016 at 7:10
  • 4
    Three \cites for the LaTex-kings under the sky, Seven for the XeLaTeX-lords in their halls of stone, Nine for Lyx Men doomed to die, One for the TeX Lord on his dark throne In the Land of stackexchange where the Shadows lie. One \cite to rule them all, One \cite to find them, One \cite to bring them all and in the \bibliography bind them. Aug 29, 2018 at 10:33

2 Answers 2

11

Short answer: A hyphen in one of the bibliography entries gives an encoding error. To solve this, delete the letter and retype it.


How to find the one \cite to crash them all!!!

  1. Make a copy or another form of backup of your project.

  2. Find out which bibliography entry causes the problem by step by step removing the other ones or the cites in your .tex file [I find it easier to see if the error is gone, if I delete all the .log files between compilations, because otherwise it can survive there for a few compilations]

  3. Find out which field is causing the error. Since Biblatex thankfully is very tolerant about missing fields, just remove field by field until the error is gone.

  4. On could probably just have looked up the unicode number of the error message, but from experience - are prone to be some bad characters, so it was just a lucky guess. Other examples of characters prone to be in disguise are spaces, ligatures (such as ), accented letters or math symbols.

1
  • 2
    Thank you very much. And very good point about removing the temporary files when trying to isolate the source of the problem. Depending on what is going on the error might still reside in one of the auxiliary files even if it is already fixed in the actual input.
    – moewe
    Mar 17, 2016 at 12:25
0

TL;DR: Try to search and replace the '–' symbol by '-' in the pages field of your reference list.

Long version: I had a similar problem: The latex document could not be compiled anymore after adding a certain reference. I used Texmaker with pdflatex+biblatex. My problem was that the document simply never finished compiling.

To isolate the faulty entry, I needed to successively remove parts of the citations until it was working again (I recommend to do it via a Binary search). When compiling again, I needed to remove all auxiliary files (otherwise it would have crashed again). Please also note that the problem was only triggered when \printbibligraphy was in place and not when only in-text citations, e.g. via \cite{..} were used.

The dubious entry had a wrong '-' sign in the page numbers. The symbol was en dash and not the ordinary hyphen-minus. This caused latex to crash.

Interestingly, the en-dash symbol did not lead to a crash in other fields (e.g. in the title field).

2
  • 2
    Welcome to TeX.SX! The dash is the typographically right device for page numbers, although in bib files you could use --. Other than that how does this differ from the existing answer?
    – TeXnician
    Aug 29, 2018 at 9:02
  • 1
    Biber should not have a problem with an en-dash in a pages field (because Biber digests the en-dash there; in other fields an en-dash can be problematic since it is passed on to LaTeX, who may have trouble with it). That means that for the particular situation described in the question this answer does not really apply.
    – moewe
    Aug 29, 2018 at 9:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .