michal-h21 / make4ht

Build system for tex4ht
132 stars 15 forks source link

Fatal error with unicode-math and tikz #67

Closed danielezambelli closed 9 months ago

danielezambelli commented 2 years ago

\NeedsTeXFormat{LaTeX2e}[[2018/01/01] \documentclass{memoir} \RequirePackage[italian]{babel} \usepackage{iftex} \ifpdftex\typeout{* PDFTeX*****} \RequirePackage[T1]{fontenc} \RequirePackage[utf8]{inputenc} \RequirePackage{stix2} \else \ifluatex\typeout{* LuaLaTeX *****} \usepackage{fontspec} \setmainfont{STIX}[Ligatures=TeX] \usepackage[math-style=ISO]{unicode-math} % ERROR with make4ht \setmathfont{STIX Two Math} \fi \fi

\RequirePackage{tikz} % ERROR with make4ht

\begin{document}

Hi, I get an error when I try to compile this file with the command:\

\texttt{make4ht provalualatex.tex -l -u -s -d dist "mathml"}\

If I compile it without the "-l" parameter, the compilation succeeds, but it presents a long list of warnings.\

Where is the error?

How can I fix it?\

Another curiosity: in my browser the word "fix" is not displayed correctly: is this a problem of my browser, of the fonts or of make4ht?\

Thank you for your attention and your work. \end{document}

michal-h21 commented 2 years ago

You are right. It seems that this version of unicode-math-hooks.4ht fixes it:

% unicode-math-hooks.4ht (2022-01-23-07:51), generated from tex4ht-4ht.tex
% Copyright 2021-2022 TeX Users Group
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any
% later version. The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions
% of LaTeX version 2005/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% The Current Maintainer of this work
% is the TeX4ht Project <http://tug.org/tex4ht>.
%
% If you modify this program, changing the
% version identification would be appreciated.
\immediate\write-1{version 2022-01-23-07:51}

\:dontusepackage{unicode-math}
\@ifpackageloaded{fontspec}{}
{\RequirePackage{fontspec}} % it is loaded by unicode-math
\NewDocumentCommand \setmathfont { O{} m O{} }{}
\endinput