Recognise pandoc citations as Obsidian links

Use case or problem

A key part of many Zettelkasten systems is a special category of “literature note.” The essential usefulness of literature notes is that references to a specific piece of literature connect to the relevant literature note. In the case of Obsidian, this would mean that ideally, references to a piece of literature would link to the literature note, and that the literature note would display a backlink to the places it is cited.

The problem is that in academic work, the typical way to refer to a piece of literature is by a citation. The syntax for a citation is different to the syntax for a link.

The problem is not confined to literature notes — effectively, a literature note is a way of summarising an artefact which exists externally, and bibliography managers such as Zotero are able to track more types of artefact than simply literature.

Another category of artefact which often forms part of a note system is archived web pages.

Proposed solution

In org-roam-bibtext (an Emacs package), citations are turned into links, which if opened generate a new literature note. From then on, any other citations to the same item are a link to the original literature note.

This seems like an elegant solution. Literature notes should not be created merely for the existence of a citation. They should only be created when a user requests creation (e.g. a prompt when the citation link is opened).

The key element of a solution is first-class support for pandoc citation syntax as an Obsidian link: [prenote @CiteKey postnote] or @Citekey — see Pandoc citation syntax for the details.

I am not proposing support for citation rendering, just recognition of pandoc citations as valid Obsidian links.

Current workaround (optional)

The obsidian-citation plugin has all the mechanisms for building a Zettelkasten, but it has to choose between citing a reference (using Pandoc syntax) or linking to a literature note.

If Obsidian recognised Pandoc citations as Obsidian links, then the plugin would be able to connect citations back to the literature notes.

Related feature requests (optional)

This requests something similar, but is for actual citations. My feature request is simply for recognition within Obsidian of Pandoc citations as a first-class link to the appropriate note.

6 Likes

I cannot agree more.

1 Like

In my opinion there is an important distinction here between a citation and a link to a literature note, and I don’t agree they are the same.
Making pandoc style citations links should open the original reference, not my notes (often with my own ideas) about it.

Related: Zotero integrations - #44 by argentum

1 Like

You read my mind. Hence why:

2 Likes

What about: when a citation link is clicked, it offers options, which include “Open note”, “Open reference item”, “Open linked PDF”? That preserves the optionality while giving access to the literature note functionality.

The other key thing is backlinks from the literature note to all citations…

1 Like

How would that link be represented in the graph view?

In my opinion, linking and citing are two different things and there should be no ambiguity about which one is which. I wouldn’t use them interchangeably so right clicking doesn’t make sense to me, not to mention that it adds extra steps for opening the notes by having to right-click, making it inconsistent with all the other notes in the rest of the vault.
This also assumes the PDF is stored in the vault and can be identified somehow as belonging to that particular reference. All this makes the link resolution unnecessarily opaque I think, instead of knowing exactly (and explicitly) what I am linking when I write something down.

2 Likes

Interesting and relevant discussion! My workaround for the moment is:

[@AuthorTitleYEAR, 45-56]%%[[@AuthorTitleYEAR]]%%

This way you have a proper Pandoc reference and an Obsidian Link (if you need one). When I render my connected noted into a PDF (I use my own python script to aggregate the final draft from notes before it is sent to pandoc), the Obsidian link is removed and causes no issues, while pandoc references are processed and typeset properly.

Perhaps I am not understanding the goal here but couldn’t one use aliasing to create a link to the literature note that appears like a pandoc cite? A quick test worked for me:
[[test link | [@citekey] ]]

This renders in preview mode as [@citekey] but functions as a link to the page “test link,” which could just be named for the item of literature by whatever convention one desires. The alias could also include whatever pre/postnote, and it would be pretty trivial to fashion an Alfred/Keyboard Maestro/Autohotkey/etc. text replacement to automate the syntax a bit.

Generally speaking, I strongly agree with @argentum on the citation/literature note distinction. In published work, the citation is meant to point to the original source. I use it the same way in my notes and outlines. Having it instead link to my notes on the article seems inconsistent with the typical purpose of citations. Also, I could envision using pandoc-style citation links to particular pages within the item of literature itself, which would only ever be useful as links to the document.

1 Like

You could do this, of course - but that wouldn’t make any sense because the [@citekey] couldn’t be rendered anymore by pandoc, I guess - which is the only reason of using it.

I am quite sympathetic to this possibility, because from a citation in one of my note, I should be able to access easily both the source information and my comments on that work. However, I don’t think it’s incompatible with the view from @argentum and @WhiteNoise.

In preview mode one can add a link next to the bibliographical information to the literature note (if it exists). For edit mode, it’s fine to link directly to the literature note (if it exists): if one follows the proposal from the FR Support Pandoc-style citations with Citeproc-js engine @citekey [@citekey] and relative Bibliography, bibliographical information would be displayed in another pane or preview and there is no meaning to make a link to it. When exporting or using publish, links to literature notes should be omitted (for the reasons argued above).

@melsophos I don’t think this addresses the main point: ambiguity between the original source and our notes when writing or reading. I really don’t think we should be using citations and our notes interchangeably. This solution would only remove the “extra steps to open a note” problem, but the main issue is still there.