swaroopch / byte-of-python

Beginners book on Python - start here if you don't know programming
https://python.swaroopch.com/
2.32k stars 1.08k forks source link

PDF file formatting #96

Closed IvansNab closed 3 years ago

IvansNab commented 3 years ago

Hello. I am now reading your book as my second book for Python. The book is instructive! I am trying to copy the code from the book's PDF and have problems with formatting when I paste the code into VS Code. Copying the code from your website works correctly. Attach the file from VS Code: function_keyword.zip

Thanks.

swaroopch commented 3 years ago

Hi @IvansNab, unfortunately, that is to be expected from PDF files, at least, that's been my experience. I'm not sure what can be done to improve the situation.

Please let me know if you know any changes that can be done to the configuration of https://github.com/honkit/honkit and/or https://github.com/kovidgoyal/calibre which is what we use for PDF generation. The exact steps are at https://github.com/swaroopch/byte-of-python/blob/master/.github/workflows/main.yml

IvansNab commented 3 years ago

I am a beginner in Python programming so I can unfortunately not help fix it. I have tried copying Python code from other PDF files and code formatting works correctly. I hope that it is possible to correct. Thanks.

swaroopch commented 3 years ago

Closing this since it is not actionable, and a workaround is available (use the website).