-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
doc: clarified use of ellipsis in manual to refer to splice only #8636
Conversation
…preserving keyword ... only for cases where splice/splat/slurp is intended. Also sprinkled terms "splat" and "slurp" in a few cases to clarify the context for the word splice
Don't worry about it! No harm done. |
Testing this on a Mac is not very convincing, because Macs are known to have extremely good font and character support. |
Looking at the diff on a first generation Nexus 7 only displays squares instead of |
Yes, we'd be asking for problems like that. It worries me because it's such a spurious way to make the docs hard to read. It trades slightly confusing for totally unreadable on some platforms. |
We could fill it with a webfont which provides the missing character--this might also be good for the Unicode operator table. |
Some of these questions could be resolved with appropriate policies on unicode, monospaced fonts, and the documentation system. For example, here are two possible policies on unicode:
Pt. 2 doesn't seem to be the policy now. For example, if you type pi, you get out a unicode π (plus some digits and then three periods meaning "etc"!). If Pt. 2 were to be the standard policy, then another solution would be needed regarding the current pull request. About monospace fonts: In #8593, there was suggestion to use three \cdots U+0B7 (I think it's "⋅⋅⋅") instead of the unusually spaced "⋯". Personally I prefer the latter because it is more distinct from an ellipsis. Also, I feel that monospacing is not so easy to figure out. When editing in monospace, many things in the .rst files do not line up, and there are various escape characters like `` such that the editor view differs from the formatted view. If you want things to line up in monospace, it would need to be decided whether this should favor editor view or formatted view. RST already formats things like tables well, so the only formatting problem is when the .rst is meant to show monospace code, and whether that really needs to line up with something. I would think usually not, plus as unicode takes over, it will tend to whittle away at monospacing. Here is yet another fallback plan. To preserve monospacing and avoid unicode, perhaps use a comma and "...." to indicate "etc." for example "hcat(A, ....)" This is less likely to be confused with ellipsis. I don't find it as cool as ⋯, but it is more pragmatic. The change could be done very easily, as the effort of this pull request was trying to sort out the ambiguous cases, not in the search and replace. |
The issue isn't really about ASCII vs. non-ASCII, but rather that this is a relatively new Unicode character that doesn't have widespread support in browsers and such. Greek letters like π have pretty universal support. The language itself has to support all of Unicode, but we can't control what browsers do. |
Then perhaps it would be sensible to go with ", ...." (four dots!) which uses no special characters, preserves monospacing, is clearly not legal code or keyword, and is still relatively unlikely to be confused with splicing. |
We can probably assume a browser that supports webfonts. Using STIX (which includes U+022EF, as well as a whole bunch of other technical/mathematical caracters) as a webfont: http://hublog.hubmed.org/archives/001931.html
|
If only there were a free, open source midline horizontal ellipsis! |
And thus the Julia WebFont was born... |
Thanks, Firefox crashes, for readding the end of my comment! (Incorrectly.) |
I don't think a WebFont really addresses the issue of old browsers, and I thought the intent behind .rst was to separate content from form (somewhat), and not depend too closely on fonts. A built-in assumption/requirement of STIX would tie form to content, as would a GIF image of \cdots. To reiterate above, I'll suggest three possibilities:
(The Julia WebFont sounds great, but to account for increasing pixel densities, best to design a full Postscript font with hinting, and ligatures, so you can render at a variety of resolutions. It should have LaTeX math support too.) |
It explicitly doesn't. But as to @ivarne's test above, I'm pretty sure the Jelly Bean browser does support them; if not you can install Chrome or Firefox, and the Nexus 7 (2012) can be upgraded to KitKat. So I'm personally not too worried about pre-WebFont browsers. We're not depending on fonts--we're depending on the code point to be rendered in some sort of reasonable way, which lots of systems can do (OS X seems fine, as does my Windows 7 machine). We can also manipulate that to ensure that a fallback font exists which can render that code point. The STIX font can provide that fallback. |
It seems there was broad consensus against going with this change due to lack of support for midline ellipsis. |
This is a second attempt at a pull request associated with #8593. The complaint was that "..." is a keyword, but was sometimes used in documentation to mean "etc." and not splice/splat/slurp. To remove ambiguity, the suggestion was made to use "⋯" (midline ellipsis) for "etc." I have tried it out and I like it. I have attempted to preserve all appearances of "..." for splicing (and occasionally "⋮" to mean lines of code), but would appreciate a close look to make sure I did not accidentally change the wrong thing.
A few discussion points:
This is my second attempt at a pull request. I messed up horribly on my previous attempt, due to ignorance of how git works. I apologize for my mistake and hope this one works better.