Closed mpmdean closed 12 months ago
Having checked this a bit more, it seems to be a bigger issue. It appears that typst never seems to include the volume even in the most standard test I can devise.
If I download basic.yml from https://github.com/typst/hayagriva/tree/main/tests/data
and produce a bibliography as below. It also misses the volume. I would say that the #bibliography
function has a bug that will stop it from being useful for pretty much all scientific users?
I really like typst, and appreciate the work done on it to date, so I hope this can be addressed
@kinetics
#bibliography("basic.yml")
It seems that the volume
is stored in the article's parent but hayagriva retrieves directly from the entry and gets none.
NumberVariable::Volume => self.volume().map(MaybeTyped::to_cow),
If I change this line to the following code and the volume
is printed out as expected.
NumberVariable::Volume => self
.get_container()
.and_then(|e| e.volume())
.map(MaybeTyped::to_cow),
$ cargo run --features=cli -- test.bib cite --csl american-physics-society.csl
Finished dev [unoptimized + debuginfo] target(s) in 0.06s
Running `target/debug/hayagriva test.bib cite --csl american-physics-society.csl`
[1]
A. Einstein, B. Podolsky, and N. Rosen, Can Quantum-Mechanical Description of Physical Reality Be Considered Complete?, Phys. Rev. 47, 777 (1935)
Thanks a lot @zepinglee !
This looks like a quite simple, but very valuable thing to get fixed soon.
Description
Citing using the american-physics-society style appears to have a bug that the
volume={47},
field does not appear.main.typ is
ref.bib is
This produces a document with a missing volume field. I reproduced this in the typst.app and in a fresh brew install on my mac locally.
Reproduction URL
No response
Operating system
No response
Typst version