[TW5] [Plugin Idea] Referencing tool for researchers

151 views
Skip to first unread message

Zyb

unread,
Apr 15, 2017, 3:27:23 PM4/15/17
to TiddlyWiki
With the new plugin for BibTeX import announced in the TW pre-release, I would like to suggest a referencing plugin. I don’t have the knowledge and resources to develop it myself, but I can offer suggestions and testing for what I think would be a valuable contribution to TW for research and academic publishing purposes.

The BibTeX import creates tiddlers with title = citationKey and writes all data entries into fields. A referencing plugin would provide two main functions: a) in-text citation and b) insertion of a bibliography/works cited list; both functions would ideally be configurable according to different academic style conventions with – again: ideally – the possibility to customise or add new styles.

a) In-text citation

The two main styles of in-text citation used in academic texts are footnotes and inline citation. The latter usually consists of an entry like "(Author Year: Page)", without the quotation marks. A TW reference could usefully look like a macro `<<cite source:'citationKey' page:'54' style:'APA' format:'([field:bibtex-author] [field:bibtex-year]: [page])'>>`. (I don’t really know whether this notation is correct.) All parameters except source would be optional, style and format should be globally configurable. Style could take options like `APA`, `MLA`, `Chicago` and the like, or `FN` for footnotes. An autocomplete option for the citationKey or an easy preview would be cool.

The HTML output should be a in a `CITE` element with a fixed CSS class that can be manipulated if necessary.

b) Bibliography

A `<<bibliography>>` macro should collect all `<<cite>>` entries and generate a customisable list of the respective bibliographical entries, either as footnotes with preceding numbers in the order they appear in the text, or as works cited list sorted by author name. The entries need to conform to the globally configured style, or to a custom format. Parsing BibTeX data into a correct bibliographical entry can be fairly involved but I would hope that solutions for this already exist (Zotero.org has xml style templates which could be used or serve as inspiration).

It would be useful if the bibliography can be inserted anywhere, so the macro should take a parameter `<<bibliography tiddler:'tiddlerName'>>`.

Useful configuration options for the bibliography macro (overriding global style settings) would be:

* Number of author names to display in full before et al. abbreviation is used [integer].
* Provide links for online sources (if available) [boolean].
* First names initialised instead of displayed in full [boolean].
* Force use of title case for publication titles (regardless of BibTeX data) [boolean]. (This would need another parser.)

The HTML output should be nested in a `DIV` element with a fixed CSS class that can be manipulated if necessary.

I’d be interested in any comments.

Thanks for reading!
Tyll

Zyb

unread,
Apr 18, 2017, 4:07:14 PM4/18/17
to TiddlyWiki
I did play around a little over Easter after all, and made first steps adapting Thomas Elmiger’s TextStretch Footnotes: https://tid.li/tw5/hacks.html#TextStretch%20Footnotes%20Extracted%20as%20List

This, combined with templates to parse the BibTeX entries and CSS tweaks could go into the right direction, e.g.

<<strex content:"{{bishop_2010||tLong}}" label:"{{bishop_2010||tShort}} 59" class:"hint">>

could theoretically be made to display as (Bishop 2010: 59), with a popup note containing the full reference, in this case Bishop, Kyle William. American Zombie Gothic: The Rise and Fall (and Rise) of the Walking Dead in Popular Culture. Jefferson, N.C.: McFarland & Co., 2010. Print.

In practice, this gets too complicated, though, when it comes to parsing the BibTeX entries in the templates tShort and tLong: I simply don’t know enough about manipulating field values (string variables) in TW or how to integrate possibly already existing style parsers. For example, the bibtex-author field for the above example has the value "Bishop, Kyle William" -- how do I even extract the last name from this? The bibtex-title field has the value "
American {Zombie} {Gothic}: {The} {Rise} and {Fall} (and {Rise}) of the {Walking} {Dead} in {Popular} {Culture}" which enables title case -- but how do I get rid of the curly parentheses?

I don’t seek answers for these questions right now, I just document here what kinds of problems need to be solved.

I’ll put this on ice for now. If anyone is interested pursuing this, I promise eternal gratitude ... :)

Best,
Tyll
Reply all
Reply to author
Forward
0 new messages