Skip to content
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

grammar terms are indistinguishable from defined terms #323

Closed
burblebee opened this issue Jun 16, 2014 · 28 comments · Fixed by #3370
Closed

grammar terms are indistinguishable from defined terms #323

burblebee opened this issue Jun 16, 2014 · 28 comments · Fixed by #3370
Assignees
Milestone

Comments

@burblebee
Copy link
Contributor

This issues was raised by Gaby - that you can't tell definitions from grammar terms, because both are italics. Maybe use _bold italics_ for one of those - like the definition?

@burblebee
Copy link
Contributor Author

I would be happy to take this, but I'll need guidance from the group as to what font to use.

@zygoloid
Copy link
Member

Chosen approach is to change grammar terms to be sans serif slanted (\sffamily, \textsf).

@burblebee burblebee removed their assignment Apr 13, 2016
@jensmaurer
Copy link
Member

This depends on #701.

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 17, 2016

Sans-serif (whether slanted or upright) wouldn't be a terrible solution. Maybe we could test-drive that change and see how we feel about it. Sample boards welcome.

@jensmaurer
Copy link
Member

Now that #701 is addressed, we can make progress here. A sample for [class] is attached. Note p5, where we have all the different typefaces in one sentence.

class

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Dec 1, 2017
@jensmaurer jensmaurer added this to the C++20 milestone Dec 1, 2017
@jwakely
Copy link
Member

jwakely commented Dec 1, 2017

I like it.

@zygoloid
Copy link
Member

zygoloid commented Dec 1, 2017

Just playing with \tcolorbox:

screenshot from 2017-12-01 14 45 28

@jensmaurer
Copy link
Member

Well... I just had a look at the \tcolorbox manual, and the table of contents looks ... wow.

I think the fundamental question here is whether we want to leave the realm of traditional black-on-white printer-style typesetting or not. (Maybe ISO Central Secretariat has an opinion, too.) If the former, we should (for example) consider boxing all the examples and notes, as well as the grammar snippets and the itemdecls.

At the current state of black-on-white, boxing the \grammarterms (and nothing else) seems misguided to me, and hurts my eyes: "Here is a large blue boxed \grammarterm. Better pay attention. We will throw it right in your face. But we didn't bother to box the grammar definitions, sorry about that."

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 1, 2017

I think the typographical principle of minimal distinction applies here: if we're changing the typeface, then we don't also need to make it italic. Try just upright sans-serif for the grammar terms, I bet that looks good, too.

@jensmaurer
Copy link
Member

jensmaurer commented Dec 1, 2017

Here you are ("opt" probably needs some love + care):

class

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 1, 2017

(Could you perhaps make slightly higher-resolution screenshots? Check out how zygoloid makes them.)

@jensmaurer
Copy link
Member

Here you are:

class

@zygoloid
Copy link
Member

zygoloid commented Dec 2, 2017

I'm afraid I don't like it as much as the slanted form. The transition between typefaces looks really jarring, almost as if the grammar names and extracts are screenshots of some other document. (I'm not sure why I don't get the same impression from the slanted form.) And conversely, the transition in typeface between the end of a grammar term and a following "s" is not distinctive enough to give a clear transition between the grammar term and the suffix.

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 2, 2017

Yes, I agree that the distinction is ultimately too subtle to be effective.

@godbyk
Copy link
Contributor

godbyk commented Dec 2, 2017

You might try small caps (\textsc or \scshape). It's less jarring than changing typefaces and is obviously different than plain italics.

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 2, 2017

@godbyk: I like that idea! Not only does it allow us to not introduce a new typeface, but it also plays more nicely with the start of sentences. Though that said, I'm now wondering whether we shouldn't use small-caps for definitions and retain the familiar italics for grammar terms!

@godbyk
Copy link
Contributor

godbyk commented Dec 2, 2017

Note, though, that it is still difficult to distinguish between a \textsc{s} and a regular s.

@jensmaurer
Copy link
Member

jensmaurer commented Dec 2, 2017

For completeness, here's a version with \textsc:

class

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 2, 2017

@jensmaurer: What about the other way round, use small caps for definitions?

@jensmaurer
Copy link
Member

@tkoeppe: We have not progressed far enough with #329 to make this an imminent option, but here you are:
class

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 2, 2017

@jensmaurer: I don't think any font change is imminent at this point :-)

I do quite like small caps for definitions. I'm not all that fond of small caps for grammar terms. Grammar terms get repeated, and I quite like our existing italics. Definitions appear only once, so I can get behind using small caps there -- there's a fair bit of typographic tradition for that, too.

@zygoloid
Copy link
Member

zygoloid commented Dec 2, 2017

How does the small-caps-for-definitions look for "contextually converted to bool" and other terms with embedded \texttt? (We may want to entirely move away from code font in defined terms, but if we can find a formatting for definitions that permits it without too much ugliness, that might be a point in its favour.)

@jensmaurer
Copy link
Member

I'd like to point out that we already use \textsc for NTBS and similar acronyms in [library] (both definition and use employ \textsc).

@zygoloid: Ugh, turns out [conv] is lagging behind on \term -> \defn adjustments; see #1880. Here you are, anyway:
class

@zygoloid
Copy link
Member

We also tried bold for definitions, which doesn't really work because the weight of the bold font is too close to that of teletype.

My preference currently is small-caps for definitions. We should also stop using small-caps for NTBS, except in the definition of it. (Note that using small-caps for NTBS means that search for "NTBS" in some PDF viewers doesn't find it! This switches from a bug into a feature when used for defined terms.)

@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 7, 2018

Editorial meeting consensus: we explored several options, and even though we could pursue any one of them (with small caps definitions being the most popular), there's a big cost of upsetting the status quo and the familiarity of the many users of the standard. The issue is ultimately not all that pressing. Several other language specifications use a similar style to ours, and it's good enough. In many cases, grammar terms have peculiar spelling (e.g. hyphens) that makes them quite obvious, and so we consider the status quo good enough for the time being.

@jensmaurer
Copy link
Member

jensmaurer commented Sep 30, 2019

Editorial teleconference: New motivation for addressing this presented in #3197.

@jensmaurer jensmaurer reopened this Sep 30, 2019
@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Sep 30, 2019
@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 4, 2019

@jensmaurer Ping #323 (comment) for the italic-sans?

@jensmaurer
Copy link
Member

jensmaurer commented Nov 4, 2019

Editorial meeting: This looks good, better than the status quo:

\definecolor{light-gray}{gray}{0.2}
\newcommand{\GrammarStylex}[1]{{\sffamily\itshape\textcolor{light-gray}{#1}}}

looks reasonable, except for the absence of italics correction (visible for trailing "s"). Keep standard black for BNF blocks.

@jensmaurer jensmaurer removed the decision-required A decision of the editorial group (or the Project Editor) is required. label Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants