Skip to content

Feature request: Render citations and bibliography #284

Open

Description

@smatts

Feature request: Render citations and bibliography in LiaScript

When using LiaScript in an academic setting, e.g. for lectures or supplementary materials, it would be good to be able to include citations that are rendered into a bibliography and to reference those.

In pandoc, there is the option to render citations using --citeproc (see pandoc citations). References in the form of [@reference] (or for in-text references simply @reference, for more see pandoc citation syntax) are rendered in a number of styles. A bibliography is created either at the end of the document or inside the <div id="refs"></div> tag inside the document. Sadly, using pandoc for this task is not easy since pandoc does not support the custom LiaScript syntax and escapes many of its elements, so basically it breaks LiaScript-specific Markdown elements. This is why I think it might be nice to include citation rendering natively in LiaScript if possible.

Example

Example for an APA-style citation:

This is an example [@reference].

->

This is an example (Author et al., 2026).

and resulting bibliography

Author, O., Author, T., Author, T. & Author, F. (2026). Example title: Example publisher. https://doi.org/10.0000/exampledoi

Activity

  1. andre-dietrich commented on May 15, 2026

    @andre-dietrich
    Member

    Hi @smatts ... we have been at HackOERthon that is why my answer is a bit delayed. However, it is possible to use citations in LiaScript there exists an extension:

    https://github.com/liatemplates/citations

    Here is a little example how you can use it:

    LiveEditor

    <!--
    import: https://raw.githubusercontent.com/LiaTemplates/citations/refs/heads/main/README.md
    
    @onload
    window.citationStyle = "ieee"
    window.bibliographyLoad("https://raw.githubusercontent.com/LiaTemplates/citations/refs/heads/main/bibtex.bib")
    @end
    
    -->
    
    # Citations
    
    @ref(dietrich2019liascript)
    
    @ref(DietrichZug2026LiaScriptWebsite)
    
    ## Bibliography
    
    @bibliography.global

    I hope this works for you ...

  2. smatts commented on May 19, 2026

    @smatts
    Author

    Awesome, thank you, I did not see that!

  3. Just-Jannis commented on Jul 5, 2026

    @Just-Jannis

    Hi,
    thank you for the explanation on how to use a BibTeX file as a bibliography / table of references in LiaScript and how to cite entries from it within the text.
    I have a follow-up question: Is it possible to generate the bibliography in such a way that only the BibTeX entries that are actually cited in the document are displayed?
    At the moment, it seems that all entries from the BibTeX file are shown in the bibliography, even if they are not referenced anywhere in the text. I would like the bibliography to include only the sources that are actually used/cited in the LiaScript document.
    Is there already a way to achieve this, or would this require a custom solution?
    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions