Hi Willem,
I'm not a HTML/CSS person so someone else might have a better suggestion,
but if you look at the page for the context plugin
<http://contextplugin.tiddlyspot.com/> there is a section called
"Customizing the output" which explains how you can use CSS to style the
output.
N.B. There is a typo on that page - you need to use the tag
"$:/tags/Stylesheet" with "Stylesheet" capitalized.
Anyway for your case you can create a tiddler, call it something useful and
add this text:
.tw-context { font-family: Arial, Helvetica, sans-serif;}
Now tag it with "$:/tags/Stylesheet" and save. That seemed to work when I
tested it.
On Tuesday, 28 April 2020 18:33:13 UTC+1, Willem Hagendoorn wrote:
>
>
> That was exactly what I needed! Thanks.
>
> Last question (sorry :)): I tried to change the font of the results. I
> managed to change the color and adjust other style options, but I can't
> figure out how to change the font of the search results. Any ideas?
>
> I have tried this code to change the color: works.
>
> *<$set name="this-tiddler" value=<<currentTiddler>> >*
> *<$list
> filter="[!is[system]all[current]backlinks[]!tag[hide]!tag[outlines]tag[Case
> Law]sort[title]] -[is[current]]"><$link><$view field="title"/></$link><span
> class="indent1"></span><font color="blue"><$context term=<<this-tiddler>>
> length="50" /></font>*
> *</$list>*
> *</$set>*
>
> I have tried this code to change the font: doesn't work.
>
> <$set name="this-tiddler" value=<<currentTiddler>> >
> <$list
> filter="[!is[system]all[current]backlinks[]!tag[hide]!tag[outlines]tag[Case
> Law]sort[title]] -[is[current]]"><$link><$view field="title"/></$link><span
> class="indent1"></span><font face="arial">'<$context term=<<this-tiddler>>
> length="50" /></font>
> </$list>
> </$set>
>
>
>
> Thanks again! Really appriciate your help!
>
>
>
>
>
>
>
> Op dinsdag 28 april 2020 18:16:22 UTC+2 schreef si:
>>
>> Hi Willem,
>>
>> You can (almost) do this with the context plugin
>> <http://contextplugin.tiddlyspot.com/>, which is already included in
>> TiddlyBlink. I'm not sure if there's a way to specifically show a
>> paragraph, but you can show any number of characters either side of a
>> search result.
>>
>> I had included it in my original solution, but you can apply the same
>> thing to Anne-Laure's approach just as easily.
>>
>> First you want to set your search term to be the title of the current
>> tiddler, so surround *all* of your code with this:
>>
>> <$set name="this-tiddler" value=<<currentTiddler>> >
>>
>> ...the rest of your code...
>>
>> </$set>
>>
>> Now instead of transcluding a tiddler you can use this:
>>
>> <$context term=<<this-tiddler>> length="50" />
>>
>> Where in this example you will see 50 characters either side of you
>> search term.
>>
>> Let me know if it works, si.
>>
>> On Tuesday, 28 April 2020 16:37:44 UTC+1, Willem Hagendoorn wrote:
>>>
>>> Thank you so much Anne Lauren, David and Si.
>>>
>>> I've tested all your suggestion, it turns out that Anne Laurens solution
>>> works best for me. Besides the fact that this a solution to my question,
>>> it's a nice introduction in coding. Awesome.
>>>
>>> One more question: When the link refers to a tiddler with a lot of text,
>>> all text of that tiddler is shown in the 'simple transclusion mode':
>>>
>>> [image: Schermafbeelding 2020-04-28 om 17.33.51.png]
>>>
>>> Is it possible to show just the specific fragment/paragraph/sentence the
>>> link is refering to, and hide all the other text? So in the picture above,
>>> only the sixth paragraph would supposed to be visible.
>>>
>>> Thanks again!
>>>
>>>
>>>
>>>
>>>
>>> Op maandag 27 april 2020 19:05:00 UTC+2 schreef si:
>>>>
>>>> Hi Willem,
>>>>
>>>> Here is one of many possible approaches.
>>>>
>>>> Create a tiddler, call it whatever you like, and add the following code:
>>>>
>>>> \define list-backlinks(category)
>>>> <$set name="this-tiddler" value=<<currentTiddler>> >
>>>> <$list filter="[<currentTiddler>backlinks[]tag<__category__>last[]]">
>>>> <h3>''<<__category__>>''</h3>
>>>> </$list>
>>>> <$list filter="[<currentTiddler>backlinks[]tag<__category__>]">
>>>> <$link><<currentTiddler>></$link>
>>>> <$context term=<<this-tiddler>> />
>>>> </$list>
>>>> </$set>
>>>> \end
>>>>
>>>> <hr>
>>>>
>>>> <h2>''References''</h2>
>>>>
>>>> <<list-backlinks category:"Case Law">>
>>>>
>>>> <<list-backlinks category:"Legislation">>
>>>>
>>>> <<list-backlinks category:"Literature">>
>>>>
>>>> Now tag this tiddler that you have just created with
>>>> "$:/tags/ViewTemplate".
>>>> Your lists should now appear at the bottom of every tiddler in your wiki.
>>>> I
>>>> am assuming that you are using the tags "Case Law", "Legislation" and
>>>> "Literature".
>>>>
>>>> Since you are using TiddlyBlink, you may wish to replace one of the
>>>> references lists that are already featured. To do this, instead of
>>>> creating
>>>> your own tiddler, find the tiddler called
>>>> "$:/.giffmex/ViewTemplate/refscontext" and replace the text with the above
>>>> code. Remember to backup before doing this!
>>>>
>>>> Then you will be able to view your category list by clicking on the eye
>>>> button and selecting "search results in context".
>>>>
>>>> Hopefully that works. Unless I made a mistake, which is very possible.
>>>>
>>>> On Monday, 27 April 2020 08:18:32 UTC+1, Willem Hagendoorn wrote:
>>>>>
>>>>> Hi all!
>>>>>
>>>>> Only yesterday I discovered TiddlyWiki, so I'm totally new to this.
>>>>> Since the possibilities are limitless, or so it seems, I was wondering if
>>>>> someone can help me out with the following.
>>>>>
>>>>> I would like to organize the tiddler's backlinks and display them
>>>>> sorted by subject.
>>>>>
>>>>> I also would like to show the specific fragment (and nothing else) the
>>>>> link is refering to in the list
>>>>>
>>>>> For example:
>>>>>
>>>>> --Tiddler--
>>>>> About Human Rights
>>>>>
>>>>> --References/backlinks--
>>>>>
>>>>> + Legislation
>>>>> Tiddler about art. A, law Z
>>>>> (Art. A mentions -Human Rights-)
>>>>>
>>>>> Tiddler about art. B, law Z
>>>>> (This art. can also be used when conducting research about -human
>>>>> rights-)
>>>>>
>>>>>
>>>>> + Case Law
>>>>> Tiddler about case H
>>>>> (textfragment -human rights-)
>>>>>
>>>>> Tiddler about case I
>>>>> (textfragment -human rights-)
>>>>>
>>>>>
>>>>> +Literature
>>>>> Tiddler about book A
>>>>> (textfragment -human rights-)
>>>>>
>>>>> Tiddler about book B
>>>>> (textfragment -human rights-)
>>>>>
>>>>>
>>>>> I hope this (or something similar) is possible! Can someone help me
>>>>> out? :)
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Willem
>>>>>
>>>>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/8cc13a11-8ccb-46d5-9d09-8fd2f73d5bac%40googlegroups.com.