-
Notifications
You must be signed in to change notification settings - Fork 771
Remove \xspace #1439
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
Remove \xspace #1439
Conversation
source/macros.tex
Outdated
\newcommand{\CppXIV}{\Cpp 2014\xspace} | ||
\newcommand{\opt}{{\ensuremath{_\mathit{opt}}}\xspace} | ||
\newcommand{\Cpp}{\texorpdfstring{C\kern-0.05em\protect\raisebox{.35ex}{\textsmaller[2]{+\kern-0.05em+}}}{C++}} | ||
\newcommand{\CppIII}{\Cpp{} 2003} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might also consider \Cpp~2003
if you want to keep 'C++ 2013' from splitting across two lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Applied.
I have run "diffpdf" in "Words" mode (to show any egregious accidents), and other than pagination changes, only substantial whitespace improvements showed up. We sometimes had inter-word space between an italics term and a subsequent comma, for example. Overfull hboxes have improved slightly in severity (maybe because of additional kerning), but have not changed in number. Ah, I've fixed one in [alg.merge] that popped up. The index has also improved, because two separate entries for new-expression got merged into one. |
6b2cea8
to
94a63fe
Compare
Rebased. |
This is really great! (Needs another rebase though) |
Rebased. |
Note that if there are genuine errors in the current text that you discovered as part of the change, I am sympathetic towards fixing those separately in advance of this change. No need to ship a standard with known warts. |
@tkoeppe : Do you consider my pictures above "errors"? |
@jensmaurer: Yes, definitely, things like the space in "linkage ," is definitely something I'd consider borderline broken. |
Rebased. |
source/iostreams.tex
Outdated
\grammarterm{root-name\opt}, | ||
\grammarterm{root-directory\opt}, | ||
\grammarterm{\opt{root-name}}, | ||
\grammarterm{\opt{root-directory}}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the \opt go outside the \grammarterm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I believe it should. I see other places where grammarterm has problems as well, as can be seen in this grep:
$grep "grammarterm.*\<opt\>" *.tex
declarations.tex:\tcode{typename}\opt{} \grammarterm{nested-name-specifier}\opt{} \grammarterm{template-name}
declarations.tex:``\tcode{enum} \grammarterm{nested-name-specifier\opt} \grammarterm{identifier}''
declarations.tex:\grammarterm{attribute-specifier-seq\opt} \grammarterm{identifier}~(\ref{dcl.type.elab}), or
declarators.tex:is of the form \grammarterm{attribute-specifier-seq\opt}
declarators.tex:\grammarterm{attribute-specifier-seq\opt}
declarators.tex:\grammarterm{cv-qualifier-seq\opt} \grammarterm{ref-qualifier\opt}
declarators.tex:\grammarterm{cv-qualifier-seq}\opt \grammarterm{ref-qualifier}\opt
expressions.tex:parameter-type-list \cvqual{cv} \grammarterm{ref-qualifier\opt} returning \tcode{T}'', then
iostreams.tex:\grammarterm{root-name\opt},
iostreams.tex:\grammarterm{root-directory\opt},
Another editorial issue?
fwiw, I think the above should instead be coded as:
\grammarterm{root-name}\opt{},
\grammarterm{root-directory}\opt{},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@burblebee: It's an express change in this patch series to switch from blah\opt{}
to \opt{blah}
, because it makes it less likely to get a spacing accident by forgetting the empty {}
.
In the meantime, I'm sending out #1544 to just address the appalling spacing issues in basic.link. |
Rebased (again). |
Another bad xspace space that might be worth fixing asap is the one resulting from the use of \term in https://github.com/cplusplus/draft/blob/master/source/expressions.tex#L4831 In C++98, there was no space there. |
Perhaps now would be a good time to rebase/apply this? |
Rebased. |
611571d
to
91a1ef5
Compare
Rebase, Dr Freeman. |
Other than positively influencing kerning, this removal has no effect.
This was machine-converted using sed -i 's/\([-a-z]\{1,\}\)\opt{}/\opt{\1}/g' *.tex sed -i 's/::\opt{}/\opt{::}/g' *.tex sed -i 's/\(\terminal{[^}]*}\)\opt{}/\opt{\1}/g' *.tex
…unning text This avoids colons in running text and some bad spacing.
to avoid an overfull hbox.
This avoids linebreaks in an unpleaseant location.
It was mentioned on the mailing list that it would be desirable to have the new
|
Nice. Can you also make it discover linebreaks? |
The |
Do we want to apply this patch series as large as it is, or should I split it into separate patches along the lines of:
These could be reviewed separately, making smaller chunks of changes. Opinions? |
Is this PR redundant in light of #1761? |
Fixes #1433.
This removes lots of kerning ugliness when (e.g.) a \grammarterm is followed by a punctuator. It's also a surprise to notice all the places where we actually had superfluous whitespace in the document.