Refnotes Plugin: New update 1.8.0 - 1.8.7

It would be powerful if RefNotes can integrate with Citation Style Lanuage (Developers - Citation Style Language) with js library (GitHub - Juris-M/citeproc-js: A JavaScript implementation of the Citation Style Language (CSL) https://citeproc-js.readthedocs.io).

2 Likes

I welcome this if a volunteer can develop this as a subplugin or addon

Hey there,

Again, I’m totally okay-iiish with APA7, I remember and can’t imagine the work to go from IEEE bracket’ style-iiish (which was kind of a csl abberation over which you made finally sense inside TW btw…).
I’m okay with anything that is human readable, especially if you don’t have to click and go somewhere from where you won’t be able to get back on your track (TW also annihilate this “navigation” probelm btw…).

This is why my point about what you did inside popovers is actually a true compliment, because it seems to me like the most naturally human readable.

And I don’t really mean we should change anything for now.
But @Zheng_Bangyou is right, If any future dev around styles should undergo, it then should be with CSL and API in order to facilitate the big mess around with citation standards (both human and machines fail on this, mostly because of us, humans). I also have my own “personal human readable” .csl with emoji-ready identification type of sources. But It’s another story hhh.

Unfortunately, this dev around the .csl is way above my knowledge. I hope It would suggest interest for those who see something interesting here. :slight_smile:

Refnotes just got a new update.

See original post above: Refnotes Plugin: New update 1.8.0 - 1.8.5 - Plugins - Talk TW (tiddlywiki.org)

2 Likes

Hi Mohammad,

Thanks for creating Refnotes. It’s really useful!

One problem I’m experiencing is, after importing a bibtex entry, the titles of most articles cannot be converted properly, as they often contain “{ }”. For example:

Emergence of {White}-{Lie} {Telling} in {Children} {Between} 3 and 7 {Years} of {Age}

I’m not sure what caused this. I’ve been only using Zotero to export bibtex.

Have you heard about this problem from others?

Thanks,
Yi

1 Like

Zotero requires a few configuration to work better with refnotes. See my notes from here: Using Refnotes and Zotero in Tiddlywiki | Bangyou Zheng

4 Likes

If the attached view template is imported, any bibtex-entry tiddler will render links to Zotero and major web links,

image

$__plugins_kookma_refnotes_viewtemplates_links.json (2.0 KB)

2 Likes

The Tutorial states " From Refnotes 1.8.4 it is recommended to use cite macro instead of ref. By the way they are exactly the same."

If I use “cite” instead of “ref” in 1.8.5 the bibtex-entry-tiddler shows: "Cited in No tiddler has cited this reference.
Using “ref” lists the tiddlers, that cite the reference, correctly.

Thank you for reporting the issue. I will push a patch.

Bye the way, cite is a synonyme to ref, it is more meaningful and is inspired from bibtex.

Fixed in Refnotes 1.8.6. See Refnotes Plugin: New update 1.8.0 - 1.8.6 above!

Could we implement two new filters 1) all tiddlers citing a literature 2) all literature cited in a tiddler?

I try to work on it, but beyond my knowledge of js and tiddlywiki.

This is my current implementation of cited filter which seems working. But I am sure the regular expression is not correct as I don’t know how to convert the regular expression from wikitext to js string

  <$let pattern-ref ="""<<ref[\s\['"]*?$refname$['"\s\]]*?.*>>""" 
        pattern-cite="""<<cite[\s\['"]*?$refname$['"\s\]]*?.*>>""" 	
	>
/*\
title: $:/plugins/kookma/refnotes/filters/cited.js
type: application/javascript
module-type: filteroperator

Filter operator for list cited literature

\*/
(function(){

/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";

/*
Export our filter function
*/
exports.cited = function(source,operator,options) {
	var results = [];
    source(function(tiddler,title) {
		var patternref = '<<ref.*' + title + '.*>>';
        var patterncite = '<<cite.*' + title + '.*>>';
        var pattern = "[all[tiddlers]search:text:regexp[" + patternref + "]sort[title]] [all[tiddlers]search:text:regexp[" + patterncite + "]sort[title]]";
        var data = options.wiki.filterTiddlers(pattern);
        results.push(...data);
	});
	return results;
};

})();

$__plugins_kookma_refnotes_filters_cited.js.json (1.1 KB)

Hi @Zheng_Bangyou

I think Refnotes has both of these macros.

  1. showres lists all references in a tiddler
  2. any bibtex entry (e.g. any reference) uses viewtemplate to list all tiddlers cited it

Thanks @Mohammad, I know these macro, but want to use them in the filter to display relationship of citing and cited.

Ah sorry! I did not read the OP carefully! You are looking for new filter operators!

Hi @Mohammad

I too am interested in the numbered format or even a footnote format for citation entries. I’m looking at this for my Kansas railroad wiki and most history texts that I’m familiar with use footnotes and not inline citations. I find they are less distracting and not as disruptive to the reading of the text.

I tried going back to prior versions, but couldn’t find anything as old as prior to 1.5 (maybe it’s me not being too familiar with GitHub.

Is there any chance we could see a footnote style citation or somehow integrate the existing footnotes to utilize bibliography entries?

Thanks in advance!

@HistoryBuff
I am afraid I do not understand what you need. The current Refnotes has both footnote and cite macro.
The footnote macro shows a number where it is used and only on mouse hover displays the footnote content. Then you can use showfnotes at the tiddler bottom or in a separate tiddler to list your footnotes. I think this is what you mean.

You can find old revisons at Release page: Releases · kookma/TW-Refnotes (github.com) Not every update is stored there, but you can find old ones like Refnotes 1.0

Yeah, I apologize for not making my desires clearer. Bottom line is that I would like to use the ref or cit macros, but have them show as a number that is superscripted like a footnote. Not sure how difficult this would be.

Release 1.8.7

Thanks for the sharing your tutorial link. Through your usage, I can imagine a simpler workflow:

As a developer,

  1. Write a zotero plugin that calls betterbibtex plugin (if it provides API), provides a button
  2. when button clicked, use API to set those config, and export a bibtex
  3. plugin calls Tiddlywiki nodejs’s REST API, to import the bibtex (may need a custom route, added by a new bibtex-server-side-import plugin)
  4. autocopy ref key to clipboard
  5. optionally, wysiwyg editor or codemirror-enhanced editor provides autocomplete for macro, which use a setting tiddler to set a filter(this is provided by refnote plugin), so when you type /ref, it autocomplete the ref key

so as a user:

  1. Click a button to import bibtex
  2. type /ref, autocomplete the key
1 Like

Also thank @Mohammad for your plugin.

I wonder what is your workflow to work with zotero?