Skip to content
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

New \addcolon-like command that disables French colon spacing #925

Closed
moewew opened this issue Sep 22, 2019 · 6 comments
Closed

New \addcolon-like command that disables French colon spacing #925

moewew opened this issue Sep 22, 2019 · 6 comments

Comments

@moewew
Copy link
Collaborator

moewew commented Sep 22, 2019

From josephwright/biblatex-phys#16

In some instances it might be useful to have an \addcolon-variant that does not obey the French typography rules even if French is enabled.

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}

We need

  1. a good name,
  2. to find a stable implementation ideally for both babel and polyglossia,
  3. to check if other languages do similar things.
@jspitz
Copy link
Contributor

jspitz commented Dec 23, 2019

I'd prefer a more general name than \addcolonnonfrench, e.g. \addnonspacedcolon, since spacing is not only done for French (in polyglossia for instance also for ecclesiastic Latin and Sanskrit)

@moewew
Copy link
Collaborator Author

moewew commented Dec 24, 2019

Mhh, good point. I liked the analogy with \nonfrenchspacing, but this is something slightly different anyway...

I'm beginning to think maybe this whole macro was a bad idea. It is quite tricky to work against all possible modifications to colons that a language module might throw at us. On that note: Can the colon spacing in polyglossia's ecclesiastical Latin or Sanskrit be turned off (locally)?

@jspitz
Copy link
Contributor

jspitz commented Dec 24, 2019

Can the colon spacing in polyglossia's ecclesiastical Latin or Sanskrit be turned off (locally)?

Not yet. This feature might be added eventually.

With polyglossia, a probably safe way would be to use \foreignlanguage{latex}{:}. The latex language is an internal language which is always loaded by polyglossia. It more or less conforms to English.

@moewew
Copy link
Collaborator Author

moewew commented Dec 30, 2019

Can the colon spacing in polyglossia's ecclesiastical Latin or Sanskrit be turned off (locally)?

Not yet. This feature might be added eventually.

Oh bother. It would have been too easy if \NoAutoSpacing had been available in all languages that mess with spacing.

With polyglossia, a probably safe way would be to use \foreignlanguage{latex}{:}.

Thanks for that suggestion. I was hoping I could get away with something that works with both babel and polyglossia, but I guess that was never going to happen.


Still not sure if maybe we should back out and just remove this macro. The mess it is to implement and maintain seems hardly worth the limited use cases it is going to have.

@jspitz
Copy link
Contributor

jspitz commented Dec 31, 2019

Still not sure if maybe we should back out and just remove this macro. The mess it is to implement and maintain seems hardly worth the limited use cases it is going to have.

FWIW I tend to agree.

moewew added a commit that referenced this issue Jan 2, 2020
…#925)"

This reverts commit f6b0817.

As it turns out this is tricky to generalise to other language
modules and singling out French seems not overly useful.
@moewew moewew added wontfix and removed fixedindev Fixed in current DEV version labels Jan 2, 2020
@moewew
Copy link
Collaborator Author

moewew commented Jan 2, 2020

I reverted f6b0817 in 97a983b. Currently it is too messy to implement a stable solution that works across all language modules. Setting this to wontfix for now. I guess the use case for a command like this was always very limited anyway, so I don't think it is a huge loss.

@moewew moewew removed this from the v3.15 milestone Jan 2, 2020
@moewew moewew closed this as completed Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants