diff --git a/doc/config.rst b/doc/config.rst index 5776dbb69..82ecdfdfd 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -40,6 +40,8 @@ Important points to note: delete them from the namespace with ``del`` if appropriate. Modules are removed automatically, so you don't need to ``del`` your imports after use. +.. _conf-tags: + * There is a special object named ``tags`` available in the config file. It can be used to query and change the tags (see :ref:`tags`). Use ``tags.has('tag')`` to query, ``tags.add('tag')`` and ``tags.remove('tag')`` diff --git a/doc/markup/misc.rst b/doc/markup/misc.rst index 98ce5621b..b2e9051fd 100644 --- a/doc/markup/misc.rst +++ b/doc/markup/misc.rst @@ -176,8 +176,9 @@ Including content based on tags .. only:: html and draft Undefined tags are false, defined tags (via the ``-t`` command-line option or - within :file:`conf.py`) are true. Boolean expressions, also using - parentheses (like ``html and (latex or draft)``) are supported. + within :file:`conf.py`, see :ref:`here `) are true. Boolean + expressions, also using parentheses (like ``html and (latex or draft)``) are + supported. The *format* and the *name* of the current builder (``html``, ``latex`` or ``text``) are always set as a tag [#]_. To make the distinction between @@ -185,6 +186,9 @@ Including content based on tags ``builder_``, e.g. the epub builder defines the tags ``html``, ``epub``, ``format_html`` and ``builder_epub``. + These standard tags are set *after* the configuration file is read, so they + are not available there. + .. versionadded:: 0.6 .. versionchanged:: 1.2 Added the name of the builder and the prefixes.