Opened 10 years ago

Disable Toc in other modes

Reported by: Owned by: lists@… Odd Simon Simonsen normal TocMacro normal 0.10

Description

It would be usefull if you could tell the toc menu to disable when other output formats are being used.

For example use with

Causes the Toc to appear on every single page....

comment:1 Changed 9 years ago by Odd Simon Simonsen

Owner: changed from Alec Thomas to Odd Simon Simonsen new → assigned

Not sure about the history of this, but the 0.11 version includes the following code:

        # Bail out if we are in a no-float zone
if hasattr(formatter, 'properties') and \
'macro_no_float' in formatter.properties:
return ''


It is then basically for the CombineWikiPlugin and similar to 'flip the switch' in the formatter, and plugins like TocMacro will (should) then respect this and not show floating menus. Feel free to file a ticket with that plugin asking it to set the required property if it is missing.

Now, re-reading the code I just notice that the macro will actually disable an inline toc as well - which it shouldn't. A variation of this would be that the macro does not bail out, but instead sets the inline option implicitly so the toc renders once but in inline mode. Any preference?

Modify Ticket

Change Properties