1
votes

My question is how to reference tables in markdown format like the following because the answer here doesn't work Referencing a 'hand-made' table using bookdown package I tried

---
output: html_document
---

you may refer to this table using \@ref(tab:foo)

Table: (\#tab:foo) Your table caption.

+-----------------------+-----------------------+-----------------------+
| Auteur                | Protocole             | Résultats             |
+=======================+=======================+=======================+
| (Jiayi 2011)          | Analyse formantique   | Diphtongaison de [e  |
+-----------------------+-----------------------+-----------------------+

and it didn't work.

it gives "Table : (#tab:foo) Your table caption." as the caption and "you may refer to this table using @ref(tab:foo)" If I cross reference using @ref(tab:foo).

Is it possible also to have automatic numbering ?

1
@joshpk nope and this answer doesn't work either link - xiaoou wang
In that case you will need to provide a minimum reproducible example so that one can test solutions. - joshpk
@joshpk added, tks ! - xiaoou wang

1 Answers

0
votes

Looks like you just need to use bookdown's output formats.

---
output:
  bookdown::html_document2:
    df_print: paged
---

you may refer to this table using \@ref(tab:foo)

Table: (\#tab:foo) Your table caption.

+-----------------------+-----------------------+-----------------------+
| Auteur                | Protocole             | Résultats             |
+=======================+=======================+=======================+
| (Jiayi 2011)          | Analyse formantique   | Diphtongaison de [e  |
+-----------------------+-----------------------+-----------------------+