-
Notifications
You must be signed in to change notification settings - Fork 772
Use \term and \defnx more correctly and consistently #980
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
Please hold, spotted a few more |
7bc1bd1
to
d05fde0
Compare
Added a commit that also fixes abuse of \term for things that are not terms at all. Only visual difference now is erasure of some inappropriate trailing whitespace resulting from the fact that in addition to making text italic, \term also includes a trailing \xspace. |
Looks good other than that we would prefer the more semantic |
Ah, thanks for the review, will fix (and rebase). |
Fixed and rebased. (Still no visual difference apart from the trailing whitespace.) |
Bleh, missed a few, so not completely fixed yet |
Added fixes for a whole bunch more occurrences |
always be extended to an order that does include lock and unlock operations, since the | ||
ordering between those is already included in the ``happens before'' ordering. \end{note} | ||
|
||
\pnum | ||
For an atomic operation \textit{B} that reads the value of an atomic object \textit{M}, |
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.
I'm sorry to be a complete pain, but in view of Issue #1060, could we please hold off on ripping out \textit
everywhere for now? I'd prefer if one commit could focus on one change, namely getting rid of \term
. If that happens to introduce a few \placeholder
s, that's fine, but let's not introduce them for unrelated reasons.
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.
Ah no worries, I'm glad to hear there's coherent plans being formed for the use of all these things going forward. :) I'll split out the \term stuff tonight, cheers!
All right, I've split it up more, and now it only uses \placeholder to replace bad uses of \term, leaving other \textit occurrences alone (apart from those that should be \terms). |
@jensmaurer: As the standing expert on all things |
the \term{literal} \term{L} is treated as a call of the form | ||
Otherwise, \placeholder{S} shall contain a raw literal operator or a literal operator | ||
template~(\ref{over.literal}) but not both. If \placeholder{S} contains a raw literal operator, | ||
the \placeholder{literal} \placeholder{L} is treated as a call of the form | ||
|
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.
\term{literal} should be \grammarterm{literal}, not \placeholder
static const @\placeholder{enumerated C0}@ (@\placeholder{V0}@); | ||
static const @\placeholder{enumerated C1}@ (@\placeholder{V1}@); | ||
static const @\placeholder{enumerated C2}@ (@\placeholder{V2}@); | ||
static const @\placeholder{enumerated C3}@ (@\placeholder{V3}@); | ||
..... |
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.
Those are two distinct placeholders. Please try separating them (i.e. have two \placeholder's next to each other). Does that impair the spacing?
constexpr @\placeholder{bitmask C0}@(@\placeholder{V0}{}@); | ||
constexpr @\placeholder{bitmask C1}@(@\placeholder{V1}{}@); | ||
constexpr @\placeholder{bitmask C2}@(@\placeholder{V2}{}@); | ||
constexpr @\placeholder{bitmask C3}@(@\placeholder{V3}{}@); | ||
..... |
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.
Same here: two \placeholders, once for each meta-variable.
@@ -3916,7 +3916,7 @@ | |||
sequence \end{note} | |||
|
|||
\pnum | |||
The \textit{current match} is \tcode{(*position).prefix()} if \tcode{subs[N] == -1}, or | |||
The \term{current match} is \tcode{(*position).prefix()} if \tcode{subs[N] == -1}, or | |||
\tcode{(*position)[subs[N]]} for any other value of \tcode{subs[N]}. | |||
|
|||
\rSec3[re.tokiter.cnstr]{\tcode{regex_token_iterator} constructors} |
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.
This patch adds \term, which this issue tries to eradicate (admittedly morphed from even worse \textit). Please drop this patch from here for now; I expect those \textit to mostly become \defn or \defnx.
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.
Ah ok, I didn't know there was a plan to eradicate \term. (Not sure what "this issue" refers to.)
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.
Well, if we replace all of \term with more semantic macros such as \placeholder or \defn/x or ..., then nothing remains, right?
class, and has no non-static data members of type non-POD struct, non-POD | ||
union (or array of such types). A \term{POD class} is a | ||
union (or array of such types). A \defn{POD class} is a | ||
class that is either a POD struct or a POD union. | ||
|
||
\begin{example} |
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.
Do we have any rules when to use "POD~struct" vs. "POD struct" in the index? We seem to prefer the variant with the tilde = non-breaking space. If true, the stuff above needs to become \defnx.
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.
I'll change it to use tilde, so that we're covered if one day we want to render the index so narrowly that an entry consisting of 2 words side by side would get broken.
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.
If being prepared for that is an actual goal, though, there are hundreds more occurrences that need to be replaced.
integer literal (base ten) begins with a digit other than \tcode{0} and | ||
consists of a sequence of decimal digits. | ||
A \term{hexadecimal} integer literal (base sixteen) begins with | ||
A \defnx{hexadecimal}{literal!hexadecimal} integer literal (base sixteen) begins with | ||
\tcode{0x} or \tcode{0X} and consists of a sequence of hexadecimal |
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.
Please put all of "XXX integer literal" into the first argument of \defnx; we're not actually defining the term "decimal" here, but the phrase "decimal integer literal".
@@ -12224,30 +12224,24 @@ | |||
The following definitions apply to this Clause: | |||
|
|||
\pnum | |||
\indexdefn{call signature}% | |||
A \term{call signature} is the name of a return type followed by a | |||
A \defn{call signature} is the name of a return type followed by a | |||
parenthesized comma-separated list of zero or more argument types. | |||
|
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.
For this (and those that follow), the index entries should probably use tilde instead of space.
Review complete; see comments above. Going to bed now. |
Hm, this pull request has really lost focus. I originally just wanted to use \defn* for \terms that already had index entries, a change which I could make without affecting those index entries or the formatting of the text, but I don't feel qualified to make the kind of changes to the index entries themselves (by changing their use of tildes) or to the formatting of the text (by changing which parts of the text are italicized) that Jens is requesting, so probably better to just go with his patches. :) |
No visual difference in the PDF.