r/Python•
Volkenborn

For those who like to read .pdfs, I have converted PEP8 to a .tex file and compiled it

I am still learning Python and find the PEPs quite useful. To be honest, I prefer to read compactly written pdfs - they are more printer friendly than pure webpages written in HTML. Therefore today I have rewritten PEP8 as a (nicer) LaTeX file and compiled it, results are available at https://github.com/remigiusz-suwalski/pep-pdf/blob/master/pep-008.pdf

The outcome isn't perfect, I need to break somehow columns before each code snippet containing longer lines of text and learn to efficiently use releases at GitHub. However, I published the sources as well, so everyone willing to help me can do so by sending a pull request.

My plan is to continue this converting process (PEP 20, 257, 3099 and so on) after the first document will start to look pleasent to the eyes.

Posted May 4, 2017, 9:09 PM UTC · edited

77
nonstereotypable•

That is dang pretty!

3
Liorithiel•

Try making the code font smaller. Monospace fonts have in general better legibility, so it's fine to make them a notch or two smaller, and then you will need less horizontal space too. Besides, even now they are visually larger than normal text.

2
VolkenbornOP•

This has been fixed in the latest commit, which disables word breaking. By the way, I had to split few single-line comments but hadn't changed anything else to stay faithful with the original documentation.

1
bhat•

A different solution to the readability problem is Kenneth Reitz's http://pep8.org/

1
tunisia3507•

That comment font needs to fucking go.

3
Mini_True•

Did you typeset this by hand or did you use something like pandoc for the rst->LaTeX->(pdf) part?

1
VolkenbornOP•

The truth lies somewhere in the middle: I took the restructured text, transformed it a bit with pure Python and fixed minor bugs with Sublime, which turned out to be very fast (and definitely faster than writing a code automating the Sublime part).

1