Skip to content
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

[macros] Make colon in Note: and Example: upright and reduce spacing around brackets #2214

Merged
merged 1 commit into from Jun 29, 2018

Conversation

tkoeppe
Copy link
Contributor

@tkoeppe tkoeppe commented Jun 26, 2018

image

@@ -801,6 +801,7 @@
\end{codeblock}
\end{example}
\begin{note}
\setlength\emergencystretch{1em}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought \setlength was a LaTeX macro which needs some decorations around the arguments, i.e. \setlength{\lengthname}{value_in_specified_unit}.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"some decorators" aren't needed just for the sake of it -- only if the argument consists of more than one token. In this case it doesn't. But I agree that it'd be nicer to keep the braces even in this degenerate case. I'll change it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@tkoeppe
Copy link
Contributor Author

tkoeppe commented Jun 27, 2018

@godbyk: Hi - would you by any chance see a way how we could move the \setlength{\emergencystretch}{1em} into, say, the note environment, or even set it globally? All my attempts to move those length changes away from the lines that immediately need them have failed.

@zygoloid zygoloid merged commit 5188e8a into cplusplus:master Jun 29, 2018
@tkoeppe tkoeppe deleted the uprightcolon branch June 29, 2018 22:57
@godbyk
Copy link
Contributor

godbyk commented Jun 29, 2018

@tkoeppe I think the \emergencystretch would apply to the entire paragraph the note is a part of. We could apply it to the note (and its surrounding paragraph), put the note in its own paragraph and apply it, or apply it globally.

You can also try out the \sloppy and \fussy macros. The former relaxes TeX's typesetting standards a bit to allow for looser line breaking. The latter resets the values to TeX's default. Their default definitions are as follows:

\def\sloppy{%
  \tolerance 9999%
  \emergencystretch 3em%
  \hfuzz .5\p@
  \vfuzz\hfuzz}

\def\fussy{%
  \emergencystretch\z@
  \tolerance 200%
  \hfuzz .1\p@
  \vfuzz\hfuzz}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants