From 4d20036dd673d68d6f028293191e9c9bf829e0e6 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Tue, 29 Aug 2023 15:54:19 +0200
Subject: [PATCH] gnu: Add texlive-listing.

* gnu/packages/tex.scm (texlive-listing): New variable.
---
 gnu/packages/tex.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 6e2c50c80a..063c03f473 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -87270,6 +87270,29 @@ provided as a LaTeX package.  The interpreter static scoping, dynamic typing,
 and eager evaluation.")
     (license license:bsd-2)))
 
+(define-public texlive-listing
+  (package
+    (name "texlive-listing")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/listing/" "tex/latex/listing/")
+             (base32
+              "0f74bff3dk9v316hznjqnlfljkbbdshqj3s8b4arvf2jipg96npd")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/listing")
+    (synopsis "Produce formatted program listings")
+    (description
+     "The @code{listing} environment is provided and is similar to figure and
+table, although it is not a floating environment.  Includes support for
+@code{\\caption}, @code{\\label}, @code{\\ref}, and introduces
+@code{\\listoflistings}, @code{\\listingname}, @code{\\listlistingname}.  It
+produces a @file{.lol} file.  It does not change
+@code{\\@@makecaption} (unless the option @code{bigcaptions} is used), so
+packages that change the layout of @code{\\caption} still work.")
+    (license license:lppl)))
+
 ;;;
 ;;; Avoid adding new packages to the end of this file. To reduce the chances
 ;;; of a merge conflict, place them above by existing packages with similar