Skip to content

Commit

Permalink
Add \require[options]{package} to setoptions documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvc committed Jun 17, 2021
1 parent 6d45632 commit 80560f5
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion input/tex/extensions/setoptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,42 @@ To load the `setoptions` extension, add ``'[tex]/setoptions'`` to the
-----

.. _tex-setoptions-require:

The \require command with setoptions
------------------------------------

If the `require` package is enabled, `setoptions` modifies
``\require`` to allow passing of options for the required package (and
makes the original ``\require`` macro available as ``\Require``). So
the new syntax is:

.. describe:: \require[options]{package}

where `options` is a list of options in the same format as used by
``\setOptions``, and ``package`` is the name of the extension to load.
This command is equivalent to:

.. code-block:: latex

\Require{package}\setOptions[package]{options}

meaning that the package is loaded and then its options are set.

For example:

.. code-block:: latex

\require[harrowsize=3em]{amscd}

would load the `amscd` extension and then set its ``harrowsize``
option to ``3em``.

Note that the same rules apply to which options can be set for which
package as those that govern ``\setOptions`` itself.


-----

.. _tex-setoptions-options:

Expand Down Expand Up @@ -214,5 +250,4 @@ setoptions Commands
The `setoptions` extension implements the following macros:
``\setOptions``


|-----|

0 comments on commit 80560f5

Please sign in to comment.