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
Do not italicize colons when defining grammar non-terminals or #1355
Conversation
I think a change of this nature will require some careful fine tuning. For example, the colon after |
@@ -393,9 +393,9 @@ | |||
|
|||
\newenvironment{bnfbase} | |||
{ | |||
\newcommand{\nontermdef}[1]{\nonterminal{##1}\indexgrammar{\idxgram{##1}}:} | |||
\newcommand{\nontermdef}[1]{\nonterminal{##1}\indexgrammar{\idxgram{##1}}\textnormal{:}} |
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.
Try inserting an italic correction before the colon, see if that looks better (\itcorr[1]
).
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.
Yeah, I had the same idea. And adding / or \itcorr indeed fixes it. Screenshot forthcoming.
@@ -198,7 +198,7 @@ | |||
\newcommand{\leftshift}[1]{\ensuremath{\, \mathsf{lshift}_#1 \,}} | |||
|
|||
%% Notes and examples | |||
\newcommand{\noteintro}[1]{[\,\textit{#1:}\space} | |||
\newcommand{\noteintro}[1]{[\,\textit{#1}:\space} |
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.
I've also always wanted to reduce the excessive space after the [
and before the ]
. Instead of \,
, I figured something like a \kern0.25pt
or so would suffice. But I'll need to convince @zygoloid of that first.
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.
Hm... We could make the spacing slightly smaller, but I think having some spacing is good. I'll consider this change out-of-scope for this pull request.
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, some, but less. I can show you some variations at some point. But let's separate that from the bnf-colon issue.
following the "[ Note" and "[ Example" introducers. Fixes cplusplus#1351.
Much better! |
I committed just the |
following the "[ Note" and "[ Example" introducers.
Fixes #1351.
In "Appearance" mode, diffpdf shows everything (including spacing differences caused by the upright colon). In "characters" mode, there are just six pages of differences where a word was hyphenated the other way.
Sample change:
An additional "Overfull hbox" appeared in exceptions.tex, which took a reformulation of a note to fix. (Hyphenation hints were ineffective, for unknown reasons.)