Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312263

Summary: [MediaWiki] Produce a table of contents in the HTML output
Product: z_Archived Reporter: Eike Stepper <stepper>
Component: MylynAssignee: David Green <greensopinion>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: 1.3.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Eike Stepper CLA 2010-05-10 10:17:31 EDT
The magic word __TOC__ (http://en.wikipedia.org/wiki/Help:Magic_words) has not been implemented in WikiText, though WikiText is quite capable of producing a table of contents in HTML. Please make this available in WikiText.
Comment 1 David Green CLA 2010-05-11 20:07:48 EDT
@__TOC__@ has  been implemented.  A table of contents is now emitted providing that the @__TOC__@ appears alone on a line of text.  

MediaWiki supports generating a table of contents even when @__TOC__@ appears in the middle of a line.  If that's important to you please reopen this bug.
Comment 2 David Green CLA 2010-05-11 20:07:52 EDT
Created attachment 168064 [details]
mylyn/context/zip
Comment 3 Eike Stepper CLA 2010-06-12 09:56:14 EDT
Thank you, David. I tested it now and it looks nice: http://www.eclipse.org/cdo/documentation/relnotes_30/index.php

I'm not sure why you told to use @__TOC__@. For me it worked with __TOC__, i.e. without the "@"s.
Comment 4 Jörg Thönnes CLA 2010-06-18 05:17:30 EDT
(In reply to comment #3)
> Thank you, David. I tested it now and it looks nice:
> http://www.eclipse.org/cdo/documentation/relnotes_30/index.php
> 
> I'm not sure why you told to use @__TOC__@. For me it worked with __TOC__, i.e.
> without the "@"s.

Funny, you should use Mylyn and WikiText to read the bugs :-)
 
"@__TOC__@" is rendered as code block "__TOC__", i.e. David really meant "__TOC__", while the "@"s were just WikiText formatting instructions.
Comment 5 Eike Stepper CLA 2010-06-19 01:39:14 EDT
That's funny. And a bit dangerous ;-)