Closed halsimov closed 6 months ago
My current workaround is to put the genre in the publisher because, in ieee style, those two pieces of informations are close together.
Every type doesn't have every field, and even when they do, a style doesn't have print all of them. I doubt this is an actual bug.
I am pretty sure genre is required in these cases. Here is ieee csl style for report followed by thesis
<else-if type="report">
<group delimiter=", " suffix=".">
<text macro="title"/>
<text macro="publisher"/>
<group delimiter=" ">
<text variable="genre"/>
<text variable="number"/>
</group>
<text macro="issued"/>
</group>
<text macro="access"/>
</else-if>
<else-if type="thesis">
<group delimiter=", " suffix=".">
<text macro="title"/>
<text variable="genre"/>
<text macro="publisher"/>
<text macro="issued"/>
</group>
<text macro="access"/>
</else-if>
Anyway why would hayagriva and typst have two different outputs for the same reference and style when the latter use the former to render bibliographies ?
I have a similar problem: I can't seem to get the genre's value in CSL in bib file.
...
<bibliography>
<layout>
<text macro="citation-number" />
<choose>
<if type="book" match="any">
<text variable="title" />
<text variable="genre" />
</if>
</choose>
</layout>
</bibliography>
...
@book{1,
title = {Any title},
genre = {tutorial},
}
I can't use subtitle
because it's not defined in CSL, but genre
is: https://docs.citationstyles.org/en/stable/specification.html#standard-variables. So is title
. And since title
is printed and genre
isn't, it has to be a bug.
It looks like archive
and part-title
don't work as well. But abstract
and annote
do. How much more of them are not usable?
As a "temporary" workaround I added this:
<macro name="genre">
<group prefix=": ">
<choose>
<if variable="genre">
<text variable="genre" />
</if>
<else>
<text variable="annote" />
</else>
</choose>
</group>
</macro>
I can reproduce this in Typst 0.10, but not in Typst 0.11, so looks like it's fixed already.
Can confirm that archive
, abstract
, annote
, title
, and genre
fields are working in v0.11.0, but part-title
still isn't.
Description
I was unable to get typst to render the following references correctly, and the outcome differs from that of hayagriva. The good way is to print genre for reports and thesis.
Minimum reproducible example
Here is the
refs.yaml
:Here is the hayagriva code:
With the following output:
A. First and A. Second, “My Awesome Tech Report,” My Lab, My University, Tech. Report, 2023. doi: 10.48550/arXiv.2312.xxxxx.
And here is my typst code:
with the following result :
System
cargo -V
: cargo 1.76.0 (c84b36747 2024-01-18)uname -srvm
: Linux ashton-laval 5.14.0-1057-oem #64-Ubuntu SMP Mon Jan 23 17:02:19 UTC 2023 x86_64hayagriva -V
: Hayagriva CLI 0.5.2typst -V
: typst 0.10.0 (70ca0d25)