olivierverdier / python-latex-highlighting

LaTeX style for Python highlighting
BSD 3-Clause "New" or "Revised" License
455 stars 125 forks source link

Is this repository up-to-date? #7

Closed sblondon closed 7 months ago

sblondon commented 6 years ago

The date included in pythonhighlight.sty is 2011/09/19:

\ProvidesPackage{pythonhighlight}[2011/09/19

However in the texlive-science package provided by Debian, pythonhighlight.sty is 2017.

% Copyright 2009--2017 by Olivier Verdier [...] \ProvidesPackage{pythonhighlight}[2017/02/09

Is this repository the canonical one? Should I use another one?

debian package info: https://packages.debian.org/buster/texlive-science

sblondon commented 6 years ago

Comparing the two files with diff, the only differences are in the header so there are no real differences. It still would be nice to update this repository if possible.

jansenicus commented 6 years ago

I like this latex style package and I wonder if a placement specifier, caption and label of the listing could also be added.

\begin{python}[caption={'A colorful Python code'}, label=lst:nicecode]

    for i, x in enumerate(some_list):
       print(str(i), str(x**2))

\end{python}

Those caption and label will serve as an entry in 'List of Codes' just like list of figures, or list of tables.

sblondon commented 6 years ago

@jansenicus I'm not sure this package is still maintained. Someone talks to me about minted package to highlight code in latex: https://github.com/gpoore/minted A lot of languages are available because minted uses pygments. I don't know if caption or label are implemented.

For info, it's available in Debian in the texlive-latex-extra package (like this library).