From 8e14ba20d193ef7d50ebbc90511834a4de3cefa2 Mon Sep 17 00:00:00 2001 From: Homer S Date: Sat, 22 Jan 2022 18:32:03 +0100 Subject: [PATCH] Ready for first release? --- README.md | 16 ++++++++++++++++ lektor_citation.py | 5 ++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8b3a39c..7d4859e 100644 --- a/README.md +++ b/README.md @@ -54,3 +54,19 @@ produces
{publisher}
``` +3. You may also use the citation\_entry method in combination with [pybtex*s __Entry__-class](https://docs.pybtex.org/api/parsing.html#pybtex.database.Entry). For example: + +``` + +``` +This creates an unordered list of all the titles of your bibtex file. +Of course you can also use citation\_entry without a loop and put any id of your bibtex entries into it as parameter. + +## Limitations +It would be awesome if one could use s.th. like a _cite(id)_-function in the entire project to automatically convert it to proper links to the literature list. +Like e.g. ```Stahl (2015)``` +But as the only templates can make use of the functions this won't be possible for the markdown content of the page. Or maybe I just don't know how to implement this :shrug: diff --git a/lektor_citation.py b/lektor_citation.py index 874b102..f862ca1 100644 --- a/lektor_citation.py +++ b/lektor_citation.py @@ -173,11 +173,10 @@ class CitationPlugin(Plugin):
{issbn}
{publisher}
-""".format(eid = id, link = link, authors = authors, pubYear = year, title = e.fields['title'], edition = edition, publisher = publisher, editors = editors, pages = pages, issbn = issbn, note = note) + +""".format(eid = id, link = link, authors = authors, pubYear = year, title = e.fields['title'], edition = edition, publisher = publisher, editors = editors, pages = pages, issbn = issbn, note = note) return output - - def on_setup_env(self, **extra): def decode_filter(value): return LatexNodes2Text().latex_to_text(value)