#Weired looking bibliography

77 messages · Page 1 of 1 (latest)

somber turret
#

I use the default ieee style and this just looks awful. If there is no Author a whitespace appears bevroe the entry. The entry in the middle is super weiredly stretched. Any idea what could be wrong?

#

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.

novel salmon
somber turret
novel salmon
#

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)

somber turret
novel salmon
#

you could just send here the snippet for the bad entry

#

or just strip the private information

somber turret
novel salmon
somber turret
somber turret
waxen totem
#

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

somber turret
waxen totem
#

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

novel salmon
#

huh

#

that's really weird

#

lol

#

if anything it should be using delimiter in a parent group

waxen totem
#

it is also using that, it has double spacing

novel salmon
#

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)

somber turret
novel salmon
#

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

somber turret
#

Alright. Thanks for the explenation. I will open an issue.

novel salmon
#

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

novel salmon
#

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

waxen totem
#

right i just assumed it because there certainly are two spaces

novel salmon
#

i think this should be the relevant branch

waxen totem
#

oh there are two spaces because author has another space in its suffix

novel salmon
#

that could be a problem but i think the type would be webpage

#

so the problem is missing title probably

waxen totem
#

author is before the type branching

novel salmon
#

but then there would be an extra comma too no?

#

since the suffix is ", " for that

waxen totem
#

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

novel salmon
#

what if you add a title?

#

either way that already demonstrates a problem

#

but yeah

waxen totem
novel salmon
#

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

somber turret
#

@novel salmon Do you think it has a chance to be fixed in the next typst version?

novel salmon
novel salmon
#

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

somber turret
novel salmon
#

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

waxen totem
#

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

somber turret
# novel salmon i.e. this

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.

novel salmon
#

cuz that seems to be the same problem

somber turret