-
Notifications
You must be signed in to change notification settings - Fork 772
Separate textual and code placeholders; use slanted font for the latter #1060
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
Comments
Also improves whitespace, italic correction and alignment. I also included a few drive-by fixes where placeholders should have been used but weren't. See also #1060.
Let me object to introducing \textit for anything new. If we clearly mark all semantic things appropriately, we can easily fix the font later. Going \textit gets us back to where we've been all along: unable to add index entries for term definitions, for example. In any case, I'd like to point out that we sometimes use the code placeholder and mention it in regular text to explain what it means. That's probably an argument against different fonts for these. |
I think that's a red herring: code placeholders should always appear in code placeholder font (typewriter + decoration), whether that's in a code block or in body text. The things I want to distinguish are conceptual placeholders (like "a memory access A") and meta variables (like |
Ok. Whatever the outcome, we should be clear what to use in "A is sequenced before B" vs. "offsetof(type, member-designator" vs. "atomic<integral>" (the latter doesn't even say "T"). If we can clearly differentiate these uses, let's introduce a \metavar for the first case NOW and discuss formatting later. |
The other option that I hinted at is that we can use |
Editorial meeting consensus: Maybe use "I" as the placeholder, not "integral". Use slanted font for \tcode bool, where necessary. Ask LWG for feedback. |
See #2245. |
Uh oh!
There was an error while loading. Please reload this page.
We currently use the
\placeholder
macro (and its non-italic-correcting variant\placeholdernc
) for both textual and code placeholders, and we typeset both in "italic".This has two problems:
Monospace italics don't always look that great. Slanted "faux-italics" would look better for meta-variables. (But true italics may still be nice for things like
see below
.)There is no bold italic monospace font, so a code placeholder in a heading, say, will fall back to bold slanted monospace.
My general idea here is that we should perhaps typeset all code placeholders in slanted, rather than true italics. Not only would that make placeholders look the same in headings and body text, but it is also generally nicer.
This raises a new problem: We use
\placeholder
both in text and in code. Obviously, in normal text placeholders should still be decorated as true italics. So we need to distinguish the two use cases, either by laboriously replacing text placeholders with\textit
or some new macro, or by making\placeholder
smart and recognizing its context.The text was updated successfully, but these errors were encountered: