fred-wang / TeXZilla

LALR Javascript LaTeX-to-MathML converter compatible with Unicode
http://fred-wang.github.io/TeXZilla/
130 stars 21 forks source link

make all fails #80

Open jido opened 4 weeks ago

jido commented 4 weeks ago

I got that error when trying to build:

curl http://www.w3.org/2003/entities/2007xml/unicode.xml -o unicode.xml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   167  100   167    0     0   2686      0 --:--:-- --:--:-- --:--:--  2693
xsltproc extractChars.xsl unicode.xml > chars.txt
unicode.xml:6: parser error : Opening and ending tag mismatch: hr line 5 and body
</body>
       ^
unicode.xml:7: parser error : Opening and ending tag mismatch: body line 3 and html
</html>
       ^
unicode.xml:8: parser error : Premature end of data in tag html line 1

^
unable to parse unicode.xml
make: *** [chars.txt] Error 6

I was able to get past that by adding the -L option to curl (follow redirects), but then I got a new error:

generateCharCommands.py chars.txt char-commands.txt;
/bin/sh: generateCharCommands.py: command not found
make: *** [char-commands.txt] Error 127

I can add "." to my path but I really shouldn't have to. Anyway, it fails again with the error:

generateCharCommands.py chars.txt char-commands.txt;
/bin/sh: ./generateCharCommands.py: gmake: bad interpreter: No such file or directory
make: *** [char-commands.txt] Error 126

I replaced #!gmake with #!/usr/bin/python3 to get past that, only to get one more error:

generateCharCommands.py chars.txt char-commands.txt;
cat char-commands.txt base-commands.txt | egrep -v "^#" | \
    sort --reverse --field-separator='"' --key=2,2 > commands.txt
cat main.jisonlex commands.txt > TeXZilla.jisonlex
echo "[\uD800-\uDBFF] return \"HIGH_SURROGATE\";" >> TeXZilla.jisonlex
echo "[\uDC00-\uDFFF] return \"LOW_SURROGATE\";" >> TeXZilla.jisonlex
echo ". return \"BMP_CHARACTER\";" >> TeXZilla.jisonlex
Generating the parser, this may take some time...
outfile TeXZilla-web.js --module-type js --parser-type lalr TeXZilla.jison TeXZilla.jisonlex
make: outfile: No such file or directory
make: [TeXZilla-web.js] Error 1 (ignored)
sed -i "s|\\\\b)/|)/|g" TeXZilla-web.js # jison issue 204
sed: 1: "TeXZilla-web.js": invalid command code T
make: *** [TeXZilla-web.js] Error 1

I have no idea what is outfile and I give up at that point.