Message Boards Message Boards

Create a table of contents using AuthorTools`MakeContents package?

Posted 4 years ago

I want to create a table of contents for my notebook "GgUtils Test.nb":

<< AuthorTools`
Paginate[SelectedNotebook[]];
MakeContents[SelectedNotebook[], "Book", ContentsFileName -> "GgUtils Test TOC.nb"];

This does just nothing. Nowhere any File is created.

The symbol MakeContents is well known:

?? MakeContents

InformationData[
Association[
 "ObjectType" -> "Symbol", "Usage" -> "AuthorTools`MakeContents", 
  "Documentation" -> Association[
   "Local" -> "paclet:AuthorTools/ref/MakeContents"], 
  "OwnValues" -> None, "UpValues" -> None, "DownValues" -> None, 
  "SubValues" -> None, "DefaultValues" -> None, "NValues" -> None, 
  "FormatValues" -> None, "Options" -> None, "Attributes" -> {}, 
  "FullName" -> "AuthorTools`MakeContents"], True]

I should mention that I use the Programming Lab Desktop (newest version 12) and the notebook "GgUtils Test.nb" comes from a directory Home/Utils within the Wolfram cloud. Hence the TOC-notebook should be created there as well.

BTW: I do not want to create that TOC as a separate file, but just insert it at the beginning of my notebook. From the documentation I think, this is not directly possible. I must use some kind of Get, Write-program instead to copy the cells from the TOC-file into my notebook. From old entries in mathematica.stackexchange.com I can see that this is non-trivial if I want to preserve the TOC-style "Book" for example.

POSTED BY: Werner Geiger
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