Refnotes/Bibtex modification?

286 views
Skip to first unread message

Keelan Cook

unread,
Oct 27, 2020, 9:47:09 AM10/27/20
to TiddlyWiki
Hello all. Quick question. I'm rather inexperienced when it comes to coding, and just now dipping my toes in the water of adjusting aspects of TiddlyWiki.

I'm currently using both the bibtex plugin and the refnotes plugin for academic research. Of recent, I've started playing with a pop-up function that allows me to hold shift and mousover a bibtex link and reveal the contents of that tiddler. 

However, the refnotes plugin (which displays the fields of a reference tiddler in a nice format) uses a view template to do so (at least I think it does). I would prefer if the list widget it's using would somehow display in the text field for the tiddler itself. 

Is there a (simple-ish) way to modify this so that the refnotes plugin inserts this list into the text field of each bibtex reference tiddler instead of where it currently puts it?

Sorry if the description is unclear, I'm still learning how to describe this stuff as well! Any help would be much appreciated, and I'm happy to follow-up with more information.

Thanks.

Saq Imtiaz

unread,
Oct 27, 2020, 9:54:47 AM10/27/20
to TiddlyWiki
Hi Keelan,

If you're able to share your file, or a simplified (and sanitized) version of it, it would be a lot easier to understand what you want to achieve and how to go about it.

Feel free to send it to me privately if you do not wish to post it publicly, along with step by step instructions to see the different elements you describe.

Cheers,
Saq

Keelan Cook

unread,
Oct 27, 2020, 11:22:01 AM10/27/20
to TiddlyWiki
Thanks Saq, I appreciate the offer to help. 

I'll pull it together later today and try to get something soon.

Keelan Cook

unread,
Oct 27, 2020, 8:58:44 PM10/27/20
to TiddlyWiki
Saq, I created a quick empty.html with the relevant plugins. It's actually an instance of the TiddlyResearch edition. I know it has modified core tiddlers, but decided to take it for a test drive. Though, I don't believe that is relevant to this specific question.

In the file, you'll see I've loaded a number of tiddlers from a bibtex import. The bibtex plugin parses a bibtex file and creates a tiddler for each reference with the corresponding bibliographic fields filled out in the tiddler. 

The refnotes plugin takes these fields and styles them in the reference tiddlers created by importing the file. So, if you open one of these reference tiddlers you see at the bottom, under where the text field contents are displayed, the title, date of publication, etc. The plugin appears to be doing this with $:/plugins/kookma/refnotes/viewtemplate/bibtex. What I would like to do is take this styled information and move it into the text field contents itself instead of it showing up below it.

With the TiddlyResearch plugins, holding shift will cause a popup on mouseover that reveals the text field of a linked tiddler. However, with this styled information showing up where it does, it will not show up in the popup. That's why I want to move it. 

Let me know if you have additional questions or need anything else to give it a look. Again, thanks for the help!

Keelan


empty.html

Atronoush Parsi

unread,
Oct 28, 2020, 3:07:11 AM10/28/20
to tiddl...@googlegroups.com
Hi Keelan,
While Saq will give you a better answer, I just have a look at your wiki! 
Each reference is stored as a tiddler! This is what is done by the BibTex Importer plugin (official one)
In the reference tiddler all data is stored as user fields lik bibtex-author, bibtex-title etc...
Now, you want all of them in the text field! The best is a view template! So you can edit $:/plugins/kookma/refnotes/viewtemplate/bibtex
to meet your requirements!

Wait for complete and elegant solution by Saq



--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/83c52755-aabb-486a-a313-06f829fce473n%40googlegroups.com.

Keelan Cook

unread,
Oct 28, 2020, 6:03:12 AM10/28/20
to TiddlyWiki
That was my initial guess, that I could edit that specific tiddler to move the styled contents into the text field. I'm just not sure what I need to edit to make it do so. I dug around for decent bit looking for that answer, and I couldn't figure it out.

I must admit, I've rarely used the list widget and view templates so far. I know I'm just scratching the surface with TiddlyWiki because of it. Perhaps this is a way to ease into that.

Saq Imtiaz

unread,
Oct 28, 2020, 6:30:19 AM10/28/20
to TiddlyWiki
Hi Keelan, I'm buried under a few other tasks today but will get back to you tomorrow, if no else beats me to it.

Since you mentioned TiddlyResearch, this may also be of interest:

Cheers,
Saq

Keelan Cook

unread,
Oct 28, 2020, 5:55:40 PM10/28/20
to TiddlyWiki
Oh no worries! This is no rush for me. I'm just fiddling to polish my workflow, so don't make this any kind of priority.

As for the additional project you've referenced, that also looks very promising. I'll poke around with it some too! It's really neat to see all the directions you can take a TiddlyWiki file.

Thanks for everyone.

Saq Imtiaz

unread,
Oct 29, 2020, 3:32:32 PM10/29/20
to TiddlyWiki
Keelan,

I think the best solution for your needs it to customize the template for the popup to use the template from the refnotes plugin.

Edit the tiddler $:/plugins/tobibeer/preview/template so it has the following content

<div style="overflow-y:auto; height: 500px !important; font-size: 12.5px;">

!!! <$link>{{!!title}}</$link>
{{||$:/core/ui/ViewTemplate/tags}}
{{||$:/plugins/sq/streams/breadcrumbs-view-template}}

{{!!text}}
{{||$:/plugins/sq/streams/stream-view-template}}
{{||$:/plugins/kebi/tiddlyresearch-references/filters}}
{{||$:/plugins/kookma/refnotes/viewtemplate/bibtex}}
</div>

The highlighted line is what we are adding.
Perhaps make a suggestion to the TiddlyResearch author to make the popup template customizable via tags.

Hope this helps,
Saq

Keelan Cook

unread,
Oct 30, 2020, 5:54:05 AM10/30/20
to TiddlyWiki
Of course. It didn't cross my mind to make the edit to the preview plugin itself instead of changing the refnotes plugin.

Worked like a charm. That was a simple and elegant solution. I will also reach out to the author and make that suggestion. Seems like a wise idea.


Reply all
Reply to author
Forward
0 new messages