typst / hayagriva

Rusty bibliography management.
Apache License 2.0
313 stars 47 forks source link

Narrative citation for two authors with APA uses `&` instead of `and` #186

Closed poopsicles closed 1 month ago

poopsicles commented 2 months ago

Using Typst version 0.11.1 with a bibliography entry with two authors and attempting to render in the "prose" format shows it in the format a & b (year) instead of a and b (year).

From Author–Date Citation System:

Parenthetical citation: (Salas & D’Agostino, 2020) Narrative citation: Salas and D’Agostino (2020)

However with Typst, compiling:

# ref.yml

markov:
  type: article
  title: A Sequence-based Selection Hyper-heuristic Utilising a Hidden Markov Model
  author:
    - Kheiri, Ahmed
    - Keedwell, Ed
  date: 2015
  page-range: 417-424
  url: https://doi.org/10.1145/2739480.2754766
  serial-number:
    doi: 10.1145/2739480.2754766
    isbn: "9781450334723"
  abstract: Selection hyper-heuristics are optimisation methods that operate at the level above traditional (meta-)heuristics. Their task is to evaluate low level heuristics and determine which of these to apply at a given point in the optimisation process. Traditionally this has been accomplished through the evaluation of individual or paired heuristics. In this work, we propose a hidden Markov model based method to analyse the performance of, and construct, longer sequences of low level heuristics to solve difficult problems. The proposed method is tested on the well known hyper-heuristic benchmark problems within the CHeSC 2011 competition and compared with a large number of algorithms in this domain. The empirical results show that the proposed hyper-heuristic is able to outperform the current best-in-class hyper-heuristic on these problems with minimal parameter tuning and so points the way to a new field of sequence-based selection hyper-heuristics.
  parent:
    type: proceedings
    title: Proceedings of the 2015 Annual Conference on Genetic and Evolutionary Computation
    publisher: Association for Computing Machinery
    location: Madrid, Spain
    parent:
      type: proceedings
      title: GECCO '15
// main.typ

A sequence-based heuristic selection strategy (SSHH) was presented in the work of
#cite(<markov>, form: "prose") and applied to the domain of high school timetabling. 

#bibliography(
  ref.yml,
  title: "References",
  style: "american-psychological-association",
)

Results in:

A sequence‑based heuristic selection strategy (SSHH) was presented in the work of 
Kheiri & Keedwell (2015) and applied to the domain of high school timetabling. 

image

I'm not sure if this is a problem with the CSL, or Hayagriva itself, but maybe I'll try to check later.

poopsicles commented 1 month ago

i opened this here originally and #188 in typst/typst, but that got moved, so closing this since it's a dupe