Examples for 'styler::math_token_spacing'


Specify spacing around math tokens

Aliases: math_token_spacing specify_math_token_spacing tidyverse_math_token_spacing

Keywords:

### ** Examples

style_text(
  "1+1   -3",
  math_token_spacing = specify_math_token_spacing(zero = "'+'"),
  strict = FALSE
)
Warning: Could not use colored = TRUE, as the package prettycode is not
installed. Please install it if you want to see colored output or see
`?print.vertical` for more information.
1+1   - 3
style_text(
  "1+1   -3",
  math_token_spacing = specify_math_token_spacing(zero = "'+'"),
  strict = TRUE
)
Warning: Could not use colored = TRUE, as the package prettycode is not
installed. Please install it if you want to see colored output or see
`?print.vertical` for more information.
1+1 - 3
style_text(
  "1+1   -3",
  math_token_spacing = tidyverse_math_token_spacing(),
  strict = FALSE
)
Warning: Could not use colored = TRUE, as the package prettycode is not
installed. Please install it if you want to see colored output or see
`?print.vertical` for more information.
1 + 1   - 3
style_text(
  "1+1   -3",
  math_token_spacing = tidyverse_math_token_spacing(),
  strict = TRUE
)
Warning: Could not use colored = TRUE, as the package prettycode is not
installed. Please install it if you want to see colored output or see
`?print.vertical` for more information.
1 + 1 - 3

[Package styler version 1.7.0 Index]