aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2023-07-13 09:39:23 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2023-07-18 18:17:38 +0200
commit453c307e2fa0c1d31f2ea6a4e4af0bd3dd655bee (patch)
tree8f93d565322ceddd5133006c68760507f9477963 /gnu/packages
parent79272bedc17dfabdc7c8ef9ce71aa9d3506530c7 (diff)
downloadguix-453c307e2fa0c1d31f2ea6a4e4af0bd3dd655bee.tar.gz
guix-453c307e2fa0c1d31f2ea6a4e4af0bd3dd655bee.zip
gnu: Add texlive-pythontex.
* gnu/packages/tex.scm (texlive-pythontex): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/tex.scm36
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 6baafeb931..73a8c6e14b 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -13253,6 +13253,42 @@ your Python code to be executed and the output to be integrated in your LaTeX
file in a single compilation run.")
(license (list license:expat license:lppl1.3c))))
+(define-public texlive-pythontex
+ (package
+ (name "texlive-pythontex")
+ (version (number->string %texlive-revision))
+ (source (texlive-origin
+ name version
+ (list "doc/latex/pythontex/" "scripts/pythontex/"
+ "source/latex/pythontex/"
+ "tex/latex/pythontex/")
+ (base32
+ "161kyk3sg7fnp9wxjmb1c9xbw0az0dxw2izipdyz0378ciqhqjfw")))
+ (outputs '("out" "doc"))
+ (build-system texlive-build-system)
+ (arguments (list #:link-scripts #~(list "depythontex.py" "pythontex.py")))
+ (inputs (list python))
+ (home-page "https://ctan.org/pkg/pythontex")
+ (synopsis "Run Python from within a document, typesetting the results")
+ (description
+ "The package allows you to enter Python code within a LaTeX document,
+execute the code, and access its output in the original document. There is
+also support for Bash, JavaScript, Julia, Octave, Perl, R, Raku (Perl 6),
+Ruby, Rust, and SageMath. Code is only executed when it has been modified, or
+when it meets user-specified criteria. Code may be divided into user-defined
+sessions, which automatically run in parallel. Errors and warnings are
+synchronized with the LaTeX document, so that they refer to the document's
+line numbers. External dependencies can be tracked, so that code is
+re-executed when the data it depends on is modified. PythonTeX also provides
+syntax highlighting for code in LaTeX documents via the Pygments syntax
+highlighter.
+
+The package also provides a @command{depythontex} utility. This creates
+a copy of the document in which all Python code has been replaced by its
+output. This is useful for journal submissions, sharing documents, and
+conversion to other formats.")
+ (license license:lppl1.3+)))
+
(define-public texlive-koma-script
(package
(name "texlive-koma-script")