typst / hayagriva

Rusty bibliography management.
Apache License 2.0
347 stars 54 forks source link

Some entries in thesis and report bibliography items are not shown #112

Open gdietl opened 11 months ago

gdietl commented 11 months ago

Description

When citing a Master Thesis or Technical Report, only the author(s), the title and the year is shown. Information about the institution/school and the month of the publication are not printed. I converted the corresponding bib-files into yml-files using hayagriva and all information is correct there. So, it seems to be a problem of the CSL file. However, I tried a couple of different style files and couldn't resolve the problem.

Reproduction URL

No response

Operating system

No response

Typst version

Enivex commented 11 months ago

Have you checked this in main / 0.10 preview, or only 0.9?

gdietl commented 11 months ago

I checked it with the latest git version, i.e. typst 0.9.0 (9926a594). I couldn't find any 0.10 preview version.

zepinglee commented 11 months ago

Can you provide a minimal reproducible example?

gdietl commented 11 months ago

Using the following bib-file

@techreport{report1,
author = {Robert Swearingen},
title = {Morpholoty and syntax of British sailors’ English},
series = {Technical Report},
number = {249},
institution = {Profanity Institute},
address = {New York, NY},
year = {1985}
}

@techreport{report2,
author = {Robert Swearingen},
title = {Morpholoty and syntax of British sailors’ English},
series = {Technical Report},
number = {249},
publisher = {Profanity Institute},
address = {New York, NY},
year = {1985}
}

@mastersthesis{thesis,
title        = {A Study of Example},
author       = {Jane Doe},
year         = 2022,
month        = {June},
address      = {Example City, CA},
note         = {Available at \url{https://example.com/thesis.pdf}},
school       = {University of Example},
type         = {Master thesis}
}

and the typst-file

@report1 @report2 @thesis

#bibliography("ref.bib")

yields image

Using hayagriva to produce the yml-file yields

report1:
  type: report
  title: Morpholoty and syntax of British sailors’ English
  author: Swearingen, Robert
  date: 1985
  location: New York, NY
  organization: Profanity Institute
  issue: 249
  parent:
    type: report
    title: Technical Report
report2:
  type: report
  title: Morpholoty and syntax of British sailors’ English
  author: Swearingen, Robert
  date: 1985
  publisher: Profanity Institute
  location: New York, NY
  issue: 249
  parent:
    type: report
    title: Technical Report
thesis:
  type: thesis
  title: A Study of Example
  author: Doe, Jane
  date: 2022-06
  location: Example City, CA
  organization: University of Example

So, you see that the yml-file is produced correctly while the presentation in the resulting pdf is not.

For the moment, a workaround is to use the publisher entry instead of institution which is compiled correctly.

zepinglee commented 11 months ago

I can reproduce them. CSL use publisher field as report's institution or thesis's school and hayagriva doesn't map them correctly.

Yet it's the expected behavior that the month is not printed out in a thesis entry. See IEEE's reference guide http://journals.ieeeauthorcenter.ieee.org/wp-content/uploads/sites/7/IEEE_Reference_Guide.pdf (accessed from https://journals.ieeeauthorcenter.ieee.org/your-role-in-article-production/ieee-editorial-style-manual/). The date has only the year part.

Screenshot 2023-12-04 at 18 31 15