List filter for bibliography

102 views
Skip to first unread message

Dave Gifford - http://www.giffmex.org/

unread,
Dec 11, 2017, 5:50:46 PM12/11/17
to TiddlyWiki
Hi all

I want to build bibliographies using the listwidget.

The outer list would be a list of topics, tiddlers that are tagged to from tiddlers that have content in their bibentry field.

The list under each entry of the outer list would be a transclusion of the bibentry field of the tiddlers that tag to the topics.

Example:

Technology (topic)

Transclusion of bibentry field of Tiddler 'Book A' which has a Technology tag
Transclusion of bibentry field of Tiddler 'Book B' which has a Technology tag

Warfare (topic)

Transclusion of bibentry field of Tiddler 'Book C' which has a Warfare tag
Transclusion of bibentry field of Tiddler 'Book D' which has a Warfare tag

I can get close to this, but the lists I get always also contain all the other outer topics, including the ones for which there are no tiddlers with bibentry fields that tag to those topics.

I scoured this group and my old experiments to see if I already had something like this, but I can't find anything.

TonyM

unread,
Dec 11, 2017, 6:55:21 PM12/11/17
to TiddlyWiki
Just a Quick Question that may help,

Do you have a filter that says all this but not that?, such that when there is no inner entry nothing is displayed?

In a similar case I had three lists, The second and third list are not themselves nested.


The first lists all topics
the second ends with limit[1} and displays the header eg Technology (topic)
the third is not limited and displays the details "inner" within the topic. 

Pseudo code

List all Topics

Header List /end list - Includes all this but not that  and limit[1]
Detail List /end list - all this but not that no limit

/end topic list

Regards
Tony

Dave Gifford - http://www.giffmex.org/

unread,
Dec 11, 2017, 7:06:39 PM12/11/17
to TiddlyWiki
Hi TonyM

Thanks for your response. My problem is I don't know what the first list needs to be. Here is what I had:

<<$list filter="[!is[system]!tag[Sources]sort[title]]">

<h2><$view field="title"/></h2></$list><$list filter="[all[current]tagging[]]"><span class="indent1"><$transclude field="bibentry" mode="block"/></span></$list>

</$list>

I set it up that way since all the tiddlers not tagged Sources are game. But I don't see the way to filter them, since the bibentry fields are not in those tiddlers but in the tiddlers tagged Sources. The inner part works fine. It is the outer part that needs to be defined better.

Dave Gifford - http://www.giffmex.org/

unread,
Dec 11, 2017, 7:09:30 PM12/11/17
to TiddlyWiki
oops no here is the correct list I had

<$list filter="[!is[system]!tag[Sources]sort[title]]"><h2><$view field="title"/></h2><$list filter="[all[current]tagging[]]"><span class="indent1"><$transclude field="bibentry" mode="block"/></span></$list></$list>


On Monday, December 11, 2017 at 6:55:21 PM UTC-5, TonyM wrote:

TonyM

unread,
Dec 11, 2017, 7:22:17 PM12/11/17
to tiddl...@googlegroups.com
Dave,

So I would have thought something like this (not tested), remove comments

Sorry, I do not have time to give you the full solution. It needs to be changed so that the topic header refers to the correct value, perhaps set a variable=topic in <!-- Display relevant Topic header -->
So that the reference to title means the eligible Tiddlers, how do you differentiate topics?

<$list filter="[!is[system]!tag[Sources]sort[title]]"> <!-- All eligible Tiddlers


<!-- Display relevant Topic header -->

<$list filter="[all[current]tagging[]limit[1]]">

<$view field="title"/>
<!-- Only display title if there is more than one detail
</$list> <!-- end one title if details exist



<!-- Display relevant Topic details -->


<$list filter="[all[current]tagging[]]">
<span class="indent1"><$transclude field="bibentry" mode="block"/></span>

</$list>
<!-- end details list


</$list> <!-- end All eligible Tiddlers




The above contains the coding pattern I suggest, it assumes your two filters are correct for your application

Eligible tiddlers

"[!is[system]!tag[Sources]sort[title]]

Details
"[all[current]tagging[]]"

Regards
Tony

TonyM

unread,
Dec 11, 2017, 7:23:30 PM12/11/17
to TiddlyWiki
OOps small eror, will edit above

On Tuesday, 12 December 2017 11:22:17 UTC+11, TonyM wrote:
Dave,

So I would have thought something like this (not tested), remove comments

Dave Gifford - http://www.giffmex.org/

unread,
Dec 12, 2017, 3:35:42 PM12/12/17
to TiddlyWiki
Hi Tony M,

Thank you for your kind and generous efforts. Your solution turns up basically what mine does, a list of ALL the topics, and the relevant bibliographic data under those that topics for which there are sources. But since I want to hide the vast majority of topics, because they do not have sources for them, I am still where I started.

My outer list filter is what I want help changing, so that it shows only those topic tiddlers which are tagged to from other tiddlers and those tiddlers that tag to them have data in their bibentry field. I seem to recall doing something like this once, but can't find it anywhere.

Blessings, Dave

TonyM

unread,
Dec 12, 2017, 5:43:30 PM12/12/17
to TiddlyWiki
Dave,

Try writing some Psudocode to describe what you want to do, then look at how to replace each element with TiddlyWiki code.

Separate each logical filter into clear statements, establish the list nesting pattern. Then we can continue to resolve it.

Regards
Tony
Reply all
Reply to author
Forward
0 new messages