Witiko / markdown

:notebook_with_decorative_cover: A package for converting and rendering markdown documents in TeX
http://ctan.org/pkg/markdown
LaTeX Project Public License v1.3c
331 stars 31 forks source link

`tableAttributes` not working correctly #525

Open machitgarha opened 4 days ago

machitgarha commented 4 days ago

First, thanks for this awesome package.

The following file's table label doesn't get rendered correctly using any of PdfLaTeX, XeLaTeX or LuaLaTeX: https://github.com/Witiko/markdown/blob/80a1a29e8eea660609d994711ce729b30e427310/tests/testfiles/unit/lunamark-markdown/table-attributes.test

Witiko commented 3 days ago

@machitgarha Hi and thanks for using the Markdown package for TeX.

Could you be more specific, please? What are your full example documents, what do you expect to be the output and what is the actual output? Screenshots welcome.

Here my example document example.tex:

\documentclass{article}
\usepackage{markdown}
\markdownSetup {
  pipeTables = true,
  tableCaptions = true,
  tableAttributes = true,
}
\begin{document}
\begin{markdown}
This test ensures that the Lua `tableCaptions` and `tableAttributes` options correctly
propagate through the plain TeX interface.

| Right | *Left* |   Default   | Center |
|------:|:-------|-------------|:------:|
|   12  |   12   |      12     |    12  |
|  123  |   123  |   **123**   |   123  |
|    1  |     1  |       1     |     1  |

  : Demonstration of *pipe table* syntax with the caption spreading over
    multiple lines. {#identifier .class-name key=value}

| Right | *Left* |   Default   | Center |
|------:|:-------|-------------|:------:|
|   12  |   12   |      12     |    12  |
|  123  |   123  |   **123**   |   123  |
|    1  |     1  |       1     |     1  |

  Table: Demonstration of *pipe table* syntax with the caption spreading over
         multiple lines.

A caption may not span multiple paragraphs.
\end{markdown}
\end{document}

Here is the resulting document example.pdf after using the command lualatex example: image

I don't see anything wrong with it.

If you see a different output in example.pdf, you may be using an outdated version of the Markdown package. Around line 73 in the file example.log, I see the following text:

Package: markdown 2024-11-06 v3.8.1-11-g80a1a29e markdown renderer

What text do you see?

machitgarha commented 2 days ago

Hi! Sorry, the issue is too vague and missing context.

The problem is, when I want to reference the table, I can't. I.e., when I write "Table <#identifier>", it produces "Table ", not "Table 1". I'm using LuaLaTeX.