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
[alg.min.max] Make lfloor/rfloor delimiters stretchable. #1455
Conversation
Looks like an improvement to me. |
source/algorithms.tex
Outdated
@@ -5190,7 +5190,7 @@ | |||
\pnum | |||
\complexity | |||
At most | |||
$\max(\lfloor{\frac{3}{2}} (N-1)\rfloor, 0)$ | |||
$\max(\left\lfloor{\frac{3}{2}} (N-1)\right\rfloor\mathclose{}, 0)$ |
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.
Why do we need \mathclose{}
?
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.
The best explanation I could find is at https://tex.stackexchange.com/a/2610
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.
What happens if you just use \bigl
, \bigr
? The advantage of those is that they are guaranteed to fit into the line, whereas the stretchable versions may end up taller than a line.
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.
Ah nice, using \bigl and \bigr produces the same result without needing the \mathclose, thanks!
Patch amended.
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.
If you like you can also make the outer round parens big to match. See which one looks better.
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.
Hmm, personally, I like it with the outer parens as-is. Less intimidating. :)
Effect:
Unfortunately, while this stretches the \lfloor/\rfloor nicely, it also seems to introduce some extra space before the comma. Anybody know a trick to avoid that?