Closed reuning closed 5 months ago
Thanks for the report.
See also https://github.com/quarto-dev/quarto-cli/issues/8564#issuecomment-2176800308. This is probably a bug in quarto-cli, I think their goal is not to eat labels unless they contain a hyphen. So it may get fixed. If not, there may indeed be no way to use labels with TeX tables in quarto.
Thanks for the quick response. Hopefully they are able to fix this in the Quarto CLI.
could you try github master and see if it indeed fixes this problem?
Sorry for the slow reply here, I wanted to get back to my Mac in my office to try and was away from the office for a few days.
It does work now, though with the caveat that I had to install the quarto R package. Based on your comment you already knew this was a risk. I use VS Code and installed quarto directly. It might be worth noting this somewhere in the FAQ.
One other thing, I'm not sure if it is on purpose or not but currently you do not have quietly=TRUE
in the check for the quarto package: https://github.com/hughjonesd/huxtable/blob/ca7b30a029874270e6a79bdffe04b876f86f9986/R/aaa-utils.R#L254
This was helpful for me as it flagged that I didn't have the quarto package installed and I installed it. For those not using Quarto it might be annoying. I'm not sure when this gets called though but wanted to flag it for you.
Thanks for this point. Fixed in master.
FYI your "try harder to find quarto" worked for me without the Quarto R package installed. Thanks for making and maintaining huxtable and for being so quick at it all.
Describe the bug
The workaround to referencing tables in Quarto does not seem to work with Quarto 1.5 (the current release candidate). It appears that Quarto just swallows the
\label()
in its entirety. I installed Quarto 1.4 and the workaround still works in that case. I wasn't sure if I should post this as a reply to https://github.com/hughjonesd/huxtable/issues/224 or not so hopefully this is alright.I tried a few different combinations to get it to work including adding
\\label{}
into theset_caption()
but nothing seemed to get it to work. I'll just switch back to Quarto 1.4 for now.Minimal Reproducible Example
\begin{table}[ht] \begin{centerbox} \begin{threeparttable} \captionsetup{justification=centering,singlelinecheck=off} \caption{Some jams}
\setlength{\tabcolsep}{0pt} \begin{tabular}{l l}
\begin{table}[ht] \begin{centerbox} \begin{threeparttable} \captionsetup{justification=centering,singlelinecheck=off} \caption{Some jams} \label{tab:jams} \setlength{\tabcolsep}{0pt} \begin{tabular}{l l}