uwdata / living-papers

Authoring tools for scholarly communication. Create interactive web pages or formal research papers from markdown source.
BSD 3-Clause "New" or "Revised" License
127 stars 10 forks source link

cite-ref fails when given name is missing #52

Closed joshuahhh closed 1 year ago

joshuahhh commented 1 year ago

This line fails when given is missing (say, the author is a company): https://github.com/uwdata/living-papers/blob/1b3f0bb4e20abbf47e400a794226b365d8e09588/packages/components/src/cite-ref.js#L119

tu21897 commented 1 year ago

Thanks! This was also affecting all single word names. The simple fix would result in this format: company -> company, company two -> c. two. However, if there needs to distinction between the names of people and special cases, then the input might need to change.

Currently, it assumes that all passed author names are the names of people. It would be difficult to differentiate between the name of a person and a special case. Would it be better to use a separate field for special cases? For example...

@inproceedings{placeholder,
  title={placeholder},
  company={company},
  year={placeholder},
  doi={placeholder}
}

Or add syntax?

@inproceedings{placeholder,
  title={placeholder},
  author={@company and author1 and author2},
  year={placeholder},
  doi={placeholder}
}

Or another approach?