Ready for first release?
This commit is contained in:
parent
c75ab3fd79
commit
8e14ba20d1
16
README.md
16
README.md
|
@ -54,3 +54,19 @@ produces
|
|||
<dd>{publisher}</dd>
|
||||
</dl>
|
||||
```
|
||||
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:
|
||||
|
||||
```
|
||||
<ul>
|
||||
{% for entry in citation_entries() %}
|
||||
<li>{{ citation_entry(entry).fields['title'] |decode }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
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. ```<a href="/myproject/literature/#Stahl2015" class="litref">Stahl (2015)</a>```
|
||||
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:
|
||||
|
|
|
@ -173,11 +173,10 @@ class CitationPlugin(Plugin):
|
|||
<dd>{issbn}</dd>
|
||||
<dt class="publisher"></dt>
|
||||
<dd>{publisher}</dd>
|
||||
</dl>""".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)
|
||||
</dl>
|
||||
""".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)
|
||||
|
|
Loading…
Reference in New Issue