7
$\begingroup$

Using the Wolfram Workbench 2 (and Mathematica 9) to build HTML documentation for a package I am developing, I am ending up with HTML pages that contain a lot of text elements that look like this:

Div[{class -> MCap}, {Change a few exchange reaction flux bounds to reflect an aerobic minimal glucose medium.}]

or

Div[{}, {XMLElement[a, {href -> javascript:input('i_9'), onmouseover -> javascript:return(true);}, {XMLElement[img, {src -> Files/Constraint-based modeling/I_10.gif, height -> 35, width -> 447, alt -> Click for copyable input}, {}]}]}]Div[{name -> i_9_out, id -> i_9_out, class -> IFL}, {}]

It looks a lot like a shadowing error and indeed a new Div function has been introduced to Mathematica 9. Is there a way to work around this for the moment? The HTML documentation builds fine with Mathematica 8.

$\endgroup$

1 Answer 1

4
$\begingroup$

The Documentation Tools in Workbench 2.0 haven't been updated yet to work properly with Mathematica 9, so the easiest workaround is to use Mathematica 8 to build your HTML pages.

However, if this isn't a option for whatever reason, you could try to modify the code of Documentation Tools in order to solve this particular issue. I haven't tested the following, but I suspect there's a high chance it might work.

The culprit in your case is the file /Transmogrify/Kernel/Transmogrify.m, which can be found in the directory DocumentationBuild, whose value can in turn be read of from the first few log lines of a doc build in WorkBench. In Transmogrify.m, change the line

Div[ attr_List:{}, cont_ ] := TagElement["div", attr, cont];

(found at line number 2588) to

Unprotect[Div];
Div[ attr_List:{}, cont_ ] := TagElement["div", attr, cont];
Protect[Div];

Let me know if this did the trick!

$\endgroup$
2
  • $\begingroup$ It worked for me (Mathematica v9.0.1, Workbench 2.0), but all the links point to the web (reference.wolfram.com), so none of them really work. $\endgroup$
    – QuantumDot
    Dec 7, 2014 at 22:46
  • $\begingroup$ @QuantumDot You can fix them by adding this Teake's code to your createHTML target in docbuild.xml. It's also implemented in WWBCommon. $\endgroup$
    – jkuczm
    Dec 8, 2014 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.