Well, if you read the initial announcement, ignore it. Pretty much all of that is now out of date, less than 24 hours later. 1

First things first, of course, you can download it here.

Changes

Naturally, to warrant a new release there are a fair few improvements.

Markdown!

python-markdown has an extension system, which can be used to implement many of the proposed Markdown extensions. Footnotes are included by default. I have slightly modified the footnotes extension to produce something which can be used by Semantic Sidenotes. It is included with this release, and will be used on this blog from this point forwards. The syntax is the proposed markdown one. 2

The footnote can be inserted like so:

My markdown text, my markdown test, blah blah blah, [^reference]

And then sourced like so:

[^reference]: Me, 2007.

This would create a sidenote like so.3

HTML Structure

If you're not using the Markdown syntax, you will of course have to hand-code the HTML, but it's less unwieldy than it used to be. The structure is like so:

  1. <p>Blah, blah blah blah. Blah, blah <em>BLAH!</em> Blablabla! <sup
  2. class="ssidenote"><a href="#blah">1</a></sup></p>
  3. <!-- Anywhere else in the page -->
  4. <div id="blah" class="footnote">
  5. <a name="blah"></a>
  6. <div class="sidenote_content">
  7. <p>This is my footnote. There are many like it, but how many can
  8. also be a sidenote, eh?</p>
  9. </div>
  10. <p>This will *only* show up in the footnote, not the sidenote.
  11. </div>

The important thing is that there is a sup tag with a "ssidenote" class, and then a link to an internal anchor inside that. The link, for non-JS compatibility, has the value that you'd expect; Semantic Sidenotes will transform the DOM appropriately.

Reduced Size

The code at this point is quite small. I haven't packed it yet, but roughly half of the source is comments, so there's still room to shrink.

How much will it change?

As the version number should suggest, it is usable at this point, but not stable. I'll release a 1.0 when the HTML structure, in particular, is tried and tested. While this is certainly working code4, changes are likely.

Anything else?

Oh, it's licensed under CC-by-sa 2.5. I'm not sure, but it might be a derivative work of the Arc90 Unobtrusive Sidenotes, since I wrote it by rewriting each individual function in US. If that's the case I won't ever be able to release it under a non-CC-by-compatible license, since that's what the original is. I'll find out later; for now it's only CC-by-sa.


  1. Brought to you by the power of Caffeine. 

  2. The footnote syntax can't be found anywhere on the Python markdown site. I actually had to read the source to find the syntax. Hey, Python-markdown people! Not all of us read the Markdown mailing list! 

  3. Me, 2007. 

  4. My evidence: I'm using it right here.