Uploaded image for project: 'LaTeX'
  1. LaTeX
  2. LATEX-82

Figure Macro rendering is fragile and fails on XWiki 10.10 when containing a Table

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.9.1
    • 1.9
    • Syntax
    • None
    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      Right now the LaTeX rendering of the Figure macro expects that the first XDOM element under the MacroBlock is a TableBlock when the figure macro contains a table. Starting with XWiki 10.10 the Figure macro has been modified to support inline editing and this was done by adding a MetaDataBlock element, failing the detection of a Table block...

      In other words the following input:

      {{figure}}
      {{figureCaption}}
      (% class="wikigeneratedtablenumber" %)Table 1: (%%)caption
      {{/figureCaption}}
      
      |a|b
      {{/figure}}
      

      was generating this correct LaTeX in XWiki < 10.10:

      \begin{table}[h]
      \caption{caption}
      \begin{center}
      \begin{tabular}{|l|l|}
      \hline
      a & b\\
      \hline
      \end{tabular}
      \end{center}
      \end{table}
      

      While it's generating the following in XWiki 10.10:

      \begin{figure}[h]
      \caption{caption}
      \begin{center}
      \begin{tabular}{|l|l|}
      \hline
      a & b\\
      \hline
      \end{tabular}
      \end{center}
      \end{figure}
      

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: