This version is out of date, covering development from v6.0.0 to v6.6.5. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

TinderboxSix Icon

Setting in-page HTML anchors

W3C syntax rules for the targets of in-page jump links are thus:

HTML tag id and name tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). [W3C source reference]

This means that the most obvious built-in solution for a unique ID target, that of using $ID, is not valid as it is all digits. Likely most browsers will cope, but it is building on sand.

Another possible source is a user attribute of the Number type using the 'sequential' option, though note such attributes are not intrinsic.

If using either of the above, a simple workaround is to simply put a letter prefix before the numerical value. For instance:

id="x^value($ID)^" 

A separate design issue is to ensure the calling link is able to use the desired target anchor value. As the user has no control over links generated via ^text^, it can mean explicitly setting the $HTMLExportFileName for all notes so as to seed the href path of calling links so these can be post-processed to the desired version.



A Tinderbox Reference File : Export : HTML Export - page(s) based on multiple notes : Setting in-page HTML anchors