| 1 |
This is the README file for the options package. |
| 2 |
|
| 3 |
VERSION |
| 4 |
|
| 5 |
Version 1.0, December 2015 |
| 6 |
|
| 7 |
SUMMARY |
| 8 |
|
| 9 |
Provices convenient key-value options for LaTeX package writers. |
| 10 |
|
| 11 |
It has a similar interface as `pgfkeys` with path options but comes with more |
| 12 |
built-in data types and more convenient support for families and searching. |
| 13 |
The main features of the `options` pckage are: |
| 14 |
|
| 15 |
* Declare your options only once: in most packages you usually need to |
| 16 |
declare both a new command, and the option that sets it. In the |
| 17 |
`options` package you declare the option just once. For example, |
| 18 |
|
| 19 |
\options{/my/len/.new length} |
| 20 |
|
| 21 |
and then use it anywhere else as |
| 22 |
|
| 23 |
\option{/my/len} |
| 24 |
|
| 25 |
* _Use paths for keys_: just like `pgfkeys`, the `options` package uses |
| 26 |
paths (instead of families) to declare options and prevent name clashes |
| 27 |
between different packages. Paths are convenient for complex options, |
| 28 |
like `border/left/width`, and are also convenient to specify searches. |
| 29 |
|
| 30 |
* _Many built-in data types_: the `options` library comes with many |
| 31 |
useful data types like `choice`, `list`, `toggle`, `num`, `dim`, |
| 32 |
`length`, `glue`, commands, and plain values, and it is easy to add |
| 33 |
your own. Also you can hook into existing definitions like an `if` or `counter`. |
| 34 |
|
| 35 |
* _Value options_: You can define value-only options that start with a |
| 36 |
special character, like `"Georgia"` for a font option, or |
| 37 |
`!8080FF` for a color option. |
| 38 |
|
| 39 |
* _Convenient searches_: you can specify paths that should be searched |
| 40 |
from other paths and redirect even from absolute paths. For complex |
| 41 |
packages this is very useful to inherit common options. |
| 42 |
|
| 43 |
* _Easy filtering_: it is easy to collect unknown options and process |
| 44 |
them later. Combined with the search mechanism this makes it easy to |
| 45 |
do custom processing. |
| 46 |
|
| 47 |
* _It is fast_: for simple user options, the &options; package is a bit |
| 48 |
faster than `pgfkeys` and if searches or filters are involved it is |
| 49 |
usually about twice as fast as `pgfkeys` (and about six times faster |
| 50 |
as `xkeyval`). |
| 51 |
|
| 52 |
* _Handles class and package options_: use the same option declarations |
| 53 |
to handle the options passed to a class or package. |
| 54 |
|
| 55 |
LICENSE |
| 56 |
|
| 57 |
Copyright (c) 2015 Daan Leijen. |
| 58 |
|
| 59 |
This software is author-maintained. Permission is granted to copy, |
| 60 |
distribute and/or modify this software under the terms of the |
| 61 |
LaTeX Project Public License, version 1.3 or higher. This software |
| 62 |
is provided 'as it is', without warranty of any kind, either |
| 63 |
expressed or implied, including, but not limited to, the implied |
| 64 |
warranties of merchantability and fitness for any particular purpose. |
| 65 |
|
| 66 |
RELATED PACKAGES |
| 67 |
|
| 68 |
keyval, xkeyval, pgfkeys, longfbox |
| 69 |
|
| 70 |
AUTHOR |
| 71 |
|
| 72 |
Daan Leijen ([email protected]) |
| 73 |
|
| 74 |
|