diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/crossrefenum/doc/crossrefenum.md')
-rw-r--r-- | Master/texmf-dist/doc/generic/crossrefenum/doc/crossrefenum.md | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Master/texmf-dist/doc/generic/crossrefenum/doc/crossrefenum.md b/Master/texmf-dist/doc/generic/crossrefenum/doc/crossrefenum.md index 13e5494695d..ee4da984aaf 100644 --- a/Master/texmf-dist/doc/generic/crossrefenum/doc/crossrefenum.md +++ b/Master/texmf-dist/doc/generic/crossrefenum/doc/crossrefenum.md @@ -2,7 +2,7 @@ title: "crossrefenum" subtitle: "Smart typesetting of enumerated cross-references for various TeX formats" author: Bastien Dumont -date: 2023/02/20 +date: 2024/04/13 lang: en-US toc: true license: true @@ -40,7 +40,7 @@ you can do: * `\input{crossrefenum}` (generic); * `\usepackage{crossrefenum}` (LaTeX; - must be called after _nameref_ if you use _hyperref_); + must be called after _nameref_ if you use _hyperref_`\kern1.5pt`{=context}); * `\usemodule[crossrefenum]` (ConTeXt). ## Basic invocation @@ -164,7 +164,7 @@ for instance, you may want to use the word “and” before the last note number if the reference type is a simple one (`note`), and a comma if it is comes in second in a double reference (e.g. in `pagenote`). To achieve this, you should redefine `\crfnmDefaultEnumDelimInSecond` -and `\crfnmDefaultBeforeLastInEnumInSecond`. +and `\crfnmDefaultBeforeLastInSecond`. By default, these macros fall back respectively on `\crfnmDefaultEnumDelim` and `\crfnmDefaultBeforeLastInEnum`. @@ -215,6 +215,8 @@ use an empty group (e.g. `\def\crfnmPageEnumDelim{}`). Adding support for new types consists in defining the related macros in your preamble. Here is a commented example that would add support for references to lines in ConTeXt if this feature were not already included in _crossrefenum_. +We suppose that the labels are inserted in the document using the standard ConTeXt macros, +i.e. `\someline` for line references and `\pagereference` for page references. ```{.tex} % Register the types. Take care about capitalization! @@ -226,10 +228,8 @@ if this feature were not already included in _crossrefenum_. \def\crfnm@pageline{Pageline} %% Add them to the lists of known types. -\crfnm@newListFrom[\crfnm@simpleRefTypes][\crfnm@line] -> \crfnm@simpleRefTypes -\crfnm@newListFrom[\crfnm@doubleRefTypes][\crfnm@pageline] -> \crfnm@doubleRefTypes -\crfnm@newListFrom[\crfnm@supportedTypes][\crfnm@line] -> \crfnm@supportedTypes -\crfnm@newListFrom[\crfnm@supportedTypes][\crfnm@pageline] -> \crfnm@supportedTypes +\crfnm@declareType[simple][\crfnm@line] +\crfnm@declareType[double][\crfnm@pageline] ``` ```{.tex} @@ -244,6 +244,7 @@ if this feature were not already included in _crossrefenum_. % Define the macro used by \crossrefenum internally % to retrieve the raw reference number without typesetting it. +% This macro must be purely expandable. % If you want to support multiple formats, % see how the macro \crfnm@case is used in crossrefenum.tex. % Note: the Lua function get_raw_ref_number is defined @@ -275,7 +276,7 @@ If you have wishes or hints about this, please contact me. ## Compatibility issues -With LaTeX, the _nameref_ package (required by _hyperref_) +With LaTeX, the _nameref_ package (required by _hyperref_`\kern1.5pt`{=context}) must be loaded explicitely before _crossrefenum_. However, if the links in the output of `\crossrefenum` (not the numbers) point to a wrong location, you may wish to patch the macro |