References notes and floats/Footnotes/How-to guides/Producing annotated and unannotated versions

Unofficial ConTeXt Wiki mirror

Last modified: 2026-07-26

Footnotes in ConTeXt  ·  Overview  ·  Tutorial  ·  How-to guides  ·  Producing annotated and unannotated versions  ·  Reference  ·  Explanation  ·  Glossary

🚧 Under construction — This guide is currently being revised. Please do not modify its source code while this banner remains in place.

Selective output and publication profiles  ·  Previous: Using local notes in tables, floats, and boxes  ·  How-to guides overview  ·  Next: Creating interactive footnotes

1. Goal

Produce several versions of the same document while keeping one common source.

For example, the same source may generate:

This guide distinguishes three operations:

Result

The running text remains unchanged while the visible note layers vary from one output profile to another.

2. Distinguish postponing notes from suppressing them

Postponing a note changes where its entry is printed. It does not remove the logical note from the document.

The setting:

\setupnote
  [footnote]
  [location=text]

stores footnote entries until they are placed explicitly with:

\placefootnotes

The setting:

\setupnote
  [footnote]
  [location=none]

disables ordinary automatic placement, but the notes remain registered and may be placed by another mechanism.

Setting Effect Typical use
location=text Entries remain pending until an explicit placement command is used notes placed at the end of a section or chapter
location=none Ordinary automatic placement is disabled custom placement mechanisms

Postponed is not omitted

A postponed note remains part of the document model. Its entry is registered and its counter advances.

For explicit postponed placement, see:

3. Disable all notes temporarily

ConTeXt provides a global switch for the note mechanism:

\notesenabledfalse

Enable notes again with:

\notesenabledtrue

3.1. MWE: disable and re-enable all notes

While notes are disabled:

When notes are enabled again, numbering resumes from its previous value.

Global means global

The switch affects the note mechanism as a whole.

Do not use it when only one editorial category should be omitted.

4. Produce a document-wide version without notes

A conditional can select between a fully annotated output and a document-wide version without notes.

4.1. MWE: one global note switch

To produce the unannotated version, replace:

\settrue\showallnotes

with:

\setfalse\showallnotes

One source, two outputs

The conditional changes the publication policy without requiring changes to the running text.

Use this method only when every note series should be enabled or disabled together.

5. Suppress one note series while keeping another

When a document contains several note series, the global note switch is too broad.

Define a semantic wrapper around the series that may be omitted.

5.1. MWE: optional editorial notes

To suppress only the editorial notes, replace:

\settrue\showeditorialnotes

with:

\setfalse\showeditorialnotes

The predefined footnote series remains active.

Use semantic wrapper commands

A command such as \EditorialNote expresses the editorial role of the note and makes output selection easier to maintain.

For the definition of custom series, see:

6. Select several editorial layers independently

The same method can control several note categories independently.

First define one conditional for each editorial layer:

\newconditional\showsourcenotes
\newconditional\showeditorialnotes
\newconditional\showtranslationnotes

Then define one semantic wrapper for each series:

\define[1]\SourceReference
  {\ifconditional\showsourcenotes
     \SourceNote{#1}
   \fi}

\define[1]\EditorialNote
  {\ifconditional\showeditorialnotes
     \EdNote{#1}
   \fi}

\define[1]\TranslatorNote
  {\ifconditional\showtranslationnotes
     \TradNote{#1}
   \fi}

A scholarly edition might use:

\settrue\showsourcenotes
\settrue\showeditorialnotes
\settrue\showtranslationnotes

A reading edition might use:

\setfalse\showsourcenotes
\setfalse\showeditorialnotes
\settrue\showtranslationnotes

Independent editorial layers

Each conditional controls one semantic category without changing the others.

Choose wrapper names that do not duplicate the commands created by \definenote.

For example, if \definenote[SourceNote][footnote] creates \SourceNote, use a different wrapper name such as \SourceReference.

7. Keep the source semantically readable

Prefer:

\EditorialNote
  {The wording follows the first edition.}

to a low-level conditional repeated throughout the running text:

\ifconditional\showeditorialnotes
  \EdNote
    {The wording follows the first edition.}
\fi

The semantic wrapper:

This is especially useful when the same series occurs hundreds of times or when several output profiles are produced regularly.

Keep policy out of the running text

The body of the document should identify the type of annotation.

The preamble or project environment should decide whether that layer is visible.

8. Preserve punctuation and spacing

Place a conditional note command immediately after the word or punctuation to which its mark belongs:

This passage requires an editorial note.\EditorialNote
  {Editorial comment.}

When the note layer is disabled, the wrapper produces no mark or entry.

Test both the annotated and unannotated outputs to ensure that:

Test every output state

A construction may look correct when notes are visible but reveal spacing or punctuation problems when a note command produces nothing.

Do not add source-line suppression characters automatically. Use them only when a specific line break would otherwise create unwanted space.

9. Combine selection with postponed placement

A conditionally selected note series may also use postponed placement.

9.1. MWE: optional postponed editorial notes

When \showeditorialnotes is false:

The heading remains visible, however, unless it is also made conditional.

10. Suppress empty note headings

When an entire note layer is omitted, suppress its heading and placement block together with its individual notes.

10.1. MWE: conditional heading and placement block

Control both content and presentation

Suppress the heading, placement command, and associated spacing whenever the complete note layer is omitted.

A profile switch indicates whether a category is enabled. It does not necessarily prove that the document contains at least one note of that category.

For projects where enabled series may remain unused, an additional counter or content test may be needed to suppress empty headings.

11. Define named output profiles

For larger projects, group related conditional settings into named setups.

\startsetups[edition:scholarly]
  \settrue\showsourcenotes
  \settrue\showeditorialnotes
  \settrue\showtranslationnotes
\stopsetups

\startsetups[edition:reading]
  \setfalse\showsourcenotes
  \setfalse\showeditorialnotes
  \settrue\showtranslationnotes
\stopsetups

Activate one profile with:

\setups{edition:scholarly}

or:

\setups{edition:reading}

Named profiles:

Profiles belong with project configuration

In a multi-file project, named output profiles are usually best kept in a common environment rather than repeated in individual chapters.

12. Compare the available methods

Method Effect Best use
location=text Note entries remain pending until explicitly placed moving notes to the end of a structural unit
location=none Ordinary automatic placement is disabled custom placement mechanisms
\notesenabledfalse All note commands are ignored an output without any notes
Conditional semantic wrapper One selected note category is included or omitted editorially selective outputs
Named output profile Several note layers are configured together large projects with recurring editions

These methods may be combined, but they solve different problems.

13. Common mistakes

13.1. Confusing postponed notes with suppressed notes

A note configured with location=text still exists and must be placed.

13.2. Using the global switch for one series only

The command \notesenabledfalse affects the note mechanism as a whole.

Use a semantic wrapper when only one selected series should be omitted.

13.3. Leaving an empty heading or placement block

When a layer is omitted, suppress its heading and placement command as well as its notes.

13.4. Forgetting to test the unannotated output

Spacing, punctuation, and paragraph flow may behave differently when note wrappers produce nothing.

13.5. Repeating low-level conditionals throughout the source

Define one semantic wrapper for each layer and use it consistently.

13.6. Letting profile settings contradict one another

Keep every recurring output policy in one clearly identified setup.

Activate only one complete profile for a given compilation.

13.7. Reusing the note-series command as a wrapper name

If:

\definenote
  [SourceNote]
  [footnote]

creates \SourceNote, do not redefine \SourceNote as a conditional wrapper.

Use a distinct name such as:

\SourceReference

Most frequent design error

The notes are suppressed, but their headings, spacing, or placement commands remain visible.

Treat every note layer as a complete editorial unit.

14. Complete example

The following MWE combines:

14.1. MWE: two output profiles from one source

Compile the example twice:

  1. first with \setups{edition:scholarly} ;
  2. then with \setups{edition:reading} .

Check that:

15. What this guide has established

To produce annotated and unannotated versions:

  1. distinguish postponed placement from actual suppression;
  2. use \notesenabledfalse only when all notes must be disabled;
  3. use semantic wrapper commands for selected note categories;
  4. control each editorial layer with its own conditional;
  5. suppress headings and placement blocks together with omitted notes;
  6. use named setups to define recurring output profiles;
  7. test punctuation, spacing, and structure in every output state;
  8. keep the running text independent from the selected publication profile.

The central principle is that output selection should follow the editorial structure of the notes.

16. Next steps

16.1. Continue with the next guide

16.2. Continue with related tasks

16.3. Consult the documentation

Selective output and publication profiles  ·  Previous: Using local notes in tables, floats, and boxes  ·  How-to guides overview  ·  Next: Creating interactive footnotes

Footnotes in ConTeXt  ·  Overview  ·  Tutorial  ·  How-to guides  ·  Producing annotated and unannotated versions  ·  Reference  ·  Explanation  ·  Glossary