Refnotes Usage Issue

I’ve been using Refnotes 1.8.3 — references, citations, footnotes and abbreviations in Tiddlywiki for quite a while now with great success. Love it.

I’m now trying to do something that is giving me some difficulty and that is using Refnotes in relation to viewtemplates. This is for my Kansas Railroad TW. Below is the code in my ViewTemplate:

\import $:/plugins/kookma/section/macros/main

<div class="tufte">
  <$list filter="[all[current]tag[Railroads]]" variable="dummy">
    <h2>Incorporation</h2>
      __Charter Summary__<<fnote {{!!infosource}}>><p/>
      The {{!!title}} was chartered as a {{!!gauge}} gauge railroad in the state of {{!!statefiled}} on <$macrocall $name="date-str" date={{!!charterfiled}}/> (Vol. {{!!chartervolume}}, page {{!!charterpages}}) and was signed by {{!!signers}}
      <p/>
      It was chartered to build a railroad {{!!proposedroute}}
      <p/>
      It's term of existence was set at {{!!term}} and the capital stock was set at {{!!capital}}
      <p/>
      <$list filter="[all[current]has[stockholders]]">
        The stockholders for the company were {{!!stockholders}}
        <p/>
      </$list>
      The directors or incorporators were {{!!directors}}.
    <h2>History</h2>
      <$transclude tiddler="Mileage Table for Template Inclusion" field=text mode=block />
      The {{!!title}} existed as a company from its charter on <$macrocall $name="date-str" date={{!!charterfiled}}/> to 
        <$let date={{!!successiondate}}
          >
          <$list filter="[title<currentTiddler>tags[]] -[[Railroads]] -[[principal]] :and[!is[blank]]">
            <$macrocall $name="date-str" date=<<date>>/> when it was taken over by the <$link> <<currentTiddler>> </$link>.
          </$list>
          <$list filter="[title<currentTiddler>tags[]] -[[Railroads]] -[[principal]] :and[is[blank]]">
            <$macrocall $name="date-str" date=<<date>>/>.
          </$list>
        </$let>
      <$transclude field=text mode=block />
      <div style="float: left;">
        <h2>References</h2>
          <<showfnotes filter:"[title[Railroad ViewTemplate]] [title<currentTiddler>]" >>
        <h2>Further Information</h2>
          <div style="font-size: 0.9em;">
            <<tabs "[[Summary Tab]] [[Route Map]] Trackage [[Railroad Predecessors]] [[Railroad Successors]] [[Associated]] [[Railroad Cross-references]] [[Railroad Status Checkboxes]]" "Summary Tab" "$:/state/rrfootertab" "footertabs">>
          </div>
      </div>
  </$list>
</div>

It all works fine except for one thing. The line that begins with __Charter Summary__ is pulling the source of the information from a field in the railroad tiddler. This works fine for the superscript and popup, but the showfnotes macro is trying to pull the information from the infosource field of the template tiddler. Thus there is a number in the footnotes list, but its text is blank because that field doesn’t exist in the template tiddler. I’ve tried several different things and have had no success. Would love some input from the smart community on this one.

Thanks in advance.

Bumping this to the top to keep attention on it. I’m kind of stuck until I get this resolved. Any ideas would be appreciated.

Thanks!

Perhaps you could reduce this to a simpler example that demonstrates the same issue, place it on a tiddlyhost wiki, install refnotes and the effort required for others to work on you problem would be less of a hurdle.

  • Often in trying to give a minimal example to seek others help you solve the problem yourself.
1 Like

Thanks @TW_Tones

Sage advice to keep in mind.

I have managed to find a solution, albeit very specific to my use case. I’m in a short break from a genealogy zoom session and will post the solution later this weekend.

The problem ended up being caused the the showfnotes macro from Refnotes not being able to see the field I was trying to use as my footnote. The fnote macro worked and showed the number and the transcluded field, but showfnotes only showed the footnote number because it was looking in my ViewTemplate for the field which didn’t exist.

I finally solved my issue by modifying the showfnotes macro for my specific use case to look in the field of the transcluded tiddler to find the footnote information. I’ve attached a screenshot of what the final result looks like:

The issue was with the charter summary information for the first footnote. That is in a field specific to each individual railroad.

This is a very specific solution, but may give some inspiration to other folks who end up having a similar issue. It’s also a separate macro from the showfnotes macro so I don’t mess up my footnotes that I have elsewhere in my TW.

I’ve attached the ViewTemplate and the new macro for reference.

Railroad Showfnotes.json (1.0 KB)
Railroad ViewTemplate.json (6.5 KB)

1 Like

Just for clarity, I should mention that I started down this road because I wanted to have a template that would extract information from the fields of each railroad and have words around that information instead of a table like I had previously. It just reads and looks better and also works much better on mobile (but I still have a long way to go there). The table the I used to have (as can be seen in How do you use Tiddlywiki in your research work? - #11 by HistoryBuff), I had an infobox with the information contained in the fields and the text field as the text to the left of the infobox. This new approach just seems more pleasant and easy to read. Besides, so far, most of the railroads don’t have anything in the text field and it looked silly with a blank tiddler and an infobox. This fills it all in for me that way. I can then use the text field to add details and further information that shows up in that History section.

Anyway, sorry for the ramble. I just wanted to give the backstory.

1 Like