veronica,
@veronica@mastodon.online avatar

Over the last three weeks I've been tinkering with adding a footnotes feature to @novelwriter. It was non-trivial, as I had to come up with a syntax for it, make the indexer handle it, and add build support into HTML, markdown and Open Document. The latter took a fair bit of tinkering too.

But it is done, and merged! The final diff was +2,181 −1,338. Quite a lot, although I took the opportunity to clean up and extend some tests. Coverage's now at 99.61% 😁

#Programming #Python #Sunday

veronica,
@veronica@mastodon.online avatar

Since footnotes are so rarely used in fiction, it wasn't really worth it for that alone. However, the framework I've added will also be usable for adding highlight comments/annotations for Open Document exports too. It is also usable for a new story structure feature I've been discussing with a few other people.

The footnotes feature was one of the oldest remaining features in the backlog. Over 4 years old. Good to get it done finally too. 😊

veronica,
@veronica@mastodon.online avatar

I've pushed a set of 2.5 alpha 3 packages to the pre-release repo on Launchpad, so they should be available there soon. It usually takes a couple of hours.

veronica,
@veronica@mastodon.online avatar

The footnote syntax is based on both the shortcode and comments formats that already exist, so no new syntax was added.

Each footnote needs a key to associate it with the corresponding % comment. These are free form, but auto-generated if you create the footnote and comment pair from the Insert menu, so no need to type any of it yourself. It's just a single click.

The % comment syntax is also used for adding a synopsis to chapter and scenes, and will be extended to other features as well.

veronica,
@veronica@mastodon.online avatar

I'm considering something more pleasant than "f4xr5" etc as keys. At the moment, they're randomly generated from a pool of 810000 possible keys. I may instead make them sequential numbers.

aburka,
@aburka@hachyderm.io avatar

@veronica > footnotes are so rarely used in fiction

Jonathan Stroud would like a word 😂

veronica,
@veronica@mastodon.online avatar

@aburka Probably also Terry Pratchett 😁

sbi,
@sbi@toot.berlin avatar

@veronica How aptly that you added a footnote feature on Sir pterry's birthday!

veronica,
@veronica@mastodon.online avatar

@sbi Yeah. It wasn't planned, but perfect timing!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programming
  • kavyap
  • ngwrru68w68
  • Durango
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • khanakhh
  • slotface
  • everett
  • vwfavf
  • rosin
  • osvaldo12
  • megavids
  • GTA5RPClips
  • ethstaker
  • tacticalgear
  • InstantRegret
  • cisconetworking
  • cubers
  • tester
  • anitta
  • modclub
  • Leos
  • normalnudes
  • provamag3
  • JUstTest
  • All magazines