0

I am getting the following error:

(build/proposal-tufte-mwe.bbl
Runaway argument?
\BIBentryALTinterwordspacing S.~Koenig and M.~Likhachev, ``Fast repla\ETC.
! Paragraph ended before \BR@c@bibitem was complete.
<to be read again>
                   \par
l.30

?

Search results indicate this can be caused by % characters in URLs, but that's not the case for me.

Here is a minimal example:

\documentclass{tufte-book}

\usepackage{natbib} \setcitestyle{square, numbers} % \documentclass{tufte-book}' usesnatbib` too. Avoid option clash

\begin{filecontents}{minimal-references.bib} @article{koenigFastReplanningNavigation2005, title = {Fast Replanning for Navigation in Unknown Terrain}, author = {Koenig, S. and Likhachev, M.}, date = {2005-06}, journaltitle = {IEEE Transactions on Robotics}, doi = {10.1109/TRO.2004.838026}, url = {http://ieeexplore.ieee.org/document/1435479/}, } \end{filecontents}

\begin{document} \mainmatter

\section{Related Work} Such is the case in the heuristic incremental search for a navigation algorithm~\cite{koenigFastReplanningNavigation2005}.

% \backmatter

% debug bib % \show\bibitem % \show\BR@c@bibitem

\bibliographystyle{IEEEtran} \bibliography{minimal-references}

\end{document}

When I hit enter to "ignore" the Runaway argument? error, I see the following:

! Package natbib Error: Bibliography not compatible with author-year citations.

which surprises me, given the line \setcitestyle{square, numbers}.

I am not sure if this is helpful, but I did try to debug:

$ latexdef --class tufte-book  --find \BR@b@bibitem
\BR@b@bibitem first defined in "/usr/local/texlive/2020/texmf-dist/tex/latex/natbib/bibentry.sty".

\BR@b@bibitem: macro:->@protected@testopt \BR@b@bibitem \BR@b@bibitem {}

\BR@b@bibitem first defined in "/usr/local/texlive/2020/texmf-dist/tex/latex/natbib/bibentry.sty".

\BR@b@bibitem: \long macro:[#1]#2->\ifthenelse {\isempty {#1}}{\BR@bibitem {#2}}{\BR@bibitem [#1]{#2}}\BR@c@bibitem {#2}

I am not tied to using natbib, and perhaps I should use the nobib option to disable it in tufte-book.

I would like an explanation for the error, and a recommendation for a working configuration.

Gus
  • 1,217

1 Answers1

2

You will save a lot of time dealing with tufte-book if you use biber (and the option nobib).

I added examples from biblatex-examples.bib included in the distribution.

a

% !TeX TS-program = pdflatex % <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<   
\documentclass[nobib]{tufte-book}

\usepackage{csquotes} \usepackage[backend=biber, language=auto, style=ieee, natbib=true]{biblatex}

\addbibresource{minimal-references.bib} \addbibresource{biblatex-examples.bib}

\begin{filecontents}[overwrite]{minimal-references.bib} @article{koenigFastReplanningNavigation2005, title = {Fast Replanning for Navigation in Unknown Terrain}, author = {Koenig, S. and Likhachev, M.}, date = {2005-06}, journaltitle = {IEEE Transactions on Robotics}, url = {http://ieeexplore.ieee.org/document/1435479/}, doi = {10.1109/TRO.2004.838026}, } \end{filecontents}

\begin{document} \mainmatter

\section{Related Work}
Such is the case in the heuristic incremental search for a navigation algorithm~\cite{koenigFastReplanningNavigation2005}.

\begin{itemize}
    \item \cite{kastenholz}
    \item \cite{sigfridsson}
    \item \cite{ctan}
    \item \cite{markey} 
\end{itemize}   

% \bibliographystyle{IEEEtran} % \bibliography{minimal-references}

\printbibliography

\end{document}

If running xelatex or lualatex start as follows to avoid letter spacing errors.

\documentclass[nobib,nofonts]{tufte-book}

%%https://tex.stackexchange.com/questions/200722/xetex-seems-to-break-headers-in-tufte-handout
\usepackage{fontspec} \setmainfont{Minion Pro} \newcommand{\textls}[2][5]{% \begingroup\addfontfeatures{LetterSpace=#1}#2\endgroup } \renewcommand{\allcapsspacing}[1]{\textls[15]{#1}} \renewcommand{\smallcapsspacing}[1]{\textls[10]{#1}} \renewcommand{\allcaps}[1]{\textls[15]{\MakeTextUppercase{#1}}} \renewcommand{\smallcaps}[1]{\smallcapsspacing{\scshape\MakeTextLowercase{#1}}} \renewcommand{\textsc}[1]{\smallcapsspacing{\textsmallcaps{#1}}} %%************************************************************************************

Simon Dispa
  • 39,141
  • Thanks, can you explain why biber is less problematic than natbib? – Gus Apr 08 '21 at 23:11
  • @Gus Because biblatex + biber works! while while natbib keeps throwing errors and wasting your time. In general terms both are good but I use biblatex because is updated with the APA style I need. – Simon Dispa Apr 08 '21 at 23:51