The bookdown book contains a method of preventing Figures from floating. I would like a similar feature (e.g. a tab.pos = argument in opts_chunk that allow allows me to stop Tables from floating. In other words, letting me insert the LaTeX H positioner to the table environment. I want this as it allows me complete control over where and how Tables are placed in my documents.
I have two workarounds. The first is to wrap render_book in another function, which reads in the produced LaTeX, and uses gsub to add H positioner. However, this is clunky, and also runs into environment issues sometimes. The second is to use kableExtra::kable_styling(latex_options = "HOLD_position") - however, I would have to do this for every single table. It would be nice to have a default option.
The bookdown book contains a method of preventing Figures from floating. I would like a similar feature (e.g. a
tab.pos =argument inopts_chunkthat allow allows me to stop Tables from floating. In other words, letting me insert the LaTeXHpositioner to the table environment. I want this as it allows me complete control over where and how Tables are placed in my documents.I have two workarounds. The first is to wrap
render_bookin another function, which reads in the produced LaTeX, and usesgsubto addHpositioner. However, this is clunky, and also runs into environment issues sometimes. The second is to usekableExtra::kable_styling(latex_options = "HOLD_position")- however, I would have to do this for every single table. It would be nice to have a default option.