Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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!

share|improve this answer
    
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. –  QuantumDot Dec 7 at 22:46
    
@QuantumDot You can fix them by adding this Teake's code to your createHTML target in docbuild.xml. It's also implemented in WWBCommon. –  jkuczm Dec 8 at 23:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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