Message Boards Message Boards

Make notebooks suitable for the Documentation Center?

Posted 8 years ago

Normally, documentation meant to be integrated into the Documentation Center is built from special source notebooks.

According to the Workbench documentation, it should also be possible to use alternative formats. Just create the notebooks and put them at the specified location. They will be copied over during documentation build and they will get a suitable URI for the Documentation Center.

I tried this and it works, but there are some problems. The biggest one is that pressing the Reload button opens the notebooks in a standard window instead of in a documentation window.

enter image description here

How should a notebook be prepared so that it properly integrates into the Documentation Center and is well-behaved there?

This question is specifically about simple notebooks that do not go through the documentation build process.

As a first test, I was simply building a license page, for which there is no standard template. But eventually I would like to use this for documentation in alternative formats, as I won't always have time to create standard format documentation.


"What have you tried?"

The toolbar source can be examined using

FrontEndResource["FEExpressions", "HelpViewerToolbar"]

The button seems to invoke the Revert front end token, i.e. it's similar to (the same as?) File -> Revert... This explains the behaviour I see but I still don't know why normal documentation notebooks don't behave this way.

I tried taking StyleDefinitions (which also adds the toolbar docked cell) and TaggingRules from a normally built doc notebook and trasferring them to my custom notebook. I manually edited the URIs to match. The Revert button still re-opens the notebook in a new window.

Note that I am not asking for adding the help toolbar to the notebook. This can indeed by accomplished by ensuring that the notebook or its stylesheet has DockedCells -> FEPrivate`FrontEndResource["FEExpressions", "HelpViewerToolbar"]. But the Reload button will still open a new window which, while it does have the help toolbar, isn't the same as the documentation browser. There are clear differences:

  • The doc browser disappears and the notebook window appear at a new position on screen
  • The notebook window doesn't show "- Wolfram Mathematica 10.0" in the title bar
  • When using the search toolbar in the notebook window, it will open a new doc browser instead of showing the results in the same window

What I want is to stay within the documentation browser and not open a separate notebook.


Cross posted on StackExchange.

POSTED BY: Szabolcs Horvát

Saveable -> False needs to be set on the notebook for this to work properly. That's all that's needed.

When this option is set, it is not possible to use File -> Save...

However, NotebookSave and Export do work.

POSTED BY: Szabolcs Horvát
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract