mdipierro / nlib

The book "Annotated Algorithms in Python" and the nlib.py library
1.33k stars 115 forks source link

Whitespace around equations and table style #23

Open typesanitizer opened 7 years ago

typesanitizer commented 7 years ago

Several equations and align environments have additional newlines before and/or after them. If one makes the following substitutions to comment out those newlines: \n\n\begin{equation} -> \n%\n\begin{equation}, \end{equation}\n\n -> \end{equation}%\n\n (and similarly for align and alignat) -- commenting out the newlines prevents additional whitespace but keeps the source readable -- then the whitespace is reduced significantly:

ex6-comb

On making these changes, the book becomes 384 pages long instead of 388 pages.

Also, there is a \usepackage{booktabs} in the preamble but the tables drawn do not follow the booktabs manual; lots of horizontal and vertical lines are used. Here's what a table edited according to the booktabs style looks like compared to one of the current tables:

ex7-new

I will submit a PR if you like the suggested changes.

typesanitizer commented 7 years ago

@mdipierro, thoughts on this? Should I submit a PR or do you prefer the current style?

mdipierro commented 7 years ago

I would appreciate removing the extra spaces. I like the first table style over the second. Thanks for your help.