
This relates to https://github.com/hughjonesd/huxtable/issues/223. Huxtable produces TeX tables programmatically from within R. The table starts like 

```
\begin{table}[ht]
...
```

In a Quarto code block with a label and/or caption set via a chunk option, a TeX caption is produced:

```
\begin{table}
\caption{\label{tbl-iris}Iris Data }
[ht]
```

The problem is that the `\caption` statement is being placed between `\begin{table}` and the table placement options `[ht]`.
Instead, the caption should be placed after the `[ht]`.

Test case:


    ---
    title: "test"
    format: pdf
    editor: visual
    ---

    ```{r}
    #| include: false
    library(huxtable)
    ```

    @tbl-iris shows up and can be cross-referenced, but it has an "\[ht\]" in front of it.

    ```{r}
    #| label: tbl-iris
    #| tbl-cap: "Iris Data"

    hux(head(iris, n = 1))
    ```


2022-04-08T21:24:15Z
hughjonesd
closed
In TeX, table caption is inserted between \begin{table} and [placement options]
https://github.com/quarto-dev/quarto-cli/issues/593