Citations and bibliography

It would be useful if Obsidian could implement a basic mechanism for citing references, which can then be extended with plugins. I think that it should be a core feature / plugin because I fear that plugins will not implement citations consistently.

I also want to stress that what I will describe can useful well beyond academia and does not rely on any external software or format.

Use case or problem

I am using a lot of citations in two different contexts. First, to take notes on what I am reading for my research – for this, the plugin obsidian-citation-plugin is a really promising start since it implements exactly the features I would need in this context.

Second, for more general topics and here the plugin is less useful. For example, I want to refer to a discussion, a seminar or to some book, but without creating an entry in Zotero nor a dedicated Obsidian note for the reasons below.

There are several motivations to have a built-in mechanism:

  1. to not rely on external and specific tools (as pointed in this post)
  2. to setup a standard
  3. uniformize how citations are displayed (both in Markdown preview and PDF export)
  4. to simplify the workflow
  5. to have all the data in one place
  6. combine several citations

Let me discuss why the plugin obsidian-citation has problems here:

  1. rely on an external bibliography file (bibtex or csl-json)
  2. setup its own template (but follows Pandoc, which is good)
  3. rely on normal internal links, so not convenient (appears just as a link, without brackets or anything to show it is a citation, and also information is lost in PDF export)
  4. for every new item, one has to enter it in Zotero (or the software managing the bibliography), export the library, reimport in Obsidian (I have a huge library, so I don’t want to add items I will use in a single note in Obsidian only, and the import/export is really slow)
  5. all the data (authors, title, link, etc.) are saved in a separate Obsidian note, so accessing the information requires to create a note for everything
  6. fail for the same reason as point 3

Finally, let me mention that markdown footnotes are not addressing these problems. There is two major drawbacks:

  1. they don’t allow specifying more information inline (such as page or section), and I find stupid to write several times the same footnote, just changing a page number
  2. referring several times to the same footnote creates new backlinks and it becomes quickly ugly

I think the plugin is great and I am sure it will become a must-have for researchers. However, I think it is important to have citations defined in the core.

Proposed solution

I would suggest the following features to be implement as part of the core:

  1. add pandoc-style citations (see also this page and cite-proc): some text [@someBook, section 2]
  2. allow to list references in the note itself, for example by writing [@someBook]: Author 1, Title of the book (2021)
  3. define basic styling for displaying the citations in Markdown and PDF (for example by dafault: display brackets around citations, list all references in a section at the bottom)
  4. if a citation is not found, then:
    a. look for a file with the same name/alias in the defined citation folder
    b. provide the list to plugins to get information from external sources and process it (for example, from bibtex using pandoc)

Point 2) is not standard. Pandoc allows to put bibliography inside the YAML block, however the format is really verbose, so it explains why I am proposing this way. In particular, it goes well with point 1: if one has to process the files outside Obsidian, it is easy to convert the citations to footnotes by replacing @ with ^ and removing everything after the comma (or doing more processing if there are several citations) as a workaround.

Point 4a) looks like what does the plugin obsidian-citation, but there is a difference. I think the concept of having a special folder collecting all notes related to references makes sense (in the same way that you have a folder for daily notes). Now, these notes can be written by hand or populated using a 3rd party plugin such as obsidian-citation. The point is that one should not be forced to have a note for each citation.

Related feature requests

27 Likes

I support this, but for the record, the citation plugin doesn’t require you to have a note for each citation (I use that plugin a lot). You can insert a [@citekey] citation without having a note for it, and it also automatically adds the bracket. Or, you can also insert a [[citekey]] link for a note if you have one, but these are 2 different commands.
I don’t use Zotero, but with bibdesk, you also don’t need to export and re-import your bibliography each time; you just add an entry, and the library re-loads automatically. I’m not sure how it works with Zotero.
(I think a lot of people who do research use pandoc or something for generating the final bibliography. While writing in markdown is far better than writing in latex, I wouldn’t produce a final text in .md.)

1 Like

Thanks for commenting!

I support this, but for the record, the citation plugin doesn’t require you to have a note for each citation (I use that plugin a lot). You can insert a [@citekey] citation without having a note for it, and it also automatically adds the bracket. Or, you can also insert a [[citekey]] link for a note if you have one, but these are 2 different commands.

Sure, but a citation key alone without information attached to it is not worth a lot. The point is that when you click on it, you are brought to a page (or somewhere) with information (title, authors, url…).
This is not a problem when the information is stored externally and populated when clicking, like does the plugin. However, then we go back to the other problems I mentioned. For example, if I am quoting 30 references for which I only care about title, author and date or url, I don’t want to create 30 reference pages for saving this information, especially if I will never reuse this elsewhere.

I don’t use Zotero, but with bibdesk, you also don’t need to export and re-import your bibliography each time; you just add an entry, and the library re-loads automatically. I’m not sure how it works with Zotero.

You are right, but since I have already everything on Zotero I don’t want to manage a bibtex file externally if I can avoid it.

(I think a lot of people who do research use pandoc or something for generating the final bibliography. While writing in markdown is far better than writing in latex, I wouldn’t produce a final text in .md.)

You are right for a use in academia, but I was thinking to something more general. First, if Obsidian stops to be developed (which I am really not wishing!), the format must be easy to reuse in another Markdown app. Second, pandoc cannot directly read the format I am proposing for the bibliography, so if someone doesn’t want to do the preprocessing to move the bibliography in a separate file or yaml format, he can easily convert to footnotes.

4 Likes

I see. I just thought the Citations plugin is a good start and may be easier to develop further than start with an entirely new thing. I think @jgauthier said he’s thinking of adding citation information (author, full title, …) to a side pane. Not sure about the details there (and due to the way I use things I don’t particularly miss it), but maybe that would help at least partly.
I like the [@citekey] citations precisely because they don’t depend on Obsidian, and I wouldn’t use a citation format that’s not pandoc-able.

Anyway, overall I agree; especially for people who mainly write in markdown (and not export their thing to latex or something), something like this would be helpful.

2 Likes

I like the [@citekey] citations precisely because they don’t depend on Obsidian, and I wouldn’t use a citation format that’s not pandoc-able.

Completely agree, I tried my best in formulating my proposal such that it respects this spirit. It is just unfortunate that pandoc has no (simple) in-document bibliography (like Latex does).

Thanks again for your feedback!

1 Like

This looks like a great start. Like many I would be happy to see a pandoc/citeproc-like way forward here. And just FWIW, Zettlr (https://www.zettlr.com) deals with citations in a fairly elegant way, might be worth a look.

3 Likes

I just tried obsidian-citation plugin which is a good start. I totally agree that there is no need to create a note for every citation. It would be nice if obsidian makes an embedded option of automatically rendering the citation written in Pandoc format as (author, year) or author (year).

1 Like

But… You can ?


It’s the same template form as the note.
You can also change the markdown link form ??

Also, for the auto-update, do you know that you can use Better BibTex in Zotero, so you can auto-update ???
Literally it’s on the README of the plugin :

Also, in Zotero you can change the citekey !
Don’t forget to have your citekey in your pandoc citation, unless it will be not recognize.

Thanks for your suggestion. It seems that Obsidian does not support rendering Pandoc {{citekey}} directly into sth. like author (year) and add APA reference underneath based on the .bib file. I’m right? Because I don’t want to create a note for every citation.

I don’t think Obsidian should replace the functionality of a reference manager. While I understand that some like to have everything under a single app, note-taking and reference management are two very different apps with very different needs.

I disagree with this. I see no reason to reinvent the wheel and create yet another custom syntax to define references. This would also be the way to define references in-document as you mentioned later on the thread. YAML might be verbose, but that’s because the elements required to format a reference demand it.

I agree with the rest, it definitely will be useful and valuable to display in the app and export the formatted references in the PDFs.

I agree with @argentum objections and this is why I created this new FR:

Which basically preaches a strict adherence to the Pandoc-standard and reuse of already existing tools for in-app preview (citeproc-js).

2 Likes

This will insert a Pandoc citation but this does not generate the bibliograhy/

I am well aware of Better BibTex and I am using it since many years. Auto-update works fine for small libraries. I have almost 13000 items, which make export of the full library extremely slow: Zotero / BBT are not designed to handle tasks asynchronously, which means that for a library of this size every action takes a few seconds, so if on top of each edit you add an auto-update, it’s hell (if you read well my first message, I already explained that it’s slow). So the solution is to move only items to be cited to a dedicated folder, but then… it’s again doing micro-management.

Sorry I think that I was not clear enough. I don’t want Obsidian to replace Zotero and serve as a bibliography management (I think merging too many functions is the best way to have something over-complex and slow). My point is to have a way to make give bibliographical information independently of another software (for example, to avoid saving every single link or video in Zotero). For example, let’s say I want to quote a book / video / links with metadata (authors, title, link, etc.) repetitively in a note: you cannot really do it now (footnotes give duplicate, tagged link allows just a link). What would be nice is a way to be able to insert the metadata in a note and be able to quote à la Pandoc without having to use Zotero.

In the current case all the YAML information is not necessary because we just need a proper link between a citation and the corresponding source. To take the example above, if I want to quote a video / book in a note (and in this note only), I don’t want to go through all the YAML writing, I just want to specify somewhere the metadata in the easiest possible way.

Example: write the text

[@Smith02, p. 1] blabla some text, [@Smith02, ch. 3] etc.

add at the end of the note:

[@Smith02]: Smith - Some title (2021)

and just render the same way with links (or replacing [@Smith02, p. 1] with [1, p. 1] as an option). There is no need for YAML metadata.

@WhiteNoise : thanks for the additional FR: for the reasons explained above, I don’t agree with the objections, but I would be already very happy to have pure Pandoc implemented. So if your proposal gets more attention and support, I am in :slight_smile:

1 Like

Isn’t this exactly what a reference manager does?

As an alternative, download your citation as a bib file (which is also a way to do reference management) and put it in your vault, you can call this from pandoc.

Then this is not a proper citation and you could use an existing web clipper to write inline footnotes. Note that the footnote definitions can be written also immediately after the text you wrote and don’t need to go at the end of the file.

What I am explaining is that if I want to cite something in a unique Obsidian note and nowhere else in all my computer, I don’t see the point of inserting it in my reference manager. As I said, I have already 13000 items, if I can avoid adding many entries which I will use in a single context, then it would simplify my life. And current ways to cite (links or footnotes) are not adequate for reasons explained above and again below.

As explained above: generating a bibtex file from Zotero is a very long process in my case (and for anyone having a large library). And I don’t want to maintain two different reference management systems: you can imagine that if I have 13000 items, it’s too much work (and I don’t like pure bibtex management, even with jabref or kbibtex).

Again, I have already explained why footnote are not useful: if you want to refer the same footnote at multiple places, the inline footnote reference is rendered as [1-1], [1-2], etc. And all these back-reference appear after the footnote in the bottom. So if you want to cite something 35 times, you get 35 backlinks in the footnote and it’s ugly. If it were possible to disable backlinks, then this would be fine. The other problem is that if you cite with footnotes and want to add a specification like page number or time in video, then you need to create different footnotes and duplicate all information inside (except if you start using “ibid.” or crazy abbreviations, but I still think that citing should be automated: you give in one place the source information, then you cite possibly with more precise information, and you avoid duplicate of links/backreferences, etc.).

My intention is not to bother you, I am trying to explain the difficulties of what you’re asking. I can see where you are coming from, but it’s considerably hard (at least for me) to imagine a solution which doesn’t require reference management, but provides you all the citation capabilities you want.

By the way, if you are using Better BiBTeX with Zotero I would recommend generating smaller bib files (e.g. by exporting them from a collection). I think probably you’re not citing all 13k of them in obsidian, but even if you are, smaller bib files most likely will help you there. Another option is to have a separate profile for your casual web linking citations: kb:multiple profiles [Zotero Documentation]

Similar topic question. What I’d like to do is create a citation / reference page, say to a book I’ve read and include the full citation on it like this:

then have the ability to link to it as a reference in another document WITHOUT Obsidian considering the initial citation an ‘uncreated’ page.

Right now, the only way I have found to do this, without creating an obtrusive colored blue blockquote, is to make the citation a link. However, when I do this Obsidian sees it as an unresolved link.
I don’t want a bunch of citations showing up on the Graph as links waiting to be turned into pages. They are already a page with a short title, full of notes and meta. I prefer to use the full citation instead of a shortened title page link.

image

I’m not sure I understood exactly what you’re trying to do.

If the citation is already in a page, and I assume under a ## Citation heading, couldn’t you embed that?

I can, I just don’t like the blockquote - If I add multiple references the bottom of my page ends up with a bunch of these blue blocks. Looks messy. I’d like to just have them neatly listed.

You can edit that with css (keep in mind it will apply to all your embeds). Otherwise, personally, I would use pandoc for this.

1 Like

Thanks, @argentum - I’m a complete newbie to pandoc so that may be temporarily over my head. :blush:
I’ll add it to my list of ‘things to learn’. I did check out the site though and I can see why you recommend it.