$Text size and export

This is prompted by this Nice Marmot blog post: https://nice-marmot.net/October_2021.html#note_706

I had a few notes in this Tinderbox file that exported with all the paragraph text as H3 (Heading 3)-styled HTML, and I couldn’t figure out why and it was one of those things that just makes you crazy.

Long-time users will probably spot this one immediately, but otherwise it’s hard to guess. The villain of the piece is ‘auto-headings’ which perhaps made more sense for HTML in the early 2000s. The idea is covered here, but the gist is that Tinderbox assumes that is you make some text bigger you are signalling that it is to be exported as a heading:

Increases in body text size of whole paragraphs causes ^text^ to export those paragraphs as headings. Thus:

  • 2-3 points larger is exported to HTML as <h3>
  • 4-5 points gives <h2>
  • 6 or more points above body copy is exported as <h1>

Pertinently, you can’t turn this behaviour off (or so I believe, happy to be wrong). Another historical factoid is early Tinderbox (essentially pre-v6.0 had a different way of presenting $Text so export size and in-app view size were unrelated. Sort of true still, though enacted.

So, that’s the why. Nice Marmot guesses the solution: normalise the text size. The method described works but easier is:

  • select all, or affected, $Text in the note
  • menu FormatStyleStandard Size. Handily, it has its own shortcut: ( ⇧⌘T )

The latter sets all (selected) $Text to that notes current (inherited) $TextFontSize. “But,” you cry, “I’ve lots of notes needing this ‘repair’. Can’t I use automation?” As it happens you can! Since v9.0.0, you have been able to the String.fontSize(N) method. I’ve just successfully used this stamp in a multiple note selection:

$Text = $Text.fontSize($TextFontSize);

[Edit: I’ve just updated the String.fontSize(N) article to reflect the latter code example above.]

1 Like

Thanks, Mark. And I think it’s important to note that I can still make the text large enough that my blurry vision can make it out, while easily restoring it to the “normal” size before export. Might even look into automating all that. I’ll add it to the “Ideas” container!

If the default text size is uncomfortably small for you, why not increase it in Document Settings: Text?

1 Like

Problem solved! Idea stricken from the Ideas container!

1 Like