diff --git a/DESCRIPTION b/DESCRIPTION index 7ec44701..3ceda82f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: tinytable Type: Package Title: Simple and Configurable Tables in 'HTML', 'LaTeX', 'Markdown', 'Word', and 'PNG' Formats Description: Create highly customized tables with this simple and dependency-free package. Data frames can be converted to 'HTML', 'LaTeX', 'Markdown', 'Word' or 'PNG' tables. The user interface is minimalist and the syntax concise. 'HTML' tables can be customized using the flexible 'Bootstrap' framework, and 'LaTeX' code with the 'tabularray' package. -Version: 0.0.1.9000 +Version: 0.0.1.9001 Depends: R (>= 4.1.0) Enhances: diff --git a/README.qmd b/README.qmd index 0626c509..2a19c61f 100644 --- a/README.qmd +++ b/README.qmd @@ -1,4 +1,5 @@ +
diff --git a/vignettes/tutorial.qmd b/vignettes/tutorial.qmd
index 107474c6..88568169 100644
--- a/vignettes/tutorial.qmd
+++ b/vignettes/tutorial.qmd
@@ -279,12 +279,12 @@ tt(x, notes = list(a = "Blah.", b = "Blah blah."))
## Math
-In LaTeX and MathJax (for HTML), there are two main ways to enclose mathematical expressions, either between dollar signs or escaped parentheses: `$...$` or `\(...\)`. The first strategy [is discouraged by MathJax,](https://docs.mathjax.org/en/latest/basic/mathematics.html) because dollar signs are very common in non-mathematical contexts, which can cause rendering errors. In that spirit, `tinytable` will not render dollar-enclosed strings as mathematical expressions in HTML. Following the default MathJax settings, `tinytable` expects users to employ the escaped parentheses strategy:
+To insert LaTeX-style mathematical expressions in a `tinytable`, we enclose the expression in dollar signs: `$...$`. The expression will then rendered as a mathematical expression by MathJax (for HTML), LaTeX, or Pandoc. Do not forget to double escape any backslashes.
```{r}
dat <- data.frame(Math = c(
- "\\( x^2 + y^2 = z^2 \\)",
- "\\( \\frac{1}{2} \\)"
+ "$x^2 + y^2 = z^2$",
+ "$\\frac{1}{2}$"
))
tt(dat) |> style_tt(align = "c")
```