Contexts and Tags

The hierarchy of nested books and documents in Notebooks provides a clear structure where each item has its designated place. However, some situations demand additional organization, such as when tasks are location-specific like at the office or on the road, or when documents are in progressdeferred, or waiting for input. Rather than moving documents to different books for these purposes, it is more efficient to assign Contexts and Tags. This allows you to access those documents from Notebooks’  Smart Books, keeping everything neatly organized and easily accessible without disrupting the original structure.

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

In Notebooks, we use Context and Tag interchangeably, sometimes even referring to them as Context Tags. While we acknowledge that this is not entirely accurate — a tag can serve as a context, but a context in the strict sense is not merely a tag — the feature in Notebooks is flexible enough to handle both. So whether you think of them as tags or contexts, the app supports both perspectives.

By the way, the expressions “assigning contexts to a document” or “adding documents to a context” mean the same thing, and we use both terms interchangeably as well.

Start Using Contexts in Notebooks

Like other advanced features, Notebooks disables Contexts by default 1. To begin using Contexts, you need to activate them in Settings > Contexts.

When you activate Contexts, Notebooks automatically searches through your documents to find any previously assigned context tags. This ensures that even if you temporarily turned off the feature or imported documents from another instance, Notebooks properly collects and displays all contexts.

Notebooks’ Settings provide various options to fine-tune how you want to use contexts; they are detailed below.

Smart Book Contexts

With Contexts enabled in settings, Notebooks adds Contexts to its list of smart books. Selecting this book shows all available context tags, each with a badge indicating how many items (books, documents, or tasks) are assigned to that context. Select a context to view the list of related books, documents, and tasks.

The badge reflects the total number of assigned items, which by default also includes done or cancelled tasks. However, if you set Notebooks to hide done tasks, those tasks will be excluded from both the badge count and the list of associated items.

You can toggle Hide Done Tasks from any context or task list (use the title menu on iOS, or the ••• menu on a Mac), and also from Notebooks‘ Settings > Tasks. No matter where you toggle this setting, it always acts globally.

Change Sort Order

You can sort the list of contexts alphabetically, either ascending or descending, or by a custom order. To assign a custom sort order, simply drag the contexts into the desired sequence (see below).

The list of items associated with a context can be sorted by alphabet, creation date, or modification date, in either ascending or descending order. The selected sort order applies universally to all contexts, so there is no individual sorting per context.

On iPhone & iPad
  • Change the sort order by selecting the corresponding option in the list’s header, just like in a regular book.
  • If the sort options are not immediately visible, you may need to slightly pull down the list to reveal them, as they are hidden by default. (You can adjust this behavior in the settings if you prefer the sort options to always be displayed.)
On Mac
  • Select the sort order from the corresponding popup menu in the list’s header (i.e. the second column).

Assign and Manage Contexts

Now that contexts are enabled in settings, you can start defining the context tags you want to use and assigning them to your books and documents. Notebooks offers two modes for managing contexts, Manual Management and Automatic Management, both are detailed below. You can choose the mode that best fits your workflow, and you can always switch between them in Notebooks‘ settings.

Manage Contexts Manually

In this mode, you manually define and maintain the list of contexts you want to use. You can then assign these contexts to books and documents via Info > Contexts or by dragging items into the context’s smart book on a Mac. This allows you manage the list exclusively.

Define your Contexts

You can create and maintain the list of contexts in various places, depending on the device you are using.

On iPhone & iPad
  • Settings > Contexts > Manage Contexts
    • To add a new context, type its name into the New Context field at the top of the list. This will immediately create and add the context to your list, ready for use.
    • To remove a contexts, simply swipe left on its name in the list. This action deletes the context from Notebooks, but it does not modify any documents.
    • To rearrange contexts, tap the Edit button, then drag the contexts into the desired order.
  • Smart Book Contexts
    • You can add new contexts by tapping the “+” button.
    • Just like in settings, you remove a context by swiping left on its title.
    • To rearrange contexts, first select custom sort order. Then, tap the reorder button and drag the contexts into your preferred sequence. Tap the reorder button again to finalize the arrangement.
  • Info > Contexts
    When assigning contexts to an item from its Info panel, you can add new contexts by typing in the text field at the top of the list.
On Mac
  • Smart Book Contexts
    • To add a new context, right-click the smart book Contexts and choose New Context.
    • To delete a context, right-click its name in the list and select Delete Context.
    • In two column mode with the outline hidden, swipe left on a context’s title to delete it.
  • Info > Contexts
    When you assign contexts in an item’s Info pane, you can add new contexts by typing directly in the Contexts field. Separate multiple contexts with commas, and type return to confirm your changes.

When you use any of Notebooks‘ sync options, your list of contexts automatically synchronizes across all your 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 iPhone & 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 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.

Automatic Context Management

As an alternative to managing contexts manually, you can let Notebooks manage them for you.

To enable automatic context management, activate Managed by Notebooks under Settings > Contexts.

Using Automatic Context Management

When Notebooks manages contexts for you, you can assign context tags by adding them to the body of your documents. Notebooks automatically detects these tags and updates the list of smart books.

  • In automatic mode, Notebooks adds new contexts to your list and removes contexts with no documents assigned. So, the contents of the smart book Contexts update as you add or remove tags in your documents.
  • Context tags added within text need to start with a dedicated context marker and must not contain spacesNotebooks also ignores trailing punctuation like ,;.:([{. For instance, tags should look like @InProgress#vacation, or @Deferred.
  • By default, Notebooks recognizes @ and # as markers, but you can choose your own in Settings > Contexts > Markers for Managed Contexts.
  • In plain text, Notebooks supports auto-completion for context tags. Instead of recalling each tag, just type the marker (and optionally a few characters), then press TABNotebooks will display a list of available tags for easy selection.
  • Notebooks includes a tool to scan all documents for context tags. This is especially helpful when adding tags outside of Notebooks or after importing multiple documents. You can access this tool under Settings > Contexts > Scan and Extract.

To prevent Notebooks from reading Markdown headings as context tags, add a space after the Markdown heading like ## Heading, or use a different context marker. 

Likewise, to avoid the Markdown converter interpreting contexts that begin with # as headings, avoid placing them at the start of a new line or add at least a space before them.

Excluding Words from Automatic Extraction

When Notebooks extracts contexts from text, it may sometimes detect and assign unintended keywords. To prevent this, you can define a list if excluded contexts, and any keywords on this list will be ignored during automatic extraction. This avoids, for example, the assignment of HTML tags like @font-face as contexts. Here are two ways to manage exclusion:

On iPhone & iPad
  • Excluding Contexts Directly from the Smart Book
    Swipe left on any context you want to exclude and tap the (x) icon. Notebooks will ask for your confirmation before adding it to the list of excluded contexts. This an efficient way to exclude keywords that have already been assigned as contexts.
  • Managing Exclusions through Settings
    In Settings > Contexts, select Excluded Contexts to open a text document containing your list of excluded contexts. If you have not yet excluded any contexts, this document will be empty. You can add or remove entries as needed, separating them with newlinespace or comma.
On Mac
  • Excluding Contexts from the Smart Book
    • Right-click the context you wish to exclude and select Exclude from Automatic Management. Notebooks will add this contexts to the list of excluded keywords.
    • Alternatively, right-click the Contexts smart book, then choose Excluded Contexts. This opens the list of excluded contexts as plain text document, where you can add to and remove entries. Separate individual entries with newline, space or comma.

The list of excluded contexts is synchronized between devices.

Removing Unwanted Contexts

To easily remove unwanted contexts, especially when using automatic context extraction, follow these steps:

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

When Manage Contexts Automatically is enabled, Notebooks will ask whether you want to remove the context from the body of the assigned documents as well. This lets you remove a context entirely in one step, without editing the documents manually. Currently, this is available in Notebooks for Mac only.

Rebuilding the List of Contexts

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

On iPhone & iPad
  • In Notebooks 12 and later, open the smart book Contexts and pull down the list. Notebooks will check all documents’ system files for assigned contexts, and rebuild the list accordingly.
  • Alternatively, navigate Notebooks’ Settings > Contexts, turn Contexts off and back on again.
On Mac
  • Right-click the smart book Contexts and select Reload Contexts.

Background Info

Notebooks stores contexts as properties in the document’s or book’s system file (the .plist file). Users typically don’t need to be concerned with this care, but there are a few interesting facts and side effects:

  • Since Notebooks stores context tags as part of its system files rather than in a central database, it is easy to recreate the list of tags whenever needed. This setup minimizes the risk of potential loss of tags.
  • Disabling the Sync System Files option in Notebooks’ sync settings (iOS only) will stop the synchronization of contexts between devices.

  1. Notebooks aims to remain as lightweight as possible and disables advanced functionality that users may not need right away  ↩︎