-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
Using pandoc 3.6.4 on Ubuntu, I ran pandoc -f html -t typst --lua-filter ./filter.lua input.html
Where:
filter.lua
function Table(table)
-- not sure here if an empty string is the right value?
table.attributes['typst:no-figure'] = ""
return table
end
input.html
<table style="min-width: 75px">
<colgroup>
<col style="min-width: 25px" />
<col style="min-width: 25px" />
<col style="min-width: 25px" />
</colgroup>
<tbody>
<tr>
<td colspan="1" rowspan="1">
<p style="text-align: left">Test </p>
<p style="text-align: left">Neue Zeile </p>
</td>
<td colspan="1" rowspan="1"><p style="text-align: center">Mitte </p></td>
<td colspan="1" rowspan="1">
<p style="text-align: right">Rechts </p>
<p style="text-align: right"> </p>
<p style="text-align: right">Hallo </p>
</td>
</tr>
</tbody>
</table>
I would have expected that the generate Typst table is not inside a figure, but it is. The no-figure
property is added to the table
in Typst instead:
#figure(
align(center)[#table(
columns: 3,
align: (auto,auto,auto,),
no-figure: ,
[Test~
Neue Zeile~
], [Mitte~
], [Rechts~
~
Hallo~
],
)]
, kind: table
)