michal-h21 / make4ht

Build system for tex4ht
137 stars 15 forks source link

tikz ``path'' command #78

Closed danielezambelli closed 1 year ago

danielezambelli commented 2 years ago

The tikz ``path'' command does not work correctly:

%--8<------------------------------------- \documentclass[10pt,a4paper]{memoir} \usepackage[T1]{fontenc} \usepackage{textcomp}
\usepackage[utf8]{inputenc} \usepackage[italian]{babel}

\usepackage{amsmath, amssymb, amsthm}% amsfonts è caricato da amssymb \usepackage{cancel} \usepackage[normalem]{ulem} % sottolineature \usepackage{lipsum}

\RequirePackage{tikz} \RequirePackage{tkz-fct} % per il disegno di funzioni \RequirePackage{tikz-qtree} % per alberi \usetikzlibrary{ arrows,% arrows.meta, through, automata,% backgrounds,% calc,% decorations.markings,% decorations.shapes,% decorations.text,% decorations.pathreplacing,% fit,% matrix,% mindmap,% patterns,% positioning,% intersections,% shapes,% shapes.geometric, }

\newcommand{\esempiodisa}{% \begin{tikzpicture}[x=5 mm, y=5 mm, smooth, line cap=round] \path[pattern=north west lines, pattern color=gray] (-0.3, -5.9) -- (6.3, 1.25) -- (6.3, 3.3) -- (-0.3, 3.3) -- cycle; \draw (0, -5.6) node[left]{\footnotesize$-5600$} (5.1, 0) node [below]{\footnotesize$103$}; \draw (1.5, 1.5) node {\Large$-$} (5.5, -4.5) node {\Large$+$}; \end{tikzpicture} }

\begin{document}

The tikz ``path'' command does not work correctly:

\esempiodisa

In compilation it produces the following message:

\begin{verbatim} $> make4ht pathpattern.tex -f html5-common_domfilters -c ml_make4ht -l -u -s -d ./html/mathjax "mathjax" [STATUS] make4ht: Conversion started [STATUS] make4ht: Input file: pathpattern.tex pre-processing DVI file (format version 2) processing page 2 PostScript error: undefined in pgfpat4 Operand stack: --nostringval-- --nostringval-- --nostringval-- 0.5 0.5 0.5 [STATUS] make4ht: Conversion finished \end{verbatim}

\end{document} %--8<-------------------------------------

michal-h21 commented 2 years ago

In some cases, the default driver fails. You can try the tikz+ option in such cases. It seems to work in your case, but note that it can fail in other cases:

  make4ht pathpattern.tex -f html5-common_domfilters -c ml_make4ht -l -u -s -d ./html/mathjax "mathjax,tikz+"
danielezambelli commented 2 years ago

In my case it works, but it is not reassuring: "... but note that it can fail in other cases."

thank you very much!