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

Unequal spacing between number and text in bibliography #74

Open
0ttoman opened this issue Oct 30, 2021 · 3 comments
Open

Unequal spacing between number and text in bibliography #74

0ttoman opened this issue Oct 30, 2021 · 3 comments
Assignees
Labels
Milestone

Comments

@0ttoman
Copy link

0ttoman commented Oct 30, 2021

Hey,
so this visual error annoyed me a bit.. I created a minimal script to reproduce the issue.
When using scrreprt it works perfectly, even without siunitx there is no distance error.

The spacing between the numbers 1-9 and the text are different from those after number 10 (and onwards)

\documentclass{tudscrreprt}
\usepackage{siunitx}

\usepackage[sorting=none]{biblatex}
\addbibresource{bib.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

bib.bib:

@book{a,
		title={Test},
}
@book{b,
		title={Test},
}
@book{c,
		title={Test},
}
@book{d,
		title={Test},
}
@book{e,
		title={Test},
}
@book{f,
		title={Test},
}
@book{g,
		title={Test},
}
@book{h,
		title={Test},
}
@book{i,
		title={Test},
}
@book{j,
		title={Test},
}

I used texlive 2020, but the error also occurs when using the newest version at tex.zih.tu-dresden.de / overleaf:
image

@mrpiggi
Copy link
Member

mrpiggi commented Oct 30, 2021

I can confirm the observed behavior with TeX Live 2020/2021. A quick workaround for this issue would be:

\documentclass[cdfont=true]{tudscrreprt}
\AfterPackage!{siunitx}{%
  \ifcsundef{if@tud@x@siunitx@enabled}{}{\boolfalse{@tud@x@siunitx@enabled}}%
}
\usepackage{siunitx}

\begin{filecontents}{\jobname-temp.bib}
@book{a,title={Test}}
@book{b,title={Test}}
@book{c,title={Test}}
@book{d,title={Test}}
@book{e,title={Test}}
@book{f,title={Test}}
@book{g,title={Test}}
@book{h,title={Test}}
@book{i,title={Test}}
@book{j,title={Test}}
\end{filecontents}

\usepackage[sorting=none]{biblatex}
\addbibresource{\jobname-temp.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

although this could raise other issues regarding siunitx.

Since for package siunitx a new major release v3 was published and is currently fixed quite a lot (https://github.com/josephwright/siunitx/releases) I do have to refactor the interaction with siunitx at all. I hopefully will find some time at the end of this year in order to publish a new major release for tudscr. In general, I am rather reluctant to provide bug fixes for outdated versions.

@0ttoman
Copy link
Author

0ttoman commented Oct 30, 2021

Thank you for getting back to me so soon and thank you for the quick fix!
It works and I didn't see any other issues at first glance.

I totally understand that you don't want to also backport bug fixes, and I will switch to the newest TeX Live soon.

@baloe
Copy link

baloe commented Jan 7, 2022

Unfortunately, this workaround,

\documentclass[cdfont=true]{tudscrreprt}
\AfterPackage!{siunitx}{%
  \ifcsundef{if@tud@x@siunitx@enabled}{}{\boolfalse{@tud@x@siunitx@enabled}}%
}
\usepackage{siunitx}

does not work with more recent latex distributions.

Here is an MWE which compiles fine without siunitx being loaded:

% !TeX TXS-program:bibliography = txs:///biber
% !TeX TXS-program:compile = txs:///pdflatex | txs:///bibliography | txs:///pdflatex

\documentclass{tudscrartcl}

\usepackage{filecontents}
\begin{filecontents}{bibliography.bib}
@article{ref1,  title = {Some really really really really really really long title designed to break into the next line}, author = {Author, Some and Auther, Other} }
@article{ref2,  title = {Some really really really really really really long title designed to break into the next line}, author = {Author, Some and Auther, Other} }
@article{ref3,  title = {Some really really really really really really long title designed to break into the next line}, author = {Author, Some and Auther, Other} }
@article{ref4,  title = {Some really really really really really really long title designed to break into the next line}, author = {Author, Some and Auther, Other} }
@article{ref5,  title = {Some really really really really really really long title designed to break into the next line}, author = {Author, Some and Auther, Other} }
@article{ref6,  title = {Some really really really really really really long title designed to break into the next line}, author = {Author, Some and Auther, Other} }
@article{ref7,  title = {Some really really really really really really long title designed to break into the next line}, author = {Author, Some and Auther, Other} }
@article{ref8,  title = {Some really really really really really really long title designed to break into the next line}, author = {Author, Some and Auther, Other} }
@article{ref9,  title = {Some really really really really really really long title designed to break into the next line}, author = {Author, Some and Auther, Other} }
@article{ref10, title = {Some really really really really really really long title designed to break into the next line}, author = {Author, Some and Auther, Other} }
@article{ref11, title = {Some really really really really really really long title designed to break into the next line}, author = {Author, Some and Auther, Other} }
\end{filecontents}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[style=trad-plain,backend=biber]{biblatex}
\addbibresource{bibliography.bib}

\begin{document}

\nocite{*}
\printbibliography[heading=none]

\end{document}

Screenshot without siunitx

But when adding

\usepackage{siunitx}

or

\AfterPackage!{siunitx}{%
  \ifcsundef{if@tud@x@siunitx@enabled}{}{\boolfalse{@tud@x@siunitx@enabled}}%
}
\usepackage{siunitx}

I get
Screenshot with siunitx

I tested:

  • TeX Live 2021
  • TUD-Script v2.06l
  • siunitx v3.0.11, last revised 2021-06-07

and

  • TeX Live 2021
  • TUD-Script v2.06n
  • siunitx v3.0.11, last revised 2021-06-07

and

  • TeX Live 2021
  • TUD-Script v2.06n
  • siunitx v3.0.38, last revised 2022-01-04

Over at https://tex.zih.tu-dresden.de with texlive 2020.1 the workaround does function though.

@mrpiggi mrpiggi added the bug label Jan 18, 2022
@mrpiggi mrpiggi self-assigned this Jan 18, 2022
@mrpiggi mrpiggi added this to the v2.07 milestone Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants