Skip to content

[FR] Setting float option "H" for tables #1498

@symbalex

Description

@symbalex

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions