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

Feature request: publications list from bib or yml file #1

Open
joelnitta opened this issue Dec 9, 2024 · 4 comments
Open

Feature request: publications list from bib or yml file #1

joelnitta opened this issue Dec 9, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@joelnitta
Copy link

Thanks for the extension!

As an academic researcher, I'm used to handling references in a .bib or .yml file. It would be great to be able to automatically print out the publication list from such a file (like setting bibliography: references.yml in the yml header).

@kazuyanagimoto kazuyanagimoto added the enhancement New feature or request label Dec 9, 2024
@kazuyanagimoto
Copy link
Owner

kazuyanagimoto commented Dec 9, 2024

Hi! I am also thinking of implementing that feature now.

If your use case is to have a single .bib or a Hayagriva .yml, printing a bibliography with full: true option works in a Typst document. So if you add the following native Typst code in your .qmd file, it will work.

```{=typst}
#bibliography("references.bib", full: true)
```

The only difficulty is to use multiple bibliographies. Currently, Typst does not allow to print different bibliographies typst/typst#1097. However, a natural use case in a CV is to have separate bibliographies by the type of documents (peer-reviewed journal articles, discussion papers, book chapters, etc.).

I may need to develop a YAML parser as https://typst.app/universe/package/modern-acad-cv does, so I have to figure out what is the best way to implement it.

@joelnitta
Copy link
Author

What about implementing one bibliography as a start? If the implementation of multiple bibliographies is completely different from single it might not be worth the time, but if they are similar it might be a good start.

@kazuyanagimoto
Copy link
Owner

If it is a single bibliography, as I mentioned above, the default Typst bibliography() function is enough. You can add the following code to your .qmd file, and it will work.

```{=typst}
#bibliography("references.bib", full: true)
```

You can choose a reference style from tons of styles they prepared. See the Typst documentation for the details.

@joelnitta
Copy link
Author

Oh cool, thanks. I was trying to use the YAML bibliography: key.

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

No branches or pull requests

2 participants