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:
Is there a way to get
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.