```{r echo=FALSE,warning=FALSE}
#| label: tbl-testTable
#| tbl-cap: Results of Accuracy and measures of confusion matrix Results for different number of insider trading transactions
#| tbl-subcap: ["Results of the benchmarking methods", "Results of different transactions \\newline and features in proposed method Random Forest"]
```
Context: I have two sub-tables with different captions in quarto (RMarkdown).
Issue: When I use \\newline in tbl-cap, the table rendered with multiple lines. When I use \\newline with the tbl-subcap, the line does not split, does not wrap with the table width and the caption overflows the width.
Attempted Solution: I tried \\newline to split the tbl-subcap into multiple line (see reference code above).
Expected Solution: I want the caption string to wrap with the width of the table and not to overflow the table width.
I tried \\newline to split the tbl-subcap into multiple line (see reference code above)
If your output format is pdf, you can latex package
subcaptionto tweak the subcaptions width using the command\captionsetup[subtable]{width=<a-suitable-width>\textwidth}instead of using the\newlinecommand.