Tinderbox Forum

Studying classical texts with Tinderbox

I’d like to share a pleasant experience I had with Tinderbox this semester, organizing my studies on classical texts.

The thread about possible uses of Tinderbox with the TEI (Text-Encoding Initiative) XML format is very inspiring. Ultimately, I would want to work with something I could export and make available with the TEI Publisher. This is an idea related to a project I’m coordinating in a particular seminar, where we’ll perhaps in the near future make experiments to work collectively using that platform (and later on make something publicly available). The desired result is to present the original (Greek) texts, translations, philological notes and philosophical comments side by side and interactively. That can be beautifully done with that platform (see the Van Gogh Letters demo).

But before arriving at this more ambitious project, I started thinking about how could I structure primary texts and comments, starting with my own personal notes. I’ve found out, first, that Tinderbox native “Add Footnote As Sibling” (^⌥⌘F) command and the Map View can be combined in a mighty tool for that purpose (without any coding). The ability to select portions of relevant text to comment and having them as note titles (names) allows for excellent visualizations:

I used this kind of view extensively on graduate seminars (which were all online because of the pandemics). There’s a great deal of information you can scan while giving a lecture or discussing. (Of course, it helps to use a 27” monitor, which is indeed a good investment if you work deeply with Tinderbox Map View or mind map applications).

Following some of Mark Bernstein’s indications on the TEI thread, I employed the following structure:

  1. An author/work/book element, such as Aristotle’s Physics Book I. This will be the container for the Map View, a note that itself has no text content.
  2. Primary text chunks. In Aristotle’s case, for example, I’m usually following the traditional division of chapters (usually < 100 lines of text). In some other cases, the segmentation depends on the subject and interest for my research (thematic selections, for instance, or fragment numbers).
  3. Annotation (commentary) linked to the primary text at the same level, i. e. as sibling notes.

Primary text and annotation prototypes use the following user attributes:

  1. ref_tlg, which is the numerical author-work code employed in the Thesaurus Linguae Graecae database, from which primary texts were extracted (using the Classical Language Toolkit Python libraries).
  2. section and line, attributes that map to the starting point of the corresponding text on the standard edition of the work.

(This referencing information should theoretically allow for comments linked to the primary texts implementing what in TEI jargon is called “Stand-off Markup”).

I use child prototypes for both primary text and annotation corresponding to individual works, with the convenience of pre-filling ref_tlgs for the notes to which they are assigned. The other attributes are set manually on the individual notes, and I clean line breaks and numbering from notes $Names extracted as footnotes (on the most recent versions of Tinderbox, $UpdateTextLinksAfterRename should be set to false on the original note or primary source prototype, so that editing those names won’t affect the text). Additionally, I resize the notes so that their text contents are easily readable.

The text location appears in note subtitles by means of an edict:

$Subtitle = $section + $line;

The items inside the container are sorted by section and line, in such a way that I also get a meaningful Outline View. But besides that, in Map View, Tinderbox will do an excellent job of honouring the sorting order if you view → arrange → clean up your notes to grid. I use that command very often, with a shortcut (⌘G), and this procedure effectively keeps notes tidily arranged on the screen.

Also, to automatically set my commentary notes, I use this rule in the container, which will pick the appropriate prototype (with the expected ref_tlg etc.):

$Prototype="Annotation " + $Name(parent);

All that was already very nice and useful. But I was unable to resist going one step further and implementing a “one-way sync” of the commentary notes with a “Zettelkasten”-style base I keep with The Archive (in Markdown format).

Without going into all the peculiar details of my setup, the main discovery is that this kind of automated export is very stable and can make use of standard Tinderbox export resources combined with pandoc. This, for example, works fine in AppleScript:

tell application "Tinderbox 8" to set exportedStr to evaluate aNote with "exportedString(this, $HTMLExportTemplate)"
set theStr to (do shell script "echo " & the quoted form of exportedStr & "| /usr/local/bin/pandoc --no-wrap -f html -t markdown")

Once I decide to “export” a note (when it reaches a certain maturity), I’ll attribute to it a unique phi_id, which will thus trigger the synchronization.

This is then the final version of the annotation prototype edict:

if ($phi_id) { $Subtitle = $section + $loc_separator + $line + " | Φ" + $phi_id; 
if ($LastExport != $Modified) {
$LastExport=$Modified; runCommand("osascript '/Users/brunoc/Google Drive/Tinderbox/Scripts/phi Auto Export.scpt' '"+$Name(/)+"' "+'"'+$Path.replace(“’”,”\’”)+’”’);
 } } else { $Subtitle = $section + $loc_separator + $line; }

With this kind of trick, you can type in Tinderbox’s rich-text editor with its natural capabilities, and see your text instantly synchronized in Markdown!

11 Likes

You might find this post on parallel text at Howard Oakley’s excellent blog to be of use.

4 Likes

@brunoc this is a significant post – thank you very much for organizing and publishing it here. It will be very helpful to other researchers and academics, no doubt.

3 Likes

This is amazing … I have no interest in classical texts (yet? lol), but having a detailed account of how someone uses and customizes Tinderbox for their purposes is definitely what we need a lot more of, thank you!

4 Likes

We often learn great tricks from people working in fields very different from our own! About classical texts, well, once you get in, it’s hard to get out from this vast and stimulating universe. :slight_smile:

3 Likes

To this note, for product development, I think there is a way I can use your method to link my Tinderbox to traditional agile product development packages like MSFT ADO and Jira. The important step is to find that key that links one dataset to another and the whole world opens up.

1 Like

Can you explain what is happening here you is “if” but I don’t see the condition your looking for.

Finally, coincidentally I stumbled across Pandoc a few days ago and now I see it here in your post. I love coincidences like this. I was looking at it to see if I could use Tinderbox as a way of creating draft powerpoint slides for class lecture notes and sales presentations. My idea is have each not be a slide and then export them to Pandoc to make it easier to develop and maintain presentations. Would it be possible for you to expand on this a bit more?

I think you could use a Stamp in order to: 1. call the Jira API to create a task and grab its id; 2. tell Tinderbox to attribute that value to the corresponding user attribute.

In my (much simpler) case, I use an AppleScript to keep a counter and generate a phi_id in an incremental series, but the idea for a Stamp would be the same. This is the one I employ to give a note its $phi_id:

if (! $phi_id) {
  $phi_id=runCommand("osascript '/Users/brunoc/Google Drive/Tinderbox/Scripts/phi Create id.scpt'").split('\n').at(0); 
}

Above, (!$phi_id) is true if the attribute has no value.

1 Like

There’s a lot of related information on if() and other syntax on aTbRef: if(condition){action}[else{action}] – always my go-to when I see syntax I’ve not thought of before.

This tests whether the value of $phi_id is true or, more exactly, truthy. A value is true if

  • it is a numeric attribute and not zero
  • it is a string attribute and not empty
  • if it is a set or list attribute and not empty
  • if it is a date and not never
  • if it is a boolean attribute and not false
4 Likes

What I do is basically to evoke pandoc inside an AppleScript to obtain a Markdown file which will look like this:

---
id:		Φ1779  
origin:	'tinderbox://TLG/Aristotelis%20Physica/Physica%20I?view=outline+select=1597775921;'  
tags:	#λ
...

##### ἐκ τῶν καθόλου ἐπὶ τὰ καθ' ἕκαστα 184a24

[[1504]]: A. não pode estar dizendo que o geral é mais cognoscível pela percepção. O contraste não pode ser…

The script will handle the creation of the header. For the contents, it will use the evaluate syntax + pipe the HTML content to pandoc (as described in the post).

And this is the Template associated with the notes, which Tinderbox will use to generate HTML content:

<h5>^title^ ^value($section)^^value($loc_separator)^^value($line)^</h5>
^text
4 Likes