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

Labels inside wiki macros are not working

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 1.9.4
    • 1.9.3
    • Syntax
    • Unknown
    • N/A
    • N/A

    Description

      The XWiki content

      {{figure}}
      {{figureCaption}}{{id name="t1"/}}A table{{/figureCaption}}
      |a|b
      |c|d
      {{/figure}}
      

      translates correctly to

      \begin{table}[h]
      \caption{\label{t1}A table}
      \begin{center}
      \begin{tabular}{|l|l|}
      \hline
      a & b\\
      \hline
      c & d\\
      \hline
      \end{tabular}
      \end{center}
      \end{table}
      

      Putting the same in a macro kido

      {{kido}}
      |a|b
      |c|d
      {{/kido}}
      

      that does

      {{groovy}}
      println "{{figure}}"
      println """{{figureCaption}}{{id name="t1"/}}A table{{/figureCaption}}"""
      println xcontext.macro.content
      println "{{/figure}}"
      {{/groovy}}
      

      the LaTeX export yields

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

      That is, the label has vanished.

      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: