Skip to content

texlive: provide a working pygmentex executable#75730

Merged
veprbl merged 1 commit intoNixOS:masterfrom
veprbl:pr/texlive_bin_pygmentex
Dec 16, 2019
Merged

texlive: provide a working pygmentex executable#75730
veprbl merged 1 commit intoNixOS:masterfrom
veprbl:pr/texlive_bin_pygmentex

Conversation

@veprbl
Copy link
Member

@veprbl veprbl commented Dec 16, 2019

The old top-level pygmentex package is replaced with an alias.

Motivation for this change

Fixes: #10885
Closes: #55933

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

The old top-level pygmentex package is replaced with an alias.
@veprbl veprbl requested a review from romildo December 16, 2019 00:55
ppl-address-book = throw "deprecated in 2019-05-02: abandoned by upstream.";
processing3 = processing; # added 2019-08-16
procps-ng = procps; # added 2018-06-08
pygmentex = texlive.bin.pygmentex; # added 2019-12-15
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not cover the use case introduced in #56063. Is that ok?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is ok.

What matters is the availability of both the latex package and the python script when compiling a document that uses pygmentex. Until now they were not provided by the same package.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I believe this PR will improve user experience by providing a working python script. However I also care about backward compatibility. The workaround from #10885 is old, simple and expected to be widely used, and the good news is that it should not break with this alias. Supporting the workaround suggested in #56063 would require adding the legacy stuff to texlive.bin.pygmentex, which I would like to avoid.

@ofborg ofborg bot added 6.topic: TeX Issues regarding texlive and TeX in general 8.has: clean-up This PR removes packages or removes other cruft 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Dec 16, 2019
@romildo
Copy link
Contributor

romildo commented Dec 16, 2019

Tested with:

$ nix-shell -p 'with import /alt/nixpkgs {}; (texlive.combine {inherit (texlive) scheme-basic pygmentex mdframed needspace tcolorbox environ trimspaces fancyvrb lm ec caption xcolor l3packages pgf etoolbox efbox;})' --pure --run 'pdflatex test && pygmentex test.snippets && pdflatex test'

test.tex:

\documentclass[a5paper]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{pygmentex}

\begin{document}

\section{C Programming}

This is my first C program:

\begin{pygmented}[lang=c]
#include <stdio.h>

int main(void) {
  printf("Hello, world!\n");
  return 0;
}
\end{pygmented}

\end{document}

Result: test.pdf
Screenshot_2019-12-16_09-44-38

Copy link
Contributor

@romildo romildo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@veprbl veprbl merged commit 7891f3d into NixOS:master Dec 16, 2019
@veprbl veprbl deleted the pr/texlive_bin_pygmentex branch December 1, 2020 16:53
@TredwellGit TredwellGit mentioned this pull request Dec 17, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: TeX Issues regarding texlive and TeX in general 8.has: clean-up This PR removes packages or removes other cruft 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TeXLive pygmentex package has a Python 2 script that does not work

2 participants