2

I am writing some class notes, and babel (with spanish language option) + natbib + chicago bibliography style are producing some undesirable results: they give me the Missing \endcsname inserted. error when I add a volume to a given article I am trying to cite. The class notes are in spanish so I need babel. A minimal working example of my tex file:

\documentclass[10pt]{article}
\usepackage{natbib}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}

\title{min}
\author{none}
\date{today}

\begin{document}

\maketitle
cite the citation \citep{efron1979}

\bibliographystyle{chicago}

\bibliography{biblio.bib}

\end{document}

and my biblio.bib file:

@article{efron1979,
 author={Bradley Efron},
 title={Bootstrap Methods: Another Look at the Jackknife},
 journal={The Annals of Statistics},
 year=1979,
 number=1,
 pages={1-26},
 volume={7}
}

If I remove the volume from the cited work in the .bib file, for some reason, the code works. But these is a very annoying work around: I still get warnings from BibTex, saying that I have a missing volume. What is the proper solution to this?

3

1 Answer 1

2

Given that you use utf8 encoding (notice that this is the default since a while; you do not need to explicitly load inputenc here, although you probably do need the fontenc to set T1), probably you will input ñ as ñ and not as ~n --- one possibility is to disable the shorthands altogether, as in:

\documentclass[10pt]{article}
\usepackage[utf8]{inputenc} % not needed
\usepackage[T1]{fontenc} % this IS needed
\usepackage{natbib}
\usepackage[spanish, es-noshorthands, shorthands=off]{babel}


\title{min}
\author{none}
\date{today}

\begin{document}

\maketitle
cite the citation \citep{efron1979}

\bibliographystyle{chicago}

\bibliography{biblio.bib}

\end{document}

which works. If you have Spanish shorthands in the real bib file, though, that will be more complex --- but in BiBTeX file I advocate for plain TeX syntax everywhere, so you have no surprises...

Disabling the babel shorthands when using spanish will prevent also several other glitches with, for example, TikZ and company.

1
  • This fixed the issue, thanks a lot! Jan 19, 2022 at 18:41

You must log in to answer this question.

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