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.

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?

share|improve this question
5  
Don't have time time, but one idea is setting Saveable -> False on the notebook –  Szabolcs Dec 14 '12 at 20:24
add comment

1 Answer

up vote 4 down vote accepted

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.

share|improve this answer
add comment

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.