wojtask / clrs4e-solutions

Solutions to exercises and problems from "Introduction to Algorithms", Fourth Edition by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein
Creative Commons Attribution 4.0 International
249 stars 39 forks source link

Fix indentation of the proof environment #1572

Closed wojtask closed 1 year ago

wojtask commented 1 year ago

Proof environment is redefined, however, when a proof is the first thing in the solution, the \noindent command applies the negative indentation on top of the same applied by the section configuration. The effect is that the "Proof" label, as well as the section label, are moved a bit to the left. (See example in C.5-2.)

Also, find a proper way to apply a vertical skip after the proof, so there is no need to put it explicitly after the proof last paragraph.

wojtask commented 1 year ago

Proof environment redefined according to amsthm recommendations. The indentation is fixed, but the first proof in a section has a vertical skip, similar to dispay styles that start a section, see: #1565

wojtask commented 1 year ago

Fixed by wrapping the proof in a minipage. The disadvantage of such solution is the fact that minipage is a single box that can't be split into multiple pages in case it ends up in a bottom of a page.