Ticket #7081 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Some math equations may break qtassistant

Reported by: Gesner Passos Owned by: Peter Peterson
Priority: major Milestone: Release 2.6
Component: Documentation Keywords:
Cc: Blocked By:
Blocking: Tester: Wenduo Zhou

Description (last modified by Nick Draper) (diff)

Add the Dummy.py file at the Code/Mantid/Framework/PythonInterface/plugins/algorithms

Them, from the mantidpath, execute:

 python <MantidCODE>/Code/Mantid/docs/qtassistant/make_algorithms_help.py --latex /usr/bin/latex -m <MantidBuilt>/bin/ -o /tmp --dvipng /usr/bin/dvipng

It will fail with the following error:

...

  File "/apps/mantid/mantid_testing/Code/Mantid/docs/qtassistant/eqnparser.py", line 212, in _compileDVI
    raise RuntimeError("'%s' returned %d" % (" ".join(cmd), retcode))
RuntimeError: '/usr/bin/latex /tmp/html/img/eqn_C_XvWI.tex' returned 1

To solve the problem, you have to change the equations, from

<math>~20%</math>
<math>T^' = 0.158</math>

to

<math>~20</math>%
<math>T^{'} = 0.158</math>

It is not bad that qtassistant breaks. I think it should really break, so we ensure that all the equations will be properly rendered inside the offline help. However, it would be much easier for the developer if we could provide a better description for the failure. My suggest would be provide the text for the equation that broke the builder.

Note that the equations that broke qtassistant are valid inside wiki pages, that is why, I could not easily find why my commit related to #6962 broke the builder.

Attachments

Dummy.py (440 bytes) - added by Gesner Passos 7 years ago.
A do nothing algorithm which is able to break the builder

Change History

Changed 7 years ago by Gesner Passos

A do nothing algorithm which is able to break the builder

comment:1 Changed 7 years ago by Peter Peterson

  • Status changed from new to accepted

comment:2 Changed 7 years ago by Peter Peterson

Re #7081. Adding more details to failed latex runs.

Changeset: 12febccf0bea975f3d0eec8c540e63baff484755

comment:3 Changed 7 years ago by Peter Peterson

Re #7081. Automatically fix un-escaped percent signs.

Changeset: e7686ce857e68f8203395fa94572acb33b925442

comment:4 Changed 7 years ago by Peter Peterson

Re #7081. Added automatic replacement for prime character.

Changeset: bf2924d28b0d6b13e1952d1e315ca3906d20bda4

comment:5 Changed 7 years ago by Peter Peterson

  • Status changed from accepted to verify
  • Resolution set to fixed

This is in bugfix/7081_qtassistant_error_reporting.

To test:

  1. Put the attached "Dummy.py" into Code/Mantid/Framework/PythonInterface/plugins/algorithms as suggested
  2. make qtassistant target

Also, look at the changes to the code to see that there is more information when this fails.

comment:6 Changed 7 years ago by Wenduo Zhou

  • Status changed from verify to verifying
  • Tester set to Wenduo Zhou

comment:7 Changed 7 years ago by Wenduo Zhou

Line 129: raise RuntimeError("latex executable ('%s') does not exist. (%s), " % LATEX)

Variable "LATEX" is not defined. Ticket is reopened by this reason.

Last edited 7 years ago by Wenduo Zhou (previous) (diff)

comment:8 Changed 7 years ago by Wenduo Zhou

  • Status changed from verifying to reopened
  • Resolution fixed deleted

comment:9 Changed 7 years ago by Peter Peterson

  • Status changed from reopened to accepted

comment:10 Changed 7 years ago by Peter Peterson

Re #7081. Fixed bug in error messages of eqnparser.

Changeset: 555980936a73012339bb6f59b106572306496e0a

comment:11 Changed 7 years ago by Peter Peterson

  • Status changed from accepted to verify
  • Resolution set to fixed

Should be all good now. Same instructions as comment:5

comment:12 Changed 7 years ago by Wenduo Zhou

  • Status changed from verify to verifying

comment:13 Changed 7 years ago by Wenduo Zhou

  • Status changed from verifying to closed

The errors have been corrected. Thus the ticket is closed.

comment:14 Changed 7 years ago by Anders Markvardsen

add first SmyS instrument. re #7081

Changeset: daefc0ae726c8a1204b063e7de74541eaeda0adb

comment:15 Changed 7 years ago by Anders Markvardsen

Apologizes put comment above to wrong ticket should have been #7087

comment:16 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:17 Changed 7 years ago by Nick Draper

  • Component changed from Framework to Documentation
  • Description modified (diff)

comment:18 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7927

Note: See TracTickets for help on using tickets.