[tex4ht] Three questions about errors when using mk4ht to create MathJax compatible files
Michal Hoftich
michal.h21 at gmail.com
Tue Sep 24 12:41:34 CEST 2013
Hello Steve,
your first problem may be caused by using `NoFonts` option either on the
command line
mk4ht xhmlatex $1 "ht5mathjax, NoFonts"
or in the config file
\Preamble{xhtml,mathml, NoFonts}
This option prevents tex4ht from inserting formatting elements based on
font properties.
Problem with these elements is, when you use accented characters, like:
\textit{nazdar světe}
sequence like
<span class="x">nazdar sv</span><span class="x">ě</span><span
class="x">te</span>
is created. If you don't use accented characters, you probably don't need
NoFonts option.
If you really want to use this option, you must style font changing
commands yourself, like this config file:
\Preamble{xhtml, mathml, NoFonts}
...
\begin{document}
\Configure{textit}{\ifvmode\ShowPar\fi\HCode{<em>}}{\HCode{</em>}}
\renewcommand{\sectiontitle}[1]{\ifvmode \IgnorePar\fi%
\EndP\HCode{<div class="sectiontitle">}#1\HCode{</div>}%
\IgnoreIndent\par%
}
\Css{.sectiontitle{text-align:center;font-size:large;}}
\EndPreamble
Regarding the other two problems, without some sample it is hard to tell
what's going on, compilation run without problems for me.
Regards,
Michal
2013/9/23 Steven Dunbar <sdunbar1 at unl.edu>
> In mid-summer, I upgraded to the most recent Fedora 19 distribution of
> Linux. As part of the upgrade, I installed the corresponding 2013 TeXLive
> package from Fedora.
>
> Previously (with Fedora 17 and the previous TeXLive version, probably
> 2011 or possibly 2012), I had used mzlatex to process LaTeX source files
> to XHTML
> 1.1 plus MathML 2.0.
>
> After the upgrade I no longer had mzlatex as a script. After some
> searching and learning, I started using the command
> mk4ht xhmlatex $1 "/path/to/ht5mathjax"
> where ht5mathjax.cfg is the configuration file suggested by Michal
> Hoftich and William Hammond.
>
> This command mostly works, it creates the an html/MathJax file that
> is readable with all browsers I have access to. However, there are several
> problems:
>
> 1. Most text formatting no longer exists, for instance, no boldface, a
> font change using \texttt{} results in a the same roman font as all
> other text, and the macro
> \newcommand{\sectiontitle}[1]{\begin{center} {\Large #1} \end{center}}
> results in left-justified text at the same size as all other
> text.
>
> After some investigating, I see that the old mzlatex processing
> created a *.css file of size 6,335 characters, while the new command
> creates a *.css file of size 15 characters. Substituting the old
> *.css file restores the text formatting.
>
> Question: Why doesn't the new command create an appropriate CSS
> file? How can I force the processing to create an appropriate CSS?
>
> 2. During the processing, I get a lot of error messages of the form:
> tex4ht.c (2012-07-25-19:36 kpathsea)
> tex4ht
> --- error --- improper command line
> tex4ht [-f<path-separator-ch>]in-file[.dvi]
>
> This scrolls past too many times to count, the many identical errors fly
> by.
> But there don't seem to be any problems with the *.html files.
>
> Question: What's happening? How to fix?
>
> 3. At the end of the processing, I get the following:
> /usr/bin/t4ht: fork: retry: No child processes
> /usr/bin/t4ht: fork: retry: No child processes
> /usr/bin/t4ht: fork: retry: No child processes
> /usr/bin/t4ht: fork: retry: No child processes
> /usr/bin/t4ht: fork: Resource temporarily unavailable
> --- error --- failed to execute command
>
> Again, there don't seem to be any problems with the *.html files.
>
> Question: What's happening? How to fix?
>
>
> Thanks!
>
> Steve Dunbar
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20130924/565a76ae/attachment.html>
More information about the tex4ht
mailing list