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

Spaces in short dates (German) #891

Open
dingens opened this issue May 6, 2019 · 20 comments
Open

Spaces in short dates (German) #891

dingens opened this issue May 6, 2019 · 20 comments
Labels
enhancement fixedindev Fixed in current DEV version needs-feedback needs feedback from reporting user
Milestone

Comments

@dingens
Copy link

dingens commented May 6, 2019

Dates in German documents, when using the short or terse format, are written with thin spaces between the numbers (13. 05. 2019 instead of 13.05.2019). I was very surprised by this, because I've never seen it anywhere, but well, it was the author's choice.

However, I seem not to be the only one who does not like this (1, 2) , and removing them seems not to be possible easily but requires copying lots of code from the .lbx file (or by patching it).

I am wishing for an easier way. Maybe you could do something like \let\germanshortdatespace\thinspace (which could then be redefined to be empty), maybe a package option (but that seems a little overkill). Maybe the same thing exists in other languages, too, so a general solution would be great – that's for you to decide, I just wanted to inform you about the need :)

@moewew
Copy link
Collaborator

moewew commented May 6, 2019

Thank you for the suggestion.

Date formats are indeed a bit of a pain to modify for end users and this seems something like this might be useful. The question is if we can find a useful interface that (ideally) generalises across languages and date formats. That seems very tricky.

\germanshortdatespace would of course be possible, but it feels quite ad hoc.

@moewew moewew added this to To Do in biblatex 3.13 May 7, 2019
@HaukeBr
Copy link

HaukeBr commented May 10, 2019

What about using datetime2 or allowing the user to specify a custom command to print dates (and one for date ranges)?

@moewew
Copy link
Collaborator

moewew commented May 12, 2019

That is an interesting thought. And it is very attractive to externalise certain things to other packages. As #863 shows, the date handling currently leaves a few things to be desired.

As far as I can see datetime2 does not support all of biblatex's date options (in particular ranges and range compressions, circa and unclear dates) and there might be some implementation difficulties with switching to datetime2 now. If anyone is willing to look into this a pull request would be appreciated, but I don't think I will be making integrating datetime2 a priority.

The user can already define a custom command, but that has to be done within the framework of biblatex's date printing.

@HaukeBr
Copy link

HaukeBr commented May 12, 2019

I can see the problem with ranges and I wonder why this feature is not implemented in datetime2 as there clearly is a use case that does not only occur very rarely. I will have a look wether I can find a package that does implement those features on top of datetime2

I could not see any interface in the documentation to be honest, but maybe you can help me out? Im writing an application that now has inconsistent date formats and it would be a pleasure if I could fix that :)

@moewew
Copy link
Collaborator

moewew commented May 12, 2019

The manual mainly documents the user interface date=short etc. If you want to customise the date format you need to have a look at the macros \mkbibdatelong, \mkbibdateshort (and possibly also \mkbibseasondateshort, \mkbibseasondatelong) in the .lbx files. These commands format single dates. Date ranges are handled by \mkdaterangefull and friends from biblatex.sty.

You may want to browse https://tex.stackexchange.com/tags/biblatex/ for some examples of date modifications in biblatex. If you need concrete help with your project and don't want to report a bug or suggest a feature I'd suggest you ask over there or at a different forum like https://latex.org/ or https://groups.google.com/forum/#!forum/comp.text.tex

@plk
Copy link
Owner

plk commented Mar 25, 2023

@moewew - revisiting this, I think we need to go through the shortdate formats and clean them up a bit, replacing all these hard-coded things with \bibdatesep and set this to the right thing for each language. There are obvious errors in some of them, including German as the short date format has things like a slash when there is no day which looks like a copy-paste error from some time ago.

plk added a commit that referenced this issue Mar 26, 2023
@plk
Copy link
Owner

plk commented Mar 26, 2023

I've regularised the short date formats and now it should be enough to modify \bibdatesep to change this (in 3.20 DEV).

@moewew
Copy link
Collaborator

moewew commented Mar 26, 2023

It would be useful to make the date formats a bit easier to customise. At the moment the definitions are quite full-on and fairly cryptic, which can make it tricky to understand what is going on.

I'm not sure, however, if this is as easy as using a single macro like \bibdatesep. I have the feeling that date formats are too complicated for simple abstractions like this.

@plk plk added the fixedindev Fixed in current DEV version label Mar 26, 2023
@plk plk added this to the v3.20 milestone Mar 26, 2023
@plk plk added the needs-feedback needs feedback from reporting user label Mar 26, 2023
@plk
Copy link
Owner

plk commented Mar 26, 2023

In general, true but \bibdatesep is only for short date formats which are relatively easy. The whole date system is a beast in general now due to all the ISO8601 support in there.

@moewew
Copy link
Collaborator

moewew commented Mar 26, 2023

As for the "/" in the German short date format: AFAICT it is only used for month-year dates. I don't think I've ever seen short month-year dates (as in "6/2020" or "6. 2020" for June 2020) and I would always write them in long form as "June 2020", but if I had to choose "6/2020" looks more natural than "6. 2020"

@moewew
Copy link
Collaborator

moewew commented Mar 26, 2023

In general, true but \bibdatesep is only for short date formats which are relatively easy. The whole date system is a beast in general now due to all the ISO8601 support in there.

I see. I didn't realise \bibdatesep is only for short dates. (Plus I had written my reply before I saw your commit. You posted your comment here just a few seconds before I sent off my comment.)

@moewew
Copy link
Collaborator

moewew commented Mar 26, 2023

Looking at some of the changes, I'm wondering if the definitions were semantically sensible to start with. For Bulgarian for example we now set \bibdatesep to \adddot, but the name format looks more like day and month names should be ordinals and then \bibdatesep would be empty...

9c30ed8#diff-c54fe5e538a9797b24c35d87bcad063caa0679df251e7be3a637640ad1d9c134

@plk
Copy link
Owner

plk commented Mar 26, 2023

I think a lot of them were not right anyway - they were copy/pasted from other formats, clearly. The german one with the slash seems off to me - I think it's so rare anyway to have such month-only short dates, I just opted for a default that is consistent and people can change it if they want.

@moewew
Copy link
Collaborator

moewew commented Mar 26, 2023

Yeah, I just realised scrolling down the diff that the German dates have the same definition as the Bulgarian. For German I'm pretty sure that logically the month and day should be ordinals if both are present. But for June 2020 "06.2020" will look odd and I think "06/2020" would be more acceptable.

@jspitz can I ask you (as on of our german.lbx contributors) for a comment here?

@jspitz
Copy link
Contributor

jspitz commented Mar 26, 2023

For German I'm pretty sure that logically the month and day should be ordinals if both are present.

If month and day are present, they should be ordinals, yes (if numerals are used).

But for June 2020 "06.2020" will look odd and I think "06/2020" would be more acceptable.

Yes, definitely. I have never seen the former, but occasionally use the latter. I supposed the more common short date format is with abbreviated month name, e.g. "Jun. 2020"

@plk
Copy link
Owner

plk commented Mar 26, 2023

Can we go with "Jun. 2020" as the default then at least the separator is the same.

@jspitz
Copy link
Contributor

jspitz commented Mar 26, 2023

Fine with me, but note that the separator with (ordinal) day and month is \adddot\addnbthinspace, whereas for abbreviated month name it would need to be \adddot\addnbspace.

@plk
Copy link
Owner

plk commented Mar 26, 2023

Then we need to so something with context delims because that means the separator is different ...

plk added a commit that referenced this issue Mar 26, 2023
@plk
Copy link
Owner

plk commented Mar 26, 2023

Done in 3.20 DEV. I added a new context sensitive delimiter bibshortdatedelim , since only one .lbx was using \bibdatesep anyway. Many macros like this should be moved to the new context-sensitive delim system but on an as-needed basis and this is as good a time as any to do this one. I updated all language files to use this delimiter with backwards compat settings. This fixes the German issue and generalises the solution for all the other languages (which are probably incorrect in general due to all the edge-case copy/pasting).

plk added a commit that referenced this issue Mar 27, 2023
@plk
Copy link
Owner

plk commented Mar 27, 2023

I reverted this and added \bibdatendsep instead. The context delims give warnings on redefinitions which makes them less suitable for \.lbx use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement fixedindev Fixed in current DEV version needs-feedback needs feedback from reporting user
Projects
No open projects
biblatex 3.13
  
To Do
biblatex 3.14
  
To Do
biblatex 3.15
  
To Do
Development

No branches or pull requests

5 participants