5
$\begingroup$

My package works fine so far, and now I want to add some documentation. I have put a file in

FileNameJoin[{ $UserBaseDirectory, "Applications", "myPkg", "Documentation", "English", "Guides", "TableOfContents.nb"}].

The content of the notebook is:

    Notebook[{Cell["Table of Contents for pkgTools", "TOCDocumentTitle", 
       ShowGroupOpener -> False, TextAlignment -> Center], Cell[TextData[
        ButtonBox["Tutorial: CodingStandards", Rule[BaseStyle, "Link"], 
          Rule[ButtonData, "paclet:pkgTools/tutorial/CodingStandards"]]], 
       "TOCChapter", ShowGroupOpener -> True], Cell[TextData[
        ButtonBox["Tutorial: CreateNewApplication", Rule[BaseStyle, "Link"], 
          Rule[ButtonData, "paclet:pkgTools/tutorial/CreateNewApplication"]]], 
       "TOCChapter", ShowGroupOpener -> True], Cell[TextData[
        ButtonBox["Tutorial: ToDoList", Rule[BaseStyle, "Link"], 
          Rule[ButtonData, "paclet:pkgTools/tutorial/ToDoList"]]], "TOCChapter", 
       ShowGroupOpener -> True]}, StyleDefinitions -> 
      FrontEnd`FileName[{"Wolfram"}, "Reference.nb"]]

Now when I load the package, it appears in the Function navigator under "Add-Ons". When I click on it, the notebook opens. But it gets immediately the "modified" Tag, which is confusing to users of the package who just want to read the documentation.

Is there a way to write-protect the documentation notebook?

$\endgroup$
  • 5
    $\begingroup$ Don't have time time, but one idea is setting Saveable -> False on the notebook $\endgroup$ – Szabolcs Dec 14 '12 at 20:24
6
$\begingroup$

As @Szabolcs mentioned, the standard way to write-protect a notebook is to set the option Saveable -> False when creating the notebook.

Needless to say: if you want to write fully professional documentation, Wolfram Workbench $\;$ is your best solution. It automatically creates write-protected documentation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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