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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.1
    • Component/s: Syntax
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: