Skip to content

Commit 4e6ef3c

Browse files
author
smeyer
committed
fix PR#18343 also for static HTML (amends r82482)
git-svn-id: https://svn.r-project.org/R/trunk@88225 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 9e40044 commit 4e6ef3c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/library/tools/R/toHTML.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ HTMLcomponents <- function(title = "R", logo = FALSE,
450450
else KATEX_CSS_STATIC
451451
KATEX_CONFIG <-
452452
if (dynamic) "/doc/html/katex-config.js"
453-
else c("const macros = { \"\\\\R\": \"\\\\textsf{R}\", \"\\\\code\": \"\\\\texttt\"};",
453+
else c(r"(const macros = { "\\R": "\\textsf{R}", "\\mbox": "\\text", "\\code": "\\texttt"};)",
454454
"function processMathHTML() {",
455455
" var l = document.getElementsByClassName('reqn');",
456456
" for (let e of l) { katex.render(e.textContent, e, { throwOnError: false, macros }); }",

tests/testit.html.save

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
44
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css">
55
<script type="text/javascript">
6-
const macros = { "\\R": "\\textsf{R}", "\\code": "\\texttt"};
6+
const macros = { "\\R": "\\textsf{R}", "\\mbox": "\\text", "\\code": "\\texttt"};
77
function processMathHTML() {
88
var l = document.getElementsByClassName('reqn');
99
for (let e of l) { katex.render(e.textContent, e, { throwOnError: false, macros }); }

tests/ver20.html.save

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
44
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css">
55
<script type="text/javascript">
6-
const macros = { "\\R": "\\textsf{R}", "\\code": "\\texttt"};
6+
const macros = { "\\R": "\\textsf{R}", "\\mbox": "\\text", "\\code": "\\texttt"};
77
function processMathHTML() {
88
var l = document.getElementsByClassName('reqn');
99
for (let e of l) { katex.render(e.textContent, e, { throwOnError: false, macros }); }

0 commit comments

Comments
 (0)