brucemiller / LaTeXML

LaTeXML: a TeX and LaTeX to XML/HTML/ePub/MathML translator.
http://dlmf.nist.gov/LaTeXML/
Other
949 stars 101 forks source link

Unable to convert latex book into html #863

Closed sumanstats closed 7 years ago

sumanstats commented 7 years ago

Hi there,

I am these days reading Think Perl 6 in pdf format of which LaTeX source code can be found here https://github.com/AllenDowney/ThinkPerl6/tree/master/book. I easily get the book by compiling https://github.com/AllenDowney/ThinkPerl6/blob/master/book/thinkperl6.tex with latex.

To get the book in html format, I tried to convert this book into html with LaTeXML but couldn't succeed. Any help? This is the error that I get:

root@8c82e561f29f:/home# latexml --destination=thinkperl6.xml thinkperl6.tex
latexml (LaTeXML version 0.8.2; revision c841e72b)
processing started Sun Aug 13 09:05:47 2017

(Digesting TeX thinkperl6...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/TeX.pool.ltxml...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/eTeX.pool.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/pdfTeX.pool.ltxml... 0.01 sec) 0.12 sec)
(Processing content /home/thinkperl6.tex...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/LaTeX.pool.ltxml... 0.17 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/book.cls.ltxml... 0.03 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/geometry.sty.ltxml...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/keyval.sty.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/ifpdf.sty.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/ifvtex.sty.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/ifxetex.sty.ltxml... 0.00 sec) 0.03 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/fontenc.sty.ltxml...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/t1enc.def.ltxml...
(Processing definitions /usr/local/texlive/2017/texmf-dist/tex/latex/base/t1enc.def...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/t1.fontmap.ltxml... 0.02 sec) 0.07 sec) 1.03 sec) 1.05 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/textcomp.sty.ltxml... 0.01 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/mathpazo.sty.ltxml... 0.01 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/url.sty.ltxml... 0.01 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/fancyhdr.sty.ltxml... 0.01 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/graphicx.sty.ltxml...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/graphics.sty.ltxml... 0.01 sec) 0.15 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/amsmath.sty.ltxml...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/amsbsy.sty.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/amstext.sty.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/amsopn.sty.ltxml... 0.00 sec) 0.06 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/amsthm.sty.ltxml... 0.00 sec)
Warning:missing_file:exercise Can't find binding for package exercise
        at /home/thinkperl6.tex; line 27 col 11
        Anticipate undefined macros or environments
        search paths are /home
        In Core::Definition::Constructor[\usepac... from LaTeX.pool.ltxml line 584

(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/makeidx.sty.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/setspace.sty.ltxml... 0.00 sec)
Warning:missing_file:hevea Can't find binding for package hevea
        at /home/thinkperl6.tex; line 31 col 11
        Anticipate undefined macros or environments
        In Core::Definition::Constructor[\usepac... from LaTeX.pool.ltxml line 584

Warning:missing_file:upquote Can't find binding for package upquote
        at /home/thinkperl6.tex; line 32 col 11
        Anticipate undefined macros or environments
        In Core::Definition::Constructor[\usepac... from LaTeX.pool.ltxml line 584

Warning:missing_file:appendix Can't find binding for package appendix
        at /home/thinkperl6.tex; line 33 col 11
        Anticipate undefined macros or environments
        In Core::Definition::Constructor[\usepac... from LaTeX.pool.ltxml line 584

(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/hyperref.sty.ltxml...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/nameref.sty.ltxml... 0.00 sec) 0.02 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/babel.sty.ltxml...
(Processing definitions /usr/local/texlive/2017/texmf-dist/tex/generic/babel/babel.sty...
(Processing definitions /usr/local/texlive/2017/texmf-dist/tex/generic/babel/switch.def... 0.05 sec)
(Processing definitions /usr/local/texlive/2017/texmf-dist/tex/generic/babel-english/english.ldf...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/babel.def.ltxml...
(Processing definitions /usr/local/texlive/2017/texmf-dist/tex/generic/babel/babel.def...
(Processing definitions /usr/local/texlive/2017/texmf-var/tex/generic/config/language.def... 0.06 sec) 0.72 sec) 0.81 sec) 1.13 sec) 2.25 sec) 2.49 sec)
Warning:missing_file:ucs Can't find binding for package ucs
        at /home/thinkperl6.tex; line 36 col 11
        Anticipate undefined macros or environments
        In Core::Definition::Constructor[\usepac... from LaTeX.pool.ltxml line 584

(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/inputenc.sty.ltxml...
(Processing definitions /usr/local/texlive/2017/texmf-dist/tex/latex/ucs/utf8x.def... 0.20 sec) 0.39 sec)
Warning:missing_file:ucs Can't find binding for package ucs
        at /home/thinkperl6.tex; line 37 col 11
        Anticipate undefined macros or environments
        In Core::Definition::Constructor[\Requir... from LaTeX.pool.ltxml line 595

Warning:missing_file:fancyvrb Can't find binding for package fancyvrb
        at /home/thinkperl6.tex; line 39 col 1
        Anticipate undefined macros or environments
        In Core::Definition::Constructor[\usepac... from LaTeX.pool.ltxml line 584

Error:undefined:\newstyle The token T_CS[\newstyle] is not defined.
        at /home/thinkperl6.tex; line 47 col 9
        Defining it now as <ltx:ERROR/>
        In Core::Stomach[@0x558bebc0a5f0] at /home/thinkperl6.tex; line 47 col 9

Error:undefined:\DefineVerbatimEnvironment The token T_CS[\DefineVerbatimEnvironment] is not defined.
        at /home/thinkperl6.tex; line 52 col 26
        Defining it now as <ltx:ERROR/>
        In Core::Stomach[@0x558bebc0a5f0] at /home/thinkperl6.tex; line 52 col 26

Error:undefined:\setlinkstext The token T_CS[\setlinkstext] is not defined.
        at /home/thinkperl6.tex; line 55 col 14
        Defining it now as <ltx:ERROR/>
        In Core::Stomach[@0x558bebc0a5f0] at /home/thinkperl6.tex; line 55 col 14

Error:undefined:\imgsrc The token T_CS[\imgsrc] is not defined.
        at /home/thinkperl6.tex; line 56 col 10
        Defining it now as <ltx:ERROR/>
        In Core::Stomach[@0x558bebc0a5f0] at /home/thinkperl6.tex; line 56 col 10
         <= Core::Definition::Primitive[Begin] <= Core::Stomach[@0x558bebc0a5f0] <= ...

Error:latex:\GenericError Package utf8x Error: Please use \usepackage{ucs} to support encoding utf8x
        at /home/thinkperl6.tex; line 67 col 16
        See the utf8x package documentation for explanation.
        In Core::Definition::Primitive[\GenericE... from LaTeX.pool.ltxml line 4187
         <= Core::Stomach[@0x558bebc0a5f0] <= Core::Definition::Primitive[Begin] <= Core::Stomach[@0x558bebc0a5f0] <= ...

(Processing content /home/latexonly.tex...
Info:ignore:\section Ignoring redefinition of \section
        at /home/latexonly.tex; line 34 col 33

Info:ignore:\subsection Ignoring redefinition of \subsection
        at /home/latexonly.tex; line 38 col 33

Info:ignore:\subsubsection Ignoring redefinition of \subsubsection
        at /home/latexonly.tex; line 42 col 38
 0.03 sec)
Error:undefined:{latexonly} The environment {latexonly} is not defined.
        at /home/thinkperl6.tex; line 96 col 17
        Next token is T_SPACE[U+000a/LF]
        In Core::Definition::Expandable[\begin {}] from LaTeX.pool.ltxml line 154
         <= Core::Gullet[@0x558bebe62ef0] <= Core::Stomach[@0x558bebc0a5f0] <= Core::Definition::Constructor[\begin{... <= ...

Error:undefined:{htmlonly} The environment {htmlonly} is not defined.
        at /home/thinkperl6.tex; line 211 col 16
        Next token is T_SPACE[U+000a/LF]
        In Core::Definition::Expandable[\begin {}] from LaTeX.pool.ltxml line 154
         <= Core::Gullet[@0x558bebe62ef0] <= Core::Stomach[@0x558bebc0a5f0] <= Core::Definition::Constructor[\begin{... <= ...

(Processing content /home/preface.tex... 0.37 sec)
(Processing content /home/chapt1.tex... 1.36 sec)
(Processing content /home/chapt_var_expr.tex...
Error:undefined:\unichar The token T_CS[\unichar] is not defined.
        at /home/chapt_var_expr.tex; line 152 col 11
        Defining it now as <ltx:ERROR/>
        In Core::Stomach[@0x558bebc0a5f0] at /home/chapt_var_expr.tex; line 152 col 11
         <= Core::Definition::Primitive[Begin] <= Core::Stomach[@0x558bebc0a5f0] <= Core::Definition::Constructor[\begin{... <= ...

Error:expected:delimiter Verbatim argument lost
        at /home/chapt_var_expr.tex; line 383 col 36
        Bindings for preceding code is probably broken
        Next token is T_OTHER[']
        In Core::Definition::Expandable[\verb] from LaTeX.pool.ltxml line 1358
         <= Core::Gullet[@0x558bebe62ef0] <= Core::Stomach[@0x558bebc0a5f0] <= Core::Definition::Constructor[\@index... <= ...
 1.57 sec)
(Processing content /home/chapt_func.tex... 2.18 sec)
(Processing content /home/Conditional_and_recursion.tex... 2.22 sec)
(Processing content /home/Fruitful_func.tex... 1.61 sec)
(Processing content /home/iteration.tex... 1.25 sec)
(Processing content /home/Strings.tex... 2.93 sec)
(Processing content /home/wordplay.tex... 1.24 sec)
(Processing content /home/Arrays.tex... 2.73 sec)
(Processing content /home/hashes.tex... 1.93 sec)
(Processing content /home/data_struct_selection.tex... 3.23 sec)
(Processing content /home/intro_part_2.tex... 0.20 sec)
(Processing content /home/objects.tex...
Error:unexpected:_ Script _ can only appear in math mode
        at /home/objects.tex; line 2107 col 13
        In Core::Definition::Primitive[Subscript] from TeX.pool.ltxml line 3613
         <= Core::Stomach[@0x558bebc0a5f0] <= Core::Gullet[@0x558bebe62ef0] <= Core::Stomach[@0x558bebc0a5f0] <= ...
 3.54 sec)
(Processing content /home/grammars.tex... 2.18 sec)
(Processing content /home/functional.tex... 3.71 sec)
(Processing content /home/appendix_solutions.tex... 7.08 sec) 45.91 sec) 46.57 sec)
(Building...
(Loading compiled schema /usr/local/share/perl/5.26.0/LaTeXML/resources/RelaxNG/LaTeXML.model... 0.03 sec)................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. 22.77 sec)
(Rewriting... 0.15 sec)
(Math Parsing...190 formulae ...[1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25][26][27][28][29][30][31][32][33][34][35][36][37][38][39][40][41][42][43][44][45][46][47][48][49][50][51][52][53][54][55][56][57][58][59][60][61][62][63][64][65][66][67][68][69][70][71][72][73][74][75][76][77][78][79][80][81][82][83][84][85][86][87][88][89][90][91][92][93][94][95][96][97][98][99][100][101][102][103][104][105][106][107][108][109][110][111][112][113][114][115][116][117][118][119][120][121][122]
Warning:not_parsed:MULOP.UNKNOWN.UNKNOWN>PERIOD MathParser failed to match rule 'Anything'
        at /home/Strings.tex; line 709 col 11
        In "$/bc.e/$"
        /[[MULOP]] b[[UNKNOWN]] c[[UNKNOWN]]
                > .[[PERIOD]] e[[UNKNOWN]] /[[MULOP]]
[F123][124][125][126][127][128][129]
Warning:not_parsed:UNKNOWN.UNKNOWN>MULOP MathParser failed to match rule 'Anything'
        at /home/Strings.tex; line 809 col 44
        In "$rx//$"
        r[[UNKNOWN]] x[[UNKNOWN]]
                > /[[MULOP]] /[[MULOP]]
[F130][131][132][133][134][135][136][137][138][139][140][141][142][143][144][145][146][147][148][149][150][151][152][153][154][155][156][157][158][159][160][161][162][163][164][165][166][167][168][169][170][171][172][173][174][175][176][177][178][179][180][181][182][183][184][185][186][187][188][189][190]
Math parsing succeeded:
   ltx:XMWrap: 0/4
   ltx:XMArg: 83/83
   ltx:XMath: 188/190
Symbols assumed as simple identifiers (with # of occurences):
   '?' (2), 'A{italic}' (6), 'F{italic}' (5), 'H{italic}' (1), 'O{italic}' (4), 'Z{italic}' (3), 'a{italic}' (14), 'b{italic}' (13), 'c{italic}' (12), 'distance' (1), 'd{italic}' (4), 'e{italic}' (3), 'fibonacci' (10), 'g{italic}' (4), 'h{italic}' (2), 'i{italic}' (4), 'k{italic}' (5), 'm{italic}' (6), 'n{italic}' (41), 'pi' (5), 'p{italic}' (1), 'r{italic}' (5), 's{italic}' (3), 't{italic}' (2), 'x{italic}' (15), 'y{italic}' (11), 'z{italic}' (5)
Set MATHPARSER_SPECULATE to speculate on possible notations.
 1.72 sec)
(Finalizing... 1.48 sec)
Conversion complete: 9 warnings; 10 errors; 7 undefined macros[\newstyle, {latexonly}, \setlinkstext, \imgsrc, \DefineVerbatimEnvironment, {htmlonly}, \unichar]; 6 missing files[ucs.sty, upquote.sty, fancyvrb.sty, hevea.sty, exercise.sty, appendix.sty].
processing finished Sun Aug 13 09:07:01 2017

root@8c82e561f29f:/home# latexml --destination=thinkperl6.html thinkperl6
latexml (LaTeXML version 0.8.2; revision c841e72b)
processing started Sun Aug 13 09:07:21 2017

(Digesting TeX thinkperl6...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/TeX.pool.ltxml...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/eTeX.pool.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/pdfTeX.pool.ltxml... 0.01 sec) 0.11 sec)
(Processing content /home/thinkperl6.tex...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/LaTeX.pool.ltxml... 0.14 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/book.cls.ltxml... 0.01 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/geometry.sty.ltxml...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/keyval.sty.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/ifpdf.sty.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/ifvtex.sty.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/ifxetex.sty.ltxml... 0.00 sec) 0.03 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/fontenc.sty.ltxml...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/t1enc.def.ltxml...
(Processing definitions /usr/local/texlive/2017/texmf-dist/tex/latex/base/t1enc.def...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/t1.fontmap.ltxml... 0.00 sec) 0.06 sec) 0.31 sec) 0.32 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/textcomp.sty.ltxml... 0.01 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/mathpazo.sty.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/url.sty.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/fancyhdr.sty.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/graphicx.sty.ltxml...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/graphics.sty.ltxml... 0.00 sec) 0.02 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/amsmath.sty.ltxml...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/amsbsy.sty.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/amstext.sty.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/amsopn.sty.ltxml... 0.00 sec) 0.04 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/amsthm.sty.ltxml... 0.00 sec)
Warning:missing_file:exercise Can't find binding for package exercise
        at /home/thinkperl6.tex; line 27 col 11
        Anticipate undefined macros or environments
        search paths are /home
        In Core::Definition::Constructor[\usepac... from LaTeX.pool.ltxml line 584

(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/makeidx.sty.ltxml... 0.00 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/setspace.sty.ltxml... 0.00 sec)
Warning:missing_file:hevea Can't find binding for package hevea
        at /home/thinkperl6.tex; line 31 col 11
        Anticipate undefined macros or environments
        In Core::Definition::Constructor[\usepac... from LaTeX.pool.ltxml line 584

Warning:missing_file:upquote Can't find binding for package upquote
        at /home/thinkperl6.tex; line 32 col 11
        Anticipate undefined macros or environments
        In Core::Definition::Constructor[\usepac... from LaTeX.pool.ltxml line 584

Warning:missing_file:appendix Can't find binding for package appendix
        at /home/thinkperl6.tex; line 33 col 11
        Anticipate undefined macros or environments
        In Core::Definition::Constructor[\usepac... from LaTeX.pool.ltxml line 584

(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/hyperref.sty.ltxml...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/nameref.sty.ltxml... 0.00 sec) 0.02 sec)
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/babel.sty.ltxml...
(Processing definitions /usr/local/texlive/2017/texmf-dist/tex/generic/babel/babel.sty...
(Processing definitions /usr/local/texlive/2017/texmf-dist/tex/generic/babel/switch.def... 0.04 sec)
(Processing definitions /usr/local/texlive/2017/texmf-dist/tex/generic/babel-english/english.ldf...
(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/babel.def.ltxml...
(Processing definitions /usr/local/texlive/2017/texmf-dist/tex/generic/babel/babel.def...
(Processing definitions /usr/local/texlive/2017/texmf-var/tex/generic/config/language.def... 0.05 sec) 0.65 sec) 0.74 sec) 1.04 sec) 2.02 sec) 2.10 sec)
Warning:missing_file:ucs Can't find binding for package ucs
        at /home/thinkperl6.tex; line 36 col 11
        Anticipate undefined macros or environments
        In Core::Definition::Constructor[\usepac... from LaTeX.pool.ltxml line 584

(Loading /usr/local/share/perl/5.26.0/LaTeXML/Package/inputenc.sty.ltxml...
(Processing definitions /usr/local/texlive/2017/texmf-dist/tex/latex/ucs/utf8x.def... 0.20 sec) 0.29 sec)
Warning:missing_file:ucs Can't find binding for package ucs
        at /home/thinkperl6.tex; line 37 col 11
        Anticipate undefined macros or environments
        In Core::Definition::Constructor[\Requir... from LaTeX.pool.ltxml line 595

Warning:missing_file:fancyvrb Can't find binding for package fancyvrb
        at /home/thinkperl6.tex; line 39 col 1
        Anticipate undefined macros or environments
        In Core::Definition::Constructor[\usepac... from LaTeX.pool.ltxml line 584

Error:undefined:\newstyle The token T_CS[\newstyle] is not defined.
        at /home/thinkperl6.tex; line 47 col 9
        Defining it now as <ltx:ERROR/>
        In Core::Stomach[@0x5648565d80e0] at /home/thinkperl6.tex; line 47 col 9

Error:undefined:\DefineVerbatimEnvironment The token T_CS[\DefineVerbatimEnvironment] is not defined.
        at /home/thinkperl6.tex; line 52 col 26
        Defining it now as <ltx:ERROR/>
        In Core::Stomach[@0x5648565d80e0] at /home/thinkperl6.tex; line 52 col 26

Error:undefined:\setlinkstext The token T_CS[\setlinkstext] is not defined.
        at /home/thinkperl6.tex; line 55 col 14
        Defining it now as <ltx:ERROR/>
        In Core::Stomach[@0x5648565d80e0] at /home/thinkperl6.tex; line 55 col 14

Error:undefined:\imgsrc The token T_CS[\imgsrc] is not defined.
        at /home/thinkperl6.tex; line 56 col 10
        Defining it now as <ltx:ERROR/>
        In Core::Stomach[@0x5648565d80e0] at /home/thinkperl6.tex; line 56 col 10
         <= Core::Definition::Primitive[Begin] <= Core::Stomach[@0x5648565d80e0] <= ...

Error:latex:\GenericError Package utf8x Error: Please use \usepackage{ucs} to support encoding utf8x
        at /home/thinkperl6.tex; line 67 col 16
        See the utf8x package documentation for explanation.
        In Core::Definition::Primitive[\GenericE... from LaTeX.pool.ltxml line 4187
         <= Core::Stomach[@0x5648565d80e0] <= Core::Definition::Primitive[Begin] <= Core::Stomach[@0x5648565d80e0] <= ...

(Processing content /home/latexonly.tex...
Info:ignore:\section Ignoring redefinition of \section
        at /home/latexonly.tex; line 34 col 33

Info:ignore:\subsection Ignoring redefinition of \subsection
        at /home/latexonly.tex; line 38 col 33

Info:ignore:\subsubsection Ignoring redefinition of \subsubsection
        at /home/latexonly.tex; line 42 col 38
 0.03 sec)
Error:undefined:{latexonly} The environment {latexonly} is not defined.
        at /home/thinkperl6.tex; line 96 col 17
        Next token is T_SPACE[U+000a/LF]
        In Core::Definition::Expandable[\begin {}] from LaTeX.pool.ltxml line 154
         <= Core::Gullet[@0x5648567b6db0] <= Core::Stomach[@0x5648565d80e0] <= Core::Definition::Constructor[\begin{... <= ...

Error:undefined:{htmlonly} The environment {htmlonly} is not defined.
        at /home/thinkperl6.tex; line 211 col 16
        Next token is T_SPACE[U+000a/LF]
        In Core::Definition::Expandable[\begin {}] from LaTeX.pool.ltxml line 154
         <= Core::Gullet[@0x5648567b6db0] <= Core::Stomach[@0x5648565d80e0] <= Core::Definition::Constructor[\begin{... <= ...

(Processing content /home/preface.tex... 0.38 sec)
(Processing content /home/chapt1.tex... 1.33 sec)
(Processing content /home/chapt_var_expr.tex...
Error:undefined:\unichar The token T_CS[\unichar] is not defined.
        at /home/chapt_var_expr.tex; line 152 col 11
        Defining it now as <ltx:ERROR/>
        In Core::Stomach[@0x5648565d80e0] at /home/chapt_var_expr.tex; line 152 col 11
         <= Core::Definition::Primitive[Begin] <= Core::Stomach[@0x5648565d80e0] <= Core::Definition::Constructor[\begin{... <= ...

Error:expected:delimiter Verbatim argument lost
        at /home/chapt_var_expr.tex; line 383 col 36
        Bindings for preceding code is probably broken
        Next token is T_OTHER[']
        In Core::Definition::Expandable[\verb] from LaTeX.pool.ltxml line 1358
         <= Core::Gullet[@0x5648567b6db0] <= Core::Stomach[@0x5648565d80e0] <= Core::Definition::Constructor[\@index... <= ...
 1.48 sec)
(Processing content /home/chapt_func.tex... 2.14 sec)
(Processing content /home/Conditional_and_recursion.tex... 2.11 sec)
(Processing content /home/Fruitful_func.tex... 1.57 sec)
(Processing content /home/iteration.tex... 1.21 sec)
(Processing content /home/Strings.tex... 2.81 sec)
(Processing content /home/wordplay.tex... 1.21 sec)
(Processing content /home/Arrays.tex... 2.58 sec)
(Processing content /home/hashes.tex... 1.86 sec)
(Processing content /home/data_struct_selection.tex... 3.14 sec)
(Processing content /home/intro_part_2.tex... 0.21 sec)
(Processing content /home/objects.tex...
Error:unexpected:_ Script _ can only appear in math mode
        at /home/objects.tex; line 2107 col 13
        In Core::Definition::Primitive[Subscript] from TeX.pool.ltxml line 3613
         <= Core::Stomach[@0x5648565d80e0] <= Core::Gullet[@0x5648567b6db0] <= Core::Stomach[@0x5648565d80e0] <= ...
 3.45 sec)
(Processing content /home/grammars.tex... 1.96 sec)
(Processing content /home/functional.tex... 3.59 sec)
(Processing content /home/appendix_solutions.tex... 6.77 sec) 42.26 sec) 42.81 sec)
(Building...
(Loading compiled schema /usr/local/share/perl/5.26.0/LaTeXML/resources/RelaxNG/LaTeXML.model... 0.01 sec)................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. 23.71 sec)
(Rewriting... 0.13 sec)
(Math Parsing...190 formulae ...[1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25][26][27][28][29][30][31][32][33][34][35][36][37][38][39][40][41][42][43][44][45][46][47][48][49][50][51][52][53][54][55][56][57][58][59][60][61][62][63][64][65][66][67][68][69][70][71][72][73][74][75][76][77][78][79][80][81][82][83][84][85][86][87][88][89][90][91][92][93][94][95][96][97][98][99][100][101][102][103][104][105][106][107][108][109][110][111][112][113][114][115][116][117][118][119][120][121][122]
Warning:not_parsed:MULOP.UNKNOWN.UNKNOWN>PERIOD MathParser failed to match rule 'Anything'
        at /home/Strings.tex; line 709 col 11
        In "$/bc.e/$"
        /[[MULOP]] b[[UNKNOWN]] c[[UNKNOWN]]
                > .[[PERIOD]] e[[UNKNOWN]] /[[MULOP]]
[F123][124][125][126][127][128][129]
Warning:not_parsed:UNKNOWN.UNKNOWN>MULOP MathParser failed to match rule 'Anything'
        at /home/Strings.tex; line 809 col 44
        In "$rx//$"
        r[[UNKNOWN]] x[[UNKNOWN]]
                > /[[MULOP]] /[[MULOP]]
[F130][131][132][133][134][135][136][137][138][139][140][141][142][143][144][145][146][147][148][149][150][151][152][153][154][155][156][157][158][159][160][161][162][163][164][165][166][167][168][169][170][171][172][173][174][175][176][177][178][179][180][181][182][183][184][185][186][187][188][189][190]
Math parsing succeeded:
   ltx:XMath: 188/190
   ltx:XMArg: 83/83
   ltx:XMWrap: 0/4
Symbols assumed as simple identifiers (with # of occurences):
   '?' (2), 'A{italic}' (6), 'F{italic}' (5), 'H{italic}' (1), 'O{italic}' (4), 'Z{italic}' (3), 'a{italic}' (14), 'b{italic}' (13), 'c{italic}' (12), 'distance' (1), 'd{italic}' (4), 'e{italic}' (3), 'fibonacci' (10), 'g{italic}' (4), 'h{italic}' (2), 'i{italic}' (4), 'k{italic}' (5), 'm{italic}' (6), 'n{italic}' (41), 'pi' (5), 'p{italic}' (1), 'r{italic}' (5), 's{italic}' (3), 't{italic}' (2), 'x{italic}' (15), 'y{italic}' (11), 'z{italic}' (5)
Set MATHPARSER_SPECULATE to speculate on possible notations.
 1.98 sec)
(Finalizing... 1.50 sec)
Conversion complete: 9 warnings; 10 errors; 7 undefined macros[\DefineVerbatimEnvironment, \unichar, \newstyle, \imgsrc, {latexonly}, {htmlonly}, \setlinkstext]; 6 missing files[hevea.sty, exercise.sty, appendix.sty, ucs.sty, fancyvrb.sty, upquote.sty].
processing finished Sun Aug 13 09:08:32 2017

Best regards, sumandoc

brucemiller commented 7 years ago

Basically, the problem is due to not having LaTeXML-specific bindings of several latex packages (someof which are likely ignorable). You might try the --includestyles option, but I suspect the missing binding for fancyverb will cause problems. (there's an unfinished binding for that floating around, but not yet complete).

dginev commented 7 years ago

Has this question been answered sufficiently @sumandoc ? We can assist further with the sources if you wish, but for now I will resolve here.