Skip to content

How To Question: Bulleted list inside a csas_table/kabelExtra table #310

@SOLV-Code

Description

@SOLV-Code

I've been trying to turn the contents of one cell in a csas_table() into a bulleted list.

The create awesome LaTeX tables with knitr vignette doesn't have anything about it. Some googling around found this: "\\begin{itemize} \\item Assumptions for outcome uncertainty \item covariation in productivity \item lower and upper constraints on ER (cap and floor) \\end{itemize}" but, I tried this with various escape options, and quotes vs. no quotes in the source csv.

all the variations just crashed the knitting steps.

I'm trying to figure out whether this is even possible within csasdown, so that I can decide whether it's worth it to keep experimenting.

Here's what I'm trying to get:

Image

Here's the table code

```{r ModelVersionsOverview, echo = FALSE, results = "asis"}


model.vers.tb <- read_csv("data/ModelVersions_Table.csv",quote = "")
#,stringsAsFactors = FALSE) 

model.vers.tb$Upgrades[is.na(model.vers.tb$Upgrades)] <- ""

model.vers.tb %>% 
   mutate_all(function(x){gsub("&", "\\\\&", x)}) %>% 
   mutate_all(function(x){gsub("%", "\\\\%", x)}) %>%
   mutate_all(function(x){gsub("\\\\n","\n", x)}) %>%
   mutate_all(function(x){gsub('\\"','', x)}) %>%
   csas_table(format = "latex", escape = FALSE, font_size = 10, align = "l",
                  caption = "(ref:ModelVersionsOverview)") %>%
   kableExtra::row_spec(c(1,2,3), hline_after = TRUE) %>%
   kableExtra::column_spec(c(1), width = "2em")   %>%
   kableExtra::column_spec(c(2), width = "13em")  %>%
  kableExtra::column_spec(c(3), width = "23em")  %>%
      kableExtra::column_spec(c(4), width = "6em") 
    

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