0

Latex newbie here :)

I am currently working on my Thesis, which is written in Basque language. However, I would like to have the bibliography in English. This is the piece of code I am currently using:

\usepackage[english,basque]{babel}
\usepackage[autostyle=false]{csquotes}
\usepackage[style=phys, %
articletitle=false,%
biblabel=brackets,%
chaptertitle=false, pageranges=false,%
sorting=none, %
language=english,
autolang=other %
]{biblatex}

Although the "References" section looks as expected, every time I make a citation with \cite{somereference} it places some weird spacing around the square brackets in the text:

Weird spacing example enter image description here

How could I fix this issue? Thank you very much, in advance :)

3

The following MWE reproduces the issue

\documentclass{article}
\usepackage[english,basque]{babel}
\usepackage[autostyle=false]{csquotes}
\usepackage[style=numeric-comp,
  language=english, autolang=other]{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{sigfridsson,worman,geer,nussbaum}
\printbibliography
\end{document}

[ 1 –4 ]

The problem is a missing % in basque.ldf. Currently (v1.0f, 2005/03/29), ll. 90-91 read

\addto\noextrasbasque{
  \bbl@deactivate{"}\bbl@deactivate{~}}

but that should be

\addto\noextrasbasque{%
  \bbl@deactivate{"}\bbl@deactivate{~}}

with a % after the opening curly brace (see What is the use of percent signs (%) at the end of lines? (Why is my macro creating extra space?) for details about % at end of lines).

Contact the maintainer of babel-basque about this small oversight. If you want a short MWE for the bug report, you can use

\documentclass[american,basque]{article}
\usepackage{babel}

\begin{document}
A\foreignlanguage{american}{B}C
\end{document}

A BC

If you need a solution now, you could create a local copy of basque.ldf and fix the issue there – or you could add

\addto\noextrasbasque{\ifhmode\unskip\fi}

to your preamble. The \unskip counters the space that was introduced by the missing %, but this is only required and desirable in horizontal mode (in vertical mode the \unskip would get rid of vertical space that should probably remain as is).

| improve this answer | |
  • Thank you very much for your time and support!!!!!! Actually, I am writing it in overleaf.com so I probably do not have any access to the basque.ldf file. The last piece of code solved it perfectly though :) – BrainOverflow Jul 6 at 19:01
  • 1
    @BrainOverflow Glad the workaround helped. But please do get in touch with the maintainer and report this bug. – moewe Jul 6 at 19:03
  • Not sure where to fill the Bug report but I will look for it! Furthermore, I will definitively refer them to your answer as it seems to be sooo acurate, thank you very much once again! – BrainOverflow Jul 6 at 19:06
  • 1
    @BrainOverflow A good first step is to look at the CTAN package for the relevant package (ctan.org/pkg/babel-basque in this case) and check out the documentation or any readme file that may be listed there. – moewe Jul 6 at 19:10
  • Done! I reported the bug to Juanmari (the creator of the package) – BrainOverflow Jul 6 at 19:19

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.