MathHubInfo / Legacy-planetary

Legacy: Planetary System is a math-enabled Web 3.0 information portal.
http://trac.mathweb.org/planetary/
79 stars 24 forks source link

Planetary should do better error reporting for LaTeXML fatal errors (was: silent failure of DruTeXML/LaTeXML for posts containing an unescaped "# symbol") #354

Open holtzermann17 opened 11 years ago

holtzermann17 commented 11 years ago

This results in a silent failure:

\begin{itemize}
\item Conference Dial-in Number: +1 (805) 360-1000
\item Participant Access Code: 759836#
\end{itemize}

... as "seen" here: http://metameso.org/beta/node/87359 (http://metameso.org/beta/node/87359/source).

[@kohlhase or @jucovschi can you please add Deyan (@dginev) to this repo as a collaborator so I can @-message him about this issue?]

dginev commented 11 years ago

I would be surprised if the failure is really "silent" - the LaTeXML web service ought to be returning an empty result and a detailed log that should be indicating a Fatal error (as well as the fatal status code - 3).

Do you have the returned log somewhere? When I try the code in the web editor, I get exactly what I explain above. There should be better error reporting for fatal errors on the Planetary side, I suspect.

P.S. As this is a fatal error in TeX as well, you can't expect a non-empty result here, since the error is rather critical. My suggestion would be to display the log message when the HTML result is empty, to draw attention on the issue. Or some nice-to-the-eye variation on that.

holtzermann17 commented 11 years ago

Yes (and I've changed the issue title to be more general). Just for comparison - https://www.writelatex.com/148379crcbxk - highlights the incorrect line in the input and gives the LaTeX error

You can't use `macro parameter character #' in horizontal mode.

This suggests that if we receive a fatal error in LaTeXML we might want to redirect back to the editor page and highlight the line with a comparable message.

dginev commented 11 years ago

This suggests that if we receive a fatal error in LaTeXML we might want to redirect back to the editor page and highlight the line with a comparable message.

If you want to handle this in the editor, what WriteLaTeX is doing is indeed a good example to follow. The information you would need is already in the log file.

holtzermann17 commented 11 years ago

This showed up again for a user who posted a "bare" URL with a # in it (http://planetmath.org/node/87397). I marked the issue as "priority".

holtzermann17 commented 11 years ago

Adding "editor" tag. Brief discussions by email with @jucovschi @dginev about using WebSockets to help facilitate real-time interaction with the LaTeXML daemon. LaTeX is so flexible that most issues couldn't be solved on a line-by-line basis, but unescaped # could probably at least trigger a warning (even without tight LaTeXML integration)...

holtzermann17 commented 11 years ago

Relevant to "Deyan Ginev peer review metaticket" https://github.com/holtzermann17/planetmath-docs/issues/80

dginev commented 10 years ago

Mihnea already has a prototype for reporting LaTeXML errors inline, you should coordinate with him on adopting the code in the main repository. He has a branch for the Planetary development used in the glossary which is KWARC-internal, from what I have understood today.

I saw a small demo and it looks nice, but it also hinges on the LaTeXML error reports becoming more precise. We have that as one of the first priorities when we reach 0.9 development, as described at: https://trac.mathweb.org/LaTeXML/ticket/1425#comment:26

dginev commented 10 years ago

I found him - his GitHub handle is @m-iancu.

holtzermann17 commented 10 years ago

We had discussed this very briefly here: https://github.com/m-iancu/planetary/commit/7ea4dc3d127a24aa57d13b37370dfd9e577da196 (Thanks for the reminder.) I think what he's talking about there will be interesting to you @dginev (perhaps you already got the overview in the demo, though).