plk / biblatex

biblatex is a sophisticated bibliography system for LaTeX users. It has considerably more features than traditional bibtex and supports UTF-8
518 stars 118 forks source link

Spacing issues in dates output #450

Closed njbart closed 8 years ago

njbart commented 8 years ago

In the following example, there’s an extra space between “1888” and “)” in “References”:

\documentclass{article}
\usepackage[UKenglish]{babel}
\usepackage[autostyle]{csquotes}
\usepackage[style=authoryear, alldates=comp, dateera=secular]{biblatex}
\usepackage{fontspec}
\setmainfont{Linux Libertine}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@report{      doe,
  author    = {Doe, John},
  date      = {1777-07-17/1888-08-28},
  title     = {Title},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}

\section*{Text}

Blah \autocite{doe}.

\printbibliography

\end{document}

screen shot 2016-06-29 at 13 17 03

I’m not seeing this space with \usepackage[UKenglish]{babel} removed.

I’m also not seeing this space with date = {1888-08-28}.

And I’m not seeing this space with alldates=long either – however, here I get “28th Aug. 1888” which dosn’t seem “long” really.

And another spacing issue: In the following example, the “CE”s in “… BCE–… CE” dates have ever so slightly more space in front of them than they do in the other dates.

\documentclass{article}
\usepackage[autostyle]{csquotes}
\usepackage[style=authoryear, alldates=comp, dateera=secular, datezeros=false, dateeraauto=1000]{biblatex}
\usepackage{fontspec}
\setmainfont{Linux Libertine}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{      doe,
  author    = {Doe, John},
  date      = {0014},
}
@online{      aug,
  author    = {Augustus},
  date      = {-0062-09-21/0014-08-17},
  title     = {My Life},
}
@online{      tib,
  author    = {Tiberius},
  date      = {-0041-11-14/0037-03-14},
  title     = {My Life},
}
@online{      cal,
  author    = {Caligula},
  date      = {0012-08-29/0041-01-22},
  title     = {My Life},
}
@online{      cla,
  author    = {Claudius},
  date      = {-0009-07-30/0054-10-11},
  title     = {My Life},
}
@online{      ner,
  author    = {Nero},
  date      = {0037-12-13/0068-06-07},
  title     = {My Life},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}

{\raggedleft

Blah \autocite{doe}.

Blah \autocite{aug}.

Blah \autocite{cal}.

Blah \autocite{cla}.

Blah \autocite{ner}.

Blah \autocite{tib}.

}
\end{document}

screen shot 2016-06-29 at 13 10 59

plk commented 8 years ago

Should be fixed now (need to get both biblatex and biber).

njbart commented 8 years ago

Looks good indeed now.

njbart commented 8 years ago

A few more issues, this time with “ymd” output:

Output:

screen shot 2016-07-07 at 12 50 51

Source:

\documentclass{article}
\usepackage[autostyle]{csquotes}
\usepackage[style=authoryear, alldates=ymd,  dateera=astronomical, datezeros=false, dateeraauto=1000, datecirca, dateuncertain, julian]{biblatex}
\usepackage{fontspec}
\setmainfont{Linux Libertine}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}

@online{      plato,
  author    = {Plato},
  date      = {-0424~/-0346~},
  title     = {My Life},
  addendum  = {Textbooks: 428/427 or 424/423 – 348/347 BCE; here we simply use 425 – 347 BCE},
}
@online{      jc,
  author    = {Julius Caesar},
  date      = {-0099-07-11/-0043-03-13},
  title     = {My Life},
  addendum  = {Textbooks: 13 July 100 – 15 March 44 BCE Julian},
}
@online{      aug,
  author    = {Augustus},
  date      = {-0062-09-21/0014-08-17},
  title     = {My Life},
  addendum  = {Textbooks: 23 Sep 63 BCE – 19 Aug 14 CE Julian},
}
@online{      cal,
  author    = {Caligula},
  date      = {0012-08-29/0041-01-22},
  title     = {My Life},
  addendum  = {Textbooks: 31 August 12 – 24 January 41 CE Julian},
}
@online{      tha,
  author    = {{Thales of Miletus}},
  date      = {-0584-05-22},
  title     = {Blog post: Solar eclipse today!},
  addendum  = {Textbooks: Wed 28 May 585 BCE Julian},
}
@book{        sch,
  author    = {Hartmann Schedel},
  date      = {1493-07-21},
  title     = {Liber Chronicarum},
  publisher = {Anton Koberger},
  location  = {Nuremberg},
  addendum  = {Textbooks: 12 July 1493 CE Julian},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}

\section*{Text (ymd/astro/jul<1582)}

Blah \autocite{tha}. \\
Blah \autocite{plato}. \\
Blah \autocite{jc}. Compare spaces in math mode: $-99 - -43$ \\
Blah \autocite{aug}. \\
Blah \autocite{cal}. \\
Blah \autocite{sch}.

\printbibliography

\end{document}
plk commented 8 years ago

Thanks for testing this - should be fixed now. I also noticed the ugly dash/minus conflict - I think settling on slash for ymd or edtf is better. Technically only requires bibaltex update but it would be nice if you could also get biber as this has just had a major internal upgrade to perl 5.24 which you shouldn't notice, functionally.

njbart commented 8 years ago

Hmm, with the most recent biber downloaded from https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/development/binaries/OSX_Intel/biber-darwin_x86_64.tar.gz/download I get these error messages:

$ biber -v
Could not find a suitable List::SomeUtils implementation: Can't locate List/SomeUtils/XS.pm in @INC (you may need to install the List::SomeUtils::XS module) (@INC contains: /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc CODE(0x100ef4c88) CODE(0x100f016a8)) at /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib/Module/Runtime.pm line 317, <DATA> line 1.
Can't locate List/SomeUtils/PP.pm in @INC (you may need to install the List::SomeUtils::PP module) (@INC contains: /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc CODE(0x100ef4c88) CODE(0x100f016a8)) at /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib/Module/Runtime.pm line 317, <DATA> line 1.
 at /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib/List/SomeUtils.pm line 57.
Compilation failed in require at /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib/List/AllUtils.pm line 13, <DATA> line 1.
BEGIN failed--compilation aborted at /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib/List/AllUtils.pm line 13, <DATA> line 1.
Compilation failed in require at /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib/Biber/Config.pm line 15, <DATA> line 1.
BEGIN failed--compilation aborted at /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib/Biber/Config.pm line 15, <DATA> line 1.
Compilation failed in require at /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib/Biber/LaTeX/Recode.pm line 6, <DATA> line 1.
BEGIN failed--compilation aborted at /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib/Biber/LaTeX/Recode.pm line 6, <DATA> line 1.
Compilation failed in require at /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib/Biber/Utils.pm line 19, <DATA> line 1.
BEGIN failed--compilation aborted at /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib/Biber/Utils.pm line 19, <DATA> line 1.
Compilation failed in require at /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib/Biber/Internals.pm line 8, <DATA> line 1.
BEGIN failed--compilation aborted at /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib/Biber/Internals.pm line 8, <DATA> line 1.
Compilation failed in require at /loader/HASH(0x1010e97b0)/parent.pm line 16, <DATA> line 1.
BEGIN failed--compilation aborted at /var/folders/1g/q9mlzlf55jxdyg5vzl4367nc0000gn/T/par-62657274/cache-5e76c0623a30635cbbdf6c426403f2e7ac90b6b6/inc/lib/Biber.pm line 5, <DATA> line 1.
Compilation failed in require at script/biber-darwin line 17, <DATA> line 1.
BEGIN failed--compilation aborted at script/biber-darwin line 17, <DATA> line 1.

I’m using Mac OS X 10.10.5.

Do I need to install or upgrade anything else?

plk commented 8 years ago

Looks like a new dependency in 5.24 builds - should be fixed now if you pull biber again.

njbart commented 8 years ago

Ok, biber works again, and the output looks good.

simifilm commented 8 years ago

@plk If I understand this correctly, the idea is that biblatex should print a thin space, if a minus year follows a range dash. But this does not seem to work properly. At least in tests with biblatex-fiwi I always get the space, even when there is no dash in sight.

plk commented 8 years ago

Hmm, is this with the latest version?

simifilm commented 8 years ago

Yes.