Markdown Dialects

Markdown is a vague concept, not a specific markup language. That’s a problem for long-life content. If your Markdown parser of choice reaches end-of-life, your content may render poorly in its successor.

Here are the parsers/apps that matter to me, and the markup which appears portable among them. I’m going to try to limit my Markdown authoring to that which works in these dialects. Note that “works” doesn’t mean “identical output.” It just means that the output looks adequate, given the input.

In general, I have standardized on a subset of Github Flavored Markdown (GFM).

Note that some conversion among Markdown dialects may be accomplished via pandoc: https://github.com/jgm/pandoc/wiki/Pandoc-Tricks

Matters to me:

  • GFM (claimed)
    • Marked 2, Discount - Mac Markdown viewing app, using built-in “Discount (GFM)” parser
    • Github - a real page at github.com
    • Typora, Mac
    • Typora, Win
    • Typora, Linux
    • Jekyll, local - as rendered locally
    • Jekyll, github - as rendered when pushed to Github Pages
    • pandoc - as processed by pandoc -s –katex –metadata pagetitle=”BLAH” -f gfm input-file.md -o output-file.html
    • Tiddlywiki, anstosa - (using anstosa markdown plugin)
    • Chrome GFM Plugin - https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk?hl=en
  • Commonmark
  • MultiMarkdown
    • Marked 2, MMD - Mac Markdown viewing app, using built-in MultiMarkdown parser

I’m clearly not going to take the time to thoroughly compare all of those. Here’s my short list:

  • Marked 2, Discount - this is my ‘reference’ implementation
  • Marked 2 MultiMarkdown
  • Typora, Mac
  • Jekyll, github
  • Tiddlywiki, anstosa
  • Markdown-it
  • Commonmark

For my Markdown Acid Test Page, here’s what works for my short-list parsers:

Markdown Acid Test Page

These are the Markdown forms I use:

Escape Character

Backslash \*prevents\* these asterisks from causing formatting.  Backslash is the \`escape\` character.

Backslash *prevents* these asterisks from causing formatting. Backslash is the `escape` character.


Bare URL Auto-linking

Bare URLs are auto-linked by only some parsers.  http://example.com

Bare URLs are auto-linked by only some parsers. http://example.com


Basic text styling

regular text, **bold** text, *italic* text, `code` text

regular text, bold text, italic text, code text


Unordered List

* Unordered List
    * With nesting
    * Always use 4 spaces per indent
        - Can also use hyphen instead of asterisk
        - Like this
* Some parsers work with other spacing, but all work with 4
  • Unordered List
    • With nesting
    • Always use 4 spaces per indent
      • Can also use hyphen instead of asterisk
      • Like this
  • Some parsers work with other spacing, but all work with 4

Ordered List

1. Ordered List
    1. With nesting
    1. Always use 4 spaces per indent
1. Some parsers work with other spacing, but all work with 4
2. Try to keep your numbers sequential, but it isn't really necessary
  1. Ordered List
    1. With nesting
    2. Always use 4 spaces per indent
  2. Some parsers work with other spacing, but all work with 4
  3. Try to keep your numbers sequential, but it isn’t really necessary

ATX Headers

# Header Level 1 - document title

Although you can follow the header immediately with text, it is safest to wrap it with blank lines.  Must put blank line BEFORE any header.  Must separate the # from the text with a space.  They do not necessarily proceed from largest to smallest. (e.g. Jekyll renders level 1 as smaller, red text, when compared with level 2.)

## Header Level 2 - Chapter/Section title

Text goes here.

### Header Level 3 - Not yet defined

Text goes here.

#### Header Level 4 - Not yet defined

Text goes here.

##### Header Level 5 - Not yet defined

Text goes here.

###### Header Level 6 - Not yet defined.  This is the lowest level supported.

Text goes here.

Header Level 1 - document title

Although you can follow the header immediately with text, it is safest to wrap it with blank lines. Must put blank line BEFORE any header. Must separate the # from the text with a space.

Header Level 2 - Chapter/Section title

Text goes here. Don’t skip levels. Must put blank line before a title line, but not needed after. This form is called “atx.” Don’t use setext (which underlines titles with dashes or equal signs, because it only goes to two levels of header.

Header Level 3 - Not yet defined

Text goes here.

Header Level 4 - Not yet defined

Text goes here.

Header Level 5 - Not yet defined

Text goes here.

Header Level 6 - Not yet defined. This is the lowest level supported.

Text goes here.


Block Quote

ordinary text

> These lines will get joined into one block quoted line by SOME dialects but not all.
> block quote line 1.
> block quote line 2.

ordinary text

ordinary text

These lines will get joined into one block quoted line by SOME dialects but not all. block quote line 1 block quote line 2

ordinary text


Preformatted Text


    preformatted text
    is rendered in fixed-width font
    and retaining your line breaks
    if you begin the line with four spaces.
    two spaces works with only some parsers.
    you may need to wrap with blank lines for some parsers.

preformatted text
is rendered in fixed-width font
and retaining your line breaks
if you begin the line with four spaces.
two spaces works with only some parsers.
you may need to wrap with blank lines for some parsers.

Fenced Code Block

```
Desired form.
fenced code block line 1
fenced code block line 2
Use backticks, where possible.  They are more portable than tilde fences.
```
Desired form.
fenced code block line 1
fenced code block line 2
Use backticks, where possible.  They are more portable than tilde fences.

Fenced Code Block (Alternate Form)

~~~
Alternate form, to be avoided where possible.
fenced code block line 1
fenced code block line 2
Use backticks, where possible.  They are more portable than tilde fences.
~~~
Alternate form, to be avoided where possible.
fenced code block line 1
fenced code block line 2
Use backticks, where possible.  They are more portable than tilde fences.

Fenced Code Block With Language Specifier

``` javascript
Desired form.
fenced code block with language name line 1
fenced code block with language name line 2
Use backticks, where possible.  They are more portable than tilde fences.
Be sure to put a space between the markers and the language name.
```
Desired form.
fenced code block with language name line 1
fenced code block with language name line 2
Use backticks, where possible.  They are more portable than tilde fences.
Be sure to put a space between the markers and the language name.

Fenced Code Block With Language Specifier (Alternate Form)

~~~ javascript
Alternate form, to be avoided where possible.
fenced code block with language name line 1
fenced code block with language name line 2
Use backticks, where possible.  They are more portable than tilde fences.
Be sure to put a space between the markers and the language name.
~~~
Alternate form, to be avoided where possible.
fenced code block with language name line 1
fenced code block with language name line 2
Use backticks, where possible.  They are more portable than tilde fences.
Be sure to put a space between the markers and the language name.

Horizonal Rule

horizontal rule below.
3 dashes is sufficient.  I use 5 dashes because I think it reads better.  Wrap with blank line above and below.

-----

and

---

horizontal rule above.

horizontal rule below. Use 3-5 dashes. Wrap with blank line above and below.


and


horizontal rule above.


[human link description](http://example.com "optional flyover title")

human link description


![image alt descsription](https://www.w3schools.com/images/colorpicker.png "optional flyover title")

image alt descsription


Mathematical Fomulae - LaTeX / MathJax / KaTeX

LaTeX / MathJax / KaTeX support varies.  If you need it, use it.  Wrap it with $$.

$$\displaystyle f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi$$

MathJax / KaTeX support varies. If you need it, use it. Wrap it with $$. There should be a formula after this line.

There should be a formula before this line.


YAML Front-matter

YAML front matter. For maximum portability, wrap YAML front matter with --- lines, and follow the ending --- with a blank line. If you create front-matter manually, append two spaces to the end of each line. This reportedly causes plain-old Markdown parsers to render it all as unformatted text, rather than trying to process it as Markdown.

---  
title:      Too Much "Security"  
framistat:  Boojum  
---  

Normal text here.

Tables

Tables:

| Left-aligned | Center-aligned | Right-aligned |
| :---         |     :---:      |          ---: |
| git status   | git status     | git status    |
| git diff     | git diff       | git diff      |
Left-aligned Center-aligned Right-aligned
git status git status git status
git diff git diff git diff

Notes:

  • Typora has a nice table editor.

Do not use:

  • strikethrough is not universally accepted.

Tiddlywiki vs Jekyll for PKB

Due to increasing browser security and it having become abandonware, I’m going to move away from Tiddlywiki Classic. I tried using it in a .hta file, but IE has some problems with its JavaScript and I’m unwilling to fix the source myself.

I need two distinct personal knowledge bases: work-related and personal. I’d like to be able to edit each from my work laptop and my personal laptop, at the office and at home.

For a variety of (undocumented) reasons, I’ve narrowed my options to Tidddlywiki 5 (node.js edition) and a Jekyll-generated web site.

Some features I want:

  TW Support Jekyll Support
Inter-wiki linking Y Y
GFM Markdown Y Y
MathJax * 1 * 2
Images Y * 3 Y * 3
Send my wife a URL Y Y
Usable at work and home Y Y
Need not store my personal data in the cloud Y Y
Can search with my native OS search (e.g. Spotlight) Y Y
Export/migrate if support vanishes Y Y
Maintains a history of changes N * 4 N * 4
Dual-master support Y * 5 Y * 5
Easy up and running when I rebuild my machine N N
Edit/view from Mac, Windows, Linux Y Y
Reduced tool count (I’m using Jekyll for other sites). N Y
This page referenced by… Y N
Edit this page Y N * 6
  • 1 Tiddlywiki: http://mathjax-tw5.kantorsite.net/ renders in text/x-marked, but throws an error. This one fails too: https://gist.github.com/kpe/cc0547b318e6f8d4ddaa. Some debugging required.
  • 2 Jekyll: https://alan97.github.io/random/mathjax/ has a tutorial for MathJax.
  • 3: May have to manually put images into a local folder and link to them from the Markdown.
  • 4: Neither product maintains a change history. You’d have to use something like git to version your data.
  • 5: I have a Mac laptop and a Linux server at home. I want to be able to edit and view data when either is getting rebuilt. I can do this with either by using my Linux server as a git server.
  • 6: I think I could write something to do this for Jekyll with an edit button to link to the corresponding admin interface edit page.

=====

If I put them only on my linux server, I can access them from anywhere EXCEPT offline, and I can’t index them on my Mac. I can’t share with my wife if it is only on my Macbook. I can’t put my work PKB on my Macbook because I have no network connection between the two. I could use git to sync laptops with Linux server, and edit on either side. Need to make this low-friction.

Use Jekyll on as my PKB. That reduces my tool count, but when I’m looking at a page in Jekyll, navigating to EDIT it is a bother. Could I add an “Edit Me” button that is visible only locally? (Asked this on StackOverflow.) I’d use git-with-github for the public sites and git-with-mac-and-boxtop for the local sites.

Tagging is better in TW than Jekyll, but it exists in Jekyll.

Spotlight will find two copies of every page in Jekyll - one for the markdown and one for the HTML, unless I tell it not to index one of the folders.

If I use Tiddlywiki, it is very easy to mess it up or break part of it. I’ll need to use git agressively, so I can roll back changes. Sometimes rolling back a change seems to require stopping/starting the server (on my Mac): }

Reset Prius Oil Maintenance Required Warning

At some point, Toyota changed the oil-change interval on my 2010 Prius from 5,000 miles to 10,000 miles, but they didn’t update the firmware, so it still shows “Oil Maintenance Required” after 5000. Here’s how to reset the warning:

  • Power-on the car.
  • Press the “Trip” button until “TRIP A” is displayed.
  • Power-off the car.
  • Hold the Kilometers/MPH button down (like a keyboard Shift button).
  • Hold the brake pedal down.
  • Hold the power-on button down until it resets.
  • Release everything.

Too Much "Security"

Today, I wanted to download my financial accounts into Quicken. I entered my password to login to my Macbook. (My Macbook disk is encrypted, so all passwords after this point are silly.)

  • I booted my Windows VM. That Windows has a password, but Windows is willing to remember it.
  • I launched Quicken and it demanded a Quicken account password, ‘for you security.’
  • I launched my password wallet and it demanded a password.
  • I clicked the button in Quicken to download data, and it demanded the password for my password wallet.

This is not security. This is idiocy.

Why I'm Abandoning Clojure

Clojure is a lovely language idea. It is elegant. It is clever.

Clojure is an abysmal language reality for my purposes.

  • 35 lines of java dump for a syntax error? It makes me miss the original Wirth Pascal compiler, which seemed to have the singular error message “Syntax error, possibly missing semicolon on line above.”
  • I really, really want compile-time type checking on my parameters.
  • If I run my program via “lein run”, I have no trouble reading a data file. If I package it up into an uberjar, the code fails. I’m supposed to master class loaders just to be able to read a file when I package my app as a jar? I’m sure that Clojure and Java are doing something that is absolutely essential for somebody, but the environment is making simple stuff hard, and I won’t tolerate that.
  • I insist on an interactive debugger. You can actually get one via the Cursive IDE, and you can sorta, kinda get one via a plugin for Visual Studio Code. The Cursive one actually works… until it freaks out and you have to either restart the REPL or you have to do something called “Invalidate Caches/Restart”. (There’s no real indication whether your observed bad behavior is a bug in your code or if you need to invalidate caches. It’s just a Hail Mary you try when you don’t like the results you’re getting.) The plugin for Visual Studio Code – I’m sure it works for its developer, but I really tried to make it work. Maybe someday. If the language doesn’t have an interactive debugger, it’s just plain immature in my book.
  • I want to be able to code a ‘premature return’ from a function. Yeah, I know it’s ‘unnecessary.’ But I’ll tell you, it really simplifies real-world code when I can code if-exceptional-condition-return-error. The Clojure way seems to be to just issue a stack trace on bad data.
  • There’s an awful lot of cognitive overhead for an occasional programmer. In addition to the language itself, you’ve got Leiningen and a baroque directory structure to re-master, every time you take 6 months off from programming. It reminds me of J2EE, and that’s the epitome of excess cognitive overhead.

Firefox Portable Incredibly Slow

Firefox Portable Launches and Loads Very Slow

Firefox Portable started taking forever to launch and load. I was running it from a USB flash drive, so I suspected drive problems. That wasn’t it.

I only use Firefox Portable to run an old Tiddlywiki Classic, with the Tiddlyfox extension. Clicking in the search box would often provoke “not responding” with a white/gray browser window, for long periods of time. Closing Firefox could take 10 minutes to complete. Launching Firefox with TiddlyWiki could take 10 minutes.

Something was making my prefs.js file huge (as in 300 MB). When I tried to open in from Notepad, it brought my machine to a crawl, even after I copied the file to C:\Temp, so I knew it wasn’t a flash drive problem.

Something was adding millions of “E:\FirefoxPortable\FirefoxPortable” to my prefs.js file. I could look at a history of that file and see it grow by KB per day. (My flash drive is E:.)

The solution:

  • Close (and kill, if necessary) all Firefoxes (portable and installed).
  • Delete E:\FirefoxPortable\Data\profile\prefs.js
  • Launch Firefox Portable. It will offer to download an update. Tell it NO.
  • Tools/Options (alt-t)
  • Press Alt-Shift-N to “Never check for updates”. (You must use Alt-Shift to acces an accelerator key on the Options tab.)
  • Exit and re-launch Firefox Portable, opening your TiddlyWiki.
  • Click the TiddlyFox icon and perma-enable saving changes
  • Save changes.

Checklist in LibreOffice

Sometimes I need an outline/bulleted list which looks like a checklist. Here’s how to create a checkbox bullet in LibreOffice (on the Mac).

  • Create an ordinary bulleted list. (Use the bullets tool on the toolbar.)
  • Put the insertion point (i-beam cursor) at the beginning of the text of the line with the bullet you want to turn into a checkbox.
  • Format > Bullets and Numbering > Options > Select… > Font = Wingdings
  • I like the the first empty box in the list. (End of the 5th row on my display.) Character value Unicode F06F.

Tiddlywiki Without Docker On Macbook

Tiddlywiki on Node.js Without Docker on My Macbook

Here’s my how-to for how I set up plain old Tiddlywiki on my Macbook. My plan is to

  • Use the ‘Node.js’ TW natively (without Docker, without the MultiUser plugin). Soak. Get really comfortable with it.
  • Add MultiUser plugin. Soak. Get really comfortable with it.
    • Documentation for the plugin is here: https://github.com/OokTech/TW5-MultiUser
  • Wrap it in Docker.

That way, if there is weirdness, I’ll recognize which piece of the puzzle to blame.

Note: node.js version 9.7.1 for Darwin was installed from https://nodejs.org/download/release/ on my machine before I started this process.


First, define some constants in .bash_profile, to reduce redundant typing:

export twd='/Users/kevin/Sync/Sites/tw-plain'
alias twd="cd $twd"

Then

. ~/.bash_profile 
mkdir $twd
cd $twd

Create runme.sh containing:

#!/bin/sh
# Abort immediately on shell errors
set -e

TWD=/Users/kevin/Sync/Sites/tw-plain
cd $TWD

# Ensure Tiddlywiki is installed.  Peg the version.  I don't want it changing by surprise.
if [ ! -d node_modules/tiddlywiki ]; then
  echo "Installing tiddlywiki node package locally. This will take several minutes..."
  npm install tiddlywiki@5.1.15
fi

#This is how you would initialize a non-plugin wiki
if [ ! -d $TWD/mywiki ]; then
  /usr/local/bin/node $TWD/node_modules/tiddlywiki/tiddlywiki.js mywiki --init server
fi

#if [ ! -d node_modules/tiddlywiki/editions/MultiUserWiki ]; then
#
#  echo "Installing tiddlywiki node package locally. This will take several minutes..."
#  npm install tiddlywiki@5.1.15
#
#  cd $TWD/node_modules
#  echo "CLONING MultiUser plugin"
#  git clone --depth=1 https://github.com/OokTech/TW5-MultiUser.git tiddlywiki/plugins/OokTech/MultiUser

#  echo "Copying starter wiki"
#  cp -r tiddlywiki/plugins/OokTech/MultiUser/MultiUserWiki tiddlywiki/editions/
#fi

cd $TWD

echo "Launching node"
#exec /usr/local/bin/node ./node_modules/tiddlywiki/tiddlywiki.js editions/MultiUserWiki  --wsserver 8080 ${USERNAME:-user} ${PASSWORD:-'wiki'} 0.0.0.0
exec /usr/local/bin/node $TWD/node_modules/tiddlywiki/tiddlywiki.js mywiki --server 8080 $:/core/save/all text/plain text/html 127.0.0.1

Be sure to: chmod +x runme.sh

Launch your wiki with:

./runme.sh

The first time you launch, you may see the following errors. They can safely be ignored:

npm WARN saveError ENOENT: no such file or directory, open '/Users/kevin/Sync/Sites/tw-plain/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/kevin/Sync/Sites/tw-plain/package.json'
npm WARN tw-plain No description
npm WARN tw-plain No repository field.
npm WARN tw-plain No README data
npm WARN tw-plain No license field.

Note that if you want to start from a clean slate, you’ll find it handy to have a script. Create a file named make-clean.sh:

#!/bin/bash
echo "Run this only if you want to delete all the wiki content and start over. Press control-C to stop or Enter to continue."
read

rm -rf mywiki node_modules package-lock.json

Be sure to: chmod +x make-clean.sh

Suppressing an Annoyance:

See this for information on suppressing a superfluous unsaved-changes warning from your browser. The author says this is OK here.

Testing:

In addition to a smoke test of saving tiddlers and reloading the page to confirm they really got saved, confirm that the wiki is accessible via localhost:8080 and is not accessible at external-ip-address:8080.

Daemon:

Once you are satisfied that it works, you’ll want to set up LaunchCtl to launch it automagically.

Create a LaunchCtl file /Users/kevin/Library/LaunchAgents/com.kleinfelter.tiddlywiki.plist to specify how to run your container as a service:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.kleinfelter.tiddlywiki</string>
    <key>ProgramArguments</key>
    <array>
        <string>/bin/bash</string>
        <string>/Users/kevin/Sync/Sites/tw-plain/runme.sh</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
    <key>StandardOutPath</key>
    <string>/var/log/tiddlywiki/tiddlywiki.log</string>
    <key>StandardErrorPath</key>
    <string>/var/log/tiddlywiki/tiddlywiki.err</string>
</dict>
</plist>

Then:

sudo mkdir /var/log/tiddlywiki
sudo chown kevin /var/log/tiddlywiki

Then load your LaunchCtl with:

launchctl load /Users/kevin/Library/LaunchAgents/com.kleinfelter.tiddlywiki.plist

And check to be sure your service is working.

Customizing your wiki:

  • Control Panel:
    • Settings > Camel Case Wiki Links: Disable

I prefer a different look:

  • Go to http://j.d.material.tiddlyspot.com/
  • If you don’t get clear instructions, click the ‘hamburger menu’ to view the “Hello, world” page.
  • Follow the instructions on the page to install the theme and the ‘more material’ and the Roboto font, but NOT the swipe stuff.
    • Tip: Drag each icon from the source site into your TW, and then accept the import of all at once.
    • Tip: Download the roboto.tid and import it into your TW.
  • Go to the TW Control Panel, Appearance, Theme, and choose ‘Material’.
  • Note: IF you use FAB buttons, the secondary FABs only appear when you hover over the primary FAB.

Make My Own Palette:

  • Copy the Material palette into Material-KPK
  • It should have type=application/x-tiddler-dictionary
  • Tags=$:/tags/Palette
  • Fields:
    • name: Kevin’s Palette
    • description: Kevin’s Palette
  • Refresh, and it should show up with the other Palettes in Control Panel > Appearance.

Install Markdown:

  • There are two Markdown parsers available:
    • https://tiddlywiki.com/plugins/tiddlywiki/markdown - the official markdown plugin; supports PHP Extra dialect.
    • http://bjtools.tiddlyspot.com > MarKed - an unofficial markdown plugin; supports GFM dialect.
  • My standard Markdown dialect is GFM, and my Macbook tools are configured to support that. On the one hand, the official plugin is likely to be around as long as Tiddlywiki is, and there is some risk that BJttools could abandon his. OTOH, I’d like my tiddlers to use my standard Markdown dialect. That’s kinda key to my strategy of being able to access .tid files as if they were Markdown.
  • BJTools doesn’t include a new-Markdown button and the official plugin does. They use different content types, so I could actually install both. I’m going to install both and I’m going to tinker the official plugin’s button to create BJTools Markdown.
  • Install but do NOT use this markdown. It supports PHP Markdown Extra dialect. I have standardized on GFM (see my Macbook Configuration Management document.)
    • Drag and drop from https://tiddlywiki.com/plugins/tiddlywiki/markdown
    • Set dialect to Maruku by editing $:/config/markdown/dialect (shadow tiddler)
    • Adjust your Page toolbar to have the create-markdown button and NOT the create-wiki-markup button (via Control Panel > Appearance > Toolbars > Page Toolbar).
  • Install and do use this markdown. It supports GFM:
    • Drag and drop from http://bjtools.tiddlyspot.com > MarKed > $:/plugins/bj/plugins/marked
    • also import his Flexitype plugin.
  • Then edit $:/plugins/tiddlywiki/markdown/new-markdown-button (system tiddler) and change “text/x-markdown” (PHP) to “text/x-marked” (GFM)

Enable Selection and Close of View-mode Tiddlers:

Navigate to Sidebar > More > Shadows, and edit $:/core/ui/ViewTemplate. Replace it with the following:

\define frame-classes()
tc-tiddler-frame tc-tiddler-view-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ $(tiddlerTagClasses)$
\end
\define folded-state()
$:/state/folded/$(currentTiddler)$
\end
<$set name="storyTiddler" value=<<currentTiddler>>><$set name="tiddlerInfoState" value=<<qualify "$:/state/popup/tiddler-info">>><$tiddler tiddler=<<currentTiddler>>><$keyboard key="alt-W" message="tm-close-tiddler"><div tabindex="1" class=<<frame-classes>>><$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
</div>
</$keyboard>
</$tiddler></$set></$set>

For the record (and for some future release, when you have to derive this anew) the changes to the original ViewTemplate are:

  • Add to the div tag: tabindex=1
  • Wrap a keyboard widget around the div, with key=”alt-W” and message=”tm-close-tiddler”

Next:

  • Edit $:/config/Search/AutoFocus (shadow tiddler) and set it to: false

This implements a not-quite-perfect “Alt-W closes the current view-mode tiddler.” It does, in fact, close the currently selected tiddler. The gap is that you often must click on the tiddler to select it. I’d like to modify TW to auto-select a tiddler when it is opened/scrolled-to. I think this might be do-able (particularly in zoomin mode), but I haven’t figured it out yet. One possibility would be to edit $:/core/templates/tiddlywiki5.html and add an onFocus method to <body>. The trick there is that body might get the focus before the first tiddler is displayed. Maybe I need to add an onKeypress to tranfer focus or just redirect keystrokes from the body to the first tiddler. Or I could set a timer…

Set Up Tabbed Tiddlers:

  • Install StoryTabs from http://bjtools.tiddlyspot.com/ (drag the $ link for StoryTabs from his site to your TW.)
  • Go to Control Panel and set Appearance > Story View = zoomin
  • A note about StoryTabs: It solely adds the tabs above the story river. The reason it looks like tabbed tiddlers is because zoomin mode hides all tiddlers except for the ‘top’ tiddler in the river.

Hide the Story-date Line:

  • Browse to the very slow-to-load http://designwritestudio.updog.co
  • Drag this tiddler to your TW: $:/_Menu/Home/Configuration/Options
  • Rename it to “Configure Tiddler Subtitle”
  • Visit that tiddler and turn off display of subtitles and tags.

Enable Double-click to Edit:

  • Go to https://danielorodriguez.com/TW5-2click2edit/
  • Drag and drop the 2click2edit plugin into my wiki