Ideas on citations

SilverBullet lacks support for citations. (And the worse, there is even no footnotes support, that could be used as very poor workaround.)

Citations are needed for both those who collect notes and those using SilverBullet as a tool for writing.

TL;DR

  1. CommonMark syntax extension

    I propose to extend our CommonMark syntax with syntax for citations, preferebly compatible with the Pandoc citation syntax.

    Good examples with explanations and example rendering can be also found here.

Citations will be collected (indexed) in extra space object(s) to be further used and queried from Lua.

  1. BibTeX support

    I propose to add at least some minimal form of BibTeX support in the page’s frontmatter, e.g.,

    citations:
    
        bibtex.files:
    
            - '/path/to/file.bib'
            - '/path/to/another/file.bib'
    
        bibtex.entries:
    
            - |
            @book{Abelson1996,
                  author    = "Abelson, Harold and Sussman, Gerald Jay",
                  publisher = "MIT Press/McGraw-Hill",
                  title     = "Structure and Interpretation of Computer Programs",
                  year      = "1996"
            }
    
            - |
            @misc{Patashnik1988,
                author = "Oren Patashnik",
                title  = "BIBTEXing",
                year   = "1988"
            }
    
        non-cited:
        # citations patterns for including unused entries in the collection
    
            - '@Patashnik*'
    

    ALTERNATIVE: YAML containing BibTeX entries… (?)

    All of the BibTeX (or alternative) entries will be indexed per page and all sub-pages will have this collection accessible (inherited) in some way. This way different branches of the document tree can have it’s own bibliography “database.” (Special case can be bibliography entries included in the page that serves as the SilverBullet’s index page (a.k.a. “home page”) that will be inherited by all page trees.)

  2. (optional) Bottom widget in Lua

    The widget will show/format citations. While in Lua users could easily override it with custom code/templating.

What do you think?

Related discussion with some additional ideas.

Note: Pandoc also supports YAML BibTeX entries.