From 685e76862f1f524fe2205bad918aaa4cad453d21 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Fri, 15 Apr 2016 00:28:23 +0200 Subject: [PATCH] Basic bibliography support --- Makefile | 4 ++-- README.md | 5 +++++ notes.bib | 13 +++++++++++++ notes.md | 10 +++++++++- 4 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 notes.bib diff --git a/Makefile b/Makefile index f369c0e..0fe3f9e 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ ASCIIMATH=filters/asciimath/pandoc-asciimath HS_FILTERS_NAMES = PY_FILTERS_NAMES = pandoc-svg.py -EXT_FILTERS = pandoc-crossref $(ASCIIMATH) +EXT_FILTERS = pandoc-crossref pandoc-citeproc $(ASCIIMATH) HS_FILTERS = $(addprefix filters/, $(HS_FILTERS_NAMES)) PY_FILTERS = $(addprefix filters/, $(PY_FILTERS_NAMES)) @@ -18,7 +18,7 @@ all: $(HS_FILTERS) $(ASCIIMATH) $(OUT) pandoc -S --toc -t latex $< $(addprefix --filter=, $(FILTERS)) -o $@ $(HS_FILTERS): - ghc --make $@.hs -o $@ + ghc --make $@.hs -o $@ $(ASCIIMATH): (cd filters/asciimath; make filter-only) diff --git a/README.md b/README.md index 76fb8ef..b401ca6 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,8 @@ include them in the document easily. easy numbering and referencing. * Include [asciimath](https://github.com/Kerl13/AsciiMath) for easy math typing. + +* Include [pandoc-citeproc](https://github.com/jgm/pandoc-citeproc) for + bibliography management and citation. See [this part of Pandoc + README](http://pandoc.org/README.html#citations) as well for more infos on + this. diff --git a/notes.bib b/notes.bib new file mode 100644 index 0000000..04f8f7a --- /dev/null +++ b/notes.bib @@ -0,0 +1,13 @@ +@article{foobar, + doi = {10.1209/0295-5075/111/40005}, + url = {http://dx.doi.org/10.1209/0295-5075/111/40005}, + year = {2015}, + month = {aug}, + publisher = {{IOP} Publishing}, + volume = {111}, + number = {4}, + pages = {40005}, + author = {Lucas Verney and Lev Pitaevskii and Sandro Stringari}, + title = {Hybridization of first and second sound in a weakly interacting Bose gas}, + journal = {{EPL}} +} diff --git a/notes.md b/notes.md index 6f87ad4..12e1e3f 100644 --- a/notes.md +++ b/notes.md @@ -6,16 +6,24 @@ date: \today # Pandoc-crossref options cref: True chapters: True +# Pandoc-citeproc options +bibliography: notes.bib +link-citations: True +lang: en-US +reference-section-title: References +nocite: --- \pagebreak # AsciiMath example -The following asciimath code +The following asciimath code sum_(k=1)^n k^3 = ((n(n+1))/2)^2 will be rendered the following way $$ sum_(k=1)^n k^3 = ((n(n+1))/2)^2 $$ + +this is a citation [@foobar].