# Is it possible to store Meta Data in a Notebook?

I am creating multiple notebooks for a textbook that I would like to print with headers on every page. For example,

Notebook 1: Chapter 1, Section 1, "Addition"

Notebook 2: Chapter 1, Section 2, "Subtraction"

Notebook 3: Chapter 2, Section 1, "Multiplication"

Notebook 4: Chapter 2, Section 2, "Division"

Notebook 5: Chapter 2, Section 3, "Extra Stuff" . . .

The headers for each notebook will contain the chapter number, section number and Heading Name as shown above. I understand how to work with headers and private stylesheets and counters. I do not need help with that.

I would like to know how to programmatically set and access meta data for each notebook. I want the meta data to contains numbers (chapter number and section number) and a string (Heading Name). Can I store hidden meta data in a notebook somehow? If so, how is this done and how can I access it once I've done it?

If I can do this, then I can use a private stylesheet to pull this hidden meta data in from the notebook to place in the headers. Any ideas of how to store meta data like this in a notebook?

You can use TaggingRules. Once you have set the metadata it is embedded in the notebook. It can be retrieved at any time using CurrentValue. If the meta data changes it can be reset. Only one meta data object can be set per notebook so separate items should be put in a list.
metadata = {1, 2, 3};

• @NicholasG I've only answered the question regarding how to store meta data in a notebook. You can put anything in the variable, metadata. The list {1, 2, 3} is just for example. – Chris Degnen Oct 25 '16 at 12:47