This site now has knowls, or "little bits of knowledge". These are like hyperlinks, but instead of taking you to a new web page or to a different part of the current webpage, the knowl opens up locally and later disappears when dismissed.
I like the knowls on the LMFDB. For some notes I think they'll be very useful.
Here is what they look like. Knowls are based on transclusion.
Integrating knowls
I now briefly describe adding knowls.
In total it only required adding the two files knowl.js
and knowl.css
to my
list of loaded sources.
But these are not the same script or style files as from the AIM page on knowls. Why not? Because those are incompatible with MathJax3 (and use a bundle of jquery).
I instead modified the knowl javascript from PreTeXt (also available on github with the unusual GPLv2 or GPLv3, but not later, license). Almost no modification was necessary — it essentially just works, except that I don't need some of the additional book-specific additions.
Linking to knowls
I note this largely to myself to remind me what system I implemented.
Directly, knowls are made by linking directly to them with anchor links of the
form <ANCHOR
data-knowl="/static/knowls/transclusion.html">transclusion</ANCHOR>
, where
ANCHOR
is just a
. (My markup would pick this up, as it's not
sophisticated).
I wrote all of my posts in markdown and have added a custom preprocessed
command to my markdown parser that would take in
[TAG](transclusion)(/static/knowls/transclusion.html)[/TAG]
pieces, except
where TAG
is replaced by knowl
, and format it as above.1
1This is how I
execute various other pieces of custom typesetting, including these margin
notes in note
tags.
Will knowls be useful?
I'll try this for a while and see if knowls end up being useful or not. I have one application in mind concerning referencing my papers and works. I deliberately chose to allow any knowl source in my markup, so that I could have per-post knowls if desired. That sounds annoying to write in practice, but it could be very helpful in a didactic note.
I commit to writing at least one full example.
Info on how to comment
To make a comment, please send an email using the button below. Your email address won't be shared (unless you include it in the body of your comment). If you don't want your real name to be used next to your comment, please specify the name you would like to use. If you want your name to link to a particular url, include that as well.
bold, italics, and plain text are allowed in comments. A reasonable subset of markdown is supported, including lists, links, and fenced code blocks. In addition, math can be formatted using
$(inline math)$
or$$(your display equation)$$
.Please use plaintext email when commenting. See Plaintext Email and Comments on this site for more. Note also that comments are expected to be open, considerate, and respectful.