[Biopython] Syntax colouring in Biopython Tutorial PDF

Peter Cock p.j.a.cock at googlemail.com
Thu Jun 6 11:02:24 UTC 2019


Thank you everyone who helped with testing this - we didn't
find any cases where the new syntax coloring had downsides.

(A surprising number of PDF viewers do not faithfully preserve
leading spaces on copy-and-paste, which is a problem with
snippets of Python code.)

The next Biopython release will have a prettier PDF tutorial :)

Peter

On Fri, May 17, 2019 at 4:48 PM Peter Cock <p.j.a.cock at googlemail.com> wrote:
>
> Dear Biopythoneers,
>
> As you know, our tutorial is on the website as HTML and PDF here,
> usually updated only with each new release:
>
> http://biopython.org/DIST/docs/tutorial/Tutorial.html
> http://biopython.org/DIST/docs/tutorial/Tutorial.pdf
>
> I'd appreciate a few eyes on this new PDF version of our Tutorial,
>
> https://github.com/biopython/biopython/files/3192136/Tutorial.pdf
>
> Comments on the content are great, but here the changes of interest are
> to use syntax coloring for the Python snippets, Python console snippets
> (the lines starting >>> etc), and the occasional bash console snippets.
>
> I am particularly keen to hear from people using various PDF viewers -
> does it looks fine, and importantly if copy-and-paste works as expected.
> (It seems fine on Apple Preview on macOS)
>
> Specifically, are the quotes, hyphens, and indentation copied as plain
> text suitable for use directly in a Python script or terminal?
>
> (Some approaches may look nice, but have problematic characters,
> or loose the indentation on copy-and-paste)
>
> The relevant pull request is here, comments by email or on GitHub
> are welcome:
>
> https://github.com/biopython/biopython/pull/2068
>
> I know this doesn't add colours to the HTML output (done via hevea),
> but we're looking at moving to Sphinx and perhaps Read-The-Docs -
> more on that at a later date.
>
> Thanks,
>
> Peter


More information about the Biopython mailing list