-
Notifications
You must be signed in to change notification settings - Fork 771
Introduce term.* labels for [basic.types.general] terms #5104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/cplusplus/draft/wiki/Specification-Style-Guidelines says "create a \label{term.this.name} at the start of the paragraph defining the term". Perhaps it should say "sentence" rather than "paragraph".
61245eb starts with [std}
rather than [std]
.
@JohelEGP , fixed both issues. |
No new terms were introduced. |
(I mean the internal labelling of terms. The labelling is new, I suppose, not the terms.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this is an opportunity to do something like \impldef
, where instead of
shall be a foo type\iref{term.foo.type}.
we could write
shall be a \tref{foo.type}.
Of course, we sometimes use just the adjective alone (which is known by \defnadjx
at least), so we might want \adjref
as well.
In order to make |
(Tangent: if we had a text replacement system for LaTeX, I would also have a nice improvement for the unicode-smallcaps formatting -- I would like to format numerals and letters differently, but I don't know how to do that as a macro.) |
Why can't |
I guess there are not sufficiently many \saveboxes; I thought that's a quite finite resource. |
We could use a custom label to store terms. For example:
This uses the aux file as storage and requires multiple passes etc etc. |
@tkoeppe, that's not substantially different from my We'd reap real benefits if we could make Ah, looks like the |
@jensmaurer, sort of, but what I'm proposing is to just explicitly spell out both the label and the actual term, rather than deriving one from the other. Not only does that require less implementation magic, but it also makes it possible to change the term without changing the label, etc. And the auxfile labelling mechanism is pretty well-established and tractable. We could make a new command to replace |
@tkoeppe , thanks for your thoughts. See #5210 for an approach that introduces term.* labels automatically. Note that for each
We need macros so that the common case is easy, but (if need be) all three items must be influenceable independently. In my view, \termref should show both the term and the cross-reference to where it is defined, e.g. "odr-use (6.2)", while naming the term only once. And just to point out: Memoir creates .aux entries like this for \label:
|
Automating the term.* definitions does detect duplicate term definitions quite nicely; see #5210 |
For ease of review, these are all separate commits.
Feel free to squash on merge.
Fixes #4630