Contexts and Tags

The hierarchy of nested books and documents represents a structure where each item has its unique position and parent in Notebooks. Sometimes, however, it may be necessary to temporarily organize documents in additional ways: when tasks are relevant in specific locations like at the office or when on the road, or when documents are in progress, deferred or waiting for input. Instead of moving documents to different books for this purpose, it is easier to assign Contexts and Tags, which makes the documents available through Notebooks Smart Books.

Smart books, available at Notebooks‘ top level, collect their contained documents according to specific criteria, independent of where the documents reside within Notebooks. They collect their contents on the fly, the moment they are opened. When assigning a context to a document, the document immediately appears in the smart book corresponding to the context.

The term Context refers to David Allen’s Getting Things Done methodology; he recommends to organize tasks by contexts in which they are relevant.

We use Context and Tag as synonyms, and sometimes refer to them as Context Tags, well knowing that this is not quite correct: while a tag can serve as context, a context in the strict sense is not a tag. – Still, the way this feature is implemented in Notebooks it can handle both, contexts and tags.

By the way: “assigning contexts to a document” or “adding documents to a context” basically comes to the same thing, and we use both descriptions in turn.

Contexts on iPad

Start Using Contexts in Notebooks

Like other advanced features, Notebooks disables Contexts by default 1. So before you can use Contexts, you need to activate them in NotebooksSettings > Contexts.

As you activate Contexts, Notebooks searches all documents to collect contexts that may have been assigned already. This step makes sure that Notebooks picks up all existing contexts if you temporarily turned this option off, or if you imported documents from another Notebooks instance.

Notebooks’ Settings provide more options to control how you want to use contexts; they are detailed below.

The Smart Book Contexts

With Contexts enabled in settings, Notebooks adds the book Contexts to its list of smart books. Selecting it displays a list of all available context tags along with a badge showing the number of assigned items. Tap one of the contexts for the list of associated books, documents and tasks.

The badge, which displays the number of assigned items, always counts books, documents and open tasks; it also counts done or cancelled tasks, unless you have set Notebooks to hide done tasks. Hiding done tasks hides them from the list of associated items, too.

You can toggle Hide Done Tasks from any context’s or any task list’s Process menu (•••), but also from NotebooksSettings > Tasks.

Sort Order

You can sort the list of contexts by alphabet (ascending and descending) and by a custom sort order, assigned by dragging the contexts into the desired sequence (see below).

The list of items associated with a context can be sorted by alphabet, creation date and modification date, ascending and descending. – The selected sort order is the same for all contexts, there is no individual sort order.

On your iPhone or iPad

You can change the sort order by selecting the corresponding option in the document list’s header. You may need to slightly pull down the list to reveal this header, as it is hidden by default. (There is a setting to change that behavior).

On your Mac

You select the sort order from the corresponding popup menu in the document list’s header (i.e. the second column).

Assign and Manage Contexts

Now with contexts enabled in settings, you can define the list of contexts you want to use and assign them to your books and documents. Notebooks offers two modes: you can set up and manage the list of contexts manually, or you can leave that up to Notebooks and just add contexts to the body of your documents.

Manage Contexts Manually

In this mode, you set up and maintain the list of contexts which you want to use, and you assign them to books and documents through Info > Contexts. You can use this list of contexts exclusively.

Set up the List of Contexts

You can create and maintain the list of contexts in multiple places, the details depend on the device you are using.

On your iPhone or iPad
  • Settings > Contexts > Manage Contexts
    • Add a new context by entering its name in the field New Context at the top of the list.
    • Remove contexts with a swipe left gesture.
    • Rearrange contexts by tapping the Edit button and dragging the contexts into the desired order.
  • Smart Book Contexts
    • Add new contexts from the “+” button.
    • Remove a context with a swipe left gesture across its title. – This removes the context from the list, but it does not modify the documents.
    • Rearrange contexts by selecting custom sort order, then tapping the reorder button and dragging the contexts into the desired order. Tap the reorder button again to finish.
  • Info > Contexts
    • When assigning contexts to an item from its Info panel, you can also create new contexts using the textfield at the top of the list.
On your Mac
  • Smart Book Contexts
    • Add new contexts by right-clicking the smart book Contexts and selecting New Context.
    • Delete contexts by right-clicking a context and selecting Delete Context.
    • In two column mode with outline hidden, you can also delete contexts with a swipe left gesture.
  • Info > Contexts
    • When assigning contexts from an item’s Info, you can add new contexts directly to the Contexts field. Type return to confirm the new context.

The list of contexts is synchronized between devices.

Assign Contexts to Books and Documents

With a list of contexts set up, you can now start assigning them to books and documents.

On your iPhone or iPad
  • Info > Contexts
    • This is the primary way of manually assigning contexts to books and documents. From the list of contexts, check the ones you want to assign. To remove a context from an item, uncheck the corresponding entry.
    • If you want to add a new context in this mode, just add it using the text field at the top of the list.
On your Mac
  • Info > Contexts
    • The Info Panel provides a dedicated field for assigning contexts. As you start typing the first few characters of a context, Notebooks pops up a list of suggestions. This makes it easy to add new contexts anytime.
  • Drag and Drop
    • You can also add books and documents to a context by dropping the items into the corresponding smart book in the outline (left most column). This is the same as assigning contexts to documents.

Manage Contexts Automatically (Managed by Notebooks)

Instead of managing the list of contexts manually, you can allow Notebooks to handle that more or less automatically. To enable automatic management, activate the corresponding option Settings > Contexts > Managed by Notebooks

  • When Notebooks manages contexts automatically, you can assign context tags by adding them to the body of your documents. Notebooks detects these tags, assigns them to the document and also manages the list of smart books.
  • When managed automatically, Notebooks adds new context to your list, and it also removes contexts which don’t have any documents assigned. So the contents of the smart book Contexts updates as you add and remove tags to your documents.
  • Contexts that you add to your text need to start with a dedicated context marker and must not contain spaces. Notebooks also excludes trailing characters like ,;.:([{.
    So the contexts should look like @InProgress, #vacation, @Deferred etc.
  • By default, Notebooks uses @ and # as markers, but you can define your own ones in Settings > Contexts > Markers for Managed Contexts
  • Notebooks supports auto completion for context tags in plain text. You do not need to remember the tags you have been using, but instead type the marker – and optionally a few characters – and then hit the TAB key. Notebooks displays a list of available tags which you can then select from.
  • To avoid that Notebooks interprets Markdown headings as context tags, we recommend to add a space between the Markdown heading marker and the text, as in ## Heading or use a different marker.
  • Similarly, to avoid that the Markdown converter interprets contexts starting with # as heading, try not to place them at the beginning of a new line or at least prefix them with a space.
  • Notebooks for Mac also provides a tool to scan all existing documents and detect contained contexts. This is a convenient option when adding context tags to documents outside of Notebooks, or after importing larger sets of documents. – You find this tool in Settings > Contexts > Scan and Extract.

Exclude Words from Automatic Extraction

When extracting contexts from text, Notebooks may detect words which are not meant as contexts. When using the default marker @, for example, and pasting HTML code, one might end up with text like @font-face: arial. Notebooks detects @font-face and assigns that as a context, but this is probably not what the user wants.

To avoid the assignment of such random keywords, you can set up a list of excluded contexts. Notebooks ignores these keywords during automatic extraction.

On your iPhone or iPad
  • Smart Book Contexts
    • In the list of contexts, swipe left across the title of the context you want to exclude and select the (x) icon. Notebooks asks for confirmation before adding the context to the list of exclusions. – This is the best way to exclude keywords which have already been assigned as contexts.
  • Settings > Contexts > Excluded Contexts
    • Notebooks opens a text document with the list of excluded contexts. This document is empty if no contexts have yet been excluded. You can add to and remove from the list. – Separate individual entries with newline, space or comma.
On your Mac
  • Smart Book Contexts
    • Right-click the context you want to exclude and choose “Exclude from Automatic Management”. Notebooks adds that contexts to its list of ignored keywords.
    • Alternatively, right-click the smart book Contexts and choose “Excluded Contexts”. Notebooks opens the list of excluded contexts as plain text document. You can add to and remove from that list. – Separate individual entries with newline, space or comma.

The list of excluded contexts is synchronized between devices.

Remove Contexts You Do Not Need

Especially when Notebooks extracts contexts automatically, you may end up with some you don’t really want or need. The easiest way to remove a context is this:

  • Open the smart book Contexts and delete contexts like regular books. This removes the contexts from Notebooks‘ list and from the associated documents.

With Manage Contexts Automatically enabled, Notebooks asks whether you want to remove the context from the contents of the assigned documents, too. So you have the option to completely get rid of a context in one step, without editing the documents yourself. Currently, this is available in Notebooks for Mac only.

Rebuild the List of Contexts

Over time or in the course of rearranging a larger number of books and documents, Notebooks might loose track of the exact numbers of items assigned to contexts. As contexts are associated with each document and stored in corresponding system files, rebuilding the list of contexts is easy:

On your iPhone or iPad
  • In Notebooks 12 and later, open the smart book Contexts and pull down the list. Notebooks walks through all documents, scans their system files for assigned contexts and rebuilds its list of contexts and associated documents.
  • Alternatively, open Notebooks’ Settings > Contexts, turn Contexts off and turn them on again.
On your Mac
  • Right-click the smart book Contexts and select Reload Contexts.

Background Info

Notebooks stores contexts as a property in the document’s or book’s system file (the .plist file). Users do not need to be aware of that or take any specific care, but there are a few interesting facts and side effects:

  • As Notebooks stores context tags as part of its system files rather than a central database, it is easy to recreate the list of tags anytime. There is no risk of a database getting corrupt and losing all tags.
  • Turning off the option Sync System Files in Notebooks’ sync settings (iOS only) would stop synchronizing contexts between devices.


  1. Notebooks disables some advanced functionality by default. This is to keep the app light weight, to hide options that the user currently does not need, and not to overwhelm new users.  ↩︎