[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Sun, 29 Sep 2024 15:23:19 -0400 (EDT) |
branch: master
commit d35829951986ca27928bdbfb06b549b44702b3c6
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Sep 29 21:23:10 2024 +0200
* tp/Texinfo/XS/convert/convert_html.c (html_init_output): set
MATHJAX_CONFIGURATION.
---
ChangeLog | 5 +++++
tp/Texinfo/XS/convert/convert_html.c | 16 ++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 7f5d389a05..ec2e5830a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-09-29 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/convert_html.c (html_init_output): set
+ MATHJAX_CONFIGURATION.
+
2024-07-07 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/convert/converter.c (set_conf, force_conf)
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index 24c541669b..2190bf8987 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -17699,6 +17699,22 @@ html_init_output (CONVERTER *self)
if (!self->conf->MATHJAX_SOURCE.o.string)
set_conf (&self->conf->MATHJAX_SOURCE, 0,
"http://docs.mathjax.org/en/latest/web/hosting.html#getting-mathjax-via-git");
+
+ if (!self->conf->MATHJAX_CONFIGURATION.o.string)
+ set_conf (&self->conf->MATHJAX_CONFIGURATION, 0,
+ " options: {\n"
+ " skipHtmlTags: {'[-]': ['pre']}, // do not skip pre\n"
+ " ignoreHtmlClass: 'tex2jax_ignore',\n"
+ " processHtmlClass: 'tex2jax_process'\n"
+ " },\n"
+ " tex: {\n"
+ " processEscapes: false, // do not use \\$ to produce a literal
dollar sign\n"
+ " processEnvironments: false, // do not process \\begin{xxx}...\\end{xxx}
outside math mode\n"
+ " processRefs: false, // do not process \\ref{...} outside of math
mode\n"
+ " displayMath: [ // start/end delimiter pairs for display
math\n"
+ " ['\\\\[', '\\\\]']\n"
+ " ],\n"
+ " },");
}
if (self->conf->HTML_MATH.o.string