Referencing a 'hand-made' table using bookdown package

前端 未结 3 1336
夕颜
夕颜 2021-01-01 20:31

I\'m trying to reference a table using the bookdown package. In the documentation for tables, the author only shows how to create tables using knitr::kable.

3条回答
  •  猫巷女王i
    2021-01-01 21:02

    I did mention it in the documentation, but perhaps it is not clear enough. I said you need the label of the form (\#tab:...). For example, you may refer to this table using \@ref(tab:foo).

    Table: (\#tab:foo) Your table caption.
    
    | Sepal.Length| Sepal.Width| Petal.Length|
    |------------:|-----------:|------------:|
    |          5.1|         3.5|          1.4|
    |          4.9|         3.0|          1.4|
    |          4.7|         3.2|          1.3|
    |          4.6|         3.1|          1.5|
    

提交回复
热议问题