Ordinary Human Language

by Brian Crane

Exporting a Book Note

In the examples, I’ve dealt with so far, I’ve actually avoided the case that Tinderbox itself assumes to be the most common: simply exporting the text of a note with its name. I have two reasons.

First, because Tinderbox assumes this is the most common export, it simplifies the process. But by doing so, it creates exceptions to the export code I’ve shown you. I thought it best to address the exceptions only after demonstrating the basic process.

Second, because of these tweaks to the export code, it’s easy to think about export in this case by starting with your note. As I’ve said over and over, I think this is the wrong way around: to understand what’s going on in export, it’s best to think about your end product, to write a sample, and then to work backwards to create a template.

But since I’ve already demonstrated the basics a couple times, I think it’s okay now to move to this most common—but I think odd—case.

And as a reminder, everything I write here will assume that you know what I’ve explained when showing how to export a form letter.

A Sample Book Note & Template

I’ve written up a sample book note page that is ready to print. It looks like this:

If I then convert it to a template in the way I did in the previous examples, the results look like this:

However, in this particular case, this isn’t a correct template.

What gives?

$Text and $Name in Templates

I think it’s fair to assume that most of us, most of the time will want to export the names of our notes and their text. This probably holds true even when we want to also export other information as well. In order to make these two export tasks simpler, Tinderbox offers special, short-version export code for each of these pieces of information.

Knowing this it’s easy to go back to my incorrect version of the template and to replace the ^value($Text)^—which may not be supported or work as expected—with ^text^ instead. Once this is done, the template is correct.

Now I can move on and add any necessary formatting:

 for paragraphs, 

for the bold text. Once I do, the template looks like this:

I check the preview to make sure everything looks the way it should and, if it does, then I’m ready to assign the template to notes and use it for export.

Note on Text Formatting in $Text

When you export using ^text^, Tinderbox preserves the formatting you set up in the text of your note. This means that your paragraphing, italics, links, etc. will be translated in HTML markup silently and automatically and without you having to add it later with special characters.

For additional examples, go here.

Posted July 8, 2017