Alternative to FootnotesPlugin

14 views
Skip to first unread message

kilucas

unread,
Oct 7, 2008, 5:19:44 PM10/7/08
to TiddlyWiki
I'm using Bram Chen's HTMLArea which uses the backward single quote to
signify entry of ASCIIMath codes. I also have the FootnotesPlugin
which signifies a footnote with three single backward quotes.
Consequently, HTMLArea thinks a footnote is a mathematical code.

Does anyone know of an alternative footnote generator or even whether
I can somehow change the character used to signify the footnote entry
perhaps?

Many thanks

Kevin

FND

unread,
Oct 8, 2008, 5:16:05 AM10/8/08
to Tiddl...@googlegroups.com
> Does anyone know of an alternative footnote generator or even whether
> I can somehow change the character used to signify the footnote entry

Replacing the trigger markers is relatively easy - the problem though is
finding convenient characters that aren't already taken.

In general, the code looks like this:
---------------
//{{{
FootnotesPluginTweak = {
replaceFormatters: function() {
for(var i = 0; i < config.formatters.length; i++) {
var obj = config.formatters[i];
if(obj.name == "footnotes") {
obj.match = "```";
obj.lookaheadRegExp = /```((?:.|\n)*?)```/g;
break;
}
}
}
};
FootnotesPluginTweak.replaceFormatters();
//}}}
---------------

Stick this into a tiddler tagged with "systemConfig" (e.g.
[[ConfigTweaks]]) and replace all nine occurrences of "`" with the
marker of your choice (note that for technical reasons, not all
characters will work right away - you might try escaping those with a
leading backslash; e.g. "\$").

HTH.


-- F.

kilucas

unread,
Oct 8, 2008, 7:10:17 PM10/8/08
to TiddlyWiki
Very helpful. I'll give some thought to safe characters to use.
Thanks
Kevin
Reply all
Reply to author
Forward
0 new messages