|
Cookbook /
AutoTOC-TalkSummary: Talk page for AutoTOC.
Maintainer: Petko
This space is for User-contributed commentary and notes. Please include your name and a date along with your comment. Conflict with WikiWordsHello. This recipe is working great in automatic mode, but when I try to force its include in this wiki page some weird interference happens. It might be related with WikiWords? Thanks for your help --simkin November 10, 2011, at 02:06 AM Thanks for the report, the new version hopefully fixes it. --Petko November 10, 2011, at 03:38 AM Yes, It works fine now. Thanks a lot for the fast support --simkin November 10, 2011, at 04:49 AM
International and special charactersI'm testing this smart recipe and I would love if it were possible to produce a nicer anchor's name. In the current version, accentued letters, and signs, are unfriendly encoded ( You can test the latest version 20111222 with the $AutoTocIdEncoding mode "fold" or one of the others. Alternatively, you could force individual anchor names by setting an id of the heading like Great work Petko and nice result, thank you. Just for information : in fold mode, I wanted ~ and – and ’ to be transformed in _ rather than deleted ; thus I altered js file, line 56 to hash = hash.replace(/(~|’|–|\s+)/g, '_').replace(/[^\w\s]+/g, '');
The version 20120416 allows the defining of custom replacements for the fold mode, without modifying the script, see $AutoTocCustomFold. --Petko April 16, 2012, at 01:37 PM Scrolling issue in Firefox but not IEI tried using the AutoTOC anchor to jump from another page directly to the section, but found it just went to the page, and did not scroll the desired section to the top of the screen. I also tried it as the target for a redirect, with the same result - went to the page, but not to the section. I have now found that this works as expected in IE, and the links go to the section anchors. It fails in Firefox, and only goes to the page, regardless of any AutoTOC anchor after the #. I've tried this in Fx safe mode, just in case any add-ons were interfering, but no change. Des January 30, 2012, at 06:10 AM The latest version from 2 days ago should have fixed that problem. If I go to AutoTOC#Installation, it scrolls down to the section. A browser cache refresh may be needed if your browser has cached the old version of autotoc.js. Also note that the anchor names are case sensitive, #Notes is not the same as #notes. --Petko January 30, 2012, at 10:12 AM Thanks for the note - it looks as if it was indeed just the cache as you suggested, because the jump worked as soon as I fired things up this evening, without me having to force a flush. (Always copy and paste links - I have been down the typo/case dead-end too many times.) Just mentioning in passing since I saw it (ie NOT seeking a fix), while trying things to see if I was doing something wrong, I noticed the these anchors don't work if used with PmWiki's (:include :) markup. Thanks for AutoTOC - it's a superb replacement for all the others that tried to do a TOC. Des January 30, 2012, at 04:39 PM The AutoTOC and its anchors are generated by your browser, not by the PmWiki markup engine. If you include a page, its headings should appear in the TOC and should have the anchors generated. The other way around is not supported: if you want to include a section of a wiki page, you have to add the |