Difference between revisions of "SFN:TeX4ht: TeX to HTML/MathML — conversion issues"
m (Created page with "|Back| The main problems that we faced when converting the T<sub>E</sub>X sources of Project Gutenberg Ebooks to HTML5/MathML formats are listed here. ==HTML== # ...") |
m (Cvr moved page TeX4ht: TeX to HTML/MathML — conversion issues to SF:TeX4ht: TeX to HTML/MathML — conversion issues without leaving a redirect) |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 5: | Line 5: | ||
==HTML== | ==HTML== | ||
# Text coded using <code>{\itshape ...}</code> not appeared as italic. | # Text coded using <code>{\itshape ...}</code> not appeared as italic. | ||
| + | # The html file where ToC entries should come is always blank. We have to copy the contents entries from title page to this page. | ||
==MathML== | ==MathML== | ||
| Line 11: | Line 12: | ||
# <code>\intertext</code> in <code>{gather}</code> is not rendered. It has converted in MathML, but rendering failed due to wrong tagging. | # <code>\intertext</code> in <code>{gather}</code> is not rendered. It has converted in MathML, but rendering failed due to wrong tagging. | ||
# <code>\limits</code> in inline equations does not produce the desired output. | # <code>\limits</code> in inline equations does not produce the desired output. | ||
| − | # The equation number coded in <code>\tag{}</code> in starred display math environments (eg: <code>equation*, eqnarray*, align*<code> etc.) render without right alignment like normal equation number. | + | # The equation number coded in <code>\tag{}</code> in starred display math environments (eg: <code>equation*, eqnarray*, align*</code> etc.) render without right alignment like normal equation number. |
# <code>\makebox[][]{}</code> does not produce any code. | # <code>\makebox[][]{}</code> does not produce any code. | ||
# The font of equation number differs for equations coded in <code>{equation}, {eqnarray}</code> or any amsmath environements like <code>{align}, {gather}</code> etc. | # The font of equation number differs for equations coded in <code>{equation}, {eqnarray}</code> or any amsmath environements like <code>{align}, {gather}</code> etc. | ||
| + | # The alignment of equations coded in <code>{aligned}</code> environment completely lost when <code>\textit</code> was used instead of <code>\mathit</code>. | ||
| + | # The above/belowskip of an equation is too small when it appears inside a list. | ||
| + | |||
| + | $ | ||
| + | \newcommand{\Re}{\mathrm{Re}\,} | ||
| + | \newcommand{\pFq}[5]{{}_{#1}\mathrm{F}_{#2} \left( \genfrac{}{}{0pt}{}{#3}{#4} \bigg| {#5} \right)} | ||
| + | $ | ||
| + | |||
| + | We consider, for various values of $s$, the $n$-dimensional integral | ||
| + | \begin{align} | ||
| + | \label{def:Wns} | ||
| + | W_n (s) | ||
| + | &:= | ||
| + | \int_{[0, 1]^n} | ||
| + | \left| \sum_{k = 1}^n \mathrm{e}^{2 \pi \mathrm{i} \, x_k} \right|^s \mathrm{d}\boldsymbol{x} | ||
| + | \end{align} | ||
| + | which occurs in the theory of uniform random walk integrals in the plane, | ||
| + | where at each step a unit-step is taken in a random direction. As such, | ||
| + | the integral \eqref{def:Wns} expresses the $s$-th moment of the distance | ||
| + | to the origin after $n$ steps. | ||
| + | |||
| + | By experimentation and some sketchy arguments we quickly conjectured and | ||
| + | strongly believed that, for $k$ a nonnegative integer | ||
| + | \begin{align} | ||
| + | \label{eq:W3k} | ||
| + | W_3(k) &= \Re \, \pFq32{\frac12, -\frac k2, -\frac k2}{1, 1}{4}. | ||
| + | \end{align} | ||
| + | Appropriately defined, \eqref{eq:W3k} also holds for negative odd integers. | ||
| + | The reason for \eqref{eq:W3k} was long a mystery, but it will be explained | ||
| + | at the end of the paper. | ||
Latest revision as of 11:22, 18 August 2014
The main problems that we faced when converting the TEX sources of Project Gutenberg Ebooks to HTML5/MathML formats are listed here.
HTML
- Text coded using
{\itshape ...}not appeared as italic. - The html file where ToC entries should come is always blank. We have to copy the contents entries from title page to this page.
MathML
- The footnote counter in display equations appear in a new line without a link to its corresponding footnote text.
\textstyledoes not work for fractions.\intertextin{gather}is not rendered. It has converted in MathML, but rendering failed due to wrong tagging.\limitsin inline equations does not produce the desired output.- The equation number coded in
\tag{}in starred display math environments (eg:equation*, eqnarray*, align*etc.) render without right alignment like normal equation number. \makebox[][]{}does not produce any code.- The font of equation number differs for equations coded in
{equation}, {eqnarray}or any amsmath environements like{align}, {gather}etc. - The alignment of equations coded in
{aligned}environment completely lost when\textitwas used instead of\mathit. - The above/belowskip of an equation is too small when it appears inside a list.
$
\newcommand{\Re}{\mathrm{Re}\,}
\newcommand{\pFq}[5]{{}_{#1}\mathrm{F}_{#2} \left( \genfrac{}{}{0pt}{}{#3}{#4} \bigg| {#5} \right)}
$
We consider, for various values of $s$, the $n$-dimensional integral \begin{align} \label{def:Wns} W_n (s) &:= \int_{[0, 1]^n} \left| \sum_{k = 1}^n \mathrm{e}^{2 \pi \mathrm{i} \, x_k} \right|^s \mathrm{d}\boldsymbol{x} \end{align} which occurs in the theory of uniform random walk integrals in the plane, where at each step a unit-step is taken in a random direction. As such, the integral \eqref{def:Wns} expresses the $s$-th moment of the distance to the origin after $n$ steps.
By experimentation and some sketchy arguments we quickly conjectured and strongly believed that, for $k$ a nonnegative integer \begin{align} \label{eq:W3k} W_3(k) &= \Re \, \pFq32{\frac12, -\frac k2, -\frac k2}{1, 1}{4}. \end{align} Appropriately defined, \eqref{eq:W3k} also holds for negative odd integers. The reason for \eqref{eq:W3k} was long a mystery, but it will be explained at the end of the paper.