#Weired looking bibliography
77 messages · Page 1 of 1 (latest)
The weirdly stretched one comes from par(justify: true). That is fixable for me. but what is going on with the whitespace.
But that kind of stretch is stil stuper weired.
Thanks a lot. Sadly the fix does not work in my document.
i think thats a different issue then
the issue i linked is about it not justifying to the full text width
but im not sure what could cause extra spacing on that entry
(maybe you should send the bibliography file you're using)
Am, I allowed to send it as DM to you, since it contains semi private information?
you could just send here the snippet for the bad entry
or just strip the private information
That entry is safe to share for me:
un-sicherheitsrat-bpb:
type: web
url:
value: https://www.bpb.de/themen/internationale-organisationen/vereinte-nationen/48583/sicherheitsrat-der-vereinten-nationen/
date: 2025-03-01
not sure but i think it might just be treating [7] as part of the line and so assigning the same spacing to it
That could indeed be the case. But I assume that is not supposed to happen?
And why does not have no affect in the other entries.
seems that leading spaces aren't always trimmed properly and the ieee csl is doing some weird stuff where it always adds an additional space before the URL access information even when there already is one or when it's at the start of the entry
Yeah. Seems like it. I only have it in ieee style.
you could copy that csl file into your project and remove the offending prefix=" ". I'm not sure if there are any other cases where this prefix is necessary though
huh
that's really weird
lol
if anything it should be using delimiter in a parent group
it is also using that, it has double spacing
lol
@somber turret feel free to open an issue in hayagriva and we can mark it as upstream
then hopefully someone will poke upstream about it
(i guess you could do that too if you want)
I am not in the deps of typst and curious. Why is this a hayagriva issue and not a typst issue?
hayagriva is our library to render bibliography
typst just outputs what hayagriva tells it to
so extra spacing, weird text etc. is all due to hayagriva and not the typst compiler
Alright. Thanks for the explenation. I will open an issue.
i mean you dont have to know that though, we will move your issue to hayagriva if you create one in typst/typst, so dont worry too much about it
it appears to not have it in this line: https://github.com/citation-style-language/styles/blob/f715cd4df63f3a6e70e15bc877a793f56e315558/ieee.csl#L356
which is interesting
hmm huh
i cant seem to find it?
in any of the usages
oh maybe the problem is that whatever is before it is missing
right i just assumed it because there certainly are two spaces
oh there are two spaces because author has another space in its suffix
that could be a problem but i think the type would be webpage
so the problem is missing title probably
author is before the type branching
ah no the suffix is not shown in the entry above, i tested what happens when i add an author and only then i get two spaces
then it looks correct, no leading space and no double space afterwards
that tracks
so that's just it, they're not using a group with a space delimiter, but adding ad-hoc spaces to prefixes and suffixes :p
I opened this issue for it https://github.com/typst/hayagriva/issues/283
this is what my yaml looks like: un-sicherheitsrat-bpb: type: web url: value: https://www.bpb.de/themen/internationale-organisationen/vereinte-nationen/48583/sicherheitsrat-der-vereinten-nationen/ ...
@novel salmon Do you think it has a chance to be fixed in the next typst version?
it depends on upstream fixing it
i.e. it has to be fixed at this repo https://github.com/citation-style-language/styles/
however you dont need a new typst version to fix it
you can load your own .csl file
so you can take ieee.csl from that repo and modify it to remove the extra space in the prefix in the "access" macro
though it might be a bit more work to make a more general fix which doesnt break other entries
it'd involve adding delimiter=" " to <layout> under <bibliography> and then removing additional spaces from all prefixes and suffixes in underlying macros
well, i guess it's just a bit of manual work
but if you do it then you should also submit it as a PR to that repo
I do not mean the csl. I mean the weired issue when having justify: true.
Are you not referring to the spacing in the entry?
i.e. this
that is caused by an additional space at the start of the entry which the CSL style is inserting
so the fix is exclusively through the csl file
i'm wondering though if leading/trailing/duplicate spaces should be trimmed by typst in general. according to this comment duplicate spaces should be trimmed, but i couldn't find that in the spec
Yeah. Thats what I ment. But there is also the general space that is there even whithout justify. Thats the one I do not ment.
do you mean the one in entry [4]?
cuz that seems to be the same problem
yup