-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table captions in HTML output for package Huxtable #19
Comments
Sorry I don't have time to investigate this. If you want to debug it by yourself, the function you need to debug is |
Thanks for the pointer for where to look! Stepping through
the HTML output captures and produces the label and cross reference correctly but the pdf output doesn't. So there's a bit of a workaround as long as only having one output is not a problem. |
Interesting. Thanks for the investigation. I don't have a clue on top of my head why that is the case. |
I came across another oddity with caption labels. If I use an '_' instead of a '-' In the documentation '_' is acceptable for chunk labels? |
Here is the documentation: https://bookdown.org/yihui/bookdown/figures.html No, |
Oops. My bad, sorry for the false alarm. Would it be worth adding a phrase to the bit on manual table labels like this: |
I would like to be able to make automatically numbered table captions using package huxtable, which allows for spanning columns/rows and other nice features. It is very easy to use. I added the code chunk and following text to
01-intro.Rmd
to the rstudio/bookdown-demo repository (after forking and cloning, of course!)I want to be able to generate crossreferences and numbered captions for tables
(Table \@ref(tab:nice-tab2))
, just as I can forknitr::kable()
. According to the directions in the bookdown book, I should be able to do this if I follow certain criteria. So far it works for pdf output, but not for the html output.I have confirmed that the html produced by huxtable uses the
<caption></caption>
tag by doingprint_html(ht)
. I believe I'm using the correct form for the label (and it works for pdf, so yes). I also tried with results = 'markup'.I don't know if this is a bookdown issue or a huxtable issue
The text was updated successfully, but these errors were encountered: