Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaTeXML hanging with TIKZ example #784

Closed
casio7131 opened this issue Jul 7, 2016 · 2 comments
Closed

LaTeXML hanging with TIKZ example #784

casio7131 opened this issue Jul 7, 2016 · 2 comments

Comments

@casio7131
Copy link

I've got a simple example that causes LaTeXML to hang (uncomment marked line). Hopefully it'll be a simple fix.

\documentclass[10pt,a4paper,twoside,openany]{book}
\usepackage{tikz}
\usetikzlibrary{shapes}
\tikzstyle{calloutBox}=[rectangle callout,thick,rounded corners, draw=black, fill=green!70, opacity=0.9, callout absolute pointer={#1}]
\begin{document}
DUMMY TEXT.
\begin{tikzpicture}[remember picture]
\draw[fill=gray,draw=none,opacity=0.1] (0,0) rectangle (15,9.5);
\node[calloutBox={(+1,1)}, text width=6cm] at (+5,6.2) {This works!};
\node[calloutBox={(+1,1)}, text width=6cm] at (+12,6.2) {This works too!};
\node[rectangle callout,thick,rounded corners, draw=black, fill=green!70, opacity=0.9, callout absolute pointer={(+1,1)}, text width=6cm] at (+12,6.2) {... And this works too ...};
\node[rectangle callout,thick,rounded corners, draw=black, fill=green!70, opacity=0.9, callout absolute pointer={(+4.8,8.4)}, text width=6cm] at (+8,1.2) {This works in LaTeXML. Now make this a long line...};
%\node[rectangle callout,thick,rounded corners, draw=black, fill=green!70, opacity=0.9, callout absolute pointer={(+4.8,8.4)}, text width=6cm] at (+12,1.2) {*** Uncomment this line to hang LaTeXML *** (works in pdflatex tho)};
\end{tikzpicture}
\end{document}

Inn case it's useful, here is error after I manually kill it (via CTRL-C):

^C
Fatal:interrupt:interrupted LaTeXML was interrupted
    at ...pgf.tex; line 13 col 225
    INT
    In Core::Definition::Register[\toks Number] from TeX.pool.ltxml line 1105
     <= Core::Stomach[@0x3306218] <= Core::Definition::Primitive[Begin] <= Core::Stomach[@0x3306218] <= Core::Definition::Primitive[Begin] <= Core::Stomach[@0x3306218] <= Core::Definition::Primitive[Begin] <= Core::Stomach[@0x3306218] <= Core::Definition::Primitive[Begin] <= Core::Stomach[@0x3306218] <= Core::Definition::Constructor[\hbox B... <= Core::Stomach[@0x3306218] <= Core::Definition::Primitive[Begin] <= Core::Stomach[@0x3306218] <= Core::Definition::Constructor[\hbox B... <= Core::Stomach[@0x3306218] <= Core::Definition::Primitive[\setbox N... <= Core::Stomach[@0x3306218] <= Core::Definition::Primitive[Begin] <= Core::Stomach[@0x3306218] <= Core::Definition::Constructor[\hbox B... <= Core::Stomach[@0x3306218] <= Core::Definition::Primitive[\setbox N... <= Core::Stomach[@0x3306218] <= Core::Definition::Primitive[Begin] <= Core::Stomach[@0x3306218] <= Core::Definition::Constructor[\hbox B... <= Core::Stomach[@0x3306218] <= Core::Definition::Primitive[\setbox N... <= Core::Stomach[@0x3306218] <= Core::Definition::Constructor[\begin{... <= Core::Stomach[@0x3306218]
1 fatal error

NOTE: I'm using latest LaTeXML (via latexml-daily PPA on Ubuntu).

@dginev dginev added this to the LaTeXML-0.9 milestone Jul 7, 2016
@brucemiller
Copy link
Owner

Alas, it's not so easy; there's some kind of rounding error going on in ``\pgfmathdivide@@` that ends up in an infinite loop, but it's not clear exactly where LaTeXML's error started.

Incidentally, this might be a good place to point to an interesting thing. I'd long thought that there could be a huge speedup implementing the math in perl --- but possibly lots of new rounding differences. I found that there are special bindings for luatex in pgf/libraries/luamath that would likely be a good guide for this.

@brucemiller
Copy link
Owner

Well, it took way to long to sort it out, but developing a binding for pgfmath (which is a pgf package supporting math expressions and floating point) works around the inconsistencies between ptf's math model, and also provides a non-trivial speedup to most tikz/pgf!

Your example shouldn't hang now. Thanks for the report!

@dginev dginev modified the milestones: LaTeXML-0.8.3, LaTeXML-0.9 Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants