0

I'm writing my thesis using MikTeK and Winedt 9 for Windows. I use the documentclass{report} and then I have a "masterfile" with a preamble, where I use the option \input to load specific chapters of the thesis. I use JabRef and Biber to handle the references. I have encountered a curious problem:

Biber is unable to find a specific entry in my .bib file. At first, it seems to be related to the fact that the entry contains a line which is too long in terms of characters. Biber does not "find" the reference and renders the command in the regular boldfaced form. Typically, this happens if there are many different editors of a book, such that the "editor" line in JabRef becomes very long.

Even more curiously, Biber is able to find the same entry if I write a new file such as a regular documentclass{article}. I load the exact same .bib file in the preamble, and I use the exact same key to cite it in the document.

Any ideas?

Here is a probably too verbose MWE:

\documentclass[12]{report}
\setcounter{tocdepth}{2}
\usepackage{layout}
\setlength{\voffset}{-0.75in}
\setlength{\headsep}{5pt}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage{authblk}
\usepackage [T1]{fontenc}
\usepackage[backend=biber, style=authoryear-comp]{biblatex}
\usepackage{xyling}
\usepackage[super]{nth}
\usepackage{xspace}
\usepackage{cgloss4e}
\usepackage{abstract}
\usepackage{array}
\usepackage{multirow}
\usepackage{hyperref}
\usepackage{xr}
\usepackage{gb4e}


\addbibresource{ref.bib}

\title{XXX}
\author{YYY}
\date{\today}

\begin{document}

blablabla \cite{LabelleHirschbuhler2005} NB! 

\end{document}

This is the offending entry in the ref.bib file. Its BibTeX source reads like this:

@InBook{LabelleHirschbuhler2005,
  chapter =   {Changes in clausal organization and the position of clitics in Old French},
  pages =     {60-71},
  title =     {Grammaticalization and Parametric Change},
  publisher = {Oxford University Press},
  year =      {2005},
  author =    {Marie Labelle and Paul Hirschbühler},
  editor =    {Monserrat, Batllori and Maria-Lluísa, Hernanz and Carme, Picallo and Francesc, Roca},
  address =   {Oxford},
}
13
  • 5
    Since you problem is bibliography-related and, apparently, is a direct consequence of the contents of the .bib file, it would be helpful if you included a sample .bib file that contains that X entry. You can use the filecontents package for that. Mar 27 '18 at 12:05
  • 2
    Hoiw long is the longest lije in your .bib? I've got an author line that's 395 characters long and biber is happy enough with that. There's no such thing as a JabRef file, but that doesn't stop JabRef breaking a .bib file (I avoid reference managers because they seems more trouble than they're worth)
    – Chris H
    Mar 27 '18 at 12:19
  • 2
    Your MWE contains quite a few things that are highly likely to have no bearing on the issue (\setcounter{tocdepth}{2}, your redefinitions of footnotes, several unrelated packages). Please try to make your example more minimal by removing packages and code that don't influence the issue at hand. On the other hand you example is not verbose enough, because you have not shown us the offending entries from your ref.bib. Please find examples of problematic entries and add them to your question.
    – moewe
    Mar 27 '18 at 16:15
  • 2
    I have a hunch that you may be using too many commas in name fields instead of separating names with and (i.e. you type author = {Emma Sigfridsson, Anne Elk, Humphrey Appleby} instead of the correct author = {Emma Sigfridsson and Anne Elk, and Humphrey Appleby} see tex.stackexchange.com/q/36396/35864), but I'm just guessing here
    – moewe
    Mar 27 '18 at 16:17
  • 2
    Check your .blg file for errors or warnings.
    – moewe
    Mar 27 '18 at 16:55
2

This is an incompatibility between gb4e and xyling or more specifically the dvips driver of xy. The problem can be reproduced with

\documentclass{report}
\usepackage{gb4e}
\usepackage{xyling}

\begin{document}
Lorem
\end{document}

Or by replacing \usepackage{xyling} with \usepackage[color,all,dvips]{xy} (xyling internally loads xy with those options).

gb4e changes the definitions of ^ and _ so you can use sub- and superscripts outside of math mode as well. This interferes with xy's dvips driver using the ^^-notation.

You can disable this behaviour with \noautomath

\documentclass{report}
\usepackage{gb4e}
\noautomath
\usepackage{xyling}

\begin{document}
Lorem
\end{document}

See also Can't compile XeLaTeX document with biblatex and gb4e together and gb4e breaks math subscripts in \caption

If you want to use _ and ^ without switching to math mode, you can re-enable the function after \begin{document} with \automath

\documentclass{report}
\usepackage{gb4e}
\noautomath
\usepackage{xyling}

\begin{document}\automath
Lorem_a
\end{document}
4
  • Thanks for all suggestions, but there is one thing I don't get. I use xyling and gb4e in all my documents and preambles, and I usually don't have a problem. What is it that causes the problem with this one exact entry from my .bib file? Surely, this must somehow be related to the entry as well? @gusbrs, I mean the problem disappears when I use a fresh preamble, I haven't checked if it works with the exact same preamble in a different document, I'll find out and report...
    – EspenJK
    Mar 29 '18 at 14:59
  • @EspenJK The interplay between xyling and gb4e is definitely what cause problems in the MWE you posted. It also causes problems in more minimal examples that don't load biblatex at all. Maybe you can recover from these errors if you run in nonstopmode and ignore errors (maybe that happens in your other documents). If I add \noautomath after loading gb4e your example compiles fine and produces the expected output. If you have another problem tied to a .bib entry it is not the entry of your question.
    – moewe
    Mar 29 '18 at 15:12
  • In fact, I do use \noautomath in my preamble after gb4e, this is part of what I removed when posting the MWE because I thought it was irrelevant to the question. So I use \noautmath after gb4e and it still doesn't work for me. So there is a compability problem between xyling and gb4e, I understand that now. I just don't get why it randomly affects a single entry from the .bib file. That is after all why I posted, that Biber is unable to find the relevant entry from my .bib file. I think my question and or MWE must have been misleading.
    – EspenJK
    Mar 30 '18 at 7:29
  • @EspenJK I'm sorry that this does not help you. I'll leave this answer here, though, maybe it can help someone else. It is impossible that this exact incompatibility between the two packages causes one particular .bib entry to fail, if you use \noautomath you should be fine. Is there any chance you can come up with an MWE that really reproduces the exact error you get in your document? Before you do that, check the .log and .blg files. Maybe the problem is not actually the entry you show, but the one before: If braces or commas are missing that is a possibility.
    – moewe
    Mar 30 '18 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.