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
Consider formatting ranges with math brackets #2556
Comments
It's a trade-off. Using code font gives the thing a uniform look, and we do actually define the meaning of the notation. So it's not outright wrong. It's similar to how we use code font for conceptual placeholders, e.g. |
It does make sense, it's just a bit unfortunate for cxxdraft-htmlgen that the same commands/environments are used for C++ code and non-C++ code, because cxxdraft-htmlgen should only syntax-highlight C++ code as C++. I currently use a patch that introduces
but it's not ideal. :) |
An important difference is |
Interestingly, there's a bunch of places in numerics.tex that don't use the range macros but instead use
Probably an oversight, but I'm reluctant to submit a patch to replace these with uses of the range macros, because I love the math brackets more than I hate the inconsistency. ;) |
Editorial meeting: Do move away from \tcode for brackets and comma. Try the looks of two center dots as separator, with math brackets. Do not proceed without @tkoeppe's input. |
Cool, thanks for the decision! I'd be happy to submit a patch to move away from \tcode for brackets and comma. The idea of using two center dots as separator surprises me a little bit though, because combining center dots with round and square brackets to indicate inclusive-ness of the bounds doesn't match conventional mathematical interval notation. What would be the motivation for changing from comma to two center dots? :) |
\Range
and\range
currently format the whole range, including the brackets and comma, as C++ code:But that's kinda weird, because something like
[eback(), gptr())
isn't actually a syntactically well-formed C++ code fragment; only theeback()
andgptr()
parts are. So I think it might make more sense to format the brackets (and comma) as math. What do you think?The text was updated successfully, but these errors were encountered: