diff --git a/CHANGELOG.md b/CHANGELOG.md index 82f9e6b..afff390 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,3 +19,8 @@ Fixed some minor issues in version numbers and in the manual. Various fixes in the documentation and new convenience macro `\crfnm@declareType`. The test suite now uses _lualatex_. + +### Version 1.2 + +The last argument of `\crossrefenum` can now be a comma-delimited list +instead of a list of groups. Lists of groups are still supported and will remain so. diff --git a/README.md b/README.md index 19798de..5e013e4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# crossrefenum 2024/04/13 v1.1 +# crossrefenum 2024/04/13 v1.2 Smart typesetting of enumerated cross-references for various TeX formats. diff --git a/doc/crossrefenum.md b/doc/crossrefenum.md index ee4da98..e2c5def 100644 --- a/doc/crossrefenum.md +++ b/doc/crossrefenum.md @@ -2,7 +2,7 @@ title: "crossrefenum" subtitle: "Smart typesetting of enumerated cross-references for various TeX formats" author: Bastien Dumont -date: 2024/04/13 +date: 2024/04/13 lang: en-US toc: true license: true @@ -54,18 +54,31 @@ The macro `\crossrefenum` has the following syntax: * For ConTeXt only: `line`, `pageline`; * For LaTeX with _reledmac_: `edpage`, `edline`, `edpageline`. * _print prefix?_ indicates whether the prefix (like “p. ”) should be printed or not: true if set to `withprefix` or `yes`; - * _enumeration_ is a group containing one or more _single_ labels (e.g. `{mylabel}`) or _ranges_ (e.g. `{lbl-begin to lbl-end}`) included in groups. Ranges cannot be used with `note` and `pagenote` types. + * _enumeration_ is a group containing one or more _single_ labels (e.g. `mylabel`) or _ranges_ (e.g. `lbl-begin to lbl-end`). + Ranges cannot be used with `note` and `pagenote` types. + Two syntaxes are supported: lists of groups and comma-delimited lists (see below). _type_ and _print prefix?_ are optional. _type_ defaults to `page` and _print prefix_ to `withprefix`. -Here are some valid invocations: +Here are some valid invocations with the comma-delimited syntax: + + * `\crossrefenum[note][withprefix]{lblone, lbltwo, lblthree}` + * `\crossrefenum[edline][noprefix]{lblone, lbltwo, lblthree}` + * `\crossrefenum[page]{lblone to lbltwo, lblthree}` + * `\crossrefenum[noprefix]{lblone, lbltwo, lblthree}` (_type_ defaults to `page`) + * `\crossrefenum[note]{lblone, lbltwo, lblthree}` (_print prefix?_ defaults to `withprefix`) + * `\crossrefenum{lblone, lbltwo, lblthree}` (_type_ defaults to `page` and _print prefix?_ defaults to `withprefix`) + * `\crossrefenum{only-one}` + +The same invocations with the group-based syntax: * `\crossrefenum[note][withprefix]{{lblone}{lbltwo}{lblthree}}` * `\crossrefenum[edline][noprefix]{{lblone}{lbltwo}{lblthree}}` - * `\crossrefenum[noprefix]{{lblone}{lbltwo}{lblthree}}` (_type_ defaults to `page`) - * `\crossrefenum[note]{{lblone}{lbltwo}{lblthree}}` (_print prefix?_ defaults to `withprefix`) - * `\crossrefenum{{lblone}{lbltwo}{lblthree}}` (_type_ defaults to `page` and _print prefix?_ defaults to `withprefix`) - * `\crossrefenum{{only-one}}` (even if the enumeration is limited to one item, it must be inside its own group) + * `\crossrefenum[page]{{lblone to lbltwo}{lblthree}}` + * `\crossrefenum[noprefix]{{lblone}{lbltwo}{lblthree}}` + * `\crossrefenum[note]{{lblone}{lbltwo}{lblthree}}` + * `\crossrefenum{{lblone}{lbltwo}{lblthree}}` + * `\crossrefenum{{only-one}}` (even if the enumeration is limited to one item, it can be inside its own group) ## Customization