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
[std] Allow linebreaks before \ref in select places #1688
Conversation
Avoids 'Overfull \hbox' warnings.
If we're going to convert the ~s to spaces whenever they cause overfull hboxes, why do we even bother with them at all? If we want to instruct TeX that line breaks should be inserted here as a last resort (as a kind of hyphenation rule), we should do so directly rather than manually maintaining some ~s and some spaces. Perhaps we can define |
First, we only want to allow a linebreak before Can we maybe redefine |
I have a somewhat more drastic approach in mind: adding a To make that work, we need to change the \ref label for clauses and annexes to include the leading "Clause" or "Annex", but that seems to be a net improvement. |
OK, I have an approach that prevents linebreaks before a parenthesized reference unless doing so would result in a hyphenation or overfull hbox. |
See pull request #1690, which addresses this in a more holistic fashion. Unless there are objections, I intend to rebase and merge that after the LWG motions. |
Regardless of whether we'll change the way we do references, I would suggest waiting with fixes like the present one until we publish the IS. The status quo should be the "persistent baseline", and changes like the present one should be "temporary finalization fixes" for publication. |
@tkoeppe: You comment confuses me. I thought C++17 IS was branched and is essentially immutable except for ISO Central Secretariat and NB "must fix" comments? I thought we're only discussing C++20 changes here. |
@jensmaurer: I'm talking about the C++20 IS! |
@tkoeppe: Sorry, but "I would suggest waiting with fixes like the present one until we publish the IS" is still three years away if you mean publication of the C++20 IS. We can certainly fix \ref vs. \iref in that timeframe, I hope? |
@tkoeppe: Ah, I understand now: You're saying my "Overfull \hbox removal" patch should not go in until we're near publication. (And we live with the Overfull \hboxes for three years!?) However, something like Richard's #1690 fixes the issue at its root, so is very well on-topic for short-term merge. |
Correct, we shouldn't make ad-hoc adjustments that would become undesirable once the ambient text changes so as to make the adjustment unnecessary. A principled change like Richard's is fine, but any deviations that we make from the general rule should probably wait until the bulk of the text is stabilized. Otherwise it'd be very difficult to remember to undo the deviations. I don't mind living with occasional overfull boxes in the working paper. If there's an obvious improvement that fixes them, of course we should do that, but in a case like this I could probably just wait. |
I believe this PR is now obsolete; we don't have any overfull hboxes at head. |
Avoids 'Overfull \hbox' warnings.
Partially reverts commit bf363db.