mirror of
https://gitlab.com/octtspacc/OcttKB
synced 2025-01-09 13:23:57 +01:00
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
tags: $:/tags/Refnotes/Template
|
|
title: $:/plugins/kookma/refnotes/viewtemplates/helper
|
|
type: text/vnd.tiddlywiki
|
|
|
|
\define citedIn(refname)
|
|
<$vars pattern="""<<ref[\s\['"]*?$refname$['"\s\]]*?.*>>""" >
|
|
<$list filter="[all[tiddlers]search:text:regexp<pattern>sort[title]]"
|
|
template="$:/core/ui/ListItemTemplate"
|
|
emptyMessage="""//No tiddler has cited this reference//""" />
|
|
</$vars>
|
|
\end
|
|
|
|
\define display-bibtex-field()
|
|
<div class="refnotes-bibtex-field">
|
|
<span><$text text={{{ [<currentField>removeprefix[bibtex-]titlecase[]] }}} /></span>
|
|
<span><$transclude tiddler=<<currentTiddler>> field=<<currentField>> mode=inline /></span>
|
|
</div>
|
|
\end
|
|
|
|
<$let tv-wikilinks="no">
|
|
<!-- display main bibtex fields -->
|
|
<$list filter="[enlist<mainFields>]" variable=currentField>
|
|
<<display-bibtex-field>>
|
|
</$list>
|
|
|
|
<!-- display other bibtex fields -->
|
|
<details class="refnotes-details">
|
|
<summary>More details</summary>
|
|
<$list filter="[<currentTiddler>fields[]prefix[bibtex]sort[]] -[enlist<mainFields>]" variable=currentField>
|
|
<<display-bibtex-field>>
|
|
</$list>
|
|
</details>
|
|
</$let>
|
|
|
|
<!-- show the list of tiddlers cited this reference -->
|
|
; Cited in
|
|
: <$macrocall $name=citedIn refname=<<currentTiddler>> /> |