Ok, thanks, so let's try to solve each problem separately. Please find attach a simple example of split environment. The tex-file is ok, but make4  -a debug split_ex.tex gives the error message

=========

! Package amsmath Error: \begin{split} won't work here.

See the amsmath package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.21   \end{split}
=========

The full log file is also attached.

Can you please have a look? Any hint is appreciated.

Thanks a lot,

best regards, Tomas

On 1/7/21 11:32 PM, Nasser M. Abbasi wrote:
On 1/7/2021 3:34 PM, Tomas Davidek wrote:
Hello,

     I made several tests with tex4ht. The tool nicely converts most of
the objects/environments, but I noticed two problems:

1. split environment

I use that for typesetting long formulas, for instance

This is my very long formula

\begin{displaymath}
     \begin{split}
        \tau(\eta^0) & = \frac{\hbar}{\Gamma(\eta^0)} =
        \frac{\hbar c}{c \Gamma(\eta^0)} =
        \frac{0{,}197~\gev\cdot\mathrm{fm}}{3\cdot
          10^{8}~\mathrm{m}\cdot\mathrm{s}^{-1}\times 1{,}30~\mathrm{keV}}
          = \\
        & = \frac{0{,}197\cdot 10^{-15}~\gev\cdot\mathrm{m}}{3\cdot
          10^{8}~\mathrm{m}\cdot\mathrm{s}^{-1}\times 1{,}30\cdot
          10^{-6}~\mathrm{GeV} = % \nonumber\\
        0{,}0505\cdot 10^{-17}~\mathrm{s} = 5{,}05\cdot
        10^{-19}~\mathrm{s} % \nonumber
      \end{split}
\end{displaymath}

This works perfectly in pdflatex, but when running htlatex, I get the
following error message:


It would be better to show a complete self contained example, not math fragment. And the complete commands you used to compile. This way no one have to guess.

It is also better to use make4ht not htlatex. make4ht is now
the standard way to compile latex to HTML.
\documentclass[11pt]{article}
\usepackage[czech]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}
\section{První kapitola}
Toto je první kapitola, pokus o dlouhou rovnici
\begin{displaymath}
  \begin{split}
    \tau(\eta^0)  & = \frac{\hbar}{\Gamma(\eta^0)} =
    \frac{\hbar c}{c \Gamma(\eta^0)} =
    \frac{0{,}197~\mathrm{GeV}\cdot\mathrm{fm}}{3\cdot
      10^{8}~\mathrm{m}\cdot\mathrm{s}^{-1}\times 1{,}30~\mathrm{keV}}
    = \\
    & = \frac{0{,}197\cdot 10^{-15}~\mathrm{GeV}\cdot\mathrm{m}}{3\cdot
      10^{8}~\mathrm{m}\cdot\mathrm{s}^{-1}\times 1{,}30\cdot
      10^{-6}~\mathrm{GeV}} = 
    0{,}0505\cdot 10^{-17}~\mathrm{s} = 5{,}05\cdot
    10^{-19}~\mathrm{s}
  \end{split}
\end{displaymath}
A to je konec.

\end{document}
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Debian) (preloaded format=latex 2020.12.9)  8 JAN 2021 11:08
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCo
de"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.
{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\
documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname
 tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{
\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode xhtml,,charset=utf-8,html5.
a.b.c.\input "\detokenize{split_ex.tex}"
 (./split_ex.tex
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2019/12/20 v1.4l Standard LaTeX file (size option)
)
\c@part=\count168
\c@section=\count169
\c@subsection=\count170
\c@subsubsection=\count171
\c@paragraph=\count172
\c@subparagraph=\count173
\c@figure=\count174
\c@table=\count175
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen134
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/tex4ht.sty
version 2020-10-16-13:47
Package: tex4ht 
--------------------------------------
--- Note --- for _ at preamble, use the command line option `early_'
--------------------------------------
--------------------------------------
--- Note --- for ^ at preamble, use the command line option `early^'
--------------------------------------
\tmp:toks=\toks15
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/usepackage.4ht
version 2020-10-17-13:53
)
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
Package: babel 2020/09/01 3.48 The Babel package

(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def
File: babel.def 2020/09/01 3.48 Babel common definitions
\babel@savecnt=\count176
\U@D=\dimen135
\l@babelnohyphens=\language86

(/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def)
\bbl@readstream=\read2
)
\bbl@dirlevel=\count177

(/usr/share/texlive/texmf-dist/tex/generic/babel-czech/czech.ldf
Language: czech 2008/07/06 v3.1a Czech support from the babel system
Package babel Info: Making " an active character on input line 172.
\cs@wordlen=\count178
Package babel Info: Making - an active character on input line 226.
))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2018/08/11 v1.3c Input encoding file
\inpenc@prehook=\toks16
\inpenc@posthook=\toks17
)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2020/01/20 v2.17e AMS math features
\@mathmargin=\skip49

For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2000/06/29 v2.01 AMS text

(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks18
\ex@=\dimen136
))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen137
)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 2016/03/08 v2.02 operator names
)
\inf@bad=\count179
LaTeX Info: Redefining \frac on input line 227.
\uproot@=\count180
\leftroot@=\count181
LaTeX Info: Redefining \overline on input line 389.
\classnum@=\count182
\DOTSCASE@=\count183
LaTeX Info: Redefining \ldots on input line 486.
LaTeX Info: Redefining \dots on input line 489.
LaTeX Info: Redefining \cdots on input line 610.
\Mathstrutbox@=\box45
\strutbox@=\box46
\big@size=\dimen138
LaTeX Font Info:    Redeclaring font encoding OML on input line 733.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 734.
\macc@depth=\count184
\c@MaxMatrixCols=\count185
\dotsspace@=\muskip16
\c@parentequation=\count186
\dspbrk@lvl=\count187
\tag@help=\toks19
\row@=\count188
\column@=\count189
\maxfields@=\count190
\andhelp@=\toks20
\eqnshift@=\dimen139
\alignsep@=\dimen140
\tagshift@=\dimen141
\tagwidth@=\dimen142
\totwidth@=\dimen143
\lineht@=\dimen144
\@envbody=\toks21
\multlinegap=\skip50
\multlinetaggap=\skip51
\mathdisplay@stack=\toks22
LaTeX Info: Redefining \[ on input line 2859.
LaTeX Info: Redefining \] on input line 2860.
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/tex4ht.4ht
version 2020-03-12-14:03
--------------------------------------
--- Note --- for additional information, use the command line option `info'
--------------------------------------

::::::::::::::::::::::::::::::::::::::::::
 TeX4ht info is available in the log file 
::::::::::::::::::::::::::::::::::::::::::
) (/usr/share/texlive/texmf-dist/tex/generic/tex4ht/tex4ht.sty
version 2020-10-16-13:47

--- needs --- tex4ht split_ex ---
\tmp:cnt=\count191
\openout15 = `split_ex.tmp'.

(./split_ex.tmp)
\tmp:dim=\skip52
 (./split_ex.xref)
\:refout=\write3
\openout3 = `split_ex.xref'.


(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4.4ht
version 2020-11-27-15:09
--------------------------------------
--- Note --- to remove the <?xml version=...?> processing instruction use the c
ommand line option `no-VERSION'
--------------------------------------
--------------------------------------
--- Note --- to remove the DOCTYPE declaration use the command line option `no-
DOCTYPE'
--------------------------------------
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/unicode.4ht
version 2020-09-18-15:30
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4-math.4ht
version 2020-11-09-14:28
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html5.4ht
version 2020-04-13-14:20
)
--------------------------------------
--- Note --- for marking of the base font, use the command line option `fonts+'

--------------------------------------
--------------------------------------
--- Note --- for non active _, use the command line option `no_'
--------------------------------------
--------------------------------------
--- Note --- for _ of catcode 13, use the command line option `_13'
--------------------------------------
--------------------------------------
--- Note --- for non active ^, use the command line option `no^'
--------------------------------------
--------------------------------------
--- Note --- for ^ of catcode 13, use the command line option `^13'
--------------------------------------

(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4.4ht
version 2020-11-27-15:09
--------------------------------------
--- Note --- to ignore CSS font decoration, use the `NoFonts' command line opti
on
--------------------------------------
--------------------------------------
--- Note --- for jpg bitmaps of pictures, use the `jpg' command line option. (C
haracter bitmaps are controled only by `g' records of tex4ht.env and `-g' switc
hes of tex4ht.c) 
--------------------------------------
--------------------------------------
--- Note --- for gif bitmaps of pictures, use the `gif' command line option. (C
haracter bitmaps are controled only by `g' records of tex4ht.env and `-g' switc
hes of tex4ht.c) 
--------------------------------------
--------------------------------------
--- Note --- for content and toc in 2 frames, use the command line option `fram
es'
--------------------------------------
--------------------------------------
--- Note --- for content, toc, and footnotes in 3 frames, use the command line 
option `frames-fn'
--------------------------------------
--------------------------------------
--- Note --- for file extension name xht, use the command line option `xht'
--------------------------------------
TeX4ht package options: xhtml,charset=utf-8,html5,html
--------------------------------------
--- Note --- To print a timestamp, use the command line option timestamp
--------------------------------------
--------------------------------------
--- Note --- to ignore CSS code, use the command line option `-css
--------------------------------------
--------------------------------------
--- Note --- for inline CSS code, use the command line option `css-in'
--------------------------------------
--------------------------------------
--- Note --- for pop ups on mouse over, use the command line option `mouseover'

--------------------------------------
--------------------------------------
--- Note --- for addressing images in a subdirectory, use the command line opti
on `imgdir:.../'
--------------------------------------
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/unicode.4ht
version 2020-09-18-15:30
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4-math.4ht
version 2020-11-09-14:28
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html5.4ht
version 2020-04-13-14:20
--------------------------------------
--- Note --- To print a timestamp, use the command line option timestamp
--------------------------------------
)
\:tokwrite=\toks23
\:tokpage=\toks24
--------------------------------------
--- Note --- for back links to toc, use the command line option `sections+'
--------------------------------------
--------------------------------------
--- Note --- for linear crosslinks of pages, use the command line option `next'

--------------------------------------
\openout15 = `split_ex.4ct'.

\:tocout=\write4
\openout4 = `split_ex.4tc'.


(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4.4ht
version 2020-11-27-15:09
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/unicode.4ht
version 2020-09-18-15:30
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4-math.4ht
version 2020-11-09-14:28
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html5.4ht
version 2020-04-13-14:20
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/latex.4ht
version 2020-10-03-14:24
LaTeX Info: Redefining \_ on input line 173.
LaTeX Info: Redefining \, on input line 787.
LaTeX Info: Redefining \; on input line 788.
LaTeX Info: Redefining \! on input line 789.
LaTeX Info: Redefining \: on input line 790.
LaTeX Info: Redefining \> on input line 791.
--------------------------------------
--- Note --- for links into captions, instead of float heads, use the command l
ine option `refcaption'
--------------------------------------

(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4.4ht
version 2020-11-27-15:09
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/unicode.4ht
version 2020-09-18-15:30
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4-math.4ht
version 2020-11-09-14:28
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html5.4ht
version 2020-04-13-14:20
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4.4ht
version 2020-11-27-15:09
--------------------------------------
--- Note --- For mini tocs immediately aftter the header use the command line o
ption `minitoc<'
--------------------------------------
--------------------------------------
--- Note --- for enumerated list elements with valued data, use the command lin
e option `enumerate+'
--------------------------------------
--------------------------------------
--- Note --- for enumerated list elements li's with value attributes, use the c
ommand line option `enumerate-'
--------------------------------------
--------------------------------------
--- Note --- for CSS2 code, use the command line option `css2'
--------------------------------------
--------------------------------------
--- Note --- for pictorial tabular, use the command line option `pic-tabular'
--------------------------------------
--------------------------------------
--- Note --- for bitmap fbox'es, use the command line option `pic-fbox'
--------------------------------------
--------------------------------------
--- Note --- for bitmap framebox'es, use the command line option `pic-framebox'

--------------------------------------
--------------------------------------
--- Note --- for inline footnotes use command line option `fn-in'
--------------------------------------
--------------------------------------
--- Note --- for tracing of latex font commands, use the command line option `f
onts'
--------------------------------------
--------------------------------------
--- Note --- for width specifications of tabular p entries, use the `p-width' c
ommand line option or a configuration similar to \Configure{HColWidth}{\HCode{ 
style="width:\HColWidth"}}
--------------------------------------
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/unicode.4ht
version 2020-09-18-15:30
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4-math.4ht
version 2020-11-09-14:28
--------------------------------------
--- Note --- for pictorial eqnarray, use the command line option `pic-eqnarray'

--------------------------------------
--------------------------------------
--- Note --- for pictorial array, use the command line option `pic-array'
--------------------------------------
--------------------------------------
--- Note --- for pictorial $...$ environments, use the command line option `pic
-m' (not recommended!!)
--------------------------------------
--------------------------------------
--- Note --- for pictorial $...$ and $$...$$ environments with latex alt, use t
he command line option `pic-m+' (not safe!!)
--------------------------------------
--------------------------------------
--- Note --- for pictorial array, use the command line option `pic-array'
--------------------------------------
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html5.4ht
version 2020-04-13-14:20
))
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/fontmath.4ht
version 2018-11-06-15:55

(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4.4ht
version 2020-11-27-15:09
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/unicode.4ht
version 2020-09-18-15:30
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4-math.4ht
version 2020-11-09-14:28
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html5.4ht
version 2020-04-13-14:20
))
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/article.4ht
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4.4ht
version 2020-11-27-15:09
--------------------------------------
--- Note --- for automatic sectioning pagination, use the command line option `
1', `2', `3', '4', '5', '6', or '7'
--------------------------------------
--------------------------------------
--- Note --- for files named derived from section titles, use the command line 
option `sec-filename'
--------------------------------------
--------------------------------------
--- Note --- for i-columns index, use the command line option `index=i' (e.g., 
index=2)
--------------------------------------
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/unicode.4ht
version 2020-09-18-15:30
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4-math.4ht
version 2020-11-09-14:28
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html5.4ht
version 2020-04-13-14:20
))
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/babel.4ht
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4.4ht
version 2020-11-27-15:09
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/unicode.4ht
version 2020-09-18-15:30
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4-math.4ht
version 2020-11-09-14:28
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html5.4ht
version 2020-04-13-14:20
))
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/czech.4ht
version 2018-11-08-14:20

(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4.4ht
version 2020-11-27-15:09
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/unicode.4ht
version 2020-09-18-15:30
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4-math.4ht
version 2020-11-09-14:28
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html5.4ht
version 2020-04-13-14:20
))
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/inputenc.4ht
version 2009-05-21-09:32

(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4.4ht
version 2020-11-27-15:09
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/unicode.4ht
version 2020-09-18-15:30
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html4-math.4ht
version 2020-11-09-14:28
)
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/html5.4ht
version 2020-04-13-14:20
))
(/usr/share/texlive/texmf-dist/tex/generic/tex4ht/amsmath.4ht
version 2019-12-29-14:17
\tmp:m

Reply via email to