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

[macros] Use math font for ranges #5164

Merged
merged 3 commits into from Feb 25, 2022
Merged

[macros] Use math font for ranges #5164

merged 3 commits into from Feb 25, 2022

Conversation

jensmaurer
Copy link
Member

Fixes #2556

ranges

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 22, 2021

Why is there a space in [i, s) and not in [0,n)? Is that due to the penalty? Can we ensure a certain minimal amount of space?

@jensmaurer
Copy link
Member Author

jensmaurer commented Dec 22, 2021

I think there's a bad interaction with the math environment for \countedrange that eats the space. Unfortunately, I can't put the entire \range into $...$, because that generally prevents line breaks in between.

@jensmaurer
Copy link
Member Author

jensmaurer commented Dec 22, 2021

There were actually two spaces in [i, s], it seems. And in math mode (i.e. for \countedrange), we get a small space after the comma. Harmonizing to a small space everywhere looks like this:

ranges

@tkoeppe, what do you think?
(I know, some manual line breaks need to be applied. But any change of spacing has fall-out like that, so I want buy-in to the spacing change first.)

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Jan 14, 2022
@jensmaurer
Copy link
Member Author

@tkoeppe, your opinion is solicited here.

@tkoeppe
Copy link
Contributor

tkoeppe commented Feb 24, 2022

Ah, yes, thanks - I think this is fine in principle, as long as we can get decent spacing.

source/macros.tex Outdated Show resolved Hide resolved
@tkoeppe tkoeppe merged commit e3d8559 into cplusplus:main Feb 25, 2022
tkoeppe pushed a commit that referenced this pull request Feb 25, 2022
Ranges are mathematical notation and not valid syntax, so it is more
appropriate to typeset them as maths than as code.
@jensmaurer
Copy link
Member Author

Uh, that one still had build failures (overfull \hbox). I didn't want to address these until we had consensus on the approach.

@tkoeppe
Copy link
Contributor

tkoeppe commented Feb 25, 2022

Yeah, I fixed them!

@jensmaurer jensmaurer deleted the c59 branch February 25, 2022 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decision-required A decision of the editorial group (or the Project Editor) is required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider formatting ranges with math brackets
2 participants