Skip to content

How to have a label for a LaTeX table that can be referenced in HTML document #12867

Answered by mcanouil
friendly asked this question in Q&A
Discussion options

You must be logged in to vote

You don't need anything besides removing the call to the table environment and using the proper prefix for the label.

...
reference to @tbl-eigval-ellipse
...

::: {#tbl-eigval-ellipse tbl-pos="!htb"}
```{=latex}
\begin{tabular}{llll}
    Size                   &  Conceptual formula                    & Geometry       & Function \\
\hline
(a) Generalized variance:  & $\det{\mathbf{\Sigma}} = \prod_i \lambda_i$ & area, (hyper)volume & geometric mean\\  
(b) Average variance:        & $\text{tr}({\mathbf{\Sigma}}) = \sum_i \lambda_i $ & linear sum & arithmetic mean\\     %% superscripts turned to subscripts / GM
(c) Average precision:        & $1/ \text{tr}({\mathbf{\Sigma}^{-1}}) = 1/\sum_…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@friendly
Comment options

Answer selected by cderv
Comment options

You must be logged in to vote
2 replies
@friendly
Comment options

@mcanouil
Comment options

mcanouil Jun 2, 2025
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
tables Issues with Tables including the gt integration
2 participants