1 | initial version |
To use the \cancel method in Shiny MathJax, you can simply insert it as a LaTeX expression using the dollar sign delimiter. For example, if you want to strikeout the number "5" in your app, you can use the following code:
ui <- fluidPage(
mainPanel(
HTML('Here is a canceled number: $\\cancel{5}$')
)
)
server <- function(input, output) {}
shinyApp(ui, server)
This will render a text element with a strikethrough line over the number 5, like this:
Here is a canceled number: 5
You can adjust the size, color and style of the strikethrough line using CSS, or by specifying additional options in the LaTeX expression.