diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2023-07-30 13:04:01 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2023-07-30 17:12:53 +0200 |
commit | 587a235e99b57aa10fe49d67eb0df16f0a630a9e (patch) | |
tree | 86349a12a0e10a139687e14ce729cad4346fd3bb | |
parent | ea11dc0cc386d05fa4a081753a7a605142747323 (diff) |
gnu: Add texlive-axodraw2.
* gnu/packages/tex.scm (texlive-axodraw2): New variable.
-rw-r--r-- | gnu/packages/tex.scm | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index f389bca9be..b1c43d9654 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -84,6 +84,7 @@ #:use-module (gnu packages java) #:use-module (gnu packages libreoffice) #:use-module (gnu packages lua) + #:use-module (gnu packages maths) #:use-module (gnu packages multiprecision) #:use-module (gnu packages pdf) #:use-module (gnu packages perl) @@ -1630,6 +1631,65 @@ package tries to put breaks at adequate places. It is suitable for computer-generated long formulae with many terms.") (license license:lppl1.3+))) +(define-public texlive-axodraw2 + (package + (name "texlive-axodraw2") + (version (number->string %texlive-revision)) + (source (texlive-origin + name version + (list "doc/latex/axodraw2/" + "doc/man/man1/axohelp.1" + "doc/man/man1/axohelp.man1.pdf" + "source/latex/axodraw2/" + "tex/latex/axodraw2/") + (base32 + "0x1cskdm3kmf08gdrvgasd1b3l0dri9mdmk13880dz4g2rdgbvi2"))) + (outputs '("out" "doc")) + (build-system texlive-build-system) + (arguments + (list + #:tests? #true + #:phases + #~(modify-phases %standard-phases + ;; TODO: Since we're building "axohelp" from source here, it can be + ;; removed from `texlive-bin' (world rebuild). + (add-after 'unpack 'build-axohelp + (lambda* (#:key tests? #:allow-other-keys) + (with-directory-excursion "source/latex/axodraw2" + ;; Autoreconf. + (invoke "autoreconf" "-vfi") + ;; Configure. + (let ((sh (which "sh"))) + (setenv "CONFIG_SHELL" sh) + (setenv "SHELL" sh) + (invoke sh "configure" (string-append "--prefix=" #$output))) + ;; Build. + (invoke "make") + ;; Tests. + (when tests? + (patch-shebang "axohelp.test") ;Bash script + (invoke "make" "check")) + ;; Install. + (invoke "make" "install"))))))) + (native-inputs (list autoconf automake pkg-config)) + (inputs (list openlibm)) + (home-page "https://ctan.org/pkg/axodraw2") + (synopsis "Feynman diagrams in a LaTeX document") + (description + "This package defines macros for drawing Feynman graphs in LaTeX documents. +It is an important update of the @code{axodraw} package, but since it is not +completely backwards compatible, we have given the style file a changed name. + +Many new features have been added, with new types of line, and much more +flexibility in their properties. In addition, it is now possible to use +@code{axodraw2} with pdfLaTeX, as well as with the LaTeX-dvips method. +However with pdfLaTeX (and also LuaLaTeX and XeLaTeX), an external program, +@command{axohelp}, is used to perform the geometrical calculations needed for +the pdf code inserted in the output file. The processing involves a run of +@command{pdflatex}, a run of @command{axohelp}, and then another run of +@command{pdflatex}.") + (license license:gpl3+))) + (define-public texlive-barr (package (name "texlive-barr") |