-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong colon spacing in eprint formatting when using french babel #16
Comments
There are two possible solutions here: add a space (as you say) or force a string colon (still an issue with LuaTeX, I guess). |
I've thought about this, and really it's a problem beyond @moewew Any thoughts here? I'm not sure what to say here beyond 'French |
Actually it's not only I don't think the actively/spacey colon should be disabled elsewhere in the bibliography. I assume that for all other uses people would expect the normal French behaviour. Something like \documentclass{article}
\usepackage{csquotes}
\usepackage[french]{babel}
\usepackage[style=phys,articletitle=false,eprint=true]{biblatex}
\makeatletter
\DeclareFieldFormat{eprint:arxiv}{%
\let\FDP@colonspace\empty
\csuse{NoAutoSpacing}%
\ifhyperref
{\href{https://arxiv.org/\abx@arxivpath/#1}{%
arXiv\addcolon
\nolinkurl{#1}%
\iffieldundef{eprintclass}
{}
{\addspace\UrlFont{\mkbibbrackets{\thefield{eprintclass}}}}}}
{arXiv\addcolon
\nolinkurl{#1}%
\iffieldundef{eprintclass}
{}
{\addspace\UrlFont{\mkbibbrackets{\thefield{eprintclass}}}}}}
\makeatother
\addbibresource{biblatex-examples.bib}
\begin{document}
\nocite{baez/article}
\printbibliography
\end{document} should hopefully work (unless someone other than I guess we could define a |
@moewew Sounds good: something at the core level would 'feel' right |
Tracked at plk/biblatex#925. I'll be busy for the next two weeks, so I will probably forget about this short-term. Comments for the name and implementation issues are highly appreciated. |
I removed an earlier post which showed @josephwright Given the issues mentioned in plk/biblatex#925 (namely that not only French messes with punctuation spacing but other languages might do so as well and that there is no unified interface to turn off the spacing changes) do you still think that this is something that we should try to implement in |
@moewew Agreed: this needs action 'elsewhere' |
Thanks for the comment. I backed out of I realise that this leaves the issue here with no great solution, but an overall approach that works for all languages seems tricky. |
In biblatex,
\addcolon
typesets the colon according to the selected babel language. The issue is that the french colon has some spacing prepended to it, which makes eprint formatting look wrong compared to the spaceless version:I believe the lack of
\addspace
after\addcolon
is meant to mimic the usual formatting of arXiv references (as in REVTeX, i.e., arXiv:1234.5678 with no spaces around the colon)? In any case, the spacing ends up making it look likearxiv :1234.5678
. In comparison, the default biblatex styles typeset it in a more conventional way using\addcolon\addspace
, which looks likearxiv : 1234.5678
in french andarxiv: 1234.5678
in english.MWE:
The text was updated successfully, but these errors were encountered: