Skip to content

HTML Table in PDF - \multirow is used but somehow, \usepackage{multirow} is missing when table is crossreferenced #13093

@cderv

Description

@cderv

So the issue is that \multirow is used, but somehow, \usepackage{multirow} is missing when

::: {#tbl-test}

```{=html}
<table>
  <thead>
    <tr>
      <th>species_spanner</th>
      <th rowspan="2">island</th>
    </tr>
    <tr>
      <th rowspan="1">species</th>
    </tr>
  </thead>
</table>
```

:::

but not if the table is not crossreferenced


```{=html}
<table>
  <thead>
    <tr>
      <th>species_spanner</th>
      <th rowspan="2">island</th>
    </tr>
    <tr>
      <th rowspan="1">species</th>
    </tr>
  </thead>
</table>
```

So probably related to multirow variable not set in one of the scenario

$if(multirow)$
\usepackage{multirow}
$endif$

Originally posted by @cderv in #13084 (reply in thread)

Full reprex

---
format: pdf
keep-tex: true
keep-md: true
---

::: {#tbl-test}

```{=html}
<table>
  <thead>
    <tr>
      <th>species_spanner</th>
      <th rowspan="2">island</th>
    </tr>
    <tr>
      <th rowspan="1">species</th>
    </tr>
  </thead>
</table>
```

:::

Git diff between two tex files

diff --git "a/.\\index-ori.tex" "b/.\\index.tex"
index d3add64..b1718c8 100644
--- "a/.\\index-ori.tex"
+++ "b/.\\index.tex"
@@ -67,7 +67,6 @@
 
 
 \usepackage{longtable,booktabs,array}
-\usepackage{multirow}
 \usepackage{calc} % for calculating minipage widths
 % Correct order of tables after \paragraph or \subparagraph
 \usepackage{etoolbox}
@@ -167,6 +166,11 @@
 
 
 \begin{longtable}[]{@{}ll@{}}
+
+\caption{\label{tbl-test}}
+
+\tabularnewline
+
 \toprule\noalign{}
 species\_spanner & \multirow{2}{=}{island} \\
 species \\
@@ -174,6 +178,7 @@ species \\
 \endhead
 \bottomrule\noalign{}
 \endlastfoot
+
 \end{longtable}

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcrossreflatexLaTeX engines related libraries and technologiestablesIssues with Tables including the gt integration

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions