summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/hereapplies/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/hereapplies/README.md')
-rw-r--r--macros/latex/contrib/hereapplies/README.md84
1 files changed, 50 insertions, 34 deletions
diff --git a/macros/latex/contrib/hereapplies/README.md b/macros/latex/contrib/hereapplies/README.md
index 17ed9033cb..b03b599989 100644
--- a/macros/latex/contrib/hereapplies/README.md
+++ b/macros/latex/contrib/hereapplies/README.md
@@ -1,38 +1,29 @@
Here Applies
============
-A LaTeX package for cross-linking concepts to their applications
+A LaTeX package for referencing groups of pages that share something in common
Overview
--------
-**Here Applies** is a LaTeX package that implements an _informal glossary_ for
-cross-linking concepts to their applications. Its core mechanism is identical
-to that of a conventional glossary – i.e. some concepts are marked as
-“important” and indicized every time they appear in the document – but it does
-not produce any nomenclature section, nor relies on the conventions that
-normally take part in a glossary.
-
-Besides an indicization mechanism, in fact, a proper glossary should normally
-be able to produce a dedicated section – usually at the end of the document –
-where the terms are collected in alphabetical order, their definitions are
-shown, and the lists of their occurrences are presented. All these things but
-the last one, by design, are missing in **Here Applies**.
-
-Instead, the package offers only two macros: `\hereapplies` and `\whereapplies`
-(plus their “starred” versions `\hereapplies*` and `\whereapplies*`). In both
-cases a “concept identifier” is passed as argument – and this can be any string
-invented in the moment, as long as it contains only letters (`\hereapplies`
-additionally supports more than one identifier in the form of a comma-separated
-list).
-
-Every time `\hereapplies` is invoked again on identical identifiers, the
-document is made aware that the same concepts from previous invocations are
-occurring in that point. And so, every time the `\whereapplies` macro is
-invoked on a known identifier, all the occurrences of the latter within the
-entire document will be printed in the form of a linkable page list (e.g. “pp.
-1, 5, 8–9, 14–20…”).
+**Here Applies** is a LaTeX package that allows to create groups of labels and
+reference them altogether. It can be used for creating informal glossaries that
+cross-link concepts to their applications, or simply mentioning multiple pages
+that share something in common.
+
+The package offers two macros: `\hereapplies` and `\whereapplies` (plus their
+“starred” versions `\hereapplies*` and `\whereapplies*`). In both cases an
+identifier is passed as argument – and this can be any string invented in the
+moment, as long as it contains only letters (`\hereapplies` additionally
+supports more than one identifier in the form of a comma-separated list).
+
+Every time `\hereapplies` is invoked with known identifiers, the document is
+made aware that the place shares some kind of connection with other places in
+which the same identifiers were used. And so, every time the `\whereapplies`
+macro is invoked with a known identifier, all the occurrences of the latter
+within the entire document will be printed in the form of a linkable page list
+(e.g. “pp. 1, 5, 8–9, 14–20…”).
As `\hereapplies` is designed to be invoked in the middle of a chapter or a
section, and that location must be made linkable, the `\phantomsection` macro
@@ -98,17 +89,17 @@ A minimal tutorial
### Macro `\hereapplies[label]{identifiers}`
-The `\hereapplies` macro notifies the document that one or more concepts apply
-to a particular point and adds a label to it.
+The `\hereapplies` macro notifies the document that one or more identifiers
+apply to a particular point and adds a label to it.
If the optional argument is passed the label created will be named accordingly,
otherwise an opaque name will be assigned to it. This argument may contain only
what is legal for `\pageref`.
The `identifiers` argument must be a comma-separated list of identifiers. Each
-of these may contain only Latin letters and the "at" sign (`@`). These strings
-remain confined within the internal scope of the package and do not create
-conflicts with possible macros or labels of the same names.
+of these may contain only Latin letters and the "at" sign (`/^[A-Za-z@]+$/`).
+These strings will remain confined within the internal scope of the package and
+will not create conflicts with possible macros or labels of the same names.
The “starred” version of this macro (`\hereapplies*`) will not invoke the
`\phantomsection` directive.
@@ -120,8 +111,9 @@ The `\whereapplies` macro prints all the occurrences of an identifier, in the
form “p. …” or “pp. …” (with page range support).
The `identifier` argument may contain only Latin letters and the "at" sign
-(`@`). This string remains confined within the internal scope of the package
-and does not create conflicts with possible macros or labels of the same name.
+(`/^[A-Za-z@]+$/`). This string will remain confined within the internal scope
+of the package and will not create conflicts with possible macros or labels of
+the same name.
If the same `identifier` is not passed to `\hereapplies` at least once
throughout the document, `\whereapplies` will print “**??**”.
@@ -130,6 +122,30 @@ The “starred” version of this macro (`\whereapplies*`) will use `\pageref*`
instead of `\pageref` for generating the page list.
+Internationalization
+--------------------
+
+Currently the localization of **Here Applies** is not automatic. It is possible
+however to control the strings generated by overwriting the four macros
+`\hapage`, `\hapages`, `\hadelimiter` and `\halastdelimiter`.
+
+For example, writing at the beginning of a document
+
+``` tex
+% German translation of **Here Applies**
+% English: `p.\ `
+\gdef\hapage{S.\ }
+% English: `pp.\ `
+\gdef\hapages{S.\ }
+% English: `\ and\ `
+\gdef\halastdelimiter{\ und\ }
+% English: `,\ ` (exactly like in German -- leave it)
+% \gdef\hadelimiter{,\ }
+```
+
+will translate “pp. 2, 4 and 6” into “S. 2, 4 und 6”.
+
+
Get involved
------------