Foam: Use .bib files for citation and links

Created on 2 Sep 2020  路  1Comment  路  Source: foambubble/foam

Hi!

While studying a new topic, I try to find papers and store them in jabRef and I would like to link a paper from this library in a markdown file with something like this:
More at [@BibTexKey].

Currently I solve it with a set of .md files in a _papers_ folder inside my Foam workspace. Each file represents one paper.
BibTexKey.md:

key: _BibTexKey_
author: _authors_
title: _title_
abstract: _long abstract_

Is it possible to do this in more elegant way?

Most helpful comment

I also use bibtex heavily and can share my solution.

I put my .bib file in the root folder. For VS Code, I use the plugin Pandoc Citer, which gives autocomplete for the references from the .bib file. As an aside, I use Markdown Preview Enhanced to get a formatted view of my markdown files that renders using pandoc in VS Code (I'm a longtime pandoc user).

For the rendered website, I added a script that runs each markdown file through pandoc. I'm using eleventy to generate my website, so I use node-pandoc in a javascript file that is called during the build step. The pandoc args that I find work well are _metadata.yml -t gfm -F pandoc-citeproc -s -o ${file} where _metadata.yml contains the headers that apply to each markdown document - this is where I define my bibliography file, but there are other ways to do that. The -t gfm outputs GitHub flavored markdown, which I find works the best as an input to eleventy. the pandoc-citeproc filter converts all the @BibtexKey strings into actual citations. I could probably just use pandoc to generate the final html files, but this is my current solution and it works.

>All comments

I also use bibtex heavily and can share my solution.

I put my .bib file in the root folder. For VS Code, I use the plugin Pandoc Citer, which gives autocomplete for the references from the .bib file. As an aside, I use Markdown Preview Enhanced to get a formatted view of my markdown files that renders using pandoc in VS Code (I'm a longtime pandoc user).

For the rendered website, I added a script that runs each markdown file through pandoc. I'm using eleventy to generate my website, so I use node-pandoc in a javascript file that is called during the build step. The pandoc args that I find work well are _metadata.yml -t gfm -F pandoc-citeproc -s -o ${file} where _metadata.yml contains the headers that apply to each markdown document - this is where I define my bibliography file, but there are other ways to do that. The -t gfm outputs GitHub flavored markdown, which I find works the best as an input to eleventy. the pandoc-citeproc filter converts all the @BibtexKey strings into actual citations. I could probably just use pandoc to generate the final html files, but this is my current solution and it works.

Was this page helpful?
0 / 5 - 0 ratings