[tex4ht-commits] [SCM] tex4ht updated: r709 - trunk/doc/tex4ht-doc

michal_h21 at gnu.org.ua michal_h21 at gnu.org.ua
Thu May 28 16:07:10 CEST 2020

Author: michal_h21
Date: 2020-05-28 17:07:10 +0300 (Thu, 28 May 2020)
New Revision: 709

Some accumulated updates

Index: trunk/doc/tex4ht-doc
--- trunk/doc/tex4ht-doc	2020-05-28 14:02:47 UTC (rev 708)
+++ trunk/doc/tex4ht-doc	2020-05-28 14:07:10 UTC (rev 709)

Property changes on: trunk/doc/tex4ht-doc
Added: svn:ignore
## -0,0 +1 ##
Modified: trunk/doc/tex4ht-doc/tex4ht-doc.tex
--- trunk/doc/tex4ht-doc/tex4ht-doc.tex	2020-05-28 14:02:47 UTC (rev 708)
+++ trunk/doc/tex4ht-doc/tex4ht-doc.tex	2020-05-28 14:07:10 UTC (rev 709)
@@ -34,6 +34,41 @@
 \chapter{Basic Tutorial}
+\chapter{How to}
+\section{Change design}
+By default, \texfourht\ separates paragraphs by spaces. If you want to use text indenting instead, try the \option{p-indent} option.
+\subsection{Web fonts}
+\subsection{Subscripts and superscripts}
+\subsection{MathJax Node}
+\subsection{Include graphics (svg,pdf)}
+\subsection{Change image size and resolution}
+\section{Work with external commands}
 \chapter{Calling Commands}
@@ -95,6 +130,9 @@
 \section{Use JavaScript}
+% https://tex.stackexchange.com/a/521497/2891
+% https://tex.stackexchange.com/a/521905/2891
 \section{Document Navigation}
@@ -333,40 +371,54 @@
+\texfourht\ supports MathJax, library for math rendering in HTML documents. 
+ It supports two modes -- \LaTeX\ math and \mathml.
-The \term{MathJax} processing can be required using \option{mathjax} option.
-The address of \term{MathJax} script with its configuration string can be
-specified in \configuration{MathjaxSource}. The default value of this configuration is:
+The \term{MathJax} processing can be required using the \option{mathjax} option.
+The address of the \term{MathJax} script and its configuration string can be
+specified in the \configuration{MathjaxSource} configuration. Default value of this configuration is:
+\paragraph{\LaTeX\ mode}
+In the \LaTeX math mode, \TeX\ macros used in the math mode are preserved in
+the output HTML document. They are parsed and rendered by MathJax when the
+document is displayed by a web browser. The downside of this mode is that
+commands unknown to MathJax must be configured in a special configuration for
+MathJax. Cross-references to equations and other numbered math environments
+don't work out of the box.
 By default, inline and display math, as well as math environments, are kept as
-raw LaTeX code in the \HTML\ output. \term{MathJax} then transforms this code
-and displays it. In the \term{MathML} mode, \term{MathJax} is used only for the
-rendering in browsers without \term{MathML} support. 
+raw LaTeX code in the \HTML\ output. 
 The additional configuration for \term{MathJax} can be provided in special
 script environment in the \HTML\ page header. The following example provides
 support for some custom \LaTeX\ macros.
-<script type="text/x-mathjax-config">                                           
-  MathJax.Hub.Config({
-    TeX: {           
-      Macros: {     
-        sc : "\\small\\rm",
-        sl: "\\it", 
-      }        
-    },        
-    }                   
-  );                  
+window.MathJax = {
+  tex: {
+    macros: {
+      \unexpanded{
+        sc: "\\small\\rm",
+        sl: "\\it",
+      }
+    }
+  }
 The \texcommand{\detokenize} macro is used to avoid issues with backslash
@@ -374,6 +426,23 @@
 JavaScript strings.
+\paragraph{\mathml\ mode}
+Math is converted to \mathml\ by \texfourht, MathJax then renders it. Custom
+commands and cross-references work in this mode.
+The \mathml\ MathJax mode can be required using the \option{mathml,mathjax} option.
+\paragraph{Table of contents issues}
+Some math commands may cause issues when they are used in section titles in the MathJax mode. 
+This can be fixed using the \texcommand{\fixmathjaxtoc} command:

More information about the tex4ht-commits mailing list.