CTAN Comprehensive TeX Archive Network

CTAN update: cleveref-usedon

Date: April 22, 2023 9:51:48 PM CEST
Sven Pistre submitted an update to the cleveref-usedon package. Version number: 0.4.0 2023-04-21 License type: lppl1.3 Summary description: Adds forward-referencing functionality to the cleveref package Announcement text:
### Changed - the .dtx file to use the l3doc document class instead of ltxdoc. ### Added - an abstract explanation of the implementation in Section 2 of the documentation. - the change log CHANGES.md - more descriptive \PackageError's to abort loading the package when the expl3 or LaTeX format is older than 2021-05-16. ### New Features - Experimental options UsedBy and UsedByAndOn: The new (experimental) options UsedBy and UsedByAndOn add the messages "(Used by <list of theorem-like destination(s)>.)" and "(Used by <list of theorem-like destination(s)> on page(s) <list of page(s)>.)", respectively, after the original location of the label <LabelName> when it is referenced via e.g. \cref[UsedBy]{<LabelName>}. Thanks to Murray Eisenberg for this suggestion. Unfortunately, due to how this package is currently implemented, to get these experimental options to work it is necessary to abuse the usage of proof environments. Namely, one needs to nest the proof environment \emph{inside} the theorem-like environment, i.e. \begin{theorem} THEOREM CONTENT \begin{proof} PROOF CONTENT with \cref[UsedBy]{lemma:AuxiliaryCalculation}. \end{proof} \end{theorem} instead of \begin{theorem} THEOREM CONTENT \end{theorem} \begin{proof} PROOF CONTENT with \cref[UsedBy]{lemma:AuxiliaryCalculation}. \end{proof} Note carefully how the proof environments are (ab)used in the above code example. This is -- as far is I know -- not how these environments are supposed to be used. In particular, placing text between theorem-like environment and the corresponding proof, as is often common, will result in a wrong reference. Namely, instead of referencing the theorem-like environment by name only the corresponding section name would be printed, e.g. "(Used by Section 2.2.)" Check Section 2.2 of the documentation for an example. Hence, using proof environments correctly results in "UsedBy" and "UsedByAndOn" messages which are less helpful to the reader. On the other hand, using this experimental functionality to help the reader forces users (i.e. authors) of this package to use proof environments incorrectly. This sounds like a No-Free-Lunch theorem... Therefore, use these two experimental options at your own discretion! If anyone has an idea how to implement this without nesting the proof environment, let me know! ---------------------------------------------------------------------- This package is located at https://mirrors.ctan.org/macros/latex/contrib/cleveref-usedon More information is at https://www.ctan.org/pkg/cleveref-usedon CTAN is run entirely by volunteers and supported by TeX user groups Please join a user group or donate to one, see https://ctan.org/lugs
Thanks for the upload. For the CTAN Team Ina Dau --

cleveref-usedon – Adds forward-referencing functionality to the cleveref package

Imagine you are reading a long mathematical text such as a text book or a thesis.

There are plenty of supplementary lemmas, propositions, theorems and/or exercises throughout the whole text.

You ask yourself “Gosh, while Lemma 1.12 is certainly an interesting result, where is this result used later on in this long text? I really would find that helpful to decide why I should read the proof.”

You can, of course, use the PDF search function of your viewer to look up the string “Lemma 1.12”, but wouldn’t it be more helpful if Lemma 1.12 already indicated all or at least its most useful/crucial applications via an info message?

This is what this package tries to address: The info message “Used on p. 40, 43-45 and 101.” would then be printed to the header of Lemma 1.12.

This is done by extending the \cref and \Cref commands and giving them an optional argument UsedOn. Every time you wish to record a reference in the “used on page list”, you would simply type \cref[UsedOn]{<LabelName>}. If you use \cref without this optional argument, this reference won’t be recorded in this page list.

Packagecleveref-usedon
Version0.4.0 2023-04-21
Copyright2023 Sven Pistre
MaintainerSven Pistre

Announcements

more

Guest Book Sitemap Contact Contact Author