1

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 :)

Bernard
  • 271,350

1 Answers1

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).

moewe
  • 175,683
  • 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 06 '20 at 19:01
  • 1
    @BrainOverflow Glad the workaround helped. But please do get in touch with the maintainer and report this bug. – moewe Jul 06 '20 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 06 '20 at 19:06
  • 1
    @BrainOverflow A good first step is to look at the CTAN package for the relevant package (https://www.ctan.org/pkg/babel-basque in this case) and check out the documentation or any readme file that may be listed there. – moewe Jul 06 '20 at 19:10
  • Done! I reported the bug to Juanmari (the creator of the package) – BrainOverflow Jul 06 '20 at 19:19
  • @BrainOverflow Good. Let's hope the email address is still being monitored. All dates in the source files are from 2005 or before, though there seems to have been some change in 2013. – moewe Jul 06 '20 at 19:22
  • Dont worry! I also sent it to his corporative address at the university so he will probably notice. – BrainOverflow Jul 06 '20 at 19:31