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

pages field too strict #103

Closed
mpmdean opened this issue Dec 13, 2023 · 2 comments · Fixed by #104
Closed

pages field too strict #103

mpmdean opened this issue Dec 13, 2023 · 2 comments · Fixed by #104

Comments

@mpmdean
Copy link
Contributor

mpmdean commented Dec 13, 2023

Description

The pages entry in articles is too strict. If, as is common for modern articles, the pages entry is a single value, typst ignores it where regular bibtex would simply print it.

main.typ is

If I cite a paper such as  @Shen2023electronic where the pages is a single value, the pages entry is ignored.

Note that modern articles are often specified with a single page number. e.g.
https://journals.aps.org/prx/abstract/10.1103/PhysRevX.13.011021

#bibliography("refs.bib",
style: "american-physics-society")

ref.bib is

@article{Shen2023electronic,
  title = {Electronic Character of Charge Order in Square-Planar Low-Valence Nickelates},
  author = {Shen, Y. and Sears, J. and Fabbris, G. and Li, J. and Pelliciari, J. and Mitrano, M. and He, W. and Zhang, Junjie and Mitchell, J. F. and Bisogni, V. and Norman, M. R. and Johnston, S. and Dean, M. P. M.},
  journal = {Phys. Rev. X},
  volume = {13},
  issue = {1},
  pages = {011021},
  numpages = {9},
  year = {2023},
  month = {Feb},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRevX.13.011021},
  url = {https://link.aps.org/doi/10.1103/PhysRevX.13.011021}
}

}

Screenshot 2023-12-12 at 9 57 46 PM

Operating system

  • mac and typst.app

Typst version

  • I am using the latest version of Typst

Thanks for all the great work on Typst and hayagriva!

Drodt pushed a commit to DerDrodt/hayagriva that referenced this issue Dec 13, 2023
@Drodt Drodt mentioned this issue Dec 13, 2023
@DerDrodt
Copy link
Contributor

I fixed the issue in #104. The pages entry is actually not too strict. The problem was that your style doesn't use the page variable but page-first, where a range was expected by hayagriva.

Something else you might want to look at: In your bibliography, the issue is missing. That's because your style expects the issue to be in the number variable (which is not ideal). Maybe fix that yourself or contact the maintainers of the style. As far as I can see, hayagriva behaves correctly in this case.

@mpmdean
Copy link
Contributor Author

mpmdean commented Dec 13, 2023

Thanks @DerDrodt !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants