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

Bug 357349

Summary: [mediawiki] Table captions not handled
Product: z_Archived Reporter: Nicolas Bros <nicolas.bros>
Component: MylynAssignee: Project Inbox <mylyn-triaged>
Status: CLOSED MOVED QA Contact: David Green <greensopinion>
Severity: enhancement    
Priority: P3 CC: dev
Version: 1.5Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Nicolas Bros CLA 2011-09-12 04:22:25 EDT
The table captions are not handled. See the example from:
http://www.mediawiki.org/wiki/Help:Tables#Caption

{|
|+Food complements
|-
|Orange
|Apple
|-
|Bread
|Pie
|-
|Butter
|Ice cream 
|}

The line "|+Food complements" is supposed to be a table caption. Instead, the "+" appears in the html text, and the caption is not centered.
Comment 1 David Green CLA 2011-09-13 14:08:46 EDT
Thanks for the bug.  Table captions have not yet been implemented.  Feel free to submit a patch.
Comment 2 David Green CLA 2011-09-13 14:08:47 EDT
Created attachment 203273 [details]
mylyn/context/zip
Comment 3 Jeremie Bresson CLA 2012-10-15 15:33:58 EDT
Other Help page (on wikipedia):
http://en.wikipedia.org/wiki/Help:Table_caption
Comment 4 Jeremie Bresson CLA 2012-10-15 16:02:52 EDT
Patch proposal:
https://git.eclipse.org/r/8220
Comment 5 David Green CLA 2012-10-15 22:12:35 EDT
Jeremie, thanks for the review.  Do we expect to see block content, images, spans etc. in table captions?  It seems odd to include caption as a block type (though I know that the HTML spec supports it).  It's unclear to me how this should translate to other implementations of DocumentBuilder.  Looking around at table captions on the web the most common use seems to be to have a text caption.  Would it make more sense to add a String field "caption" to @TableAttributes@ instead?
Comment 6 Jeremie Bresson CLA 2012-10-16 04:01:45 EDT
(In reply to comment #5)
> Looking around at table captions on the web the most common use seems 
> to be to have a text caption. 

In my opinion WikiText should handle at least styled text (bold, italic, ...) in caption.

My current implementation is based on what MediaWiki can and target Builder is HTML.


Let see what other Builder could do. I a do not know where the reference specification are, this is just the result of a google search:

== XSL-FO: ==
http://www.schemacentral.com/sc/fo11/e-fo_table-and-caption.html
<fo:table-and-caption>
   <fo:table-caption>
      <fo:block>Any text, intermingled with:
         <fo:block>Any text, intermingled with:...
         </fo:block>
      </fo:block>
   </fo:table-caption>
   <fo:table>
...
   </fo:table>
</fo:table-and-caption>

== Docbook: ==
http://www.docbook.org/tdg/en/html/caption.html

Seems also to be a bloc.

== Dita: ==
http://docs.oasis-open.org/dita/v1.0/langspec/table.html

Seems that the caption is a <title> or <desc> tag as child of <table> (both can be styled with bold, italic...).

== LaTeX: ==
(I am more and more thinking in writing a builder for basic LaTeX)
http://en.wikibooks.org/wiki/LaTeX/Tables#The_table_environment_-_captioning_etc

\begin{table}
  \caption{Performance at peak F-measure}
  \begin{tabular}{| r | r || c | c | c |}

      ...

  \end{tabular}
\end{table}

=> Also a bloc


== Markup Builder ==
Textile doesn't seem to support caption:
http://forum.textpattern.com/viewtopic.php?pid=154112

Trac WikiFormatting doesn't seem to support caption:
http://trac.edgewall.org/wiki/WikiFormatting#Tables

Confluence Wiki Markup doesn't seem to support caption:
https://confluence.atlassian.com/display/DOC/Confluence+Wiki+Markup#ConfluenceWikiMarkup-Tables


In my opinion a caption block is correct... Maybe I am missing something.
Comment 7 David Green CLA 2013-08-02 12:42:04 EDT
Closed as part of backlog clean-up.  Please re-open if you'd like to see this revisited, perhaps with a contribution.
Comment 8 Jeremie Bresson CLA 2013-09-15 03:35:30 EDT
In my opinion supporting table caption is important. Please reopen.
Comment 9 David Green CLA 2013-09-15 12:37:47 EDT
reopening per comment #8
Comment 10 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn