0

Drawing from the example in the flextable::as_equation() page:

library(flextable)
if(require("equatags") && mathjax_available()){

  data.frame(formula = "a \\ne 0") |>
    flextable() |>
    compose(
      j = "formula",
      value = as_paragraph(as_equation(formula), "is true")
    )
}

gives:

A table with a single cell with an equation and text in different lines

Is there a way to get

A table with a single cell with an equation and text in the same line

i.e., the equation and the text in the same line?

Many thanks!


Update

Apparently, the problem only happens when rendering to HTML (I was printing it to the Rstudio viewer). My target output is a .docx document, so I don't have this issue anymore. However, as it still happens in HTML I'll leave the question open, in case there's a proper answer that may help someone else.

Mori
  • 182
  • 14

0 Answers0