summary refs log tree commit diff
path: root/gnu/packages/tex.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/tex.scm')
-rw-r--r--gnu/packages/tex.scm36993
1 files changed, 26585 insertions, 10408 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 65f8d901d7..a13582d02d 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;; Copyright © 2020, 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
 ;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021-2023 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
 ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
@@ -76,9 +77,11 @@
   #:use-module (gnu packages gd)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages java)
   #:use-module (gnu packages libreoffice)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages multiprecision)
@@ -86,11 +89,14 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages plotutils)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages readline)
   #:use-module (gnu packages ruby)
   #:use-module (gnu packages shells)
+  #:use-module (gnu packages tcl)
   #:use-module (gnu packages base)
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages web)
@@ -102,501 +108,691 @@
   #:use-module (ice-9 match)
   #:use-module ((srfi srfi-1) #:hide (zip)))
 
-(define* (simple-texlive-package name locations hash
-                                 #:key trivial?)
-  "Return a template for a simple TeX Live package with the given NAME,
-downloading from a list of LOCATIONS in the TeX Live repository, and expecting
-the provided output HASH.  If TRIVIAL? is provided, all files will simply be
-copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used."
-  (define with-documentation?
-    (and trivial?
-         (any (lambda (location)
-                (string-prefix? "/doc" location))
-              locations)))
-  (package
-    (name name)
-    (version (number->string %texlive-revision))
-    (source (texlive-origin name version
-                            locations hash))
-    (outputs (if with-documentation?
-                 '("out" "doc")
-                 '("out")))
-    (build-system (if trivial?
-                      gnu-build-system
-                      texlive-build-system))
-    (arguments
-     (let ((copy-files
-            `(lambda* (#:key outputs inputs #:allow-other-keys)
-               (let (,@(if with-documentation?
-                           `((doc (string-append (assoc-ref outputs "doc")
-                                                 "/share/texmf-dist/")))
-                           '())
-                     (out (string-append (assoc-ref outputs "out")
-                                         "/share/texmf-dist/")))
-                 ,@(if with-documentation?
-                       '((mkdir-p doc)
-                         (copy-recursively
-                          (string-append (assoc-ref inputs "source") "/doc")
-                          (string-append doc "/doc")))
-                       '())
-                 (mkdir-p out)
-                 (copy-recursively "." out)
-                 ,@(if with-documentation?
-                       '((delete-file-recursively (string-append out "/doc")))
-                       '())
-                 #t))))
-       (if trivial?
-           `(#:tests? #f
-             #:phases
-             (modify-phases %standard-phases
-               (delete 'configure)
-               (replace 'build (const #t))
-               (replace 'install ,copy-files)))
-           `(#:phases
-             (modify-phases %standard-phases
-               (add-after 'install 'copy-files ,copy-files))))))
-    (home-page #f)
-    (synopsis #f)
-    (description #f)
-    (license #f)))
-
-(define hyph-utf8-scripts
-  (origin
-    (method svn-fetch)
-    (uri (texlive-ref "generic" "hyph-utf8"))
-    (file-name (string-append "hyph-utf8-scripts-"
-                              (number->string %texlive-revision)
-                              "-checkout"))
-    (patches (search-patches "texlive-hyph-utf8-no-byebug.patch"))
-    (sha256
-     (base32
-      "04xzf5gr3ylyh3ls09imrx4mwq3qp1k97r9njzlan6hlff875rx2"))))
-
-(define (texlive-hyphen-package name code locations hash)
-  "Return a TeX Live hyphenation package with the given NAME, using source
-files from LOCATIONS with expected checksum HASH.  CODE is not currently in use."
-  (let ((parent (simple-texlive-package
-                 name locations hash #:trivial? #t)))
-    (package
-      (inherit parent)
-      (arguments
-       (substitute-keyword-arguments (package-arguments parent)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (replace 'build
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (let* ((out (assoc-ref outputs "out"))
-                        (root (string-append out "/share/texmf-dist"))
-                        (patterns
-                         (string-append root "/tex/generic/hyph-utf8/patterns/txt/"))
-                        (loaders
-                         (string-append root "/tex/generic/hyph-utf8/loadhyph"))
-                        (ptex
-                         (string-append root "/tex/generic/hyph-utf8/patterns/ptex"))
-                        (quote
-                         (string-append root "/tex/generic/hyph-utf8/patterns/quote")))
-                   (mkdir "scripts")
-                   (copy-recursively
-                    (dirname (search-input-file inputs "hyph-utf8.rb"))
-                    "scripts")
-
-                   ;; Prepare target directories
-                   (mkdir-p patterns)
-                   (mkdir-p loaders)
-                   (mkdir-p ptex)
-                   (mkdir-p quote)
-
-                   ;; Generate plain patterns
-                   (with-directory-excursion "scripts"
-                     (substitute* "lib/tex/hyphen/path.rb"
-                       (("^([[:blank:]]+)TeXROOT = .*" _ indent)
-                        (string-append indent "TeXROOT = \""
-                                       (getcwd) "/..\"\n")))
-
-                     (substitute* "generate-plain-patterns.rb"
-                       ;; Ruby 2 does not need this.
-                       (("require 'unicode'") "")
-                       ;; Write directly to the output directory
-                       (("File\\.join\\(PATH::TXT")
-                        (string-append "File.join(\"" patterns "\""))
-                       (("File\\.join\\(PATH::QUOTE")
-                        (string-append "File.join(\"" quote "\"")))
-                     (invoke "ruby" "generate-plain-patterns.rb")
-
-                     ;; Build pattern loaders
-                     (substitute* "generate-pattern-loaders.rb"
-                       (("File\\.join\\(PATH::LOADER")
-                        (string-append "File.join(\"" loaders "\"")))
-
-                     (invoke "ruby" "generate-pattern-loaders.rb")
-
-                     ;; Build ptex patterns
-                     (substitute* "generate-ptex-patterns.rb"
-                       (("File\\.join\\(PATH::PTEX")
-                        (string-append "File.join(\"" ptex "\"")))
-                     (invoke "ruby" "generate-ptex-patterns.rb")))))))))
-      (native-inputs
-       (list ruby-2.7 ruby-hydra-minimal/pinned hyph-utf8-scripts))
-      (home-page "https://ctan.org/pkg/hyph-utf8"))))
-
-(define texlive-extra-src
-  (origin
-    (method url-fetch)
-    (uri "ftp://tug.org/historic/systems/texlive/2021/texlive-20210325-extra.tar.xz")
-    (sha256 (base32
-             "171kg1n9zapw3d2g47d8l0cywa99bl9m54xkqvp9625ks22z78s6"))))
-
-(define texlive-texmf-src
-  (origin
-    (method url-fetch)
-    (uri "ftp://tug.org/historic/systems/texlive/2021/texlive-20210325-texmf.tar.xz")
-    (sha256 (base32
-             "070gczcm1h9rx29w2f02xd3nhd84c4k28nfmm8qgp69yq8vd84pz"))))
+;;; Commentary:
+;;;
+;;; This module aims at being as faithful as possible to TeX Live
+;;; distribution.  Yet, some of the packages in this module are Guix specific.
+;;; The following paragraphs describe them.
+;;;
+;;; Guix provides two different TeX Live systems: one monolithic, the TEXLIVE
+;;; package, and the other modular.  Both are built from TEXLIVE-LIBKPATHSEA,
+;;; which is therefore the starting of any TeX Live update.  Both also rely on
+;;; TEXLIVE-SCRIPTS, which contains core scripts and related files---although
+;;; monolithic TeX Live only makes use of its source.  At that point, both
+;;; systems diverge.
+;;;
+;;; On the one hand, the monolithic TeX Live merges TEXLIVE-BIN-FULL and
+;;; TEXLIVE-TEXMF in order to create TEXLIVE.
+;;;
+;;; On the other hand, modular TeX Live relies on TEXLIVE-BIN, which is
+;;; provided as a mandatory native input in the texlive build system.  Unlike
+;;; TEXLIVE-BIN-FULL, it doesn't provide any script (but still include all the
+;;; binaries; this might change in the future).  Then the system builds its
+;;; way towards regular `texlive-latex-bin' package, which is a convenient
+;;; native input (that can be ignored) for most TeX Live packages.  Those
+;;; earlier in the build chain need the TEXLIVE-DOCSTRIP package to still be
+;;; able to generate their runfiles.
+;;;
+;;; Default font map files are updated in a profile hook (see
+;;; `texlive-font-maps' in "profiles.scm").  However, this option is not
+;;; available when building documentation for a package.  Consequently, this
+;;; module also provides TEXLIVE-UPDMAP.CFG function, which creates a TeX Live
+;;; tree with font map files updates.  It should be used exclusively for
+;;; package definitions, as a native input.  It is possible to augment that
+;;; tree, in particular with additional font packages.
+;;;
+;;; Unlike font map files, TeX formats are not built from a profile hook, as
+;;; the process would be too time-consuming, e.g., when invoking "guix shell".
+;;; Instead, those are generated when the corresponding package is built.  It
+;;; is therefore not possible for the build system to take into consideration
+;;; hyphenation rules installed after a given format has been built.  To work
+;;; around this, all hyphenations rules are packed into
+;;; TEXLIVE-HYPHEN-COMPLETE, and all formats, being built with it, include all
+;;; rules right from the start.
+;;;
+;;; Any other "texlive-name" package matches the "name" TeX Live package, as
+;;; defined in the "texlive.tlpdb" file.
+;;;
+;;; Code:
 
-(define-public texlive-bin
+(define-syntax-rule (define-deprecated-package old-name name)
+  "Define OLD-NAME as a deprecated package alias for NAME."
+  (define-deprecated/public old-name name
+    (deprecated-package (symbol->string 'old-name) name)))
+
+(define-public texlive-libkpathsea
   (package
-    (name "texlive-bin")
-    (version "20210325")
+    (name "texlive-libkpathsea")
+    (version "20230313")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "ftp://tug.org/historic/systems/texlive/2021/"
-                           "texlive-" version "-source.tar.xz"))
+       (uri (string-append "ftp://tug.org/historic/systems/texlive/"
+                           (string-take version 4)
+                           "/texlive-" version "-source.tar.xz"))
        (sha256
         (base32
-         "0jsq1p66l46k2qq0gbqmx25flj2nprsz4wrd1ybn286p11kdkvvs"))
+         "1fbrkv7g9j6ipmwjx27l8l9l974rmply8bhf7c2iqc6h3q7aly1q"))
        (modules '((guix build utils)
                   (ice-9 ftw)))
        (snippet
-        ;; TODO: Unbundle stuff in texk/dvisvgm/dvisvgm-src/libs too.
-        '(with-directory-excursion "libs"
-           (let ((preserved-directories '("." ".." "lua53" "luajit" "pplib" "xpdf")))
-             ;; Delete bundled software, except Lua which cannot easily be
-             ;; used as an external dependency, pplib and xpdf which aren't
-             ;; supported as system libraries (see m4/kpse-xpdf-flags.m4).
-             (for-each delete-file-recursively
-                       (scandir "."
-                                (lambda (file)
-                                  (and (not (member file preserved-directories))
-                                       (eq? 'directory (stat:type (stat file))))))))))))
+        #~(begin
+            (with-directory-excursion "libs"
+              (for-each
+               delete-file-recursively
+               (scandir "."
+                        (lambda (file)
+                          (and (not (member file '("." "..")))
+                               (eq? 'directory (stat:type (stat file))))))))
+            (with-directory-excursion "texk"
+              (let ((preserved-directories '("." ".." "kpathsea")))
+                (for-each
+                 delete-file-recursively
+                 (scandir "."
+                          (lambda (file)
+                            (and (not (member file preserved-directories))
+                                 (eq? 'directory (stat:type (stat file)))))))))))))
     (build-system gnu-build-system)
-    (inputs
-     `(("texlive-extra-src" ,texlive-extra-src)
-       ("config" ,config)
-       ("texlive-scripts"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/scripts/texlive"))
-                 (revision %texlive-revision)))
-           (file-name (string-append "texlive-scripts-"
-                                     (number->string %texlive-revision)
-                                     "-checkout"))
-           (sha256
-            (base32
-             "1jrphfjhmw17rp1yqsl70shmvka3vg0g8841q6zx2lfn48p7vqf3"))))
-       ("cairo" ,cairo)
-       ("fontconfig" ,fontconfig)
-       ("fontforge" ,fontforge)
-       ("freetype" ,freetype)
-       ("gd" ,gd)
-       ("gmp" ,gmp)
-       ("ghostscript" ,ghostscript)
-       ("graphite2" ,graphite2)
-       ("harfbuzz" ,harfbuzz)
-       ("icu4c" ,icu4c)
-       ("libpaper" ,libpaper)
-       ("libpng" ,libpng)
-       ("libxaw" ,libxaw)
-       ("libxt" ,libxt)
-       ("mpfr" ,mpfr)
-       ("perl" ,perl)
-       ("pixman" ,pixman)
-       ("potrace" ,potrace)
-       ("python" ,python)
-       ("ruby" ,ruby-2.7)
-       ("tcsh" ,tcsh)
-       ("teckit" ,teckit)
-       ("zlib" ,zlib)
-       ("zziplib" ,zziplib)))
+    (arguments
+     (list
+      #:out-of-source? #t
+      #:configure-flags
+      #~(list "--disable-static"
+              "--disable-native-texlive-build"
+              "--enable-shared"
+              "--with-banner-add=/GNU Guix"
+              "--disable-all-pkgs"
+              "--enable-kpathsea")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'customize-texmf.cnf
+            ;; The default "texmf.cnf" file is provided by this package.
+            ;; Every variable of interest is set relatively to the GUIX_TEXMF
+            ;; environment variable defined via a search path below.
+            ;;
+            ;; This phase must happen before the `configure' phase, because
+            ;; the value of the TEXMFCNF variable (modified along with the
+            ;; SELFAUTOLOC reference below) is used at compile time to
+            ;; generate "paths.h" file.
+            (lambda _
+              (substitute* "texk/kpathsea/texmf.cnf"
+                (("^TEXMFROOT = .*")
+                 "TEXMFROOT = {$GUIX_TEXMF}/..\n")
+                (("^TEXMF = .*")
+                 "TEXMF = {$GUIX_TEXMF}\n")
+                (("\\$SELFAUTOLOC(/share/texmf-dist/web2c)" _ suffix)
+                 (string-append #$output suffix))
+                ;; Don't truncate lines.
+                (("^error_line = .*$") "error_line = 254\n")
+                (("^half_error_line = .*$") "half_error_line = 238\n")
+                (("^max_print_line = .*$") "max_print_line = 1000\n"))))
+          (add-after 'unpack 'patch-directory-traversal
+            ;; When ST_NLINK_TRICK is set, kpathsea attempts to avoid work
+            ;; when searching files by assuming that a directory with exactly
+            ;; two links has no subdirectories.  This assumption does not hold
+            ;; in our case, so some directories with symlinked sub-directories
+            ;; would not be traversed.
+            (lambda _
+              (substitute* "texk/kpathsea/config.h"
+                (("#define ST_NLINK_TRICK") ""))))
+          (add-after 'install 'post-install
+            (lambda _
+              (with-directory-excursion "texk/kpathsea"
+                (invoke "make" "install")))))))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "GUIX_TEXMF")
+            (files '("share/texmf-dist")))))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "Path searching library")
+    (description
+     "Kpathsea is a library whose purpose is to return a filename from a list
+of user-specified directories similar to how shells look up executables.")
+    (license license:lgpl2.1)))
+
+(define-public texlive-scripts
+  (package
+    (name "texlive-scripts")
+    (version (number->string %texlive-revision))
+    ;; We cannot use `texlive-origin' because its locations start out in
+    ;; "texmf-dist" directory which is one level below "tlpkg" that we also
+    ;; need to pull here.
+    (source (origin
+              (method svn-multi-fetch)
+              (uri (svn-multi-reference
+                    (url (string-append "svn://www.tug.org/texlive/tags/"
+                                        %texlive-tag "/Master/"))
+                    (locations
+                     (list "texmf-dist/doc/man/man1/fmtutil-sys.1"
+                           "texmf-dist/doc/man/man1/fmtutil-sys.man1.pdf"
+                           "texmf-dist/doc/man/man1/fmtutil-user.1"
+                           "texmf-dist/doc/man/man1/fmtutil-user.man1.pdf"
+                           "texmf-dist/doc/man/man1/fmtutil.1"
+                           "texmf-dist/doc/man/man1/fmtutil.man1.pdf"
+                           "texmf-dist/doc/man/man1/install-tl.1"
+                           "texmf-dist/doc/man/man1/install-tl.man1.pdf"
+                           "texmf-dist/doc/man/man1/mktexfmt.1"
+                           "texmf-dist/doc/man/man1/mktexfmt.man1.pdf"
+                           "texmf-dist/doc/man/man1/mktexlsr.1"
+                           "texmf-dist/doc/man/man1/mktexlsr.man1.pdf"
+                           "texmf-dist/doc/man/man1/mktexmf.1"
+                           "texmf-dist/doc/man/man1/mktexmf.man1.pdf"
+                           "texmf-dist/doc/man/man1/mktexpk.1"
+                           "texmf-dist/doc/man/man1/mktexpk.man1.pdf"
+                           "texmf-dist/doc/man/man1/mktextfm.1"
+                           "texmf-dist/doc/man/man1/mktextfm.man1.pdf"
+                           "texmf-dist/doc/man/man1/texhash.1"
+                           "texmf-dist/doc/man/man1/texhash.man1.pdf"
+                           "texmf-dist/doc/man/man1/tlmgr.1"
+                           "texmf-dist/doc/man/man1/tlmgr.man1.pdf"
+                           "texmf-dist/doc/man/man1/updmap-sys.1"
+                           "texmf-dist/doc/man/man1/updmap-sys.man1.pdf"
+                           "texmf-dist/doc/man/man1/updmap-user.1"
+                           "texmf-dist/doc/man/man1/updmap-user.man1.pdf"
+                           "texmf-dist/doc/man/man1/updmap.1"
+                           "texmf-dist/doc/man/man1/updmap.man1.pdf"
+                           "texmf-dist/doc/man/man5/fmtutil.cnf.5"
+                           "texmf-dist/doc/man/man5/fmtutil.cnf.man5.pdf"
+                           "texmf-dist/doc/man/man5/updmap.cfg.5"
+                           "texmf-dist/doc/man/man5/updmap.cfg.man5.pdf"
+                           "texmf-dist/dvips/tetex/"
+                           "texmf-dist/fonts/enc/dvips/tetex/"
+                           "texmf-dist/fonts/map/dvips/tetex/"
+                           "texmf-dist/scripts/texlive/fmtutil-sys.sh"
+                           "texmf-dist/scripts/texlive/fmtutil-user.sh"
+                           "texmf-dist/scripts/texlive/fmtutil.pl"
+                           "texmf-dist/scripts/texlive/mktexlsr.pl"
+                           "texmf-dist/scripts/texlive/mktexmf"
+                           "texmf-dist/scripts/texlive/mktexpk"
+                           "texmf-dist/scripts/texlive/mktextfm"
+                           "texmf-dist/scripts/texlive/tlmgr.pl"
+                           "texmf-dist/scripts/texlive/updmap-sys.sh"
+                           "texmf-dist/scripts/texlive/updmap-user.sh"
+                           "texmf-dist/scripts/texlive/updmap.pl"
+                           "texmf-dist/web2c/fmtutil-hdr.cnf"
+                           "texmf-dist/web2c/updmap-hdr.cfg"
+                           "texmf-dist/web2c/updmap.cfg"
+                           "tlpkg/gpg/"
+                           "tlpkg/installer/config.guess"
+                           "tlpkg/installer/curl/curl-ca-bundle.crt"
+                           "tlpkg/TeXLive/"
+                           "tlpkg/texlive.tlpdb"))
+                    (revision %texlive-revision)))
+              (sha256
+               "0sqbg5kjpzkpm1fq2c9hpf4f21bvjs3xas944dlbqp44lsqhcmsk")))
+    (outputs '("out" "doc"))
+    (build-system copy-build-system)
+    (arguments
+     (list
+      #:imported-modules `(,@%copy-build-system-modules
+                           (guix build texlive-build-system)
+                           (guix build union))
+      #:modules '((guix build copy-build-system)
+                  ((guix build texlive-build-system) #:prefix tex:)
+                  (guix build utils))
+      #:install-plan
+      #~'(("texmf-dist/dvips/"   "share/texmf-dist/dvips")
+          ("texmf-dist/fonts/"   "share/texmf-dist/fonts")
+          ("texmf-dist/scripts/" "share/texmf-dist/scripts")
+          ("texmf-dist/web2c/"   "share/texmf-dist/web2c")
+          ("tlpkg/"              "share/tlpkg"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-scripts
+            (lambda _
+              ;; First patch shell scripts with ".sh" extension.
+              (with-directory-excursion "texmf-dist"
+                ((assoc-ref tex:%standard-phases 'patch-shell-scripts)))
+              ;; Then patch scripts without such extension.
+              (let ((dirs (map (compose dirname which)
+                               (list "awk" "cat" "grep" "sed"))))
+                (substitute*
+                    (find-files "texmf-dist/scripts/" "^mktex(mf|pk|tfm)$")
+                  (("^version=" m)
+                   (format #false "PATH=\"~{~a:~}$PATH\"; export PATH~%~a"
+                           dirs m))))
+              ;; Make sure that fmtutil can find its Perl modules.
+              (substitute* "texmf-dist/scripts/texlive/fmtutil.pl"
+                (("\\$TEXMFROOT/")
+                 (string-append #$output "/share/")))
+              ;; Likewise for updmap.pl.
+              (substitute* "texmf-dist/scripts/texlive/updmap.pl"
+                (("\\$TEXMFROOT/tlpkg")
+                 (string-append #$output "/share/tlpkg")))
+              ;; Likewise for the tlmgr.
+              (substitute* "texmf-dist/scripts/texlive/tlmgr.pl"
+                ((".*\\$::installerdir = \\$Master.*" all)
+                 (format #f "  $Master = ~s;~%~a"
+                         (string-append #$output "/share")
+                         all)))))
+          (add-after 'unpack 'fix-fmtutil
+            ;; The line below generates an error when running "fmtutil".
+            (lambda _
+              (substitute* "texmf-dist/scripts/texlive/fmtutil.pl"
+                (("require TeXLive::TLWinGoo if .*") ""))))
+          (add-after 'install 'install-doc
+            (lambda _
+              (let ((doc (string-append #$output:doc "/share/texmf-dist/doc")))
+                (mkdir-p doc)
+                (copy-recursively "texmf-dist/doc/" doc))))
+          (add-after 'install-doc 'link-scripts
+            (lambda* (#:key outputs #:allow-other-keys)
+              (with-directory-excursion "texmf-dist"
+                (apply (assoc-ref tex:%standard-phases 'link-scripts)
+                       (list #:outputs outputs
+                             #:link-scripts
+                             (find-files "scripts")))))))))
+    (inputs (list perl))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "TeX Live infrastructure programs")
+    (description
+     "This package provides core TeX Live scripts such as @code{updmap},
+@code{fmtutil}, and @code{tlmgr}.  It is is automatically installed alongside
+@code{texlive-bin}.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-public texlive-hyphen-complete
+  (package
+    (name "texlive-hyphen-complete")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/dehyph-exptl/"
+                   "doc/generic/elhyphen"
+                   "doc/generic/huhyphen"
+                   "doc/generic/hyph-utf8/"
+                   "doc/luatex/hyph-utf8/"
+                   "doc/generic/ukrhyph/"
+                   "source/generic/hyph-utf8/"
+                   "source/luatex/hyph-utf8/"
+                   "source/generic/ruhyphen/"
+                   "tex/generic/config/"
+                   "tex/generic/dehyph/"
+                   "tex/generic/dehyph-exptl/"
+                   "tex/generic/hyph-utf8/"
+                   "tex/generic/hyphen/"
+                   "tex/generic/ruhyphen/"
+                   "tex/generic/ukrhyph/"
+                   "tex/luatex/hyph-utf8/")
+             (base32
+              "1vzv92jvmnnga1xz5vrv8i6cy0dvrrly5x9nfrfzshlkm9bi3g4c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:texlive-latex-bin? #f
+      #:tex-engine "tex"
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'remove-ruby-byebug-dependency
+            ;; Avoid dependency on byebug to reduce package closure
+            ;; significantly, see <https://issues.guix.gnu.org/55997>.
+            (lambda _
+              (substitute* "source/generic/hyph-utf8/lib/tex/hyphen/language.rb"
+                (("require 'byebug'") ""))))
+          (add-before 'build 'regenerate-converters
+            (lambda _
+              (let ((root (getcwd)))
+                (for-each delete-file
+                          (find-files "tex/generic/hyph-utf8/conversions/"))
+                (with-directory-excursion "source/generic/hyph-utf8"
+                  (substitute* "generate-converters.rb"
+                    (("\\$path_root=File.*")
+                     (string-append "$path_root=\"" root "\"\n"))
+                    ;; Avoid error with newer Ruby.
+                    (("#1\\{%") "#1{%%"))
+                  (invoke "ruby" "generate-converters.rb")))))
+          (add-before 'build 'regenerate-patterns
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let* ((root (getcwd))
+                     (hyph-utf8 (string-append root "/tex/generic/hyph-utf8"))
+                     (loaders (string-append hyph-utf8 "/loadhyph"))
+                     (patterns (string-append hyph-utf8 "/patterns/txt"))
+                     (ptex (string-append hyph-utf8 "/patterns/ptex"))
+                     (quote (string-append hyph-utf8 "/patterns/quote")))
+                ;; Initial clean-up.  Some files are not generated and need to
+                ;; be preserved.
+                (for-each delete-file (find-files loaders))
+                (let ((preserved (list "hyph-sr-cyrl.hyp.txt"
+                                       "hyph-sr-cyrl.pat.txt"
+                                       "hyph-de-1901.ec.tex"
+                                       "hyph-de-1996.ec.tex"
+                                       "hyph-ru.t2a.tex"
+                                       "hyph-uk.t2a.tex"
+                                       "hyph-zh-latn-pinyin.ec.tex")))
+                  (for-each
+                   (lambda (directory)
+                     (for-each delete-file
+                               (find-files directory
+                                           (lambda (f _)
+                                             (not (member (basename f)
+                                                          preserved))))))
+                   (list patterns ptex quote)))
+                ;; Generate plain patterns.  Write to the local directory.
+                ;; Install phase will take care of moving the files to the
+                ;; output.
+                (with-directory-excursion "source/generic/hyph-utf8/"
+                  (substitute* "lib/tex/hyphen/path.rb"
+                    (("^([[:blank:]]+)TeXROOT = .*" _ indent)
+                     (string-append indent "TeXROOT = \"" root "\"\n")))
+                  (substitute* "generate-plain-patterns.rb"
+                    ;; Ruby 2 does not need this.
+                    (("require 'unicode'") "")
+                    (("File\\.join\\(PATH::TXT")
+                     (string-append "File.join(\"" patterns "\""))
+                    (("File\\.join\\(PATH::QUOTE")
+                     (string-append "File.join(\"" quote "\"")))
+                  (invoke "ruby" "generate-plain-patterns.rb")
+                  ;; Build pattern loaders.
+                  (substitute* "generate-pattern-loaders.rb"
+                    (("File\\.join\\(PATH::LOADER")
+                     (string-append "File.join(\"" loaders "\"")))
+                  (invoke "ruby" "generate-pattern-loaders.rb")
+                  ;; Build ptex patterns.
+                  (substitute* "generate-ptex-patterns.rb"
+                    (("File\\.join\\(PATH::PTEX")
+                     (string-append "File.join(\"" ptex "\"")))
+                  (invoke "ruby" "generate-ptex-patterns.rb"))))))))
     (native-inputs
-     (list pkg-config))
+     (list ruby-2.7
+           ruby-hydra-minimal/pinned
+           texlive-docstrip
+           texlive-tex))
+    (home-page "https://ctan.org/pkg/hyph-utf8")
+    (synopsis "Hyphenation patterns expressed in UTF-8")
+    (description
+     "Modern native UTF-8 engines such as XeTeX and LuaTeX need hyphenation
+patterns in UTF-8 format, whereas older systems require hyphenation patterns
+in the 8-bit encoding of the font in use (such encodings are codified in the
+LaTeX scheme with names like OT1, T2A, TS1, OML, LY1, etc).  The present
+package offers a collection of conversions of existing patterns to UTF-8
+format, together with converters for use with 8-bit fonts in older systems.
+
+This Guix-specific package provides hyphenation patterns for all languages
+supported in TeX Live.  It is a strict super-set of code{hyphen-base} package
+and should be preferred to it whenever a package would otherwise depend on
+@code{hyph-utf8}.")
+    ;; Individual files each have their own license.  Most of these files are
+    ;; independent hyphenation patterns.
+    (license
+     (list license:asl2.0
+           license:bsd-3
+           license:cc0
+           license:expat
+           license:gpl2
+           license:gpl2+
+           license:gpl3+
+           license:knuth
+           license:lgpl2.1
+           license:lgpl2.1+
+           license:lgpl3+
+           license:lppl
+           license:lppl1.0+
+           license:lppl1.2+
+           license:lppl1.3
+           license:lppl1.3+
+           license:lppl1.3a+
+           license:mpl1.1
+           license:public-domain
+           license:wtfpl2
+           (license:fsf-free
+            "/tex/generic/hyph-utf8/patterns/tex/hyph-eu.tex")
+           (license:non-copyleft
+            "file:///tex/generic/hyph-utf8/patterns/tex/hyph-bg.tex"
+            "Ancestral BSD variant")
+           (license:non-copyleft
+            "file:///tex/generic/hyph-utf8/patterns/tex/hyph-en-us.tex"
+            "FSF all permissive license")
+           (license:non-copyleft
+            "/tex/generic/hyph-utf8/patterns/tex/hyph-no.tex"
+            "FSF All permissive license")
+           (license:non-copyleft
+            "file:///tex/generic/hyph-utf8/patterns/tex/hyph-sa.tex")))))
+
+(define-deprecated-package texlive-dehyph texlive-hyphen-complete)
+(define-deprecated-package texlive-generic-dehyph-exptl texlive-hyphen-complete)
+(define-deprecated-package texlive-generic-hyph-utf8 texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-afrikaans texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-ancientgreek texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-armenian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-basque texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-belarusian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-bulgarian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-catalan texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-chinese texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-churchslavonic texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-coptic texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-croatian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-czech texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-danish texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-dutch texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-english texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-esperanto texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-estonian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-ethiopic texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-finnish texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-french texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-friulan texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-galician texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-georgian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-german texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-greek texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-hungarian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-icelandic texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-indic texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-indonesian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-interlingua texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-irish texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-italian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-kurmanji texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-latin texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-latvian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-lithuanian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-macedonian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-mongolian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-norwegian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-occitan texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-pali texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-piedmontese texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-polish texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-portuguese texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-romanian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-romansh texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-russian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-sanskrit texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-schoolfinnish texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-serbian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-slovak texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-slovenian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-spanish texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-swedish texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-thai texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-turkish texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-turkmen texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-ukrainian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-uppersorbian texlive-hyphen-complete)
+(define-deprecated-package texlive-hyphen-welsh texlive-hyphen-complete)
+(define-deprecated-package texlive-ruhyphen texlive-hyphen-complete)
+(define-deprecated-package texlive-ukrhyph texlive-hyphen-complete)
+
+(define-public texlive-bin
+  (package/inherit texlive-libkpathsea
+    (name "texlive-bin")
+    (source
+     (origin
+       (inherit (package-source texlive-libkpathsea))
+       (snippet
+        ;; TODO: Unbundle stuff in texk/dvisvgm/dvisvgm-src/libs too.
+        #~(with-directory-excursion "libs"
+            (let ((preserved-directories '("." ".." "lua53" "luajit" "pplib" "xpdf")))
+              ;; Delete bundled software, except Lua which cannot easily be
+              ;; used as an external dependency, pplib and xpdf which aren't
+              ;; supported as system libraries (see m4/kpse-xpdf-flags.m4).
+              (for-each delete-file-recursively
+                        (scandir "."
+                                 (lambda (file)
+                                   (and (not (member file preserved-directories))
+                                        (eq? 'directory
+                                             (stat:type (stat file))))))))))))
     (arguments
-     `(#:modules ((guix build gnu-build-system)
+     (list
+      #:modules '((guix build gnu-build-system)
                   (guix build utils)
                   (ice-9 ftw)
                   (srfi srfi-1)
                   (srfi srfi-26))
-       #:out-of-source? #t
-       #:configure-flags
-       '("--disable-static"
-         "--disable-native-texlive-build"
-         "--enable-shared"
-         "--with-banner-add=/GNU Guix"
-         "--with-system-cairo"
-         "--with-system-freetype2"
-         "--with-system-gd"
-         "--with-system-gmp"
-         "--with-system-graphite2"
-         "--with-system-harfbuzz"
-         "--with-system-icu"
-         "--with-system-libgs"
-         "--with-system-libpaper"
-         "--with-system-libpng"
-         "--with-system-mpfr"
-         "--with-system-pixman"
-         "--with-system-potrace"
-         "--with-system-teckit"
-         "--with-system-zlib"
-         "--with-system-zziplib"
-         ;; LuaJIT is not ported to some architectures yet.
-         ,@(if (or (target-ppc64le?)
-                   (target-riscv64?))
-             '("--disable-luajittex"
-               "--disable-luajithbtex"
-               "--disable-mfluajit")
-             '()))
-
+      #:out-of-source? #t
+      #:parallel-tests? #f              ;bibtex8.test fails otherwise
+      #:configure-flags
+      #~(let ((kpathsea #$(this-package-input "texlive-libkpathsea")))
+          (list "--with-banner-add=/GNU Guix"
+                "--enable-shared"
+                "--disable-native-texlive-build"
+                "--disable-static"
+                "--disable-linked-scripts"
+                "--disable-kpathsea"
+                "--with-system-cairo"
+                "--with-system-freetype2"
+                "--with-system-gd"
+                "--with-system-gmp"
+                "--with-system-graphite2"
+                "--with-system-harfbuzz"
+                "--with-system-icu"
+                "--with-system-libgs"
+                "--with-system-libpaper"
+                "--with-system-libpng"
+                "--with-system-mpfr"
+                "--with-system-pixman"
+                "--with-system-potrace"
+                "--with-system-teckit"
+                "--with-system-zlib"
+                "--with-system-zziplib"
+                ;; Help locating external kpathsea.  For some reason
+                ;; PKG-CONFIG is unable to find it.
+                "--with-system-kpathsea"
+                (format #f "--with-kpathsea-includes=~a/include" kpathsea)
+                (format #f "--with-kpathsea-lib=~a/lib" kpathsea)
+                ;; LuaJIT is not ported to some architectures yet.
+                #$@(if (or (target-ppc64le?)
+                           (target-riscv64?))
+                       '("--disable-luajittex"
+                         "--disable-luajithbtex"
+                         "--disable-mfluajit")
+                       '())))
       ;; Disable tests on some architectures to cope with a failure of
       ;; luajiterr.test.
+      ;;
       ;; XXX FIXME fix luajit properly on these architectures.
-      #:tests? ,(let ((s (or (%current-target-system)
-                             (%current-system))))
-                  (not (or (string-prefix? "aarch64" s)
-                           (string-prefix? "mips64" s)
-                           (string-prefix? "powerpc64le" s))))
-
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-psutils-test
-           (lambda _
-             ;; This test fails due to a rounding difference with libpaper 1.2:
-             ;;   https://github.com/rrthomas/libpaper/issues/23
-             ;; Adjust the expected outcome to account for the minute difference.
-             (substitute* "texk/psutils/tests/playres.ps"
-               (("844\\.647799")
-                "844.647797"))))
-         (add-after 'unpack 'configure-ghostscript-executable
-           ;; ps2eps.pl uses the "gswin32c" ghostscript executable on Windows,
-           ;; and the "gs" ghostscript executable on Unix. It detects Unix by
-           ;; checking for the existence of the /usr/bin directory. Since
-           ;; Guix System does not have /usr/bin, it is also detected as Windows.
-           (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* "utils/ps2eps/ps2eps-src/bin/ps2eps.pl"
-               (("gswin32c") "gs"))
-             (substitute* "texk/texlive/linked_scripts/epstopdf/epstopdf.pl"
-               (("\"gs\"")
-                (string-append "\"" (assoc-ref inputs "ghostscript") "/bin/gs\"")))))
-         (add-after 'unpack 'patch-dvisvgm-build-files
-           (lambda _
-             ;; XXX: Ghostscript is detected, but HAVE_LIBGS is never set, so
-             ;; the appropriate linker flags are not added.
-             (substitute* "texk/dvisvgm/configure"
-               (("^have_libgs=yes" all)
-                (string-append all "\nHAVE_LIBGS=1")))))
-         (add-after 'unpack 'disable-failing-test
-           (lambda _
-             ;; FIXME: This test fails on 32-bit architectures since Glibc 2.28:
-             ;; <https://bugzilla.redhat.com/show_bug.cgi?id=1631847>.
-             (substitute* "texk/web2c/omegafonts/check.test"
-               (("^\\./omfonts -ofm2opl \\$srcdir/tests/check tests/xcheck \\|\\| exit 1")
-                "./omfonts -ofm2opl $srcdir/tests/check tests/xcheck || exit 77"))))
-         ,@(if (or (target-ppc32?)
-                   (target-riscv64?))
-             ;; Some mendex tests fail on some architectures.
-             `((add-after 'unpack 'skip-mendex-tests
-                 (lambda _
-                   (substitute* '("texk/mendexk/tests/mendex.test"
-                                  "texk/upmendex/tests/upmendex.test")
-                     (("srcdir/tests/pprecA-0.ind pprecA-0.ind1 \\|\\| exit 1")
-                      "srcdir/tests/pprecA-0.ind pprecA-0.ind1 || exit 77")))))
-             '())
-         (add-after 'unpack 'unpack-texlive-extra
-           (lambda* (#:key inputs #:allow-other-keys)
-             (mkdir "texlive-extra")
-             (with-directory-excursion "texlive-extra"
-               (apply (assoc-ref %standard-phases 'unpack)
-                      (list #:source (assoc-ref inputs "texlive-extra-src"))))))
-         (add-after 'unpack-texlive-extra 'unpack-texlive-scripts
-           (lambda* (#:key inputs #:allow-other-keys)
-             (mkdir "texlive-scripts")
-             (with-directory-excursion "texlive-scripts"
-               (apply (assoc-ref %standard-phases 'unpack)
-                      (list #:source (assoc-ref inputs "texlive-scripts")))
-               ;; Configure the version string for some scripts.
-               ;; Normally this would be done by Subversion.
-               ;; See <https://issues.guix.gnu.org/43442#15>.
-               (for-each (lambda (file)
-                           (substitute* file
-                             (("\\$Id\\$")
-                              (format #f "$Id: ~a ~a ~a nobody $"
-                                      file
-                                      ,%texlive-revision
-                                      ,%texlive-date))
-                             (("\\$Revision\\$")
-                              (format #f "$Revision: ~a $"
-                                      ,%texlive-revision))
-                             (("\\$Date\\$")
-                              (format #f "$Date: ~a $"
-                                      ,%texlive-date))))
-                         '("fmtutil.pl"
-                           "mktexlsr"
-                           "mktexlsr.pl"
-                           "mktexmf"
-                           "mktexpk"
-                           "mktextfm"
-                           "tlmgr.pl"
-                           "tlmgrgui.pl"
-                           "updmap.pl")))))
-         (add-after 'unpack-texlive-scripts 'patch-scripts
-           (lambda _
-             (let* ((scripts (append (find-files "texk/kpathsea" "^mktex")
-                                     (find-files "texk/texlive/linked_scripts"
-                                                 "\\.sh$")
-                                     (find-files "texlive-scripts" "\\.sh$")))
-                    (commands '("awk" "basename" "cat" "grep" "mkdir" "rm"
-                                "sed" "sort" "uname"))
-                    (command-regexp (format #f "\\b(~a)\\b"
-                                            (string-join commands "|")))
-                    (iso-8859-1-encoded-scripts
-                     '("texk/texlive/linked_scripts/texlive-extra/rubibtex.sh"
-                       "texk/texlive/linked_scripts/texlive-extra/rumakeindex.sh")))
-
-               (define (substitute-commands scripts)
-                 (substitute* scripts
-                   ((command-regexp dummy command)
-                    (which command))))
-
-               (substitute-commands (lset-difference string= scripts
-                                                     iso-8859-1-encoded-scripts))
-
-               (with-fluids ((%default-port-encoding "ISO-8859-1"))
-                 (substitute-commands iso-8859-1-encoded-scripts)))))
-         ;; When ST_NLINK_TRICK is set, kpathsea attempts to avoid work when
-         ;; searching files by assuming that a directory with exactly two
-         ;; links has no subdirectories.  This assumption does not hold in our
-         ;; case, so some directories with symlinked subdirectories would not
-         ;; be traversed.
-         (add-after 'patch-scripts 'patch-directory-traversal
-           (lambda _
-             (substitute* "texk/kpathsea/config.h"
-               (("#define ST_NLINK_TRICK") ""))))
-
-         ,@(if (target-arm32?)
-               `((add-after 'unpack 'skip-faulty-test
-                   (lambda _
-                     ;; Skip this faulty test on armhf-linux:
-                     ;;   https://issues.guix.gnu.org/54055
-                     (substitute* '("texk/mendexk/tests/mendex.test"
-                                    "texk/upmendex/tests/upmendex.test")
-                       (("^TEXMFCNF=" all)
-                        (string-append "exit 77 # skip\n" all))))))
-               '())
-
-         (add-after 'check 'customize-texmf.cnf
-           ;; The default texmf.cnf is provided by this package, texlive-bin.
-           ;; Every variable of interest is set relatively to the GUIX_TEXMF
-           ;; environment variable defined via a search path specification
-           ;; further below.  The configuration file is patched after the test
-           ;; suite has run, as it relies on the default configuration to find
-           ;; its paths (and the GUIX_TEXMF variable isn't set yet).
-           (lambda _
-             ;; The current directory is build/ because of the out-of-tree
-             ;; build.
-             (let* ((source    (first (scandir ".." (cut string-suffix?
-                                                         "source" <>))))
-                    (texmf.cnf (string-append "../" source
-                                              "/texk/kpathsea/texmf.cnf")))
-               (substitute* texmf.cnf
-                 (("^TEXMFROOT = .*")
-                  "TEXMFROOT = {$GUIX_TEXMF}/..\n")
-                 (("^TEXMF = .*")
-                  "TEXMF = {$GUIX_TEXMF}\n")
-                 (("^%TEXMFCNF = .*")
-                  "TEXMFCNF = {$GUIX_TEXMF}/web2c\n")
-                 ;; Don't truncate lines.
-                 (("^error_line = .*$") "error_line = 254\n")
-                 (("^half_error_line = .*$") "half_error_line = 238\n")
-                 (("^max_print_line = .*$") "max_print_line = 1000\n")))))
-         (add-after 'install 'post-install
-           (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
-             (let* ((out (assoc-ref outputs "out"))
-                    (patch-source-shebangs (assoc-ref %standard-phases
-                                                      'patch-source-shebangs))
-                    (share (string-append out "/share"))
-                    (scripts (string-append share
-                                            "/texmf-dist/scripts/texlive"))
-                    (source (string-append
-                             "../" (first (scandir ".." (cut string-suffix?
-                                                             "source" <>)))))
-                    (tl-extra-root (string-append source "/texlive-extra"))
-                    (tl-extra-dir (first
-                                   (scandir tl-extra-root
-                                            (negate
-                                             (cut member <> '("." ".."))))))
-                    (tlpkg-src (string-append tl-extra-root "/" tl-extra-dir
-                                              "/tlpkg"))
-                    (config.guess (search-input-file inputs
-                                                     "/bin/config.guess")))
-
-               ;; Create symbolic links for the latex variants and their man
-               ;; pages.  We link lualatex to luahbtex; see issue #51252 for
-               ;; details.
-               (with-directory-excursion (string-append out "/bin/")
-                 (for-each symlink
-                           '("pdftex" "pdftex"   "xetex"   "luahbtex")
-                           '("latex"  "pdflatex" "xelatex" "lualatex")))
-               (with-directory-excursion (string-append share "/man/man1/")
-                 (symlink "luatex.1" "lualatex.1"))
-
-               ;; Install tlpkg.
-               (copy-recursively tlpkg-src (string-append share "/tlpkg"))
-
-               ;; Install texlive-scripts.
-               (copy-recursively (string-append
-                                  source "/texlive-scripts/source/")
-                                 scripts)
-
-               ;; Patch them.
-               (let ((dirs (map dirname (list (which "sed") (which "awk")))))
-                 (with-directory-excursion scripts
-                   (substitute* '("mktexpk" "mktexmf" "mktexlsr")
-                     (("^version=" m)
-                      (format #false "PATH=\"~{~a:~}$PATH\"; export PATH~%~a"
-                              dirs m)))))
-
-               ;; Make sure that fmtutil can find its Perl modules.
-               (substitute* (string-append scripts "/fmtutil.pl")
-                 (("\\$TEXMFROOT/")
-                  (string-append share "/")))
-
-               ;; Likewise for updmap.pl.
-               (substitute* (string-append scripts "/updmap.pl")
-                 (("\\$TEXMFROOT/tlpkg")
-                  (string-append share "/tlpkg")))
-
-               ;; Likewise for the tlmgr.
-               (substitute* (string-append scripts "/tlmgr.pl")
-                 ((".*\\$::installerdir = \\$Master.*" all)
-                  (format #f "  $Master = ~s;~%~a" share all)))
-
-               ;; Install the config.guess script, required by tlmgr.
-               (with-directory-excursion share
-                 (mkdir-p "tlpkg/installer/")
-                 (symlink config.guess "tlpkg/installer/config.guess"))
-
-               ;; texlua shebangs are not patched by the patch-source-shebangs
-               ;; phase because the texlua executable does not exist at that
-               ;; time.
-               (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))
-               (with-directory-excursion out
-                 (patch-source-shebangs))))))))
-    (native-search-paths
-     (list (search-path-specification
-            (variable "GUIX_TEXMF")
-            (files '("share/texmf-dist")))))
+      #:tests? (let ((s (or (%current-target-system)
+                            (%current-system))))
+                 (not (or (string-prefix? "aarch64" s)
+                          (string-prefix? "mips64" s)
+                          (string-prefix? "powerpc64le" s))))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'locate-external-kpathsea
+            ;; Despite our best efforts, the configure scripts below is not
+            ;; able to find external kpathsea.
+            (lambda _
+              (substitute* "texk/web2c/configure"
+                (("/usr/include /usr/local/include")
+                 (string-append #$(this-package-input "texlive-libkpathsea")
+                                "/include")))))
+          (add-after 'unpack 'patch-psutils-test
+            (lambda _
+              ;; This test fails due to a rounding difference with libpaper
+              ;; 1.2: <https://github.com/rrthomas/libpaper/issues/23>.
+              ;;
+              ;; Adjust the expected outcome to account for the minute
+              ;; difference.
+              (substitute* "texk/psutils/tests/playres.ps"
+                (("844\\.647799") "844.647797"))))
+          (add-after 'unpack 'configure-ghostscript-executable
+            ;; ps2eps.pl uses the "gswin32c" ghostscript executable on
+            ;; Windows, and the "gs" ghostscript executable on Unix.  It
+            ;; detects Unix by checking for the existence of the /usr/bin
+            ;; directory.  Since Guix System does not have /usr/bin, it is
+            ;; also detected as Windows.
+            (lambda _
+              (substitute* "utils/ps2eps/ps2eps-src/bin/ps2eps.pl"
+                (("gswin32c") "gs"))))
+          (add-after 'unpack 'patch-dvisvgm-build-files
+            (lambda _
+              ;; XXX: Ghostscript is detected, but HAVE_LIBGS is never set, so
+              ;; the appropriate linker flags are not added.
+              (substitute* "texk/dvisvgm/configure"
+                (("^have_libgs=yes" all)
+                 (string-append all "\nHAVE_LIBGS=1")))))
+          (add-after 'unpack 'disable-failing-test
+            (lambda _
+              ;; FIXME: This test fails on 32-bit architectures since Glibc
+              ;; 2.28: <https://bugzilla.redhat.com/show_bug.cgi?id=1631847>.
+              (substitute* "texk/web2c/omegafonts/check.test"
+                (("^\\./omfonts -ofm2opl \\$srcdir/tests/check tests/xcheck \\|\\| exit 1")
+                 "./omfonts -ofm2opl $srcdir/tests/check tests/xcheck || exit 77"))))
+          #$@(if (or (target-ppc32?)
+                     (target-riscv64?))
+                 ;; Some mendex tests fail on some architectures.
+                 `((add-after 'unpack 'skip-mendex-tests
+                     (lambda _
+                       (substitute* '("texk/mendexk/tests/mendex.test"
+                                      "texk/upmendex/tests/upmendex.test")
+                         (("srcdir/tests/pprecA-0.ind pprecA-0.ind1 \\|\\| exit 1")
+                          "srcdir/tests/pprecA-0.ind pprecA-0.ind1 || exit 77")))))
+                 '())
+          #$@(if (target-arm32?)
+                 `((add-after 'unpack 'skip-faulty-test
+                     (lambda _
+                       ;; Skip this faulty test on armhf-linux:
+                       ;;   https://issues.guix.gnu.org/54055
+                       (substitute* '("texk/mendexk/tests/mendex.test"
+                                      "texk/upmendex/tests/upmendex.test")
+                         (("^TEXMFCNF=" all)
+                          (string-append "exit 77 # skip\n" all))))))
+                 '())
+          (add-after 'install 'post-install
+            (lambda _
+              ;; Create symbolic links for the latex variants.  We link
+              ;; lualatex to luahbtex; see issue #51252 for details.
+              (with-directory-excursion (string-append #$output "/bin/")
+                (for-each symlink
+                          '("pdftex" "pdftex"   "xetex"   "luahbtex")
+                          '("latex"  "pdflatex" "xelatex" "lualatex")))
+              ;; texlua shebangs are not patched by the patch-source-shebangs
+              ;; phase because the texlua executable does not exist at that
+              ;; time.
+              (setenv "PATH"
+                      (string-append (getenv "PATH") ":" #$output "/bin"))
+              (with-directory-excursion #$output
+                (assoc-ref %standard-phases 'patch-source-shebangs)))))))
+    (native-inputs (list groff-minimal pkg-config))
+    (inputs
+     (list cairo
+           config
+           fontconfig
+           fontforge
+           freetype
+           gd
+           ghostscript
+           gmp
+           graphite2
+           harfbuzz
+           icu4c
+           libpaper
+           libpng
+           libxaw
+           libxt
+           mpfr
+           perl
+           pixman
+           potrace
+           python
+           ruby-2.7
+           tcsh
+           teckit
+           zlib
+           zziplib))
+    (propagated-inputs (list texlive-libkpathsea texlive-scripts))
     (synopsis "TeX Live, a package of the TeX typesetting system")
     (description
      "TeX Live provides a comprehensive TeX document production system.
@@ -608,143 +804,3678 @@ This package contains the binaries.")
     (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
     (home-page "https://www.tug.org/texlive/")))
 
-(define-public texlive-bidi
+;; This package must be located before `texlive-updmap.cfg' in the module.
+(define-public texlive-scheme-basic
   (package
-    (name "texlive-bidi")
-    ;; Take the version from texlive-2022.0 as the one from texlive 2021.0 is
-    ;; buggy.
-    (version "36.4")
-    (source (origin
-              (method svn-multi-fetch)
-              (uri (svn-multi-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        "texlive-2022.0/Master/texmf-dist"))
-                    (locations (list "doc/xelatex/bidi/"
-                                     "source/xelatex/bidi/"))
-                    (revision 62885)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "09nfvsjfnms3pclyd2rcivyb5qvzw48b934i3bcl83hv69ix2ks7"))))
+    (name "texlive-scheme-basic")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs (list texlive-collection-basic texlive-collection-latex))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "Basic scheme (plain and latex)")
+    (description
+     "This is the basic TeX Live scheme: it is a small set of files sufficient
+to typeset plain TeX or LaTeX documents in PostScript or PDF, using the
+Computer Modern fonts.  This scheme corresponds to @code{collection-basic} and
+@code{collection-latex}.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-deprecated-package texlive-base texlive-scheme-basic)
+
+(define-public texlive-scheme-bookpub
+  (package
+    (name "texlive-scheme-bookpub")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list texlive-barcodes
+           texlive-biber
+           texlive-biblatex
+           texlive-bookcover
+           texlive-caption
+           texlive-collection-basic
+           texlive-collection-latex
+           texlive-enumitem
+           texlive-fontspec
+           texlive-latexmk
+           texlive-lipsum
+           texlive-listings
+           texlive-markdown
+           texlive-memoir
+           texlive-microtype
+           texlive-minted
+           texlive-novel
+           texlive-octavo
+           texlive-pdfpages
+           texlive-pgf
+           texlive-qrcode
+           texlive-shapes
+           texlive-titlesec
+           texlive-tocloft
+           texlive-tufte-latex
+           texlive-willowtreebook))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "Book publishing scheme (core LaTeX and add-ons)")
+    (description
+     "This is a book publishing scheme, containing core (Lua)LaTeX and
+selected additional packages likely to be useful for non-technical book
+publication.  It does not contain additional fonts (different books need
+different fonts, and the packages are large), nor does it contain additional
+mathematical or other technical packages.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-public texlive-scheme-context
+  (package
+    (name "texlive-scheme-context")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list texlive-antt
+           texlive-asana-math
+           texlive-ccicons
+           texlive-collection-context
+           texlive-collection-metapost
+           texlive-dejavu
+           texlive-eulervm
+           texlive-gentium-tug
+           texlive-iwona
+           texlive-kurier
+           texlive-ly1
+           texlive-manfnt-font
+           texlive-marvosym
+           texlive-mflogo-font
+           texlive-poltawski
+           texlive-pxfonts
+           texlive-tex-gyre
+           texlive-tex-gyre-math
+           texlive-txfonts
+           texlive-wasy
+           texlive-xits))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "ConTeXt scheme")
+    (description "This is the TeX Live scheme for installing ConTeXt.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-public texlive-scheme-minimal
+  (package
+    (name "texlive-scheme-minimal")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs (list texlive-collection-basic))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "Minimal scheme (plain only)")
+    (description
+     "This is the minimal TeX Live scheme, with support for only plain
+TeX. (No LaTeX macros.) LuaTeX is included because Lua scripts are used in TeX
+Live infrastructure.  This scheme corresponds exactly to
+@code{collection-basic}.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-public texlive-scheme-small
+  (package
+    (name "texlive-scheme-small")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list texlive-babel-basque
+           texlive-babel-czech
+           texlive-babel-danish
+           texlive-babel-dutch
+           texlive-babel-english
+           texlive-babel-finnish
+           texlive-babel-french
+           texlive-babel-german
+           texlive-babel-hungarian
+           texlive-babel-italian
+           texlive-babel-norsk
+           texlive-babel-polish
+           texlive-babel-portuges
+           texlive-babel-spanish
+           texlive-babel-swedish
+           texlive-collection-basic
+           texlive-collection-latex
+           texlive-collection-latexrecommended
+           texlive-collection-metapost
+           texlive-collection-xetex
+           texlive-ec
+           texlive-eurosym
+           texlive-hyphen-complete
+           texlive-lm
+           texlive-lualibs
+           texlive-luaotfload
+           texlive-luatexbase
+           texlive-revtex
+           texlive-synctex
+           texlive-times
+           texlive-tipa
+           texlive-ulem
+           texlive-upquote
+           texlive-zapfding))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "Small scheme (basic, XeTeX, Metapost, and a few languages)")
+    (description
+     "This is a small TeX Live scheme, corresponding to MacTeX's BasicTeX
+variant.  It adds XeTeX, MetaPost, and some recommended packages to
+@code{scheme-basic}.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+;; This package must be located before any package adding it to its native
+;; inputs.
+(define-public texlive-updmap.cfg
+  (lambda* (#:optional (packages '()))
+    "Return a 'texlive-updmap.cfg' package which contains the fonts map
+configuration of a base set of packages plus PACKAGES."
+    (let ((default-packages (list texlive-scheme-basic)))
+      (package
+        (version (number->string %texlive-revision))
+        (source (package-source texlive-scripts))
+        (name "texlive-updmap.cfg")
+        (build-system copy-build-system)
+        (arguments
+         (list
+          #:modules '((guix build copy-build-system)
+                      (guix build utils)
+                      (ice-9 popen)
+                      (ice-9 textual-ports))
+          #:install-plan
+          #~'(("texmf-dist/web2c/updmap.cfg" "share/texmf-config/web2c/")
+              ("texmf-dist/web2c/map" "share/texmf-dist/fonts/map"))
+          #:phases
+          #~(modify-phases %standard-phases
+              (add-before 'install 'regenerate-updmap.cfg
+                (lambda _
+                  (with-directory-excursion "texmf-dist/web2c"
+                    (make-file-writable "updmap.cfg")
+
+                    ;; Disable unavailable map files.
+                    (let* ((port (open-pipe* OPEN_WRITE "updmap-sys"
+                                             "--syncwithtrees"
+                                             "--nohash"
+                                             "--cnffile" "updmap.cfg")))
+                      (display "Y\n" port)
+                      (when (not (zero? (status:exit-val (close-pipe port))))
+                        (error "failed to filter updmap.cfg")))
+
+                    ;; Set TEXMFSYSVAR to a sane and writable value; updmap fails
+                    ;; if it cannot create its log file there.
+                    (setenv "TEXMFSYSVAR" (getcwd))
+
+                    ;; Generate maps.
+                    (invoke "updmap-sys"
+                            "--cnffile"           "updmap.cfg"
+                            "--dvipdfmxoutputdir" "map/dvipdfmx/updmap/"
+                            "--dvipsoutputdir"    "map/dvips/updmap/"
+                            "--pdftexoutputdir"   "map/pdftex/updmap/")))))))
+        (native-inputs (list texlive-scripts))
+        (propagated-inputs (map (lambda (package)
+                                  (list (package-name package) package))
+                                (append default-packages packages)))
+        (home-page (package-home-page texlive-bin))
+        (synopsis "TeX Live fonts map configuration")
+        (description "This package contains the fonts map configuration file
+generated for the base TeX Live packages as well as, optionally, user-provided
+ones.")
+        (license (delete-duplicates
+                  (fold (lambda (package result)
+                          (match (package-license package)
+                            ((lst ...)
+                             (append lst result))
+                            ((? license:license? license)
+                             (cons license result))))
+                        '()
+                        (append default-packages packages))))))))
+
+(define-deprecated-package texlive-tiny texlive-scheme-basic)
+(define-deprecated/alias texlive-union texlive-updmap.cfg)
+(export texlive-union)
+
+(define-public texlive-a2ping
+  (package
+    (name "texlive-a2ping")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/a2ping.1"
+                   "doc/man/man1/a2ping.man1.pdf"
+                   "doc/support/a2ping/" "scripts/a2ping/")
+             (base32
+              "1lhmh1rnykmi6i5mklj7fwhndw1xxmwy2xsy8j1px8ishf5czhvq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "a2ping.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/a2ping")
+    (synopsis "Advanced PS, PDF, EPS converter")
+    (description
+     "@command{a2ping} is a Perl script command line utility written for Unix
+that converts many raster image and vector graphics formats to EPS or PDF and
+other page description formats.  Accepted input file formats are:
+PS (PostScript), EPS, PDF, PNG, JPEG, TIFF, PNM, BMP, GIF, LBM, XPM, PCX,
+TGA. Accepted output formats are: EPS, PCL5, PDF, PDF1, PBM, PGM, PPM, PS,
+markedEPS, markedPS, PNG, XWD, BMP, TIFF, JPEG, GIF, XPM.")
+    (license license:gpl3+)))
+
+(define-public texlive-accfonts
+  (package
+    (name "texlive-accfonts")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/accfonts/" "scripts/accfonts/"
+                   "tex/latex/accfonts/")
+             (base32
+              "0kja24rh0ysljwgkyg9mf47h64ayi2kmb1jb3dmvb42ywvg0w9i7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "mkt1font" "vpl2ovp" "vpl2vpl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/accfonts")
+    (synopsis "Utilities to derive new fonts from existing ones")
+    (description
+     "The @code{accfonts} package contains three utilities to permit easy
+manipulation of fonts, in particular the creation of unusual accented
+characters. @command{mkt1font} works on Adobe Type 1 fonts, @command{vpl2vpl}
+works on TeX virtual fonts and @command{vpl2ovp} transforms a TeX font to an
+Omega one.")
+    (license license:gpl3+)))
+
+(define-public texlive-abbr
+  (package
+    (name "texlive-abbr")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/abbr/" "tex/generic/abbr/")
+             (base32
+              "0zi5qkgr2nnb3jp5adv42d84w7yav1dw0lgg2vdxfsz03j1bmlsb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/abbr")
+    (synopsis "Simple macros supporting abreviations for Plain and LaTeX")
+    (description
+     "The package provides some simple macros to support abbreviations in
+Plain TeX or LaTeX.  It allows writing, e.g., @samp{\\<TEX>} instead of
+@samp{\\TeX}, hence frees users from having to escape space after
+parameterless macros.")
+    (license license:public-domain)))
+
+(define-public texlive-abstyles
+  (package
+    (name "texlive-abstyles")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bib/abstyles/"
+                   "bibtex/bst/abstyles/"
+                   "doc/bibtex/abstyles/"
+                   "tex/generic/abstyles/")
+             (base32
+              "1ij4cp3pydfs4lch0f93gi2q7msafxyqfvv44whw1ppczidicnn2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/abstyles-orig")
+    (synopsis "Adaptable BibTeX styles")
+    (description
+     "This package provides a family of modifications of the standard BibTeX
+styles whose behaviour may be changed by changing the user document, without
+change to the styles themselves.  The package is largely used nowadays in its
+adaptation for working with Babel.")
+    (license
+     (list license:isc                  ;apreamble
+           license:knuth                ;bxabst
+           license:public-domain))))    ;docmac
+
+(define-public texlive-adhocfilelist
+  (package
+    (name "texlive-adhocfilelist")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/adhocfilelist/"
+                   "scripts/adhocfilelist/"
+                   "source/support/adhocfilelist/"
+                   "tex/support/adhocfilelist/")
+             (base32
+              "097yy38571fa2hzp4s3p125xknqgjmkhv1vgi0q9vz83b6175hc4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "adhocfilelist.sh")))
+    (home-page "https://ctan.org/pkg/adhocfilelist")
+    (synopsis "@code{\\listfiles} entries from the command line")
+    (description
+     "The package provides a Unix shell script to display a list of LaTeX
+@code{\\Provides}...-command contexts on screen.  Provision is made for
+controlling the searches that the package does.")
+    (license license:lppl)))
+
+(define-public texlive-afm2pl
+  (package
+    (name "texlive-afm2pl")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/afm2pl.1"
+                   "doc/man/man1/afm2pl.man1.pdf"
+                   "fonts/enc/dvips/afm2pl/"
+                   "fonts/lig/afm2pl/" "tex/fontinst/afm2pl/")
+             (base32
+              "19llzzr4kmmyf7l18ngx1rhaqaqvgm3md924m4dxcv7nmrvga2b2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/afm2pl")
+    (synopsis "Convert AFM to TeX property list (@file{.pl}) metrics")
+    (description
+     "@command{afm2pl} converts a @file{.afm} (Adobe Font Metric) file into
+a @file{.pl} (Property List) file, which in its turn can be converted to
+a @file{.tfm} (TeX Font Metric) file.  It normally preserves kerns and
+ligatures, but also offers additional control over them.")
+    (license license:gpl2)))
+
+(define-public texlive-albatross
+  (package
+    (name "texlive-albatross")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/albatross.1"
+                   "doc/man/man1/albatross.man1.pdf"
+                   "doc/support/albatross/"
+                   "scripts/albatross/"
+                   "source/support/albatross/")
+             (base32
+              "147cdqiyapmhs6s5cp4f0vhc71d3w9kvxk8ylbrhsp5h97r8y6w9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "albatross.sh")))
+    (home-page "https://ctan.org/pkg/albatross")
+    (synopsis "Find fonts that contain a given glyph")
+    (description
+     "This is a command line tool for finding fonts that contain
+a given (Unicode) glyph.  It relies on Fontconfig.")
+    (license license:bsd-3)))
+
+(define-public texlive-apnum
+  (package
+    (name "texlive-apnum")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/apnum/" "tex/generic/apnum/")
+             (base32
+              "0s6nklimzbqc1z1vhgffzp76d1kl2shz1xkf119bck482rvn3x61")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/apnum")
+    (synopsis "Arbitrary precision numbers implemented by TeX macros")
+    (description
+     "The basic operations (addition, subtraction, multiplication,
+division, power to an integer) are implemented by TeX macros in this package.
+Operands may be numbers with arbitrary numbers of digits; scientific notation
+is allowed.  The expression scanner is also provided.")
+    (license license:public-domain)))
+
+(define-public texlive-arara
+  (package
+    (name "texlive-arara")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/arara.1"
+                   "doc/man/man1/arara.man1.pdf"
+                   "doc/support/arara/" "scripts/arara/"
+                   "source/support/arara/")
+             (base32
+              "0sshjaxz1ar24mr7dny0lp9l0bggyfsb0868s4b1k00w6jyzh1i8")))
     (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (arguments
      (list
-      #:tex-directory "xelatex/bidi"
-      #:phases #~(modify-phases %standard-phases
-                   (add-after 'unpack 'chdir
-                     (lambda _
-                       (chdir "source/xelatex/bidi")))
-                   (add-after 'install 'install-doc
-                     (lambda* (#:key outputs #:allow-other-keys)
-                       (let ((doc (string-append (assoc-ref outputs "doc")
-                                                 "/share/texmf-dist/doc")))
-                         (mkdir-p doc)
-                         (copy-recursively (string-append #$source "/doc")
-                                           doc)))))))
-    (propagated-inputs (list texlive-iftex
-                             texlive-ltxcmds
-                             texlive-hyperref
-                             texlive-latex-xkeyval
-                             texlive-zref))
+      #:link-scripts #~(list "arara.sh")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'locate-java
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "scripts/arara/arara.sh"
+                (("java") (search-input-file inputs "/bin/java"))))))))
+    (inputs (list icedtea))
+    (home-page "https://ctan.org/pkg/arara")
+    (synopsis "Automation of LaTeX compilation")
+    (description
+     "Arara is comparable with other well-known compilation tools like
+@command{latexmk} and @command{rubber}.  The key difference is that Arara
+determines its actions from metadata in the source code, rather than relying
+on indirect resources, such as log file analysis.  Arara requires a Java
+virtual machine.")
+    (license license:bsd-3)))
+
+(define-public texlive-autoaligne
+  (package
+    (name "texlive-autoaligne")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/autoaligne/"
+                   "tex/generic/autoaligne/")
+             (base32
+              "138d030zgzpdwqxx55gjw35y0c3v794fpa3c6znc9kv1vj8cs9d3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/autoaligne")
+    (synopsis "Align terms and members in math expressions")
+    (description
+     "This package allows to align terms and members between lines containing
+math expressions.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-barr
+  (package
+    (name "texlive-barr")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/barr/" "tex/generic/barr/")
+             (base32
+              "1l532g0nxigbllv2lf74bwx78sf4jsfr1cad0hpq7i7kq820wbii")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/diagxy")
+    (synopsis "Diagram macros by Michael Barr")
+    (description
+     "Diagxy is a general diagramming package, useful for diagrams in a number
+of mathematical disciplines.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-bitelist
+  (package
+    (name "texlive-bitelist")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/bitelist/"
+                   "source/generic/bitelist/"
+                   "tex/generic/bitelist/")
+             (base32
+              "1jv9w2jgx8q2k9xx0n4azlngsh26zs37ihavq0xy4n62ajf64ps6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bitelist")
+    (synopsis "Split list, in TeX's mouth")
+    (description
+     "The package provides commands for splitting a token list at the first
+occurrence of another (specified) token list.  The package's mechanism differs
+from those of packages providing similar features, in the following ways: the
+method uses TeX's mechanism of reading delimited macro parameters; splitting
+macros work by pure expansion, without assignments; the operation is carried
+out in a single macro call.  A variant of the operation is provided, that
+retains outer braces.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-borceux
+  (package
+    (name "texlive-borceux")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/borceux/"
+                   "tex/generic/borceux/")
+             (base32
+              "1fil90jsiqg7b0if3yq0jxv4rh7vanj2yj9pv8pnfkhvqii4p821")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/borceux")
+    (synopsis "Diagram macros by Francois Borceux")
+    (description
+     "The macros support the construction of diagrams, such as those that
+appear in category theory texts.  The user gives the list of vertices and
+arrows to be included, just as when composing a matrix, and the program takes
+care of computing the dimensions of the arrows and realizing the page setting.
+All the user has to do about the arrows is to specify their
+type (monomorphism, pair of adjoint arrows, etc.) and their direction (north,
+south-east, etc.); 12 types and 32 directions are available.")
+    ;; "You may freely use, modify, and/or distribute each of the
+    ;; files in this package without limitation."
+    (license (license:fsf-free "file://doc/generic/borceux/README"))))
+
+(define-public texlive-c-pascal
+  (package
+    (name "texlive-c-pascal")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/c-pascal/"
+                   "tex/generic/c-pascal/")
+             (base32
+              "0kmxki1yclk7lzlidcvsdry7mzm58zzwq3rxgvmpawq2hs8hpcra")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/c-pascal")
+    (synopsis "Typeset Python, C and Pascal programs")
+    (description
+     "This package provides a TeX macro package for easy typesetting programs
+in Python, C and Pascal.  Program source files may also be input.")
+    (license license:public-domain)))
+
+(define-public texlive-catcodes
+  (package
+    (name "texlive-catcodes")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/catcodes/"
+                   "source/generic/catcodes/"
+                   "tex/generic/catcodes/")
+             (base32
+              "0di6rd5c0viiwvc6ncwndah38q318l3s1pf47ddmzjdq6rys9s33")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/catcodes")
+    (synopsis "Generic handling of TeX category codes")
+    (description
+     "The bundle deals with category code switching; the packages of the
+bundle should work with any TeX format (with the support of the
+@code{plainpkg} package).  The bundle provides:
+@itemize
+@item @file{stacklet.sty}, which supports stacks that control the use of
+different catcodes;
+@item @file{actcodes.sty}, which deals with active characters;
+@item @file{catchdq.sty}, which provides a simple quotation character control
+mechanism.
+@end itemize")
+    (license license:lppl1.3+)))
+
+(define-public texlive-chronosys
+  (package
+    (name "texlive-chronosys")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/chronosys/"
+                   "tex/generic/chronosys/")
+             (base32
+              "145ap67ykdkp2f0ahasp9sjccrv1wzxdfl05nq6hbi6z65pk56s5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/chronosys")
+    (synopsis "Drawing time-line diagrams")
+    (description
+     "This package provides macros to produce time line diagrams.
+Interfaces for Plain TeX, ConTeXt and LaTeX are provided.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-colorsep
+  (package
+    (name "texlive-colorsep")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "dvips/colorsep/")
+             (base32
+              "0nf72pf2bjn8pcps45sn5dcjf1dkrww9wlpp1xbzl1h9i68p3h3h")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/colorsep")
+    (synopsis "Color separation")
+    (description
+     "This package provides support for colour separation when using Dvips.")
+    (license license:public-domain)))
+
+(define-public texlive-compare
+  (package
+    (name "texlive-compare")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/generic/compare/")
+             (base32
+              "0isr7gmskv55cr4f1fa7s478v6fh65q9ijxkmbpxj0448g9817w4")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/compare")
+    (synopsis "Compare two strings")
+    (description
+     "The file defines a macro @code{\\compare}, which takes two arguments;
+the macro expands to @samp{-1}, @samp{0}, @samp{1}, according as the first
+argument is less than, equal to, or greater than the second argument.  Sorting
+is alphabetic, using ASCII collating order.")
+    (license license:public-domain)))
+
+(define-public texlive-crossrefenum
+  (package
+    (name "texlive-crossrefenum")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/crossrefenum/"
+                   "tex/generic/crossrefenum/")
+             (base32
+              "07h7d47fxjj70h4bxd5sqz8abjnvgvkrnsy13a26imbarzg14db4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/crossrefenum")
+    (synopsis
+     "Smart typesetting of enumerated cross-references for various TeX formats")
+    (description
+     "@code{crossrefenum} lets TeX manage the formatting of bunches of
+cross-references for you.  It features:
+
+@itemize
+@item automatic collapsing of references;
+@item support for references by various criteria, including page and note
+number, line number in ConTeXt, and @code{edpage} and @code{edline} when used
+in conjunction with @code{reledmac};
+@item handling of references combining two criteria (e.g., by page and note
+number);
+@item extension mechanisms to add support to other types of references without
+modifying the internal macros.  Note that sorting is not supported.
+@end itemize
+
+It is written in Plain TeX as much as possible in order to make it compatible
+with a wide array of formats.  For the moment, it works out of the box with
+ConTeXt and LaTeX.")
+    (license (list license:gpl3+ license:fdl1.3+))))
+
+(define-public texlive-cweb-old
+  (package
+    (name "texlive-cweb-old")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/plain/cweb-old/")
+             (base32
+              "0vx235zpflqpnrfa9kqq7wmc1rylg5bw1r26knfzvh3w1swbp4ai")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/cweb-old")
+    (synopsis "Obsolete files from CWEB")
+    (description
+     "This package contains parts of CWEB that are no longer useful.")
+    (license license:knuth)))
+
+(define-public texlive-dinat
+  (package
+    (name "texlive-dinat")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bst/dinat/" "doc/bibtex/dinat/")
+             (base32
+              "05ab7aq8h08a8pcl3si2lki569sf201bygf3ra95dpqhs1ijxaag")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dinat")
+    (synopsis "Bibliography style for German texts")
+    (description
+     "This package provides bibliography style files intended for texts in
+german.  They draw up bibliographies in accordance with the german DIN 1505,
+parts 2 and 3.")
+    (license license:public-domain)))
+
+(define-public texlive-dirtree
+  (package
+    (name "texlive-dirtree")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/dirtree/"
+                   "source/generic/dirtree/"
+                   "tex/generic/dirtree/")
+             (base32
+              "1righlip75ry0yc6kbpijq423k4m625byzgb55d32s7c0imvj41v")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dirtree")
+    (synopsis "Display trees in the style of Windows Explorer")
+    (description
+     "This package is designed to emulate the way Windows Explorer displays
+directory and file trees, with the root at top left, and each level of subtree
+displaying one step in to the right.  The macros work equally well with Plain
+TeX and with LaTeX.")
+    (license license:lppl)))
+
+(define-public texlive-docbytex
+  (package
+    (name "texlive-docbytex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/docbytex/"
+                   "tex/generic/docbytex/")
+             (base32
+              "09x4xpyq89jjjsp4yzrifcazz0p2f5w7785g8pvss8v0wwsb0lav")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/docbytex")
+    (synopsis "Creating documentation from source code")
+    (description
+     "The package creates documentation from C source code, or other
+programming languages.")
+    ;; README states: "You can do anything with the files from DocBy.TeX
+    ;; package without any limit".
+    (license (license:fsf-free "file://doc/generic/docbytex/README"))))
+
+(define-public texlive-dosepsbin
+  (package
+    (name "texlive-dosepsbin")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/dosepsbin.1"
+                   "doc/man/man1/dosepsbin.man1.pdf"
+                   "doc/support/dosepsbin/"
+                   "scripts/dosepsbin/"
+                   "source/support/dosepsbin/")
+             (base32
+              "117crwcdpirvvm9srrzjn40marg00q16rzyqipm3xxbmwv52i93c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "dosepsbin.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/dosepsbin")
+    (synopsis "Deal with DOS binary EPS files")
+    (description
+     "This package provides a Encapsulated PostScript (EPS) file may given in
+a special binary format to support the inclusion of a thumbnail.  This file
+format, commonly known as DOS EPS format, starts with a binary header that
+contains the positions of the possible sections: PostScript (PS); Windows
+Metafile Format (WMF); and Tag Image File Format (TIFF).  The PS section must
+be present and either the WMF file or the TIFF file should be given.  The
+package provides a Perl program that will extract any of the sections of such
+a file, in particular providing a text'-form EPS file for use with (La)TeX.")
+    (license license:artistic2.0)))
+
+(define-public texlive-dowith
+  (package
+    (name "texlive-dowith")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/dowith/"
+                   "source/generic/dowith/"
+                   "tex/generic/dowith/")
+             (base32
+              "1qlrcjac1qszgrap5v4g0d27g9k5ajqgyy493hmc9yh5wa9wmkmp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dowith")
+    (synopsis "Apply a command to a list of items")
+    (description
+     "The package provides macros for applying a command to all elements of
+a list without separators, and also for extending and reducing macros storing
+such lists.  Applications in mind belonged to LaTeX, but the package should
+work with other formats as well.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-bibtex8
+  (package
+    (name "texlive-bibtex8")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/csf/base/" "bibtex/csf/polish-csf/"
+                   "doc/bibtex8/" "doc/man/man1/bibtex8.1"
+                   "doc/man/man1/bibtex8.man1.pdf")
+             (base32
+              "1ywv5rdk08dnrqr09pnjzff37x2c9m5i1wjzfsjnvm068is58c7s")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bibtex8")
+    (synopsis "BibTeX variant supporting 8-bit encodings")
+    (description
+     "BibTeX8 is an enhanced, portable C version of BibTeX.  It is enhanced by
+conversion to larger (32-bit) capacity, addition of run-time selectable
+capacity and 8-bit support extensions.  National character set and sorting
+order are controlled by an external configuration file.")
+    (license license:gpl3+)))
+
+(define-public texlive-bibtexu
+  (package
+    (name "texlive-bibtexu")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/bibtexu/" "doc/man/man1/bibtexu.1"
+                   "doc/man/man1/bibtexu.man1.pdf")
+             (base32
+              "19bp8wn0ssz7gczxp0imbpgi1zwz9x3ya67f072rjzg2zmfpphqg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bibtexu")
+    (synopsis "BibTeX variant supporting Unicode (UTF-8), via ICU")
+    (description
+     "BibTeXu is an enhanced, portable C version of BibTeX.  Unicode is
+supported via the ICU library.")
+    (license license:gpl3+)))
+
+(define-public texlive-bundledoc
+  (package
+    (name "texlive-bundledoc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/arlatex.1"
+                   "doc/man/man1/arlatex.man1.pdf"
+                   "doc/man/man1/bundledoc.1"
+                   "doc/man/man1/bundledoc.man1.pdf"
+                   "doc/support/bundledoc/"
+                   "scripts/bundledoc/"
+                   "tex/latex/bundledoc/")
+             (base32
+              "1drgwqgkhr6ba4c21kyykl5y92x7dp6971if2hfcxsqk6kqy3ip1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "arlatex" "bundledoc")))
+    (home-page "https://ctan.org/pkg/bundledoc")
+    (synopsis "Bundle together all the files needed to build a LaTeX document")
+    (description
+     "The @code{bundledoc} package is a post-processor for the snapshot
+package that bundles together all the classes, packages and files needed to
+build a given LaTeX document.  It reads the @file{.dep} file that snapshot
+produces, finds each of the files mentioned therein, and archives them into
+a single @file{.tar.gz} (or @file{.zip}, or whatever) file, suitable for
+moving across systems, transmitting to a colleague, etc.  A script,
+@command{arlatex}, provides an alternative archiving mechanism, creating
+a single LaTeX file that contains all of the ancillary files of a LaTeX
+document, together with the document itself, using the @code{filecontents*}
+environment.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-checklistings
+  (package
+    (name "texlive-checklistings")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/checklistings/"
+                   "scripts/checklistings/"
+                   "source/latex/checklistings/"
+                   "tex/latex/checklistings/")
+             (base32
+              "1ggq4i7nfx6ijqikgr48qgaaf7rd9h4a834gwsz8dv5f0zmgg1za")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "checklistings.sh")))
+    (home-page "https://ctan.org/pkg/checklistings")
+    (synopsis
+     "Pass verbatim contents through a compiler and reincorporate the resulting output")
+    (description
+     "This package augments the @code{fancyvrb} and @code{listings} packages
+to allow the source code they contain to be checked by an external tool (like
+a compiler).  The external tool's messages can be automatically reincorporated
+into the original document.  The package does not focus on a specific
+programming language, but it is designed to work well with languages and
+compilers in the ML family.")
+    (license license:lppl1.2+)))
+
+(define-public texlive-chklref
+  (package
+    (name "texlive-chklref")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/chklref.1"
+                   "doc/man/man1/chklref.man1.pdf"
+                   "doc/support/chklref/" "scripts/chklref/"
+                   "tex/latex/chklref/")
+             (base32
+              "1namyi035gqhvldplj0yzfkgxq91zrifqxhsf32jgxhjgcbbal6g")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "chklref.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/chklref")
+    (synopsis "Check for problems with labels in LaTeX")
+    (description
+     "It is quite common that after modifying a TeX file, many unused labels
+remain in it.  The purpose of chklref is to automatically find these useless
+labels.  It also looks for non starred mathematical environments with no
+labels and advises the user to use a starred version instead.")
+    (license license:gpl3)))
+
+(define-public texlive-chktex
+  (package
+    (name "texlive-chktex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "chktex/"
+                   "doc/chktex/"
+                   "doc/man/man1/chktex.1"
+                   "doc/man/man1/chktex.man1.pdf"
+                   "doc/man/man1/chkweb.1"
+                   "doc/man/man1/chkweb.man1.pdf"
+                   "doc/man/man1/deweb.1"
+                   "doc/man/man1/deweb.man1.pdf"
+                   "scripts/chktex/")
+             (base32
+              "0qyrllxvcymmr1a4sq9c88fw5zchcx0n6yac69s61fg6xypk18bq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "chkweb.sh" "deweb.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/chktex")
+    (synopsis "Check for errors in LaTeX documents")
+    (description
+     "The program reports typographic and other errors in LaTeX documents.
+Filters are also provided for checking the LaTeX parts of CWEB documents.")
+    (license license:gpl2+)))
+
+(define-public texlive-clojure-pamphlet
+  (package
+    (name "texlive-clojure-pamphlet")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/pamphletangler.1"
+                   "doc/man/man1/pamphletangler.man1.pdf"
+                   "doc/support/clojure-pamphlet/"
+                   "scripts/clojure-pamphlet/"
+                   "source/support/clojure-pamphlet/"
+                   "tex/latex/clojure-pamphlet/")
+             (base32
+              "0dadr9wg7fa2vb6qkzqghrwmnns8jf4la1gb837a59jz2lh8955h")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "pamphletangler")))
+    (home-page "https://ctan.org/pkg/clojure-pamphlet")
+    (synopsis "Literate programming tool based on Clojure's Pamphlet system")
+    (description
+     "The Clojure pamphlet system is a system based on the Clojure literate
+system.  In the Clojure's pamphlet system you have your main LaTeX file, which
+can be compiled regularly.  This file contains documentation and source
+code (just like in other forms of literate programming).  These code snippets
+are wrapped in the @code{chunk} environment, hence they can be recognized by
+the tangler in order to extract them.  Chunks can be included inside each
+other by the @code{getchunk} command (which will be typesetted accordingly).
+Finally, the LaTeX file will be run through the tangler to get the desired
+chunk of code.")
+    (license license:gpl3+)))
+
+(define-public texlive-cluttex
+  (package
+    (name "texlive-cluttex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/cluttex/" "scripts/cluttex/")
+             (base32
+              "06i59jxanssx0hngnzkvmigg4gh0szm8n11095wlpdqrma1d162c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "cluttex.lua")))
+    (home-page "https://ctan.org/pkg/cluttex")
+    (synopsis "Automation tool for running LaTeX")
+    (description
+     "This is another tool for the automation of LaTeX document processing,
+like @command{latexmk} or @command{arara}.  The main feature of this tool is
+that it does not clutter your working directory with @file{.aux} or
+@file{.log} or other auxiliary files.  It has of course the usual features of
+automation tools.  It automatically re-runs (La)TeX for cross-references.
+MakeIndex, BibTeX, Biber, or @command{makeglossaries} will be executed if
+a corresponding option is set.  Furthermore, @command{cluttex} can watch input
+files for changes (using an external program).")
+    (license license:gpl3+)))
+
+(define-public texlive-ctan-o-mat
+  (package
+    (name "texlive-ctan-o-mat")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin name version
+                            (list "doc/man/man1/ctan-o-mat.1"
+                                  "doc/man/man1/ctan-o-mat.man1.pdf"
+                                  "doc/support/ctan-o-mat/"
+                                  "scripts/ctan-o-mat/")
+                            (base32
+                             "1pm95xh3ji2sgdy243nbnzxsg2p4xpl3pymkm5yg2fn3nzgwgnaf")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "ctan-o-mat.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/ctan-o-mat")
+    (synopsis "Upload or validate a package for CTAN")
+    (description
+     "This program can be used to automate the upload of a package to CTAN.
+The description of the package is contained in a configuration file.  The
+provided information is validated in any case.  If the validation succeeds and
+not only the validation is requested, then the provided archive file will be
+placed in the incoming area of the CTAN for further processing by the CTAN
+team.  In any case any finding during the validation is reported at the end of
+the processing.  Note that the validation is the default and an official
+submission has to be requested by an appropriate command line option.")
+    (license license:bsd-3)))
+
+(define-public texlive-ctan-chk
+  (package
+    (name "texlive-ctan-chk")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/ctan_chk/")
+             (base32
+              "09ngqgs08q8bld334jrzhnd558lv7fajfppmfrkp4kv9hc5iyz9a")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ctan_chk")
+    (synopsis "CTAN guidelines verifier and corrector for uploading projects")
+    (description
+     "@code{ctan_chk} is a basic Gawk program that uses CTAN's published
+guidelines for authors to help eliminate sloppiness in uploaded
+files/projects.  It is completely open for users to program additional
+guidelines as well as CTAN's future adjustments.")
+    (license license:gpl3)))
+
+(define-public texlive-ctanbib
+  (package
+    (name "texlive-ctanbib")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/ctanbib.1"
+                   "doc/man/man1/ctanbib.man1.pdf"
+                   "doc/support/ctanbib/" "scripts/ctanbib/")
+             (base32
+              "0vlx37g8mp8rqb744bngykzh8yszscw2vlv7n78c8ymagx2c1xpf")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "ctanbib")))
+    (home-page "https://ctan.org/pkg/ctanbib")
+    (synopsis "Export CTAN entries to bib format")
+    (description
+     "This package provides a Lua script which can be used for retrieving
+bibliographic information in BibLaTeX format for packages hosted on CTAN.  The
+@command{ctanbib} script depends only on LuaXML.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-ctanify
+  (package
+    (name "texlive-ctanify")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ctanify/"
+                   "doc/man/man1/ctanify.1"
+                   "doc/man/man1/ctanify.man1.pdf"
+                   "scripts/ctanify/")
+             (base32
+              "1m6gldzm0sm4j7v2kkrpqikx004sqdq0f2gw13gc8ccqzl745cjw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "ctanify")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/ctanify")
+    (synopsis "Prepare a package for upload to CTAN")
+    (description
+     "Given a list of filenames, @command{ctanify} creates a tarball (a
+@file{.tar.gz} file) with the files laid out in CTAN's preferred structure.
+By default this tarball additionally contains a ZIP file with copies of all
+files laid out in the standard TeX Directory Structure (TDS), which may be
+used by those intending to install the package, or by those who need to
+incorporate it in a distribution.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-ctanupload
+  (package
+    (name "texlive-ctanupload")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/ctanupload/"
+                   "scripts/ctanupload/")
+             (base32
+              "0w4k9sslhnpn5l90wbr7cr7pv8fhiiabasbi6l6gw3w3nrfmarh4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "ctanupload.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/ctanupload")
+    (synopsis "Support for users uploading to CTAN")
+    (description
+     "The package provides a Perl script that allows the uploads of
+a contribution to CTAN from the command line.  The aim is to simplify the
+release process for LaTeX package authors.  Note by the CTAN
+team (2015-02-05): It seems that this script is currently not working.")
+    (license license:gpl3)))
+
+(define-public texlive-ctie
+  (package
+    (name "texlive-ctie")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/ctie.1"
+                   "doc/man/man1/ctie.man1.pdf")
+             (base32
+              "1avhvyv70jds5xzwp7p1km6d8yha84ckqdw1r1vkgfb959wd3yi1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-kpathsea))
+    (home-page "https://ctan.org/pkg/ctie")
+    (synopsis "C version of @code{tie} (merging Web change files)")
+    (description
+     "This is a version of @code{tie} converted for use with Cweb.")
+    (license license:gpl3+)))
+
+(define-public texlive-de-macro
+  (package
+    (name "texlive-de-macro")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/de-macro/" "scripts/de-macro/")
+             (base32
+              "1lrrgdmzr6k2v6brz8w1s9v77c7pm7vmcvwga3d0pfndb39bh49j")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "de-macro")))
+    (inputs (list python))
+    (home-page "https://ctan.org/pkg/de-macro")
+    (synopsis "Expand private macros in a document")
+    (description
+     "De-macro is a Python script that helps authors who like to use private
+LaTeX macros (for example, as abbreviations).  A technical editor or
+a cooperating author may balk at such a manuscript; you can avoid manuscript
+rejection misery by running de-macro on it.  De-macro will expand macros
+defined in @code{\\(re)newcommand} or @code{\\(re)newenvironment} commands,
+within the document, or in the document's private package file.")
+    (license license:afl2.1)))
+
+(define-public texlive-detex
+  (package
+    (name "texlive-detex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/detex.1"
+                   "doc/man/man1/detex.man1.pdf")
+             (base32
+              "08d017wn7a67pmp9b5yhnfg1x2q6f48qaa5ma4bplz9a782icwjy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/detex")
+    (synopsis "Strip TeX from a source file")
+    (description
+     "Detex is a program to remove TeX constructs from a text file.  It
+recognizes the @code{\\input} command.  The program assumes it is dealing with
+LaTeX input if it sees the string @code{\\begin@{document@}} in the text.  In
+this case, it also recognizes the @code{\\include} and @code{\\includeonly}
+commands.  The author now considers this program to be obsolete and Piotr
+Kubowicz's OpenDetex as its successor.")
+    (license license:bsd-3)))
+
+(define-public texlive-digestif
+  (package
+    (name "texlive-digestif")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/digestif/" "scripts/digestif/")
+             (base32
+              "1s7nmbjxpa6klmh0cc6g4s6vd9wmlv4dxp51xb4b872hrj510zbi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "digestif.texlua")))
+    (home-page "https://ctan.org/pkg/digestif")
+    (synopsis "Editor plugin for LaTeX, ConTeXt etc.")
+    (description
+     "Digestif is a code analyzer, and a language server, for LaTeX, plain TeX,
+ConTeXt and Texinfo.  It provides context-sensitive completion, documentation,
+code navigation, and related functionality to any text editor that speaks the
+LSP protocol.")
+    (license (list license:gpl3+ license:lppl1.3+ license:fdl1.3+))))
+
+(define-public texlive-dtl
+  (package
+    (name "texlive-dtl")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/dt2dv.1"
+                   "doc/man/man1/dt2dv.man1.pdf"
+                   "doc/man/man1/dv2dt.1"
+                   "doc/man/man1/dv2dt.man1.pdf")
+             (base32
+              "0kvnsr8nxrys99rp74wlxnisfripx6jpjjkqy38d3d4gw13cvb5g")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dtl")
+    (synopsis "Tools to dis-assemble and re-assemble DVI files")
+    (description
+     "DTL (DVI Text Language) is a means of expressing the content of a DVI file,
+which is readily readable by humans.  The DTL bundle contains an assembler
+@command{dt2dv}, which produces DVI files from DTL files, and a disassembler
+@command{dv2dt}, which produces DTL files from DVI files.")
+    (license license:public-domain)))
+
+(define-public texlive-dtxgen
+  (package
+    (name "texlive-dtxgen")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/dtxgen/" "scripts/dtxgen/")
+             (base32
+              "1j1j136p4ddjlmwmhwlpmsxqpx2ixhhssfsl8l49lds80ad4y98m")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "dtxgen")))
+    (home-page "https://ctan.org/pkg/dtxgen")
+    (synopsis "Creates a template for a self-extracting @file{.dtx} file")
+    (description
+     "The Bash script dtxgen creates a template for a self-extracting
+@file{.dtx} file.  It is useful for those who plan to create a new documented
+LaTeX source (.dtx) file.")
+    (license license:gpl3+)))
+
+(define-public texlive-dvi2tty
+  (package
+    (name "texlive-dvi2tty")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/disdvi.1"
+                   "doc/man/man1/disdvi.man1.pdf"
+                   "doc/man/man1/dvi2tty.1"
+                   "doc/man/man1/dvi2tty.man1.pdf")
+             (base32
+              "108y0qxh13x0iivgsvkk4370f471p03nyl4x9nn7lng1wrsafp6h")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dvi2tty")
+    (synopsis "Produce ASCII from DVI")
+    (description
+     "This package provides a DVI driver to produce an ASCII representation of
+the document.")
+    (license license:gpl2)))
+
+(define-public texlive-dviasm
+  (package
+    (name "texlive-dviasm")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/dviasm/" "doc/man/man1/dviasm.1"
+                   "doc/man/man1/dviasm.man1.pdf"
+                   "scripts/dviasm/")
+             (base32
+              "1hx4j0pmh4h3194xxcvjnh5nr069sysbqxvg4zzmci6gjr7mjg7f")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "dviasm.py")))
+    (inputs (list python))
+    (home-page "https://ctan.org/pkg/dviasm")
+    (synopsis "Utility for editing DVI files")
+    (description
+     "This package provides a Python script to support changing or creating
+DVI files via disassembling into text, editing, and then reassembling into
+binary format.  It supports advanced features such as adding a preprint number
+or watermarks.")
+    (license license:gpl3+)))
+
+(define-public texlive-dvicopy
+  (package
+    (name "texlive-dvicopy")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/dvicopy.1"
+                   "doc/man/man1/dvicopy.man1.pdf")
+             (base32
+              "010bs4iyaja7mq5wy9mz6fzxlxf9472c2zdm93x9i474dzgnh2vl")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dvicopy")
+    (synopsis "Copy DVI files, flattening VFs")
+    (description
+     "@command{dvicopy} is a utility program that allows one to take a DVI
+file that references composite fonts (VF) and convert it into a DVI file that
+does not contain such references.  It also serves as a basis for writing DVI
+drivers (much like DVItype).")
+    (license license:gpl3+)))
+
+(define-public texlive-dvidvi
+  (package
+    (name "texlive-dvidvi")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/dvidvi.1"
+                   "doc/man/man1/dvidvi.man1.pdf")
+             (base32
+              "1w153rqm7nlmcf6162glxz282nbb6b6hjf5h0p7mbzr0j1357sxj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dvidvi")
+    (synopsis "Convert one DVI file into another")
+    (description
+     "This @command{dvidvi} converts one DVI file into another.  The output
+DVI file's contents are specified by page selection commands; series of pages
+and page number ranges may be specified, as well as inclusions and
+exclusions.")
+    ;; Its author stated the program is to be used under the GPL.  See
+    ;; <https://metadata.ftp-master.debian.org/changelogs//main/d/dvidvi/dvidvi_1.0-8.2_copyright>.
+    (license license:gpl3)))
+
+(define-public texlive-dviinfox
+  (package
+    (name "texlive-dviinfox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/dviinfox/" "scripts/dviinfox/")
+             (base32
+              "1rc662dllanawrlz2r0pnisl6zzc7c3bivsqy72iq87a92cq8kml")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "dviinfox.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/dviinfox")
+    (synopsis "Perl script to print DVI meta information")
+    (description
+     "The package provides a Perl script which prints information about a DVI
+file.  It also supports XeTeX XDV format.")
+    (license license:expat)))
+
+(define-public texlive-dviljk
+  (package
+    (name "texlive-dviljk")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/dvihp.1"
+                   "doc/man/man1/dvihp.man1.pdf"
+                   "doc/man/man1/dvilj.1"
+                   "doc/man/man1/dvilj.man1.pdf"
+                   "doc/man/man1/dvilj2p.1"
+                   "doc/man/man1/dvilj2p.man1.pdf"
+                   "doc/man/man1/dvilj4.1"
+                   "doc/man/man1/dvilj4.man1.pdf"
+                   "doc/man/man1/dvilj4l.1"
+                   "doc/man/man1/dvilj4l.man1.pdf"
+                   "doc/man/man1/dvilj6.1"
+                   "doc/man/man1/dvilj6.man1.pdf")
+             (base32
+              "03pi78c8ghy2gghzk1ffrvf5x7h8c1r0pv5pcspwxz365x2rsbjw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dviljk")
+    (synopsis "DVI to Laserjet output")
+    (description
+     "This package provides a DVI driver for the LaserJet printers, using
+@command{kpathsea} recursive file searching.")
+    (license license:gpl3+)))
+
+(define-public texlive-dviout-util
+  (package
+    (name "texlive-dviout-util")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/chkdvifont.1"
+                   "doc/man/man1/chkdvifont.man1.pdf"
+                   "doc/man/man1/dvispc.1"
+                   "doc/man/man1/dvispc.man1.pdf")
+             (base32
+              "098pksgf2iamq96rmzg5fw7i9dlpvdksficsz1bf8k8z4djnbk8n")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "Utilities from the @code{dviout} package")
+    (description
+     "This package provides two utilities: @command{chkdvifont}, which check
+fonts in DVI/TFM/JFM/FONT files, and @command{dvispc}, which corrects the
+page-independence of DVI file using color specials or tpic specials, and
+transforms between a DVI file and a text file.")
+    (license license:expat)))
+
+(define-public texlive-dvipng
+  (package
+    (name "texlive-dvipng")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/dvipng/"
+                   "doc/info/dvipng.info"
+                   "doc/man/man1/dvigif.1"
+                   "doc/man/man1/dvigif.man1.pdf"
+                   "doc/man/man1/dvipng.1"
+                   "doc/man/man1/dvipng.man1.pdf")
+             (base32
+              "0r001q4p5569dagayds1c56y10ls6f6v7mmywiw81l995q16apxi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dvipng")
+    (synopsis "DVI to PNG/GIF converter")
+    (description
+     "This program makes PNG and/or GIF graphics from DVI files as obtained
+from TeX and its relatives.  It offers very fast rendering of DVI as bitmap
+files, which makes it suitable for generating large amounts of images
+on-the-fly, as needed in @code{preview-latex}, WeBWorK and others.  It does
+not read the postamble, so it can be started before TeX finishes.")
+    (license license:lgpl3)))
+
+(define-public texlive-dvipos
+  (package
+    (name "texlive-dvipos")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/dvipos.1"
+                   "doc/man/man1/dvipos.man1.pdf")
+             (base32
+              "0dmaas4m9y4px53vlg0jr73xviki338fm2n176l8ldwqj0vvq1b8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "Support DVI @samp{pos:} specials used by ConTeXt DVI output")
+    (description
+     "@command{dvipos} parses a DVI file looking for @samp{pos:} specials.
+It then outputs the information from those specials along with information
+that only a DVI postprocessor could determine, such as the current @samp{x}
+and @samp{y} location.")
+    (license license:gpl2+)))
+
+(define-public texlive-dvipsconfig
+  (package
+    (name "texlive-dvipsconfig")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "dvips/dvipsconfig/")
+             (base32
+              "02vgk91y80ch4pkj83vbiz1b2ccigf152hm83p607y4n4qn2xzsf")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dvipsconfig")
+    (synopsis "Collection of dvips PostScript headers")
+    (description
+     "This is a collection of dvips PostScript header and dvips config files.
+They control certain features of the printer, including: A4, A3, usletter,
+simplex, duplex / long edge, duplex / short edge, screen frequencies of
+images, black/white invers, select transparency / paper for tektronix 550/560,
+manual feeder, envelope feeder, and tray 1, 2 and 3, and printing a PostScript
+grid underneath the page material--very useful for measuring and eliminating
+paper feed errors!")
+    (license license:gpl3+)))
+
+(define-public texlive-dvisvgm
+  (package
+    (name "texlive-dvisvgm")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/dvisvgm.1"
+                   "doc/man/man1/dvisvgm.man1.pdf")
+             (base32
+              "1fz3sa7p9wk2g1v0bpy87vz7nxwrh5bsfl4m734n6lhsh1bkj6fb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dvisvgm")
+    (synopsis
+     "Convert DVI, EPS, and PDF files to Scalable Vector Graphics format (SVG)")
+    (description
+     "Dvisvgm is a command line utility that converts TeX DVI as well as EPS
+and PDF files to the XML-based Scalable Vector Graphics (SVG) format.  It
+provides full font support including virtual fonts, font maps, and sub-fonts.
+If necessary, @command{dvisvgm} vectorizes Metafont's bitmap output in order
+to always create lossless scalable output.  The embedded SVG fonts can
+optionally be replaced with graphics paths so that applications that do not
+support SVG fonts are enabled to render the graphics properly.")
+    (license license:gpl3+)))
+
+(define-public texlive-eijkhout
+  (package
+    (name "texlive-eijkhout")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/generic/eijkhout/")
+             (base32
+              "00y3y01jpgzww1x6zjh748hpvizlrbgrv04p8aq3cm2pzs0g17qk")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/eijkhout")
+    (synopsis "Victor Eijkhout's packages")
+    (description
+     "The package provides three unrelated tools: @code{DB_process}, to parse
+and process database output; @code{CD_labeler}, to typeset user text to fit on
+a CD label; and @code{repeat}, a nestable, generic loop macro.")
+    (license
+     (list license:gpl2+                ;CD_labeler and DB_process.tex
+           license:lppl))))             ;repeat.tex
+
+(define-public texlive-encxvlna
+  (package
+    (name "texlive-encxvlna")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/encxvlna/"
+                   "tex/latex/encxvlna/" "tex/plain/encxvlna/")
+             (base32
+              "01lgh560xhn56k5pps65lq9c5rn0kbrcfvqfikrqq83g3n7k2p8v")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/encxvlna")
+    (synopsis "Insert nonbreakable spaces, using encTeX")
+    (description
+     "The package provides tools for inserting nonbreakable spaces after
+nonsyllabic prepositions and single letter conjunctions as required by Czech
+and Slovak typographical rules.  It is implemented using encTeX and provides
+files both for plain TeX and LaTeX.")
+    (license license:lppl)))
+
+(define-public texlive-epigram
+  (package
+    (name "texlive-epigram")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/generic/epigram/")
+             (base32
+              "1zps5067mgi7xq3fpjvjln8i0rz53j7qn660khraq8ribv4glnpf")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/epigram")
+    (synopsis "Display short quotations")
+    (description
+     "The package determines (on the basis of the width of the text of the
+epigram, laid out on a single line) whether to produce a line or a displayed
+paragraph.")
+    (license license:public-domain)))
+
+(define-public texlive-epsf-dvipdfmx
+  (package
+    (name "texlive-epsf-dvipdfmx")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/epsf-dvipdfmx/"
+                   "tex/plain/epsf-dvipdfmx/")
+             (base32
+              "0xj4hag3nldxxjcpympvra5cdn19nk76af9dxq07ci585gcki3x5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/epsf-dvipdfmx")
+    (synopsis "Plain TeX file for using epsf.tex with (x)dvipdfmx")
+    (description
+     "@file{epsf-dvipdfmx.tex} is a plain TeX file to be @code{\\input} after
+@file{epsf.tex} when using plain TeX with @code{dvipdfmx}.  It is needed when
+an @file{.eps} file has anything except the origin for the lower-left of its
+bounding box.")
+    (license license:public-domain)))
+
+(define-public texlive-expex-acro
+  (package
+    (name "texlive-expex-acro")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/expex-acro/"
+                   "source/generic/expex-acro/"
+                   "tex/generic/expex-acro/")
+             (base32
+              "04ckyr574bs10xd2a0fg6x30325a4dbbbjl1axzlhaq1kn07r7kh")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/expex-acro")
+    (synopsis "Wrapper for the expex package")
+    (description
+     "This is a small wrapper for the @code{expex} package, adding ways to
+define, use, and summarize glossing abbreviations.  It also provides commands
+to refer to examples, as well as some inline formatting commands commonly used
+in linguistics.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-expkv-bundle
+  (package
+    (name "texlive-expkv-bundle")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/expkv-bundle/"
+                   "source/latex/expkv-bundle/"
+                   "tex/context/third/expkv-bundle/"
+                   "tex/generic/expkv-bundle/"
+                   "tex/latex/expkv-bundle/")
+             (base32
+              "09ijb71w69bnhi38i8z2bnv8d4r4sdg337v61yi66y94z8d9iid9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/expkv-bundle")
+    (synopsis "Expandable @samp{key=val} implementation and friends")
+    (description
+     "This is a collection of different packages that provide @samp{key=value}
+functionality in plainTeX, LaTeX, and ConTeXt.
+
+At the core, the @code{expkv} package implements two expandable
+@samp{key=value} parsers that are somewhat fast and robust against common bugs
+in many key=value implementations (no accidental brace stripping, no fragility
+for active commas or equals signs).
+
+@code{expkv-cs} enables users to define expandable @samp{key=value} macros in
+a comfortable and straightforward way.
+
+@code{expkv-def} provides an interface to define common key types for
+@code{expkv} similar to the key defining interfaces of widespread
+@samp{key=value} implementations.
+
+@code{expkv-opt} allows to parse package or class options in LaTeX via
+@code{expkv}.
+
+@code{expkv-pop} is a utility package to define prefix oriented parsers that
+allow a somewhat natural formulation.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-fenixpar
+  (package
+    (name "texlive-fenixpar")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/fenixpar/"
+                   "tex/generic/fenixpar/")
+             (base32
+              "1363dr8fnhflw0mysv23mpp2vf02vfxs43nnv95yqkbsvp9fj502")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fenixpar")
+    (synopsis "One-shot changes to token registers such as @code{\\everypar}")
+    (description
+     "The bundle provides two packages, @code{fenxitok} and
+@code{fenixpar}.  The @code{fenixtok} package provides user macros to
+add material to a token register; the material will be
+(automatically) removed from the token register when the register is executed.
+Material may be added either to the left or to the right, and care is taken
+not to override any redefinition that may be included in the token register
+itself.  The @code{fenixpar} package uses the macros of @code{fenixtok} to
+provide a user interface to manipulation of the @code{\\everypar} token
+register.  The packages require the e-TeX extensions; with them, they work
+either with Plain TeX or with LaTeX.")
+    (license license:lppl)))
+
+(define-public texlive-figflow
+  (package
+    (name "texlive-figflow")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/figflow/" "tex/plain/figflow/")
+             (base32
+              "1vsrsw5rrqjym0flca9537m41vs7wlk8mhl9zmqjfaxgi8jvc9ml")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/figflow")
+    (synopsis "Flow text around a figure")
+    (description
+     "This package provides a Plain TeX macro @code{\\figflow} that allows one
+to insert a figure into an area inset into a paragraph.  Command arguments are
+width and height of the figure, and the figure (and its caption) itself.  The
+package does not work with LaTeX; packages such as @code{wrapfig},
+@code{floatflt} and @code{picins} support the needs of LaTeX users in this
+area.")
+    ;; README states: "You may freely use, modify, and/or distribute this
+    ;; file, without limitation."
+    (license (license:fsf-free "file://doc/plain/figflow/README"))))
+
+(define-public texlive-findhyph
+  (package
+    (name "texlive-findhyph")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/findhyph.1"
+                   "doc/man/man1/findhyph.man1.pdf"
+                   "doc/support/findhyph/" "scripts/findhyph/")
+             (base32
+              "1bxj0li1a9qsvwmp0kmfsal4vsgsqal1lgmp4423z9nvwrwvvlrr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "findhyph")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/findhyph")
+    (synopsis "Find hyphenated words in a document")
+    (description
+     "Findhyph is a Perl script that will analyse the log file from running
+your document with @code{\\tracingparagraphs=1} set.  The output contains
+enough context to enable you to find the hyphenated word that's being
+referenced.")
+    (license license:gpl2)))
+
+(define-public texlive-fixpdfmag
+  (package
+    (name "texlive-fixpdfmag")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/plain/fixpdfmag/")
+             (base32
+              "0s5ilsmnhvi57x9cqwp7nwpagfribmgkbl0z1ci55aw2a6bff9hn")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fixpdfmag")
+    (synopsis "Fix magnification in pdfTeX")
+    (description
+     "This package provides a recent change to pdfTeX has caused magnification
+to apply to page dimensions.")
+    (license license:public-domain)))
+
+(define-public texlive-fltpoint
+  (package
+    (name "texlive-fltpoint")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/fltpoint/"
+                   "source/generic/fltpoint/"
+                   "tex/generic/fltpoint/")
+             (base32
+              "0k85cyh39rxr3jrgyxcj1lrya5zss5da62pj7q8412naaklkhd7n")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fltpoint")
+    (synopsis "Simple floating point arithmetic")
+    (description
+     "The package provides simple floating point operations (addition,
+subtraction, multiplication, division and rounding).")
+    (license license:lppl1.2+)))
+
+(define-public texlive-fntproof
+  (package
+    (name "texlive-fntproof")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/fntproof/"
+                   "tex/generic/fntproof/")
+             (base32
+              "0pw0nw0dalnxqxpfgpw4pglngz3iff8sxxfdn89ygz46sv6427n5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fntproof")
+    (synopsis "Programmable font test pattern generator")
+    (description
+     "The package implements all the font testing commands of Knuth's
+@file{testfont.tex}, but arranges that information necessary for each command
+is supplied as arguments to that command, rather than prompted for.  This
+makes it possible to type all the tests in one command line, and easy to input
+the package in a file and to use the commands there.  A few additional
+commands supporting this last purpose are also made available.")
+    (license license:public-domain)))
+
+(define-public texlive-font-change
+  (package
+    (name "texlive-font-change")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/font-change/"
+                   "tex/plain/font-change/")
+             (base32
+              "1b2i3gwrwfa2ab95m2ksmypiwc5dmfyirymhm18g1h0zpj86ccza")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/font-change")
+    (synopsis "Macros to change text and mathematics fonts in plain TeX")
+    (description
+     "This package provides macros to change text and mathematics fonts in
+TeX.  The macros are written for plain TeX and may be used with other packages
+like AmSTeX, eplain, etc.  They also work with XeTeX. The macros allow users
+to change the fonts (for both text and mathematics) in their TeX document with
+only one statement.  The fonts may be used readily at various predefined
+sizes.")
+    (license license:cc-by-sa3.0)))
+
+(define-public texlive-fontch
+  (package
+    (name "texlive-fontch")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/fontch/" "tex/plain/fontch/")
+             (base32
+              "19v8l76181yhan6ybc47i5sq4mirc8lc7x1zxqxmk15wyvax9lm9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fontch")
+    (synopsis "Changing fonts, sizes and encodings in Plain TeX")
+    (description
+     "The fontch macros allow the user to change font size and family anywhere
+in a plain TeX document.  Sizes of 8, 10, 12, 14, 20 and 24 points are
+available.  A sans serif family is defined in addition to the families already
+defined in plain TeX. Optional support for Latin Modern T1 and TS1 fonts is
+given.  There are macros for non-latin1 letters and for most TS1 symbols.
+Math mode always uses CM fonts.  A command for producing doubled-spaced
+documents is also provided.")
+    (license license:lppl)))
+
+(define-public texlive-fontools
+  (package
+    (name "texlive-fontools")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/afm2afm.1"
+                   "doc/man/man1/afm2afm.man1.pdf"
+                   "doc/man/man1/autoinst.1"
+                   "doc/man/man1/autoinst.man1.pdf"
+                   "doc/man/man1/ot2kpx.1"
+                   "doc/man/man1/ot2kpx.man1.pdf"
+                   "doc/support/fontools/"
+                   "fonts/enc/dvips/fontools/"
+                   "scripts/fontools/")
+             (base32
+              "0jfqwhj2i9x9bzq723ch5z3sydfkaha4xr0xlp2haav713ll5027")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "afm2afm" "autoinst" "ot2kpx")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/fontools")
+    (synopsis "Tools to simplify using fonts (especially TT/OTF ones)")
+    (description
+     "This package provides tools to simplify using OpenType fonts with LaTeX.
+By far the most important program in this bundle is @command{autoinst},
+a wrapper script around Eddie Kohler's LCDF TypeTools.  Autoinst aims to
+automate the installation of OpenType fonts in LaTeX by calling the LCDF
+TypeTools (with the correct options) for all fonts you wish to install, and
+generating the necessary @file{.fd} and @file{.sty} files.
+
+In addition, this bundle contains a few other, less important utilities:
+@itemize
+@item @command{afm2afm}: re-encodes @file{.afm} files,
+@item @command{ot2kpx}: extract kerning pairs from OpenType fonts,
+@item @command{splitttc}: split an OpenType Collection file (ttc or
+otc) into individual fonts.
+@end itemize")
+    (license license:gpl2)))
+
+(define-public texlive-fontware
+  (package
+    (name "texlive-fontware")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/pltotf.1"
+                   "doc/man/man1/pltotf.man1.pdf"
+                   "doc/man/man1/tftopl.1"
+                   "doc/man/man1/tftopl.man1.pdf"
+                   "doc/man/man1/vftovp.1"
+                   "doc/man/man1/vftovp.man1.pdf"
+                   "doc/man/man1/vptovf.1"
+                   "doc/man/man1/vptovf.man1.pdf")
+             (base32
+              "0ng27m6cz92aa52z99gnw5i8s8fbkxq4354mygwnchchgxndcba0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/vfware")
+    (synopsis "Tools for virtual font metrics")
+    (description
+     "Virtual font metrics are usually created in a textual form, the Virtual
+Property List, but programs that use them need to use binary files (the
+Virtual Font and the TeX Font Metric).  The two programs provided in this
+package translate between the two forms: @command{vptovf} takes a VPL file and
+generates a VF file and a TFM file; @command{vftovp} takes a VF file and a TFM
+file and generates a VPL file.")
+    (license license:knuth)))
+
+(define-public texlive-fragmaster
+  (package
+    (name "texlive-fragmaster")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/fragmaster/"
+                   "scripts/fragmaster/")
+             (base32
+              "1vwbkbg96dql73gayb06gs2fdxynljibjkmhliglc9ddggyx4v2m")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "fragmaster.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/fragmaster")
+    (synopsis "Using @command{psfrag} with pdfLaTeX")
+    (description
+     "Fragmaster enables you to use @command{psfrag} with pdfLaTeX.  It takes
+EPS files and @command{psfrag} substitution definition files, and produces PDF
+and EPS files with the substitutions included.")
+    (license license:gpl3+)))
+
+(define-public texlive-getoptk
+  (package
+    (name "texlive-getoptk")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/getoptk/" "tex/plain/getoptk/")
+             (base32
+              "19ndqi977wk6f9ikcvbllcbxmmfzdanjfznzx6pkq41caf4mj91y")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/getoptk")
+    (synopsis "Define macros with sophisticated options")
+    (description
+     "The package provides a means of defining macros whose options are taken
+from a dictionary, which includes options which themselves have arguments.
+The package was designed for use with Plain TeX.")
+    (license license:cecill-b)))
+
+(define-public texlive-gfnotation
+  (package
+    (name "texlive-gfnotation")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/gfnotation/"
+                   "tex/plain/gfnotation/")
+             (base32
+              "18yl6qhwd3fk6fyi6plj0bcb6iwzr4yx9aqmhs77rs5k4j2rgxsf")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/gfnotation")
+    (synopsis "Typeset Gottlob Frege's notation in plain TeX")
+    (description
+     "The package implements macros for plain TeX to typeset the notation
+invented by Gottlob Frege in 1879 for his books @emph{Begriffsschrift} and
+@emph{Grundgesetze der Arithmetik} (two volumes).  The output styles of both
+books are supported.")
+    (license license:gpl3)))
+
+(define-public texlive-gobble
+  (package
+    (name "texlive-gobble")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/gobble/"
+                   "source/generic/gobble/"
+                   "tex/generic/gobble/")
+             (base32
+              "02g40fx99xn80af6bqv7zn16l8dnqihqd42vn5hbphfx85b3p49q")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-ydoc))
+    (home-page "https://ctan.org/pkg/gobble")
+    (synopsis "More gobble macros for PlainTeX and LaTeX")
+    (description
+     "The LaTeX package @code{gobble} includes several gobble macros not
+included in the LaTeX kernel.  These macros remove a number of arguments after
+them, a feature regulary used inside other macros.  This includes gobble
+macros for optional arguments.
+
+The LaTeX package @code{gobble-user} provides these macros at the user level,
+i.e.  using names without @samp{@@@@} so that these can be used without
+@code{\\makeatletter} and @code{\\makeatother}.  The same macros are provided
+inside @file{.tex} files for use with plain-TeX or other TeX formats.
+However, the gobble macros for optional macros require @code{\\@@@@ifnextchar}
+to be defined.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-graphics-pln
+  (package
+    (name "texlive-graphics-pln")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/graphics-pln/"
+                   "tex/plain/graphics-pln/")
+             (base32
+              "1iv3g76dzkpr2qak79bj9sdm6w9lb0n2md32cc23szrhgv6q7il3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/graphics-pln")
+    (synopsis "LaTeX-style graphics for Plain TeX users")
+    (description
+     "The Plain TeX graphics package is mostly a thin shell around the LaTeX
+@code{graphicx} and @code{color} packages, with support of the LaTeX-isms in
+those packages provided by @code{miniltx}.  The bundle also contains a file
+@file{picture.tex}, which is a wrapper around the @file{autopict.sty}, and
+provides the LaTeX picture mode to Plain TeX users.")
+    (license license:lppl1.0+)))
+
+(define-public texlive-gtl
+  (package
+    (name "texlive-gtl")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/gtl/" "source/generic/gtl/"
+                   "tex/generic/gtl/")
+             (base32
+              "066g0zmndj7dda1by6jsxqccfkglmf2xq2sn0xk5f8x900h2wbbz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/gtl")
+    (synopsis "Manipulating generalized token lists")
+    (description
+     "The package provides tools for simple operations on lists of tokens
+which are not necessarily balanced.  It is in particular used a lot in the
+@code{unravel} package, to go through tokens one at a time rather than having
+to work with entire braced groups at a time.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-hlist
+  (package
+    (name "texlive-hlist")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/hlist/" "tex/generic/hlist/")
+             (base32
+              "14rm9npzcanw4p4nkqd0rrm4655f9yhw58zf0qfa5azs305ba687")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/hlist")
+    (synopsis "Horizontal and columned lists")
+    (description
+     "This plain TeX and LaTeX package provides the @code{hlist} environment
+in which @code{\\hitem} starts a horizontal and columned item.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-hyplain
+  (package
+    (name "texlive-hyplain")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/hyplain/" "tex/plain/hyplain/")
+             (base32
+              "1xj23zhv0sapjvchlcp013d32kayjf48wq5ywdak5n0fkb09mzl2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/hyplain")
+    (synopsis "Basic support for multiple languages in Plain TeX")
+    (description
+     "The package offers a means to set up hyphenation suitable for several
+languages and/or dialects, and to select them or switch between them while
+typesetting.")
+    (license license:public-domain)))
+
+(define-public texlive-inputnormalization
+  (package
+    (name "texlive-inputnormalization")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/inputnormalization/"
+                   "source/latex/inputnormalization/"
+                   "tex/latex/inputnormalization/")
+             (base32
+              "0nfvcmr0lp7nig8mz3j1lwi0wbk8yf1ibdnz3lq22pysfjjl3200")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/inputnormalization")
+    (synopsis "Wrapper for XeTeX's and LuaTeX's input normalization")
+    (description
+     "This package provides a cross engine interface to normalizing input
+before it's read by TeX.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-insbox
+  (package
+    (name "texlive-insbox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/insbox/" "tex/generic/insbox/")
+             (base32
+              "0br6xpn9y11nw2pdjxck6mijbw2q6g2v31p64hwn65bwnx1fnc25")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/insbox")
+    (synopsis "Insert pictures/boxes into paragraphs")
+    (description
+     "The package provides convenient bundling of the @code{\\parshape}
+primitive.  This is a TeX package.")
+    (license license:public-domain)))
+
+(define-public texlive-js-misc
+  (package
+    (name "texlive-js-misc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/js-misc/" "tex/plain/js-misc/")
+             (base32
+              "03cixw6rbg787ma8v43py07vrmhijf9cfg965ndahbzyhi6vkc96")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/js-misc")
+    (synopsis "Miscellaneous macros from Joachim Schrod")
+    (description
+     "This package provides a bunch of packages, including: @file{idverb.tex},
+for short verbatim; @file{xfig.tex}, for including xfig/transfig output in
+a TeX document; and @file{cassette.tex} for setting cassette labels.")
+    (license license:public-domain)))
+
+(define-public texlive-lambda-lists
+  (package
+    (name "texlive-lambda-lists")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/lambda-lists/"
+                   "tex/plain/lambda-lists/")
+             (base32
+              "1dlm6yr0z7d2j4wn1i1khf47sf79y4h2aahymm3y11ljr5pg012r")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lambda-lists")
+    (synopsis "Lists in ``TeX's mouth''")
+    (description
+     "These list-processing macros avoid the reassignments employed in the
+macros shown in Appendix D of the TeXbook: all the manipulations take place in
+what Knuth is pleased to call ``TeX's mouth''.")
+    (license license:lppl)))
+
+(define-public texlive-langcode
+  (package
+    (name "texlive-langcode")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/langcode/"
+                   "source/generic/langcode/"
+                   "tex/generic/langcode/")
+             (base32
+              "0ygshcc0iszaldzc8ygz4bgvz05c3kv81v3m7i4q46l57x2kfx6x")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/langcode")
+    (synopsis "Simple language-dependent settings based on language codes")
+    (description
+     "The package provides a command @code{\\uselangcode@{<code>@}} to adjust
+language-dependent settings such as key words, typographical conventions and
+language codes (ISO 639-1).  The package provides a means of selecting macros
+according to the specified code, for preparing a document that is to be
+separately typeset in different languages.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-lecturer
+  (package
+    (name "texlive-lecturer")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/lecturer/"
+                   "tex/generic/lecturer/")
+             (base32
+              "0ry4r1zcq71kk672dnnpzah0aw2axj7frajbv6xwy6hf2hzzs0ln")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lecturer")
+    (synopsis "On-screen presentations for (almost) all formats")
+    (description
+     "The package creates slides for on-screen presentations based on PDF
+features without manipulating TeX's typesetting process.  The presentation
+flow relies on PDF's abilities to display content step by step.  Features
+include:
+
+@itemize
+@item Free positioning of anything anywhere in painted areas on the slide, as
+well as in the main text block;
+@item Numerous attributes to control the layout and the presentation flow,
+from TeX's primitive dimensions to the visibility of steps;
+@item Feature inheritance from global to local settings, with intermediate
+types; Basic drawing facilities to produce symbols, e.g., for list items or
+buttons;
+@item Colours, transparency, shades, and pictures;
+@item Navigation with links, pop-up menus, and customizable bookmarks;
+@item Easy switch between presentation and handout; and PDF transitions.
+@end itemize
+
+Besides the traditional documentation, the distribution includes visual
+documentation and six demo presentations ranging from geometric abstraction to
+classic style to silly video game.")
+    (license license:lppl)))
+
+(define-public texlive-letterspacing
+  (package
+    (name "texlive-letterspacing")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/generic/letterspacing/")
+             (base32
+              "0ry7rri76dgbrkzr6na2kkh7bn0jpwkhh9b5qw0cl5xwyp81rddg")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/letterspacing")
+    (synopsis "Letter spacing")
+    (description
+     "This package helps spacing out the letters of text; the command is
+@code{\\letterspace<\\hbox modifier>@{<text>@}}: the text is placed in an
+@code{\\hbox} of the specified size, and space is inserted between each glyph
+to make the text fit the box.  Note that letterspacing is not ordinarily
+considered acceptable in modern typesetting of English.")
+    (license license:knuth)))
+
+(define-public texlive-localloc
+  (package
+    (name "texlive-localloc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/localloc/"
+                   "source/generic/localloc/"
+                   "tex/generic/localloc/")
+             (base32
+              "0vcfdxh800ksr4wrrvykdm27qvlhqkylbik4j93pr59g13h9g90f")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/localloc")
+    (synopsis "Macros for localizing TeX register allocations")
+    (description
+     "This package approaches the problem of the shortage of registers, by
+providing a mechanism for local allocation.  The package works with Plain TeX
+and LaTeX.")
+    (license license:knuth)))
+
+(define-public texlive-metatex
+  (package
+    (name "texlive-metatex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/metatex/" "tex/plain/metatex/")
+             (base32
+              "0pdgx59ckp9qdfidl37y8mv3dyvza9lxmhgbqk69ckywm3kbb2n9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/metatex")
+    (synopsis "Incorporate Metafont pictures in TeX source")
+    (description
+     "METATeX is a set of plain TeX and Metafont macros that you can use to
+define both the text and the figures in a single source file.  Because METATeX
+sets up two way communication, from TeX to Metafont and back from Metafont to
+TeX, drawing dimensions can be controlled by TeX and labels can be located by
+Metafont.  Only standard features of TeX and Metafont are used, but two runs
+of TeX and one of Metafont are needed.")
+    (license license:gpl3+)))
+
+(define-public texlive-midnight
+  (package
+    (name "texlive-midnight")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/midnight/"
+                   "tex/generic/midnight/")
+             (base32
+              "024g170k8cfcddch2c0qvq1als0ncp9v2zqv77yzay5jqx4iv1d7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/midnight")
+    (synopsis "Set of useful macro tools")
+    (description
+     "This package provides macro tools:
+@itemize
+@item @code{quire}: making booklets, etc.;
+@item @code{gloss}: vertically align words in consecutive sentences;
+@item @code{loop}: a looping construct;
+@item @code{dolines}: meta'-macros to separate arguments by newlines;
+@item @code{labels}: address labels and bulk mail letters;
+@item @code{styledef}: selectively input part of a file;
+@item @code{border}: borders around boxes.
+@end itemize")
+    ;; All files share the same license, which is Knuth's with additional
+    ;; requirements about documentation and references to the original source
+    ;; when modified.
+    (license (license:fsf-free "file://tex/generic/midnight/border.tex"))))
+
+(define-public texlive-modulus
+  (package
+    (name "texlive-modulus")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/modulus/"
+                   "source/generic/modulus/"
+                   "tex/generic/modulus/")
+             (base32
+              "07sa8bnbgclfz4p3sb00cl1b3i51nvhhlmb4p6hcyaca1n1xsn8d")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/modulus")
+    (synopsis "Non-destructive modulus and integer quotient operator for TeX")
+    (description
+     "The package provides an easy way to take the remainder of a division
+operation without destroying the values of the counters containing the
+dividend and divisor.  It also provides a way to take the integer quotient of
+a division operation without destroying the values of the counters containing
+the dividend and divisor.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-namedef
+  (package
+    (name "texlive-namedef")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/namedef/"
+                   "source/generic/namedef/"
+                   "tex/generic/namedef/")
+             (base32
+              "1rc97c8zn1gb1cfqf70q5iphnbkgay4xmw1a2h55kc9wj4ql2j5d")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-l3kernel))
+    (home-page "https://ctan.org/pkg/namedef")
+    (synopsis "TeX definitions with named parameters")
+    (description
+     "This package provides a prefix @code{\\named} to be used in TeX
+definitions so that parameters can be identified by their name rather than by
+number, giving parameters a semantic rather than syntactic meaning, making it
+easy to understand long definitions.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-navigator
+  (package
+    (name "texlive-navigator")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/navigator/"
+                   "tex/generic/navigator/")
+             (base32
+              "17rs718rvp9f6dakdl99abgq5rcflsw6kyxjknhjya019l2y23m3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/navigator")
+    (synopsis "PDF features across formats and engines")
+    (description
+     "Navigator implements PDF features for all formats (with some limitations
+in ConTeXt) with pdfTeX, LuaTeX and XeTeX.  Its features include: customizable
+outlines (i.e.  bookmarks); anchors; links and actions (e.g., JavaScript or
+user-defined PDF actions); file embedding (not in ConTeXt); document
+information and PDF viewer's display (not in ConTeXt); and commands to create
+and use raw PDF objects.")
+    (license license:lppl)))
+
+(define-public texlive-newsletr
+  (package
+    (name "texlive-newsletr")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/newsletr/" "tex/plain/newsletr/")
+             (base32
+              "0c7ggyx1jnw05vn589awxxbpfqkwf7kq4qn9pm61ycb6p9n3nn0h")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/newsletr")
+    (synopsis "Macros for making newsletters with Plain TeX")
+    (description
+     "This package provides macros for making newsletters with Plain TeX.")
+    ;; License is almost Knuth's, but requires marking modifications
+    ;; explicitly instead of simply renaming the file.
+    (license (license:fsf-free "file://doc/plain/newsletr/read.me"))))
+
+(define-public texlive-ofs
+  (package
+    (name "texlive-ofs")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/ofs/" "tex/generic/ofs/")
+             (base32
+              "0dcsa9xlcdvwd4qd6n6yli8arcy3s6896svgk5nbmgplan2nz1cw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ofs")
+    (synopsis "Macros for managing large font collections")
+    (description
+     "OFS (Olsak's Font System) is a set of Plain TeX and LaTeX macros for
+managing large font collections.  Its main features include:
+
+@itemize
+@item mapping from long names of fonts to the metric file name.  The user can
+specify only exact long names in documents;
+@item support for many font encodings;
+@item printing of catalogues of fonts and test samples of font families; the
+interactive macro @code{\\showfonts} shows all font families you have
+installed via OFS.
+@end itemize")
+    (license license:knuth)))
+
+(define-public texlive-olsak-misc
+  (package
+    (name "texlive-olsak-misc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/olsak-misc/"
+                   "tex/generic/olsak-misc/")
+             (base32
+              "0kl83yvj299w7v69a20i5yi91h46n0k080rg6z1jjwdxm0g893a0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/olsak-misc")
+    (synopsis "Collection of plain TeX macros written by Petr Olsak")
+    (description
+     "This is a collection of various single-file plain TeX macros written
+by Petr Olsak:
+
+@itemize
+@item @file{booklet.tex}: re-orders PDF pages and collects them for booklet
+printing;
+@item @file{cnv.tex}: conversion of texts;
+@item @file{cnv-pu.tex}: example of usage of @file{cnv.tex} --- pdf outlines
+in Unicode;
+@item @file{cnv-word.tex}: example of usage of @file{cnv.tex} --- word to word
+conversion;
+@item @file{eparam.tex}: full expansion during parameter scanning;
+@item @file{fun-coffee.tex}: generates splotches in the document;
+@item @file{openclose.tex}: repairs balanced text between @code{\\Open} and
+@code{\\Close} pair;
+@item @file{qrcode.tex}: QR code generated at TeX level;
+@item @file{scanbase.tex}: parser of text-style MySQL outputs;
+@item @file{scancsv.tex}: parser of CSV format;
+@item @file{seplist.tex}: macros with alternative separators of a parameter;
+@item @file{xmlparser.tex}: parser of XML language.
+@end itemize")
+    (license license:public-domain)))
+
+(define-public texlive-outerhbox
+  (package
+    (name "texlive-outerhbox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/generic/outerhbox/")
+             (base32
+              "1867xhxlbskiysifmwlr10lay8khragzi36fm552cwc4vjz2ybcz")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/outerhbox")
+    (synopsis "Collect horizontal material for contributing to a paragraph")
+    (description
+     "The package provides the @code{\\outerhbox} command, which is similar to
+@code{\\hbox}, except that material is set in outer horizontal mode.  This
+prevents TeX from optimising away maths penalties and the like, that are
+needed when the material is @code{\\unhbox}'ed.")
+    (license license:gpl3+)))
+
+(define-public texlive-path
+  (package
+    (name "texlive-path")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/path/" "tex/generic/path/")
+             (base32
+              "09m1f9si97hrfqsyj0mzbi9djgk0w4vq13yd3v0af9v3240h1ps2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/path")
+    (synopsis "Typeset paths, making them breakable")
+    (description
+     "This package defines a macro @code{\\path|...|}, similar to the LaTeX
+@code{\\verb|...|}, that sets the text in typewriter font and allows
+hyphen-less breaks at punctuation characters.  The set of characters to be
+regarded as punctuation may be changed from the package's default.")
+    (license license:knuth)))
+
+(define-public texlive-pdf-trans
+  (package
+    (name "texlive-pdf-trans")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/pdf-trans/"
+                   "tex/generic/pdf-trans/")
+             (base32
+              "1n7l0p1950lk3n5jm3si0qqhb8b7mm7jh33fm97l2r7d3qn9jac8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pdf-trans")
+    (synopsis "Macros for various transformations of TeX boxes")
+    (description
+     "@code{pdf-trans} is a set of macros offering various transformations of
+TeX boxes (based on plain and pdfeTeX primitives).")
+    (license license:public-domain)))
+
+(define-public texlive-pdfmsym
+  (package
+    (name "texlive-pdfmsym")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/pdfmsym/"
+                   "tex/generic/pdfmsym/")
+             (base32
+              "128lhj72s2ddzbl7w3pl6cw84qqmx322rw1jb4m2db8whj8d2fbz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pdfmsym")
+    (synopsis "PDF Math Symbols --- various drawn mathematical symbols")
+    (description
+     "This package defines a handful of mathematical symbols many of which are
+implemented via PDF's builtin drawing utility.  It is intended for use with
+pdfTeX and LuaTeX and is supported by XeTeX to a lesser extent.  Among the
+symbols it defines are some variants of commonly used ones, as well as more
+obscure symbols which cannot be as easily found in other TeX or LaTeX
+packages.")
+    (license license:expat)))
+
+(define-public texlive-pitex
+  (package
+    (name "texlive-pitex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/pitex/" "tex/plain/pitex/")
+             (base32
+              "1rqawfqmh9sh7rfpfrhbmysmn1rlzmbs26nla8fj0xr45vx60219")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pitex")
+    (synopsis "Documentation macros")
+    (description
+     "The bundle provides macros that the author uses when writing
+documentation (for example, that of the @code{texapi} and @code{yax}
+packages).")
+    (license license:lppl)))
+
+(define-public texlive-placeins-plain
+  (package
+    (name "texlive-placeins-plain")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/plain/placeins-plain/")
+             (base32
+              "1lhc72zdm2cjynx6lf6kafmf00nw17z3mnfhagh41h76cnm338g9")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/placeins-plain")
+    (synopsis "Insertions that keep their place")
+    (description
+     "This TeX file provides various mechanisms (for plain TeX and close
+relatives) to let insertions (footnotes, topins, pageins, etc.) float within
+their appropriate section, but to prevent them from intruding into the
+following section, even when sections do not normally begin a new page.")
+    (license license:public-domain)))
+
+(define-public texlive-plainpkg
+  (package
+    (name "texlive-plainpkg")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/plainpkg/"
+                   "source/generic/plainpkg/"
+                   "tex/generic/plainpkg/")
+             (base32
+              "10p796lms7rzwqgjf60nqm8x79hiz1cwiq1j8acjg1a6lnvadbq0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/plainpkg")
+    (synopsis "Minimal method for making generic packages")
+    (description
+     "The package provides a minimal method for making generic (i.e.,
+TeX-format-independent) packaged, combining maybeload functionality, fallback
+definitions for LaTeX @code{\\ProvidesPackage} and @code{\\RequirePackage}
+functionality, and handling of arbitrary (multiple) private letters (analagous
+LaTeX packages use of @samp{@@@@}) in nested package files.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-plipsum
+  (package
+    (name "texlive-plipsum")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/plipsum/" "tex/plain/plipsum/")
+             (base32
+              "0q8qnv212q9mgc00w9akdvpky1gbmirqrkdmi9v1wbf7c0ws2qda")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/plipsum")
+    (synopsis "@emph{Lorem ipsum} for Plain TeX developers")
+    (description
+     "The package provides a paragraph generator designed for use in Plain TeX
+documents.  The paragraphs generated contain many f-groups (@samp{ff},
+@samp{fl} etc.) so the text can act as a test of the ligatures of the font in
+use.")
+    (license license:lppl)))
+
+(define-public texlive-plnfss
+  (package
+    (name "texlive-plnfss")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/plnfss/" "tex/plain/plnfss/")
+             (base32
+              "1cgnp8y9m0ziq1pfvjx83vi0r0k5xpckk0kiijy0g80wd3s4zbsd")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/plnfss")
+    (synopsis "Font selection for Plain TeX")
+    (description
+     "Plnfss is a set of macros to provide easy font access (somewhat similar
+to NFSS but with some limitations) with Plain TeX.  Plnfss can automatically
+make use of PSNFSS @code{fd} files, i.e., when an Adobe Type 1 is used the
+relevant @code{fd} file will be loaded automatically.  For @code{cmr}-like
+fonts (@code{ec}, @code{vnr}, @code{csr} or @code{plr} fonts), a special
+format called @code{pfd} (plain @code{fd}) is required and must be loaded
+manually.")
+    (license license:lppl)))
+
+(define-public texlive-plstmary
+  (package
+    (name "texlive-plstmary")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/plstmary/" "tex/plain/plstmary/")
+             (base32
+              "03adq5fkl620z0hpbdpqcsm1qjxlr43ip1bhi5xv2izxpw952x0z")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/plstmary")
+    (synopsis "St Mary's Road font support for plain TeX")
+    (description
+     "The package provides commands to produce all the symbols of the St
+Mary's Road fonts, in a Plain TeX environment.")
+    (license license:public-domain)))
+
+(define-public texlive-poormanlog
+  (package
+    (name "texlive-poormanlog")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/poormanlog/"
+                   "tex/generic/poormanlog/")
+             (base32
+              "1wbpjxjn3bvi4bmcq62ydafc8a72wq2vhzfx2gcn20sn3x4qc0hg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/poormanlog")
+    (synopsis "Logarithms and powers with (almost) 9 digits")
+    (description
+     "This small package (usable with Plain e-TeX, LaTeX, or others) with no
+dependencies provides two fast expandable macros computing logarithms in base
+10 and fractional powers of 10.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-present
+  (package
+    (name "texlive-present")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/present/" "tex/plain/present/")
+             (base32
+              "1dc7h14z7xw232mgqjayl1a4ab5pj9bz2d9wgmznh4bjylgw4lwp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/present")
+    (synopsis "Presentations with Plain TeX")
+    (description
+     "The package offers a collection of simple macros for preparing
+presentations in Plain TeX.  Slide colour and text colour may be set, links
+between parts of the presentation, to other files, and to web addresses may be
+inserted.  Images may be included easily, and code is available to provide
+transition effects between slides or frames.  The structure of the macros is
+not overly complex, so that users should find it easy to adapt the macros to
+their specific needs.")
+    (license license:lppl)))
+
+(define-public texlive-pwebmac
+  (package
+    (name "texlive-pwebmac")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/pwebmac/" "tex/plain/pwebmac/")
+             (base32
+              "18mc66iv5jszxwnrwvlx2c040521mray480my9pdcl7aw5w2z4a2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pwebmac")
+    (synopsis "Consolidated WEB macros for DVI and PDF output")
+    (description
+     "The original WEB system by Donald Knuth has the macros webmac.tex that
+produce DVI output only; for historic reasons, it will never be
+modified (apart from catastrophic errors).  Han The Thanh has modified these
+macros in his @file{pdfwebmac.tex} for PDF output (only) with pdfTeX.
+Jonathan Kew's XeTeX has similar macros @file{xewebmac.tex} by Khaled Hosny
+that modify @file{webmac.tex} for PDF output; these macros can only be used
+with a specific TeX engine each.  The present @code{pwebmac} package
+integrates these three WEB macro files similar to @file{cwebmac.tex} in Silvio
+Levy's and Don Knuth's CWEB system, so @file{pwebmac.tex} can be used with
+Plain TeX, pdfTeX, and XeTeX alike.
+
+Its initial application is the production of PDF and HINT files for all major
+WEB programs for TeX and friends.  For this purpose, the shell script
+@command{makeall} was whipped together; it provides various command line
+options and works around several quirks in the WEB sources.
+
+WEB programmers who want to use @file{pwebmac.tex} instead of the default
+@file{webmac.tex} in their programs have to change the first line in the TeX
+file created by @code{weave}.  From there, all depends on the TeX engine you
+use.")
+    (license license:public-domain)))
+
+(define-public texlive-random
+  (package
+    (name "texlive-random")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/random/" "tex/generic/random/")
+             (base32
+              "04z7s4pm620bfjwgl46g4bqxzm2ab70ai8pj1x4p0qg8n50xaylf")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/random")
+    (synopsis "Generate pseudo-random numbers in TeX")
+    (description
+     "This package generates pseudo-random integers.  Macros are to provide
+random integers in a given range, or random dimensions, which can be used to
+provide random real numbers.")
+    (license license:public-domain)))
+
+(define-public texlive-randomlist
+  (package
+    (name "texlive-randomlist")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/randomlist/"
+                   "source/generic/randomlist/"
+                   "tex/generic/randomlist/")
+             (base32
+              "04pbbxxnynyc3l94560vvnad3rx7l2ic6p078az15v5qic7rki84")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/randomlist")
+    (synopsis
+     "Deal with database, loop, and random in order to build personalized
+exercises")
+    (description
+     "The main aim of this package is to work on lists, especially with random
+operations.  The hidden aim is to build a personnal collection of exercises
+with different data for each pupil.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-resumemac
+  (package
+    (name "texlive-resumemac")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/resumemac/"
+                   "tex/plain/resumemac/")
+             (base32
+              "0q6ngs2inzk2nk9f06s9w9q2qhx71dw7nflmrc9hzx9w0pinw830")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/resumemac")
+    (synopsis "Plain TeX macros for resumes")
+    (description "This package provides a set of macros for resumes.")
+    (license license:public-domain)))
+
+(define-public texlive-ruler
+  (package
+    (name "texlive-ruler")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/generic/ruler/")
+             (base32
+              "1ikap9dkdw9lzpda0f2krizqbfkyjxvyddils7clim9nhg77aq71")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ruler")
+    (synopsis "Typographic ruler for TeX")
+    (description
+     "The file processes to produce (real) rulers; the author suggests
+printing them on transparent plastic and trimming for use as a real ruler.
+The rule widths are 0.05mm, which can be challenging for (old) laser
+printers.")
+    (license license:gpl3+)))
+
+(define-public texlive-schemata
+  (package
+    (name "texlive-schemata")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/schemata/"
+                   "source/generic/schemata/"
+                   "tex/generic/schemata/")
+             (base32
+              "1196653ankylbcsiv1cnrrazz2qplcs27llpv947h4m94vx4sl19")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/schemata")
+    (synopsis "Print topical diagrams")
+    (description
+     "The package facilitates the creation of topical schemata, i.e.,
+outlines that use braces (or facsimiles thereof) to illustrate the breakdown
+of concepts and categories in Scholastic thought from late medieval and early
+modern periods.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-shade
+  (package
+    (name "texlive-shade")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/shade/"
+                   "fonts/source/public/shade/"
+                   "tex/generic/shade/")
+             (base32
+              "1b7m11d374cx5rcrvgd2jld1wzixvky3mqdg54hnsg9x14p2dxpg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/shade")
+    (synopsis "Shade pieces of text")
+    (description
+     "The package provides a shaded backdrop to a box of text.  It uses
+a Metafont font (provided) which generates to appropriate shading dependent on
+the resolution used in the Metafont printer parameters.")
+    (license license:lppl1.0+)))
+
+(define-public texlive-simplekv
+  (package
+    (name "texlive-simplekv")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/simplekv/"
+                   "tex/generic/simplekv/")
+             (base32
+              "0ghyb0m7hyqa10pwcza9z2wyb7010n3snpj1rdp79z8jfq5c288m")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/simplekv")
+    (synopsis "Simple key/value system for TeX and LaTeX")
+    (description
+     "The package provides a simple key/value system for TeX and LaTeX.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-swrule
+  (package
+    (name "texlive-swrule")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/generic/swrule/")
+             (base32
+              "075mshpyi9gxbi3n0hbh3ygidzw1daxy697lhc7cc99i39y8scpi")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/swrule")
+    (synopsis "Lines thicker in the middle than at the ends")
+    (description
+     "This package defines commands that create rules split into
+a (specified) number of pieces, whose size varies to produce the
+effect of a rule that swells in its centre.")
+    ;; Library mentions: "The style package is copyrighted but may be used and
+    ;; extended in any way, as long as a pointer to the original author is
+    ;; maintained.  The author is not liable for any problem that may or may
+    ;; not result from using this package. Use at your own risk".
+    (license (license:fsf-free "file://tex/generic/swrule/swrule.sty"))))
+
+(define-public texlive-systeme
+  (package
+    (name "texlive-systeme")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/systeme/"
+                   "tex/generic/systeme/")
+             (base32
+              "02n8bchq9crv21cqvji4kkrjsyp34wny5i047jyp1j2yz8i99m5y")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/systeme")
+    (synopsis "Format systems of equations")
+    (description
+     "The package allows you to enter systems of equations or inequalities in
+an intuitive way, and produces typeset output where the terms and signs are
+aligned vertically.  The package works with plain TeX or LaTeX, but e-TeX is
+required.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-tabto-generic
+  (package
+    (name "texlive-tabto-generic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/generic/tabto-generic/")
+             (base32
+              "0i65jflbnhqpqf1w7pkagicic1s39gcl319z7g9zr1g80f9532dv")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tabto-generic")
+    (synopsis "Tab to a measured position in the line")
+    (description
+     "@code{\\tabto@{<length>@}} moves the typesetting position to
+@code{<length>} from the left margin of the paragraph.  If the typesetting
+position is already further along, @code{\\tabto} starts a new line.")
+    (license license:public-domain)))
+
+(define-public texlive-termmenu
+  (package
+    (name "texlive-termmenu")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/termmenu/"
+                   "source/generic/termmenu/"
+                   "tex/generic/termmenu/")
+             (base32
+              "0d1pdz5izr43ndji7g28932dnnf8d6nxvh8bay2yk7647yh47aj4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/termmenu")
+    (synopsis "Support for terminal-based menus")
+    (description
+     "When writing programs, it's often required to present the user with
+a list of options or actions.  The user is then expected to select one of
+these options for the program to process.  @code{termmenu} provides this
+mechanism for TeX.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tex
+  (package
+    (name "texlive-tex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/initex.1"
+                   "doc/man/man1/initex.man1.pdf"
+                   "doc/man/man1/tex.1"
+                   "doc/man/man1/tex.man1.pdf")
+             (base32
+              "1n4jybv4qghg74anpj7n7kj4l908f476q597vyvvq59fd9k5m7mm")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:texlive-latex-bin? #f
+           #:create-formats #~(list "tex")))
+    (propagated-inputs
+     (list texlive-cm
+           texlive-hyphen-base
+           texlive-knuth-lib
+           texlive-kpathsea
+           texlive-plain))
+    (home-page "https://ctan.org/pkg/tex")
+    (synopsis "Sophisticated typesetting engine")
+    (description
+     "TeX is a typesetting system that incorporates a macro processor.  A TeX
+source document specifies or incorporates a number of macro definitions that
+instruct the TeX engine how to typeset the document.  The TeX engine also uses
+font metrics generated by Metafont, or by any of several other mechanisms that
+incorporate fonts from other sources into an environment suitable for TeX.
+TeX has been, and continues, a basis and an inspiration for several other
+programs, including e-TeX and PDFTeX.  The distribution includes the source of
+Knuth's TeX book; this source is there to read, as an example of writing TeX ;
+it should not be processed without Knuth's direct permission.")
+    (license license:knuth)))
+
+(define-public texlive-tex-ps
+  (package
+    (name "texlive-tex-ps")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/tex-ps/cmyk-hax/"
+                   "doc/generic/tex-ps/poligraf/"
+                   "dvips/tex-ps/" "tex/generic/tex-ps/")
+             (base32
+              "09f70q2bhmq7bn98f2g2pq62wnfhj24bzkbv652sjrw5rafp0311")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tex-ps")
+    (synopsis "TeX to PostScript generic macros and add-ons")
+    (description
+     "This package provides TeX to PostScript generic macros and add-ons:
+transformations of EPS files, prepress preparation, color separation, mirror,
+etc.")
+    (license license:public-domain)))
+
+(define-public texlive-texdate
+  (package
+    (name "texlive-texdate")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/texdate/"
+                   "source/generic/texdate/"
+                   "tex/generic/texdate/")
+             (base32
+              "0knssay50rm8pbksph20hhfbpwwby3a9pswvxyq63imn5qppz2dp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/texdate")
+    (synopsis "Date printing, formatting, and manipulation in TeX")
+    (description
+     "TeX and LaTeX provide few facilities for dates by default, though many
+packages have filled this gap.  This package fills it, as well, with a pure
+TeX-primitive implementation.  It can print dates, advance them by numbers of
+days, weeks, or months, determine the weekday automatically, and print them
+in (mostly) arbitrary format.  It can also print calendars (monthly and
+yearly) automatically, and can be easily localized for non-English
+languages.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-texdimens
+  (package
+    (name "texlive-texdimens")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/texdimens/"
+                   "tex/generic/texdimens/")
+             (base32
+              "0l6raryqpxydis9kq6sd4pvz7d2rzrrsnx7k9n3d3921pp208lv4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/texdimens")
+    (synopsis "Conversion of TeX dimensions to decimals")
+    (description
+     "This package provides utilities and documentation related to TeX
+dimensional units, usable both with Plain TeX and with LaTeX.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-timetable
+  (package
+    (name "texlive-timetable")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/plain/timetable/")
+             (base32
+              "1lnl8gi2rrzcy688qb8b1ff9yivwxdqmbcfx2ph49aymkxfym97b")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/timetable")
+    (synopsis "Generate timetables")
+    (description
+     "This package provides a highly-configurable package, with nice output
+and simple input.  The macros use a radix sort mechanism so that the order of
+input is not critical.")
+    (license license:lppl)))
+
+(define-public texlive-transparent-io
+  (package
+    (name "texlive-transparent-io")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/transparent-io/")
+             (base32
+              "04zfmk25qw2cnja1zqhafabsy26zalxiawf6pm5zqx4x1jl47i6j")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/transparent-io")
+    (synopsis
+     "Show for approval the filenames used in @code{\\input}, @code{\\openin},
+or @code{\\openout}")
+    (description
+     "This package provides macros to make the file I/O in plain TeX more
+transparent.  That is, every @code{\\input}, @code{\\openin}, and
+@code{\\openout} operation by TeX is presented to the user who must check
+carefully if the file name of the source is acceptable.  The user must
+sometimes enter additional text and has to specify the file name that the TeX
+operation should use.  The macros require a complex installation procedure;
+the package contains Sed and Bash scripts.  Every installation is different
+from any other as password-protected macro names and private messages have to
+be chosen by the installer.  Therefore, the files in the package cannot be
+used directly.  For details see the manual.")
+    (license license:gpl3)))
+
+(define-public texlive-treetex
+  (package
+    (name "texlive-treetex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/treetex/" "tex/plain/treetex/")
+             (base32
+              "0cv7kwa865i473l8ffsyq5n7kw6pihclf87asbpsc1rx2h4v6mhs")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/treetex-plain")
+    (synopsis "Draw trees")
+    (description
+     "This package provides macros to draw trees, within TeX or LaTeX.")
+    (license license:public-domain)))
+
+(define-public texlive-trigonometry
+  (package
+    (name "texlive-trigonometry")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/trigonometry/"
+                   "tex/generic/trigonometry/")
+             (base32
+              "165n813kj0znfrnqkqv0gja3nyr2lznnhbmsay6l8a5nj59h7cxl")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/trigonometry")
+    (synopsis "Demonstration code for cos and sin in TeX macros")
+    (description
+     "This package provides a document that both provides macros that are
+usable elsewhere, and demonstrates the macros.  The code uses the classical
+analytical expansion of sin and cos.")
+    (license license:knuth)))
+
+(define-public texlive-upca
+  (package
+    (name "texlive-upca")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/upca/" "tex/generic/upca/")
+             (base32
+              "0miqn29dln9c2nlvcivsq7ciyb70ffk16v7dmzfn976xnvfsjbiw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/upca")
+    (synopsis "Print UPC-A barcodes")
+    (description
+     "The package defines a single macro @code{\\upca}, to print UPC-A
+barcodes.")
+    (license license:lppl)))
+
+(define-public texlive-varisize
+  (package
+    (name "texlive-varisize")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/varisize/" "tex/plain/varisize/")
+             (base32
+              "0nd89zhwyg5z9wcy1lixg3hzcfw83lsilkjhhy9kir0fi9whdbv4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/varisize")
+    (synopsis "Change font size in Plain TeX")
+    (description
+     "This package provides a series of files, each of which defines
+a size-change macro.  Note that @file{10point.tex} is by convention called by
+one of the other files, so that there's always a way back.")
+    (license license:public-domain)))
+
+(define-public texlive-xii
+  (package
+    (name "texlive-xii")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/xii/")
+             (base32
+              "19jhzv5hqzj59wrfcr1dsj6z56qfckax694idgf8arri5lnbkdd8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xii")
+    (synopsis "Christmas silliness (English)")
+    (description
+     "This is the plain TeX file @file{xii.tex}.  Call @samp{pdftex xii.tex}
+to produce a (perhaps) surprising typeset document.")
+    (license license:lppl)))
+
+(define-public texlive-xii-lat
+  (package
+    (name "texlive-xii-lat")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/xii-lat/")
+             (base32
+              "1nn54xv71kcmn9jbkcslz6a64cvjcay9x96rrxnakdj9qcqd27r5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xii-lat")
+    (synopsis "Christmas silliness (Latin)")
+    (description
+     "This is the plain TeX file @file{xii-lat.tex}.  Call @samp{pdftex
+xii-lat.tex} to produce a (perhaps) surprising typeset document.")
+    (license license:lppl)))
+
+(define-public texlive-xintsession
+  (package
+    (name "texlive-xintsession")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/xintsession/"
+                   "tex/plain/xintsession/")
+             (base32
+              "0rd2jmq62ariq73qwch1hz1jmzdw6sn48ngh64pgm6qkqbpddxkv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xintsession")
+    (synopsis
+     "Interactive computing sessions (fractions, floating points, polynomials)")
+    (description
+     "This package provides support for interactive computing sessions with
+e-TeX (or pdfTeX) executed on the command line.  Once @code{xintsession} is
+loaded, e-TeX becomes an interactive computing software capable of executing
+arbitrary precision calculations, or exact calculations with arbitrarily big
+fractions.  It can also manipulate polynomials as algebraic entities.
+Numerical variables and functions can be defined during the session, and each
+evaluation result is stored in automatically labeled variables.  A file is
+automatically created storing inputs and outputs.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-xlop
+  (package
+    (name "texlive-xlop")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/xlop/" "tex/generic/xlop/")
+             (base32
+              "1yqks7jvb5ikg2xx038rsxbkhagms1zqjmipnv49rqliavcq03gj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xlop")
+    (synopsis "Calculate and display arithmetic operations")
+    (description
+     "Xlop (eXtra Large OPeration) will typeset arithmetic problems either
+in-line or as in school (using French school conventions).  Many other
+features allow to deal with numbers (tests, display, some high level
+operations, etc.)")
+    (license license:lppl1.3+)))
+
+(define-public texlive-zztex
+  (package
+    (name "texlive-zztex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/zztex/" "tex/plain/zztex/")
+             (base32
+              "07vx3m2g4vl2v1nxxy5dih67jg406y2i94sgkrmplm54b0pp42g3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/zztex")
+    (synopsis "TeX macro package for producing books, journals, and manuals")
+    (description
+     "The ZzTeX macro package is a full-featured TeX macro package specially
+designed for producing books, journals, and manuals.  ZzTeX runs under Plain
+TeX.")
+    (license license:expat)))
+
+(define-public texlive-lcdftypetools
+  (package
+    (name "texlive-lcdftypetools")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/cfftot1.1"
+                   "doc/man/man1/cfftot1.man1.pdf"
+                   "doc/man/man1/mmafm.1"
+                   "doc/man/man1/mmafm.man1.pdf"
+                   "doc/man/man1/mmpfb.1"
+                   "doc/man/man1/mmpfb.man1.pdf"
+                   "doc/man/man1/otfinfo.1"
+                   "doc/man/man1/otfinfo.man1.pdf"
+                   "doc/man/man1/otftotfm.1"
+                   "doc/man/man1/otftotfm.man1.pdf"
+                   "doc/man/man1/t1dotlessj.1"
+                   "doc/man/man1/t1dotlessj.man1.pdf"
+                   "doc/man/man1/t1lint.1"
+                   "doc/man/man1/t1lint.man1.pdf"
+                   "doc/man/man1/t1rawafm.1"
+                   "doc/man/man1/t1rawafm.man1.pdf"
+                   "doc/man/man1/t1reencode.1"
+                   "doc/man/man1/t1reencode.man1.pdf"
+                   "doc/man/man1/t1testpage.1"
+                   "doc/man/man1/t1testpage.man1.pdf"
+                   "doc/man/man1/ttftotype42.1"
+                   "doc/man/man1/ttftotype42.man1.pdf")
+             (base32
+              "0yjbc6rsf8c62qa1lyi9kjyjy2p0xlps19llnvly3xyhla08j76f")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-glyphlist))
+    (home-page "https://ctan.org/pkg/lcdf-typetools")
+    (synopsis "Bundle of outline font manipulation tools")
+    (description
+     "This bundle of tools comprises:
+@itemize
+@item @command{cfftot1}, which translates a Compact Font Format
+(CFF) font, or a PostScript-flavored OpenType font, into PostScript
+Type 1 format.  It correctly handles subroutines and hints;
+
+@item @command{mmafm} and @command{mmpfb}, which create instances of
+multiple-master fonts;
+
+@item @command{otfinfo}, which reports information about OpenType
+fonts, such as the features they support and the contents of their
+size optical size features;
+
+@item @command{otftotfm}, which creates TeX font metrics and encodings
+that correspond to a PostScript-flavored OpenType font.  It will
+interpret glyph positionings, substitutions, and ligatures as far as
+it is able.  You can say which OpenType features should be activated;
+
+@item @command{t1dotlessj}, which creates a Type 1 font whose only
+character is a dotless j matching the input font's design;
+
+@item @command{t1lint}, which checks a Type 1 font for correctness;
+
+@item @command{t1reencode}, which replaces a font's internal encoding
+with one you specify;
+
+@item @command{t1testpage}, which creates a PostScript proof for
+a Type 1 font.
+@end itemize")
+    (license license:gpl3+)))
+
+(define-public texlive-latex
+  (package
+    (name "texlive-latex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/base/" "makeindex/latex/"
+                   "source/latex/base/" "tex/latex/base/")
+             (base32
+              "0yqxf70rzhzyrr5jrcqmqay9zhjz8f3qhcxak01g5cywdgvzfmpq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:texlive-latex-bin? #f
+      #:tex-engine "tex"
+      #:tex-format #f
+      #:build-targets #~(list "unpack.ins")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-lua-build
+            ;; The literal tab in the dtx file is translated to the string
+            ;; "^^I" in the generated Lua file, which causes a syntax error.
+            (lambda _
+              (substitute* "source/latex/base/ltluatex.dtx"
+                (("\t") "  ")))))))
+    (propagated-inputs
+     (list texlive-latex-fonts
+           texlive-latexconfig
+           texlive-luatex
+           texlive-pdftex))
+    (home-page "https://ctan.org/pkg/latex")
+    (synopsis "TeX macro package that defines LaTeX")
+    (description
+     "LaTeX is a widely-used macro package for TeX, providing many basic
+document formating commands extended by a wide range of packages.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-latexbug
+  (package
+    (name "texlive-latexbug")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/latexbug/"
+                   "source/latex/latexbug/"
+                   "tex/latex/latexbug/")
+             (base32
+              "0l9cyw41knbw3prsi4rbd2av4qfpkvzjs754847kv72dq1304m1i")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/latexbug")
+    (synopsis "Bug-classification for LaTeX related bugs")
+    (description
+     "The package is written in order to help identifying the rightful
+addressee for a bug report.  The LaTeX team asks that it will be loaded in any
+test file that is intended to be sent to the LaTeX bug database as part of
+a bug report.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-luafindfont
+  (package
+    (name "texlive-luafindfont")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/luafindfont.1"
+                   "doc/man/man1/luafindfont.man1.pdf"
+                   "doc/support/luafindfont/"
+                   "scripts/luafindfont/")
+             (base32
+              "1xyqlbwgsbb5al2ss9w40wsigsmlj97rf6ck3rih41s0js7yz4aj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "luafindfont.lua")))
+    (home-page "https://ctan.org/pkg/luafindfont")
+    (synopsis "Search fonts in the LuaTeX font database")
+    (description "This Lua script searches for fonts in the font database.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-bidi
+  (package
+    (name "texlive-bidi")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/bidi/" "source/xelatex/bidi/"
+                   "tex/xelatex/bidi/")
+             (base32
+              "0zrmdgzbd8shzv1m1xvfqz515mwy5igkjwnnc4jrm1csbjf7jnj8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/bidi")
     (synopsis "Bidirectional typesetting in plain TeX and LaTeX using XeTeX")
-    (description "The @code{bidi} package provides a convenient interface for
-typesetting bidirectional texts with plain TeX and LaTeX.  The package
-includes adaptations for use with many other commonly-used packages.")
+    (description
+     "The @code{bidi} package provides a convenient interface for typesetting
+bidirectional texts with plain TeX and LaTeX.  The package includes
+adaptations for use with many other commonly-used packages.")
     (license license:lppl1.3+)))
 
-(define-public texlive-libkpathsea
-  (package/inherit texlive-bin
-    (name "texlive-libkpathsea")
-    (source
-     (origin
-       (inherit (package-source texlive-bin))
-       (snippet
-        `(begin
-           ,(origin-snippet (package-source texlive-bin))
-           (with-directory-excursion "texk"
-             (let ((preserved-directories '("." ".." "kpathsea")))
-               (for-each
-                delete-file-recursively
-                (scandir "."
-                         (lambda (file)
-                           (and (not (member file preserved-directories))
-                                (eq? 'directory (stat:type (stat file)))))))))))))
-    (arguments
-     (substitute-keyword-arguments (package-arguments texlive-bin)
-       ((#:configure-flags flags)
-        `(cons* "--disable-all-pkgs" "--enable-kpathsea"
-                "--enable-shared" ,flags))
-       ((#:phases phases)
-        `(modify-phases %standard-phases
-           (add-after 'install 'post-install
-             (lambda* (#:key inputs outputs #:allow-other-keys)
-               (with-directory-excursion "texk/kpathsea"
-                 (invoke "make" "install"))))))))
-    (inputs '())
-    (synopsis "Path searching library")
-    (description "kpathsea is a library, whose purpose is to return a filename
-from a list of user-specified directories similar to how shells look up
-executables.  It is maintained as a part of TeX Live.")))
+(define-public texlive-bidi-atbegshi
+  (package
+    (name "texlive-bidi-atbegshi")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/bidi-atbegshi/"
+                   "tex/xelatex/bidi-atbegshi/")
+             (base32
+              "08gawna9hf5p3rn0v5qzszk61zqknixafvh6d2x37x960x493gn7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bidi-atbegshi")
+    (synopsis "Bidi-aware shipout macros")
+    (description
+     "The package adds some commands to the @code{atbegshi} package for proper
+placement of background material in the left and right corners of the output
+page, in both LTR and RTL modes.  The package only works with @code{xelatex}
+format and should be loaded before the @code{bidi} package.")
+    (license license:lppl1.3+)))
 
-(define-syntax-rule (define-deprecated-package old-name name)
-  "Define OLD-NAME as a deprecated package alias for NAME."
-  (define-deprecated/public old-name name
-    (deprecated-package (symbol->string 'old-name) name)))
+(define-public texlive-bidicontour
+  (package
+    (name "texlive-bidicontour")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/bidicontour/"
+                   "tex/xelatex/bidicontour/")
+             (base32
+              "1kiqbn5map3d9bmlvr5cq1snssw44c772xzjp6yyjvg6wg1zy0bn")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bidicontour")
+    (synopsis "Bidi-aware coloured contour around text")
+    (description
+     "The package is a re-implementation of the @code{contour} package, making
+it Bidi-aware, and adding support of the xdvipdfmx (when the outline option of
+the package is used).")
+    (license license:lppl1.3+)))
+
+(define-public texlive-bidipagegrid
+  (package
+    (name "texlive-bidipagegrid")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/bidipagegrid/"
+                   "tex/xelatex/bidipagegrid/")
+             (base32
+              "19jkg4apf1g3whigcchbcf8p14lpxkz9ih2vrw00akwfh8v3ssrk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bidipagegrid")
+    (synopsis "Bidi-aware page grid in background")
+    (description "The package provides Bidi-aware page grid in background.  It
+is based on @code{pagegrid}.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-bidipresentation
+  (package
+    (name "texlive-bidipresentation")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/bidipresentation/"
+                   "tex/xelatex/bidipresentation/")
+             (base32
+              "0b9md68zzj3nzi9b4hdavjz43nwair1xg3b240p0bp5ly5l6pvmr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bidipresentation")
+    (synopsis "Experimental bidi presentation")
+    (description
+     "This package provides a great portion of the code is borrowed from the
+texpower bundle, with modifications to get things working properly in both
+right to left and left to right modes.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-bidishadowtext
+  (package
+    (name "texlive-bidishadowtext")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/bidishadowtext/"
+                   "tex/xelatex/bidishadowtext/")
+             (base32
+              "1nq71bgz7vag9k138mx8hsf42cjvgry2g4z9jiqmq4almm23a1gq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bidishadowtext")
+    (synopsis "Bidi-aware shadow text")
+    (description
+     "This package allows you to typeset Bidi-aware shadow text.  It is
+a re-implementation of the @code{shadowtext} package adding Bidi support.")
+    (license license:lppl1.3+)))
 
 (define-public texlive-alphalph
-  (let ((template (simple-texlive-package
-                   "texlive-alphalph"
-                   (list "doc/latex/alphalph/"
-                         "source/latex/alphalph/"
-                         "tex/generic/alphalph/")
-                   (base32
-                    "0ap59hmg0brg2wlh3bl77jxfxrk7hphhdal8cr05mby9bw35gffy"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/alphalph")
-         ((#:build-targets _ '())
-          #~(list "alphalph.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/alphalph")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (propagated-inputs
-       (list texlive-intcalc texlive-infwarerr))
-      (home-page "https://ctan.org/pkg/alphalph")
-      (synopsis "Convert numbers to letters")
-      (description
-       "This package provides commands @code{\\alphalph} and
-@code{\\AlphAlph}.  They are like @code{\\number} but the expansion
-consists of lowercase and uppercase letters respectively (1 to a, 26 to
-z, 27 to aa, 52 to zz, 53 to ba, 702 to zz, 703 to aaa, etc.).
-Alphalph's commands can be used as a replacement for LaTeX's
-@code{\\@@alph} and @code{\\@@Alph} macros.")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-alphalph")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/alphalph/"
+                   "source/latex/alphalph/"
+                   "tex/generic/alphalph/")
+             (base32
+              "0ap59hmg0brg2wlh3bl77jxfxrk7hphhdal8cr05mby9bw35gffy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/alphalph")
+    (synopsis "Convert numbers to letters")
+    (description
+     "This package provides commands @code{\\alphalph} and @code{\\AlphAlph}.
+They are like @code{\\number} but the expansion consists of lowercase and
+uppercase letters respectively (1 to a, 26 to z, 27 to aa, 52 to zz, 53 to ba,
+702 to zz, 703 to aaa, etc.).  Alphalph's commands can be used as
+a replacement for LaTeX's @code{\\@@alph} and @code{\\@@Alph} macros.")
+    (license license:lppl1.3c+)))
+
+(define-public texlive-antt
+  (package
+    (name "texlive-antt")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/antt/"
+                   "doc/latex/antt/"
+                   "fonts/afm/public/antt/"
+                   "fonts/enc/dvips/antt/"
+                   "fonts/map/dvips/antt/"
+                   "fonts/opentype/public/antt/"
+                   "fonts/tfm/public/antt/"
+                   "fonts/type1/public/antt/"
+                   "tex/latex/antt/"
+                   "tex/plain/antt/")
+             (base32
+              "1fvmgb581ixc4fvw5l0g11hlvdpf0cld6db0cg3vysw5yabas3vm")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/antt")
+    (synopsis "Type 1 family of a Polish traditional type")
+    (description
+     "Antykwa Torunska is a serif font designed by the late Polish typographer
+Zygfryd Gardzielewski, reconstructed and digitized as Type 1.")
+    (license license:gfl1.0)))
+
+(define-public texlive-asana-math
+  (package
+    (name "texlive-asana-math")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/asana-math/"
+                   "fonts/opentype/public/asana-math/"
+                   "fonts/truetype/public/asana-math/")
+             (base32
+              "1q934gackj9j7b7bvlq7yv1pr9rxrhhip1as7ywgx8d45ddig2rq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/asana-math")
+    (synopsis "Font to typeset maths in Xe(La)TeX and Lua(La)TeX")
+    (description
+     "The Asana-Math font is an OpenType font that includes almost all
+mathematical Unicode symbols and it can be used to typeset mathematical text
+with any software that can understand the MATH OpenType table.")
+    (license license:silofl1.1)))
+
+(define-public texlive-avantgar
+  (package
+    (name "texlive-avantgar")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "dvips/avantgar/"
+                   "fonts/afm/adobe/avantgar/"
+                   "fonts/afm/urw/avantgar/"
+                   "fonts/map/dvips/avantgar/"
+                   "fonts/tfm/adobe/avantgar/"
+                   "fonts/tfm/urw35vf/avantgar/"
+                   "fonts/type1/urw/avantgar/"
+                   "fonts/vf/adobe/avantgar/"
+                   "fonts/vf/urw35vf/avantgar/"
+                   "tex/latex/avantgar/")
+             (base32
+              "1200x40k7wprm4n7srxvgrax2l52vn6d5ri2x0q7zbzzsfxfzkym")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/urw-base35")
+    (synopsis "Replacement for Adobe's Avant Garde font")
+    (description
+     "This package provides a drop-in replacement for the Avant Garde font
+from Adobe's basic set.")
+    (license license:gpl3+)))
 
 (define texlive-docstrip
   (package
-    (inherit (simple-texlive-package
-              "texlive-docstrip"
-              (list "/tex/latex/base/docstrip.tex")
-              (base32
-               "1pxbqbia0727vg01xv8451szm55z2w8sb0vv3kf4iqx5ibb6m0d2")
-              #:trivial? #t))
+    (name "texlive-docstrip")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "/tex/latex/base/docstrip.tex")
+             (base32
+              "04cwvqs8cx8l60lrwn60krpjg1ada7i8g5mh6cb6bxaz08yvx9i4")))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:texlive-latex-bin? #f))
     (home-page "https://www.ctan.org/texlive")
     (synopsis "Utility to strip documentation from TeX files")
     (description "This package provides the docstrip utility to strip
@@ -753,16 +4484,19 @@ documentation from TeX files.  It is part of the LaTeX base.")
 
 (define-public texlive-underscore
   (package
-    (inherit (simple-texlive-package
-              "texlive-underscore"
-              (list "/doc/latex/underscore/"
-                    "/tex/latex/underscore/")
-              (base32
-               "0slxsxc9azmv3gsm55jkhkv8a06wafankp55hhsdd6k4prp8szrb")
-              #:trivial? #t))
+    (name "texlive-underscore")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/underscore/" "tex/latex/underscore/")
+             (base32
+              "0slxsxc9azmv3gsm55jkhkv8a06wafankp55hhsdd6k4prp8szrb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://www.ctan.org/pkg/underscore")
     (synopsis "Control the behaviour of @samp{_} in text")
-    (description "This package causes @code{\\_} in text mode (i.e.,
+    (description
+     "This package causes @code{\\_} in text mode (i.e.,
 @code{\\textunderscore}) to print an underscore so that hyphenation of words
 either side of it is not affected; a package option controls whether an actual
 hyphenation point appears after the underscore, or merely a break point.  The
@@ -773,14 +4507,18 @@ affected).")
 
 (define-public texlive-unicode-data
   (package
-    (inherit (simple-texlive-package
-              "texlive-unicode-data"
-              (list "/tex/generic/unicode-data/"
-                    "/doc/generic/unicode-data/")
-              (base32
-               "1d41zvjsig7sqf2j2m89dnbv3gicpb16r04b4ikps4gabhbky83k")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/unicode-data")
+    (name "texlive-unicode-data")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/unicode-data/"
+                   "tex/generic/unicode-data/")
+             (base32
+              "13zff8fk0fwa1ab8wc5yfbay0022jkk1j9zq5azn6gzcxs9szm6q")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
+    (home-page "https://ctan.org/pkg/unicode-data")
     (synopsis "Unicode data and loaders for TeX")
     (description "This bundle provides generic access to Unicode Consortium
 data for TeX use.  It contains a set of text files provided by the Unicode
@@ -795,23 +4533,113 @@ out to date by @code{unicode-letters.tex}.")
 
 (define-deprecated-package texlive-generic-unicode-data texlive-unicode-data)
 
+(define-public texlive-hologo
+  (package
+    (name "texlive-hologo")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/hologo/"
+                   "source/generic/hologo/"
+                   "tex/generic/hologo/")
+             (base32
+              "0n62zwz93ab6vfb0hd2h0ncj9gwavg01i3djj7wyr7gyj20xb34x")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/hologo")
+    (synopsis "Collection of logos with bookmark support")
+    (description
+     "The package defines a single command @code{\\hologo}, whose argument is
+the usual case-confused ASCII version of the logo.  The command is
+bookmark-enabled, so that every logo becomes available in bookmarks without
+further work.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-hook-pre-commit-pkg
+  (package
+    (name "texlive-hook-pre-commit-pkg")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/hook-pre-commit-pkg/")
+             (base32
+              "0mikg4p9wxb28vgwh1acgdhwa2fqnc8rw3jg355d6s137m40awc6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/hook-pre-commit-pkg")
+    (synopsis "Pre-commit git hook for LaTeX package developpers")
+    (description
+     "This package provides a pre-commit git hook to check basic LaTeX
+syntax for the use of package developers.  It is installed by copying
+it into the @file{.git/.hooks} file.  It then checks the following
+file types: @file{.sty}, @file{.dtx}, @file{.bbx}, @file{.cbx}, and
+@file{.lbx}.  It performs the following checks:
+
+@itemize
+
+@item each line must be terminated by @samp{%}, without a space before it;
+
+@item empty lines are allowed, but not lines with nothing but spaces in them;
+
+@item @code{\\begin@{macro@}} and @code{\\end@{macro@}} must be paired;
+
+@item @code{\\begin@{macrocode@}} and @code{\\end@{macrocode@}} must be
+paired;
+
+@item @code{\\begin@{macro@}} must have a second argument;
+
+@item one space must be printed between @samp{%} and @code{\\begin@{macro@}}
+or @code{\\end@{macro@}}. @samp{%} must be the first character in the line;
+
+@item four spaces must be printed between @samp{%} and
+@code{\\begin@{macrocode@}} or @code{\\end@{macrocode@}};
+
+@item @code{\\cs} argument must not start with a backslash.
+
+@end itemize")
+    (license license:gpl3)))
+
+(define-public texlive-hopatch
+  (package
+    (name "texlive-hopatch")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/hopatch/" "source/latex/hopatch/"
+                   "tex/latex/hopatch/")
+             (base32
+              "03hafzf0kpjhn5x392bziwyx0vf6fwcsy0xrn0c0jzn5cq5nqhap")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/hopatch")
+    (synopsis "Load patches for packages")
+    (description
+     "Hopatch provides a command with which the user may register of patch code
+for a particular package.  Hopatch will apply the patch immediately, if the
+relevant package has already been loaded; otherwise it will store the patch
+until the package appears.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-hyphen-base
   (package
-    (inherit (simple-texlive-package
-              "texlive-hyphen-base"
-              (list "/tex/generic/config/language.dat"
-                    "/tex/generic/config/language.dat.lua"
-                    "/tex/generic/config/language.def"
-                    "/tex/generic/config/language.us"
-                    "/tex/generic/config/language.us.def"
-                    "/tex/generic/config/language.us.lua"
-                    "/tex/generic/hyphen/dumyhyph.tex"
-                    "/tex/generic/hyphen/hyphen.tex"
-                    "/tex/generic/hyphen/hypht1.tex"
-                    "/tex/generic/hyphen/zerohyph.tex")
-              (base32
-               "1nad1bqpjsywm49hlv7d75mqvgha3j5vayvkvfhv8wwzgdb3mk84")
-              #:trivial? #t))
+    (name "texlive-hyphen-base")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "/tex/generic/config/language.dat"
+                   "/tex/generic/config/language.dat.lua"
+                   "/tex/generic/config/language.def"
+                   "/tex/generic/config/language.us"
+                   "/tex/generic/config/language.us.def"
+                   "/tex/generic/config/language.us.lua"
+                   "/tex/generic/hyphen/dumyhyph.tex"
+                   "/tex/generic/hyphen/hyphen.tex"
+                   "/tex/generic/hyphen/hypht1.tex"
+                   "/tex/generic/hyphen/zerohyph.tex")
+             (base32
+              "0p3p12pm9gyrhr1zzvzazfmybhavqd9hdi77ygm3ygq8km7raq3h")))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
     (home-page "https://tug.org/texlive/")
     (synopsis "Core hyphenation support files")
     (description "This package includes Knuth's original @file{hyphen.tex},
@@ -820,71 +4648,1090 @@ the autogenerated files @file{language.dat} and @file{language.def} (and
 default versions of those), etc.")
     (license license:knuth)))
 
+(define-public texlive-hyphenex
+  (package
+    (name "texlive-hyphenex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "source/generic/hyphenex/"
+                   "tex/generic/hyphenex/")
+             (base32
+              "1v1p93i56xgp01zly30bkfgb9py8nav1r620dbgz1q7438zbhzpp")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/hyphenex")
+    (synopsis "US English hyphenation exceptions file")
+    (description
+     "Exceptions for American English hyphenation patterns are occasionally
+published in the TeX User Group journal TUGboat.  This bundle provides
+alternative Perl and Bourne shell scripts to convert the source of such an
+article into an exceptions file, together with a recent copy of the article
+and machine-readable files.")
+    (license license:public-domain)))
+
+(define-public texlive-index
+  (package
+    (name "texlive-index")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bst/index/" "doc/latex/index/"
+                   "makeindex/index/" "source/latex/index/"
+                   "tex/latex/index/")
+             (base32
+              "0f1infc8fcpw16crciampy4cqqhl4hzypyfacbwsk4cnl0fyivns")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/index")
+    (synopsis "Extended index for LaTeX including multiple indexes")
+    (description
+     "This is a reimplementation of LaTeX's indexing macros to provide better
+support for indexing.  For example, it supports multiple indexes in a single
+document and provides a more robust @code{\\index} command.")
+    (license license:lppl1.2+)))        ;from "index.dtx"
+
+(define-public texlive-installfont
+  (package
+    (name "texlive-installfont")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/installfont/"
+                   "scripts/installfont/")
+             (base32
+              "0wgksqg88hdzfvrywrv91al9skpj2vly09ly7qmzahqsyvdgmb9p")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "installfont-tl")))
+    (home-page "https://ctan.org/pkg/installfont")
+    (synopsis "Bash script for installing a LaTeX font family")
+    (description
+     "With this script you can install a LaTeX font family (PostScript Type 1,
+TrueType and OpenType formats are supported).  Font series from light to ultra
+bold, and (faked) small caps and (faked) slanted shapes are supported, but not
+expert fonts.  The script will rename the fonts automatically (optional) or
+will otherwise expect the @file{.afm} files and the font files (in PostScript
+Type1 format) named in the Karl Berry scheme (e.g., @file{5bbr8a.pfb}).  After
+running the script, you should have a working font installation in your local
+TeX tree.")
+    (license license:lppl)))
+
 (define-public texlive-dvipdfmx
-  (let ((template (simple-texlive-package
-                   "texlive-dvipdfmx"
-                   (list "doc/dvipdfm/"
-                         "doc/dvipdfmx/"
-                         "doc/man/man1/"
-                         "dvipdfmx/"
-                         "fonts/cmap/dvipdfmx/"
-                         "fonts/map/dvipdfmx/")
-                   (base32
-                    "08i81hciksh0sm9pw6lw8v8s2rj92p58wd5j2mq1mzqbp171wjmr")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (source
-       (origin
-         (inherit (package-source template))
-         ;; This map file is supposed to be generated in a profile hook.
-         (snippet '(delete-file "fonts/map/dvipdfmx/updmap/kanjix.map"))))
-      (propagated-inputs (list texlive-glyphlist))
-      (home-page "https://www.tug.org/texlive/")
-      (synopsis "Extended version of dvipdfm")
-      (description
-       "Dvipdfmx (formerly dvipdfm-cjk) is a development of dvipdfm created to
+  (package
+    (name "texlive-dvipdfmx")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/dvipdfm/"
+                   "doc/dvipdfmx/"
+                   "doc/man/man1/dvipdfm.1"
+                   "doc/man/man1/dvipdfm.man1.pdf"
+                   "doc/man/man1/dvipdfmx.1"
+                   "doc/man/man1/dvipdfmx.man1.pdf"
+                   "doc/man/man1/dvipdft.1"
+                   "doc/man/man1/dvipdft.man1.pdf"
+                   "doc/man/man1/ebb.1"
+                   "doc/man/man1/ebb.man1.pdf"
+                   "doc/man/man1/extractbb.1"
+                   "doc/man/man1/extractbb.man1.pdf"
+                   "doc/man/man1/xdvipdfmx.1"
+                   "doc/man/man1/xdvipdfmx.man1.pdf"
+                   "dvipdfmx/"
+                   "fonts/cmap/dvipdfmx/"
+                   "fonts/map/dvipdfmx/")
+             (base32
+              "0p6mlpymrhsalisfda0gbqg6b941fd164kcw0nc51pzc98aws1xz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'delete-map-file
+            ;; This map file is supposed to be generated in a profile hook.
+            (lambda _
+              (delete-file "fonts/map/dvipdfmx/updmap/kanjix.map"))))))
+    (propagated-inputs (list texlive-glyphlist))
+    (home-page "https://ctan.org/pkg/dvipdfmx")
+    (synopsis "Extended version of dvipdfm")
+    (description
+     "Dvipdfmx (formerly dvipdfm-cjk) is a development of dvipdfm created to
 support multi-byte character encodings and large character sets for East Asian
-languages.  Dvipdfmx, if \"called\" with the name dvipdfm, operates in a
-\"dvipdfm compatibility\" mode, so that users of the both packages need only
-keep one executable.  A secondary design goal is to support as many \"PDF\"
-features as does pdfTeX.")
-      (license license:gpl3+))))
+languages.  Dvipdfmx, if called with the name dvipdfm, operates in a dvipdfm
+compatibility mode, so that users of the both packages need only keep one
+executable.  A secondary design goal is to support as many PDF features as
+does pdfTeX.")
+    (license license:gpl3+)))
 
 (define-public texlive-dvips
   (package
-    (inherit (simple-texlive-package
-              "texlive-dvips"
-              (list "/doc/man/man1/afm2tfm.1"
-                    "/doc/man/man1/dvips.1"
-                    "/dvips/base/"
-                    "/dvips/config/"
-                    "/fonts/enc/dvips/base/"
-                    "/tex/generic/dvips/")
-              (base32
-               "1fb73mfw9mp4ylp6sfc0465rbdb7k830aq0qf3c085c3n0zyrin8")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/dvips")
+    (name "texlive-dvips")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/dvips/"
+                   "doc/info/dvips.info"
+                   "doc/man/man1/afm2tfm.1"
+                   "doc/man/man1/afm2tfm.man1.pdf"
+                   "doc/man/man1/dvips.1"
+                   "doc/man/man1/dvips.man1.pdf"
+                   "dvips/base/"
+                   "dvips/config/"
+                   "fonts/enc/dvips/base/"
+                   "tex/generic/dvips/")
+             (base32
+              "0x11wx9p16z4nxhlbfqlgi5svnr96j1hnvdl9fpv1sr3n1j8m79g")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dvips")
     (synopsis "DVI to PostScript drivers")
-    (description "This package provides files needed for converting DVI files
-to PostScript.")
+    (description
+     "This package provides files needed for converting DVI files to
+PostScript.")
     (license license:lppl)))
 
+(define-public texlive-ketcindy
+  (package
+    (name "texlive-ketcindy")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/ketcindy/" "scripts/ketcindy/"
+                   "tex/latex/ketcindy/")
+             (base32
+              "0jy8fzfqwbmnza43j70c22wr0nvx9km8g4n5vcgnjvc6js2nyxas")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "ketcindy.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/ketcindy")
+    (synopsis "Macros for graphic generation and Cinderella plugin")
+    (description
+     "KETpic is a macro package designed for computer algebra systems (CAS) to
+generate LaTeX source codes for high-quality mathematical artwork.  KETcindy
+is a plugin for Cinderella that allows to generate graphics using KETpic.  The
+generated code can be included in any LaTeX document.")
+    (license license:gpl3+)))
+
+(define-public texlive-lacheck
+  (package
+    (name "texlive-lacheck")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/lacheck.1"
+                   "doc/man/man1/lacheck.man1.pdf")
+             (base32
+              "1hhx65yd800bl3y2sq20lix60wd2b2j3k7n9s788mlsn8b0p7yq3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lacheck")
+    (synopsis "LaTeX checker")
+    (description
+     "Lacheck is a tool for finding common mistakes in LaTeX documents.")
+    (license license:gpl3+)))
+
+(define-public texlive-latex-git-log
+  (package
+    (name "texlive-latex-git-log")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/latex-git-log.1"
+                   "doc/man/man1/latex-git-log.man1.pdf"
+                   "doc/support/latex-git-log/"
+                   "scripts/latex-git-log/")
+             (base32
+              "01v6frspg1zrs976bwsdz6qczg0h5z6by90hmlyy4z6l5shscpix")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "latex-git-log")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/latex-git-log")
+    (synopsis "Typeset @samp{git log} information")
+    (description
+     "The program is run within a Git repository, and outputs the entire
+version history, as a LaTeX table.  That output will typically be redirected
+to a file; the author recommends typesetting in landscape orientation.")
+    (license license:gpl3+)))
+
+(define-public texlive-latex-papersize
+  (package
+    (name "texlive-latex-papersize")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/latex-papersize/"
+                   "scripts/latex-papersize/")
+             (base32
+              "19nich5n4prd3g4lqm9iwn9h27h54mnycd6p4g5p18jc0b56l3n8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "latex-papersize.py")))
+    (inputs (list python))
+    (home-page "https://ctan.org/pkg/latex-papersize")
+    (synopsis "Calculate LaTeX settings for any font and paper size")
+    (description
+     "The package is a Python script, whose typical use is when preparing
+printed material for users with low vision.  The most effective way of doing
+this is to print on (notional) small paper, and then to magnify the result;
+the script calculates the settings for various font and paper sizes.")
+    (license license:asl2.0)))
+
+(define-public texlive-latex2man
+  (package
+    (name "texlive-latex2man")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/info/latex2man.info"
+                   "doc/man/man1/latex2man.1"
+                   "doc/man/man1/latex2man.man1.pdf"
+                   "doc/support/latex2man/"
+                   "scripts/latex2man/"
+                   "tex/latex/latex2man/")
+             (base32
+              "0c5pfnhw80fh132k2dmj3qdjgvl9dm6xzv55f54g2wlswpzlinis")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "latex2man")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/latex2man")
+    (synopsis "Translate LaTeX-based manual pages into Unix man format")
+    (description
+     "Latex2man is a tool to translate UNIX manual pages written with LaTeX
+into the troff format understood by the UNIX man(1) command.  Alternatively
+HTML, TexInfo, or LaTeX code can be produced too.  Output of parts of the text
+may be supressed using the conditional text feature (for this, LaTeX
+generation may be used).  There is a LaTeX package (@file{latex2man.sty}) for
+writing the man page and a Perl script, @command{latex2man} that does the
+actual translation.")
+    (license license:lppl1.0+)))
+
+(define-public texlive-latex2nemeth
+  (package
+    (name "texlive-latex2nemeth")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/latex2nemeth/"
+                   "scripts/latex2nemeth/")
+             (base32
+              "04l3pnzwnh86ixlj7pjy6wgkzqm5i3ka332yfkl5f6cw48dw6xw5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:link-scripts #~(list "latex2nemeth")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'locate-java
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "scripts/latex2nemeth/latex2nemeth"
+                (("java") (search-input-file inputs "/bin/java"))))))))
+    (inputs (list icedtea))
+    (home-page "https://ctan.org/pkg/latex2nemeth")
+    (synopsis "Convert LaTeX source to Braille with math in Nemeth")
+    (description
+     "This package provides a program that converts LaTeX source to
+Braille/Nemeth.  It supports the Greek language, which is only Braille level
+1, but also English at level 1.  Simple pictures in PSTricks are also
+supported in order to produce tactile graphics with specialized equipment.
+Note that embossing will need LibreOffice and @code{odt2braille} as this
+project does not deal with embossers drivers.")
+    (license license:gpl3)))
+
+(define-public texlive-latexdiff
+  (package
+    (name "texlive-latexdiff")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/latexdiff-vc.1"
+                   "doc/man/man1/latexdiff-vc.man1.pdf"
+                   "doc/man/man1/latexdiff.1"
+                   "doc/man/man1/latexdiff.man1.pdf"
+                   "doc/man/man1/latexrevise.1"
+                   "doc/man/man1/latexrevise.man1.pdf"
+                   "doc/support/latexdiff/"
+                   "scripts/latexdiff/")
+             (base32
+              "03fnz7gilzwzgsqij10npfy8k2imhk5glfjijr52qgmg28r3xvi1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:link-scripts
+           #~(list "latexdiff-vc.pl" "latexdiff.pl" "latexrevise.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/latexdiff")
+    (synopsis
+     "Determine and mark up significant differences between LaTeX files")
+    (description
+     "Latexdiff is a Perl script for visual mark up and revision of
+significant differences between two LaTeX files.  Various options are
+available for visual markup using standard LaTeX packages such as color.
+Changes not directly affecting visible text, for example in formatting
+commands, are still marked in the LaTeX source.  A rudimentary revision
+facilility is provided by another Perl script, @command{latexrevise}, which
+accepts or rejects all changes.  Manual editing of the difference file can be
+used to override this default behaviour and accept or reject selected changes
+only.")
+    (license license:gpl3)))
+
+(define-public texlive-latexfileversion
+  (package
+    (name "texlive-latexfileversion")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/latexfileversion/"
+                   "scripts/latexfileversion/")
+             (base32
+              "12kw9s415dnlaadx6yn2jddvflvbs754rkz30xhr3di2ldpvp2jj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "latexfileversion")))
+    (home-page "https://ctan.org/pkg/latexfileversion")
+    (synopsis "Prints the version and date of a LaTeX class or style file")
+    (description
+     "This simple shell script prints the version and date of a LaTeX class or
+style file.")
+    (license license:lppl)))
+
+(define-public texlive-latexindent
+  (package
+    (name "texlive-latexindent")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/latexindent/"
+                   "scripts/latexindent/")
+             (base32
+              "1k2d09z2my38nhxhzdq53jg4alzg5jzirdsb1qa7szm3dya46xgm")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "latexindent.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/latexindent")
+    (synopsis "Indent a LaTeX document, highlighting the programming structure")
+    (description
+     "The Perl script processes a LaTeX file, indenting parts so as to
+highlight the structure for the reader.")
+    (license license:gpl3)))
+
+(define-public texlive-latexpand
+  (package
+    (name "texlive-latexpand")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/latexpand/"
+                   "scripts/latexpand/")
+             (base32
+              "0v0yn4n6v0kgxwh00ryfkrx7a4sxhkm0pbgnylvi8jfg24gz89ls")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "latexpand")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/latexpand")
+    (synopsis "Expand @code{\\input} and @code{\\include} in a LaTeX document")
+    (description
+     "Latexpand is a Perl script that simply replaces @code{\\input} and
+@code{\\include} commands with the content of the input or included file.  The
+script does not deal with @code{\\includeonly} commands.")
+    (license license:bsd-3)))
+
+(define-public texlive-light-latex-make
+  (package
+    (name "texlive-light-latex-make")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/llmk.1"
+                   "doc/man/man1/llmk.man1.pdf"
+                   "doc/support/light-latex-make/"
+                   "scripts/light-latex-make/")
+             (base32
+              "0g5xc2cna1fdgksw0w56idkmfw5rfqifimg8picm4478vlq2srp4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "llmk.lua")))
+    (home-page "https://ctan.org/pkg/light-latex-make")
+    (synopsis "Build tool for LaTeX documents")
+    (description
+     "Light LaTeX Make (llmk) is yet another build tool specific for LaTeX
+documents.  Its aim is to provide a simple way to specify a workflow of
+processing LaTeX documents and encourage people to always explicitly show the
+right workflow for each document.  You can describe the workflows either in an
+external file @file{llmk.toml} or in a LaTeX document source in the form of
+magic comments.  It provides a uniform way to describe the workflows available
+for nearly all TeX environments, and behaves exactly the same in any
+environment.  At this point, @command{llmk} intentionally does not provide any
+method for user configuration.  Therefore one can guarantee that for a LaTeX
+document with an llmk setup, the process of typesetting the document will be
+reproduced in any TeX environment with the program.")
+    (license license:expat)))
+
+(define-public texlive-listings-ext
+  (package
+    (name "texlive-listings-ext")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/listings-ext/"
+                   "scripts/listings-ext/"
+                   "source/latex/listings-ext/"
+                   "tex/latex/listings-ext/")
+             (base32
+              "044d93vdlw1amkpm8nv50390a5ba7x7d2w1y3mfg5bfvfb5cci6r")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:link-scripts #~(list "listings-ext.sh")))
+    (home-page "https://ctan.org/pkg/listings-ext")
+    (synopsis "Automated input of source")
+    (description
+     "The package provides a means of marking a source, so that samples of it
+may be included in a document (by means of the @code{listings} package) in
+a stable fashion, regardless of any change to the source.  The markup in the
+source text defines tags for blocks of source.  These tags are processed by
+a shell script to make a steering file that is used by the package when LaTeX
+is being run.")
+    (license license:lppl1.2+)))
+
+(define-public texlive-ltxfileinfo
+  (package
+    (name "texlive-ltxfileinfo")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/ltxfileinfo/"
+                   "scripts/ltxfileinfo/")
+             (base32
+              "1nbcplq48cw768pjyg832ymqmjr9rlrcpl6jmkq8mrvvydgy8nai")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "ltxfileinfo")))
+    (home-page "https://ctan.org/pkg/ltxfileinfo")
+    (synopsis "Print version information for a LaTeX file")
+    (description
+     "@command{ltxfileinfo} displays version information for LaTeX files.
+If no path information is given, the file is searched using
+@command{kpsewhich}.")
+    (license license:gpl3+)))
+
+(define-public texlive-ltximg
+  (package
+    (name "texlive-ltximg")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/ltximg.1"
+                   "doc/man/man1/ltximg.man1.pdf"
+                   "doc/support/ltximg/" "scripts/ltximg/")
+             (base32
+              "1pxyh0w7jkdapzfjgp6fmvfq1hs6mz6qbpykd33r4c5ghyks4cwb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "ltximg.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/ltximg")
+    (synopsis "Extract LaTeX environments into separate image files")
+    (description
+     "@command{ltximg} is a Perl script that automates the process of
+extracting and converting environments provided by TikZ, PStricks and other
+packages from input file to image formats and standalone files using
+Ghostscript and @code{poppler-utils}.  It generates a file with only extracted
+environments and another with all extracted environments converted to
+@code{\\includegraphics}.")
+    (license license:gpl3+)))
+
+(define-public texlive-luajittex
+  (package
+    (name "texlive-luajittex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/luajithbtex.1"
+                   "doc/man/man1/luajithbtex.man1.pdf"
+                   "doc/man/man1/luajittex.1"
+                   "doc/man/man1/luajittex.man1.pdf")
+             (base32
+              "1qfbg0r6gsncgymh00yc83kcayd4m7bvryap8f63sm9s9bzfl6yv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:create-formats #~(list "luajithbtex" "luajittex")))
+    (propagated-inputs
+     (list texlive-cm
+           texlive-etex
+           texlive-hyphen-complete
+           texlive-knuth-lib
+           texlive-luatex
+           texlive-plain
+           texlive-tex-ini-files
+           texlive-unicode-data))
+    (home-page "https://ctan.org/pkg/luajittex")
+    (synopsis "LuaTeX with JIT compiler, with and without HarfBuzz")
+    (description
+     "This package provides LuaTeX with just-in-time (JIT) compiler, with and
+without HarfBuzz.")
+    (license license:gpl2)))
+
+(define-public texlive-match-parens
+  (package
+    (name "texlive-match-parens")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/match_parens/"
+                   "scripts/match_parens/")
+             (base32
+              "0qqxbh3h1xkggs5p2gnis4z8h3s0mwknszyjzs2fslnq16yyqi27")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "match_parens")))
+    (inputs (list ruby))
+    (home-page "https://ctan.org/pkg/match_parens")
+    (synopsis
+     "Find mismatches of parentheses, braces, (angle) brackets, in texts")
+    (description
+     "Mismatches of parentheses, braces, (angle) brackets, especially in TeX
+sources which may be rich in those, may be difficult to trace.  This little
+Ruby script helps you by writing your text to standard output, after adding
+a left margin to your text, which will normally be almost empty, but will
+clearly show any mismatches.")
+    (license license:gpl3+)))
+
+(define-public texlive-mflua
+  (package
+    (name "texlive-mflua")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "metafont/mflua/" "scripts/mflua/")
+             (base32
+              "0ngbhdh8hgpjfqnrjlnp27x3qziks3yf2zp1qq7r4bjfa5jx9gr6")))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:link-scripts #~(list "mflua.lua")
+      #:create-formats #~(list "mflua")))
+    (propagated-inputs (list texlive-luatex texlive-metafont))
+    (home-page "https://ctan.org/pkg/mflua")
+    (synopsis "Configuration and base files for MFLua")
+    (description
+     "MFLua is an extension of Metafont which embeds a Lua interpreter.  It
+doesn’t introduce any new primitives, so a Metafont file can be used with
+MFLua without any modification to produce exactly the same result.")
+    ;; The license is the same as Metafont's, with a couple of files
+    ;; released under Public Domain terms.
+    (license (list license:knuth license:public-domain))))
+
+(define-public texlive-mkjobtexmf
+  (package
+    (name "texlive-mkjobtexmf")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/mkjobtexmf/"
+                   "doc/man/man1/mkjobtexmf.1"
+                   "doc/man/man1/mkjobtexmf.man1.pdf"
+                   "scripts/mkjobtexmf/"
+                   "source/generic/mkjobtexmf/")
+             (base32
+              "04wzq2260my5894kc8qhl954h6hri77vvg5kx8mf03kdlf3rvww6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "mkjobtexmf.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/mkjobtexmf")
+    (synopsis "Generate a texmf tree for a particular job")
+    (description
+     "The package provides a Perl script, which runs a program and tries to
+find the names of file used.  Two methods are available, option
+@samp{-recorder} of (Web2C) TeX and the program strace.  Then it generates
+a directory with a texmf tree.  It checks the found files and tries sort them
+in this texmf tree.  The script may be used for archiving purposes or to speed
+up later TeX runs.")
+    (license license:artistic2.0)))
+
+(define-public texlive-make4ht
+  (package
+    (name "texlive-make4ht")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/make4ht/" "scripts/make4ht/")
+             (base32
+              "0ayqs8i1za14krrgqyncv8ahs70pg5pnfs2m0aqcavfnd79qx2cj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "make4ht")))
+    (propagated-inputs (list texlive-tex4ht))
+    (home-page "https://ctan.org/pkg/make4ht")
+    (synopsis "Build system for TeX4ht")
+    (description
+     "@code{make4ht} is a simple build system for TeX4ht, a TeX to XML
+converter.  It provides a command line tool that drives the conversion
+process.  It also provides a library which can be used to create customized
+conversion tools.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-optexcount
+  (package
+    (name "texlive-optexcount")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/optexcount/"
+                   "scripts/optexcount/"
+                   "source/support/optexcount/")
+             (base32
+              "0rjyhyirkx11v04c8b0kjjz8745kdnj190vzkyyzafwnzfcbd754")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "optexcount")))
+    (inputs (list python))
+    (home-page "https://ctan.org/pkg/optexcount")
+    (synopsis "Python script for counting words in OpTeX documents")
+    (description
+     "OpTeXcount is a basic Python utility that analyzes OpTeX source code.
+It is inspired by already existing TeXcount for LaTeX. The functionality is
+really lightweight and basic.  It counts words and other elements of OpTeX
+document and sorts them out into individual categories.  Users can print the
+source code with highlighted words using several colors, so they see what is
+considered as word, header etc.")
+    (license license:expat)))
+
+(define-public texlive-patgen
+  (package
+    (name "texlive-patgen")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/patgen.1"
+                   "doc/man/man1/patgen.man1.pdf")
+             (base32
+              "03y05mv0n04hyj0lcq54grx7w5wv95h61j6xlx2jc9v0ib9akq4y")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-kpathsea))
+    (home-page "https://ctan.org/pkg/patgen")
+    (synopsis "Generate hyphenation patterns")
+    (description
+     "Patgen takes a list of hyphenated words and generates a set of patterns
+that can be used by the TeX 82 hyphenation algorithm.")
+    (license license:public-domain)))
+
+(define-public texlive-pdfbook2
+  (package
+    (name "texlive-pdfbook2")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/pdfbook2.1"
+                   "doc/man/man1/pdfbook2.man1.pdf"
+                   "doc/support/pdfbook2/" "scripts/pdfbook2/")
+             (base32
+              "1cw0xw2dmcgmkms8d94pchbbg17lfvvbnzbagaqpy2fzxi2kb4w8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "pdfbook2")))
+    (inputs (list python))
+    (home-page "https://ctan.org/pkg/pdfbook2")
+    (synopsis "Create booklets from PDF files")
+    (description
+     "This Python program creates print-ready PDF files from some input PDF
+files for booklet printing.  The resulting files need to be printed in
+landscape/long edge double sided printing.  The default paper format depends
+on the locale and is chosen by @code{pdfjam}.  It can be chosen using the
+@code{--paper} option.  Before the PDF is composed, the input file is cropped
+to the relevant area in order to discard unnecessary white spaces.  In this
+process, all pages are cropped to the same dimensions.  Extra margins can be
+defined at the edges of the booklet and in the middle where the binding
+occurs.")
+    (license license:gpl3)))
+
+(define-public texlive-pdfcrop
+  (package
+    (name "texlive-pdfcrop")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/pdfcrop/" "scripts/pdfcrop/")
+             (base32
+              "0wb67hsfasxvl1b484hyxvghhm9nkxwgs6m8ygzshr0m874hsl01")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "pdfcrop.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/pdfcrop")
+    (synopsis "Crop PDF graphics")
+    (description
+     "This package provides a Perl script that can either trim pages of any
+whitespace border, or trim them of a fixed border.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-pdfjam
+  (package
+    (name "texlive-pdfjam")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/pdfjam.1"
+                   "doc/man/man1/pdfjam.man1.pdf"
+                   "doc/support/pdfjam/" "scripts/pdfjam/")
+             (base32
+              "1wkxvbnri1lxyd4fbvsv0zzw6c8y3v33hzlv6y86jwil6r3p0338")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "pdfjam")))
+    (home-page "https://ctan.org/pkg/pdfjam")
+    (synopsis "Shell scripts interfacing to @code{pdfpages}")
+    (description
+     "The package makes available the @command{pdfjam} shell script that
+provides a simple interface to much of the functionality of the excellent
+@code{pdfpages} package for LaTeX. The @command{pdfjam} script takes one or
+more PDF files (and/or JPG/PNG graphics files) as input, and produces one or
+more PDF files as output.  It is useful for joining files together, selecting
+pages, reducing several source pages onto one output page, etc.")
+    (license license:gpl2+)))
+
+(define-public texlive-pdflatexpicscale
+  (package
+    (name "texlive-pdflatexpicscale")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/pdflatexpicscale/"
+                   "scripts/pdflatexpicscale/")
+             (base32
+              "089n7r17c9kj1hhgm0hkfjhrqp2bhwjrj1czb3qllz7rm2x230h1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "pdflatexpicscale.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/pdflatexpicscale")
+    (synopsis
+     "Support software for downscaling graphics to be included by pdfLaTeX")
+    (description
+     "The package provides a script to scale pictures down to a target
+resolution before creating a PDF document with pdfLaTeX.")
+    (license license:lppl)))
+
+(define-public texlive-pdftex-quiet
+  (package
+    (name "texlive-pdftex-quiet")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/pdftex-quiet/"
+                   "scripts/pdftex-quiet/")
+             (base32
+              "0gpxwiiiq05m24ahx9mnhn7i6rldqkmx041p1bnnddswajs9wgm3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "pdftex-quiet")))
+    (home-page "https://ctan.org/pkg/pdftex-quiet")
+    (synopsis "Bash wrapper for pdfTeX limiting its output to relevant errors")
+    (description
+     "This package provides a Bash script aiming at reducing pdfTeX's output
+to relevant errors, which are displayed in a red bold font.")
+    (license license:gpl3)))
+
+(define-public texlive-pdftosrc
+  (package
+    (name "texlive-pdftosrc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/pdftosrc.1"
+                   "doc/man/man1/pdftosrc.man1.pdf")
+             (base32
+              "0mnz5id6fywhlay6r38nvii0a2ks5gdb15i7s7wkq1ay9k5k6fq3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pdftosrc")
+    (synopsis "Extract source file or stream from PDF file")
+    (description
+     "@command{pdftosrc} extracts an embedded source file, or extracts and
+uncompresses a PDF stream given by object number.")
+    (license license:gpl2+)))
+
+(define-public texlive-pdfxup
+  (package
+    (name "texlive-pdfxup")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/pdfxup.1"
+                   "doc/man/man1/pdfxup.man1.pdf"
+                   "doc/support/pdfxup/" "scripts/pdfxup/"
+                   "tex/latex/pdfxup/")
+             (base32
+              "1zk4nw1acqz77cy17l8mzi06f0aag16ikp8ymjsl110iw8p8my98")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "pdfxup")))
+    (home-page "https://ctan.org/pkg/pdfxup")
+    (synopsis "Create N-up PDF pages with minimal margins")
+    (description
+     "@command{pdfxup} is a shell script that creates a PDF document where
+each page is obtained by combining several pages of a PDF file given as
+output.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-pfarrei
+  (package
+    (name "texlive-pfarrei")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pfarrei/" "scripts/pfarrei/"
+                   "source/latex/pfarrei/" "tex/latex/pfarrei/")
+             (base32
+              "1clfaxfk7js8yl6cy6dwihmgi51n3rmk0zfmxacmpsbhawj1wrw4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "a5toa4.tlu" "pfarrei.tlu")))
+    (home-page "https://ctan.org/pkg/pfarrei")
+    (synopsis "LaTeX support of pastors' and priests' work")
+    (description
+     "In @emph{Die TeXnische Komodie} (issue 1/2013) Christian Justen
+described his use of LaTeX in his work as priest (similar requirements may be
+encountered in the work of pastors and other ministers of religion).  One
+point was to arrange A5 pages onto A4 landscape paper, either side-by-side or
+as a booklet.  Justen made two Bash scripts for this job; the package provides
+one Texlua script for both requirements.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-pkfix
+  (package
+    (name "texlive-pkfix")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/pkfix/" "scripts/pkfix/")
+             (base32
+              "173l1qaydv29va9cgip9p3i3vf27x6ndsqjm4nvdpliblai6fkwf")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "pkfix.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/pkfix")
+    (synopsis "Replace PK fonts in PostScript with Type 1 fonts")
+    (description
+     "The Perl script @command{pkfix} looks for DVIPSBitmapFont comments in
+PostScript files, generated by not too old dvips, and replaces them by type
+1 versions of the fonts, if possible.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-pkfix-helper
+  (package
+    (name "texlive-pkfix-helper")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/pkfix-helper.1"
+                   "doc/man/man1/pkfix-helper.man1.pdf"
+                   "doc/support/pkfix-helper/"
+                   "scripts/pkfix-helper/")
+             (base32
+              "0vq52g65an1v9g0kdhsy0xpsf1hj69gl4cr5aq1m816i8ahhzxxy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "pkfix-helper")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/pkfix-helper")
+    (synopsis "Make PostScript files accessible to pkfix")
+    (description
+     "Pkfix is a useful utility for replacing resolution-dependent bitmapped
+fonts in a dvips-produced PostScript file with the corresponding
+resolution-independent vector fonts.  Unfortunately, @command{pkfix} needs to
+parse certain PostScript comments that appear only in files produced by dvips
+versions later than 5.58 (circa 1996); it fails to work on PostScript files
+produced by older versions of dvips.  Pkfix-helper is a program that attempts
+to insert newer-dvips comments into an older-dvips PostScript file, thereby
+making the file suitable for processing by @command{pkfix}.
+@command{pkfix-helper} can sometimes process documents fully autonomously but
+does require the user to verify and, if needed, correct its decisions.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-purifyeps
+  (package
+    (name "texlive-purifyeps")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/purifyeps.1"
+                   "doc/man/man1/purifyeps.man1.pdf"
+                   "doc/support/purifyeps/"
+                   "scripts/purifyeps/")
+             (base32
+              "0523kgilwd142a43fw1r406rn8ck67hp78aqhsws931glf7j9y8p")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "purifyeps")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/purifyeps")
+    (synopsis "Make EPS work with both LaTeX/dvips and pdfLaTeX")
+    (description
+     "While pdfLaTeX has a number of nice features, its primary shortcoming
+relative to standard LaTeX+dvips is that it is unable to read ordinary
+Encapsulated PostScript (EPS) files, the most common graphics format in the
+LaTeX world.  Purifyeps converts EPS files into a purified form that can be
+read by both LaTeX+dvips and pdfLaTeX.  The trick is that the standard LaTeX2e
+graphics packages can parse Metapost-produced EPS directly.  Hence,
+@command{purifyeps} need only convert an arbitrary EPS file into the same
+stylized format that Metapost outputs.")
+    (license license:lppl)))
+
+(define-public texlive-seetexk
+  (package
+    (name "texlive-seetexk")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/dvibook.1"
+                   "doc/man/man1/dvibook.man1.pdf"
+                   "doc/man/man1/dviconcat.1"
+                   "doc/man/man1/dviconcat.man1.pdf"
+                   "doc/man/man1/dviselect.1"
+                   "doc/man/man1/dviselect.man1.pdf"
+                   "doc/man/man1/dvitodvi.1"
+                   "doc/man/man1/dvitodvi.man1.pdf")
+             (base32
+              "1bhv5xgv8jpam5apdybd0cggnvcizk2r6zs7lim1hmhzafpqqlcx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dvibook")
+    (synopsis "Utilities for manipulating DVI files")
+    (description
+     "The package provides a collection of utilities for manipulating DVI
+files:
+
+@itemize
+
+@item @command{dvibook}, which will rearrange the pages of a DVI file into
+signatures as used when printing a book;
+
+@item @command{dviconcat}, for concatenating pages of DVI file(s);
+
+@item @command{dviselect}, which will select pages from one DVI file to create
+a new DVI file;
+
+@item @command{dvitodvi}, which will rearrange the pages of a DVI file to
+create a new file;
+
+@item @command{libtex}, a library for manipulating the files, from the old
+SeeTeX project.
+
+@end itemize")
+    (license license:expat)))
+
+(define-public texlive-spix
+  (package
+    (name "texlive-spix")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/spix.1"
+                   "doc/man/man1/spix.man1.pdf"
+                   "doc/support/spix/" "scripts/spix/")
+             (base32
+              "0k1vkkrn14svqarbqpfccw3qqiz1slngngrwgs4fj5y0ilrym0bf")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "spix.py")))
+    (inputs (list python))
+    (home-page "https://ctan.org/pkg/spix")
+    (synopsis "Yet another TeX compilation tool")
+    (description
+     "SpiX offers a way to store information about the compilation process for
+a TeX file inside the TeX file itself.  Just write the commands as comments in
+the TeX files, and SpiX will extract and run those commands.  Everything is
+stored in the TeX file (so that you are not missing some piece of information
+that is located somewhere else), in a human-readable format (no need to know
+SpiX to understand it).")
+    (license license:gpl3+)))
+
+(define-public texlive-srcredact
+  (package
+    (name "texlive-srcredact")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/srcredact.1"
+                   "doc/man/man1/srcredact.man1.pdf"
+                   "doc/support/srcredact/"
+                   "scripts/srcredact/")
+             (base32
+              "1a0mmr3ggxxv69zfwlrlagbczy83ngy2kxzw437n0iksz6bgrvpx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "srcredact.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/srcredact")
+    (synopsis "Tool for redacting sources")
+    (description
+     "This package provides a tool to keep a master source, consisting of
+different chunks intended for different audiences.  The tool allows to extract
+the versions intended for different audiences and to incorporate the changes
+made in any of these versions into the master document.")
+    (license license:gpl2)))
+
+(define-public texlive-sty2dtx
+  (package
+    (name "texlive-sty2dtx")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/sty2dtx.1"
+                   "doc/man/man1/sty2dtx.man1.pdf"
+                   "doc/support/sty2dtx/" "scripts/sty2dtx/")
+             (base32
+              "06930x3c52f3x9rqcmsif7y6rw11g1myya3wp77p20vfi7whxhsv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "sty2dtx.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/sty2dtx")
+    (synopsis "Create a @file{.dtx} file from a @file{.sty} file")
+    (description
+     "The package provides a Perl script that converts a @file{.sty}
+file (LaTeX package) to @file{.dtx} format (documented LaTeX source), by
+surrounding macro definitions with macro and macrocode environments.  The
+macro name is automatically inserted as an argument to the macro environment.
+Code lines outside macro definitions are wrapped only in macrocode
+environments.  Empty lines are removed.  The script should not be thought to
+be fool proof and 100% accurate but rather as a good start to the business of
+making a @file{.dtx} file from an undocumented style file.  Full @file{.dtx}
+files are generated.  A template based on the skeleton file from @code{dtxtut}
+is used.  User level macros are added automatically to the Usage section of
+the @file{.dtx} file.  A corresponding @file{.ins} file can be generated as
+well.")
+    (license license:gpl3)))
+
 (define-public texlive-tex-ini-files
   (package
-    (inherit (simple-texlive-package
-              "texlive-tex-ini-files"
-              (list "/tex/generic/tex-ini-files/")
-              (base32
-               "0q1g62jg0qiqslm93ycvm30bw8ydmssjdshzsnzl7n2vpd62qfi2")
-              #:trivial? #t))
+    (name "texlive-tex-ini-files")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/tex-ini-files/" "tex/generic/tex-ini-files/")
+             (base32
+              "0a18k27fz1vjha5blwskxpnd715k08hmfm7d1yc2f7adaf0rwl3m")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
     (home-page "https://www.ctan.org/pkg/tex-ini-files")
     (synopsis "Files for creating TeX formats")
-    (description "This bundle provides a collection of model \".ini\" files
-for creating TeX formats.  These files are commonly used to introduced
-distribution-dependent variations in formats.  They are also used to
-allow existing format source files to be used with newer engines, for example
-to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
+    (description
+     "This bundle provides a collection of model @file{.ini} files for
+creating TeX formats.  These files are commonly used to introduced
+distribution-dependent variations in formats.  They are also used to allow
+existing format source files to be used with newer engines, for example to
+adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
     (license license:public-domain)))
 
 (define-deprecated-package texlive-generic-tex-ini-files texlive-tex-ini-files)
@@ -893,55 +5740,53 @@ to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
   (package
     (name "texlive-metafont")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-multi-fetch)
-              (uri (svn-multi-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist"))
-                    (locations '("/metafont/"
-                                 "/fonts/source/public/modes/"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "17y72xmz5a36vdsq7pfrwj0j4c7llrm9j5kcq349cpaas7r32lmb"))))
-    (build-system gnu-build-system)
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/inimf.1"
+                   "doc/man/man1/inimf.man1.pdf"
+                   "doc/man/man1/mf-nowin.1"
+                   "doc/man/man1/mf-nowin.man1.pdf"
+                   "doc/man/man1/mf.1"
+                   "doc/man/man1/mf.man1.pdf"
+                   "metafont/base/"
+                   "metafont/config/"
+                   "metafont/misc/")
+             (base32
+              "18pp6vcg1cv38yi39q9rvkv6w11mnxxd79fvf1yy01743jn7ngjh")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (arguments
-     `(#:tests? #f ; no test target
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)
-         (replace 'build
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let* ((cwd (getcwd))
-                    (mf (string-append cwd "/metafont"))
-                    (modes (string-append cwd "/fonts/source/public/modes")))
-               (setenv "MFINPUTS"
-                       (string-append modes ":"
-                                      mf "/base:"
-                                      mf "/misc:"
-                                      mf "/roex:"
-                                      mf "/feynmf:"
-                                      mf "/mfpic:"
-                                      mf "/config")))
-             (mkdir "build")
-             (with-directory-excursion "build"
-               (invoke "inimf" "mf.mf"))))
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out  (assoc-ref outputs "out"))
-                    (base (string-append out "/share/texmf-dist/web2c"))
-                    (mf   (string-append out "/share/texmf-dist/metafont/")))
-               (mkdir-p base)
-               (mkdir-p mf)
-               (install-file "build/mf.base" base)
-               (with-directory-excursion "metafont"
-                 (for-each (lambda (where)
-                             (copy-recursively where (string-append mf where)))
-                           (list "base" "misc" "config")))))))))
+     (list
+      #:texlive-latex-bin? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'build 'generate-mf.base
+            ;; Even though the file "mf.base" does not appear in tlpdb, it
+            ;; must be generated and provided in metafont package.
+            (lambda _
+              (let* ((cwd (getcwd))
+                     (mf (string-append cwd "/metafont"))
+                     (modes #$(this-package-native-input "texlive-modes")))
+                (setenv "MFINPUTS"
+                        (string-append
+                         modes "/share/texmf-dist/fonts/source/public/modes:"
+                         mf "/base:"
+                         mf "/misc:"
+                         mf "/roex:"
+                         mf "/feynmf:"
+                         mf "/mfpic:"
+                         mf "/config")))
+              ;; "build" directory was not created during `build' phases since
+              ;; there is no ".ins" nor ".dtx" file to process.
+              (mkdir-p "build")
+              (with-directory-excursion "build"
+                (invoke "inimf" "mf.mf")
+                (install-file "mf.base"
+                              (string-append #$output
+                                             "/share/texmf-dist/web2c"))))))))
     (native-inputs
-     (list texlive-bin))
-    (home-page "https://www.ctan.org/pkg/metafont")
+     (list texlive-bin texlive-modes))
+    (home-page "https://ctan.org/pkg/metafont")
     (synopsis "Metafont base files")
     (description "This package provides the Metafont base files needed to
 build fonts using the Metafont system.")
@@ -949,346 +5794,565 @@ build fonts using the Metafont system.")
 
 (define-deprecated-package texlive-metafont-base texlive-metafont)
 
+(define-public texlive-metatype1
+  (package
+    (name "texlive-metatype1")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "source/metapost/metatype1/")
+             (base32
+              "1nhbsn33w6zbzbvi3a32ng6ib5dbh0vll9g2c5ssiv1ysxqrg6yq")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/metatype1")
+    (synopsis "Generate Type 1 fonts from MetaPost")
+    (description
+     "The system employs scripts, common utility programs, and a set of
+MetaPost macros to provide a means of expressing the details outline fonts
+directly in the MetaPost language.  The system was employed to generate the
+Latin Modern fonts, and the distribution includes an example development of
+Knuth's logo fonts.")
+    (license license:public-domain)))
+
+(define-public texlive-mf2pt1
+  (package
+    (name "texlive-mf2pt1")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/info/mf2pt1.info" "doc/support/mf2pt1/"
+                   "metapost/mf2pt1/" "scripts/mf2pt1/")
+             (base32
+              "17dq4csl10j89rrxgyqjp3fjqkd9q6djgz9yi33y72w5ymjgiaik")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "mf2pt1.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/mf2pt1")
+    (synopsis "Convert stylized Metafont to PostScript Type 1")
+    (description
+     "@command{mf2pt1} is a Perl script that facilitates producing PostScript
+Type 1 fonts from a Metafont source file.  It is not, as the name may imply,
+an automatic converter of arbitrary Metafont fonts to Type 1 format.
+@command{mf2pt1} imposes a number of restrictions on the Metafont input.  If
+these restrictions are met, it will produce valid Type 1 output with more
+accurate control points than can be reverse-engineered by TeXtrace,
+@command{mftrace}, and other programs which convert bitmaps to outline
+fonts.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-mfirstuc
+  (package
+    (name "texlive-mfirstuc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/mfirstuc/"
+                   "scripts/mfirstuc/"
+                   "source/latex/mfirstuc/"
+                   "tex/latex/mfirstuc/")
+             (base32
+              "1fvdnfybfi7nych97i117s6wqf0w8drgzpf3qzfns9qxjxm0bv3l")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mfirstuc")
+    (synopsis "Uppercase the first letter of a word")
+    (description
+     "The package provides commands @code{\\makefirstuc} that uppercases the
+first letter in its argument (with a check for a semantic markup command at
+the start of the argument), and @code{\\xmakefirstuc} which expands the
+argument before uppercasing.  It also provides
+@code{\\capitalisewords@{phrase@}} which applies @code{\\makefirstuc} to each
+word in the phrase, where the words are separated by regular
+spaces.  (Exceptions can be made for words that shouldn't be converted.)")
+    (license license:lppl1.3+)))
+
+(define-public texlive-mfnfss
+  (package
+    (name "texlive-mfnfss")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/mfnfss/" "source/latex/mfnfss/"
+                   "tex/latex/mfnfss/")
+             (base32
+              "1775vg12sk38givqq2zjapx4nxlyl95rf596r2inf8mv5phsi704")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mfnfss")
+    (synopsis "Packages to typeset old german and Pandora fonts in LaTeX")
+    (description
+     "This bundle contains two packages: @code{oldgerm}, a package to typeset
+with old german fonts designed by Yannis Haralambous, and @code{pandora},
+a package to typeset with Pandora fonts designed by Neena Billawala.  Note
+that support for the Pandora fonts is also available via the
+@code{pandora-latex} package.")
+    (license license:lppl)))
+
+(define-public texlive-modes
+  (package
+    (name "texlive-modes")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/modes/"
+                   "fonts/source/public/modes/")
+             (base32
+              "1vz3ygpixswnk7hr3qfn3nffw460cp5wjq09q5ac83ddw3nya1ca")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:texlive-latex-bin? #f))
+    (home-page "https://ctan.org/pkg/modes")
+    (synopsis "Collection of Metafont @code{mode_def}'s")
+    (description
+     "The modes file collects all known Metafont modes for printing or display
+devices, of whatever printing technology.  Special provision is made for
+write-white printers, and a landscape mode is available, for making suitable
+fonts for printers with pixels whose aspect is non-square.  The file also
+provides definitions that make @code{\\specials} identifying the mode in
+Metafont's GF output, and put coding information and other Xerox-world
+information in the TFM file.")
+    (license license:public-domain)))
+
+(define-public texlive-mptopdf
+  (package
+    (name "texlive-mptopdf")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/scripts/mkii/mptopdf.man"
+                   "doc/man/man1/mptopdf.1"
+                   "doc/man/man1/mptopdf.man1.pdf"
+                   "scripts/context/perl/mptopdf.pl"
+                   "tex/context/base/mkii/"
+                   "tex/generic/context/mptopdf/")
+             (base32
+              "19kpqbkmz8al9wxn83fmg89fyv2pl2iqgnh256wi6pz4q3p77f0d")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:link-scripts #~(list "mptopdf.pl")
+      #:create-formats #~(list "mptopdf")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-perl-header
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((perl (search-input-file inputs "/bin/perl")))
+                (substitute* "scripts/context/perl/mptopdf.pl"
+                  (("exec perl") (string-append "exec " perl)))))))))
+    (inputs (list perl))
+    (propagated-inputs (list texlive-plain))
+    (home-page "https://ctan.org/pkg/mptopdf")
+    (synopsis "mpost to PDF, native MetaPost graphics inclusion")
+    (description
+     "The @code{mptopdf} script does standalone conversion from mpost to PDF,
+using the @file{supp-*} and @file{syst-*} files.  They also allow native
+MetaPost graphics inclusion in LaTeX (via pdftex.def) and ConTeXt.  They can
+be used independently of the rest of ConTeXt.")
+    ;; Use the same licensing as ConTeXt.
+    (license (list license:lppl1.3c+
+                   license:gpl2+
+                   license:cc-by-sa4.0))))
+
 (define-public texlive-fontinst
-  (let ((template (simple-texlive-package
-                   "texlive-fontinst"
-                   (list "/doc/fonts/fontinst/"
-                         "/doc/man/man1/fontinst.1"
-                         "/doc/man/man1/fontinst.man1.pdf"
-
-                         ;; This is used to build parts of
-                         ;; /tex/fontinst/{base,misc}/ and
-                         ;; /tex/latex/fontinst/fontdoc.sty.
-                         "/source/fontinst/base/"
-
-                         ;; These are not generated.
-                         "/tex/fontinst/base/bbox.sty"
-                         "/tex/fontinst/base/multislot.sty"
-                         "/tex/fontinst/misc/glyphbox.mtx"
-                         "/tex/fontinst/misc/glyphoff.mtx"
-                         "/tex/fontinst/misc/glyphon.mtx"
-                         "/tex/fontinst/misc/kernoff.mtx"
-                         "/tex/fontinst/misc/kernon.mtx"
-
-                         "/tex/fontinst/latinetx/"
-                         "/tex/fontinst/latinmtx/"
-                         "/tex/fontinst/mathmtx/"
-                         "/tex/fontinst/smblmtx/")
-                   (base32
-                    "195jsijrpv828pqy99gm13j31nsc8bsa58zlbln2r0h5j9l44b5g")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:modules _ '())
-          '((guix build gnu-build-system)
-            (guix build utils)
-            (ice-9 match)))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (replace 'build
-               (lambda* (#:key inputs #:allow-other-keys)
-                 (setenv "TEXINPUTS"
-                         (string-append (getcwd) "//:"
-                                        (getcwd) "/source/fontinst/base//:"
-                                        (assoc-ref inputs "texlive-docstrip") "//"))
-                 (mkdir "build")
-                 (invoke "tex" "-ini" "-interaction=scrollmode"
-                         "-output-directory=build"
-                         "fontinst.ins")))
-             ;; Since we're using docstrip without LaTeX we can't set \UseTDS
-             ;; or \BaseDirectory, so the generated files are just dumped in
-             ;; the "build" directory.
-             (add-after 'install 'install-generated-files
-               (lambda* (#:key outputs #:allow-other-keys)
-                 (let* ((out (assoc-ref outputs "out"))
-                        (root (string-append out "/share/texmf-dist")))
-                   (for-each (match-lambda
-                               ((dir files ...)
-                                (for-each (lambda (file)
-                                            (install-file
-                                             (string-append "build/" file)
-                                             (string-append root dir)))
-                                          files)))
-                             '(("/tex/fontinst/base"
-                                "fontinst.sty"
-                                "cfntinst.sty"
-                                "xfntinst.sty"
-                                "finstmsc.sty"
-                                "fontinst.ini")
-                               ("/tex/fontinst/misc"
-                                "csc2x.tex"
-                                "csckrn2x.tex"
-                                "osf2x.tex")
-                               ("/tex/latex/fontinst"
-                                "fontdoc.sty")))
-                   #t)))))))
-      (native-inputs
-       (list texlive-bin texlive-docstrip))
-      (home-page "https://www.ctan.org/pkg/fontinst")
-      (synopsis "Tools for converting and installing fonts for TeX and LaTeX")
-      (description "This package provides TeX macros for converting Adobe Font
-Metric files to TeX metric and virtual font format.  Fontinst helps mainly
-with the number crunching and shovelling parts of font installation.  This
-means in practice that it creates a number of files which give the TeX
-metrics (and related information) for a font family that TeX needs to do any
-typesetting in these fonts.")
-      (license license:lppl1.1+))))
+  (package
+    (name "texlive-fontinst")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/fontinst/"
+                   "doc/man/man1/fontinst.1"
+                   "doc/man/man1/fontinst.man1.pdf"
+                   "scripts/texlive-extra/fontinst.sh"
+                   "source/fontinst/base/"
+                   "tex/fontinst/base/"
+                   "tex/fontinst/latinetx/"
+                   "tex/fontinst/latinmtx/"
+                   "tex/fontinst/mathetx/"
+                   "tex/fontinst/mathmtx/"
+                   "tex/fontinst/misc/"
+                   "tex/fontinst/smbletx/"
+                   "tex/fontinst/smblmtx/"
+                   "tex/latex/fontinst/")
+             (base32
+              "1qqggn44w07a0aslsf3jdygwv1gfs90qahkan0gnibxsz7i44kqm")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "fontinst.sh")))
+    (home-page "https://ctan.org/pkg/fontinst")
+    (synopsis "Tools for converting and installing fonts for TeX and LaTeX")
+    (description
+     "This package provides TeX macros for converting Adobe Font Metric files
+to TeX metric and virtual font format.  Fontinst helps mainly with the number
+crunching and shovelling parts of font installation.  This means in practice
+that it creates a number of files which give the TeX metrics (and related
+information) for a font family that TeX needs to do any typesetting in these
+fonts.")
+    (license license:lppl1.1+)))
 
 (define-deprecated-package texlive-tex-fontinst-base texlive-fontinst)
 
 (define-public texlive-fontname
   (package
-    (inherit (simple-texlive-package
-              "texlive-fontname"
-              (list "/doc/fonts/fontname/fontname.texi"
-                    "/fonts/map/fontname/")
-              (base32
-               "009qvjpw48lajp0gxpvdk10n5qw3q41cpq05ycns67mxwkcaywq6")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/fontname")
+    (name "texlive-fontname")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/fontname/" "doc/info/fontname.info"
+                   "fonts/map/fontname/")
+             (base32
+              "014kiwbqz77yn8w58cb6fzqj0vlfmgyq09mxdj15ipjfgxjyvcbj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fontname")
     (synopsis "Scheme for naming fonts in TeX")
-    (description "This is Fontname, a naming scheme for (the base part of)
-external TeX font filenames.  This makes at most eight-character names
-from (almost) arbitrarily complex font names, thus helping portability of TeX
-documents.")
-    (license license:public-domain)))
+    (description
+     "This is Fontname, a naming scheme for (the base part of) external TeX
+font filenames.  This makes at most eight-character names from (almost)
+arbitrarily complex font names, thus helping portability of TeX documents.")
+    (license license:gpl3+)))
+
+(define-public texlive-forloop
+  (package
+    (name "texlive-forloop")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/forloop/" "source/latex/forloop/"
+                   "tex/latex/forloop/")
+             (base32
+              "14sx6zgilmbs5afp1k5gccix6ijhj0m8jg91blxn66995i6md4f5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/forloop")
+    (synopsis "Iteration in LaTeX")
+    (description
+     "The package provides a command @code{\\forloop} for doing iteration in
+LaTeX macro programming.")
+    ;; No version for the LGPL is specified.  Assuming the broader one.
+    (license license:lgpl2.0+)))
 
 (define-public texlive-cbfonts          ;71 MiB of greek fonts
   (package
-    (inherit (simple-texlive-package
-              "texlive-cbfonts"
-              (list "/doc/fonts/cbfonts/"
-                    "/fonts/type1/public/cbfonts/")
-              (base32
-               "01j22cbwq9jkni5vvrpz2mg1799cbx3aq801sni74i8wb1zcf6y1")
-              #:trivial? #t))
+    (name "texlive-cbfonts")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/cbfonts/"
+                   "fonts/enc/dvips/cbfonts/"
+                   "fonts/map/dvips/cbfonts/"
+                   "fonts/source/public/cbfonts/"
+                   "fonts/tfm/public/cbfonts/"
+                   "fonts/type1/public/cbfonts/")
+             (base32
+              "0l0dpgvngah227snzk6j5hf3kxs5cz5jvlpkv8pbapw6jx084np6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               ;; FIXME: Font metrics cannot be generated due to "bad pos"
+               ;; errors.
+               (delete 'generate-font-metrics))))
+    (native-inputs (list texlive-cm texlive-metafont))
     (propagated-inputs (list texlive-cbfonts-fd))
-    (home-page "https://www.ctan.org/pkg/cbgreek-complete")
+    (home-page "https://ctan.org/pkg/cbgreek-complete")
     (synopsis "Complete set of Greek fonts")
-    (description "This bundle presents the whole of Beccari's original Greek
-font set, which use the @i{Lispiakos} font shape derived from the shape of the
-fonts used in printers' shops in Lispia.  The fonts are available both as
-Metafont source and in Adobe Type 1 format, and at the same wide set of design
-sizes as are such font sets as the EC fonts.")
+    (description
+     "This bundle presents the whole of Beccari's original Greek font set,
+which use the @i{Lispiakos} font shape derived from the shape of the fonts
+used in printers' shops in Lispia.  The fonts are available both as Metafont
+source and in Adobe Type 1 format, and at the same wide set of design sizes as
+are such font sets as the EC fonts.")
     (license license:lppl1.3c+)))
 
 (define-public texlive-cbfonts-fd
   (package
-    (inherit (simple-texlive-package
-              "texlive-cbfonts-fd"
-              (list "/doc/fonts/cbfonts/"
-                    "/tex/latex/cbfonts-fd/")
-              (base32
-               "0g91p2qcgqn916vgf777h45dabv2r6l6f9xkcq0b3gpir3qsj3d4")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/cbfonts-fd")
+    (name "texlive-cbfonts-fd")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/cbfonts-fd/"
+                   "source/fonts/cbfonts-fd/"
+                   "tex/latex/cbfonts-fd/")
+             (base32
+              "1r2kmnccvrq181ac7gyff9y3wn7dydx50jy8f9n6qhnb824pdn78")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/cbfonts-fd")
     (synopsis "LaTeX font description files for the CB Greek fonts")
-    (description "The package provides font description files for all the many
-shapes available from the cbfonts collection.  The files provide the means
-whereby the @acronym{NFSS, New Font Selection Scheme} knows which fonts a
-LaTeX user is requesting.
+    (description
+     "The package provides font description files for all the many shapes
+available from the @code{cbfonts} collection.  The files provide the means
+whereby the @acronym{NFSS, New Font Selection Scheme} knows which fonts
+a LaTeX user is requesting.
 
 Tip: installing @code{texlive-cbfonts} will automatically propagate this one.")
     (license license:lppl1.3c+)))
 
+(define-public texlive-ccicons
+  (package
+    (name "texlive-ccicons")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/ccicons/"
+                   "doc/latex/ccicons/"
+                   "fonts/enc/dvips/ccicons/"
+                   "fonts/map/dvips/ccicons/"
+                   "fonts/opentype/public/ccicons/"
+                   "fonts/tfm/public/ccicons/"
+                   "fonts/type1/public/ccicons/"
+                   "source/fonts/ccicons/"
+                   "source/latex/ccicons/"
+                   "tex/latex/ccicons/")
+             (base32
+              "0lyxbjpkxny6hl7pmnpka0gmgx7qv66pibvwcfs9dvwhdcvwjr4x")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ccicons")
+    (synopsis "LaTeX support for Creative Commons icons")
+    (description
+     "The package provides the means to typeset Creative Commons icons, in
+documents licensed under CC licences.  A font (in Adobe Type 1 format) and
+LaTeX support macros are provided.")
+    (license (list license:lppl1.3c license:silofl1.1))))
+
 (define-public texlive-cite
   (package
-    (inherit (simple-texlive-package
-              "texlive-cite"
-              (list "doc/latex/cite/" "tex/latex/cite/")
-              (base32
-               "0b1amznayxj80dmqbzcysmj7q8aksbyz98k6djsqi0mhwp1cd0fd")
-              #:trivial? #t))
+    (name "texlive-cite")
     (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/cite/" "tex/latex/cite/")
+             (base32
+              "0b1amznayxj80dmqbzcysmj7q8aksbyz98k6djsqi0mhwp1cd0fd")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/cite")
     (synopsis "Improved citation handling in LaTeX")
     (description
      "The package supports compressed, sorted lists of numerical citations,
 and also deals with various punctuation and other issues of representation,
 including comprehensive management of break points.  The package is compatible
-with both hyperref and backref.  The package is (unsurprisingly) part of the
-cite bundle of the author's citation-related packages.")
-    (license (license:fsf-free
-              "/share/texmf-dist/doc/latex/cite/README"))))
+with both @code{hyperref} and @code{backref}.  The package is (unsurprisingly)
+part of the cite bundle of the author's citation-related packages.")
+    (license (license:fsf-free "/share/texmf-dist/doc/latex/cite/README"))))
 
 (define-public texlive-cm
-  (let ((template (simple-texlive-package
-                   "texlive-cm"
-                   (list "/fonts/source/public/cm/"
-                         "/fonts/map/dvips/cm/cmtext-bsr-interpolated.map"
-                         "/doc/fonts/cm/")
-                   (base32
-                    "0mfslqs9saqkb3z3xdhsqnklxk858nmipgj1y93by2791jzkma1d")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:modules modules '())
-          '((guix build gnu-build-system)
-            (guix build utils)
-            (srfi srfi-26)))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (replace 'build
-               (lambda* (#:key inputs #:allow-other-keys)
-                 (let ((mf (assoc-ref inputs "texlive-metafont")))
-                   ;; Tell mf where to find mf.base
-                   (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
-                   ;; Tell mf where to look for source files
-                   (setenv "MFINPUTS"
-                           (string-append (getcwd) "/fonts/source/public/cm/:"
-                                          mf "/share/texmf-dist/metafont/base")))
-                 (for-each make-file-writable
-                           (cons "fonts/source/public/cm/"
-                                 (find-files "fonts/source/public/cm/" ".*")))
-                 (let ((build (string-append (getcwd) "/build"))
-                       (pkdir (string-append (getcwd) "/pk/ljfour/public/cm/dpi600")))
-                   (mkdir-p pkdir)
-                   (mkdir-p build)
-                   (with-directory-excursion "fonts/source/public/cm/"
-                     (for-each (lambda (font)
-                                 (format #t "building font ~a\n" font)
-                                 (invoke "mf" "-progname=mf"
-                                         (string-append "-output-directory=" build)
-                                         (string-append "\\"
-                                                        "mode:=ljfour; "
-                                                        "mag:=1+0/600; "
-                                                        "scrollmode; "
-                                                        "input "
-                                                        (basename font ".mf")))
-                                 (invoke "gftopk"
-                                         (string-append build "/"
-                                                        (basename font ".mf") ".600gf")
-                                         (string-append pkdir "/"
-                                                        (basename font ".mf") ".pk")))
-                               (find-files "." "cm(.*[0-9]+.*|inch)\\.mf$"))))
-                 #t))
-             (add-after 'install 'install-generated-fonts
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (let* ((out    (assoc-ref outputs "out"))
-                        (fonts  (string-append out "/share/texmf-dist/fonts/"))
-                        (pk     (string-append fonts "pk"))
-                        (tfm    (string-append fonts "tfm/public/cm")))
-                   (for-each (cut install-file <> tfm)
-                             (find-files "build" "\\.*"))
-                   (copy-recursively "pk" pk)
-                   #t)))))))
-      (native-inputs
-       (list texlive-bin texlive-metafont))
-      (home-page "https://www.ctan.org/pkg/cm")
-      (synopsis "Computer Modern fonts for TeX")
-      (description "This package provides the Computer Modern fonts by Donald
-Knuth.  The Computer Modern font family is a large collection of text,
-display, and mathematical fonts in a range of styles, based on Monotype Modern
-8A.")
-      (license license:knuth))))
+  (package
+    (name "texlive-cm")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/cm/" "fonts/map/dvips/cm/"
+                   "fonts/pk/ljfour/public/cm/dpi600/"
+                   "fonts/source/public/cm/"
+                   "fonts/tfm/public/cm/")
+             (base32
+              "10adgjc3lkj2z50jp1f9n83bdrx8bqxd76rl605d0d5pb435k97m")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:texlive-latex-bin? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'generate-font-metrics 'generate-pk
+            (lambda _
+              (let* ((cwd (getcwd))
+                     (pkdir
+                      (string-append cwd "/fonts/pk/ljfour/public/cm/dpi600"))
+                     (build-dir (string-append cwd "/build")))
+                (with-directory-excursion "fonts/source/public/cm/"
+                  (mkdir-p pkdir)
+                  (for-each
+                   (lambda (font)
+                     (let ((font-name (basename font ".mf")))
+                       (invoke "gftopk"
+                               (string-append build-dir "/" font-name ".600gf")
+                               (string-append pkdir "/" font-name ".pk"))))
+                   (find-files "." "cm(.*[0-9]+.*|inch)\\.mf$")))))))))
+    (native-inputs (list texlive-metafont))
+    (home-page "https://ctan.org/pkg/cm")
+    (synopsis "Computer Modern fonts for TeX")
+    (description
+     "This package provides the Computer Modern fonts by Donald Knuth.  The
+Computer Modern font family is a large collection of text, display, and
+mathematical fonts in a range of styles, based on Monotype Modern 8A.")
+    (license license:knuth)))
 
 (define-deprecated-package texlive-fonts-cm texlive-cm)
 
+(define-public texlive-cmextra
+  (package
+    (name "texlive-cmextra")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "fonts/source/public/cmextra/"
+                   "fonts/tfm/public/cmextra/")
+             (base32
+              "00my52lh3cn8bn211fpn7373b7khaylx4fgkrd2m72xgaymil308")))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-metafont))
+    (home-page "https://ctan.org/pkg/knuth-local")
+    (synopsis "Knuth's local information")
+    (description
+     "This package provides a collection of experimental programs and
+developments based on, or complementary to, the matter in his distribution
+directories.")
+    (license license:public-domain)))
+
 (define-public texlive-cm-lgc
   (package
-    (inherit (simple-texlive-package
-              "texlive-cm-lgc"
-              (list "/doc/fonts/cm-lgc/"
-                    "/fonts/afm/public/cm-lgc/"
-                    "/fonts/type1/public/cm-lgc/"
-                    "/fonts/vf/public/cm-lgc/"
-                    "/tex/latex/cm-lgc/")
-              (base32
-               "0rm7wgyb07y8h6vbvc2xzsqnxy322d4j9ly2p67z84b81c8i3zpc")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/cm-lgc")
+    (name "texlive-cm-lgc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/cm-lgc/"
+                   "fonts/afm/public/cm-lgc/"
+                   "fonts/enc/dvips/cm-lgc/"
+                   "fonts/map/dvips/cm-lgc/"
+                   "fonts/ofm/public/cm-lgc/"
+                   "fonts/ovf/public/cm-lgc/"
+                   "fonts/tfm/public/cm-lgc/"
+                   "fonts/type1/public/cm-lgc/"
+                   "fonts/vf/public/cm-lgc/"
+                   "tex/latex/cm-lgc/")
+             (base32
+              "1nj3gp0kpzlqkm22lj2ym9c95xw323xc5z91gsyv8xs716868gp2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/cm-lgc")
     (synopsis "Type 1 CM-based fonts for Latin, Greek and Cyrillic")
-    (description "The fonts are converted from Metafont sources of the
-Computer Modern font families, using @command{textrace}.  Supported encodings
-are: T1 (Latin), T2A (Cyrillic), LGR (Greek) and TS1.  The package also
-includes Unicode virtual fonts for use with Omega.  The font set is not a
-replacement for any of the other Computer Modern-based font sets (for example,
-cm-super for Latin and Cyrillic, or cbgreek for Greek), since it is available
-at a single size only; it offers a compact set for @i{general} working.  The
-fonts themselves are encoded to external standards, and virtual fonts are
-provided for use with TeX.")
+    (description
+     "The fonts are converted from METAFONT sources of the Computer Modern
+font families, using @command{textrace}.  Supported encodings are: T1 (Latin),
+T2A (Cyrillic), LGR (Greek) and TS1.  The package also includes Unicode
+virtual fonts for use with Omega.  The font set is not a replacement for any
+of the other Computer Modern-based font sets (for example, cm-super for Latin
+and Cyrillic, or cbgreek for Greek), since it is available at a single size
+only; it offers a compact set for general working.  The fonts themselves are
+encoded to external standards, and virtual fonts are provided for use with
+TeX.")
     (license license:gpl2+)))
 
 (define-public texlive-cm-super
-  (let ((template (simple-texlive-package
-                   "texlive-cm-super"
-                   (list "/doc/fonts/cm-super/"
-                         "/dvips/cm-super/"
-                         "/fonts/afm/public/cm-super/"
-                         "/fonts/enc/dvips/cm-super/"
-                         "/fonts/map/dvips/cm-super/"
-                         "/fonts/map/vtex/cm-super/"
-                         "/fonts/type1/public/cm-super/"
-                         "/tex/latex/cm-super/")
-                   (base32
-                    "1k3afl0x0bqbr5mnawbnp7rr2126dwn0vwnxzibm9ggvzqilnkm6")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (delete 'reset-gzip-timestamps)))))
-      (home-page "https://www.ctan.org/pkg/cm-super")
-      (synopsis "Computer Modern Super family of fonts")
-      (description "The CM-Super family provides Adobe Type 1 fonts that replace
-the T1/TS1-encoded Computer Modern (EC/TC), T1/TS1-encoded Concrete,
+  (package
+    (name "texlive-cm-super")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/cm-super/"
+                   "dvips/cm-super/"
+                   "fonts/afm/public/cm-super/"
+                   "fonts/enc/dvips/cm-super/"
+                   "fonts/map/dvips/cm-super/"
+                   "fonts/map/vtex/cm-super/"
+                   "fonts/type1/public/cm-super/"
+                   "tex/latex/cm-super/")
+             (base32
+              "1k3afl0x0bqbr5mnawbnp7rr2126dwn0vwnxzibm9ggvzqilnkm6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/cm-super")
+    (synopsis "Computer Modern Super family of fonts")
+    (description
+     "The CM-Super family provides Adobe Type 1 fonts that replace the
+T1/TS1-encoded Computer Modern (EC/TC), T1/TS1-encoded Concrete,
 T1/TS1-encoded CM bright and LH Cyrillic fonts (thus supporting all European
 languages except Greek), and bringing many ameliorations in typesetting
 quality.  The fonts exhibit the same metrics as the METAFONT-encoded
 originals.")
-      ;; With font exception
-      (license license:gpl2+))))
+    ;; With font exception
+    (license license:gpl2+)))
 
 (define-deprecated-package texlive-fonts-cm-super texlive-cm-super)
 
 (define-public texlive-courier
   (package
-    (inherit (simple-texlive-package
-              "texlive-courier"
-              (list "/dvips/courier/"
-                    "/fonts/afm/adobe/courier/"
-                    "/fonts/afm/urw/courier/"
-                    "/fonts/map/dvips/courier/"
-                    "/fonts/tfm/adobe/courier/"
-                    "/fonts/tfm/urw35vf/courier/"
-                    "/fonts/type1/adobe/courier/"
-                    "/fonts/type1/urw/courier/"
-                    "/fonts/vf/adobe/courier/"
-                    "/fonts/vf/urw35vf/courier/"
-                    "/tex/latex/courier/"
-                    "/tex4ht/ht-fonts/alias/adobe/courier/"
-                    "/tex4ht/ht-fonts/unicode/adobe/courier/")
-              (base32
-               "05lglavi073glj26k9966351hka5ac22g4vim61dkfy001vz4i7r")
-              #:trivial? #t))
+    (name "texlive-courier")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "dvips/courier/"
+                   "fonts/afm/adobe/courier/"
+                   "fonts/afm/urw/courier/"
+                   "fonts/map/dvips/courier/"
+                   "fonts/tfm/adobe/courier/"
+                   "fonts/tfm/urw35vf/courier/"
+                   "fonts/type1/adobe/courier/"
+                   "fonts/type1/urw/courier/"
+                   "fonts/vf/adobe/courier/"
+                   "fonts/vf/urw35vf/courier/"
+                   "tex/latex/courier/")
+             (base32
+              "08g6lm12b0k6333pxcaqdf67v87fz5mrqp3jgal8qhrls5ym8q6r")))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/urw-base35")
-    (synopsis "URW Base 35 font pack for LaTeX")
-    (description "This package provides a drop-in replacements for the Courier
-font from Adobe's basic set.")
+    (synopsis "Replacement for Adobe's Courier font")
+    (description
+     "This package provides a drop-in replacement for the Courier font from
+Adobe's basic set.")
     ;; No license version specified.
     (license license:gpl3+)))
 
+(define-public texlive-cweb
+  (package
+    (name "texlive-cweb")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/ctangle.1"
+                   "doc/man/man1/ctangle.man1.pdf"
+                   "doc/man/man1/ctwill-refsort.1"
+                   "doc/man/man1/ctwill-refsort.man1.pdf"
+                   "doc/man/man1/ctwill-twinx.1"
+                   "doc/man/man1/ctwill-twinx.man1.pdf"
+                   "doc/man/man1/ctwill.1"
+                   "doc/man/man1/ctwill.man1.pdf"
+                   "doc/man/man1/cweave.1"
+                   "doc/man/man1/cweave.man1.pdf"
+                   "doc/man/man1/cweb.1"
+                   "doc/man/man1/cweb.man1.pdf"
+                   "doc/man/man1/twill.1"
+                   "doc/man/man1/twill.man1.pdf"
+                   "tex/plain/cweb/")
+             (base32
+              "1p6zj6zc6c3i5caj1217gkjjk0wyfks85x33i5p28znzc2fgvbdi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/cwebbin")
+    (synopsis "CWEB for ANSI-C/C++ compilers")
+    (description
+     "This package provides a highly portable and extended version of
+Levy/Knuth CWEB 3.64c.  TeX macros, CWEB macros, and NLS catalogs are included
+for German, French (partially), and Italian program documentation on any
+machine.")
+    (license license:knuth)))
+
 (define-public texlive-tex-gyre
   (package
-    (inherit (simple-texlive-package
-              "texlive-tex-gyre"
-              '("/doc/fonts/tex-gyre/GUST-FONT-LICENSE.txt"
-                "/fonts/afm/public/tex-gyre/"
-                "/fonts/enc/dvips/tex-gyre/"
-                "/fonts/map/dvips/tex-gyre/"
-                "/fonts/opentype/public/tex-gyre/"
-                "/fonts/tfm/public/tex-gyre/"
-                "/fonts/type1/public/tex-gyre/"
-                "/tex/latex/tex-gyre/")
-              (base32
-               "1ldnlmclghm3gnyv02r8a6cqybygz2ifq07mhykhf43h1pw3aq7k")
-              #:trivial? #t))
+    (name "texlive-tex-gyre")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/tex-gyre/"
+                   "fonts/afm/public/tex-gyre/"
+                   "fonts/enc/dvips/tex-gyre/"
+                   "fonts/map/dvips/tex-gyre/"
+                   "fonts/opentype/public/tex-gyre/"
+                   "fonts/tfm/public/tex-gyre/"
+                   "fonts/type1/public/tex-gyre/"
+                   "source/fonts/tex-gyre/"
+                   "tex/latex/tex-gyre/")
+             (base32
+              "0bn8g6rav0v47zbf1gjwp64x0l5340wb5iiiw4kdg69qingkj5lq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/tex-gyre")
     (synopsis "TeX fonts extending URW fonts")
     (description
@@ -1313,23 +6377,98 @@ support (for use with a variety of encodings) is provided.")
     ;; additional but not legally binding clause.
     (license license:lppl1.3c+)))
 
+(define-public texlive-tex-gyre-math
+  (package
+    (name "texlive-tex-gyre-math")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/tex-gyre-math/"
+                   "fonts/opentype/public/tex-gyre-math/"
+                   "source/fonts/tex-gyre-math/")
+             (base32
+              "1k5fx03bg702636hh7hv4kzzxhbbic26rp5g4lq2bgajd5dgc5xy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tex-gyre-math")
+    (synopsis "Maths fonts to match tex-gyre text fonts")
+    (description
+     "TeX-Gyre-Math is a collection of maths fonts to match the text fonts of
+the TeX-Gyre collection.  The collection is available in OpenType format,
+only; fonts conform to the developing standards for OpenType maths fonts.
+TeX-Gyre-Math-Bonum (to match TeX-Gyre-Bonum), TeX-Gyre-Math-Pagella (to match
+TeX-Gyre-Pagella), TeX-Gyre-Math-Schola (to match TeX-Gyre-Schola) and
+TeX-Gyre-Math-Termes (to match TeX-Gyre-Termes) fonts are provided.")
+    (license license:gfl1.0)))
+
+(define-public texlive-crop
+  (package
+    (name "texlive-crop")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/crop/" "source/latex/crop/"
+                   "tex/latex/crop/")
+             (base32
+              "1m0dg69bhbvqrq9d2yl6ip36w1bf5cibp386jj2wbywisa2hn3qf")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/crop")
+    (synopsis "Support for cropmarks")
+    (description
+     "This package provides a package providing corner marks for camera
+alignment as well as for trimming paper stacks, and additional page
+information on every page if required.  Most macros are easily adaptable to
+personal preferences.  An option is provided for selectively suppressing
+graphics or text, which may be useful for printing just colour graphics on
+a colour laser printer and the rest on a cheap mono laser printer.  A page
+info line contains the time and a new cropmarks index and is printed at the
+top of the page.  A configuration command is provided for the info line font.
+Options for better collaboration with dvips, pdfTeX and vtex are provided.")
+    (license license:lppl)))
+
+(define-public texlive-ctablestack
+  (package
+    (name "texlive-ctablestack")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/ctablestack/"
+                   "source/luatex/ctablestack/"
+                   "tex/luatex/ctablestack/")
+             (base32
+              "13l779436aj3hlchwvhkpiikbyfa2j4swzfrwqkjh9l8bc2cwg7n")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ctablestack")
+    (synopsis "Catcode table stable support")
+    (description
+     "This package provides a method for defining category code table stacks
+in LuaTeX.  It is required by the @code{luatexbase} package which uses
+@code{ctablestack} to provide a back-compatibility form of this concept.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-lm
   (package
-    (inherit (simple-texlive-package
-              "texlive-lm"
-              (list "/doc/fonts/lm/"
-                    "/fonts/afm/public/lm/"
-                    "/fonts/enc/dvips/lm/"
-                    "/fonts/map/dvipdfm/lm/"
-                    "/fonts/map/dvips/lm/"
-                    "/fonts/opentype/public/lm/"
-                    "/fonts/tfm/public/lm/"
-                    "/fonts/type1/public/lm/"
-                    "/tex/latex/lm/")
-              (base32
-               "0yyk0dr4yms82mwy4dc03zf5igyhgcb65icdah042rk23rlpxygv")
-              #:trivial? #t))
-    (home-page "https://www.gust.org.pl/projects/e-foundry/latin-modern/")
+    (name "texlive-lm")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/lm/"
+                   "fonts/afm/public/lm/"
+                   "fonts/enc/dvips/lm/"
+                   "fonts/map/dvipdfm/lm/"
+                   "fonts/map/dvips/lm/"
+                   "fonts/opentype/public/lm/"
+                   "fonts/tfm/public/lm/"
+                   "fonts/type1/public/lm/"
+                   "tex/latex/lm/")
+             (base32
+              "1zgp0pc30n8jqr7kiv6j77i9i8dzzyh8zv72n24n74lb28k0sfmr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
+    (home-page "https://ctan.org/pkg/lm")
     (synopsis "Latin Modern family of fonts")
     (description "The Latin Modern fonts are derived from the famous Computer
 Modern fonts designed by Donald E. Knuth and described in Volume E of his
@@ -1343,1636 +6482,4853 @@ Computers & Typesetting series.")
 
 (define-public texlive-lm-math
   (package
-    (inherit (simple-texlive-package
-              "texlive-lm-math"
-              (list "/doc/fonts/lm-math/"
-                    "/fonts/opentype/public/lm-math/")
-              (base32
-               "0gqdk8x3r1iz4n8j6r3pcqbwalxvkihayvmjfq4iv6hwb0pvys8z")
-              #:trivial? #t))
-    (home-page "https://www.gust.org.pl/projects/e-foundry/latin-modern")
+    (name "texlive-lm-math")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/lm-math/"
+                   "fonts/opentype/public/lm-math/")
+             (base32
+              "0gqdk8x3r1iz4n8j6r3pcqbwalxvkihayvmjfq4iv6hwb0pvys8z")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lm-math")
     (synopsis "OpenType maths fonts for Latin Modern")
-    (description "Latin Modern Math is a maths companion for the Latin Modern
-family of fonts, in OpenType format.  For use with LuaLaTeX or XeLaTeX,
-support is available from the @code{unicode-math} package.")
+    (description
+     "Latin Modern Math is a maths companion for the Latin Modern family of
+fonts, in OpenType format.  For use with LuaLaTeX or XeLaTeX, support is
+available from the @code{unicode-math} package.")
     (license license:gfl1.0)))
 
+(define-public texlive-lwarp
+  (package
+    (name "texlive-lwarp")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/lwarp/"
+                   "scripts/lwarp/"
+                   "source/latex/lwarp/"
+                   "tex/latex/lwarp/")
+             (base32
+              "0r1hxihhd7yzhw4s3v9yn1wl36q6fs2cwbdc09z9c1mdz3pywzp6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "lwarpmk.lua")))
+    (home-page "https://ctan.org/pkg/lwarp")
+    (synopsis "Converts LaTeX to HTML")
+    (description
+     "This package converts LaTeX to HTML by using LaTeX to process the user's
+document and generate HTML tags.  External utility programs are only used for
+the final conversion of text and images.  Math may be represented by SVG files
+or MathJax.  Hundreds of LaTeX packages are supported, and their load order is
+automatically verified.  Documents may be produced by LaTeX, LuaLaTeX,
+XeLaTeX, and by several CJK engines, classes, and packages.  A texlua script
+automates compilation, index, glossary, and batch image processing, and also
+supports latexmk.  Configuration is semi-automatic at the first manual
+compile.  Support files are self-generated.  Print and HTML versions of each
+document may coexist.  Assistance is provided for HTML import into EPUB
+conversion software and word processors.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-knuth-lib
-  (let ((template (simple-texlive-package
-                   "texlive-knuth-lib"
-                   (list "/fonts/source/public/knuth-lib/"
-                         "/tex/generic/knuth-lib/"
-                         "/tex/plain/knuth-lib/")
-                   (base32
-                    "1cxyqqprp8sj2j4zp9l0wry8cq2awpz3a8i5alzpc4ndg7a6pgdf")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:modules _ '())
-          '((guix build gnu-build-system)
-            (guix build utils)
-            (srfi srfi-26)))
-         ((#:phases phases '())
-          `(modify-phases ,phases
-             (replace 'build
-               (lambda* (#:key inputs #:allow-other-keys)
-                 (with-directory-excursion "fonts/source/public/knuth-lib"
-                   (let ((mf (assoc-ref inputs "texlive-metafont")))
-                     ;; Tell mf where to find mf.base
-                     (setenv "MFBASES"
-                             (string-append mf "/share/texmf-dist/web2c"))
-                     ;; Tell mf where to look for source files
-                     (setenv "MFINPUTS"
-                             (string-append (getcwd) ":"
-                                            mf "/share/texmf-dist/metafont/base")))
-                   (mkdir "build")
-                   (for-each (lambda (font)
-                               (format #t "building font ~a\n" font)
-                               (invoke "mf" "-progname=mf"
-                                       "-output-directory=build"
-                                       (string-append "\\"
-                                                      "mode:=ljfour; "
-                                                      "mag:=1; "
-                                                      "batchmode; "
-                                                      "input " font)))
-                             (find-files "." "(manfnt|logo.+)\\.mf$")))
-                 #t))
-             (add-after 'install 'install-fonts
-               (lambda* (#:key outputs #:allow-other-keys)
-                 (with-directory-excursion "fonts/source/public/knuth-lib"
-                   (let* ((out (assoc-ref outputs "out"))
-                          (tfm (string-append
-                                out "/share/texmf-dist/fonts/tfm/public/knuth-lib")))
-                     (for-each (cut install-file <> tfm)
-                               (find-files "build" "\\.tfm"))
-                     #t))))))))
-      (native-inputs
-       (list texlive-bin texlive-metafont))
-      (home-page "https://www.ctan.org/pkg/knuth-lib")
-      (synopsis "Small library of METAFONT sources")
-      (description "This is a collection of core TeX and METAFONT macro files
-from Donald Knuth, including the plain format, plain base, and the MF logo
-fonts.")
-      (license license:knuth))))
+  (package
+    (name "texlive-knuth-lib")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "fonts/source/public/knuth-lib/"
+                   "fonts/tfm/public/knuth-lib/"
+                   "tex/generic/knuth-lib/"
+                   "tex/plain/knuth-lib/")
+             (base32
+              "0dl8z340n6m6xn7wari4hir0syxqi0kl2fhnf0bvnmkqhqwyzpca")))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
+    (native-inputs (list texlive-cm texlive-metafont))
+    (home-page "https://ctan.org/pkg/knuth-lib")
+    (synopsis "Small library of METAFONT sources")
+    (description
+     "This is a collection of core TeX and METAFONT macro files from Donald
+Knuth, including the plain format, plain base, and the MF logo fonts.")
+    (license license:knuth)))
 
 (define-deprecated-package texlive-fonts-knuth-lib texlive-knuth-lib)
 
-(define-public texlive-fonts-latex
+(define-public texlive-knuth-local
   (package
-    (name "texlive-fonts-latex")
+    (name "texlive-knuth-local")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/fonts/source/public/latex-fonts"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0ypsm4xv9cw0jckk2qc7gi9hcmhf31mrg56pz3llyx3yd9vq2lps"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (srfi srfi-1)
-                  (srfi srfi-26))
-       #:tests? #f                      ; no tests
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)
-         (replace 'build
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((mf (assoc-ref inputs "texlive-metafont")))
-               ;; Tell mf where to find mf.base
-               (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
-               ;; Tell mf where to look for source files
-               (setenv "MFINPUTS"
-                       (string-append (getcwd) ":"
-                                      mf "/share/texmf-dist/metafont/base:"
-                                      (assoc-ref inputs "texlive-cm")
-                                      "/share/texmf-dist/fonts/source/public/cm")))
-             (mkdir "build")
-             (for-each (lambda (font)
-                         (format #t "building font ~a\n" font)
-                         (invoke "mf" "-progname=mf"
-                                 "-output-directory=build"
-                                 (string-append "\\"
-                                                "mode:=ljfour; "
-                                                "mag:=1; "
-                                                "batchmode; "
-                                                "input " font)))
-                       '("icmcsc10" "icmex10" "icmmi8" "icmsy8" "icmtt8"
-                         "ilasy8" "ilcmss8" "ilcmssb8" "ilcmssi8"
-                         "lasy5" "lasy6" "lasy7" "lasy8" "lasy9" "lasy10" "lasyb10"
-                         "lcircle10" "lcirclew10" "lcmss8" "lcmssb8" "lcmssi8"
-                         "line10" "linew10"))
-             #t))
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (tfm (string-append
-                          out "/share/texmf-dist/fonts/tfm/public/latex-fonts"))
-                    (mf  (string-append
-                          out "/share/texmf-dist/fonts/source/public/latex-fonts")))
-               (for-each (cut install-file <> tfm)
-                         (find-files "build" "\\.*"))
-               (for-each (cut install-file <> mf)
-                         (find-files "." "\\.mf"))
-               #t))))))
+    (source (texlive-origin
+             name version
+             (list "fonts/source/public/knuth-local/"
+                   "fonts/tfm/public/knuth-local/"
+                   "mft/knuth-local/" "tex/plain/knuth-local/")
+             (base32
+              "02cf32f57fr6bngiv9xiw8bh4sq53p9br034ap74s80h3bgcmn1f")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/knuth-local")
     (native-inputs
-     (list texlive-bin texlive-metafont texlive-cm))
-    (home-page "https://www.ctan.org/pkg/latex-fonts")
+     (list texlive-knuth-lib texlive-metafont))
+    (synopsis "Knuth's local information")
+    (description
+     "This package provides a collection of experimental programs and
+developments based on, or complementary to, the matter in his distribution
+directories.")
+    (license license:public-domain)))
+
+(define-public texlive-lapdf
+  (package
+    (name "texlive-lapdf")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/lapdf/" "tex/latex/lapdf/")
+             (base32
+              "0rnwgb3fy8f4app543lx72f4rhc5c4kladnazkay9lr8hkfa8s4d")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lapdf")
+    (synopsis "PDF drawing directly in TeX documents")
+    (description
+     "The package provides the means to use PDF drawing primitives to produce
+high quality, colored graphics.  It uses Bezier curves (integral and rational)
+from degree one to seven, allows TeX typesetting in the graphic, offers most
+of the standard math functions, allows plotting normal, parametric and polar
+functions.  The package has linear, logx, logy, logxy and polar grids with
+many specs; it can rotate, clip and do many nice things easily it has two
+looping commands for programming and many instructive example files.")
+    (license license:gpl3+)))
+
+(define-public texlive-latex-fonts
+  (package
+    (name "texlive-latex-fonts")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/latex-fonts/"
+                   "fonts/source/public/latex-fonts/"
+                   "fonts/tfm/public/latex-fonts/")
+             (base32
+              "1bzqzzhs15w7dqz90hfjnaffjqh24q14w2h1h8vnxzvrlsyv21vq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
+    (native-inputs (list texlive-cm texlive-metafont))
+    (home-page "https://ctan.org/pkg/latex-fonts")
     (synopsis "Collection of fonts used in LaTeX distributions")
-    (description "This is a collection of fonts for use with standard LaTeX
-packages and classes. It includes invisible fonts (for use with the slides
-class), line and circle fonts (for use in the picture environment) and LaTeX
-symbol fonts.")
+    (description
+     "This is a collection of fonts for use with standard LaTeX packages and
+classes. It includes invisible fonts (for use with the slides class), line and
+circle fonts (for use in the @code{picture} environment) and LaTeX symbol
+fonts.")
     (license license:lppl1.2+)))
 
+(define-deprecated-package texlive-fonts-latex texlive-latex-fonts)
+
+(define-public texlive-latex-make
+  (package
+    (name "texlive-latex-make")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/latex-make/"
+                   "scripts/latex-make/"
+                   "source/support/latex-make/"
+                   "tex/latex/latex-make/")
+             (base32
+              "0ll6v1mdi1m5fp3s0c4dkgh351lg9ckzdfwz3k488y6cbcvrpm5x")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
+    (home-page "https://ctan.org/pkg/latex-make")
+    (synopsis "Easy compiling of complex (and simple) LaTeX documents")
+    (description
+     "This package provides several tools that aim to simplify the compilation
+of LaTeX documents:
+
+@itemize
+
+@item @file{LaTeX.mk}: a Makefile snippet to help compiling LaTeX documents in
+DVI, PDF, PS, ...  format.  Dependencies are automatically tracked: one should
+be able to compile documents with a one-line Makefile containing @samp{include
+LaTeX.mk}.  Complex documents (with multiple bibliographies, indexes,
+glossaries, ...)  should be correctly managed.
+
+@item @file{figlatex.sty}: a LaTeX package to easily insert Xfig figures.  It
+can interact with LaTeX.mk so that the latter automatically invokes
+@command{transfig} if needed.
+
+@end itemize")
+    (license license:gpl3+)))
+
+(define-public texlive-liftarm
+  (package
+    (name "texlive-liftarm")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/liftarm/" "tex/latex/liftarm/")
+             (base32
+              "1dqi322kqlqbh4hli6nwm88nsg4dkr2fnrwi4i70gxyzxdh1mjj4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/liftarm")
+    (synopsis "Draw liftarms")
+    (description
+     "This package can be used to draw liftarms with TikZ.  It provides
+several options for the appearance of the liftarms, a command which connects
+two liftarms and an environment to describe a construction.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-lpic
+  (package
+    (name "texlive-lpic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/lpic/" "tex/latex/lpic/")
+             (base32
+              "15jzvpn3gnj5c0wachbsjazll9qlibyzxf4i2g8ad7l4yd967m3c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lpic")
+    (synopsis "Put LaTeX material over included graphics")
+    (description
+     "The package defines a convenient interface to put any LaTeX material on
+top of included graphics.  The LaTeX material may also be rotated and typeset
+on top of a white box overshadowing the graphics.  The coordinates of the
+LaTeX boxes are given relative to the original, unscaled graphics; when the
+graphics is rescaled, the LaTeX annotations stay at their right places (unless
+you do something extreme).  In a draft mode, the package enables you to draw
+a coordinate grid over the picture for easy adjustment of positions of the
+annotations.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-lroundrect
+  (package
+    (name "texlive-lroundrect")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/lroundrect/"
+                   "source/latex/lroundrect/"
+                   "tex/latex/lroundrect/")
+             (base32
+              "1yjfg9z0s8drij13fdhii1r9j9i57c112iv2q0airndycm6y8wsg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lroundrect")
+    (synopsis "LaTeX macros for using the @code{roundrect} MetaPost routines")
+    (description
+     "This LaTeX package provides ways to use the extremely configurable
+rounded rectangles of the @code{roundrect} MetaPost package with LaTeX.  It is
+chiefly useful for examples, but also has macros for particular types of boxes
+which are useful on their own.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-luamesh
+  (package
+    (name "texlive-luamesh")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luamesh/" "metapost/luamesh/"
+                   "scripts/luamesh/" "tex/lualatex/luamesh/")
+             (base32
+              "02qq6d51pihkxz4zbcxppikkzpr99mw8kmp64gm986fpcn6k2wns")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luamesh")
+    (synopsis "Computes and draws 2D Delaunay triangulation")
+    (description
+     "The package allows to compute and draw 2D Delaunay triangulation.
+The algorithm is written with Lua, and depending upon the choice of the
+engine, the drawing is done by MetaPost (with @code{luamplib}) or by TikZ.
+The Delaunay triangulation algorithm is the Bowyer and Watson algorithm.
+Several macros are provided to draw the global mesh, the set of points, or
+a particular step of the algorithm.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-luasseq
+  (package
+    (name "texlive-luasseq")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luasseq/" "scripts/luasseq/"
+                   "source/lualatex/luasseq/"
+                   "tex/lualatex/luasseq/")
+             (base32
+              "1mkhzysyhpbblpwwy4d4983b5np23jnxl9ai986g0n1vpyv0kc47")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luasseq")
+    (synopsis "Drawing spectral sequences in LuaLaTeX")
+    (description
+     "The package is an update of the author's @code{sseq} package, for use
+with LuaLaTeX.  This version uses less memory, and operates faster than the
+original; it also offers several enhancements.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-maker
+  (package
+    (name "texlive-maker")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/maker/" "tex/latex/maker/")
+             (base32
+              "08shs5fah2yfdgsydk93jfb1sz42qckal2p031vs95vqd8rpq11g")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/maker")
+    (synopsis "Include Arduino or Processing code in LaTeX documents")
+    (description
+     "The first version of the package allows to include Arduino or Processing
+code using three different forms: writing the code directly in the LaTeX
+document, writing Arduino or Processing commands in line with the text,
+calling to Arduino or Processing files.  All these options support the syntax
+highlighting of the official IDE.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-makeshape
+  (package
+    (name "texlive-makeshape")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/makeshape/"
+                   "source/latex/makeshape/"
+                   "tex/latex/makeshape/")
+             (base32
+              "1mc7qxqs87f87s4rzdd7fqy44sxc9a6imz62kqmigfap2kjwnflb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/makeshape")
+    (synopsis "Declare new PGF shapes")
+    (description
+     "The package simplifies production of custom shapes with correct anchor
+borders, in PGF/TikZ; the only requirement is a PGF path describing the anchor
+border.  The package also provides macros that help with the management of
+shape parameters, and the definition of anchor points.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-mathspic
+  (package
+    (name "texlive-mathspic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/mathspic/"
+                   "doc/man/man1/mathspic.1"
+                   "doc/man/man1/mathspic.man1.pdf"
+                   "scripts/mathspic/" "tex/latex/mathspic/")
+             (base32
+              "0rlcskfvpl4niv680v8fgfpfxkrhfavmm8431ffp3vjjbqrhv7xr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:link-scripts #~(list "mathspic.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/mathspic")
+    (synopsis "Perl filter program for use with PiCTeX")
+    (description
+     "MathsPIC (Perl) is a development of the earlier MathsPIC (DOS) program,
+now implemented as a Perl script, being much more portable than the earlier
+program.  MathsPIC parses a plain text input file and generates a plain text
+output-file containing commands for drawing a diagram.  It produces output
+containing PiCTeX and (La)TeX commands, which may then be processed by plain
+TeX or LaTeX in the usual way.  MathsPIC also outputs a comprehensive log
+file.  MathsPIC facilitates creating figures using PiCTeX by providing an
+environment for manipulating named points and also allows the use of variables
+and maths (advance, multiply, and divide)---in short---it takes the pain out
+of PiCTeX.")
+    (license license:lppl)))
+
+(define-public texlive-mercatormap
+  (package
+    (name "texlive-mercatormap")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/mercatormap/"
+                   "tex/latex/mercatormap/")
+             (base32
+              "11kcwzly8m8wqyppymanpvgabyjl1w33xzsy43sb5p4xv8fdaa5j")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mercatormap")
+    (synopsis
+     "Spherical Mercator coordinate systems and Web Mercator tile integration")
+    (description
+     "This package extends TikZ with tools to create map graphics.  The
+provided coordinate system relies on the Web Mercator projection used on the
+Web by OpenStreetMap and others.  The package supports the seamless
+integration of graphics from public map tile servers by a Python script.
+Also, common map elements like markers, geodetic networks, bar scales, routes,
+orthodrome pieces, and more are part of the package.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-mflogo
-  (let ((template (simple-texlive-package
-                   "texlive-mflogo"
-                   (list "/doc/latex/mflogo/"
-                         "/source/latex/mflogo/"
-                         "/fonts/source/public/mflogo/logosl8.mf")
-                   (base32
-                    "1vb4mg7fh4k54g7nqwiw3qm4iir8whpfnspis76l4sddzar1amh7"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:modules _ '())
-          '((guix build texlive-build-system)
-            (guix build utils)
-            (srfi srfi-1)
-            (srfi srfi-26)))
-         ((#:tex-directory _ #t)
-          "latex/mflogo")
-         ((#:phases phases '())
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _
-                 (chdir "source/latex/mflogo") #t))
-             (add-after 'build 'build-font-metrics
-               (lambda* (#:key inputs #:allow-other-keys)
-                 (let ((root "../../..")
-                       (mf (assoc-ref inputs "texlive-metafont"))
-                       (kl (assoc-ref inputs "texlive-knuth-lib")))
-                   ;; Tell mf where to find mf.base
-                   (setenv "MFBASES"
-                           (string-append mf "/share/texmf-dist/web2c"))
-                   ;; Tell mf where to look for source files
-                   (setenv "MFINPUTS"
-                           (string-append root ":"
-                                          mf "/share/texmf-dist/metafont/base:"
-                                          kl "/share/texmf-dist/fonts/source/public/knuth-lib:"
-                                          root "/fonts/source/public/mflogo/"))
-                   (for-each (lambda (font)
-                               (format #t "building font ~a\n" font)
-                               (invoke "mf" "-progname=mf"
-                                       "-output-directory=build"
-                                       (string-append "\\"
-                                                      "mode:=ljfour; "
-                                                      "mag:=1; "
-                                                      "scrollmode; "
-                                                      "input " (basename font))))
-                             (find-files (string-append root
-                                                        "/fonts/source/public/mflogo/")
-                                         "\\.mf$")))
-                 #t))
-             (add-before 'install 'install-fonts
-               (lambda* (#:key outputs #:allow-other-keys)
-                 (let* ((out (assoc-ref outputs "out"))
-                        (tfm (string-append
-                              out "/share/texmf-dist/fonts/tfm/public/mflogo")))
-                   (for-each (lambda (file)
-                               (install-file file tfm)
-                               (delete-file file))
-                             (find-files "build" "\\.tfm"))
-                   #t)))))))
-      (native-inputs
-       (list texlive-bin texlive-metafont texlive-knuth-lib))
-      (home-page "http://www.ctan.org/pkg/mflogo")
-      (synopsis "LaTeX support for Metafont logo fonts")
-      (description
-       "This package provides LaTeX and font definition files to access the
+  (package
+    (name "texlive-mflogo")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/mflogo/"
+                   "fonts/source/public/mflogo/"
+                   "fonts/tfm/public/mflogo/"
+                   "source/latex/mflogo/"
+                   "tex/latex/mflogo/")
+             (base32
+              "1r53qlrcqfwc0dfr7ji1nxnqrj6n0qrlg1rl7fjlw6ap3q9y434k")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-knuth-lib texlive-metafont))
+    (home-page "https://ctan.org/pkg/mflogo")
+    (synopsis "LaTeX support for Metafont logo fonts")
+    (description
+     "This package provides LaTeX and font definition files to access the
 Knuthian mflogo fonts described in The Metafontbook and to typeset Metafont
 logos in LaTeX documents.")
-      (license license:lppl))))
+    (license license:lppl)))
 
 (define-deprecated-package texlive-latex-mflogo texlive-mflogo)
 
 (define-public texlive-mflogo-font
   (package
-    (inherit (simple-texlive-package
-              "texlive-mflogo-font"
-              (list "/doc/fonts/mflogo-font/README"
-                    "/fonts/afm/hoekwater/mflogo-font/"
-                    "/fonts/map/dvips/mflogo-font/"
-                    "/fonts/type1/hoekwater/mflogo-font/")
-              (base32
-               "094mknjv8ki2pvj1zin0f1z4f1w12g0cfqjiqcsawjsry4yfrmbg")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/mflogo-font")
-    (synopsis "Metafont logo font")
-    (description
-     "These fonts were created in METAFONT by Knuth, for his own publications.
-At some stage, the letters P and S were added, so that the METAPOST logo could
-also be expressed.  The fonts were originally issued (of course) as METAFONT
+    (name "texlive-mflogo-font")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/mflogo-font/"
+                   "fonts/afm/hoekwater/mflogo-font/"
+                   "fonts/map/dvips/mflogo-font/"
+                   "fonts/type1/hoekwater/mflogo-font/")
+             (base32
+              "094mknjv8ki2pvj1zin0f1z4f1w12g0cfqjiqcsawjsry4yfrmbg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mflogo-font")
+    (synopsis "METAFONT logo font")
+    (description
+     "These fonts were created in Metafont by Knuth, for his own publications.
+At some stage, the letters P and S were added, so that the MetaPost logo could
+also be expressed.  The fonts were originally issued (of course) as Metafont
 source; they have since been autotraced and reissued in Adobe Type 1 format by
 Taco Hoekwater.")
     (license license:knuth)))
 
 (define-deprecated-package texlive-fonts-mflogo-font texlive-mflogo-font)
 
-(define-public texlive-amsfonts
-  (let ((template (simple-texlive-package
-                   "texlive-amsfonts"
-                   (list "/source/latex/amsfonts/"
-                         "/fonts/source/public/amsfonts/"
-                         "/fonts/type1/public/amsfonts/"
-                         "/fonts/afm/public/amsfonts/"
-                         "/fonts/tfm/public/amsfonts/"
-                         "/fonts/map/dvips/amsfonts/"
-                         "/tex/plain/amsfonts/"
-                         "/doc/fonts/amsfonts/")
-                   (base32
-                    "1rpl87643q8v6gcqsz68mjha8wac6cqx7mr16ds8f0ccbw7a4w9b"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:build-targets _ #t)
-          '(list "amsfonts.ins"))
-         ((#:tex-directory _ #t)
-          "latex/amsfonts")
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/amsfonts")))
-             (add-before 'copy-files 'unchdir
-               (lambda _ (chdir "../../..")))
-             (add-after 'copy-files 'remove-extra-files
-               (lambda* (#:key outputs #:allow-other-keys)
-                 (delete-file-recursively
-                  (string-append (assoc-ref outputs "out")
-                                 "/share/texmf-dist/source/latex/amsfonts/build/"))))))))
-      (home-page "https://www.ctan.org/pkg/amsfonts")
-      (synopsis "TeX fonts from the American Mathematical Society")
-      (description
-       "This package provides an extended set of fonts for use in mathematics,
-including: extra mathematical symbols; blackboard bold letters (uppercase
-only); fraktur letters; subscript sizes of bold math italic and bold Greek
-letters; subscript sizes of large symbols such as sum and product; added sizes
-of the Computer Modern small caps font; cyrillic fonts (from the University of
-Washington); Euler mathematical fonts.  All fonts are provided as Adobe Type 1
-files, and all except the Euler fonts are provided as Metafont source.  The
-distribution also includes the canonical Type 1 versions of the Computer
-Modern family of fonts.  The Euler fonts are supported by separate packages;
-details can be found in the documentation.")
-      (license license:silofl1.1))))
+(define-public texlive-mfware
+  (package
+    (name "texlive-mfware")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/gftodvi.1"
+                   "doc/man/man1/gftodvi.man1.pdf"
+                   "doc/man/man1/gftopk.1"
+                   "doc/man/man1/gftopk.man1.pdf"
+                   "doc/man/man1/gftype.1"
+                   "doc/man/man1/gftype.man1.pdf"
+                   "doc/man/man1/mft.1"
+                   "doc/man/man1/mft.man1.pdf"
+                   "doc/man/man1/pktogf.1"
+                   "doc/man/man1/pktogf.man1.pdf"
+                   "doc/man/man1/pktype.1"
+                   "doc/man/man1/pktype.man1.pdf"
+                   "mft/base/")
+             (base32
+              "0l0xy2zl7yzb14wbzsg4sz5bdj22ggqlsw54d0yrm430wlr1s6sd")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mfware")
+    (synopsis "Supporting tools for use with Metafont")
+    (description
+     "This package provides a collection of programs (as web source) for
+processing the output of Metafont.")
+    (license license:public-domain)))
 
-(define-deprecated-package texlive-fonts-amsfonts texlive-amsfonts)
+(define-public texlive-milsymb
+  (package
+    (name "texlive-milsymb")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/milsymb/" "tex/latex/milsymb/")
+             (base32
+              "0bzrgnk934alp51j1qy4c73kkr4jv0bjq5fv50dm1bl22m9h3s17")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/milsymb")
+    (synopsis "TikZ-based drawing of military symbols")
+    (description
+     "The package offers commands to draw military symbols as per
+@url{https://www.awl.edu.pl/images/en/APP_6_C.pdf, NATO APP-6(C)}.  It has
+a set of commands for drawing all symbols found in the document up to the
+control measures, as well as support for custom non-standard symbols.  Control
+measures are planned to be included in a future release.")
+    (license license:cc-by-sa4.0)))
 
-(define-deprecated-package texlive-latex-amsfonts texlive-amsfonts)
+(define-public texlive-miniplot
+  (package
+    (name "texlive-miniplot")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/miniplot/" "tex/latex/miniplot/")
+             (base32
+              "0k98mfd4bf43br74wyjqjlwb93yzi2b5r53jsrsr58p6lg59c200")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/miniplot")
+    (synopsis "Package for easy figure arrangement")
+    (description
+     "MiniPlot is a package to help the LaTeX user typeset EPS figures using
+an easy-to-use interface.  Figures can be arranged as one-figure-only or as
+a collection of figures in columns and rows which can itself contain
+sub-figures in columns and rows.  Wrapped figures are also supported.  This
+package provides commands to display a framebox instead of the figure as the
+graphics package does already but additionally it writes useful information
+such as the label and scaling factor into these boxes.")
+    (license license:lppl)))
 
-(define-public texlive-mkpattern
+(define-public texlive-mkpic
   (package
-    (inherit (simple-texlive-package
-              "texlive-mkpattern"
-              (list "/doc/plain/mkpattern/README"
-                    "/doc/plain/mkpattern/mkpatdoc.tex"
-                    "/doc/plain/mkpattern/mkpatter.pdf"
-                    "/doc/plain/mkpattern/mkpattern-exmpl.tex"
-                    "/tex/plain/mkpattern/mkpatter.tex")
-              (base32
-               "0sxnkbcc802jl3fj56x9hvg978bpv15lhrwj0aykb4syq29l47ga")
-              #:trivial? #t))
-    (home-page "https://ctan.org/pkg/mkpattern")
-    (synopsis "Utility for making hyphenation patterns")
-    (description "Mkpattern is a general purpose program for the generation of
-hyphenation patterns, with definition of letter sets and template-like
-constructions.  It also provides an easy way to handle different input and
-output encodings, and features generation of clean UTF-8 patterns.")
+    (name "texlive-mkpic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/mkpic/" "scripts/mkpic/")
+             (base32
+              "1a8jzsgw63siirifpsvwjmfbj68fv58hnn5vrv737i9vbjrv0vm7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "mkpic")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/mkpic")
+    (synopsis "Perl interface to @code{mfpic}")
+    (description
+     "@code{mkpic} provides an easy interface for making small pictures with
+@code{mfpic}.  To this end you create an input file consisting of commands,
+one per line, with space separated parameters (or you modify the DATA section
+of the @code{mkpic} script, which is used if you run it without an input
+file).")
+    (license license:gpl3+)))
+
+(define-public texlive-modiagram
+  (package
+    (name "texlive-modiagram")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/modiagram/"
+                   "tex/latex/modiagram/")
+             (base32
+              "0817c3yj5q4srbl29kqw16cg3c6gwr9ahy33hyicqbqap034fnyd")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/modiagram")
+    (synopsis "Drawing molecular orbital diagrams")
+    (description
+     "The package provides an environment MOdiagram and some commands, to
+create molecular orbital diagrams using TikZ.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-neuralnetwork
+  (package
+    (name "texlive-neuralnetwork")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/neuralnetwork/examples/"
+                   "tex/latex/neuralnetwork/")
+             (base32
+              "11k0hwg1mx52mrp7csp93m4rvv22vq91l4ij1ylgbw9flh189p8x")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/neuralnetwork")
+    (synopsis "Graph-drawing for neural networks")
+    (description
+     "The package provides facilities for graph-drawing, with facilities
+designed for neural network diagrams.")
+    (license license:gpl3+)))
+
+(define-public texlive-nl-interval
+  (package
+    (name "texlive-nl-interval")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/nl-interval/"
+                   "tex/latex/nl-interval/")
+             (base32
+              "0n11a26d48jr6lngfc128fpvahdnbvnlxz9kxp7hirl0cm8ssiwa")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/nl-interval")
+    (synopsis "Represent intervals on the number line")
+    (description
+     "This package provides macros to simplify the process of representing
+intervals on the number line.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-nndraw
+  (package
+    (name "texlive-nndraw")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/nndraw/" "source/latex/nndraw/"
+                   "tex/latex/nndraw/")
+             (base32
+              "08mhl61b2fzsnfz6ldrlz9m5s37w2c4wml8gpd2f4wc9rjag68l4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/nndraw")
+    (synopsis "Draw neural networks")
+    (description
+     "With this package you can create fully connected neural networks in
+a simple and efficient way.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-numericplots
+  (package
+    (name "texlive-numericplots")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin name version
+                            (list "doc/latex/numericplots/"
+                                  "tex/latex/numericplots/")
+                            (base32
+                             "187h4q35s2asfgv9zxw992316v37p5nnvphjylnxfvygxci36lwg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/numericplots")
+    (synopsis "Plot numeric data (including Matlab export) using PSTricks")
+    (description
+     "Plotting numeric data is a task which has often to be done for
+scientific papers.  LaTeX itself provides no facilities for drawing more than
+the simplest plots from supplied data.  The package will process user input,
+and uses PSTricks to plot the results.  The package provides Matlab functions
+to transform Matlab results to plottable data.")
+    (license license:gpl3)))
+
+(define-public texlive-outilsgeomtikz
+  (package
+    (name "texlive-outilsgeomtikz")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/outilsgeomtikz/"
+                   "tex/latex/outilsgeomtikz/")
+             (base32
+              "0zk47dlz9jl2xk0q1sfnd6f57iww8qaq5wd0l1k23pci86x4nv6a")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/outilsgeomtikz")
+    (synopsis "Some geometric tools, with TikZ")
+    (description
+     "This package provides some commands, with French keys, to display
+geometric tools using TikZ, for example a pen, a compass, a rule, a square, or
+a protractor.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-pb-diagram
+  (package
+    (name "texlive-pb-diagram")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pb-diagram/"
+                   "tex/latex/pb-diagram/")
+             (base32
+              "1g790ykz0xq01d8zmy6llr33imh42dy51700c9z49xga4dvnyqlv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pb-diagram")
+    (synopsis "Commutative diagram package using LAMSTeX or Xy-pic fonts")
+    (description
+     "The package provides a @code{diagram} environment.  This allows the
+LaTeX user to easily create complex commutative diagrams, by placing formula
+nodes on a conceptual grid and attaching arrows to them.")
+    (license license:gpl2+)))
+
+(define-public texlive-penrose
+  (package
+    (name "texlive-penrose")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/penrose/" "source/latex/penrose/"
+                   "tex/latex/penrose/")
+             (base32
+              "0vdbyvprb75if93lx138v2li2ijylbs8w8787dwk2pys5pp7s4ql")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/penrose")
+    (synopsis "TikZ library for producing Penrose tilings")
+    (description
+     "This package provides a TikZ library for drawing Penrose tiles.  It
+currently supports the kite/dart, rhombus, and pentagon tile sets.  There are
+two main methods for their placement: one that automatically generates
+a tiling, and one that allows for manual placement.  Furthermore, the tiles
+themselves can be deformed and will still (hopefully!) fit together in the
+correct fashion.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-petri-nets
+  (package
+    (name "texlive-petri-nets")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/petri-nets/"
+                   "scripts/petri-nets/"
+                   "tex/generic/petri-nets/")
+             (base32
+              "0m6qmahbw1q5vs63mr30kf75di86drhi8z3a8p7yn9n524jn435c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "pn2pdf")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/petri-nets")
+    (synopsis "Set TeX/LaTeX packages for drawing Petri nets")
+    (description
+     "Petri-nets offers a set of TeX/LaTeX packages about Petri nets and
+related models.  Three packages are available: the first allows the user to
+draw Petri-nets in PostScript documents; the second defines macros related to
+PBC, M-nets and B(PN) models; and a third that combines the other two.")
+    (license license:gpl3+)))
+
+(define-public texlive-pgf-blur
+  (package
+    (name "texlive-pgf-blur")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pgf-blur/"
+                   "source/latex/pgf-blur/"
+                   "tex/latex/pgf-blur/")
+             (base32
+              "1lsndflhx56gawqkcyjyh8pll986m7msraq5qr1asppybf4m0hij")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pgf-blur")
+    (synopsis "PGF/TikZ package for blurred shadows")
+    (description
+     "The package adds blurred/faded/fuzzy shadows to PGF/TikZ pictures.
+It is configured as a TikZ/PGF library module.")
+    (license (list license:lppl license:public-domain))))
+
+(define-public texlive-pgf-interference
+  (package
+    (name "texlive-pgf-interference")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pgf-interference/"
+                   "tex/latex/pgf-interference/")
+             (base32
+              "1aa741h358iwn0zd25y3wsr4mr1q2fia1mrfqrbz6p00fvv0rgv5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pgf-interference")
+    (synopsis "Drawing interference patterns with PGF/TikZ")
+    (description
+     "This LaTeX package makes it possible to simulate interference patterns
+occuring on a screen if monochromatic light is diffracted at regular
+structures of slits.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-pgf-periodictable
+  (package
+    (name "texlive-pgf-periodictable")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pgf-periodictable/"
+                   "tex/latex/pgf-periodictable/flags/"
+                   "tex/latex/pgf-periodictable/lattice/"
+                   "tex/latex/pgf-periodictable/spectra/")
+             (base32
+              "0jxl52m4ik710n14crr6b2ymgnl58asw78mb0p5vdz21r6qgb11n")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pgf-periodictable")
+    (synopsis "Create custom periodic tables of elements")
+    (description
+     "The purpose of this package is to provide the periodic table of elements
+in a simple way.  It relies on PGF/TikZ to offer a full or partial periodic
+table with a variety of options and displaying the desired data for all the
+118 elements.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-pgf-pie
+  (package
+    (name "texlive-pgf-pie")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pgf-pie/" "tex/latex/pgf-pie/")
+             (base32
+              "1nvg61v9pzc0mqs8m818ixi8rmw2wv3h7s17shjc7mcdqkp7k1qq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-carlisle texlive-latex texlive-pgf))
+    (home-page "https://ctan.org/pkg/pgf-pie")
+    (synopsis "Draw pie charts, using PGF")
+    (description
+     "The package provides the means to draw pie (and variant) charts,
+using PGF/TikZ.")
+    (license (list license:gpl2 license:lppl1.3c))))
+
+(define-public texlive-pgf-soroban
+  (package
+    (name "texlive-pgf-soroban")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pgf-soroban/"
+                   "tex/latex/pgf-soroban/")
+             (base32
+              "1vcycmd5a3z6p9glbgw4lsxs0zv0lidvs240i18kv8s39yx6f88r")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pgf-soroban")
+    (synopsis "Create images of the soroban using TikZ/PGF")
+    (description
+     "The package makes it possible to create pictures of the
+soroban (Japanese abacus) using PGF/TikZ.")
     (license license:lppl)))
 
-;; This provides etex.src which is needed to build various formats, including
-;; luatex.fmt and pdflatex.fmt
-(define-public texlive-etex
-  (let ((template (simple-texlive-package
-                   "texlive-etex"
-                   (list "/doc/etex/base/"
-                         "/doc/man/man1/etex.1"
-                         "/doc/man/man1/etex.man1.pdf"
-                         "/tex/plain/etex/"
-                         "/fonts/source/public/etex/")
-                   (base32
-                    "1qv6vxm5a8pw38gas3i69ivmsn79zj2yq5n5vdmh0rzic5hw2hmc")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             ;; Build tfm font.
-             (replace 'build
-               (lambda* (#:key inputs #:allow-other-keys)
-                 (let ((mf (assoc-ref inputs "texlive-metafont")))
-                   ;; Tell mf where to find mf.base
-                   (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
-                   ;; Tell mf where to look for source files
-                   (setenv "MFINPUTS"
-                           (string-append (getcwd)
-                                          "/fonts/source/public/etex/:"
-                                          mf "/share/texmf-dist/metafont/base:"
-                                          (assoc-ref inputs "texlive-cm")
-                                          "/share/texmf-dist/fonts/source/public/cm")))
-                 (invoke "mf" "-progname=mf"
-                         (string-append "\\"
-                                        "mode:=ljfour; "
-                                        "mag:=1; "
-                                        "scrollmode; "
-                                        "input xbmc10"))
-                 #t))
-             (add-after 'install 'install-font
-               (lambda* (#:key outputs #:allow-other-keys)
-                 (install-file
-                  "xbmc10.tfm"
-                  (string-append (assoc-ref outputs "out")
-                                 "/share/texmf-dist/fonts/tfm/public/etex/"))
-                 #t))))))
-      (native-inputs
-       (list texlive-bin texlive-metafont texlive-cm))
-      (home-page "https://www.ctan.org/pkg/etex")
-      (synopsis "Extended version of TeX")
-      (description
-       "This package provides an extended version of TeX (which is capable of
-running as if it were TeX unmodified).  E-TeX has been specified by the LaTeX
-team as the engine for the development of LaTeX2e; as a result, LaTeX
-programmers may assume e-TeX functionality.  The pdftex engine directly
-incorporates the e-TeX extensions.")
-      (license license:knuth))))
+(define-public texlive-pgf-spectra
+  (package
+    (name "texlive-pgf-spectra")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pgf-spectra/"
+                   "tex/latex/pgf-spectra/")
+             (base32
+              "03jci0jc5ryzkp6930hn1l4awjrw9y1xwc3f327igccj78w24pnb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pgf-spectra")
+    (synopsis "Draw continuous or discrete spectra using PGF/TikZ")
+    (description
+     "The purpose of this package is to draw the spectra of elements in
+a simple way.  It relies on PGF/TikZ for drawing the desired spectrum,
+continuous or discrete.  There are data available for the spectra of 98
+elements and their ions (from the NASA database and from NIST).  It also
+allows the user to draw spectra using their own data.")
+    (license license:lppl1.3+)))
 
-(define-public texlive-tex-plain
+(define-public texlive-pgf-umlcd
   (package
-    (inherit (simple-texlive-package
-              "texlive-tex-plain"
-              (list "/tex/plain/")
-              (base32
-               "1hafbphx1486069cky87hyksx6ia5gd83m4wp2xmgc09z87faf0h")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/plain")
-    (synopsis "Plain TeX format and supporting files")
+    (name "texlive-pgf-umlcd")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pgf-umlcd/"
+                   "tex/latex/pgf-umlcd/")
+             (base32
+              "14zx2jms616qfzwqbgixz0pd3qzjzr2bxr6ahhy7mgj3i7rlbr8r")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-latex texlive-pgf))
+    (home-page "https://ctan.org/pkg/pgf-umlcd")
+    (synopsis "Some LaTeX macros for UML class diagrams")
     (description
-     "This package contains files used to build the Plain TeX format, as
-described in the TeXbook, together with various supporting files (some also
-discussed in the book).")
-    (license license:knuth)))
+     "This package provides some LaTeX macros for UML class diagrams.")
+    (license (list license:gpl2 license:lppl1.3c))))
 
-(define-public texlive-halloweenmath
-  (let ((template (simple-texlive-package
-                   "texlive-halloweenmath"
-                   (list "doc/latex/halloweenmath/"
-                         "source/latex/halloweenmath/"
-                         "tex/latex/halloweenmath/")
-                   (base32
-                    "1xq72k1p820b5q3haxf936g69p6gv34hr30870l96jnxa3ad7y05"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t) "latex/halloweenmath")
-         ((#:build-targets _ '()) '(list "halloweenmath.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _ (chdir "source/latex/halloweenmath/")))
-              (add-after 'chdir 'non-interactive-build
-                ;; When it realizes it cannot employ the usedir directive, the
-                ;; build process stops and waits for an input before inserting
-                ;; generated files in the working directory.  Do not ask for
-                ;; an input.
-                (lambda _
-                  (substitute* "halloweenmath.ins"
-                    (("\\Ask.*") "")
-                    (("\\(your .*? will be ignored\\).*") ""))))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (native-inputs
-       (list texlive-bin
-             texlive-kpathsea
-             (texlive-updmap.cfg)))     ;for psfonts.map
-      (propagated-inputs
-       (list texlive-amsmath texlive-pict2e))
-      (home-page "https://ctan.org/pkg/halloweenmath")
-      (synopsis "Scary and creepy math symbols with AMS-LaTeX integration")
-      (description
-       "The package defines a handful of commands for typesetting mathematical
-symbols of various kinds, ranging from large operators to extensible
-arrow-like relations and growing arrow-like math accents that all draw from
-the classic Halloween-related iconography (pumpkins, witches, ghosts, cats,
-and so on) while being, at the same time, seamlessly integrated within the
-rest of the mathematics produced by (AmS-)LaTeX.")
-      (license license:lppl1.3+))))
+(define-public texlive-pgf-umlsd
+  (package
+    (name "texlive-pgf-umlsd")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pgf-umlsd/"
+                   "tex/latex/pgf-umlsd/")
+             (base32
+              "1bw23gm9x6ijhn3h0q7af0n9wxnc3ixfjc23v8x49s80gh96gmqg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-latex texlive-pgf))
+    (home-page "https://ctan.org/pkg/pgf-umlsd")
+    (synopsis "Draw UML sequence diagrams")
+    (description
+     "This package provides LaTeX macros to draw UML diagrams using PGF.")
+    (license license:gpl3+)))
 
-(define-public texlive-hardwrap
+(define-public texlive-pgfkeyx
   (package
-    (inherit (simple-texlive-package
-              "texlive-hardwrap"
-              (list "doc/latex/hardwrap/"
-                    "tex/latex/hardwrap/"
-                    "source/latex/hardwrap/")
-              (base32
-               "0ql3xml1ccll44q945n7w72p6d51y5wcrkawi7cg621gy5d6wzx5")
-              #:trivial? #t))
-    (home-page "https://ctan.org/macros/latex/contrib/hardwrap")
-    (synopsis "Hard wrap text to a certain character length")
+    (name "texlive-pgfkeyx")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pgfkeyx/" "tex/latex/pgfkeyx/")
+             (base32
+              "0g5wvhlyfplv0fd0nsxpw3al9wmk0hw0pjvyyplh1vzdk5rr3xzq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pgfkeyx")
+    (synopsis "Extended and more robust version of @code{pgfkeys}")
     (description
-     "The package facilitates wrapping text to a specific character width, breaking
-lines by words rather than, as done by TeX, by characters.  The primary use for
-these facilities is to aid the generation of messages sent to the log file or
-console output to display messages to the user.  Package authors may also find
-this useful when writing out arbitrary text to an external file.")
+     "The package extends and improves the robustness of the @code{pgfkeys}
+package.  In particular, it can deal with active comma, equality sign, and
+slash in key parsing.  The difficulty with active characters has long been
+a problem with the @code{pgfkeys} package.  The package also introduces
+handlers beyond those that @code{pgfkeys} can offer.")
     (license license:lppl1.3+)))
 
-(define-public texlive-helvetic
+(define-public texlive-pgfmolbio
   (package
-    (inherit (simple-texlive-package
-              "texlive-helvetic"
-              (list "/dvips/helvetic/"
-                    "/fonts/afm/adobe/helvetic/"
-                    "/fonts/afm/urw/helvetic/"
-                    "/fonts/map/dvips/helvetic/"
-                    "/fonts/tfm/adobe/helvetic/"
-                    "/fonts/tfm/monotype/helvetic/"
-                    "/fonts/tfm/urw35vf/helvetic/"
-                    "/fonts/type1/urw/helvetic/"
-                    "/fonts/vf/adobe/helvetic/"
-                    "/fonts/vf/monotype/helvetic/"
-                    "/fonts/vf/urw35vf/helvetic/"
-                    "/tex/latex/helvetic/")
-              (base32
-               "0c3f1ly7y6404z0akbfbbfql13sz717v0n0g69qjpr69hi4n0nsl")
-              #:trivial? #t))
-    (home-page "https://ctan.org/pkg/urw-base35")
-    (synopsis "URW Base 35 font pack for LaTeX")
-    (description "This package provides a drop-in replacements for the Helvetica
-font from Adobe's basic set.")
-    ;; No license version specified.
+    (name "texlive-pgfmolbio")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/pgfmolbio/"
+                   "scripts/pgfmolbio/"
+                   "source/lualatex/pgfmolbio/"
+                   "tex/lualatex/pgfmolbio/")
+             (base32
+              "12kajg7jrhd612lk7m6gwadxb5y7v9znqjlg1n3n05zwrmfd54w1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pgfmolbio")
+    (synopsis "Draw graphs typically found in molecular biology texts")
+    (description
+     "The package draws graphs typically found in molecular biology texts.
+Currently, the package contains modules for drawing DNA sequencing
+chromatograms and protein domain diagrams.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-pgfmorepages
+  (package
+    (name "texlive-pgfmorepages")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pgfmorepages/"
+                   "tex/latex/pgfmorepages/")
+             (base32
+              "0k0njkw34ql0vlpmay155rr4v0sszizhh1pixy20npbk26dkzljw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pgfmorepages")
+    (synopsis "Assemble multiple logical pages onto a physical page")
+    (description
+     "This package replaces and extends the @code{pgfpages} sub-package of the
+PGF system.  It provides the capability to arrange multiple logical pages on
+multiple physical pages, for example as for arranging pages to make
+booklets.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-pgfopts
+  (package
+    (name "texlive-pgfopts")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pgfopts/" "source/latex/pgfopts/"
+                   "tex/latex/pgfopts/")
+             (base32
+              "0p4bfqgkwmzhismrs7a10sblbgx4b6w259vdp1dd3hxvhc2kbnyn")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-pgf))
+    (home-page "https://ctan.org/pkg/pgfopts")
+    (synopsis "LaTeX package options with @code{pgfkeys}")
+    (description
+     "The @code{pgfkeys} package (part of the PGF distribution) is a way of
+defining and using large numbers of keys for key-value syntaxes.  However,
+@code{pgfkeys} itself does not offer means of handling LaTeX class and package
+options.  This package adds such option handling to @code{pgfkeys}, in the
+same way that @code{kvoptions} adds the same facility to the LaTeX standard
+@code{keyval} package.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-pgfornament
+  (package
+    (name "texlive-pgfornament")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pgfornament/"
+                   "tex/generic/pgfornament/am/"
+                   "tex/generic/pgfornament/pgfhan/"
+                   "tex/generic/pgfornament/vectorian/"
+                   "tex/latex/pgfornament/")
+             (base32
+              "02fmyyp1hgasa8k6v0nkdvdmqfbiscyyk3hpqg63b5956ksgap21")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pgfornament")
+    (synopsis "Drawing of vectorian ornaments with PGF/TikZ")
+    (description
+     "This package allows the drawing of vectorian ornaments (196) with
+PGF/TikZ.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-pgfplots
+  (package
+    (name "texlive-pgfplots")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/pgfplots/"
+                   "doc/generic/pgfplots/"
+                   "doc/latex/pgfplots/"
+                   "doc/plain/pgfplots/"
+                   "scripts/pgfplots/"
+                   "source/context/third/pgfplots/"
+                   "source/latex/pgfplots/"
+                   "tex/context/third/pgfplots/"
+                   "tex/generic/pgfplots/"
+                   "tex/latex/pgfplots/"
+                   "tex/plain/pgfplots/")
+             (base32
+              "1c0gah7ia61s435zlyq4ay9snkrs2xcs627wky7c0sp8mgxyybwr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-pgf))
+    (home-page "https://ctan.org/pkg/pgfplots")
+    (synopsis "Create normal/logarithmic plots in two and three dimensions")
+    (description
+     "PGFPlots draws high-quality function plots in normal or logarithmic
+scaling with a user-friendly interface directly in TeX.  The user supplies
+axis labels, legend entries and the plot coordinates for one or more plots and
+PGFPlots applies axis scaling, computes any logarithms and axis ticks and
+draws the plots, supporting line plots, scatter plots, piecewise constant
+plots, bar plots, area plots, mesh-- and surface plots and some more.
+PGFPlots is based on PGF/TikZ (PGF); it runs equally for LaTeX/TeX/ConTeXt.")
     (license license:gpl3+)))
 
-(define-public texlive-hyphen-afrikaans
+(define-public texlive-picinpar
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-afrikaans" "af"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-af.tex")
-              (base32
-               "1k9k27a27bbrb0gz36191w32l2v6d3zbdh8zhrp4l3ild2pj3n4l")))
-    (synopsis "Hyphenation patterns for Afrikaans")
-    (description "The package provides hyphenation patterns for the Afrikaans
-language.")
+    (name "texlive-picinpar")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/picinpar/" "tex/latex/picinpar/")
+             (base32
+              "1s6ymq4zg0wl6pfx34shansv3y1qlh6h3q58a97zpz5x21n1a5pq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/picinpar")
+    (synopsis "Insert pictures into paragraphs")
+    (description
+     "This package provides a legacy package for creating windows in
+paragraphs, for inserting graphics, etc.  Users should note that Pieter van
+Oostrum (in a published review of packages of this sort) does not recommend
+this package; Picins is recommended instead.")
+    (license license:gpl3+)))
+
+(define-public texlive-pictex
+  (package
+    (name "texlive-pictex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/pictex/" "tex/generic/pictex/")
+             (base32
+              "1wwlh9d7b3gsk3f29d6vk0ic7nnvc533jfg2z019vsf6pin9qvgv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pictex")
+    (synopsis "Picture drawing macros for TeX and LaTeX")
+    (description
+     "PicTeX is an early and very comprehensive drawing package that mostly
+draws by placing myriads of small dots to make up pictures.  It has a tendency
+to run out of space; packages @code{m-pictex} and @code{pictexwd} deal with
+the problems in different ways.")
+    (license license:lppl1.0+)))
+
+(define-public texlive-pictex2
+  (package
+    (name "texlive-pictex2")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/latex/pictex2/")
+             (base32
+              "1qqf08yharknq6csk01jdff62mg011bryqlq5mbmjwqwh7wxs0wy")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pictex2")
+    (synopsis "Adds relative coordinates and improves the @code{\\plot} command")
+    (description
+     "This package adds two user commands to standard PiCTeX.  One command
+uses relative coordinates, thus eliminating the need to calculate the
+coordinate of every point manually as in standard PiCTeX.  The other command
+modifies @code{\\plot} to use a rule instead of dots if the line segment is
+horizontal or vertical.")
+    (license license:lppl)))
+
+(define-public texlive-pinlabel
+  (package
+    (name "texlive-pinlabel")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pinlabel/" "tex/latex/pinlabel/")
+             (base32
+              "0hfa6gdmc6f59840fia3pdll2bgjwyqk57plcqxb4vc0f7kdqqay")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pinlabel")
+    (synopsis "TeX labelling package")
+    (description
+     "Pinlabel is a labelling package for attaching perfectly formatted TeX
+labels to figures and diagrams in both EPS and PDF formats.  It is suitable
+both for labelling a new diagram and for relabelling an existing diagram.  The
+package uses coordinates derived from GhostView and labels are placed with
+automatic and consistent spacing relative to the object labelled.")
+    (license license:lppl)))
+
+(define-public texlive-pixelart
+  (package
+    (name "texlive-pixelart")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pixelart/" "tex/latex/pixelart/")
+             (base32
+              "14hridmq92md46vxaiv8ja5lij2zl449vbvq2x2dv4qqs7bi42ab")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pixelart")
+    (synopsis "Draw pixel-art pictures")
+    (description
+     "This package provides a LuaLaTeX package to draw pixel-art pictures
+using TikZ.")
     (license license:lppl1.3+)))
 
-(define-public texlive-hyphen-ancientgreek
+(define-public texlive-pixelarttikz
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-ancientgreek" "grc"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-grc.tex"
-                    "/tex/generic/hyphen/grahyph5.tex"
-                    "/tex/generic/hyphen/ibyhyph.tex")
-              (base32
-               "01326lb6z0s8krcfgs8i1pnjfrm4gr33rc53gy80f63qbv4ssxrw")))
-    (synopsis "Hyphenation patterns for ancient Greek")
-    (description "The package provides hyphenation patterns for ancient
-Greek.")
-    (license license:lppl1.3+)))
-
-(define-public texlive-hyphen-armenian
-  (let ((template (texlive-hyphen-package
-                   "texlive-hyphen-armenian" "hy"
-                   (list "/tex/generic/hyph-utf8/patterns/tex/hyph-hy.tex")
-                   (base32
-                    "0hzny0npynsb07syxrpbfa5pkpj8r0j51pj64yxyfl1c0bak1fwp"))))
-    (package
-      (inherit template)
-      (synopsis "Hyphenation patterns for Armenian")
-      (description "The package provides hyphenation patterns for the Armenian
-language.")
-      ;; Any version of the LGPL.
-      (license license:lgpl3+))))
-
-(define-public texlive-hyphen-basque
-  (let ((template (texlive-hyphen-package
-                    "texlive-hyphen-basque" "eu"
-                    (list "/tex/generic/hyph-utf8/patterns/tex/hyph-eu.tex")
-                    (base32
-                     "15w969g1jqzn68l2b2lzf7iv7g3kil02aba3if6cag3qcnq92ra9"))))
-    (package
-      (inherit template)
-      (synopsis "Hyphenation patterns for Basque")
-      (description "The package provides hyphenation patterns for the Basque
-language.")
-      ;; Similar to Unicode license.
-      (license (license:fsf-free
-                "/tex/generic/hyph-utf8/patterns/tex/hyph-eu.tex")))))
-
-(define-public texlive-hyphen-belarusian
-  (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-belarusian" "be"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-be.tex")
-              (base32
-               "0ppm12wndaxv9da62dwkbnk7w9nijikn6jkc97m76xis338g2h02")))
-    (synopsis "Hyphenation patterns for Belarusian")
-    (description "The package provides hyphenation patterns for the Belarusian
-language.")
+    (name "texlive-pixelarttikz")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pixelarttikz/"
+                   "tex/latex/pixelarttikz/")
+             (base32
+              "0ymjflng2rlb0bq375f28mbdpr2r7ihqphnpvrh2f0n4f3afv8hx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pixelarttikz")
+    (synopsis "Work with PixelArts, with TikZ")
+    (description
+     "The package defines commands and an environment for displaying pixel
+arts.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-pmgraph
+  (package
+    (name "texlive-pmgraph")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pmgraph/" "tex/latex/pmgraph/")
+             (base32
+              "1a4nd6c9i9y6g34ipjz2ia0m4vizlvx0wcn0yql53pk8k8zrlgnn")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pmgraph")
+    (synopsis "Poor man's graphics")
+    (description
+     "This package provides a set of extensions to LaTeX @code{picture}
+environment, including a wider range of vectors, and a lot more box frame
+styles.")
+    (license license:gpl3+)))
+
+(define-public texlive-postage
+  (package
+    (name "texlive-postage")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/postage/" "source/latex/postage/"
+                   "tex/latex/postage/")
+             (base32
+              "1sa9fm5hh57p0srnrd98jljj6200hnl17pmhw2v5q7jjgqj1n5gq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/postage")
+    (synopsis "Stamp letters with Deutsche Post's service Internetmarke")
+    (description
+     "The postage package is used for franking letters with Deutsche Post's
+online postage service Internetmarke.  Note that in order to print valid
+stamps you must point to a valid PDF of Deutsche Post's Ausdruck
+4-spaltig (DIN A4).")
+    (license license:lppl1.3c)))
+
+(define-public texlive-prerex
+  (package
+    (name "texlive-prerex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/prerex/" "doc/man/man5/prerex.5"
+                   "doc/man/man5/prerex.man5.pdf"
+                   "tex/latex/prerex/")
+             (base32
+              "0cmkr8533p4lqnj9x7nlcqj0slin021y13mr4mx2hvd35ya0dd80")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:tests? #true
+      #:modules '((guix build texlive-build-system)
+                  ((guix build gnu-build-system) #:prefix gnu:)
+                  (guix build utils)
+                  (srfi srfi-1))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'unpack-prerex-source
+            (lambda _
+              (mkdir-p "build")
+              (with-directory-excursion "build"
+                (invoke "tar" "xvf"
+                        ;; Tarball includes a version number that we ignore.
+                        (first (find-files ".." "^prerex-.*\\.tar.gz"))
+                        "--strip-components=1"))))
+          (add-after 'unpack-prerex-source 'build-prerex
+            (lambda args
+              (with-directory-excursion "build"
+                (for-each (lambda (phase)
+                            (apply (assoc-ref gnu:%standard-phases phase) args))
+                          '(configure build check install))))))))
+    (native-inputs (list readline))
+    (home-page "https://ctan.org/pkg/prerex")
+    (synopsis "Interactive editor and macro support for prerequisite charts")
+    (description
+     "This package consists of @file{prerex.sty}, a LaTeX package for
+producing charts of course nodes linked by arrows representing pre- and
+co-requisites, and @command{prerex}, an interactive program for creating and
+editing chart descriptions.  The implementation of @file{prerex.sty} uses PGF,
+so that it may be used equally happily with LaTeX or PDFLaTeX; @code{prerex}
+itself is written in C.  The package includes source code for a previewer
+application, a lightweight Qt-4 and Poppler-based prerex-enabled PDF viewer.")
+    (license (list license:gpl2 license:lppl))))
+
+(define-public texlive-productbox
+  (package
+    (name "texlive-productbox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/productbox/"
+                   "source/latex/productbox/"
+                   "tex/latex/productbox/")
+             (base32
+              "12jj5am2h6lqmhc0dz9v8p2j9ci104s9xplki7ncn3fmhy5mm2fq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/productbox")
+    (synopsis "Typeset a three-dimensional product box")
+    (description
+     "The package enables typesetting of a three-dimensional product box.
+This product box can be rendered as it is standing on a surface and some light
+is shed onto it.  Alternatively it can be typeset as a wireframe to be cut out
+and glued together.  This will lead to a physical product box.")
+    (license
+     (list
+      (license:fsf-free "https://tug.ctan.org/macros/latex/contrib/gene/productbox/productbox.ins")))))
+
+(define-public texlive-ps2eps
+  (package
+    (name "texlive-ps2eps")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/bbox.1"
+                   "doc/man/man1/bbox.man1.pdf"
+                   "doc/man/man1/ps2eps.1"
+                   "doc/man/man1/ps2eps.man1.pdf"
+                   "scripts/ps2eps/")
+             (base32
+              "1anrvgs0hd3790dwpxqal0c2drjmvh93vnyqap40rvp8axwi0a6n")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "ps2eps.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/ps2eps")
+    (synopsis "Produce Encapsulated PostScript from PostScript")
+    (description
+     "@command{ps2eps} produces Encapsulated PostScript Files (EPS/EPSF) from
+a one-page PostScript document, or any PostScript document.  A correct
+bounding box is calculated for the EPS files and some PostScript command
+sequences that can produce errorneous results on printers are filtered.  The
+input is cropped to include just the image contained in the PostScript file.
+The EPS files can then be included into TeX documents.
+
+Included in the distribution is the @command{bbox} program, an application to
+produce bounding box values for Rawppm or Rawpbm format files.")
+    (license license:gpl3+)))
+
+(define-public texlive-ps2pk
+  (package
+    (name "texlive-ps2pk")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/mag.1"
+                   "doc/man/man1/mag.man1.pdf"
+                   "doc/man/man1/pfb2pfa.1"
+                   "doc/man/man1/pfb2pfa.man1.pdf"
+                   "doc/man/man1/pk2bm.1"
+                   "doc/man/man1/pk2bm.man1.pdf"
+                   "doc/man/man1/ps2pk.1"
+                   "doc/man/man1/ps2pk.man1.pdf")
+             (base32
+              "14xq9x5rf15ibzr41cm5rm4v3rpmj50rfsqp4zzvyhmpmyw4dsx3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ps2pk")
+    (synopsis "Generate a PK font from an Adobe Type 1 font")
+    (description
+     "This package provides tools to generate a PK file from an Adobe Type
+1 font.  PK fonts are (or used to be) valuable in enabling previewers to view
+documents generated that use Type 1 fonts.")
+    (license license:isc)))
+
+(define-public texlive-psutils
+  (package
+    (name "texlive-psutils")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/epsffit.1"
+                   "doc/man/man1/epsffit.man1.pdf"
+                   "doc/man/man1/extractres.1"
+                   "doc/man/man1/extractres.man1.pdf"
+                   "doc/man/man1/includeres.1"
+                   "doc/man/man1/includeres.man1.pdf"
+                   "doc/man/man1/psbook.1"
+                   "doc/man/man1/psbook.man1.pdf"
+                   "doc/man/man1/psjoin.1"
+                   "doc/man/man1/psjoin.man1.pdf"
+                   "doc/man/man1/psnup.1"
+                   "doc/man/man1/psnup.man1.pdf"
+                   "doc/man/man1/psresize.1"
+                   "doc/man/man1/psresize.man1.pdf"
+                   "doc/man/man1/psselect.1"
+                   "doc/man/man1/psselect.man1.pdf"
+                   "doc/man/man1/pstops.1"
+                   "doc/man/man1/pstops.man1.pdf"
+                   "doc/man/man1/psutils.1"
+                   "doc/man/man1/psutils.man1.pdf"
+                   "dvips/getafm/"
+                   "psutils/"
+                   "scripts/psutils/")
+             (base32
+              "0ba514lz3pc03ll0kb9apdx62mi2yiyd7bnargkp2bbf62dq79cc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:link-scripts #~(list "extractres.pl" "includeres.pl" "psjoin.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/psutils")
+    (synopsis "PostScript utilities")
+    (description
+     "This package provides a bundle of utilities for manipulating PostScript
+documents, including page selection and rearrangement, resizing the page,
+arrangement into signatures for booklet printing, and page merging for N-up
+printing.  Utilities include @command{psbook}, @command{psselect},
+@command{pstops}, @command{psnup}, @command{psresize}, @command{epsffit}.")
+    (license
+     (list license:lgpl2.1+
+           (license:fsf-free
+            "https://tug.org/svn/texlive/trunk/Build/source/texk/psutils/psutils-src/LICENSE?revision=57915&view=markup")))))
+
+(define-public texlive-ptolemaicastronomy
+  (package
+    (name "texlive-ptolemaicastronomy")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ptolemaicastronomy/"
+                   "source/latex/ptolemaicastronomy/"
+                   "tex/latex/ptolemaicastronomy/")
+             (base32
+              "05j082s8aj57lzbxlhddi7f6gscpl5j66zmmaj6kabpnv152r0l7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ptolemaicastronomy")
+    (synopsis "Diagrams of sphere models for variably strict conditionals")
+    (description
+     "David K. Lewis (Counterfactuals, Blackwell 1973) introduced a sphere
+semantics for counterfactual conditionals.  He jokingly referred to the
+diagrams depicting such sphere models as Ptolemaic astronomy, hence the name
+of this package.  The macros provided in this package aid in the construction
+of sphere model diagrams in the style of Lewis.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-puyotikz
+  (package
+    (name "texlive-puyotikz")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/puyotikz/" "scripts/puyotikz/"
+                   "tex/latex/puyotikz/")
+             (base32
+              "15vw485phk523kby1q1wn0s0f7185cqj7sjsr8hc6iccdbzwknc0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/puyotikz")
+    (synopsis "Quickly typeset board states of Puyo Puyo games")
+    (description
+     "This LaTeX package permits to quickly typeset board states of Puyo Puyo
+games.  It supports large and small boards with arbitrary shape, hidden rows,
+current and next puyos, labels and move planning markers.")
     (license license:expat)))
 
-(define-public texlive-hyphen-bulgarian
+(define-public texlive-pxpgfmark
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-bulgarian" "bg"
-              '("/tex/generic/hyph-utf8/patterns/tex/hyph-bg.tex")
-              (base32
-               "0m254y71j3qrb71klvfalfmic3kjy31l85b9cgpdm5yznlsq3i8d")))
-    (synopsis "Hyphenation patterns for Bulgarian")
-    (description "The package provides hyphenation patterns for the Bulgarian
-language in T2A and UTF-8 encodings.")
-    (license (license:non-copyleft
-              "file:///tex/generic/hyph-utf8/patterns/tex/hyph-bg.tex"
-              "Ancestral BSD variant"))))
+    (name "texlive-pxpgfmark")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pxpgfmark/"
+                   "tex/latex/pxpgfmark/")
+             (base32
+              "0c026i1bda0fxfrjhpv4laaj75ra6j8l2v6bxsgplng7f11nx36l")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pxpgfmark")
+    (synopsis "e-pTeX driver for PGF inter-picture connections")
+    (description
+     "The distributed drivers do not support the PGF feature of inter-picture
+connections under e-pTeX and @code{dvipdfmx}.  The package uses existing
+features of @code{dvipdfmx} to fix this problem.")
+    (license license:expat)))
 
-(define-public texlive-hyphen-catalan
+(define-public texlive-pxpic
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-catalan" "ca"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ca.tex")
-              (base32
-               "10zzlfz5v8d9csg85ibpp2vfvmpqa56vbl85qy5gws099vygpayg")))
-    (synopsis "Hyphenation patterns for Catalan")
-    (description "The package provides hyphenation patterns for Catalan in
-T1/EC and UTF-8 encodings.")
-    (license license:lppl1.0+)))
+    (name "texlive-pxpic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pxpic/" "source/latex/pxpic/"
+                   "tex/latex/pxpic/")
+             (base32
+              "01k4c7fakc2wjbjasxqm9gnzhchn2bqnj3vvz5rrcxiq0wibmiyi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pxpic")
+    (synopsis "Draw pixel pictures")
+    (description
+     "With @code{pxpic} you draw pictures pixel by pixel.  It was inspired by
+a lovely post by Paulo Cereda, among other things (most notably a beautiful
+duck) showcasing the use of characters from the Mario video games by Nintendo
+in LaTeX.")
+    (license license:lppl1.3c)))
 
-(define-public texlive-hyphen-chinese
+(define-public texlive-qcircuit
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-chinese" "zh-latn-pinyin"
-              '("/tex/generic/hyph-utf8/patterns/ptex/hyph-zh-latn-pinyin.ec.tex"
-                "/tex/generic/hyph-utf8/patterns/tex/hyph-zh-latn-pinyin.tex")
-              (base32
-               "1hhh30hcjymm2igpllly04cavsfmd6xrjkd9zax6b2wdxn3ka4pm")))
-    (synopsis "Hyphenation patterns for unaccented Chinese pinyin")
-    (description "The package provides hyphenation patterns for unaccented
-Chinese pinyin T1/EC and UTF-8 encodings.")
-    (license license:gpl2+)))
+    (name "texlive-qcircuit")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/qcircuit/" "tex/latex/qcircuit/")
+             (base32
+              "0gyygba4zv6ncbwailjh9fvwn95d4ckrn2vj2ja089drr0sd8zkq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/qcircuit")
+    (synopsis "Macros to generate quantum ciruits")
+    (description
+     "The package supports those within the quantum information community who
+typeset quantum circuits, using @code{xy-pic} package, offering macros
+designed to help users generate circuits.")
+    (license license:gpl2)))
 
-(define-public texlive-hyphen-churchslavonic
+(define-public texlive-quantikz
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-churchslavonic" "cu"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-cu.tex")
-              (base32
-               "0fhbwaapq2213msbhgr0d1lw06ihmrqirxj092mn73d8ynl13qlh")))
-    (synopsis "Hyphenation patterns for Church Slavonic")
-    (description "The package provides hyphenation patterns for Church
-Slavonic in UTF-8 encoding.")
+    (name "texlive-quantikz")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/quantikz/" "tex/latex/quantikz/")
+             (base32
+              "1pa9ry2sn70sjkxqj0f569148xfc5iq77rw0sjnd344m3xsz38db")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/quantikz")
+    (synopsis "Draw quantum circuit diagrams")
+    (description
+     "The purpose of this package is to extend TikZ with the functionality for
+drawing quantum circuit diagrams.")
+    (license license:cc-by4.0)))
+
+(define-public texlive-randbild
+  (package
+    (name "texlive-randbild")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/randbild/"
+                   "source/latex/randbild/"
+                   "tex/latex/randbild/")
+             (base32
+              "1y9qf73163ai738pf6qvaqxy5s2cymyg19qyyfs8dfx2gygcyny9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/randbild")
+    (synopsis "Marginal pictures")
+    (description
+     "This package provides environments @code{randbild} to draw small
+marginal plots (using the packages PSTricks and @code{pst-plot}), and
+@code{randbildbasis} (the same, only without the automatically drawn
+coordinate system).")
+    (license license:lppl)))
+
+(define-public texlive-randomwalk
+  (package
+    (name "texlive-randomwalk")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/randomwalk/"
+                   "source/latex/randomwalk/"
+                   "tex/latex/randomwalk/")
+             (base32
+              "1mmisgiy0c6qww6xyp9r825snh1dkmn81qjg39c7n1jxig3a8rj3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/randomwalk")
+    (synopsis "Random walks using TikZ")
+    (description
+     "The @code{randomwalk} package provides a user command, @code{\\RandomWalk},
+to draw random walks with a given number of steps.  Lengths and angles of the
+steps can be customized in various ways.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-realhats
+  (package
+    (name "texlive-realhats")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/realhats/"
+                   "source/latex/realhats/"
+                   "tex/latex/realhats/hats/")
+             (base32
+              "0y9s12kzzrrmzkx57yqy4mzx50bcsv972825nnlgcsgkxcd8wv51")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/realhats")
+    (synopsis "Put real hats on symbols instead of @samp{^}")
+    (description
+     "This LaTeX package makes @code{\\hat} put real hats on symbols.")
     (license license:expat)))
 
-(define-public texlive-hyphen-coptic
+(define-public texlive-reotex
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-coptic" "cop"
-              (list "/tex/generic/hyph-utf8/patterns/tex-8bit/copthyph.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-cop.tex")
-              (base32
-               "1jlxxvyfa2aljizaa3qlcxyhqsrb4dawv3q3fbyp2lxz6ag9fy6m")))
-    (synopsis "Hyphenation patterns for Coptic")
-    (description "The package provides hyphenation patterns for Coptic in
-UTF-8 encoding as well as in ASCII-based encoding for 8-bit engines.")
-    ;; No explicit license declaration, so we use the project license.
+    (name "texlive-reotex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/reotex/" "tex/latex/reotex/")
+             (base32
+              "1hcjk3nms2gg1h99mxnivb5n3382yq92c578mw0pxbwi0f67z3iw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/reotex")
+    (synopsis "Draw Reo Channels and Circuits")
+    (description
+     "The package defines macros and other utilities to design Reo Circuits.")
     (license license:lppl)))
 
-(define-public texlive-hyphen-croatian
+(define-public texlive-robotarm
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-croatian" "hr"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-hr.tex")
-              (base32
-               "12n9r2winai15jc622sqdwclgcs1s68r6vcf7ic8vvq0x9qhwc5v")))
-    (synopsis "Hyphenation patterns for Croatian")
-    (description "The package provides hyphenation patterns for Croatian in
-T1/EC and UTF-8 encodings.")
-    (license license:lppl1.0+)))
+    (name "texlive-robotarm")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/robotarm/"
+                   "source/latex/robotarm/"
+                   "tex/latex/robotarm/")
+             (base32
+              "1lhvbwq979whvjwx9gyfhsxz20x6imhh57xm843zk6068lv0b3wj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:tex-format "latex"
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'add-missing-ins-file
+            ;; TeX Live distribution is missing the appropriate ".ins" file to
+            ;; generate the package.  Create it, but ignore all documentation
+            ;; related files in there.
+            (lambda _
+              (with-output-to-file "source/latex/robotarm/robotarm.ins"
+                (lambda ()
+                  (display "\\input docstrip.tex
+\\generate{\\file{robotarm.sty}{\\from{robotarm.dtx}{robotarm-package}}}
+\\endbatchfile"))))))))
+    (native-inputs
+     (list (texlive-updmap.cfg
+            (list texlive-hypdoc
+                  texlive-tools))))
+    (home-page "https://ctan.org/pkg/robotarm")
+    (synopsis "TikZ powered LaTeX package to draw parameterized 2D robot arms")
+    (description
+     "This LaTeX package uses TikZ to draw parameterized 2D robot arms, for
+example to be used in educational material.")
+    (license license:lppl1.3+)))
 
-(define-public texlive-hyphen-czech
+(define-public texlive-rviewport
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-czech" "cs"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-cs.tex")
-              (base32
-               "1q37s6p8yfyi3rp1azbz421lg4lr4aiki8m631i4x9rmps89m8iq")))
-    (synopsis "Hyphenation patterns for Czech")
-    (description "The package provides hyphenation patterns for Czech in T1/EC
-and UTF-8 encodings.")
-    (license license:gpl2+)))
+    (name "texlive-rviewport")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/rviewport/"
+                   "source/latex/rviewport/"
+                   "tex/latex/rviewport/")
+             (base32
+              "13mrihyid25h70800ix0mbqhs8dbi39nyif8f12mj54jpfdjhxcz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/rviewport")
+    (synopsis "Relative viewport for graphics inclusion")
+    (description
+     "Package @code{graphicx} provides a useful keyword viewport which allows
+to show just a part of an image.  However, one needs to put there the actual
+coordinates of the viewport window.  Sometimes it is useful to have relative
+coordinates as fractions of natural size.  For example, one may want to print
+a large image on a spread, putting a half on a verso page, and another half on
+the next recto page.  For this one would need a viewport occupying exactly one
+half of the file's bounding box, whatever the actual width of the image may
+be.  This package adds a new keyword @code{rviewport} to the @code{graphicx}
+package specifiying relative viewport for graphics inclusion: a window defined
+by the given fractions of the natural width and height of the image.")
+    (license license:lppl)))
 
-(define-public texlive-hyphen-danish
+(define-public texlive-sa-tikz
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-danish" "da"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-da.tex")
-              (base32
-               "1vj8nip64rzcrcg3skm4vqad1ggqwgan74znrdns610wjcm1z9qd")))
-    (synopsis "Hyphenation patterns for Danish")
-    (description "The package provides hyphenation patterns for Danish in
-T1/EC and UTF-8 encodings.")
-    ;; Either LPPL 1.3 or later, or Expat
-    (license (list license:lppl1.3+ license:expat))))
-
-(define-public texlive-hyphen-dutch
-  (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-dutch" "nl"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-nl.tex")
-              (base32
-               "1bg9g790ksq5cn8qihai6pacmkp9vpf35h4771z361nvwa40l8yk")))
-    (synopsis "Hyphenation patterns for Dutch")
-    (description "The package provides hyphenation patterns for Dutch in T1/EC
-and UTF-8 encodings.")
+    (name "texlive-sa-tikz")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/sa-tikz/" "tex/latex/sa-tikz/")
+             (base32
+              "0wdxdgc7jh0h7pql8wja9h4qjc7vr4gv03y4nk2mlxxycwsxiimn")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/sa-tikz")
+    (synopsis "TikZ library to draw switching architectures")
+    (description
+     "The package provides a library that offers an easy way to draw switching
+architectures and to customize their aspect.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-sacsymb
+  (package
+    (name "texlive-sacsymb")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/sacsymb/" "tex/latex/sacsymb/")
+             (base32
+              "0pwkb8z4bvgqbffcclfif04iqkpdp6lciwmwvwci3mi9bc6yh4vr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/sacsymb")
+    (synopsis "Sacred symbols prepared with TikZ")
+    (description
+     "The @code{sacsymb} package contains symbols used in objective
+reduction (Orch OR) theory of consciousness as applied to the three brains
+model of psychological experience.  These symbols are prepared using TikZ.")
     (license license:lppl1.0+)))
 
-(define-public texlive-hyphen-english
+(define-public texlive-schemabloc
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-english" '("en-gb" "en-us")
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-en-gb.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-en-us.tex")
-              (base32
-               "08b3jihjaamcl1pvffi0s47nwavkm66l9mrrmby3l32dfpkprrc5")))
-    (synopsis "Hyphenation patterns for American and British English")
-    (description "The package provides additional hyphenation patterns for
-American and British English in ASCII encoding.")
-    (license (license:non-copyleft
-              "file:///tex/generic/hyph-utf8/patterns/tex/hyph-en-us.tex"
-              "FSF all permissive license"))))
+    (name "texlive-schemabloc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/schemabloc/"
+                   "tex/latex/schemabloc/")
+             (base32
+              "03kbriqlgxafxcy5l2215d3z874s4z1g5gg02w2ij0v8wjrgyn88")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/schemabloc")
+    (synopsis "Draw block diagrams, using TikZ")
+    (description
+     "The package provides a set of macros for constructing block diagrams,
+using TikZ.")
+    (license license:lppl)))
 
-(define-public texlive-hyphen-esperanto
+(define-public texlive-scratch
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-esperanto" "eo"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-eo.tex")
-              (base32
-               "1503kzn9bk4mm4ba35cka2hm8rz0v3j5l30v5rrsd4rqgpibcgic")))
-    (synopsis "Hyphenation patterns for Esperanto")
-    (description "The package provides hyphenation patterns for Esperanto ISO
-Latin 3 and UTF-8 encodings.")
-    (license license:lppl1.0+)))
+    (name "texlive-scratch")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/scratch/" "tex/latex/scratch/")
+             (base32
+              "1np9mhfmn07clkzsg1glfxw1mkxihvv7yd10bnhc8lxxan9rymj1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/scratch")
+    (synopsis "Draw programs like Scratch")
+    (description
+     "This package permits to draw program charts in the style of the
+@url{https://scratch.mit.edu, Scratch} project.  This package is obsolete.
+From now on, Scratch is now version 3 with a new design.  Use the
+@code{scratch3} package to draw blocks with the new design.")
+    (license license:lppl1.3c)))
 
-(define-public texlive-hyphen-estonian
+(define-public texlive-scratch3
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-estonian" "et"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-et.tex")
-              (base32
-               "1rdas2450ib02rwy65i69l86nyc9h15bl07xbbwhmhxfnj8zj4v8")))
-    (synopsis "Hyphenation patterns for Estonian")
-    (description "The package provides hyphenation patterns for Estonian in
-T1/EC and UTF-8 encodings.")
-    ;; Dual licensed under either license.
-    (license (list license:lppl1.3+ license:expat))))
-
-(define-public texlive-hyphen-ethiopic
-  (let ((template (texlive-hyphen-package
-                   "texlive-hyphen-ethiopic" "mul-ethi"
-                   (list "/tex/generic/hyph-utf8/patterns/tex/hyph-mul-ethi.tex")
-                   (base32
-                    "1b93fc6j4aybh0pgq23hsn1njm6asf7sfz803fbj3ai0whsxd10l"))))
-    (package
-      (inherit template)
-      (synopsis "Hyphenation patterns for Ethiopic scripts")
-      (description "The package provides hyphenation patterns for languages
-written using the Ethiopic script for Unicode engines.  They are not supposed
-to be linguistically relevant in all cases and should, for proper typography,
-be replaced by files tailored to individual languages.")
-      (license license:expat))))
-
-(define-public texlive-hyphen-finnish
-  (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-finnish" "fi"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-fi.tex")
-              (base32
-               "1pa8sjs9zvnv1y6dma4s60sf9cr4zrvhxwm6i8cnshm84q16w4bc")))
-    (synopsis "Hyphenation patterns for Finnish")
-    (description "The package provides hyphenation patterns for Finnish in
-T1/EC and UTF-8 encodings.")
-    (license license:public-domain)))
+    (name "texlive-scratch3")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/scratch3/" "tex/latex/scratch3/")
+             (base32
+              "0g8s0p7j058z7hdm4p7kgh7nsyk4wn22lp3j25d5b4hr0xyxmhby")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/scratch3")
+    (synopsis "Draw programs like Scratch")
+    (description
+     "This package permits to draw program charts in the style of the
+@url{https://scratch.mit.edu, Scratch} project.")
+    (license license:lppl1.3c)))
 
-(define-public texlive-hyphen-schoolfinnish
+(define-public texlive-scsnowman
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-schoolfinnish" "fi-x-school"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-fi-x-school.tex")
-              (base32
-               "1w5n6gaclgifbbnafg32vz3mfaibyldvh4yh1ya3sq9fwfmv035c")))
-    (synopsis "Hyphenation patterns for Finnish for school")
-    (description "The package provides hyphenation patterns for Finnish for
-school in T1/EC and UTF-8 encodings.")
-    (license license:public-domain)))
+    (name "texlive-scsnowman")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/scsnowman/"
+                   "tex/latex/scsnowman/")
+             (base32
+              "1qr1cb19383hsxqh3a0640713m343v3jgxfk9whdxm0z11am5if0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/scsnowman")
+    (synopsis "Snowman variants using TikZ")
+    (description
+     "This LaTeX package provides a command @code{\\scsnowman} which can
+display many variants of snowman")
+    (license license:bsd-2)))
 
-(define-public texlive-hyphen-french
+(define-public texlive-setdeck
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-french" "fr"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-fr.tex")
-              (base32
-               "0jc3kqys6cxjw8x8pzjln7z78l8s7f5rlyrkv7dzr1kiwnwilk9d")))
-    (synopsis "Hyphenation patterns for French")
-    (description "The package provides hyphenation patterns for French in
-T1/EC and UTF-8 encodings.")
+    (name "texlive-setdeck")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/setdeck/" "tex/latex/setdeck/")
+             (base32
+              "11kk04nf37hmv7qw2azjl5r0cqf08khj41b1gp4nikrqvz2p1g49")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/setdeck")
+    (synopsis "Typeset cards for Set")
+    (description "The package will typeset cards for use in a game of Set.")
+    (license license:gpl3)))
+
+(define-public texlive-signchart
+  (package
+    (name "texlive-signchart")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/signchart/"
+                   "source/latex/signchart/"
+                   "tex/latex/signchart/")
+             (base32
+              "0vg7xkrc0chp0r9j05ra499n4zkwg1gh9ywfnb54yhwcas301izs")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/signchart")
+    (synopsis "Create sign charts")
+    (description
+     "The package allows users to easily typeset sign charts directly into
+their (La)TeX document.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-simplenodes
+  (package
+    (name "texlive-simplenodes")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/simplenodes/"
+                   "tex/latex/simplenodes/")
+             (base32
+              "0d3bqia3a7rnd57v8yld4i5d9nwrshkxxv6w2vglhpp447yv0nq7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/simplenodes")
+    (synopsis "Simple nodes in four colors written in TikZ for LaTeX")
+    (description
+     "This is a LaTeX macro package for generating simple node-based flow
+graphs or diagrams built upon the TikZ package.  The package provides two
+basic commands, one to generate a node and one to create links between nodes.
+The positioning of the nodes is not handled by the package itself but is
+preferably done in a tabular environment.  In total, four simple node types
+are defined, loosely based on the nomenclature and color patterns of the
+popular Java script Bootstrap.")
     (license license:expat)))
 
-(define-public texlive-hyphen-friulan
+(define-public texlive-simpleoptics
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-friulan" "fur"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-fur.tex")
-              (base32
-               "1dlnh8slpf50mryxv7zzbx08xp54zkdfs1j7y37ipwbrajvd740f")))
-    (synopsis "Hyphenation patterns for Friulan")
-    (description "The package provides hyphenation patterns for Friulan in
-ASCII encodings.")
-    (license license:lppl1.3+)))
-
-(define-public texlive-hyphen-galician
-  (let ((template (texlive-hyphen-package
-                   "texlive-hyphen-galician" "gl"
-                   (list "/tex/generic/hyph-utf8/patterns/tex/hyph-gl.tex")
-                   (base32
-                    "13zx2r3nrxdr025g2lxrph0ga6wf7cs8dxixn4fhbl6xr1cx028g"))))
-    (package
-      (inherit template)
-      (synopsis "Hyphenation patterns for Galician")
-      (description "The package provides hyphenation patterns for Galician in
-T1/EC and UTF-8 encodings.")
-      (license license:lppl1.3))))
+    (name "texlive-simpleoptics")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/simpleoptics/"
+                   "tex/latex/simpleoptics/")
+             (base32
+              "0hna56av80k1gc3fm2nbw2dy31sfdw7v14v8yppad4f2d12skpzd")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/simpleoptics")
+    (synopsis "Drawing lenses and mirrors for optical diagrams")
+    (description
+     "This package provides some of macros for drawing simple lenses and
+mirrors for use in optical diagrams.")
+    (license license:lppl1.3c)))
 
-(define-public texlive-hyphen-georgian
+(define-public texlive-smartdiagram
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-georgian" "ka"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ka.tex")
-              (base32
-               "0l0hk7ka04fr8x11nnw95x151cxyycy0fph772m3a3p8qk4x9wp7")))
-    (synopsis "Hyphenation patterns for Georgian")
-    (description "The package provides hyphenation patterns for Georgian in
-T8M, T8K, and UTF-8 encodings.")
-    (license license:lppl1.3+)))
-
-(define-public texlive-hyphen-german
-  (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-german" '("de-1901" "de-1996" "de-ch-1901")
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-de-1901.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-de-1996.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-de-ch-1901.tex"
-                    "/tex/generic/dehyph/dehyphn.tex"
-                    "/tex/generic/dehyph/dehypht.tex"
-                    "/tex/generic/dehyph/dehyphtex.tex"
-                    "/tex/generic/dehyph/README")
-              (base32
-               "17cc5hd0fr3ykpgly9nxaiz4sik3kmfn2wyxz1fkdnqqhl3i41a0")))
-    (synopsis "Hyphenation patterns for German")
-    (description "This package provides hyphenation patterns for German in
-T1/EC and UTF-8 encodings, for traditional and reformed spelling, including
-Swiss German.")
-    ;; The patterns are released under the Expat license; the dehyph* files
-    ;; are released under the LPPL version 1 or later.
-    (license (list license:expat license:lppl1.0+))))
-
-(define-public texlive-hyphen-greek
-  (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-greek" '("el-monoton" "el-polyton")
-              (list "/doc/generic/elhyphen/"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-el-monoton.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-el-polyton.tex"
-                    "/tex/generic/hyphen/grmhyph5.tex"
-                    "/tex/generic/hyphen/grphyph5.tex")
-              (base32
-               "1qyr6m1nh6d4wj68616cfxv4wjpiy1w2rlldxlx2ajzba381w3hf")))
-    (synopsis "Hyphenation patterns for Greek")
-    (description "This package provides hyphenation patterns for Modern Greek
-in monotonic and polytonic spelling in LGR and UTF-8 encodings.")
+    (name "texlive-smartdiagram")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/smartdiagram/"
+                   "source/latex/smartdiagram/"
+                   "tex/latex/smartdiagram/")
+             (base32
+              "0qlgafprxqjhy14imb3isgqjsp1y78qrcqlr0n1rvgwppmi1fd0c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/smartdiagram")
+    (synopsis "Generate diagrams from lists")
+    (description
+     "The package will create smart diagrams from lists of items, for simple
+documents and for presentations.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-spath3
+  (package
+    (name "texlive-spath3")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/spath3/" "source/latex/spath3/"
+                   "tex/latex/spath3/")
+             (base32
+              "16hg6kbr0rzk1xsyrmhnkc0dr4vq8pamqdqncjx6n5jdpwr9kzkx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/spath3")
+    (synopsis "Manipulate soft paths in PGF")
+    (description
+     "The @code{spath3} library provides methods for manipulating the soft
+paths of TikZ/PGF.  Packaged with it are two TikZ libraries that make use of
+the methods provided.  These are libraries for drawing calligraphic paths and
+for drawing knot diagrams.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-spectralsequences
+  (package
+    (name "texlive-spectralsequences")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/spectralsequences/"
+                   "tex/latex/spectralsequences/")
+             (base32
+              "0fdgkvhhg8i0j7c4ibc9d2xjbhgbpqvqp1shpqaslg5mdahml58f")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/spectralsequences")
+    (synopsis "Print spectral sequence diagrams using PGF/TikZ")
+    (description
+     "The package is a specialized tool built on top of PGF/TikZ for drawing
+spectral sequences.  It provides a powerful, concise syntax for specifying the
+data of a spectral sequence, and then allows the user to print various pages
+of spectral sequences, automatically choosing which subset of the classes,
+differentials, and structure lines to display on each page.  It also handles
+most of the details of the layout.  At the same time, it is extremely
+flexible.  @code{spectralsequences} is closely integrated with TikZ to ensure
+that users can take advantage of as much as possible of its expressive power.
+It is possible to turn off most of the automated layout features and draw
+replacements using TikZ commands.  The package also provides a carefully
+designed error reporting system intended to ensure that it is as clear as
+possible what is going wrong.")
     (license license:lppl)))
 
-(define-public texlive-hyphen-hungarian
+(define-public texlive-strands
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-hungarian" "hu"
-              (list "/doc/generic/huhyphen/"
-                    "/doc/generic/hyph-utf8/languages/hu/"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-hu.tex")
-              (base32
-               "006d2290lcsqzh9ljansbaj9k52s17zgkw0kpsspn5l7a8n00zcl")))
-    (synopsis "Hyphenation patterns for Hungarian")
-    (description "This package provides hyphenation patterns for Hungarian in
-T1/EC and UTF-8 encodings.")
-    ;; Any of these licenses
-    (license (list license:gpl2 license:lgpl2.1+ license:mpl1.1))))
-
-(define-public texlive-hyphen-icelandic
-  (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-icelandic" "is"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-is.tex")
-              (base32
-               "1m9xj41csj3ldym09d82zjbd3345sg2z10d8pxpvhgibf97mb66h")))
-    (synopsis "Hyphenation patterns for Icelandic")
-    (description "This package provides hyphenation patterns for Icelandic in
-T1/EC and UTF-8 encodings.")
-    (license license:lppl1.2+)))
+    (name "texlive-strands")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/strands/" "source/latex/strands/"
+                   "tex/latex/strands/")
+             (base32
+              "1jhvbzy8qjrjmb6j7kjwjn1iqgnszvhwlnpsag8sl1f8qgg1ns9z")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/strands")
+    (synopsis "Draw objects constructed from strands")
+    (description
+     "This package permits to draw objects constructed from strands, like set
+partitions, permutations, braids, etc.")
+    (license license:lppl1.3+)))
 
-(define-public texlive-hyphen-indic
-  (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-indic"
-              '("as" "bn" "gu" "hi" "kn" "ml" "mr" "or" "pa" "ta" "te")
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-as.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-bn.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-gu.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-hi.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-kn.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-ml.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-mr.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-or.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-pa.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-ta.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-te.tex")
-              (base32
-               "02d2kcd3lpk95fykjwhzw9s2a1s2w1skz8h2mmszrz979d1xzhpm")))
-    (synopsis "Indic hyphenation patterns")
-    (description "This package provides hyphenation patterns for Assamese,
-Bengali, Gujarati, Hindi, Kannada, Malayalam, Marathi, Oriya, Panjabi, Tamil
-and Telugu for Unicode engines.")
+(define-public texlive-swimgraf
+  (package
+    (name "texlive-swimgraf")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/swimgraf/" "tex/latex/swimgraf/")
+             (base32
+              "09s6wb3nzrxj20qrjyyr3r1fl2nbsgj1a4va101nwqb81pcmp4aq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/swimgraf")
+    (synopsis "Graphical/textual representations of swimming performances")
+    (description
+     "The package provides two macros that produce representations of
+a swimmer's performances.  The user records data in a text file and specifies
+as arguments of the macros the date range of interest.  The macros extract the
+relevant information from the file and process it: @code{\\swimgraph} produces
+a graph of the times in a single swimming event (specified as an argument),
+plotting long course and short course times in separate lines.  Records and
+qualifying times, stored in text files, may optionally be included on the
+graph. @code{\\swimtext} produces a written record of the times in all events.
+Files of current world and Canadian records are included.")
+    (license license:lppl)))
+
+(define-public texlive-syntaxdi
+  (package
+    (name "texlive-syntaxdi")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/syntaxdi/" "tex/latex/syntaxdi/")
+             (base32
+              "0q6f45vr1dq5pildna9i6vxxqg76kylnlb2rfqs9f87r73dg0xak")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/syntaxdi")
+    (synopsis "Create railroad syntax diagrams")
+    (description
+     "This package provides TikZ styles for creating special syntax diagrams
+known as railroad diagrams.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-t1utils
+  (package
+    (name "texlive-t1utils")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/t1ascii.1"
+                   "doc/man/man1/t1ascii.man1.pdf"
+                   "doc/man/man1/t1asm.1"
+                   "doc/man/man1/t1asm.man1.pdf"
+                   "doc/man/man1/t1binary.1"
+                   "doc/man/man1/t1binary.man1.pdf"
+                   "doc/man/man1/t1disasm.1"
+                   "doc/man/man1/t1disasm.man1.pdf"
+                   "doc/man/man1/t1mac.1"
+                   "doc/man/man1/t1mac.man1.pdf"
+                   "doc/man/man1/t1unmac.1"
+                   "doc/man/man1/t1unmac.man1.pdf")
+             (base32
+              "0hdk57179nn57wnmvr3jasjavkvmrn6ryph6jvjhsfqprn7bhf1y")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/t1utils")
+    (synopsis "Simple Type 1 font manipulation programs")
+    (description
+     "This package provides a collection of simple programs for manipulating
+Adobe Type 1 fonts, comprising:
+
+@itemize
+@item @command{t1ascii}: convert PFB (binary) to PFA (ASCII) fonts;
+@item @command{t1binary}: convert PFA to PFB fonts;
+@item @command{t1disasm}: convert PFA or PFB fonts to human-readable
+and -editable format;
+@item @command{t1asm}: reassemble such editable formats to a font;
+@item @command{t1unmac}: extract font resources from a Macintosh font file;
+@item @command{t1mac}: generate a Macintosh font from a Type 1 font.
+@end itemize")
+    (license license:public-domain)))
+
+(define-public texlive-table-fct
+  (package
+    (name "texlive-table-fct")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/table-fct/"
+                   "tex/latex/table-fct/")
+             (base32
+              "1l21dvfp4ypbfn5jvyrb2kwg8s8xfvcwlwxgcyix2ghawv9gsp7m")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/table-fct")
+    (synopsis
+     "Draw a variations table of functions and a convexity table of its graph")
+    (description
+     "This package offers two environnements, to draw variations table of
+a function and a convexity table of its graph.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tex4ht
+  (package
+    (name "texlive-tex4ht")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/tex4ht/"
+                   "scripts/tex4ht/"
+                   "source/generic/tex4ht/"
+                   "tex/generic/tex4ht/"
+                   "tex4ht/")
+             (base32
+              "1svmivc272xj9fzy5p055lp7g9vcqs75jp4x54682yrq0qizv03c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:link-scripts
+           #~(list "ht.sh"
+                   "htcontext.sh"
+                   "htlatex.sh"
+                   "htmex.sh"
+                   "httex.sh"
+                   "httexi.sh"
+                   "htxelatex.sh"
+                   "htxetex.sh"
+                   "mk4ht.pl"
+                   "xhlatex.sh")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/tex4ht")
+    (synopsis "Convert (La)TeX to HTML/XML")
+    (description
+     "This package provides a converter from TeX and LaTeX to SGML-based
+formats such as (X)HTML, MathML, OpenDocument, and Docbook, providing
+a configurable (La)TeX-based authoring system for hypertext.  TeX4ht does not
+independently parse (La)TeX source (so it avoids the difficulties encountered
+by many other converters, arising from the irregularity of (La)TeX syntax).
+Instead, TeX4ht uses (La)TeX itself (with myriad macro modifications) to
+produce a helper DVI file that it can then process.  This technique allows
+TeX4ht to approach the robustness characteristic of restricted-syntax systems
+such as @code{gellmu}.")
+    (license license:lppl)))
+
+(define-public texlive-tex4ebook
+  (package
+    (name "texlive-tex4ebook")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/tex4ebook/"
+                   "scripts/tex4ebook/" "tex/latex/tex4ebook/")
+             (base32
+              "0907df4hb9y7nh5bz450qb1ljixk5li8hp6r9ajx8d0c47ac5a8v")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "tex4ebook")))
+    (propagated-inputs (list texlive-make4ht texlive-tex4ht))
+    (home-page "https://ctan.org/pkg/tex4ebook")
+    (synopsis "Converter from LaTeX to EBook formats")
+    (description
+     "This is a bundle of Lua scripts and LaTeX packages for conversion of
+LaTeX files to EBook formats such as EPUB, MOBI and EPUB3.  TeX4ht is used as
+the conversion engine.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-texaccents
+  (package
+    (name "texlive-texaccents")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/texaccents.1"
+                   "doc/man/man1/texaccents.man1.pdf"
+                   "doc/support/texaccents/"
+                   "scripts/texaccents/"
+                   "source/support/texaccents/")
+             (base32
+              "1kh4cpvrxgcvnmzxgb3my4jawyqd4348cy6h195346pvdb5xsphh")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/texaccents")
+    (synopsis "Convert composite accented characters to Unicode")
+    (description
+     "This small utility, written in SNOBOL, converts the composition of
+special characters to Unicode.")
     (license license:expat)))
 
-(define-public texlive-hyphen-indonesian
+(define-public texlive-texcount
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-indonesian" "id"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-id.tex")
-              (base32
-               "1r62w02rf0i4z0jgij54d16qjbj0zyfwm9dwdkqka76jrivij83q")))
-    (synopsis "Indonesian hyphenation patterns")
-    (description "This package provides hyphenation patterns for
-Indonesian (Bahasa Indonesia) in ASCII encoding.  They are probably also
-usable for Malay (Bahasa Melayu).")
-    (license license:gpl2)))
+    (name "texlive-texcount")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/texcount/" "scripts/texcount/")
+             (base32
+              "0ab1kp0zh2r65x1v42sc5bwxmlifa8splrakq589fgd0aap0l8n1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "texcount.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/texcount")
+    (synopsis "Count words in a LaTeX document")
+    (description
+     "TeXcount is a Perl script that counts words in the text of LaTeX files.
+It has rules for handling most of the common macros, and can provide
+colour-coded output showing which parts of the text have been counted.")
+    (license license:lppl)))
 
-(define-public texlive-hyphen-interlingua
+(define-public texlive-texdef
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-interlingua" "ia"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ia.tex")
-              (base32
-               "0a9na20vjnzhgjbicaxay0jk4rm5zg1rjyiswr377mjhd9mx5cg3")))
-    (synopsis "Interlingua hyphenation patterns")
-    (description "This package provides hyphenation patterns for Interlingua
-in ASCII encoding.")
+    (name "texlive-texdef")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/texdef/" "scripts/texdef/"
+                   "source/support/texdef/")
+             (base32
+              "0jkc6c4nvzp228d7dcmp0gv2q5qassjq1p40fz4pmbxiyias7zw3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:link-scripts #~(list "texdef.pl")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'link-scripts 'add-symlink
+            (lambda _
+              (with-directory-excursion (string-append #$output "/bin")
+                (symlink "texdef" "latexdef")))))))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/texdef")
+    (synopsis "Display the definitions of TeX commands")
+    (description
+     "This (Perl) script displays the definitions of (La)TeX command
+sequences/macros.  Various options allow the selection of the used class as
+well as package files and other factors that may influence the
+definition (before/after the preamble, inside an environment, ...).  The
+script creates a temporary TeX file which is then compiled using (La)TeX to
+find the @code{\\meaning} of the command sequence.  The result is formatted
+and presented to the user.  Length or number command sequences (dimensions,
+@code{\\char}..., count registers, ...)  are recognized and the contained
+value is also shown (using @code{\\the}).  Special definitions like protected
+macros are also recognized and the underlying macros are shown as well.  The
+script will show plain TeX definitions by default.  LaTeX and ConTeXt are
+supported, including flavours (pdf(La)TeX, Lua(La)TeX, Xe(La)TeX, ...).  The
+flavour can be selected using a command line option, or via the script name:
+@command{latexdef} will use LaTeX as default, etc.")
+    (license license:gpl3)))
+
+(define-public texlive-texdiff
+  (package
+    (name "texlive-texdiff")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/texdiff.1"
+                   "doc/man/man1/texdiff.man1.pdf"
+                   "doc/support/texdiff/" "scripts/texdiff/")
+             (base32
+              "1cp2k217ziwdgh5c7lg22p58ajv7j410ncag620lkdwajc5jqx1d")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "texdiff")))
+    (home-page "https://ctan.org/pkg/texdiff")
+    (synopsis "Compare documents and produce tagged merge")
+    (description
+     "Two files are compared and a new TeX file is output.  When the output
+file is processed with (La)TeX it marks new changes with blue and old text
+with red with a strike-through line.  Furthermore, passages with changes are
+marked at the margin with grey bars by the LaTeX @code{changebar} package.")
+    (license license:artistic2.0)))
+
+(define-public texlive-texdirflatten
+  (package
+    (name "texlive-texdirflatten")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/texdirflatten.1"
+                   "doc/man/man1/texdirflatten.man1.pdf"
+                   "doc/support/texdirflatten/"
+                   "scripts/texdirflatten/")
+             (base32
+              "0f2h9qlqfml9p83znxh81i7cmwfbsr0zrladrf3486v4aja859kx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "texdirflatten")))
+    (home-page "https://ctan.org/pkg/texdirflatten")
+    (synopsis "Collect files related to a LaTeX job in a single directory")
+    (description
+     "The Perl script parses a LaTeX file recursively, scanning all child
+files, and collects details of any included and other data files.  These
+component files, are then all put into a single directory (thus flattening the
+document's directory tree).")
+    (license license:artistic2.0)))
+
+(define-public texlive-texdoc
+  (package
+    (name "texlive-texdoc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/texdoc.1"
+                   "doc/man/man1/texdoc.man1.pdf"
+                   "doc/support/texdoc/" "scripts/texdoc/"
+                   "texdoc/")
+             (base32
+              "19mvh7pm2332f6c8nzgcbscm9vcz0apwfgm0m55ycibssc2fb3ww")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "texdoc.tlu")))
+    (propagated-inputs (list texlive-kpathsea))
+    (home-page "https://ctan.org/pkg/texdoc")
+    (synopsis "Documentation access for TeX Live")
+    (description
+     "@command{texdoc} is a Lua script providing easy access to the
+documentation in TeX Live: PDF, DVI, plain text files, and more.  Viewing and
+other configuration can be extensively customized.")
+    (license license:gpl3+)))
+
+(define-public texlive-texdoctk
+  (package
+    (name "texlive-texdoctk")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/texdoctk.1"
+                   "doc/man/man1/texdoctk.man1.pdf"
+                   "scripts/texdoctk/" "texdoctk/")
+             (base32
+              "18xxivpgjdh8v6kg0b45zjv18sm9a4ljpwk6a4cghg5l5yggrjcx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "texdoctk.pl")))
+    (inputs (list perl))
+    (propagated-inputs (list texlive-kpathsea))
+    (home-page "https://ctan.org/pkg/texdoctk")
+    (synopsis "Easy access to package documentation")
+    (description
+     "This package provides a Perl/Tk-based GUI for easy access to package
+documentation for TeX on Unix platforms; the databases it uses are based on
+the texmf/doc subtrees of teTeX, but database files for local configurations
+with modified/extended directories can be derived from them.  Note that
+@command{texdoctk} is not a viewer itself, but an interface for finding
+documentation files and opening them with the appropriate viewer; so it relies
+on appropriate programs to be installed on the system.  However, the choice of
+these programs can be configured by the sysadmin or user.")
+    (license license:gpl3+)))
+
+(define-public texlive-texdraw
+  (package
+    (name "texlive-texdraw")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/info/texdraw.info"
+                   "doc/support/texdraw/"
+                   "tex/generic/texdraw/")
+             (base32
+              "1pqrmyc8jnwk06qbrf18cyny1z4ncq0snp4jc0r7qgnh6bmlbncs")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/texdraw")
+    (synopsis "Graphical macros, using embedded PostScript")
+    (description
+     "TeXdraw is a set of macro definitions for TeX, which allow the user to
+produce PostScript drawings from within TeX and LaTeX.  TeXdraw has been
+designed to be extensible.  Drawing segments are relocatable, self-contained
+units.  Using a combination of TeX's grouping mechanism and the
+@code{gsave}/@code{grestore} mechanism in PostScript, drawing segments allow
+for local changes to the scaling and line parameters.  Using TeX's macro
+definition capability, new drawing commands can be constructed from drawing
+segments.")
+    (license license:cc-by4.0)))
+
+(define-public texlive-texfot
+  (package
+    (name "texlive-texfot")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/texfot.1"
+                   "doc/man/man1/texfot.man1.pdf"
+                   "doc/support/texfot/" "scripts/texfot/")
+             (base32
+              "0cy1fz265ch13cn0jwfg7rlspqlxv8swnv6ljjvqqg8hbl390npd")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "texfot.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/texfot")
+    (synopsis "Filter clutter from the output of a TeX run")
+    (description
+     "The package provides a small Perl script to filter the online output
+from a TeX run, attempting to show only those messages which probably deserve
+some change in the source.  The TeX invocation itself need not change.")
+    (license license:public-domain)))
+
+(define-public texlive-texliveonfly
+  (package
+    (name "texlive-texliveonfly")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/texliveonfly/"
+                   "scripts/texliveonfly/")
+             (base32
+              "15nrgkh9wkaccbyd8jgcyw5xjjhqj3jyy3spbfd679fywq14l8c2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "texliveonfly.py")))
+    (inputs (list python))
+    (home-page "https://ctan.org/pkg/texliveonfly")
+    (synopsis "On-the-fly download of missing TeX live packages")
+    (description
+     "The package provides a script that performs on the fly downloads of
+missing packages, while a document is being compiled.  To use the script,
+replace your (LaTeX) compilation command with @samp{texliveonfly.py
+file.tex}.")
+    (license license:gpl3)))
+
+(define-public texlive-texloganalyser
+  (package
+    (name "texlive-texloganalyser")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/texloganalyser/"
+                   "scripts/texloganalyser/")
+             (base32
+              "0qlrpqwfyakhh163ckznw5z8jwm5frp3krpi7fxnf9pz03c7shhr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "texloganalyser")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/texloganalyser")
+    (synopsis "Analyse TeX logs")
+    (description
+     "This Perl script allows the user to extract (and display) elements of
+the log file.")
+    (license license:bsd-2)))
+
+(define-public texlive-texlogfilter
+  (package
+    (name "texlive-texlogfilter")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/texlogfilter.1"
+                   "doc/man/man1/texlogfilter.man1.pdf"
+                   "doc/support/texlogfilter/"
+                   "scripts/texlogfilter/")
+             (base32
+              "0w2cxkgzalx083hh4kyk10ampy1dx50iv44z9s2gks224p3rlyps")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "texlogfilter")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/texlogfilter")
+    (synopsis "Filter LaTeX engines output or log file")
+    (description
+     "@command{texlogfilter} is a Perl script designed to filter LaTeX engines
+output or log file (LaTeX, pdfLaTeX, LuaLaTeX or XeLaTeX).  It reduces the
+LaTeX output or log to keep only warnings and errors.  The result is
+colorised.  Options allow to mask specific warnings, such as box or
+references/citations warnings.  It's also possible to add custom filter
+patterns.")
     (license license:lppl1.3+)))
 
-(define-public texlive-hyphen-irish
+(define-public texlive-texlogsieve
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-irish" "ga"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ga.tex")
-              (base32
-               "1h1l9jzkpsb91nyhz6s6c9jfrbz8jx5ip8vyq3dkz0rl6g960i6b")))
-    (synopsis "Irish hyphenation patterns")
-    (description "This package provides hyphenation patterns for
-Irish (Gaeilge) in T1/EC and UTF-8 encodings.")
-    ;; Either of these licenses
-    (license (list license:gpl2+ license:expat))))
-
-(define-public texlive-hyphen-italian
-  (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-italian" "it"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-it.tex")
-              (base32
-               "03c7jiqslfxvl3gbdx79hggbvrfi2l4z2bnwxc0na8f8lkp1m787")))
-    (synopsis "Italian hyphenation patterns")
-    (description "This package provides hyphenation patterns for Italian in
-ASCII encoding.  Compliant with the Recommendation UNI 6461 on hyphenation
-issued by the Italian Standards Institution (Ente Nazionale di Unificazione
-UNI).")
+    (name "texlive-texlogsieve")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/texlogsieve.1"
+                   "doc/man/man1/texlogsieve.man1.pdf"
+                   "doc/support/texlogsieve/"
+                   "scripts/texlogsieve/")
+             (base32
+              "0pssh34f2263qfpirmv1np9ncjw9d9zyjqbxpin12px2hmvjvip6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "texlogsieve")))
+    (home-page "https://ctan.org/pkg/texlogsieve")
+    (synopsis "Filter and summarize LaTeX log files")
+    (description
+     "@command{texlogsieve} reads a LaTeX log file (or the standard input if
+no file is specified), filters out less relevant messages, and displays
+a summary report.")
+    (license license:gpl3+)))
+
+(define-public texlive-texosquery
+  (package
+    (name "texlive-texosquery")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/texosquery/"
+                   "scripts/texosquery/"
+                   "source/support/texosquery/"
+                   "tex/latex/texosquery/")
+             (base32
+              "17s947p011qar5aaz11ysby3nqqrnk0qv4m26hsl5y6divqb2dan")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:link-scripts
+           #~(list "texosquery-jre5.sh" "texosquery-jre8.sh" "texosquery.sh")))
+    (home-page "https://ctan.org/pkg/texosquery")
+    (synopsis "Java application to query OS information")
+    (description
+     "This package provides a Java application to query OS information
+designed for use in TeX's shell escape mechanism.  The application can query
+the following:
+
+@itemize
+@item locale and codeset,
+@item current working directory,
+@item user home directory
+@item temporary directory,
+@item OS name, arch and version,
+@item current date and time in PDF format (for TeX formats that don't provide
+@code{\\pdfcreationdate}),
+@item date-time stamp of a file in PDF format (for TeX formats that don't
+provide @code{\\pdffilemoddate}),
+@item size of a file in bytes (for TeX formats that don't provide
+@code{\\pdffilesize}),
+@item contents of a directory (captured as a list),
+@item directory contents filtered by regular expression (captured as a list),
+@item URI or canonical path of a file.  All paths use a forward slash as
+directory divider so results can be used, for example, in commands like
+@code{\\includegraphics}.
+@end itemize
+
+There are files provided for easy access in TeX documents.
+@file{texosquery.tex} provides generic TeX code, whereas @file{texosquery.sty}
+is a LaTeX package, which provides commands to run @command{texosquery} using
+TeX's shell escape mechanism and capture the result in a control sequence.")
     (license license:lppl1.3+)))
 
-(define-public texlive-hyphen-kurmanji
+(define-public texlive-texplate
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-kurmanji" "kmr"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-kmr.tex")
-              (base32
-               "01ylbsi5wymrdrxr9b28nmjmcj72mdhqr657lwsb6m9aj33c9ql6")))
-    (synopsis "Kurmanji hyphenation patterns")
-    (description "This package provides hyphenation patterns for
-Kurmanji (Northern Kurdish) as spoken in Turkey and by the Kurdish diaspora in
-Europe, in T1/EC and UTF-8 encodings.")
-    (license license:lppl1.3)))
+    (name "texlive-texplate")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/texplate/" "scripts/texplate/"
+                   "source/support/texplate/")
+             (base32
+              "027vfbqm95ysp7sqlcz3p5b2107mcjg540x73nsf2d1g83k4ps4r")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "texplate.sh")))
+    (home-page "https://ctan.org/pkg/texplate")
+    (synopsis "Tool for creating document structures based on templates")
+    (description
+     "TeXplate is a tool for creating document structures based on templates.
+The application name is a word play on TeX and template, so the purpose seems
+quite obvious: we want to provide an easy and straightforward framework for
+reducing the typical code boilerplate when writing TeX documents.  Also note
+that one can easily extrapolate the use beyond articles and theses: the
+application is powerful enough to generate any text-based structure, given
+that a corresponding template exists.")
+    (license license:bsd-3)))
 
-(define-public texlive-hyphen-latin
+(define-public texlive-texware
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-latin" '("la-x-classic" "la-x-liturgic" "la")
-              '("/tex/generic/hyph-utf8/patterns/tex/hyph-la-x-classic.tex"
-                "/tex/generic/hyph-utf8/patterns/tex/hyph-la-x-liturgic.tex"
-                "/tex/generic/hyph-utf8/patterns/tex/hyph-la.tex"
-                "/tex/generic/hyph-utf8/patterns/tex-8bit/hyph-la-x-classic.ec.tex")
-              (base32
-               "119rf6sk1f639ky6zr9njn21nsxzgfmjci94y26745qs8w08ilkl")))
-    (synopsis "Liturgical Latin hyphenation patterns")
-    (description "This package provides hyphenation patterns for Latin in
-T1/EC and UTF-8 encodings, mainly in modern spelling (u when u is needed and v
-when v is needed), medieval spelling with the ligatures @code{\\ae} and
-@code{\\oe} and the (uncial) lowercase 'v' written as a 'u' is also supported.
-Apparently there is no conflict between the patterns of modern Latin and those
-of medieval Latin.  It also includes hyphenation patterns for the Classical
-Latin in T1/EC and UTF-8 encodings.  Classical Latin hyphenation patterns are
-different from those of 'plain' Latin, the latter being more adapted to modern
-Latin.  It also provides hyphenation patterns for the Liturgical Latin in
-T1/EC and UTF-8 encodings.")
-    ;; Either of these licenses
-    (license (list license:lppl1.0+ license:expat))))
-
-(define-public texlive-hyphen-latvian
-  (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-latvian" "lv"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-lv.tex")
-              (base32
-               "00jf8xma4ldz0zpqwma97k9q3j0mqx7qdj6b7baph3n5xgc24aaw")))
-    (synopsis "Latvian hyphenation patterns")
-    (description "This package provides hyphenation patterns for Latvian in
-L7X and UTF-8 encodings.")
-    ;; Either of these licenses.
-    (license (list license:gpl2 license:lgpl2.1))))
-
-(define-public texlive-hyphen-lithuanian
-  (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-lithuanian" "lt"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-lt.tex")
-              (base32
-               "1kfq7j2ajg6nj952s1ygd520sj9z9kl0bqvd291a36ni2b1frzgd")))
-    (synopsis "Lithuanian hyphenation patterns")
-    (description "This package provides hyphenation patterns for Lithuanian in
-L7X and UTF-8 encodings.")
-    ;; "Do ... whatever ... as long as you respect the copyright"; as part of
-    ;; the hyph-utf8 package we choose the LPPL license.
+    (name "texlive-texware")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/dvitype.1"
+                   "doc/man/man1/dvitype.man1.pdf"
+                   "doc/man/man1/pooltype.1"
+                   "doc/man/man1/pooltype.man1.pdf")
+             (base32
+              "122r0aq02vwx6irsnapnfbvhgy5d09x90rc8zc7a0bi7b25bxnd1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/texware")
+    (synopsis "Utility programs for use with TeX")
+    (description
+     "This package provides basic utility programs, comprising:
+@command{dvitype}, which converts a TeX output (DVI) file to a plain text
+file; @command{pooltype}, which converts a TeX-suite program's pool (string)
+file into human-readable form; @command{tftopl} and @command{pltotf}, which
+convert TeX Font Metric (TFM) file to human readable Property List (PL) files
+and vice versa.")
+    (license license:public-domain)))
+
+(define-public texlive-ticollege
+  (package
+    (name "texlive-ticollege")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ticollege/"
+                   "tex/latex/ticollege/")
+             (base32
+              "1qbng6vq8w3ln2aw2kckbjih8hz3m2yr1b0bx8bx1a7bf5fhmd6i")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ticollege")
+    (synopsis
+     "Graphical representation of keys on a standard scientific calculator")
+    (description
+     "This package provides commands to draw scientific calculator keys with
+the help of TikZ.  It also provides commands to draw the content of screens
+and of menu items.")
     (license license:lppl)))
 
-(define-public texlive-hyphen-macedonian
+(define-public texlive-tie
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-macedonian" "mk"
-              '("/tex/generic/hyph-utf8/patterns/tex/hyph-mk.tex"
-                "/tex/generic/hyph-utf8/patterns/tex-8bit/hyph-mk.macedonian.tex")
-              (base32
-               "1fv6y8gpic5ciw8cclfxc8h3wr5xir1j0a7shixja1pmdyz7db2b")))
-    (synopsis "Macedonian hyphenation patterns")
-    (description "This package provides hyphenation patterns for Macedonian.")
-    ;; XXX: License just says 'GPL'.  Assume GPL2 since the file predates GPL3.
-    (license license:gpl2+)))
+    (name "texlive-tie")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/tie.1"
+                   "doc/man/man1/tie.man1.pdf")
+             (base32
+              "17z5ik7bbf0v5ylq2v1rda6z64iz386vp56z7yrr6h1dl488kr93")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-kpathsea))
+    (home-page "https://ctan.org/pkg/tie")
+    (synopsis "Allow multiple web change files")
+    (description
+     "Tie was originally developed to allow web programmers to apply more than
+one change file to their source.  The program may also be used to create a new
+version of a @file{.web} file that incorporates existing changes.")
+    ;; The license, provided as the "tie.w" source file, is morally equivalent
+    ;; to CC BY-SA.
+    (license (license:fsf-free "file://tie.w"))))
 
-(define-public texlive-hyphen-mongolian
+(define-public texlive-tikz-3dplot
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-mongolian" '("mn-cyrl-x-lmc" "mn-cyrl")
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-mn-cyrl-x-lmc.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-mn-cyrl.tex")
-              (base32
-               "1y1b91ihrdl9bad3rxlsfjpd9wmyd5zzgci3qv9w8qqk33jxhwya")))
-    (synopsis "Mongolian hyphenation patterns in Cyrillic script")
-    (description "This package provides hyphenation patterns for Mongolian in
-T2A, LMC and UTF-8 encodings.")
-    ;; Either of these licenses
-    (license (list license:lppl1.3+ license:expat))))
-
-(define-public texlive-hyphen-norwegian
-  (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-norwegian" '("nb" "nn" "no")
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-nb.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-nn.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-no.tex")
-              (base32
-               "08gbwj64p4fckm199k52yp5lx65h9f4wwdkvl4pv4aa7k370jq9y")))
-    (synopsis "Norwegian Bokmal and Nynorsk hyphenation patterns")
-    (description "This package provides hyphenation patterns for Norwegian
-Bokmal and Nynorsk in T1/EC and UTF-8 encodings.")
-    (license (license:non-copyleft
-              "/tex/generic/hyph-utf8/patterns/tex/hyph-no.tex"
-              "FSF All permissive license"))))
+    (name "texlive-tikz-3dplot")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-3dplot/"
+                   "tex/latex/tikz-3dplot/")
+             (base32
+              "05hw2wxs4q477x16ffh6wcmypdf7mz7500dxnfywiqi0pgzmnh89")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-3dplot")
+    (synopsis "Coordinate transformation styles for 3d plotting in TikZ")
+    (description
+     "The package provides straightforward ways to define three-dimensional
+coordinate frames through which to plot in TikZ.  The user can specify the
+orientation of the main coordinate frame, and use standard TikZ commands and
+coordinates to render their @code{tikzfigure}.  A secondary coordinate frame
+is provided to allow rotations and translations with respect to the main
+coordinate frame.  In addition, the package can also handle plotting
+user-specified functions in spherical polar coordinates, where both the radius
+and fill color can be expressed as parametric functions of polar angles.")
+    (license license:lppl1.3+)))
 
-(define-public texlive-hyphen-occitan
+(define-public texlive-tikz-among-us
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-occitan" "oc"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-oc.tex")
-              (base32
-               "0vhjbq2nr58vhqwwky3cwx4dqiwjmmfwp81rb65mfpf0m8yypdfg")))
-    (synopsis "Occitan hyphenation patterns")
-    (description "This package provides hyphenation patterns for Occitan in
-T1/EC and UTF-8 encodings.  They are supposed to be valid for all the Occitan
-variants spoken and written in the wide area called 'Occitanie' by the French.
-It ranges from the Val d'Aran within Catalunya, to the South Western Italian
-Alps encompassing the southern half of the French pentagon.")
+    (name "texlive-tikz-among-us")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-among-us/"
+                   "tex/latex/tikz-among-us/")
+             (base32
+              "0rrkzh1hain7mvnx4r5s7pccxvcj0izjbjwyrjg3nwin03mqqxy1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-among-us")
+    (synopsis "Create some AmongUs characters in TikZ environments")
+    (description
+     "This package recreates some AmongUs characters in TikZ environments.
+Some interesting uses alongside other packages are also supported.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-tikz-bagua
+  (package
+    (name "texlive-tikz-bagua")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-bagua/"
+                   "tex/latex/tikz-bagua/")
+             (base32
+              "1kn0ggpxz5ksnnxsfhbhavik7n8mpblm9x3qjxcsg2qhs286lwyh")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-bagua")
+    (synopsis "Draw Bagua symbols in Yijing")
+    (description
+     "This package provides commands for drawing symbols in Yijing (I Ching)
+or Zhouyi using TikZ.  There is no need for extra special fonts for showing
+these symbols.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-tikz-bayesnet
+  (package
+    (name "texlive-tikz-bayesnet")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-bayesnet/"
+                   "tex/latex/tikz-bayesnet/")
+             (base32
+              "0fmm93h0kl6q45sglfz1ssrnj20sqds9kvamf1dqzmfw2g77qwqr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-bayesnet")
+    (synopsis
+     "Draw Bayesian networks, graphical models and directed factor graphs")
+    (description
+     "The package provides a library supporting the display of Bayesian networks,
+graphical models and (directed) factor graphs in LaTeX.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tikz-bbox
+  (package
+    (name "texlive-tikz-bbox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-bbox/"
+                   "tex/latex/tikz-bbox/")
+             (base32
+              "0h224gmdbx63dff0zikv9grf5p7780rdxng2ws9d68k7rk961lb7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-bbox")
+    (synopsis "Precise determination of bounding boxes in TikZ")
+    (description
+     "The built-in determination of the bounding box in TikZ is not entirely
+accurate.  This is because, for Bezier curves, it is the smallest box that
+contains all control points, which is in general larger than the box that just
+contains the curve.  This library determines the exact bounding box of the
+curve.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-tikz-cd
+  (package
+    (name "texlive-tikz-cd")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-cd/" "tex/generic/tikz-cd/"
+                   "tex/latex/tikz-cd/")
+             (base32
+              "188vd02cwy7r58cnam4aj4lq1jp295mmn3q1w3ki7p6n8v1gnl0c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-cd")
+    (synopsis "Create commutative diagrams with TikZ")
+    (description
+     "The general-purpose drawing package TiKZ can be used to typeset
+commutative diagrams and other kinds of mathematical pictures.  The purpose of
+this package is to make the process of creation of such diagrams easier by
+providing a convenient set of macros and reasonable default settings.  This
+package also includes an arrow tip library that match closely the arrows
+present in the Computer Modern typeface.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tikz-dependency
+  (package
+    (name "texlive-tikz-dependency")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-dependency/"
+                   "tex/latex/tikz-dependency/")
+             (base32
+              "12a31jqrxlaj8jj5f7p9vgwp8yqinl5ab0c3nfv4b1c9a08p8q3s")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-dependency")
+    (synopsis "Library for drawing dependency graphs")
+    (description
+     "The package provides a library that draws together existing TikZ
+facilities to make a comfortable environment for drawing dependency graphs.
+Basic facilities of the package include a lot of styling facilities, to let
+you personalize the look and feel of the graphs.")
+    (license (list license:lppl license:gpl2))))
+
+(define-public texlive-tikz-dimline
+  (package
+    (name "texlive-tikz-dimline")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-dimline/"
+                   "tex/latex/tikz-dimline/")
+             (base32
+              "15zxc3zxl8mk0rq3b30d2a89lxlnybih49j8w8c6xsfn5mqbn8br")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-dimline")
+    (synopsis "Technical dimension lines using PGF/TikZ")
+    (description
+     "@code{tikz-dimline} helps drawing technical dimension lines in TikZ
+@code{picture} environments.")
+    (license license:wtfpl2)))
+
+(define-public texlive-tikz-ext
+  (package
+    (name "texlive-tikz-ext")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-ext/"
+                   "tex/generic/tikz-ext/"
+                   "tex/latex/tikz-ext/" "tex/plain/tikz-ext/")
+             (base32
+              "1sb7h2jrz82g10j5qq4h4qiyj5jdriyx7618rfgx05cz8rdv6mxs")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-ext")
+    (synopsis "Collection of libraries for PGF/TikZ")
+    (description
+     "This is a collection of libraries for PGF/TikZ.  Currently these are
+@code{transformations.mirror}, @code{paths.arcto}, @code{paths.ortho},
+@code{paths.timer}, @code{patterns.images}, @code{topaths.arcthrough} and
+@code{misc}.")
+    (license (list license:fdl1.3+ license:lppl))))
+
+(define-public texlive-tikz-feynhand
+  (package
+    (name "texlive-tikz-feynhand")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-feynhand/"
+                   "tex/latex/tikz-feynhand/")
+             (base32
+              "11cz44yqxm7dhx53h27r3n5q911dhllzfl53a401w1wnybymj84s")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-feynhand")
+    (synopsis "Feynman diagrams with TikZ")
+    (description
+     "This package lets you draw Feynman diagrams using TikZ.  It is a low-end
+modification of the TikZ-Feynman package, one of whose principal advantages is
+the automatic generation of diagrams, for which it needs LuaTeX.
+TikZ-FeynHand only provides the manual mode and hence runs in LaTeX without
+any reference to LuaTeX.  In addition it provides some new styles for vertices
+and propagators, alternative shorter keywords in addition to TikZ-Feynman's
+longer ones, some shortcut commands for quickly customizing the diagrams look,
+and the new feature of putting one propagator on top of another.")
+    (license license:gpl3+)))
+
+(define-public texlive-tikz-feynman
+  (package
+    (name "texlive-tikz-feynman")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-feynman/"
+                   "tex/latex/tikz-feynman/")
+             (base32
+              "1yndmpghf3z5jddr3zcm5xw7v7zb6715d870ckjd5gifkvyv3nsy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-iftex texlive-pgfopts))
+    (home-page "https://ctan.org/pkg/tikz-feynman")
+    (synopsis "Feynman diagrams with TikZ")
+    (description
+     "This is a LaTeX package allowing Feynman diagrams to be easily generated
+within LaTeX with minimal user instructions and without the need of external
+programs.  It builds upon the TikZ package and leverages the graph placement
+algorithms from TikZ in order to automate the placement of many vertices.
+@code{tikz-feynman} allows fine-tuned placement of vertices so that even
+complex diagrams can still be generated with ease.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tikz-imagelabels
+  (package
+    (name "texlive-tikz-imagelabels")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-imagelabels/"
+                   "source/latex/tikz-imagelabels/"
+                   "tex/latex/tikz-imagelabels/")
+             (base32
+              "1hvyrkpabnqscnsqz56hby71vpbby03va0xa6gcjjxak65lscwkv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-imagelabels")
+    (synopsis "Put labels on images using TikZ")
+    (description
+     "This package allows to add label texts to an existing image with the aid
+of TikZ.  This may be used to label certain features in an image.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tikz-inet
+  (package
+    (name "texlive-tikz-inet")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-inet/"
+                   "tex/latex/tikz-inet/")
+             (base32
+              "1f4n5mp9hb92li2xywfzfrs8hjyrkd15xp97nh5rdgan695hvdpq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-inet")
+    (synopsis "Draw interaction nets with TikZ")
+    (description
+     "The package extends TikZ with macros to draw interaction nets.")
+    (license license:lppl)))
+
+(define-public texlive-tikz-kalender
+  (package
+    (name "texlive-tikz-kalender")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-kalender/"
+                   "tex/latex/tikz-kalender/")
+             (base32
+              "1cwdssvbaibjf7nla0d88nyzip407kgqvndid2p2gxc0b2afp69f")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-kalender")
+    (synopsis "LaTeX based calendar using TikZ")
+    (description
+     "This package generates a calendar included events provided as
+@file{.events} files.")
+    (license license:cc-by-sa4.0)))
+
+(define-public texlive-tikz-karnaugh
+  (package
+    (name "texlive-tikz-karnaugh")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-karnaugh/"
+                   "tex/latex/tikz-karnaugh/")
+             (base32
+              "091s9gavh8f4jya01nkjhzgh3f5b80ijiiaj7simnxawn60mh1z1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-karnaugh")
+    (synopsis "Typeset Karnaugh maps using TikZ")
+    (description
+     "The @code{tikz-karnaugh} package is a LaTeX package used to draw
+Karnaugh maps.  It uses TikZ to produce high quality graph from 1 to 12
+variables, but this upper limit depends on the TeX memory usage and can be
+different for you.  You can control colour, styles and distances.  It can be
+considered as an upgrade and extension of Andreas W. Wieland's @code{karnaugh}
+package towards TikZ supporting.")
     (license license:lppl1.0+)))
 
-(define-public texlive-hyphen-pali
+(define-public texlive-tikz-ladder
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-pali" "pi"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-pi.tex")
-              (base32
-               "1fak853s4ijdqgrnhwymaq1lh8jab3qfyxapdmf6qpg6bqd20kxq")))
-    (synopsis "Panjabi hyphenation patterns")
-    (description "This package provides hyphenation patterns for Panjabi in
-T1/EC encoding.")
-    ;; Can be used with either license.
-    (license (list license:expat license:lgpl3+ license:gpl3+))))
-
-(define-public texlive-hyphen-piedmontese
-  (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-piedmontese" "pms"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-pms.tex")
-              (base32
-               "0xva3l2gwzkqw1sz64k5g5iprhdyr27w1mv8rxp8x62i5y3aqr1k")))
-    (synopsis "Piedmontese hyphenation patterns")
-    (description "This package provides hyphenation patterns for Piedmontese
-in ASCII encoding.  Compliant with 'Gramatica dla lengua piemonteisa' by
-Camillo Brero.")
+    (name "texlive-tikz-ladder")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-ladder/"
+                   "tex/latex/tikz-ladder/")
+             (base32
+              "1fkq7z58h7g71ag4j77vy87hqgpp5q8qvw7kv1pmkff7ycrj8alw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-ladder")
+    (synopsis "Draw ladder diagrams using TikZ")
+    (description
+     "The @code{tikz-ladder} package contains a collection of symbols for
+typesetting ladder diagrams (PLC program) in agreement with the international
+standard IEC-61131-3/2013.  It includes blocks (for representing functions and
+function blocks) besides contacts and coils.  It extends the circuit library
+of TikZ and allows you to draw a ladder diagram in the same way as you would
+draw any other circuit.")
+    (license license:lppl1.0+)))
+
+(define-public texlive-tikz-lake-fig
+  (package
+    (name "texlive-tikz-lake-fig")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-lake-fig/"
+                   "tex/latex/tikz-lake-fig/")
+             (base32
+              "1vyr3will7jivwc30aj13bm9gjj4nyl02754p42phn0y7gdf82kr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-lake-fig")
+    (synopsis "Schematic diagrams of lakes")
+    (description
+     "This package contains a collection of schematic diagrams of lakes for
+use in LaTeX documents.  Diagrams include representations of material budgets,
+fluxes, and connectivity arrangements.")
     (license license:lppl1.3+)))
 
-(define-public texlive-hyphen-polish
+(define-public texlive-tikz-layers
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-polish" "pl"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-pl.tex")
-              (base32
-               "1c22g99isxapv4xjrmsw24hhp1xb83wbgcxyd8j24mxdnizywxzm")))
-    (synopsis "Polish hyphenation patterns")
-    (description "This package provides hyphenation patterns for Polish in QX
-and UTF-8 encodings.")
-    ;; No differing license declared, so we choose the project license.
+    (name "texlive-tikz-layers")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-layers/"
+                   "tex/latex/tikz-layers/")
+             (base32
+              "1j5wbsybd10zmmiz3lfkb9gzjhxjnbhp7lmdq1fzngywxsb81iz6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-layers")
+    (synopsis
+     "Add graphical layers on TikZ: @code{behind}, @code{above} and @code{glass}")
+    (description
+     "TikZ-layers is a tiny package that provides, alongside
+@code{background}, typical graphical layers on TikZ: @code{behind},
+@code{above} and @code{glass}.  The layers may be selected with one of the
+styles @code{on behind layer}, @code{on above layer}, @code{on glass layer} as
+an option to a @code{scope} environment.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tikz-mirror-lens
+  (package
+    (name "texlive-tikz-mirror-lens")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-mirror-lens/"
+                   "tex/latex/tikz-mirror-lens/")
+             (base32
+              "0sddmlki3bdd9js9vs1m1haqcdk3g1ji086jp1h4nfw6dy1s6y56")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-mirror-lens")
+    (synopsis "Spherical mirrors and lenses in TikZ")
+    (description
+     "This package allows the automatic drawing of the image of objects in
+spherical mirrors and lenses from the data of the focus, from the position and
+height of the object.  It calculates the position and height of the image, and
+also displays the notable rays.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-tikz-nef
+  (package
+    (name "texlive-tikz-nef")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-nef/" "tex/latex/tikz-nef/")
+             (base32
+              "18b2452hfcndqhljq2hn437z6myc45hn62s4bnnjb0f3xnayq1qr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-nef")
+    (synopsis "Create diagrams for neural networks")
+    (description
+     "The @code{nef} TikZ library provides predefined styles and shapes to
+create diagrams for neural networks constructed with the methods of
+the Neural Engineering Framework (NEF).  The following styles are
+supported:
+@itemize
+@item @code{ea}: ensemble array,
+@item @code{ens}: ensemble,
+@item @code{ext}: external input or output,
+@item @code{inhibt}: inhibitory connection,
+@item @code{net}: network,
+@item @code{pnode}: pass-through node,
+@item @code{rect}: rectification ensemble,
+@item @code{recurrent}: recurrent connection.
+@end itemize")
+    (license license:expat)))
+
+(define-public texlive-tikz-network
+  (package
+    (name "texlive-tikz-network")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-network/"
+                   "tex/latex/tikz-network/")
+             (base32
+              "1bs08sxxps4kjvgv53lc07ihkcaz2v1ygdc16vn46yy5dp16w2sz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-network")
+    (synopsis "Draw networks with TikZ")
+    (description
+     "This package allows the creation of images of complex networks that are
+seamlessly integrated into the underlying LaTeX files.")
+    (license license:gpl3+)))
+
+(define-public texlive-tikz-opm
+  (package
+    (name "texlive-tikz-opm")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-opm/" "tex/latex/tikz-opm/")
+             (base32
+              "0kv26i1lfm9zsvqsajaz9fmz1gv7az3pknk29gg6zwjlg5nxqac3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-opm")
+    (synopsis "Typeset OPM diagrams")
+    (description
+     "This package typesets OPM (Object-Process Methodology) diagrams using
+LaTeX and PGF/TikZ.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tikz-optics
+  (package
+    (name "texlive-tikz-optics")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-optics/"
+                   "tex/latex/tikz-optics/")
+             (base32
+              "0ii7h57klxq8fjag363wmaaxi9bnds898nl6s1abiqb13pgbmb9n")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-optics")
+    (synopsis "Library for drawing optical setups with TikZ")
+    (description
+     "This package provides a new TikZ library designed to easily draw optical
+setups with TikZ.  It provides shapes for lens, mirror, etc.  The
+geometrically (in)correct computation of light rays through the setup is left
+to the user.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tikz-page
+  (package
+    (name "texlive-tikz-page")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-page/"
+                   "source/latex/tikz-page/"
+                   "tex/latex/tikz-page/")
+             (base32
+              "1ck1jr37wd7mx8irm0niv43pmfy2ix5s08vybai8k0jgpvvwwi1j")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-page")
+    (synopsis "Small macro to help building nice and complex layout materials")
+    (description
+     "The package provides a small macro to help building nice and complex
+layout materials.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tikz-palattice
+  (package
+    (name "texlive-tikz-palattice")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-palattice/"
+                   "tex/latex/tikz-palattice/")
+             (base32
+              "0vbzr6821q88x4yipa9czcqgpwnkzkkzynxxbxyzy1kh9657hqvg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-palattice")
+    (synopsis "Draw particle accelerator lattices with TikZ")
+    (description
+     "This package allows for drawing a map of a particle accelerator just by
+giving a list of elements --- similar to lattice files for simulation
+software.  The package includes 12 common element types like dipoles,
+quadrupoles, cavities, or screens, as well as automatic labels with element
+names, a legend, a rule, and an environment to fade out parts of the
+accelerator.  The coordinate of any element can be saved and used for custom
+TikZ drawings or annotations.  Thereby, lattices can be connected to draw
+injection/extraction or even a complete accelerator facility.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tikz-planets
+  (package
+    (name "texlive-tikz-planets")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-planets/"
+                   "tex/latex/tikz-planets/")
+             (base32
+              "0sgdkcn0li4k48m0fvhdk6j1kjvh6kzgjbq2jjwnzrdxz97s7hig")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-planets")
+    (synopsis "Illustrate celestial mechanics and the solar system")
+    (description
+     "This TikZ-package makes it easy to illustrate celestial mechanics and
+the solar system.  You can use it to draw sketches of the eclipses, the phases
+of the Moon, etc.")
+    (license license:cc-by-sa4.0)))
+
+(define-public texlive-tikz-qtree
+  (package
+    (name "texlive-tikz-qtree")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-qtree/"
+                   "tex/latex/tikz-qtree/")
+             (base32
+              "15w7mr0rhra80rvf4zci2gkd5cy13ijlh64ay0bay87iviwbkn83")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-qtree")
+    (synopsis "Use existing Qtree syntax for trees in TikZ")
+    (description
+     "The package provides a macro for drawing trees with TikZ using the easy
+syntax of Alexis Dimitriadis Qtree.  It improves on TikZ's standard
+tree-drawing facility by laying out tree nodes without collisions; it improves
+on Qtree by adding lots of features from TikZ (for example, edge labels,
+arrows between nodes); and it improves on @code{pst-qtree} in being usable
+with pdfTeX and XeTeX.")
+    (license license:gpl3+)))
+
+(define-public texlive-tikz-relay
+  (package
+    (name "texlive-tikz-relay")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-relay/"
+                   "tex/latex/tikz-relay/")
+             (base32
+              "06q0iamg001lvqmi51j61xbwamgnhiah0aw9qv61n7fnxqpwj66c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-relay")
+    (synopsis "TikZ library for typesetting electrical diagrams")
+    (description
+     "This package contains a collection of symbols for typesetting electrical
+wiring diagrams for relay control systems.  The symbols are meant to be in
+agreement with the international standard IEC-60617 which has been adopted
+worldwide, with perhaps the exception of the USA.  It extends and modifies,
+when needed, the TikZ-libray @code{circuits.ee.IEC}.  A few non-standard
+symbols are also included mainly to be used in presentations, particularly
+with the @code{beamer} package.")
+    (license license:lppl1.0+)))
+
+(define-public texlive-tikz-sfc
+  (package
+    (name "texlive-tikz-sfc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-sfc/" "tex/latex/tikz-sfc/")
+             (base32
+              "0blgyqvmnbwafx85mz4gkyhk0g0zqfmsd98gm3h794a4jfs3zl31")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-sfc")
+    (synopsis
+     "Symbols collection for typesetting Sequential Function Chart (SFC)
+diagrams")
+    (description
+     "This package contains a collection of symbols for typesetting Sequential
+Function Chart (SFC) diagrams in agreement with the international standard
+IEC-61131-3/2013.  It includes steps (normal and initial), transitions,
+actions and actions qualifiers (with and without time duration).  It extends
+the circuit library of TikZ and allows you to draw an SFC diagram in same way
+you would draw any other circuit.")
+    (license license:lppl1.0+)))
+
+(define-public texlive-tikz-swigs
+  (package
+    (name "texlive-tikz-swigs")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-swigs/"
+                   "tex/latex/tikz-swigs/")
+             (base32
+              "0brbq02vafaajzrwrkg20gy5k3zlzvv7ycgkw0aa20l8rxjcyv71")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-swigs")
+    (synopsis "Horizontally and vertically split elliptical nodes")
+    (description
+     "This package provides horizontally and vertically split
+elliptical (pairs of) nodes in TikZ.  The package name derives from the fact
+that split ellipses of this type are used to represent Single-World
+Intervention Graph (SWIG) models which are used in counterfactual causal
+inference.")
+    (license (list license:lppl1.3c license:gpl3+))))
+
+(define-public texlive-tikz-timing
+  (package
+    (name "texlive-tikz-timing")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-timing/"
+                   "source/latex/tikz-timing/"
+                   "tex/latex/tikz-timing/")
+             (base32
+              "19zs6agcli2glm92z8y89nr4049v5sqvnlddbwlwym5rni33kh1m")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-ydoc))
+    (propagated-inputs (list texlive-svn-prov))
+    (home-page "https://ctan.org/pkg/tikz-timing")
+    (synopsis "Easy generation of timing diagrams as TikZ pictures")
+    (description
+     "This package provides macros and an environment to generate timing
+diagrams (digital waveforms) without much effort.  The TikZ package is used to
+produce the graphics.  A tabular-like environment is provided to produce
+larger timing diagrams.")
     (license license:lppl)))
 
-(define-public texlive-hyphen-portuguese
+(define-public texlive-tikz-trackschematic
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-portuguese" "pt"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-pt.tex")
-              (base32
-               "00rkjy4p7893zs940bq3s4hp7al0skgxqggj5qfax0bx8karf30b")))
-    (synopsis "Portuguese hyphenation patterns")
-    (description "This package provides hyphenation patterns for Portuguese in
-T1/EC and UTF-8 encodings.")
-    (license license:bsd-3)))
+    (name "texlive-tikz-trackschematic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-trackschematic/"
+                   "tex/latex/tikz-trackschematic/")
+             (base32
+              "11dak88q9n54i385sjk4nxini2fycdfmhs2h41fdf9k2012ykdnx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-trackschematic")
+    (synopsis "TikZ library for creating track diagrams in railways")
+    (description
+     "This TikZ library is a toolbox of symbols geared primarily towards
+creating track schematic for either research or educational purposes.  It
+provides a TikZ frontend to some of the symbols which may be needed to
+describe situations and layouts in railway operation.  The library is divided
+into sublibraries: @code{topology}, @code{trafficcontrol}, @code{vehicles},
+@code{constructions}, @code{electrics}, @code{symbology}, and
+@code{measures}.")
+    (license license:isc)))
+
+(define-public texlive-tikz-truchet
+  (package
+    (name "texlive-tikz-truchet")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikz-truchet/"
+                   "source/latex/tikz-truchet/"
+                   "tex/latex/tikz-truchet/")
+             (base32
+              "1v959iw7swkkam73q759m09s5fcv932gx9d1vqj6n3b2yzxxc85b")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikz-truchet")
+    (synopsis "Draw Truchet tiles")
+    (description
+     "This is a package for LaTeX that draws Truchet tiles, as used in Colin
+Beveridge's article Too good to be Truchet in issue 08 of Chalkdust.")
+    (license license:expat)))
 
-(define-public texlive-hyphen-romanian
+(define-public texlive-tikzbricks
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-romanian" "ro"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ro.tex")
-              (base32
-               "1ykb5v7ip6p3n34wq8qypfyrap4gg946by5rsl6ab0k5gv6ypsbf")))
-    (synopsis "Romanian hyphenation patterns")
-    (description "This package provides hyphenation patterns for Romanian in
-T1/EC and UTF-8 encodings.")
-    ;; No differing license declared, so we choose the project license.
+    (name "texlive-tikzbricks")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzbricks/"
+                   "tex/latex/tikzbricks/")
+             (base32
+              "1wf5hdwpprbbxmd0rrwvk54raiwpv4q6qgd2gpbba6d26bmgjd1w")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzbricks")
+    (synopsis "Drawing bricks with TikZ")
+    (description
+     "This package provides a small LaTeX package to draw bricks with TikZ.
+The user can modify color, shape, and viewpoint.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-tikzcodeblocks
+  (package
+    (name "texlive-tikzcodeblocks")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzcodeblocks/"
+                   "tex/latex/tikzcodeblocks/")
+             (base32
+              "04c8bjl3l97vsh7cydbh20wnq93my19avkhcf4kh0g5cvq02nizp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzcodeblocks")
+    (synopsis "Helps to draw codeblocks like Scratch, NEPO and PXT in TikZ")
+    (description
+     "@code{tikzcodeblocks} is a LaTeX package for typesetting blockwise
+graphic programming languages like Scratch, NEPO or PXT.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-tikzducks
+  (package
+    (name "texlive-tikzducks")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/tikzducks/"
+                   "tex/generic/tikzducks/")
+             (base32
+              "08gigdsi0gc0npv2jrd2i0yqs53s0ckwk1m0lrsiaxk66bb864y3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzducks")
+    (synopsis "Package for using rubber ducks in TikZ")
+    (description
+     "The package is a LaTeX package for ducks to be used in TikZ pictures.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-tikzfill
+  (package
+    (name "texlive-tikzfill")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzfill/" "tex/latex/tikzfill/")
+             (base32
+              "0n2hnnw4ffafwd9yy6pzcv0pc580y28dvz93g4hbi25dz32sawmk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzfill")
+    (synopsis "TikZ libraries for filling with images and patterns")
+    (description
+     "This is a collection of TikZ libraries which add further options to fill
+TikZ paths with images and patterns.  The libraries comprise fillings with
+images from files and from TikZ pictures.  Also, patterns of hexagons and of
+rhombi are provided.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tikzinclude
+  (package
+    (name "texlive-tikzinclude")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzinclude/"
+                   "source/latex/tikzinclude/"
+                   "tex/latex/tikzinclude/")
+             (base32
+              "0mcgzbfvj6pksr18813kpnknkdpzlyi0rncbn9g11ac0g0lyzgqq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzinclude")
+    (synopsis "Import TikZ images from colletions")
+    (description
+     "The package addresses the problem of importing only one TikZ-image from
+a file holding multiple images.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tikzlings
+  (package
+    (name "texlive-tikzlings")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzlings/"
+                   "tex/latex/tikzlings/")
+             (base32
+              "0cqja06i3s8w3wbz6dhlhbri1zhqsyh8jhyahi5v8q9ywdm389yd")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzlings")
+    (synopsis "Collection of cute little animals and similar creatures")
+    (description
+     "This package provides a collection of LaTeX packages for drawing cute
+little animals and similar creatures using TikZ.  Currently, the following
+TikZlings are included: anteater, bat, bear, bee, bug, cat, chicken, coati,
+elephant, hippo, koala, marmot, mole, mouse, owl, panda, penguin, pig, rhino,
+sheep, sloth, snowman, squirrel, and wolf.  These little drawings can be
+customized in many ways.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-tikzmark
+  (package
+    (name "texlive-tikzmark")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzmark/"
+                   "source/latex/tikzmark/"
+                   "tex/latex/tikzmark/")
+             (base32
+              "0m3yij12kgbgficln9vdgc43bi0si7j0j86lv2k69f1bwf865w4z")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzmark")
+    (synopsis "Use TikZ's method of remembering a position on a page")
+    (description
+     "The @code{tikzmark} package defines a command to remember a position on
+a page for later (or earlier) use, primarily (but not exclusively) with
+TikZ.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-tikzmarmots
+  (package
+    (name "texlive-tikzmarmots")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzmarmots/"
+                   "tex/latex/tikzmarmots/")
+             (base32
+              "0j1z78r43czg09inw76ksgs97l7klivi93w7hvcvafd47h9zcvsg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzmarmots")
+    (synopsis "Drawing little marmots in TikZ")
+    (description
+     "This is a LaTeX package for marmots to be used in TikZ pictures.
+These little figures are constructed in such a way that they may even borrow
+some garments and other attributes from the TikZducks.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-tikzorbital
+  (package
+    (name "texlive-tikzorbital")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzorbital/"
+                   "tex/latex/tikzorbital/")
+             (base32
+              "0rjbl8gcsf752hkrn2j7angvwh55vldsd168w581frmx3g25d9rb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzorbital")
+    (synopsis "Atomic and molecular orbitals using TikZ")
+    (description
+     "This package draws atomic s, p and d orbitals, as well as molecular
+orbital diagrams.")
     (license license:lppl)))
 
-(define-public texlive-hyphen-romansh
+(define-public texlive-tikzpackets
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-romansh" "rm"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-rm.tex")
-              (base32
-               "0a1q9p6sp5n6a9w6xhwk03vmkrrmnh2md7g1k4qhnf0dc4h7dy9r")))
-    (synopsis "Romansh hyphenation patterns")
-    (description "This package provides hyphenation patterns for Romansh in
-ASCII encodings.  They are supposed to comply with the rules indicated by the
-Lia Rumantscha (Romansh language society).")
+    (name "texlive-tikzpackets")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzpackets/"
+                   "tex/latex/tikzpackets/")
+             (base32
+              "0i5v0yblm3fw0wy0vhl2a0g1r8ib72d2knk60apqvqizl98fn8ff")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzpackets")
+    (synopsis "Display network packets")
+    (description
+     "This package allows you to easily display network packets graphically.")
+    (license license:expat)))
+
+(define-public texlive-tikzpagenodes
+  (package
+    (name "texlive-tikzpagenodes")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzpagenodes/"
+                   "source/latex/tikzpagenodes/"
+                   "tex/latex/tikzpagenodes/")
+             (base32
+              "13ddkwm4a1x2b47zqjk2m55y2dwl09rl3s0pm1vmxv7h2sawgqbr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-ydoc))
+    (home-page "https://ctan.org/pkg/tikzpagenodes")
+    (synopsis "Single TikZ node for the whole page")
+    (description
+     "The package provides special PGF/TikZ nodes for the text, marginpar,
+footer and header area of the current page.  They are inspired by the current
+page node defined by PGF/TikZ itself.")
+    (license license:lppl)))
+
+(define-public texlive-tikzpeople
+  (package
+    (name "texlive-tikzpeople")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzpeople/"
+                   "tex/latex/tikzpeople/")
+             (base32
+              "1sgxabjy54zcw0dkb5hgi9d84ilq4ik30xwwd1n8jhhmi4vg2sm7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzpeople")
+    (synopsis "Draw people-shaped nodes in TikZ")
+    (description
+     "This package provides people-shaped nodes in the style of Microsoft
+Visio clip art, to be used with TikZ.  The available, highly customizable,
+node shapes are: alice, bob, bride, builder, businessman, charlie, chef,
+conductor, cowboy, criminal, dave, devil, duck, graduate, groom, guard,
+jester, judge, maninblack, mexican, nun, nurse, physician, pilot, police,
+priest, sailor, santa, surgeon.")
     (license license:lppl1.3+)))
 
-(define-public texlive-hyphen-russian
+(define-public texlive-tikzpfeile
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-russian" "ru"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ru.tex")
-              (base32
-               "00sy7qh5f8ryxw36fwbyd1yi2hxhv7hmk99yp7dwh73n4mxv6lpl")))
-    (synopsis "Russian hyphenation patterns")
-    (description "This package provides hyphenation patterns for Russian in
-T2A and UTF-8 encodings.")
+    (name "texlive-tikzpfeile")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzpfeile/"
+                   "source/latex/tikzpfeile/"
+                   "tex/latex/tikzpfeile/")
+             (base32
+              "0h6kkrm462hk2hvbdqqjai3gxsslibghxbjyq3ih0vps7fakglc6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzpfeile")
+    (synopsis "Draw arrows using PGF/TikZ")
+    (description
+     "In a document with a lot of diagrams created with PGF/TikZ, there is
+a possibility of the reader being distracted by different sorts of arrowheads
+in the diagrams and in the text (as, e.g., in @code{\\rightarrow}).  The
+package defines macros to create all arrows using PGF/TikZ, so as to avoid the
+problem.")
+    (license license:lppl)))
+
+(define-public texlive-tikzpingus
+  (package
+    (name "texlive-tikzpingus")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzpingus/"
+                   "makeindex/tikzpingus/"
+                   "tex/latex/tikzpingus/")
+             (base32
+              "0cqswzdmp2154wdb9ljbqqinf9vh6vhpjn7b4adfj7sr8xji7ihj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzpingus")
+    (synopsis "Penguins with TikZ")
+    (description
+     "@code{tikzpingus} is a package similar to tikzducks but with penguins
+and a vast set of gadgets and extras (capable of changing the wing-positions,
+body-types, and more).")
+    (license license:gpl3)))
+
+(define-public texlive-tikzposter
+  (package
+    (name "texlive-tikzposter")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzposter/"
+                   "source/latex/tikzposter/"
+                   "tex/latex/tikzposter/")
+             (base32
+              "0hl5p14a79575s5n5rx4yy8vxcb2qrdhx851rhms7dk2sqcfynn5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzposter")
+    (synopsis "Create scientific posters using TikZ")
+    (description
+     "This package provides a document class provides a simple way of using
+TikZ for generating posters.  Several formatting options are available, and
+spacing and layout of the poster is to a large extent automated.")
     (license license:lppl1.2+)))
 
-(define-public texlive-hyphen-sanskrit
+(define-public texlive-tikzscale
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-sanskrit" "sa"
-              (list "/doc/generic/hyph-utf8/languages/sa/hyphenmin.txt"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-sa.tex")
-              (base32
-               "1bkzj8swj4lbswf1vr4pb1jg6dixzs7p8h8zm8s8as52h442aida")))
-    (synopsis "Sanskrit hyphenation patterns")
-    (description "This package provides hyphenation patterns for Sanskrit and
-Prakrit in longdesc transliteration, and in Devanagari, Bengali, Kannada,
-Malayalam longdesc and Telugu scripts for Unicode engines.")
-    ;; "You may freely use, copy, modify and/or distribute this file."
-    (license (license:non-copyleft
-              "file:///tex/generic/hyph-utf8/patterns/tex/hyph-sa.tex"))))
+    (name "texlive-tikzscale")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzscale/"
+                   "source/latex/tikzscale/"
+                   "tex/latex/tikzscale/")
+             (base32
+              "1iq7f9jnw86rhp7b3sim3z56ygj005zygzfc0bdnpmx5s4ds1gpv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzscale")
+    (synopsis "Resize pictures while respecting text size")
+    (description
+     "The package extends the @code{\\includegraphics} command to support
+@code{tikzpicture} environments.  It allows scaling of TikZ images and
+PGFPlots to a given width or height without changing the text size.")
+    (license license:lppl1.3+)))
 
-(define-public texlive-hyphen-serbian
+(define-public texlive-tikzsymbols
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-serbian" '("sh-cyrl" "sh-latn" "sr-cyrl")
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-sh-cyrl.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-sh-latn.tex"
-                    "/tex/generic/hyph-utf8/patterns/tex/hyph-sr-cyrl.tex")
-              (base32
-               "0pwc9z0m5y6acq1vqm0da9akg156jbhxzvsfp2f8bsz5b99y5z45")))
-    (synopsis "Serbian hyphenation patterns")
-    (description "This package provides hyphenation patterns for Serbian in
-T1/EC, T2A and UTF-8 encodings.")
-    ;; Any version of the GPL.
+    (name "texlive-tikzsymbols")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzsymbols/"
+                   "source/latex/tikzsymbols/"
+                   "tex/latex/tikzsymbols/")
+             (base32
+              "0q19w9adpfxrsh7jmf4qpjarhgb4wng66kjkmalcxijd99kxbkhk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzsymbols")
+    (synopsis "Some symbols created using TikZ")
+    (description
+     "The package provides various emoticons, cooking symbols and trees.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-tikztosvg
+  (package
+    (name "texlive-tikztosvg")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/tikztosvg.1"
+                   "doc/man/man1/tikztosvg.man1.pdf"
+                   "doc/support/tikztosvg/"
+                   "scripts/tikztosvg/")
+             (base32
+              "1h1g3vsljx3bz929krr21i65n20drwhwxi88gwcvrxrgsvi9xj08")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "tikztosvg")))
+    (home-page "https://ctan.org/pkg/tikztosvg")
+    (synopsis "Utility for rendering TikZ diagrams to SVG")
+    (description
+     "This package provides a shell script that calls XeTeX and
+@command{pdf2svg} to convert TikZ environments to SVG files.")
+    (license license:gpl3)))
+
+(define-public texlive-tikzviolinplots
+  (package
+    (name "texlive-tikzviolinplots")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tikzviolinplots/"
+                   "tex/latex/tikzviolinplots/")
+             (base32
+              "1cm1pcv4x9qpsxghvxv1w212j8p37g5miqn73d5xwy0vaqhd0hhz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tikzviolinplots")
+    (synopsis "Draws violin plots from data")
+    (description
+     "This package enables the user to draw violin plots, calculating the
+kernel density estimation from the data and plotting the resulting curve
+inside a @code{tikzpicture} environment.  It supports different kernels, and
+allows the user to either set the bandwidth value for each plot or use
+a default value.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tile-graphic
+  (package
+    (name "texlive-tile-graphic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tile-graphic/"
+                   "source/latex/tile-graphic/"
+                   "tex/latex/tile-graphic/")
+             (base32
+              "1vg2nrb6cjgkmbkv8igs76vzl1vzvisqlm1y612j4144v26n05nw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tile-graphic")
+    (synopsis "Create tiles of a graphical file")
+    (description
+     "This package breaks a given graphical file into @samp{n} rows and
+@samp{m} columns of subgraphics, which are called tiles.  The tiles can be
+written separately to individual PDF files, or packaged into a single PDF
+file.")
+    (license license:lppl1.2+)))
+
+(define-public texlive-timing-diagrams
+  (package
+    (name "texlive-timing-diagrams")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/timing-diagrams/"
+                   "tex/latex/timing-diagrams/")
+             (base32
+              "06hzcbbinrlvdsp9jxs82xi9b94x76f239z5b1x3y41ip3n51b1p")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/timing-diagrams")
+    (synopsis "Draw timing diagrams")
+    (description
+     "The package provides commands to draw and annotate various kinds of
+timing diagrams, using TikZ.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tipfr
+  (package
+    (name "texlive-tipfr")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tipfr/" "tex/latex/tipfr/")
+             (base32
+              "1frgk49mw7wi18065y4ikg75vg03d2vbdflfnyanixn46zpf2p8z")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tipfr")
+    (synopsis "Produces calculator's keys with the help of TikZ")
+    (description
+     "The package provides commands to draw calculator keys with the help of
+TikZ.  It also provides commands to draw the content of screens and of menu
+items.")
+    (license license:lppl)))
+
+(define-public texlive-tkz-base
+  (package
+    (name "texlive-tkz-base")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tkz-base/" "tex/latex/tkz-base/")
+             (base32
+              "0mi76p1ykifhmgzwmlkiwwq47s427n1flakiyad60dzyw953cg86")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tkz-base")
+    (synopsis "Tools for drawing with a cartesian coordinate system")
+    (description
+     "The bundle is a set of packages, designed to give mathematics
+teachers (and students) easy access to programming of drawings with TikZ.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tkz-berge
+  (package
+    (name "texlive-tkz-berge")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tkz-berge/" "tex/latex/tkz-berge/")
+             (base32
+              "16pgdkf0s97gkd662pddvxr5jbk68mcbikz4rclmv88d9zlgccxr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tkz-berge")
+    (synopsis "Macros for drawing graphs of graph theory")
+    (description
+     "The package provides a collection of useful macros for drawing classic
+graphs of graph theory, or to make other graphs.  This package has been taken
+temporarily out of circulation to give the author time to investigate some
+problems.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-tkz-doc
+  (package
+    (name "texlive-tkz-doc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tkz-doc/")
+             (base32
+              "00awi2m8ak949r6bxzw1l69fx8gjcn4kmrr0q0yp8qghga40c6n3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tkz-doc")
+    (synopsis "Documentation macros for the TKZ series of packages")
+    (description
+     "This bundle offers a documentation class (@code{tkz-doc}) and
+a package (@code{tkzexample}).  These files are used in the documentation of
+the author's packages @code{tkz-base}, @code{tkz-euclide}, @code{tkz-fct},
+@code{tkz-linknodes}, and @code{tkz-tab}.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tkz-euclide
+  (package
+    (name "texlive-tkz-euclide")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tkz-euclide/"
+                   "tex/latex/tkz-euclide/")
+             (base32
+              "0ykhhyvrjy2q731m8dm2k73kiddy1xnznhsayyid4yjjnwdqq1bw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tkz-euclide")
+    (synopsis "Tools for drawing Euclidean geometry")
+    (description
+     "The @code{tkz-euclide} package is a set of files designed to give math
+teachers and students easy access to the programming of Euclidean geometry
+with TikZ.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tkz-fct
+  (package
+    (name "texlive-tkz-fct")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tkz-fct/" "tex/latex/tkz-fct/")
+             (base32
+              "0czwqkdws24qdp22s6p3m87fpfqmwdqjzwxckzkn3ig6rcl63nqj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tkz-fct")
+    (synopsis "Tools for drawing graphs of functions")
+    (description
+     "The @code{tkz-fct} package is designed to give math teachers (and
+students) easy access to programming graphs of functions with TikZ and
+Gnuplot.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tkz-graph
+  (package
+    (name "texlive-tkz-graph")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tkz-graph/"
+                   "tex/latex/tkz-graph/")
+             (base32
+              "1mdfdi97d8q7jqy7l3pqqs7ai4ph5r1aci3ahfsg5zmpmkwr981r")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tkz-graph")
+    (synopsis "Draw graph-theory graphs")
+    (description
+     "The package is designed to create graph diagrams as simply as possible,
+using TikZ.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tkz-orm
+  (package
+    (name "texlive-tkz-orm")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tkz-orm/" "tex/latex/tkz-orm/")
+             (base32
+              "0qmwiglz59djq0xkpsfgqzdf6872z33z9faxn86krs5mxmrik6cc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tkz-orm")
+    (synopsis "Create Object-Role Model (ORM) diagrams")
+    (description
+     "The package provides styles for drawing Object-Role Model (ORM) diagrams
+in TeX based on the PGF and TikZ picture environment.")
+    (license (list license:gpl2 license:lppl1.3+))))
+
+(define-public texlive-tkz-tab
+  (package
+    (name "texlive-tkz-tab")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tkz-tab/" "tex/latex/tkz-tab/")
+             (base32
+              "0j50pf0lf9dbi0zfnqm62rlyazsgbmpcqwlajqsjccqqkirdv6pb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tkz-tab")
+    (synopsis "Tables of signs and variations using PGF/TikZ")
+    (description
+     "The package provides comprehensive facilities for preparing lists of
+signs and variations, using PGF.  This package has been taken temporarily out
+of circulation to give the author time to investigate some problems.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tkzexample
+  (package
+    (name "texlive-tkzexample")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tkzexample/"
+                   "tex/latex/tkzexample/")
+             (base32
+              "1y445fjvy13cqa9y1sbac43wbmidvfn7vb7jws11fl4lj7vvgvhz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tkzexample")
+    (synopsis "Package for the documentation of all @samp{tkz-} packages")
+    (description
+     "This package is needed to compile the documentation of all @samp{tkz-}
+packages (like @code{tkz-euclide}).")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tlcockpit
+  (package
+    (name "texlive-tlcockpit")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/tlcockpit.1"
+                   "doc/man/man1/tlcockpit.man1.pdf"
+                   "doc/support/tlcockpit/"
+                   "scripts/tlcockpit/"
+                   "source/support/tlcockpit/")
+             (base32
+              "1nv0wx21x022isw8rycvqdqwiz4ay6ws36bbcpqfqkjmvz5qr76w")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:link-scripts #~(list "tlcockpit.sh")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'locate-java
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((java (search-input-file inputs "/bin/java")))
+                (substitute* "scripts/tlcockpit/tlcockpit.sh"
+                  (("java -") (string-append java " -")))))))))
+    ;; FIXME: missing EventTarget.class.
+    (inputs (list icedtea))
+    (home-page "https://ctan.org/pkg/tlcockpit")
+    (synopsis "GUI frontend to TeX Live Manager")
+    (description
+     "This package aims at being a GUI for @command{tlmgr}, the TeX Live
+Manager, with a modern look and feel.")
     (license license:gpl3+)))
 
-(define-public texlive-hyphen-slovak
+(define-public texlive-tonevalue
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-slovak" "sk"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-sk.tex")
-              (base32
-               "0ppp53bbclp5c8wvx748krvrp5y5053khgkjnnv966a90fvp3vgd")))
-    (synopsis "Slovak hyphenation patterns")
-    (description "This package provides hyphenation patterns for Slovak in
-T1/EC and UTF-8 encodings.")
+    (name "texlive-tonevalue")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tonevalue/"
+                   "tex/latex/tonevalue/")
+             (base32
+              "16a724k0c8s3i2pdjfsq5v2z4v5nqdpnxvh63j4ngj822w9llg1z")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tonevalue")
+    (synopsis
+     "Tool for linguists and phoneticians to visualize tone value patterns")
+    (description
+     "This package provides a TikZ-based solution to typeset visualisations of
+tone values.  Currently, unt's model is implemented.  Support for more models
+is planned.")
+    (license license:asl2.0)))
+
+(define-public texlive-tpic2pdftex
+  (package
+    (name "texlive-tpic2pdftex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/tpic2pdftex.1"
+                   "doc/man/man1/tpic2pdftex.man1.pdf"
+                   "doc/tpic2pdftex/")
+             (base32
+              "02nf2fg4xzh8lbbddvm44qyvcvfn5b7kzcyg729a58l29gd88pbs")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tpic2pdftex")
+    (synopsis "Use @code{tpic} commands in pdfTeX")
+    (description
+     "The Awk script converts Pic language, embedded inline (delimited by
+@code{.PS} and @code{.PE} markers), to @code{\\pdfliteral} commands.")
+    (license license:gpl3+)))
+
+(define-public texlive-tqft
+  (package
+    (name "texlive-tqft")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tqft/" "source/latex/tqft/"
+                   "tex/latex/tqft/")
+             (base32
+              "08lykpnw0hifhmh96pb7s3dd8sbzmz3gqyrwy5ann9fqxxjczf2d")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tqft")
+    (synopsis "Drawing TQFT diagrams with TikZ/PGF")
+    (description
+     "The package defines some node shapes useful for drawing TQFT diagrams
+with TikZ/PGF.  That is, it defines highly customisable shapes that look like
+cobordisms between circles, such as those used in TQFT and other mathematical
+diagrams.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tsemlines
+  (package
+    (name "texlive-tsemlines")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/latex/tsemlines/")
+             (base32
+              "1c7sjdrgqbjw6f2s3185k5rlkig643pkkahjisx16h0akbbdm4k3")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tsemlines")
+    (synopsis "Support for the ancient @code{\\emline} macro")
+    (description
+     "Occasional Documents appear, that use graphics generated by TeXcad from
+the EmTeX distribution.  These documents often use the @code{\\emline} macro,
+which produced lines at an arbitrary orientation.  The present package
+emulates the macro, using TikZ.")
+    (license license:public-domain)))
+
+(define-public texlive-ttfutils
+  (package
+    (name "texlive-ttfutils")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/ttf2afm.1"
+                   "doc/man/man1/ttf2afm.man1.pdf"
+                   "doc/man/man1/ttf2pk.1"
+                   "doc/man/man1/ttf2pk.man1.pdf"
+                   "doc/man/man1/ttf2tfm.1"
+                   "doc/man/man1/ttf2tfm.man1.pdf"
+                   "doc/man/man1/ttfdump.1"
+                   "doc/man/man1/ttfdump.man1.pdf"
+                   "doc/ttf2pk/"
+                   "fonts/enc/ttf2pk/base/"
+                   "fonts/sfd/ttf2pk/"
+                   "ttf2pk/")
+             (base32
+              "1yfr3yic0bx73imxhmxhnhjc1mpwy9f55sh3p430p2f2yvxwm0cs")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ttfutils")
+    (synopsis "Convert TrueType to TFM and PK fonts")
+    (description
+     "This package provides utilities to convert TrueType to TFM and PK fonts:
+@command{ttf2afm}, @command{ttf2pk}, @command{ttf2tfm}, and
+@command{ttfdump}.")
     (license license:gpl2+)))
 
-(define-public texlive-hyphen-slovenian
+(define-public texlive-twemojis
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-slovenian" "sl"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-sl.tex")
-              (base32
-               "02n8l9yf4hqyhbpsc1n6b2mggy09z6lq4dcb8ndiwawb6h0mp7s4")))
-    (synopsis "Slovenian hyphenation patterns")
-    (description "This package provides hyphenation patterns for Slovenian in
-T1/EC and UTF-8 encodings.")
-    ;; Either license
-    (license (list license:lppl1.0+ license:expat))))
-
-(define-public texlive-hyphen-spanish
-  (package
-    ;; The source files "eshyph-make.lua" and "eshyph.src" are provided to
-    ;; generate obsolete hyphenation patterns, which aren't included in a
-    ;; default TeX Live distribution, so we don't include them either.
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-spanish" "es"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-es.tex")
-              (base32
-               "05lbvjkj304xxghyihk8js0kmg97ddlgijld3bp81bc28h4cav0v")))
-    (synopsis "Hyphenation patterns for Spanish")
-    (description "The package provides hyphenation patterns for Spanish in
-T1/EC and UTF-8 encodings.")
-    (license license:expat)))
+    (name "texlive-twemojis")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/twemojis/"
+                   "source/latex/twemojis/"
+                   "tex/latex/twemojis/")
+             (base32
+              "0wim1325dcx779305cany8rsifi67y8pbwifs4qbh090dzx5sy6r")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/twemojis")
+    (synopsis "Use Twitter's open source emojis through LaTeX commands")
+    (description
+     "This package provides a simple wrapper which allows to use Twitter's
+open source emojis through LaTeX commands.  This relies on images, so no fancy
+Unicode font stuff is needed and it should work on every installation.")
+    (license (list license:lppl1.3+ license:cc-by4.0))))
 
-(define-public texlive-hyphen-swedish
+(define-public texlive-typeoutfileinfo
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-swedish" "sv"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-sv.tex")
-              (base32
-               "1n7incy7n24pix1q2i8c3h7i78zpql5ayhskavlmy6mhd7ayncaw")))
-    (synopsis "Swedish hyphenation patterns")
-    (description "This package provides hyphenation patterns for Swedish in
-T1/EC and UTF-8 encodings.")
-    (license license:lppl1.2+)))
+    (name "texlive-typeoutfileinfo")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/typeoutfileinfo/"
+                   "scripts/typeoutfileinfo/")
+             (base32
+              "19kz79xbr0ri3pbbxv9j2nxdk6vs99nr1ai4xdbjkw2nnx717nxy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "typeoutfileinfo.sh")))
+    (home-page "https://ctan.org/pkg/typeoutfileinfo")
+    (synopsis "Display class/package/file information")
+    (description
+     "The package provides a minimalist shell script, for Unix systems,
+that displays the information content in a @code{\\ProvidesFile},
+@code{\\ProvidesPackage} or @code{\\ProvidesClass} command in a LaTeX source
+file.")
+    (license license:lppl1.3+)))
 
-(define-public texlive-hyphen-thai
+(define-public texlive-tzplot
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-thai" "th"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-th.tex")
-              (base32
-               "00gxcs4jfqifd5cnrjipn77m73fmpw2qms4lp216jj3kz4a7h9kf")))
-    (synopsis "Thai hyphenation patterns")
-    (description "This package provides hyphenation patterns for Thai in LTH
-and UTF-8 encodings.")
-    (license license:lppl1.3+)))
-
-(define-public texlive-hyphen-turkish
-  (let ((template (texlive-hyphen-package
-                   "texlive-hyphen-turkish" "tr"
-                   (list "/tex/generic/hyph-utf8/patterns/tex/hyph-tr.tex")
-                   (base32
-                    "04sihjgpm31i5bi67rrfp15w3imn7hxwwk70v0vhx053ghxy72vh"))))
-    (package
-      (inherit template)
-      (synopsis "Hyphenation patterns for Turkish")
-      (description "The package provides hyphenation patterns for Turkish in
-T1/EC and UTF-8 encodings.  The patterns for Turkish were first produced for
-the Ottoman Texts Project in 1987 and were suitable for both Modern Turkish
-and Ottoman Turkish in Latin script, however the required character set didn't
-fit into EC encoding, so support for Ottoman Turkish had to be dropped to keep
-compatibility with 8-bit engines.")
-      (license license:lppl1.0+))))
-
-(define-public texlive-hyphen-turkmen
-  (let ((template (texlive-hyphen-package
-                   "texlive-hyphen-turkmen" "tk"
-                   (list "/tex/generic/hyph-utf8/patterns/tex/hyph-tk.tex")
-                   (base32
-                    "0g5ip2lw9g47s61mv3cypswc6qm7zy9c4iqq4h19ysvds81adzkr"))))
-    (package
-      (inherit template)
-      (synopsis "Hyphenation patterns for Turkmen")
-      (description "The package provides hyphenation patterns for Turkmen in
-T1/EC and UTF-8 encodings.")
-      (license license:expat))))
+    (name "texlive-tzplot")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tzplot/" "tex/latex/tzplot/")
+             (base32
+              "09k84vjvl3qkp8jffv3j5bksq3jaad2p71yj715z39qf36hwvm7s")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tzplot")
+    (synopsis "Plot graphs with TikZ abbreviations")
+    (description
+     "This is a LaTeX package that provides TikZ-based macros to make it easy
+to draw graphs.  The macros provided in this package are just abbreviations
+for TikZ codes, which can be complicated; but using the package will hopefully
+make drawing easier, especially when drawing repeatedly.  The macros were
+chosen and developed with an emphasis on drawing graphs in economics.")
+    (license license:lppl1.3c)))
 
-(define-public texlive-hyphen-ukrainian
+(define-public texlive-upmendex
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-ukrainian" "uk"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-uk.tex")
-              (base32
-               "0fbfhx1fmbshxr4ihsjaqgx251h69h7i288p8gh3w6ysgxr53p60")))
-    (synopsis "Ukrainian hyphenation patterns")
-    (description "This package provides hyphenation patterns for Ukrainian in
-T2A and UTF-8 encodings.")
-    ;; No version specified
+    (name "texlive-upmendex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/upmendex.1"
+                   "doc/man/man1/upmendex.man1.pdf"
+                   "doc/support/upmendex/")
+             (base32
+              "0mj8nmqr3z7b802kvjmnkckq89l694an7s639yghf3b9b5v7xihx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/upmendex")
+    (synopsis "Multilingual index processor")
+    (description
+     "The package is a multilingual index processor with the following
+features:
+@itemize
+
+@item mostly compatible with @command{makeindex} and upper compatible with
+@command{mendex};
+
+@item supports UTF-8 and works with upLaTeX, XeLaTeX and LuaLaTeX;
+
+@item supports Latin (including non-English), Greek, Cyrillic, Korean Hangul
+and Chinese Han (Hanzi ideographs) scripts, as well as Japanese Kana.
+
+@item supports Devanagari, Thai, Arabic and Hebrew scripts (experimental).
+
+@item supports four kinds of sort orders (Pinyin, Radical-Stroke, Stroke and
+Zhuyin) for Chinese Han scripts (Hanzi ideographs).
+
+@item applies International Components for Unicode (ICU) for sorting process.
+
+@end itemize")
+    (license license:bsd-3)))
+
+(define-public texlive-utfsym
+  (package
+    (name "texlive-utfsym")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/utfsym/" "tex/latex/utfsym/")
+             (base32
+              "0bbdhi9fy3bzm9qrjca8ghl04pv9iky380if17w1hxhp2jpd691b")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/utfsym")
+    (synopsis "Provides various Unicode symbols")
+    (description
+     "This package provides various symbols from the Unicode in order to be
+able to use them originally in a school setting such as on worksheets.")
+    (license license:cc0)))
+
+(define-public texlive-venndiagram
+  (package
+    (name "texlive-venndiagram")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/venndiagram/"
+                   "source/latex/venndiagram/"
+                   "tex/latex/venndiagram/")
+             (base32
+              "1n48jgb0kbbnyk5pjg99l8hb1b3f1h30z78cl9lza2pi11p8mbgj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/venndiagram")
+    (synopsis "Creating Venn diagrams with TikZ")
+    (description
+     "The package assists generation of simple two- and three-set Venn
+diagrams for lectures or assignment sheets.")
     (license license:lppl)))
 
-(define-public texlive-hyphen-uppersorbian
+(define-public texlive-visualpstricks
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-uppersorbian" "hsb"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-hsb.tex")
-              (base32
-               "0x0051wph3sqmzzw6prvjy6bp7gn02rbmys1bmbc210jk3pkylfj")))
-    (synopsis "Upper Sorbian hyphenation patterns")
-    (description "This package provides hyphenation patterns for Upper Sorbian
-in T1/EC and UTF-8 encodings.")
-    (license license:lppl1.3a+)))
+    (name "texlive-visualpstricks")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/visualpstricks/")
+             (base32
+              "1wfri908smlw1ngqq1mjll2b80b29piicqmv67x0xs1v3kc2sz3s")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/visualpstricks")
+    (synopsis "Visual help for PSTricks based on images with minimum text")
+    (description
+     "Visual help for PSTricks based on images with minimum text, one image
+per command or per parameter.")
+    (license license:gpl3+)))
 
-(define-public texlive-hyphen-welsh
+(define-public texlive-web
   (package
-    (inherit (texlive-hyphen-package
-              "texlive-hyphen-welsh" "cy"
-              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-cy.tex")
-              (base32
-               "1bpxp3jiifdw7waw2idz5j9xgi3526nkxm8mbmsspr4mlf2xyr76")))
-    (synopsis "Welsh hyphenation patterns")
-    (description "This package provides hyphenation patterns for Welsh in
-T1/EC and UTF-8 encodings.")
-    ;; Either license
-    (license (list license:lppl1.0+ license:expat))))
-
-(define-public texlive-hyph-utf8
-  (package
-    (inherit (simple-texlive-package
-              "texlive-hyph-utf8"
-              (list "/source/generic/hyph-utf8/"
-                    "/source/luatex/hyph-utf8/"
-                    "/doc/luatex/hyph-utf8/"
-                    "/tex/luatex/hyph-utf8/etex.src"
-                    ;; Used to extract luatex-hyphen.lua
-                    "/tex/latex/base/docstrip.tex"
-
-                    ;; Documentation; we can't use the whole directory because
-                    ;; it includes files from other packages.
-                    "/doc/generic/hyph-utf8/CHANGES"
-                    "/doc/generic/hyph-utf8/HISTORY"
-                    "/doc/generic/hyph-utf8/hyph-utf8.pdf"
-                    "/doc/generic/hyph-utf8/hyph-utf8.tex"
-                    "/doc/generic/hyph-utf8/hyphenation-distribution.pdf"
-                    "/doc/generic/hyph-utf8/hyphenation-distribution.tex"
-                    "/doc/generic/hyph-utf8/img/miktex-languages.png"
-                    "/doc/generic/hyph-utf8/img/texlive-collection.png")
-              (base32
-               "0rgp0zn36gwzqwpmjb9h01ns3m19v3r7lpw1h0pc9bx115w6c9jx")))
+    (name "texlive-web")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/tangle.1"
+                   "doc/man/man1/tangle.man1.pdf"
+                   "doc/man/man1/weave.1"
+                   "doc/man/man1/weave.man1.pdf")
+             (base32
+              "0iiyzzrgwakw7ipdnwmjwcrqayzq4yn4786zlr9zirmmj34hpamz")))
     (outputs '("out" "doc"))
-    (build-system gnu-build-system)
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-kpathsea))
+    (home-page "https://ctan.org/pkg/web")
+    (synopsis "Original literate programming system")
+    (description
+     "The system processes web files in two ways: firstly to rearrange them to
+produce compilable code (using the program @command{tangle}), and secondly to
+produce a TeX source (using the program @command{weave}) that may be typeset
+for comfortable reading.")
+    (license license:knuth)))
+
+(define-public texlive-wheelchart
+  (package
+    (name "texlive-wheelchart")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/wheelchart/"
+                   "tex/latex/wheelchart/")
+             (base32
+              "0p1fw6xxrf7s0k5pvll8iy66wxbvy2bw5372l3lxkbdzjjfxa46j")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/wheelchart")
+    (synopsis "Draw wheelcharts with TikZ")
+    (description
+     "This package is based on the package TikZ and can be used to draw
+wheelcharts with TikZ.  It provides several options to customize the
+wheelcharts.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-worldflags
+  (package
+    (name "texlive-worldflags")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/worldflags/"
+                   "tex/latex/worldflags/")
+             (base32
+              "08biibvfa6fbrq1zsan8yib0cds6azp1ldwqlg5gd9j5r5aaqj5i")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/worldflags")
+    (synopsis "Drawing flags with TikZ")
+    (description
+     "This is a package for drawing flags using TikZ.  Currently the national
+flags of all independent nations are included, along with some other flags of
+various organizations.  A flag can be drawn as a single TikZ-picture within
+ordinary text, and as a picture element within a TikZ-picture.  The appearance
+of a flag (size, frame etc.)  can be adapted using optional parameters.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-xindex
+  (package
+    (name "texlive-xindex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/xindex/" "scripts/xindex/"
+                   "tex/latex/xindex/" "tex/lualatex/xindex/")
+             (base32
+              "1zcfr6vxh49cwpqa594ibmjxs775z08l5pqz36w3013dzh6m3yh1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "xindex.lua")))
+    (home-page "https://ctan.org/pkg/xindex")
+    (synopsis "Unicode compatible index generation")
+    (description
+     "This package provides a Unicode compatible index programm for LaTeX.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-xistercian
+  (package
+    (name "texlive-xistercian")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/xistercian/"
+                   "source/latex/xistercian/"
+                   "tex/latex/xistercian/")
+             (base32
+              "021iwd8w19dbj1iqm1fdf9s06lysbrackz0g897nmsf0fks6qf4r")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xistercian")
+    (synopsis "Cistercian numerals in LaTeX")
+    (description
+     "@code{xistercian} allows you to use Cistercian numerals in LaTeX.
+The glyphs are created using PGF and to a certain degree configurable.  You
+can use Cistercian numerals as page numbers using
+@code{\\pagenumbering@{cistercian@}}.  The two main macros are:
+@code{\\cistercian@{<counter>@}}, which formats the LaTeX2e counter as
+a Cistercian numeral, and @code{\\cisterciannum@{<integer>@}}, formats the
+integer (given as a string) as a Cistercian numeral.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-xpdfopen
+  (package
+    (name "texlive-xpdfopen")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/pdfclose.1"
+                   "doc/man/man1/pdfclose.man1.pdf"
+                   "doc/man/man1/pdfopen.1"
+                   "doc/man/man1/pdfopen.man1.pdf")
+             (base32
+              "130wvaypfrg9sav0pdcdy1g10fll8pqcsqsy70fxlzzr937glsh1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xpdfopen")
+    (synopsis "Commands to control PDF readers, under X11")
+    (description
+     "The command-line programs @command{pdfopen} and @command{pdfclose} allow
+you to control the X Window System version of Adobe's Acrobat Reader from the
+command line or from within a (shell) script.  The programs work with
+@command{xpdf} and @command{evince}.")
+    (license license:public-domain)))
+
+(define-public texlive-xpicture
+  (package
+    (name "texlive-xpicture")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/xpicture/"
+                   "source/latex/xpicture/"
+                   "tex/latex/xpicture/")
+             (base32
+              "0pzqnrk7mw1k9madah2ym9qsy20d8i1x1abkvkxvx7rxw7w38s2p")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xpicture")
+    (synopsis "Extensions of LaTeX picture drawing")
+    (description
+     "The package extends the facilities of the @code{pict2e} and the
+@code{curve2e} packages, providing extra reference frames, conic section
+curves, graphs of elementary functions and other parametric curves.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-amiri
+  (package
+    (name "texlive-amiri")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/amiri/"
+                   "fonts/truetype/public/amiri/")
+             (base32
+              "1d6yrh34fka9371a3vq72df593prik6s7z1i6myd0nix0c9jihp6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/amiri")
+    (synopsis "Classical Arabic typeface, Naskh style")
+    (description
+     "Amiri is a classical Arabic typeface in Naskh style for typesetting books
+and other running text.  It is a revival of the beautiful typeface pioneered
+in the early 20th century by Bulaq Press in Cairo, also known as Amiria Press,
+after which the font is named.  The project aims at the revival of the
+aesthetics and traditions of Arabic typesetting, and adapting it to the era of
+digital typesetting, in a publicly available form.")
+    (license license:silofl1.1)))
+
+(define-public texlive-amsfonts
+  (package
+    (name "texlive-amsfonts")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/amsfonts/"
+                   "fonts/afm/public/amsfonts/cm/"
+                   "fonts/afm/public/amsfonts/cmextra/"
+                   "fonts/afm/public/amsfonts/cyrillic/"
+                   "fonts/afm/public/amsfonts/euler/"
+                   "fonts/afm/public/amsfonts/latxfont/"
+                   "fonts/afm/public/amsfonts/symbols/"
+                   "fonts/map/dvips/amsfonts/"
+                   "fonts/source/public/amsfonts/cmextra/"
+                   "fonts/source/public/amsfonts/cyrillic/"
+                   "fonts/source/public/amsfonts/dummy/"
+                   "fonts/source/public/amsfonts/symbols/"
+                   "fonts/tfm/public/amsfonts/cmextra/"
+                   "fonts/tfm/public/amsfonts/cyrillic/"
+                   "fonts/tfm/public/amsfonts/dummy/"
+                   "fonts/tfm/public/amsfonts/euler/"
+                   "fonts/tfm/public/amsfonts/symbols/"
+                   "fonts/type1/public/amsfonts/cm/"
+                   "fonts/type1/public/amsfonts/cmextra/"
+                   "fonts/type1/public/amsfonts/cyrillic/"
+                   "fonts/type1/public/amsfonts/euler/"
+                   "fonts/type1/public/amsfonts/latxfont/"
+                   "fonts/type1/public/amsfonts/symbols/"
+                   "source/latex/amsfonts/"
+                   "tex/latex/amsfonts/"
+                   "tex/plain/amsfonts/")
+             (base32
+              "0phhzcxapa5607pk37agr981rg90zw2p4rqv7sk7i19byr867a1b")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-cm texlive-metafont))
+    (home-page "https://ctan.org/pkg/amsfonts")
+    (synopsis "TeX fonts from the American Mathematical Society")
+    (description
+     "This package provides an extended set of fonts for use in mathematics,
+including: extra mathematical symbols; blackboard bold letters (uppercase
+only); fraktur letters; subscript sizes of bold math italic and bold Greek
+letters; subscript sizes of large symbols such as sum and product; added sizes
+of the Computer Modern small caps font; cyrillic fonts (from the University of
+Washington); Euler mathematical fonts.  All fonts are provided as Adobe Type
+1 files, and all except the Euler fonts are provided as METAFONT source.  The
+distribution also includes the canonical Type 1 versions of the Computer
+Modern family of fonts.  The Euler fonts are supported by separate packages;
+details can be found in the documentation.")
+    (license license:silofl1.1)))
+
+(define-deprecated-package texlive-fonts-amsfonts texlive-amsfonts)
+(define-deprecated-package texlive-latex-amsfonts texlive-amsfonts)
+
+(define-public texlive-mkpattern
+  (package
+    (name "texlive-mkpattern")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/plain/mkpattern/" "tex/plain/mkpattern/")
+             (base32
+              "0sxnkbcc802jl3fj56x9hvg978bpv15lhrwj0aykb4syq29l47ga")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mkpattern")
+    (synopsis "Utility for making hyphenation patterns")
+    (description
+     "Mkpattern is a general purpose program for the generation of hyphenation
+patterns, with definition of letter sets and template-like constructions.  It
+also provides an easy way to handle different input and output encodings, and
+features generation of clean UTF-8 patterns.")
+    (license license:lppl)))
+
+(define-public texlive-ec
+  (package
+    (name "texlive-ec")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/ec/"
+                   "fonts/source/jknappen/ec/"
+                   "fonts/tfm/jknappen/ec/")
+             (base32
+              "1cyi0vv9dnp45s0ilsrbkyznj9ji62s5bhkqgh49461mv2f8qj6p")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-cm texlive-metafont))
+    (home-page "https://ctan.org/pkg/ec")
+    (synopsis "Computer modern fonts in T1 and TS1 encodings")
+    (description
+     "The EC fonts are European Computer Modern Fonts, supporting the complete
+LaTeX T1 encoding defined at the 1990 TUG conference hold at Cork/Ireland.
+These fonts are intended to be stable with no changes being made to the tfm
+files.  The set also contains a Text Companion Symbol font, called @code{tc},
+featuring many useful characters needed in text typesetting, for example
+oldstyle digits, currency symbols (including the newly created Euro symbol),
+the permille sign, copyright, trade mark and servicemark as well as a copyleft
+sign, and many others.  The fonts are available in (traced) Adobe Type
+1 format, as part of the @code{cm-super} bundle.  The other Computer
+Modern-style T1-encoded Type 1 set, Latin Modern, is not actually a direct
+development of the EC set, and differs from the EC in a number of
+particulars.")
+    (license (license:fsf-free "https://www.tug.org/svn/texlive/tags/\
+texlive-2019.3/Master/texmf-dist/doc/fonts/ec/copyrite.txt"))))
+
+(define-deprecated-package texlive-fonts-ec texlive-ec)
+
+;; This provides etex.src which is needed to build various formats, including
+;; luatex.fmt and pdflatex.fmt
+(define-public texlive-etex
+  (package
+    (name "texlive-etex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/etex/base/"
+                   "doc/man/man1/etex.1"
+                   "doc/man/man1/etex.man1.pdf"
+                   "fonts/source/public/etex/"
+                   "fonts/tfm/public/etex/"
+                   "tex/plain/etex/")
+             (base32
+              "1q48645qgjcl2jmpd0x0ip5wwdan54y9vx06zyvpp51wia30sacy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
+    (native-inputs (list texlive-cm texlive-metafont))
+    (home-page "https://www.ctan.org/pkg/etex")
+    (synopsis "Extended version of TeX")
+    (description
+     "This package provides an extended version of TeX (which is capable of
+running as if it were TeX unmodified).  E-TeX has been specified by the LaTeX
+team as the engine for the development of LaTeX2e; as a result, LaTeX
+programmers may assume e-TeX functionality.  The pdftex engine directly
+incorporates the e-TeX extensions.")
+    (license license:knuth)))
+
+(define-public texlive-etex-pkg
+  (package
+    (name "texlive-etex-pkg")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/etex-pkg/" "tex/latex/etex-pkg/")
+             (base32
+              "10bvvn3s3lmzjscnb2qxkj1ba9qxx0q1w2spcsjpwf20dvym19py")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/etex-pkg")
+    (synopsis "E-TeX support package")
+    (description
+     "The package provides support for LaTeX documents to use many of the
+extensions offered by e-TeX; in particular, it modifies LaTeX's register
+allocation macros to make use of the extended register range.  The
+@code{etextools} package provides macros that make more sophisticated use of
+e-TeX's facilities.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-eulervm
+  (package
+    (name "texlive-eulervm")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/eulervm/"
+                   "fonts/tfm/public/eulervm/"
+                   "fonts/vf/public/eulervm/"
+                   "source/latex/eulervm/" "tex/latex/eulervm/")
+             (base32
+              "118yidwnqw4acap2wdykcdx2cxp8q2ganz67ls6rkg6fid325mkq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/eulervm")
+    (synopsis "Euler virtual math fonts")
+    (description
+     "The Euler fonts are suitable for typsetting mathematics in conjunction
+with a variety of text fonts that do not provide mathematical character sets
+of their own.  Euler-VM is a set of virtual mathematics fonts based on Euler
+and CM. This approach has several advantages over immediately using the real
+Euler fonts. Most noticeably, less TeX resources are consumed, the quality of
+various math symbols is improved and a usable @code{\\hslash} symbol can be
+provided.  The virtual fonts are accompanied by a LaTeX package which makes
+them easy to use, particularly in conjunction with Type1 PostScript text
+fonts.  They are compatible with @code{amsmath}.  A package option allows the
+fonts to be loaded at 95% of their nominal size, thus blending better with
+certain text fonts, e.g., Minion.")
+    (license license:lppl)))
+
+(define-public texlive-plain
+  (package
+    (name "texlive-plain")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "makeindex/plain/" "tex/plain/base/"
+                   "tex/plain/config/")
+             (base32
+              "0zwvrfw8z28c9dy8nby5qfwbyrd2a0cdfwyd5jndscjczhw0yi62")))
+    (build-system texlive-build-system)
     (arguments
-     `(#:tests? #f ; there are none
-       #:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (ice-9 match))
-       #:make-flags
-       (list "-C" "source/luatex/hyph-utf8/"
-             (string-append "DO_TEX = tex --interaction=nonstopmode '&tex' $<")
-             (string-append "RUNDIR =" (assoc-ref %outputs "out") "/share/texmf-dist/tex/luatex/hyph-utf8/")
-             (string-append "DOCDIR =" (assoc-ref %outputs "doc") "/share/texmf-dist/doc/luatex/hyph-utf8/")
-             ;; hyphen.cfg is neither included nor generated, so let's only build the lua file.
-             (string-append "UNPACKED = $(NAME).lua"))
-       #:phases
-       (modify-phases %standard-phases
-         ;; TeX isn't usable at this point, so we first need to generate the
-         ;; tex.fmt.
-         (replace 'configure
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             ;; Target directories must exist.
-             (mkdir-p (string-append (assoc-ref %outputs "out")
-                                     "/share/texmf-dist/tex/luatex/hyph-utf8/"))
-             (mkdir-p (string-append (assoc-ref %outputs "doc")
-                                     "/share/texmf-dist/doc/luatex/hyph-utf8/"))
-
-             ;; We cannot build the documentation because that requires a
-             ;; fully functional pdflatex, which depends on this package.
-             (substitute* "source/luatex/hyph-utf8/Makefile"
-               (("all: .*") "all: $(RUNFILES)\n"))
-
-             ;; Find required fonts for building tex.fmt
-             (setenv "TFMFONTS"
-                     (string-append (assoc-ref inputs "texlive-cm")
-                                    "/share/texmf-dist/fonts/tfm/public/cm:"
-                                    (assoc-ref inputs "texlive-knuth-lib")
-                                    "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
-             ;; ...and find all tex files in this environment.
-             (setenv "TEXINPUTS"
-                     (string-append
-                      (getcwd) ":"
-                      (string-join
-                       (map (match-lambda ((_ . dir) dir)) inputs)
-                       "//:")))
-
-             ;; Generate tex.fmt.
-             (let ((where "source/luatex/hyph-utf8"))
-               (mkdir-p where)
-               (with-directory-excursion where
-                 (invoke "tex" "-ini"
-                         (string-append (assoc-ref inputs "texlive-tex-plain")
-                                        "/share/texmf-dist/tex/plain/config/tex.ini"))))))
-         (add-before 'build 'build-loaders-and-converters
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((root (string-append (assoc-ref outputs "out")
-                                         "/share/texmf-dist"))
-                    (conv
-                     (string-append root
-                                    "/tex/generic/hyph-utf8/conversions")))
-
-               ;; Build converters
-               (mkdir-p conv)
-               (with-directory-excursion "source/generic/hyph-utf8"
-                 (substitute* "generate-converters.rb"
-                   (("\\$path_root=File.*")
-                    (string-append "$path_root=\"" root "\"\n"))
-                   ;; Avoid error with newer Ruby.
-                   (("#1\\{%") "#1{%%"))
-                 (invoke "ruby" "generate-converters.rb"))
-               #t)))
-         (replace 'install
-           (lambda* (#:key source outputs #:allow-other-keys)
-             (let ((doc (assoc-ref outputs "doc"))
-                   (out (assoc-ref outputs "out")))
-               (mkdir-p doc)
-               (copy-recursively
-                (string-append source "/doc")
-                (string-append doc "/doc"))
-               (install-file
-                (string-append source "/tex/luatex/hyph-utf8/etex.src")
-                (string-append out "/share/texmf-dist/tex/luatex/hyph-utf8/")))
-             #t)))))
-    (native-inputs
-     (list ruby-2.7
-           texlive-bin
-           ;; The following packages are needed for build "tex.fmt", which we need
-           ;; for a working "tex".
-           texlive-tex-plain
-           texlive-cm
-           texlive-knuth-lib
-           texlive-hyphen-base))
-    (home-page "https://ctan.org/pkg/hyph-utf8")
-    (synopsis "Hyphenation patterns expressed in UTF-8")
-    (description "Modern native UTF-8 engines such as XeTeX and LuaTeX need
-hyphenation patterns in UTF-8 format, whereas older systems require
-hyphenation patterns in the 8-bit encoding of the font in use (such encodings
-are codified in the LaTeX scheme with names like OT1, T2A, TS1, OML, LY1,
-etc).  The present package offers a collection of conversions of existing
-patterns to UTF-8 format, together with converters for use with 8-bit fonts in
-older systems.  Since hyphenation patterns for Knuthian-style TeX systems are
-only read at iniTeX time, it is hoped that the UTF-8 patterns, with their
-converters, will completely supplant the older patterns.")
-    ;; Individual files each have their own license.  Most of these files are
-    ;; independent hyphenation patterns.
-    (license (list license:lppl1.0+
-                   license:lppl1.2+
-                   license:lppl1.3
-                   license:lppl1.3+
-                   license:lppl1.3a+
-                   license:lgpl2.1
-                   license:lgpl2.1+
-                   license:lgpl3+
-                   license:gpl2+
-                   license:gpl3+
-                   license:mpl1.1
-                   license:asl2.0
-                   license:expat
-                   license:bsd-3
-                   license:cc0
-                   license:public-domain
-                   license:wtfpl2))))
-
-(define-deprecated-package texlive-generic-hyph-utf8 texlive-hyph-utf8)
-
-(define-public texlive-dehyph-exptl
-  (package
-    (inherit (simple-texlive-package
-              "texlive-dehyph-exptl"
-              (list "/tex/generic/dehyph-exptl/"
-                    "/doc/generic/dehyph-exptl/")
-              (base32
-               "0l57a0r4gycp94kz6lrxqvh9m57j2shmbr2laf5zjb0qnrisq46d")
-              #:trivial? #t))
-    (propagated-inputs
-     (list texlive-hyphen-base texlive-hyph-utf8))
-    (home-page "http://projekte.dante.de/Trennmuster/WebHome")
-    (synopsis "Hyphenation patterns for German")
-    (description "The package provides experimental hyphenation patterns for
-the German language, covering both traditional and reformed orthography.  The
-patterns can be used with packages Babel and hyphsubst from the Oberdiek
-bundle.")
-    ;; Hyphenation patterns are under the Expat license; documentation is
-    ;; under LPPL.
-    (license (list license:expat license:lppl))))
+     (list
+      #:tex-engine "tex"
+      #:tex-format #f
+      #:texlive-latex-bin? #f))
+    (home-page "https://ctan.org/pkg/plain")
+    (synopsis "Plain TeX format and supporting files")
+    (description
+     "This package contains files used to build the Plain TeX format, as
+described in the TeXbook, together with various supporting files (some also
+discussed in the book).")
+    (license license:knuth)))
 
-(define-deprecated-package texlive-generic-dehyph-exptl texlive-dehyph-exptl)
+(define-deprecated-package texlive-tex-plain texlive-plain)
 
-(define-public texlive-ukrhyph
+(define-public texlive-pxfonts
   (package
-    (inherit (simple-texlive-package
-              "texlive-ukrhyph"
-              (list "/doc/generic/ukrhyph/"
-                    "/tex/generic/ukrhyph/")
-              (base32
-               "01ma274sixcrbpb7fpqkxwfvrnzfj2srv9b4a42rfnph1pdql74z")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/ukrhyph")
-    (synopsis "Hyphenation patterns for Ukrainian")
-    (description "The package provides a range of hyphenation patterns for
-Ukrainian, depending on the encoding of the output font including the standard
-T2A.")
-    (license license:lppl)))
-
-(define-public texlive-ruhyphen
-  (let ((template (simple-texlive-package
-                   "texlive-ruhyphen"
-                   (list "/source/generic/ruhyphen/"
-                         "/tex/generic/ruhyphen/")
-                   (base32
-                    "18n1bqhh8jv765vz3a3fjwffy7m71vhwx9yq8zl0p5j7p72q9qcn")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (replace 'build
-               (lambda _
-                 (let ((cwd (getcwd)))
-                   ;; Remove generated files.
-                   (for-each delete-file
-                             (find-files "tex/generic/ruhyphen/"
-                                         "^cyry.*.tex$"))
-                   (substitute* "source/generic/ruhyphen/Makefile"
-                     (("./mkcyryo") (string-append cwd "/source/generic/ruhyphen/mkcyryo")))
-                   (with-directory-excursion "tex/generic/ruhyphen"
-                     (invoke "make" "-f"
-                             (string-append cwd "/source/generic/ruhyphen/Makefile"))))))))))
-      (native-inputs
-       (list coreutils gawk sed grep perl))
-      (home-page "https://www.ctan.org/pkg/ruhyphen")
-      (synopsis "Hyphenation patterns for Russian")
-      (description "The package provides a collection of Russian hyphenation
-patterns supporting a number of Cyrillic font encodings, including T2,
-UCY (Omega Unicode Cyrillic), LCY, LWN (OT2), and koi8-r.")
-      (license license:lppl))))
+    (name "texlive-pxfonts")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/pxfonts/"
+                   "fonts/afm/public/pxfonts/"
+                   "fonts/map/dvips/pxfonts/"
+                   "fonts/tfm/public/pxfonts/"
+                   "fonts/type1/public/pxfonts/"
+                   "fonts/vf/public/pxfonts/"
+                   "tex/latex/pxfonts/")
+             (base32
+              "0z2ls46x2l79saq4l1d2cqwazhpg79b9hqsf90wzx70676mxcwac")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pxfonts")
+    (synopsis "Palatino-like fonts in support of mathematics")
+    (description
+     "Pxfonts supplies virtual text roman fonts using Adobe Palatino (or
+URWPalladioL) with some modified and additional text symbols in the OT1, T1,
+and TS1 encodings; maths alphabets using Palatino/Palladio; maths fonts
+providing all the symbols of the Computer Modern and AMS fonts, including all
+the Greek capital letters from CMR; and additional maths fonts of various
+other symbols.  The set is complemented by a sans-serif set of text fonts,
+based on Helvetica/NimbusSanL, and a monospace set derived from the parallel
+TX font set.  All the fonts are in Type 1 format (AFM and PFB files), and are
+supported by TeX metrics (VF and TFM files) and macros for use with LaTeX.")
+    (license license:gpl3+)))
+
+(define-public texlive-halloweenmath
+  (package
+    (name "texlive-halloweenmath")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/halloweenmath/"
+                   "source/latex/halloweenmath/"
+                   "tex/latex/halloweenmath/")
+             (base32
+              "1xq72k1p820b5q3haxf936g69p6gv34hr30870l96jnxa3ad7y05")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'non-interactive-build
+            ;; When it realizes it cannot employ the usedir directive, the
+            ;; build process stops and waits for an input before inserting
+            ;; generated files in the working directory.  Do not ask for an
+            ;; input.
+            (lambda _
+              (substitute* "source/latex/halloweenmath/halloweenmath.ins"
+                (("\\Ask.*") "")
+                (("\\(your .*? will be ignored\\).*") "")))))))
+    (native-inputs (list texlive-cm))
+    (home-page "https://ctan.org/pkg/halloweenmath")
+    (synopsis "Scary and creepy math symbols with AMS-LaTeX integration")
+    (description
+     "The package defines a handful of commands for typesetting mathematical
+symbols of various kinds, ranging from large operators to extensible
+arrow-like relations and growing arrow-like math accents that all draw from
+the classic Halloween-related iconography (pumpkins, witches, ghosts, cats,
+and so on) while being, at the same time, seamlessly integrated within the
+rest of the mathematics produced by (AmS-)LaTeX.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-hardwrap
+  (package
+    (name "texlive-hardwrap")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/hardwrap/" "source/latex/hardwrap/"
+                   "tex/latex/hardwrap/")
+             (base32
+              "0ql3xml1ccll44q945n7w72p6d51y5wcrkawi7cg621gy5d6wzx5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/hardwrap")
+    (synopsis "Hard wrap text to a certain character length")
+    (description
+     "The package facilitates wrapping text to a specific character width,
+breaking lines by words rather than, as done by TeX, by characters.  The
+primary use for these facilities is to aid the generation of messages sent to
+the log file or console output to display messages to the user.  Package
+authors may also find this useful when writing out arbitrary text to an
+external file.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-hatching
+  (package
+    (name "texlive-hatching")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/hatching/"
+                   "metapost/hatching/")
+             (base32
+              "1rkxx57rpzk8i0msbyrzcgmbvmjjrg295qg508w3v3dsy0f0krjj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/hatching")
+    (synopsis "MetaPost macros for hatching interior of closed paths")
+    (description
+     "The file @file{hatching}.mp contains a set of MetaPost macros for
+hatching interior of closed paths.")
+    (license license:public-domain)))
+
+(define-public texlive-helvetic
+  (package
+    (name "texlive-helvetic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "dvips/helvetic/"
+                   "fonts/afm/adobe/helvetic/"
+                   "fonts/afm/urw/helvetic/"
+                   "fonts/map/dvips/helvetic/"
+                   "fonts/tfm/adobe/helvetic/"
+                   "fonts/tfm/monotype/helvetic/"
+                   "fonts/tfm/urw35vf/helvetic/"
+                   "fonts/type1/urw/helvetic/"
+                   "fonts/vf/adobe/helvetic/"
+                   "fonts/vf/monotype/helvetic/"
+                   "fonts/vf/urw35vf/helvetic/"
+                   "tex/latex/helvetic/")
+             (base32
+              "0c3f1ly7y6404z0akbfbbfql13sz717v0n0g69qjpr69hi4n0nsl")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/urw-base35")
+    (synopsis "Replacement for Adobe's Helvetica font")
+    (description
+     "This package provides a drop-in replacement for the Helvetica font from
+Adobe's basic set.")
+    ;; No license version specified.
+    (license license:gpl3+)))
 
 (define-public texlive-inputenx
   (package
-    (inherit (simple-texlive-package
-              "texlive-inputenx"
-              (list "doc/latex/inputenx/"
-                    "tex/latex/inputenx/"
-                    "source/latex/inputenx/")
-              (base32
-               "0snjndrcynm4w8m9iq8gmadzhrbwvsdy4y1ak24ia0hpsicdi4aj")
-              #:trivial? #t))
-    (home-page "https://ctan.org/macros/latex/contrib/inputenx")
+    (name "texlive-inputenx")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/inputenx/" "source/latex/inputenx/"
+                   "tex/latex/inputenx/")
+             (base32
+              "0snjndrcynm4w8m9iq8gmadzhrbwvsdy4y1ak24ia0hpsicdi4aj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/inputenx")
     (synopsis "Enhanced input encoding handling")
     (description
-     "This package deals with input encodings.  It provides a wider range of input
-encodings using standard mappings, than does inputenc.  It also covers nearly all
-slots.  In this way, it serves as more up to date replacement for the inputenc
-package.")
+     "This package deals with input encodings.  It provides a wider range of
+input encodings using standard mappings, than does @code{inputenc}.  It also
+covers nearly all slots.  In this way, it serves as more up to date
+replacement for the @code{inputenc} package.")
     (license license:lppl1.3+)))
 
 (define-public texlive-kpathsea
-  (let ((template (simple-texlive-package
-                   "texlive-kpathsea"
-                   (list "/web2c/amiga-pl.tcx"
-                         "/web2c/cp1250cs.tcx"
-                         "/web2c/cp1250pl.tcx"
-                         "/web2c/cp1250t1.tcx"
-                         "/web2c/cp227.tcx"
-                         "/web2c/cp852-cs.tcx"
-                         "/web2c/cp852-pl.tcx"
-                         "/web2c/cp8bit.tcx"
-                         "/web2c/empty.tcx"
-                         "/web2c/fmtutil.cnf"
-                         "/web2c/il1-t1.tcx"
-                         "/web2c/il2-cs.tcx"
-                         "/web2c/il2-pl.tcx"
-                         "/web2c/il2-t1.tcx"
-                         "/web2c/kam-cs.tcx"
-                         "/web2c/kam-t1.tcx"
-                         "/web2c/macce-pl.tcx"
-                         "/web2c/macce-t1.tcx"
-                         "/web2c/maz-pl.tcx"
-                         "/web2c/mktex.cnf"
-                         "/web2c/mktex.opt"
-                         "/web2c/mktexdir"
-                         "/web2c/mktexdir.opt"
-                         "/web2c/mktexnam"
-                         "/web2c/mktexnam.opt"
-                         "/web2c/mktexupd"
-                         "/web2c/natural.tcx"
-                         "/web2c/tcvn-t5.tcx"
-                         "/web2c/viscii-t5.tcx")
-                   (base32
-                    "08nfk5hicqbvnz73rjbxi97lcakd9i1k2cy4qi2cwghan92650jq")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:phases phases '%standard-phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'patch-references
-               (lambda* (#:key inputs #:allow-other-keys)
-                 (let ((dirs (map dirname (list (which "sed")
-                                                (which "awk")))))
-                   (substitute* '("web2c/mktexdir"
-                                  "web2c/mktexnam"
-                                  "web2c/mktexupd")
-                     (("^version=" m)
-                      (format #false "PATH=\"~{~a:~}$PATH\"; export PATH~%~a"
-                              dirs m))))))))))
-      (inputs
-       (list sed gawk))
-      (home-page "https://www.tug.org/texlive/")
-      (synopsis "Files related to the path searching library for TeX")
-      (description "Kpathsea is a library and utility programs which provide
-path searching facilities for TeX file types, including the self-locating
-feature required for movable installations, layered on top of a general search
-mechanism.  This package provides supporting files.")
-      (license license:lgpl3+))))
+  (package
+    (name "texlive-kpathsea")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/info/dir"
+                   "doc/info/kpathsea.info"
+                   "doc/info/tds.info"
+                   "doc/info/web2c.info"
+                   "doc/kpathsea/"
+                   "doc/man/man1/kpseaccess.1"
+                   "doc/man/man1/kpseaccess.man1.pdf"
+                   "doc/man/man1/kpsereadlink.1"
+                   "doc/man/man1/kpsereadlink.man1.pdf"
+                   "doc/man/man1/kpsestat.1"
+                   "doc/man/man1/kpsestat.man1.pdf"
+                   "doc/man/man1/kpsewhich.1"
+                   "doc/man/man1/kpsewhich.man1.pdf"
+                   "doc/web2c/web2c.html"
+                   "doc/web2c/web2c.pdf"
+                   "web2c/amiga-pl.tcx"
+                   "web2c/cp1250cs.tcx"
+                   "web2c/cp1250pl.tcx"
+                   "web2c/cp1250t1.tcx"
+                   "web2c/cp227.tcx"
+                   "web2c/cp852-cs.tcx"
+                   "web2c/cp852-pl.tcx"
+                   "web2c/cp8bit.tcx"
+                   "web2c/empty.tcx"
+                   "web2c/fmtutil.cnf"
+                   "web2c/il1-t1.tcx"
+                   "web2c/il2-cs.tcx"
+                   "web2c/il2-pl.tcx"
+                   "web2c/il2-t1.tcx"
+                   "web2c/kam-cs.tcx"
+                   "web2c/kam-t1.tcx"
+                   "web2c/macce-pl.tcx"
+                   "web2c/macce-t1.tcx"
+                   "web2c/maz-pl.tcx"
+                   "web2c/mktex.cnf"
+                   "web2c/mktex.opt"
+                   "web2c/mktexdir"
+                   "web2c/mktexdir.opt"
+                   "web2c/mktexnam"
+                   "web2c/mktexnam.opt"
+                   "web2c/mktexupd"
+                   "web2c/natural.tcx"
+                   "web2c/tcvn-t5.tcx"
+                   "web2c/texmf.cnf"
+                   "web2c/viscii-t5.tcx")
+             (base32
+              "104kn06vmk7ljpz3sjnsr7r69p0i6nwad2v8gimdl2f38a53s5n3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:texlive-latex-bin? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-references
+            (lambda _
+              (let ((dirs (map dirname (list (which "sed")
+                                             (which "awk")))))
+                (substitute* '("web2c/mktexdir"
+                               "web2c/mktexnam"
+                               "web2c/mktexupd")
+                  (("^version=" m)
+                   (format #false "PATH=\"~{~a:~}$PATH\"; export PATH~%~a"
+                           dirs m)))))))))
+    (inputs (list sed gawk))
+    (home-page "https://ctan.org/pkg/kpathsea")
+    (synopsis "Files related to the path searching library for TeX")
+    (description
+     "Kpathsea is a library and utility programs which provide path searching
+facilities for TeX file types, including the self-locating feature required
+for movable installations, layered on top of a general search mechanism.  This
+package provides supporting files.")
+    (license license:lgpl3+)))
 
 (define-public texlive-kpfonts
   (package
-    (inherit (simple-texlive-package
-              "texlive-kpfonts"
-              (list "doc/fonts/kpfonts/"
-                    "fonts/enc/dvips/kpfonts/"
-                    "fonts/map/dvips/kpfonts/"
-                    "fonts/tfm/public/kpfonts/"
-                    "fonts/type1/public/kpfonts/"
-                    "fonts/vf/public/kpfonts/"
-                    "source/fonts/kpfonts/"
-                    "tex/latex/kpfonts/")
-              (base32 "0inai1p9bbjd5x790nsamakjaj0imvwv21mp9f98dwvdlj58vkqb")
-              #:trivial? #t))
-    (home-page "https://ctan.org/fonts/kpfonts")
+    (name "texlive-kpfonts")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/kpfonts/"
+                   "fonts/afm/public/kpfonts/"
+                   "fonts/enc/dvips/kpfonts/"
+                   "fonts/map/dvips/kpfonts/"
+                   "fonts/tfm/public/kpfonts/"
+                   "fonts/type1/public/kpfonts/"
+                   "fonts/vf/public/kpfonts/"
+                   "tex/latex/kpfonts/")
+             (base32
+              "0m5waxqrkm1i59i9vbn9ai9zjn7cl0f36iccwn2d73lhrqhbn16q")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/kpfonts")
     (synopsis "Complete set of fonts for text and mathematics")
     (description
      "The family contains text fonts in roman, sans-serif and monospaced
@@ -2989,424 +11345,375 @@ default and narrow versions of multiple integrals.")
 
 (define-public texlive-latexconfig
   (package
-    (inherit (simple-texlive-package
-              "texlive-latexconfig"
-              (list "/tex/latex/latexconfig/")
-              (base32
-               "1x5fyr2185nx3qlyariykdz44hcy5azimrk9db2p707dg08bjhsd")
-              #:trivial? #t))
-    (home-page "https://www.tug.org/")
+    (name "texlive-latexconfig")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/latex/latexconfig/")
+             (base32
+              "1x5fyr2185nx3qlyariykdz44hcy5azimrk9db2p707dg08bjhsd")))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
+    (home-page "https://ctan.org/pkg/latexconfig")
     (synopsis "Configuration files for LaTeX-related formats")
     (description "The package provides configuration files for LaTeX-related
 formats.")
     (license license:lppl)))
 
-(define-public texlive-latex-base
-  (let ((template (simple-texlive-package
-                   "texlive-latex-base"
-                   (list "/doc/latex/base/"
-                         "/source/latex/base/"
-                         ;; Almost all files in /tex/latex/base are generated, but
-                         ;; these are not:
-                         "/tex/latex/base/idx.tex"
-                         "/tex/latex/base/lablst.tex"
-                         "/tex/latex/base/ltnews.cls"
-                         "/tex/latex/base/ltxcheck.tex"
-                         "/tex/latex/base/ltxguide.cls"
-                         "/tex/latex/base/minimal.cls"
-                         "/tex/latex/base/sample2e.tex"
-                         "/tex/latex/base/small2e.tex"
-                         "/tex/latex/base/testpage.tex"
-                         "/tex/latex/base/texsys.cfg")
-                   (base32
-                    "0msyjz0937rc7hs77v6la152sdiwd73qj41z1mlyh0m3dns9qz4g")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:modules modules '())
-          '((guix build gnu-build-system)
-            (guix build utils)
-            (ice-9 match)
-            (srfi srfi-26)))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             ;; The literal tab in the dtx file is translated to the string
-             ;; "^^I" in the generated Lua file, which causes a syntax error.
-             (add-after 'unpack 'fix-lua-sources
-               (lambda _
-                 (substitute* "source/latex/base/ltluatex.dtx"
-                   (("	") "  "))))
-             (replace 'build
-               (lambda* (#:key inputs #:allow-other-keys)
-                 ;; Find required fonts
-                 (setenv "TFMFONTS"
-                         (string-join
-                          (map (match-lambda
-                                 ((pkg-name . dir)
-                                  (string-append
-                                   (assoc-ref inputs pkg-name)
-                                   "/share/texmf-dist/fonts/tfm/public"
-                                   dir)))
-                               '(("texlive-etex" . "/etex")
-                                 ("texlive-cm" . "/cm")
-                                 ("texlive-fonts-latex" . "/latex-fonts")
-                                 ("texlive-knuth-lib" . "/knuth-lib")))
-                          ":"))
-                 (let ((cwd (getcwd)))
-                   (setenv "TEXINPUTS"
-                           (string-append
-                            cwd "//:"
-                            cwd "/source/latex/base//:"
-                            cwd "/build:"
-                            (string-join
-                             (map (match-lambda ((_ . dir) dir)) inputs)
-                             "//:")))
-                   (setenv "LUAINPUTS" (string-append cwd "/build:")))
-
-                 ;; This is the actual build step.
-                 (mkdir "build")
-                 (invoke "tex" "-ini" "-interaction=scrollmode"
-                         "-output-directory=build" "unpack.ins")
-
-                 ;; XXX: We can't build all formats at this point, nor are they
-                 ;; part of the LaTeX base, so we disable them.  Actually, we
-                 ;; should be running this all in a profile hook, so that only
-                 ;; selected formats and hyphenation patterns are included, but it
-                 ;; takes long and TeX Live isn't designed to be modular like
-                 ;; that.  Everything operates on a shared directory, which we
-                 ;; would only have at profile generation time.
-                 (let ((disabled-formats
-                        '("aleph aleph" "lamed aleph" "uptex uptex" "euptex euptex"
-                          "eptex eptex" "ptex ptex" "pdfxmltex pdftex" "platex eptex"
-                          "platex-dev eptex" "uplatex-dev euptex"
-                          "csplain pdftex" "mf mf-nowin" "mex pdftex" "pdfmex pdftex"
-                          "luacsplain luatex" "optex luatex"
-                          ;; LuaJIT is not ported to powerpc64le* or riscv64 yet and
-                          ;; building these fail on powerpc.
-                          ,@(if (or (target-powerpc?)
-                                    (target-riscv64?))
-                              '("luajittex" "luajithbtex" "mfluajit") '())
-                          "cont-en xetex" "cont-en pdftex" "pdfcsplain xetex"
-                          "pdfcsplain pdftex" "pdfcsplain luatex" "cslatex pdftex"
-                          "mptopdf pdftex" "uplatex euptex" "jadetex pdftex"
-                          "amstex pdftex" "pdfcslatex pdftex" "lollipop tex"
-                          "xmltex pdftex" "pdfjadetex pdftex" "eplain pdftex"
-                          "texsis pdftex" "mltex pdftex" "utf8mex pdftex")))
-                   (mkdir "web2c")
-                   (install-file (string-append
-                                  (assoc-ref inputs "texlive-kpathsea")
-                                  "/share/texmf-dist/web2c/fmtutil.cnf")
-                                 "web2c")
-                   (make-file-writable "web2c/fmtutil.cnf")
-                   (substitute* "web2c/fmtutil.cnf"
-                     (((string-append "^(" (string-join disabled-formats "|") ")") m)
-                      (string-append "#! " m))
-                     (("translate-file=cp227")
-                      (format #f "translate-file=~a/share/texmf-dist/web2c/cp227"
-                              (assoc-ref inputs "texlive-kpathsea")))))
-                 (invoke "fmtutil-sys" "--all"
-                         "--fmtdir=web2c"
-                         (string-append "--cnffile=web2c/fmtutil.cnf"))
-                 ;; We don't actually want to install it.
-                 (delete-file "web2c/fmtutil.cnf")))
-             (add-after 'install 'install-more
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (let* ((out (assoc-ref outputs "out"))
-                        (root (string-append out "/share/texmf-dist"))
-                        (target (string-append root "/tex/latex/base"))
-                        (web2c (string-append root "/web2c"))
-                        (makeindex (string-append root "/makeindex/latex")))
-                   (for-each delete-file (find-files "." "\\.(log|aux)$"))
-
-                   ;; The usedir directive in docstrip.ins is ignored, so these
-                   ;; two files end up in the wrong place.  Move them.
-                   (mkdir-p makeindex)
-                   (for-each (lambda (file)
-                               (install-file file makeindex)
-                               (delete-file file))
-                             '("build/gglo.ist"
-                               "build/gind.ist"))
-                   (for-each (cut install-file <> target)
-                             (find-files "build" ".*"))
-                   (for-each (cut install-file <> web2c)
-                             (find-files "web2c" ".*")))))))))
-      (native-inputs
-       `(("texlive-bin" ,texlive-bin)
-         ("texlive-tex-ini-files" ,texlive-tex-ini-files)
-         ("texlive-tex-plain" ,texlive-tex-plain)
-         ("texlive-kpathsea" ,texlive-kpathsea)
-         ("texlive-cm" ,texlive-cm)
-         ("texlive-fonts-latex" ,texlive-fonts-latex)
-         ("texlive-knuth-lib" ,texlive-knuth-lib)
-         ("texlive-luatexconfig"
-          ,(texlive-origin
-            "texlive-luatexconfig" (number->string %texlive-revision)
-            (list "/tex/generic/config/luatex-unicode-letters.tex"
-                  "/tex/generic/config/luatexiniconfig.tex"
-                  "/web2c/texmfcnf.lua")
-            (base32
-             "065j47i2785nbj2507pzxlscyrwr4ghv6nksc3a01rp62bq8kkjp")))))
-      (propagated-inputs
-       (list texlive-dehyph-exptl
-             texlive-etex
-             texlive-hyph-utf8
-             texlive-hyphen-base
-             texlive-hyphen-afrikaans
-             texlive-hyphen-ancientgreek
-             texlive-hyphen-armenian
-             texlive-hyphen-basque
-             texlive-hyphen-belarusian
-             texlive-hyphen-bulgarian
-             texlive-hyphen-catalan
-             texlive-hyphen-chinese
-             texlive-hyphen-churchslavonic
-             texlive-hyphen-coptic
-             texlive-hyphen-croatian
-             texlive-hyphen-czech
-             texlive-hyphen-danish
-             texlive-hyphen-dutch
-             texlive-hyphen-english
-             texlive-hyphen-esperanto
-             texlive-hyphen-estonian
-             texlive-hyphen-ethiopic
-             texlive-hyphen-finnish
-             texlive-hyphen-schoolfinnish
-             texlive-hyphen-french
-             texlive-hyphen-friulan
-             texlive-hyphen-galician
-             texlive-hyphen-georgian
-             texlive-hyphen-german
-             texlive-hyphen-greek
-             texlive-hyphen-hungarian
-             texlive-hyphen-icelandic
-             texlive-hyphen-indic
-             texlive-hyphen-indonesian
-             texlive-hyphen-interlingua
-             texlive-hyphen-irish
-             texlive-hyphen-italian
-             texlive-hyphen-kurmanji
-             texlive-hyphen-latin
-             texlive-hyphen-latvian
-             texlive-hyphen-lithuanian
-             texlive-hyphen-macedonian
-             texlive-hyphen-mongolian
-             texlive-hyphen-norwegian
-             texlive-hyphen-occitan
-             texlive-hyphen-pali
-             texlive-hyphen-piedmontese
-             texlive-hyphen-polish
-             texlive-hyphen-portuguese
-             texlive-hyphen-romanian
-             texlive-hyphen-romansh
-             texlive-hyphen-russian
-             texlive-hyphen-sanskrit
-             texlive-hyphen-serbian
-             texlive-hyphen-slovak
-             texlive-hyphen-slovenian
-             texlive-hyphen-spanish
-             texlive-hyphen-swedish
-             texlive-hyphen-thai
-             texlive-hyphen-turkish
-             texlive-hyphen-turkmen
-             texlive-hyphen-ukrainian
-             texlive-hyphen-uppersorbian
-             texlive-hyphen-welsh
-             texlive-unicode-data
-             texlive-ukrhyph
-             texlive-ruhyphen
-             texlive-latex-l3kernel
-             texlive-latex-l3backend
-             ;; TODO: This dependency isn't needed for LaTeX version 2021-06-01
-             ;; and later. See:
-             ;; https://tug.org/pipermail/tex-live/2021-June/047180.html
-             texlive-latex-l3packages
-             texlive-latexconfig))
-      (home-page "https://www.ctan.org/pkg/latex-base")
-      (synopsis "Base sources of LaTeX")
-      (description
-       "This bundle comprises the source of LaTeX itself, together with several
-packages which are considered \"part of the kernel\".  This bundle, together
-with the required packages, constitutes what every LaTeX distribution should
-contain.")
-      (license license:lppl1.3c+))))
+(define-public texlive-latex-bin
+  (package
+    (name "texlive-latex-bin")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/dvilualatex.1"
+                   "doc/man/man1/dvilualatex.man1.pdf"
+                   "doc/man/man1/latex.1"
+                   "doc/man/man1/latex.man1.pdf"
+                   "doc/man/man1/lualatex.1"
+                   "doc/man/man1/lualatex.man1.pdf"
+                   "doc/man/man1/pdflatex.1"
+                   "doc/man/man1/pdflatex.man1.pdf")
+             (base32
+              "1mhdc8a37b9j64kc8c8171s8p7ixklbf1ijr4vfh7af2k416qf8d")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:texlive-latex-bin? #f
+      #:create-formats #~(list "dvilualatex" "latex" "lualatex" "pdflatex")))
+    (propagated-inputs
+     (list texlive-atbegshi
+           texlive-atveryend
+           texlive-babel
+           texlive-cm
+           texlive-everyshi
+           texlive-firstaid
+           texlive-graphics
+           texlive-hyphen-complete
+           texlive-l3backend
+           texlive-l3kernel
+           texlive-l3packages
+           texlive-latex
+           texlive-latex-fonts
+           texlive-latexconfig
+           texlive-lm
+           texlive-luahbtex
+           texlive-luaotfload
+           texlive-luatex
+           texlive-pdftex
+           texlive-tex-ini-files
+           texlive-unicode-data))
+    (home-page "https://ctan.org/pkg/latex-bin")
+    (synopsis "LaTeX formats and man pages")
+    (description
+     "This package provides LaTeX format files and man pages along with
+several packages that are considered as part of the LaTeX kernel.")
+    (license license:lppl1.3c+)))
+
+(define-deprecated-package texlive-latex-base texlive-latex-bin)
+
+(define-public texlive-atenddvi
+  (package
+    (name "texlive-atenddvi")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/atenddvi/"
+                   "source/latex/atenddvi/"
+                   "tex/latex/atenddvi/")
+             (base32
+              "1fwa5233mdgvixhl2rzn9s06zz52j6ml7hfzd4194bn389n9syhk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/atenddvi")
+    (synopsis "Provide the @code{\\AtEndDvi} command for older LaTeX format")
+    (description
+     "This package is unneeded and does nothing when used with a LaTeX format
+2020-10-01 or newer as in this case the format provides the @code{\\AtEndDvi}
+command.  For older formats it implements @code{\\AtEndDvi}, a counterpart to
+@code{\\AtBeginDvi}.  The execution of its argument is delayed to the end of
+the document at the end of the last page.  Thus @code{\\special} and
+@code{\\write} remain effective, because they are put into the last page.
+This is the main difference to @code{\\AtEndDocument}.")
+    (license license:lppl1.3c+)))
+
+(define-public texlive-attachfile
+  (package
+    (name "texlive-attachfile")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bib/attachfile/"
+                   "doc/latex/attachfile/"
+                   "source/latex/attachfile/"
+                   "tex/latex/attachfile/")
+             (base32
+              "0340c4rvxhhk95wlhf54n9akiwhj6pj0bslys6bkq29x9903zx5h")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/attachfile")
+    (synopsis "Attach arbitrary files to a PDF document")
+    (description
+     "Starting with PDF 1.3, PDF files can contain file attachments, i.e.,
+arbitrary files that a reader can extract, just like attachments to an e-mail
+message.  The @code{attachfile} package brings this functionality to pdfLaTeX
+and provides some additional features such as the ability to use arbitrary
+LaTeX code for the file icon.  Settings can be made either globally or on
+a per-attachment basis.  @code{attachfile} makes it easy to attach files and
+customize their appearance in the enclosing document.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-attachfile2
+  (package
+    (name "texlive-attachfile2")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/attachfile2/"
+                   "doc/man/man1/pdfatfi.1"
+                   "doc/man/man1/pdfatfi.man1.pdf"
+                   "scripts/attachfile2/"
+                   "source/latex/attachfile2/"
+                   "tex/latex/attachfile2/")
+             (base32
+              "14glnfyp58ka78l5kc09mc96km7jd77qvsby0p8dpjhvwf6qfzg8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "pdfatfi.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/attachfile2")
+    (synopsis "Attach files into PDF")
+    (description
+     "This package can be used to attach files to a PDF document.  It is
+a further development of Scott Pakin's package @code{attachfile} for pdfTeX.
+Apart from bug fixes, this package adds support for dvips, some new options,
+and gets and writes meta information data about the attached files.")
+    (license license:lppl1.3c)))
 
 (define-public texlive-atveryend
-  (let ((template (simple-texlive-package
-                   "texlive-atveryend"
-                   (list "doc/latex/atveryend/"
-                         "source/latex/atveryend/"
-                         "tex/latex/atveryend/")
-                   (base32 "1rp805h0m99rxs107a798l951lyahlnp7irfklfadn2a2ljzhafn"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "latex/atveryend")
-         ((#:build-targets _ #t)
-          #~(list "atveryend.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/atveryend/")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))
-              (add-after 'copy-files 'remove-generated-file
-                (lambda* (#:key outputs #:allow-other-keys)
-                  (with-directory-excursion #$output
-                    (for-each delete-file
-                              (find-files "." "\\.(drv|ins)$")))))))))
-      (home-page "https://ctan.org/macros/latex/contrib/atveryend")
-      (synopsis "Hooks at the very end of a document")
-      (description
-       "This LaTeX packages provides two hooks for @code{\\end{document}} that
+  (package
+    (name "texlive-atveryend")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/atveryend/"
+                   "source/latex/atveryend/"
+                   "tex/latex/atveryend/")
+             (base32
+              "1rp805h0m99rxs107a798l951lyahlnp7irfklfadn2a2ljzhafn")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
+    (native-inputs (list texlive-docstrip texlive-pdftex))
+    (home-page "https://ctan.org/pkg/atveryend")
+    (synopsis "Hooks at the very end of a document")
+    (description
+     "This LaTeX packages provides two hooks for @code{\\end{document}} that
 are executed after the hook of @code{\\AtEndDocument}:
 @code{\\AfterLastShipout} can be used for code that is to be executed right
 after the last @code{\\clearpage} before the @file{.aux} file is closed.
 @code{\\AtVeryEndDocument} is used for code after closing and final reading of
 the @file{.aux} file.")
-      (license license:lppl1.3+))))
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-latex-atveryend texlive-atveryend)
 
+(define-public texlive-automata
+  (package
+    (name "texlive-automata")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/automata/"
+                   "metapost/automata/")
+             (base32
+              "0y02wp1w2jkhrxanz7r699kr08bmbfn0h0xaxj3zh4xj9745d7d7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/automata")
+    (synopsis "Finite state machines, graphs and trees in MetaPost")
+    (description
+     "The package offers a collection of macros for MetaPost to make easier to
+draw finite-state machines, automata, labelled graphs, etc.  The user defines
+nodes, which may be isolated or arranged into matrices or trees; edges connect
+pairs of nodes through arbitrary paths.  Parameters, that specify the shapes
+of nodes and the styles of edges, may be adjusted.")
+    (license license:lppl)))
+
 (define-public texlive-auxhook
-  (let ((template (simple-texlive-package
-                   "texlive-auxhook"
-                   (list "doc/latex/auxhook/"
-                         "source/latex/auxhook/"
-                         "tex/latex/auxhook/")
-                   (base32
-                    "1qfs7bz8ryp4prr2fw4hwypnfc6yr4rc4wd8qy4rpmab0hab0vdy"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/auxhook")
-         ((#:build-targets _ '())
-          #~(list "auxhook.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/auxhook")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/auxhook")
-      (synopsis "Hooks for auxiliary files")
-      (description
-       "This package provides hooks for adding code at the beginning of
+  (package
+    (name "texlive-auxhook")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/auxhook/" "source/latex/auxhook/"
+                   "tex/latex/auxhook/")
+             (base32
+              "1qfs7bz8ryp4prr2fw4hwypnfc6yr4rc4wd8qy4rpmab0hab0vdy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/auxhook")
+    (synopsis "Hooks for auxiliary files")
+    (description
+     "This package provides hooks for adding code at the beginning of
 @file{.aux} files.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-latex-auxhook texlive-auxhook)
 
+(define-public texlive-epspdf
+  (package
+    (name "texlive-epspdf")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/info/epspdf.info" "doc/support/epspdf/"
+                   "scripts/epspdf/")
+             (base32
+              "0sxn3dff0nxiw68h1kr86rmnc72xkc62fk94j590a4di1lh2firl")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:link-scripts #~(list "epspdf.tlu" "epspdftk.tcl")))
+    (inputs (list tcl tk))
+    (home-page "https://ctan.org/pkg/epspdf")
+    (synopsis "Converter for PostScript, EPS and PDF")
+    (description
+     "Epspdftk.tcl is a GUI PS/EPS/PDF converter.  Epspdf.tlu, its
+command-line backend, can be used by itself.  Options include grayscaling,
+cropping margins and single-page selection.  Some conversion options are made
+possible by converting in multiple steps.")
+    (license license:gpl2)))
+
+(define-public texlive-epstopdf
+  (package
+    (name "texlive-epstopdf")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/epstopdf.1"
+                   "doc/man/man1/epstopdf.man1.pdf"
+                   "doc/man/man1/repstopdf.1"
+                   "doc/man/man1/repstopdf.man1.pdf"
+                   "doc/support/epstopdf/"
+                   "scripts/epstopdf/")
+             (base32
+              "0r2dr8f8myc663hdzzrkaiddfqsmmf41xan9y6kd1n049hhw414l")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:link-scripts #~(list "epstopdf.pl")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'set-gs-location
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((gs (search-input-file inputs "/bin/gs")))
+                (substitute* "scripts/epstopdf/epstopdf.pl"
+                  (("\"gs\"") (string-append "\"" gs "\""))))))
+          (add-after 'link-scripts 'add-repstopdf
+            (lambda _
+              (with-directory-excursion (string-append #$output "/bin")
+                (symlink "epstopdf" "repstopdf")))))))
+    (home-page "https://ctan.org/pkg/epstopdf")
+    (synopsis "Convert EPS to PDF using Ghostscript")
+    (inputs (list ghostscript perl))
+    (description
+     "Epstopdf is a Perl script that converts an EPS file to an encapsulated
+PDF file (a single page file whose media box is the same as the original EPS's
+bounding box). The resulting file suitable for inclusion by pdfTeX as an
+image.  LaTeX users may make use of the @code{epstopdf} package, which will
+run the @code{epstopdf} script on the fly, thus giving the illusion that
+pdfLaTeX is accepting EPS graphic files.")
+    (license license:bsd-3)))
+
 (define-public texlive-epstopdf-pkg
-  (let ((template (simple-texlive-package
-                   "texlive-epstopdf-pkg"
-                   (list "doc/latex/epstopdf-pkg/"
-                         "source/latex/epstopdf-pkg/"
-                         "tex/latex/epstopdf-pkg/")
-                   (base32
-                    "1ajyc5pkn1niifz5asyf09vbdqvmy05xwl0vxcdl7ik0ll0jcaxp"))))
-    (package
-     (inherit template)
-     (arguments
-      (substitute-keyword-arguments (package-arguments template)
-        ((#:tex-directory _ '())
-         "latex/epstopdf-pkg")
-        ((#:build-targets _ '())
-         #~(list "epstopdf.ins"))
-        ((#:phases phases)
-         #~(modify-phases #$phases
-             (add-after 'unpack 'chdir
-               (lambda _
-                 (chdir "source/latex/epstopdf-pkg")))
-             (replace 'copy-files
-               (lambda* (#:key inputs #:allow-other-keys)
-                 (let ((origin (assoc-ref inputs "source"))
-                       (source (string-append #$output
-                                              "/share/texmf-dist/source"))
-                       (doc (string-append #$output:doc
-                                           "/share/texmf-dist/doc")))
-                   (copy-recursively (string-append origin "/source") source)
-                   (copy-recursively (string-append origin "/doc") doc))))))))
-     (propagated-inputs
-      (list texlive-grfext
-            texlive-infwarerr
-            texlive-kvoptions
-            texlive-pdftexcmds))
-     (home-page "https://www.ctan.org/pkg/epstopdf-pkg")
-     (synopsis "Call @command{epstopdf} on the fly")
-     (description
-      "The package adds support for EPS files in the @code{graphicx} package
+  (package
+    (name "texlive-epstopdf-pkg")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/epstopdf-pkg/"
+                   "source/latex/epstopdf-pkg/"
+                   "tex/latex/epstopdf-pkg/")
+             (base32
+              "1ajyc5pkn1niifz5asyf09vbdqvmy05xwl0vxcdl7ik0ll0jcaxp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://www.ctan.org/pkg/epstopdf-pkg")
+    (synopsis "Call @command{epstopdf} on the fly")
+    (description
+     "The package adds support for EPS files in the @code{graphicx} package
 when running under pdfTeX.  If an EPS graphic is detected, the package spawns
 a process to convert the EPS to PDF, using the script @command{epstopdf}.")
-     (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-latex-epstopdf-pkg texlive-epstopdf-pkg)
 
 (define-public texlive-filecontents
-  (let ((template (simple-texlive-package
-                   "texlive-filecontents"
-                   (list "doc/latex/filecontents/"
-                         "source/latex/filecontents/"
-                         "tex/latex/filecontents/")
-                   (base32
-                    "0ifhqfdzx91hrmndhg5441rpmv9k4lxrql02kd5yx75xpplxryzw"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '()) "latex/filecontents")
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/filecontents")))))))
-      (home-page "https://ctan.org/pkg/filecontents")
-      (synopsis "Create an external file from within a LaTeX document")
-      (description
-       "LaTeX2e's @code{filecontents} and @code{filecontents*} environments
+  (package
+    (name "texlive-filecontents")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/filecontents/"
+                   "source/latex/filecontents/"
+                   "tex/latex/filecontents/")
+             (base32
+              "0ifhqfdzx91hrmndhg5441rpmv9k4lxrql02kd5yx75xpplxryzw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/filecontents")
+    (synopsis "Create an external file from within a LaTeX document")
+    (description
+     "LaTeX2e's @code{filecontents} and @code{filecontents*} environments
 enable a LaTeX source file to generate external files as it runs through
 LaTeX.  However, there are two limitations of these environments: they refuse
 to overwrite existing files, and they can only be used in the preamble of
 a document.  The filecontents package removes these limitations, letting you
 overwrite existing files and letting you use @code{filecontents}
 @code{filecontents*} anywhere.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-latex-filecontents texlive-filecontents)
 
+(define-public texlive-filehook
+  (package
+    (name "texlive-filehook")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/filehook/" "source/latex/filehook/"
+                   "tex/latex/filehook/")
+             (base32
+              "1zg9svjhrnh52fa04n3pnb0hrijp0lrr939dacf90cjjzwk36sfn")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-ydoc))
+    (home-page "https://ctan.org/pkg/filehook")
+    (synopsis "Hooks for input files")
+    (description
+     "The package provides several file hooks (@code{AtBegin}, @code{AtEnd},
+...) for files read by @code{\\input}, @code{\\include} and
+@code{\\InputIfFileExists}.  General hooks for all such files (e.g., all
+@code{\\included} ones) and file specific hooks only used for named files are
+provided; two hooks are provided for the end of @code{\\included} files ---
+one before, and one after the final @code{\\clearpage}.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-epsf
   (package
-    (inherit (simple-texlive-package
-              "texlive-epsf"
-              (list "/doc/generic/epsf/"
-                    "/tex/generic/epsf/")
-              (base32
-               "03jcf0kqh47is965d2590miwj7d5kif3c4mgsnvkyl664jzjkh92")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/epsf")
+    (name "texlive-epsf")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/epsf/" "tex/generic/epsf/")
+             (base32
+              "03jcf0kqh47is965d2590miwj7d5kif3c4mgsnvkyl664jzjkh92")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/epsf")
     (synopsis "Simple macros for EPS inclusion")
     (description
      "This package provides the original (and now obsolescent) graphics
@@ -3421,14 +11728,16 @@ users, via its Plain TeX version.)")
 
 (define-public texlive-fancyvrb
   (package
-    (inherit (simple-texlive-package
-              "texlive-fancyvrb"
-              (list "/doc/latex/fancyvrb/README"
-                    "/tex/latex/fancyvrb/")
-              (base32
-               "0pdilgpw4zc0ipp4z9kdi61nymifyjy2mfpk74xk2cw9vhynkk3w")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/fancyvrb")
+    (name "texlive-fancyvrb")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/fancyvrb/" "tex/latex/fancyvrb/")
+             (base32
+              "18nif609wp9y9bc3jn3cz07ihphp95mqa4bfpgqlxsy3m57295s7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fancyvrb")
     (synopsis "Sophisticated verbatim text")
     (description
      "This package provides tools for the flexible handling of verbatim text
@@ -3437,39 +11746,116 @@ with many parameters; ability to define new customized verbatim environments;
 save and restore verbatim text and environments; write and read files in
 verbatim mode; build \"example\" environments (showing both result and
 verbatim source).")
-    (license license:lppl1.0+)))
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-latex-fancyvrb texlive-fancyvrb)
 
+(define-public texlive-gentium-tug
+  (package
+    (name "texlive-gentium-tug")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/gentium-tug/GentiumPlus-6.101/"
+                   "doc/fonts/gentium-tug/gentium-tug/"
+                   "fonts/afm/public/gentium-tug/"
+                   "fonts/enc/dvips/gentium-tug/"
+                   "fonts/map/dvips/gentium-tug/"
+                   "fonts/map/pdftex/gentium-tug/"
+                   "fonts/tfm/public/gentium-tug/"
+                   "fonts/truetype/public/gentium-tug/"
+                   "fonts/type1/public/gentium-tug/"
+                   "source/fonts/gentium-tug/"
+                   "tex/latex/gentium-tug/")
+             (base32
+              "1ns62cn7cqq3hzmljd6yvs2mip2l30pa3js6c1dm90fj01gsjq86")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/gentium-tug")
+    (synopsis "Gentium fonts (in two formats) and support files")
+    (description
+     "Gentium is a typeface family designed to enable the diverse ethnic
+groups around the world who use the Latin, Cyrillic and Greek scripts to
+produce readable, high-quality publications.  It supports a wide range of
+Latin- and Cyrillic-based alphabets.")
+    (license (list license:expat license:silofl1.1))))
+
+(define-public texlive-gincltex
+  (package
+    (name "texlive-gincltex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/gincltex/" "source/latex/gincltex/"
+                   "tex/latex/gincltex/")
+             (base32
+              "1x6bsf445dp8wc5hfgyywlal8vky5w23d69zlpybkp2d9am9a71p")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/gincltex")
+    (synopsis "Include TeX files as graphics")
+    (description
+     "The package builds on the standard LaTeX packages @code{graphics} and
+allows external LaTeX source files to be included, in the same way as graphic
+files, by @code{\\includegraphics}.  In effect, then package adds support for
+the @file{.tex} extension.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-git-latexdiff
+  (package
+    (name "texlive-git-latexdiff")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/git-latexdiff.1"
+                   "doc/man/man1/git-latexdiff.man1.pdf"
+                   "doc/support/git-latexdiff/"
+                   "scripts/git-latexdiff/")
+             (base32
+              "1hblgnjad5qm27ijpynz0x1rxgi07y5apgnv5r2wk3ngxj016pvn")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "git-latexdiff")))
+    (home-page "https://ctan.org/pkg/git-latexdiff")
+    (synopsis "Call @command{latexdiff} on two Git revisions of a file")
+    (description
+     "@command{git-latexdiff} is a tool to graphically visualize differences
+between different versions of a LaTeX file.")
+    (license license:bsd-2)))
+
 (define-public texlive-glyphlist
   (package
-    (inherit (simple-texlive-package
-              "texlive-glyphlist"
-              (list "fonts/map/glyphlist/")
-              (base32
-               "12nmmyh77vr2622lzi11nm1z1k2bxs7jz018yl4rwjlpg0sxg1ja")
-              #:trivial? #t))
-    (home-page "https://www.tug.org/texlive/")
-    (synopsis "Adobe glyph list and TeX extensions")
+    (name "texlive-glyphlist")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "fonts/map/glyphlist/")
+             (base32
+              "12nmmyh77vr2622lzi11nm1z1k2bxs7jz018yl4rwjlpg0sxg1ja")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/glyphlist")
+    (synopsis "Adobe Glyph List and TeX extensions")
     (description
      "This package provides a map between traditional Adobe glyph names and
 Unicode points; it is maintained by Adobe.  The additional
-@file{texglyphlist.txt} is maintained as part of lcdf-typetools.")
+@file{texglyphlist.txt} is maintained as part of @code{lcdf-typetools}.")
     (license license:asl2.0)))
 
 (define-public texlive-graphics-def
   (package
-    (inherit (simple-texlive-package
-              "texlive-graphics-def"
-              (list "/doc/latex/graphics-def/README.md"
-                    "/tex/latex/graphics-def/")
-              (base32
-               "0b66fy06safyrd717rfr476g1gz6nqfv1vqvam7ac2yy0g0djb17")
-              #:trivial? #t))
-    (propagated-inputs
-     (list texlive-epstopdf-pkg))
-    (home-page "https://www.ctan.org/pkg/latex-graphics")
-    (synopsis "Color and graphics option files")
+    (name "texlive-graphics-def")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/graphics-def/"
+                   "tex/latex/graphics-def/")
+             (base32
+              "1kp28k3shsiv0a051lp4fcqadac41c942hxwn506yps7h9y4jg23")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
+    (home-page "https://ctan.org/pkg/graphics-def")
+    (synopsis "Colour and graphics option files")
     (description
      "This bundle is a combined distribution consisting of @file{dvips.def},
 @file{pdftex.def}, @file{luatex.def}, @file{xetex.def}, @file{dvipdfmx.def},
@@ -3479,14 +11865,18 @@ packages.")
 
 (define-public texlive-graphics-cfg
   (package
-    (inherit (simple-texlive-package
-              "texlive-graphics-cfg"
-              (list "/doc/latex/graphics-cfg/README.md"
-                    "/tex/latex/graphics-cfg/")
-              (base32
-               "00n63adb2laf43lzix39xl68aq0k5k80mmrw602w99w5n7f96gsf")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/latex-graphics")
+    (name "texlive-graphics-cfg")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/graphics-cfg/"
+                   "tex/latex/graphics-cfg/")
+             (base32
+              "00n63adb2laf43lzix39xl68aq0k5k80mmrw602w99w5n7f96gsf")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
+    (home-page "https://ctan.org/pkg/graphics-cfg")
     (synopsis "Sample configuration files for LaTeX color and graphics")
     (description
      "This bundle includes @file{color.cfg} and @file{graphics.cfg} files that
@@ -3494,513 +11884,440 @@ set default \"driver\" options for the color and graphics packages.")
     (license license:public-domain)))
 
 (define-public texlive-graphics
-  (let ((template (simple-texlive-package
-                   "texlive-graphics"
-                   (list "doc/latex/graphics/"
-                         "source/latex/graphics/"
-                         "tex/latex/graphics/")
-                   (base32
-                    "0prw1zcv4fcj3zg0kyhj0k7ax0530adl60bajzvbv3fi16d7rqlq"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/graphics")
-         ((#:build-targets _ '())
-          #~(list "graphics-drivers.ins" "graphics.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/graphics")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc)
-                    ;; This file is not generated from the sources.
-                    (install-file
-                     (string-append
-                      origin
-                      "/tex/latex/graphics/graphics-2017-06-25.sty")
-                     (string-append
-                      #$output
-                      "/share/texmf-dist/tex/latex/graphics")))))))))
-      (propagated-inputs (list texlive-graphics-def texlive-graphics-cfg))
-      (home-page "https://ctan.org/macros/latex/required/graphics")
-      (synopsis "The LaTeX standard graphics bundle")
-      (description
-       "This is a collection of LaTeX packages for: producing colour including
+  (package
+    (name "texlive-graphics")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/graphics/"
+                   "source/latex/graphics/"
+                   "tex/latex/graphics/")
+             (base32
+              "024hncahwc07yd2l94znv7v72sbykxdri5lpg3w4ip0nf10ywyma")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
+    (native-inputs (list texlive-docstrip texlive-pdftex))
+    (propagated-inputs (list texlive-graphics-def texlive-graphics-cfg))
+    (home-page "https://ctan.org/macros/latex/required/graphics")
+    (synopsis "The LaTeX standard graphics bundle")
+    (description
+     "This is a collection of LaTeX packages for: producing colour including
 graphics (e.g., PostScript) files rotation and scaling of text in LaTeX
-documents.  It comprises the packages color, graphics, graphicx, trig, epsfig,
-keyval, and lscape.")
-      (license license:lppl1.3c))))
+documents.  It comprises the packages @code{color}, @code{graphics},
+@code{graphicx}, @code{trig}, @code{epsfig}, @code{keyval}, and
+@code{lscape}.")
+    (license license:lppl1.3c)))
 
 (define-deprecated-package texlive-latex-graphics texlive-graphics)
 
 (define-public texlive-greek-fontenc
   (package
-    (inherit (simple-texlive-package
-              "texlive-greek-fontenc"
-              (list "doc/latex/greek-fontenc/"
-                    "tex/latex/greek-fontenc/"
-                    "source/latex/greek-fontenc/")
-              (base32
-               "1ncsvj5mlnkgllrvqdnbkv0qwpv2y7jkq3x2wdmm7d3daqq0ka5h")
-              #:trivial? #t))
-    (home-page "https://ctan.org/language/greek/greek-fontenc")
+    (name "texlive-greek-fontenc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/greek-fontenc/"
+                   "tex/latex/greek-fontenc/")
+             (base32
+              "1vary0vdrg77r55lf6gbfsqiyxqkbvrx1ijk71q3yl2v6adml4iv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/greek-fontenc")
     (synopsis "LICR macros and encoding definition files for Greek")
     (description
-     "The package provides Greek LICR macro definitions and encoding definition files
-for Greek text font encodings for use with fontenc.")
+     "The package provides Greek LICR macro definitions and encoding
+definition files for Greek text font encodings for use with @code{fontenc}.")
     (license license:lppl1.3+)))
 
+(define-public texlive-gsftopk
+  (package
+    (name "texlive-gsftopk")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/gsftopk.1"
+                   "doc/man/man1/gsftopk.man1.pdf"
+                   "dvips/gsftopk/")
+             (base32
+              "1qlac704qbm7kq762z0b887wfncprpcm8zj2lb4nag0wzdrrjdq5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/gsftopk")
+    (synopsis "Convert Ghostscript fonts to PK files")
+    (description
+     "Designed for use with @command{xdvi} and @command{dvips}, this utility
+converts Adobe Type 1 fonts to PK bitmap format.  It should not ordinarily be
+much used nowadays, since both its target applications are now capable of
+dealing with Type 1 fonts, direct.")
+    (license license:gpl3+)))
+
 (define-public texlive-hycolor
-  (let ((template  (simple-texlive-package
-                    "texlive-hycolor"
-                    (list "doc/latex/hycolor/"
-                          "source/latex/hycolor/"
-                          "tex/latex/hycolor/")
-                    (base32
-                     "0hmkx37wwmznxjqqnca87shy7qrgqrh2cn5r941ddgivnym31xbh"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/hycolor")
-         ((#:build-targets _ '())
-          #~(list "hycolor.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/hycolor")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/latex-graphics")
-      (synopsis "Color for hyperref and bookmark")
-      (description
-       "This package provides the code for the @code{color} option that is
-used by @code{hyperref} and @code{bookmark}.")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-hycolor")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/hycolor/" "source/latex/hycolor/"
+                   "tex/latex/hycolor/")
+             (base32
+              "0hmkx37wwmznxjqqnca87shy7qrgqrh2cn5r941ddgivnym31xbh")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/hycolor")
+    (synopsis "Colour for packages @code{hyperref} and @code{bookmark}")
+    (description
+     "This package provides the code for the color option that is used by
+packages @code{hyperref} and @code{bookmark}.  It is not intended as a package
+for the user.")
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-latex-hycolor texlive-hycolor)
 
 (define-public texlive-xcolor
-  (let ((template (simple-texlive-package
-                   "texlive-xcolor"
-                   (list "doc/latex/xcolor/"
-                         "dvips/xcolor/"
-                         "source/latex/xcolor/"
-                         "tex/latex/xcolor/")
-                   (base32
-                    "1d7108b67fcaf1sgyk43ph18l0z5m35iqg3aahqs1ymzwdfnd3f7"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/xcolor")
-         ((#:build-targets _ '())
-          #~(list "xcolor.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _ (chdir "source/latex/xcolor")))
-              (replace 'copy-files
-                (lambda* (#:key inputs outputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc)
-                    (let ((share (string-append #$output
-                                                "/share/texmf-dist")))
-                      (mkdir-p (string-append share "/dvips/xcolor"))
-                      (rename-file
-                       (string-append share "/tex/latex/xcolor/xcolor.pro")
-                       (string-append share "/dvips/xcolor/xcolor.pro"))))))))))
-      ;; TODO: Propagate texlive-hyperref and many others in the next rebuild
-      ;; cycle.  Grep for '\usepackage' to see what packages it requires.
-      ;; (propagated-inputs (list texlive-hyperref ...))
-      (home-page "https://www.ctan.org/pkg/xcolor")
-      (synopsis "Driver-independent color extensions for LaTeX and pdfLaTeX")
-      (description
-       "The package starts from the basic facilities of the colorcolor package,
+  (package
+    (name "texlive-xcolor")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/xcolor/" "dvips/xcolor/"
+                   "source/latex/xcolor/" "tex/latex/xcolor/")
+             (base32
+              "1sh0v60azjbl2fcmg4p77dqw052j59d9pg20saxvj4md32a345py")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xcolor")
+    (synopsis "Driver-independent color extensions for LaTeX and pdfLaTeX")
+    (description
+     "The package starts from the basic facilities of the colorcolor package,
 and provides easy driver-independent access to several kinds of color tints,
-shades, tones, and mixes of arbitrary colors.  It allows a user to select a
-document-wide target color model and offers complete tools for conversion
+shades, tones, and mixes of arbitrary colors.  It allows a user to select
+a document-wide target color model and offers complete tools for conversion
 between eight color models.  Additionally, there is a command for alternating
 row colors plus repeated non-aligned material (like horizontal lines) in
 tables.")
-      (license license:lppl1.2+))))
+    (license license:lppl1.2+)))
 
 (define-deprecated-package texlive-latex-xcolor texlive-xcolor)
 
+(define-public texlive-xltxtra
+  (package
+    (name "texlive-xltxtra")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/xltxtra/"
+                   "source/xelatex/xltxtra/"
+                   "tex/xelatex/xltxtra/")
+             (base32
+              "0dh3nnr4xhb85zp3q4jdzqvfghg8m9zvpsvvrmmp0q3ayf0c1dbj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-metalogo))
+    (home-page "https://ctan.org/pkg/xltxtra")
+    (synopsis "Extras for LaTeX users of XeTeX")
+    (description
+     "This package was previously used to provide a number of features that
+were useful for typesetting documents with XeLaTeX.  Many of those features
+have now been incorporated into the @code{fontspec} package and other
+packages, but the package persists for backwards compatibility.  Nowadays,
+loading @code{xltxtra} will: load the @code{fontspec}, @code{metalogo}, and
+@code{realscripts} packages; redefine @code{\\showhyphens} so it works
+correctly; and define two extra commands: @code{\\vfrac} and
+@code{\\namedglyph}.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-xmltexconfig
+  (package
+    (name "texlive-xmltexconfig")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/xmltex/xmltexconfig/")
+             (base32
+              "0drgvmn27snq43kjkpg5k4igkcdi56p1q3fwkrv3ivsiqfp6cdz3")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xmltexconfig")
+    (synopsis "Configuration files for @code{xmltex} and @code{pdfxmltex}")
+    (description "This package provides configuration files for @code{xmltex}
+and @code{pdfxmltex}.")
+    (license license:public-domain)))
+
 (define-public texlive-xmltex
-  (let ((template (simple-texlive-package
-                   "texlive-xmltex"
-                   (list
-                    "/doc/otherformats/xmltex/"
-                    "/tex/xmltex/")
-                   (base32
-                    "023gv9axq05vwqz50fnkig24dzahwlc4raks2s8xc4pzrv2dv1zy"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "tex/xmltex/base")
-         ((#:phases phases '%standard-phases)
-          `(modify-phases ,phases
-             (add-before 'install 'generate-formats
-               (lambda* (#:key inputs #:allow-other-keys)
-                 (mkdir "web2c")
-                 (for-each (lambda (f)
-                             (copy-file f (basename f)))
-                           (find-files "tex" "\\.(ini|tex)$"))
-                 (invoke "fmtutil-sys" "--byfmt" "xmltex"
-                         "--fmtdir=web2c")
-                 (invoke "fmtutil-sys" "--byfmt" "pdfxmltex"
-                         "--fmtdir=web2c")))
-             (add-after 'install 'install-formats-and-wrappers
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (let* ((out (assoc-ref outputs "out"))
-                        (texlive-bin (assoc-ref inputs "texlive-bin"))
-                        (pdftex (string-append texlive-bin "/bin/pdftex"))
-                        (web2c (string-append out "/share/texmf-dist/web2c")))
-                   (mkdir-p web2c)
-                   (copy-recursively "web2c" web2c)
-                   ;; Create convenience command wrappers.
-                   (mkdir-p (string-append out "/bin"))
-                   (symlink pdftex (string-append out "/bin/xmltex"))
-                   (symlink pdftex (string-append out "/bin/pdfxmltex"))
-                   #t)))))))
-      (propagated-inputs
-       ;; The following fonts are propagated as a texlive-updmap.cfg as the font
-       ;; maps need to be recreated for the fonts to be usable.  They are
-       ;; required by xmltex through mlnames.sty and unicode.sty.
-       `(("texlive" ,(texlive-updmap.cfg
-                      (list
-                       texlive-amsfonts
-                       texlive-babel
-                       texlive-courier
-                       texlive-helvetic
-                       texlive-hyperref
-                       texlive-symbol
-                       texlive-tipa
-                       texlive-times
-                       texlive-zapfding
-                       ;; The following fonts, while not required, are used if
-                       ;; available:
-                       texlive-stmaryrd
-                       texlive-wasy)))))
-      (native-inputs
-       (list texlive-tex-ini-files))
-      (home-page "https://www.ctan.org/pkg/xmltex/")
-      (synopsis "Support for parsing XML documents")
-      (description "The package provides an implementation of a parser for
-documents matching the XML 1.0 and XML Namespace Recommendations.  Element and
-attribute names, as well as character data, may use any characters allowed in
-XML, using UTF-8 or a suitable 8-bit encoding.")
-      (license license:lppl1.0+))))        ;per xmltex/base/readme.txt
+  (package
+    (name "texlive-xmltex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/otherformats/xmltex/base/"
+                   "tex/xmltex/base/")
+             (base32
+              "1rqwsapba8zs2ijjs7lpzksm20jqb8zbmanpw7wmdp2rq26ahylh")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:create-formats #~(list "pdfxmltex" "xmltex")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'install-wrappers
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((pdftex (search-input-file inputs "/bin/pdftex"))
+                    (web2c (string-append #$output "/share/texmf-dist/web2c")))
+                (mkdir-p (string-append #$output "/bin"))
+                (symlink pdftex (string-append #$output "/bin/xmltex"))
+                (symlink pdftex (string-append #$output "/bin/pdfxmltex"))))))))
+    (propagated-inputs
+     (list texlive-atbegshi
+           texlive-atveryend
+           texlive-babel
+           texlive-cm
+           texlive-everyshi
+           texlive-firstaid
+           texlive-hyphen-complete
+           texlive-l3backend
+           texlive-l3kernel
+           texlive-l3packages
+           texlive-latex
+           texlive-latex-fonts
+           texlive-latexconfig
+           texlive-pdftex
+           texlive-tex
+           texlive-tex-ini-files
+           texlive-unicode-data
+           texlive-xmltexconfig))
+    (home-page "https://ctan.org/pkg/xmltex")
+    (synopsis "Support for parsing XML documents")
+    (description
+     "The package provides an implementation of a parser for documents
+matching the XML 1.0 and XML Namespace Recommendations.  Element and attribute
+names, as well as character data, may use any characters allowed in XML, using
+UTF-8 or a suitable 8-bit encoding.")
+    (license license:lppl1.0+)))        ;per xmltex/base/readme.txt
 
 (define-public texlive-hyperref
-  (let ((template (simple-texlive-package
-                   "texlive-hyperref"
-                   (list "doc/latex/hyperref/"
-                         "source/latex/hyperref/"
-                         "tex/latex/hyperref/")
-                   (base32 "052k1nygm4msaivn8245n86km4h41knivigw80q58b7rc13s6hrk"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/hyperref")
-         ((#:build-targets _ '())
-          #~(list "hyperref.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/hyperref")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc)
-                    ;; XXX: These files are not auto-generated from the
-                    ;; sources.
-                    (for-each (lambda (f)
-                                (install-file
-                                 (string-append origin "/tex/latex/hyperref/" f)
-                                 (string-append
-                                  #$output
-                                  "/share/texmf-dist/tex/latex/hyperref")))
-                              '("minitoc-hyper.sty"
-                                "ntheorem-hyper.sty"
-                                "xr-hyper.sty")))))))))
-      (propagated-inputs
-       (list texlive-atbegshi
-             texlive-auxhook
-             texlive-bitset
-             texlive-cm
-             texlive-etexcmds
-             texlive-gettitlestring
-             texlive-graphics           ;for keyval
-             texlive-hycolor
-             texlive-intcalc
-             texlive-kvdefinekeys
-             texlive-kvsetkeys
-             texlive-letltxmacro
-             texlive-ltxcmds
-             texlive-pdfescape
-             texlive-refcount
-             texlive-rerunfilecheck
-             texlive-stringenc
-             texlive-url
-             texlive-zapfding))
-      (home-page "https://www.ctan.org/pkg/hyperref")
-      (synopsis "Extensive support for hypertext in LaTeX")
-      (description
-       "The @code{hyperref} package is used to handle cross-referencing commands
+  (package
+    (name "texlive-hyperref")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/hyperref/"
+                   "source/latex/hyperref/"
+                   "tex/latex/hyperref/")
+             (base32
+              "034bdg1vy2yql4sq9i3i1ss1axh7apdyk5rz3s2ss8fydvvds726")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs
+     (list texlive-atbegshi
+           texlive-auxhook
+           texlive-bitset
+           texlive-etexcmds
+           texlive-gettitlestring
+           texlive-hycolor
+           texlive-intcalc
+           texlive-kvdefinekeys
+           texlive-kvsetkeys
+           texlive-letltxmacro
+           texlive-ltxcmds
+           texlive-pdfescape
+           texlive-refcount
+           texlive-rerunfilecheck
+           texlive-stringenc
+           texlive-url
+           texlive-zapfding))
+    (home-page "https://www.ctan.org/pkg/hyperref")
+    (synopsis "Extensive support for hypertext in LaTeX")
+    (description
+     "The @code{hyperref} package is used to handle cross-referencing commands
 in LaTeX to produce hypertext links in the document.  The package provides
 backends for the @code{\\special} set defined for HyperTeX DVI processors; for
 embedded @code{pdfmark} commands for processing by Acrobat
 Distiller (@code{dvips} and Y&Y's @code{dvipsone}); for Y&Y's @code{dviwindo};
 for PDF control within pdfTeX and @code{dvipdfm}; for TeX4ht; and for VTeX's
 pdf and HTML backends.  The package is distributed with the @code{backref} and
-@code{nameref} packages, which make use of the facilities of @code{hyperref}.")
-      (license license:lppl1.3+))))
+@code{nameref} packages, which make use of the facilities of
+@code{hyperref}.")
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-latex-hyperref texlive-hyperref)
 
+(define-public texlive-hypdoc
+  (package
+    (name "texlive-hypdoc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/hypdoc/" "source/latex/hypdoc/"
+                   "tex/latex/hypdoc/")
+             (base32
+              "14qg7q9r4cx132m2mr132ml0r49psfy99g6my4wir4yaw7y0x6pp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/hypdoc")
+    (synopsis "Hyper extensions for @file{doc.sty}")
+    (description
+     "This package adds hypertext features to the package @code{doc} that is
+used in the documentation system of LaTeX2e.  Bookmarks are added and
+references are linked as far as possible.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-hyperxmp
+  (package
+    (name "texlive-hyperxmp")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/hyperxmp/"
+                   "doc/man/man1/hyperxmp-add-bytecount.1"
+                   "doc/man/man1/hyperxmp-add-bytecount.man1.pdf"
+                   "scripts/hyperxmp/"
+                   "source/latex/hyperxmp/"
+                   "tex/latex/hyperxmp/")
+             (base32
+              "0x2hif61a7bz1ymrc2qz0f9papfj2qx2w0smpihrcjxq73g9dm1b")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:link-scripts #~(list "hyperxmp-add-bytecount.pl")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-build
+            (lambda _
+              (delete-file "source/latex/hyperxmp/hyperxmp-stds.tex"))))))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/hyperxmp")
+    (synopsis "Embed XMP metadata within a LaTeX document")
+    (description
+     "XMP (eXtensible Metadata Platform) is a mechanism proposed by Adobe for
+embedding document metadata, within the document itself.  The metadata is
+designed to be easy to extract, even by programs that are oblivious to the
+document's file format.  The @code{hyperxmp} package makes it trivial for
+LaTeX document authors to store XMP metadata in their documents as well.  It
+is compatible with pdfLaTeX, XeLaTeX, LaTeX+dvipdfm, and LaTeX+dvips+ps2pdf.")
+    (license license:lppl1.3c)))
+
 (define-public texlive-oberdiek
-  (let ((template (simple-texlive-package
-                   "texlive-oberdiek"
-                   (list "bibtex/bib/oberdiek/"
-                         "doc/latex/oberdiek/"
-                         "source/latex/oberdiek/"
-                         "tex/generic/oberdiek/"
-                         "tex/latex/oberdiek/")
-                   (base32
-                    "00lp24fckawpy997j7zagsxv89jif40wgjq8fw502v06d225ikp3"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/oberdiek")
-         ((#:build-targets _ '())
-          #~(list "oberdiek.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/oberdiek")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc)
-                    ;; XXX: `#:tex-directory' is limited to one location, but
-                    ;; the package needs to install files elsewhere, so we do
-                    ;; that manually here.
-                    (with-directory-excursion origin
-                      (let ((extra '("bibtex/bib/oberdiek"
-                                     "tex/generic/oberdiek")))
-                        (for-each
-                         (lambda (d)
-                           (for-each (lambda (f)
-                                       (install-file
-                                        f
-                                        (string-append #$output
-                                                       "/share/texmf-dist/"
-                                                       d)))
-                                     (find-files d)))
-                         extra))))))))))
-      (propagated-inputs
-       (list texlive-auxhook
-             texlive-grfext
-             texlive-grffile
-             texlive-iftex
-             texlive-infwarerr
-             texlive-kvoptions
-             texlive-pdftexcmds))
-      (home-page "https://www.ctan.org/pkg/oberdiek")
-      (synopsis "Bundle of packages submitted by Heiko Oberdiek")
-      (description
-       "The bundle comprises various LaTeX packages, providing among others:
+  (package
+    (name "texlive-oberdiek")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bib/oberdiek/" "doc/latex/oberdiek/"
+                   "source/latex/oberdiek/"
+                   "tex/generic/oberdiek/" "tex/latex/oberdiek/")
+             (base32
+              "1fm6bcrxr4bw49h5hzrlas6ihaavshp6yjjvdjn869bl6hm6pmlz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs
+     (list texlive-auxhook
+           texlive-grfext
+           texlive-grffile
+           texlive-iftex
+           texlive-infwarerr
+           texlive-kvoptions
+           texlive-pdftexcmds))
+    (home-page "https://www.ctan.org/pkg/oberdiek")
+    (synopsis "Bundle of packages submitted by Heiko Oberdiek")
+    (description
+     "The bundle comprises various LaTeX packages, providing among others:
 better accessibility support for PDF files; extensible chemists reaction
 arrows; record information about document class(es) used; and many more.")
-      (license license:lppl1.3+))))
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-latex-oberdiek texlive-oberdiek)
 
+(define-public texlive-regexpatch
+  (package
+    (name "texlive-regexpatch")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/regexpatch/"
+                   "source/latex/regexpatch/"
+                   "tex/latex/regexpatch/")
+             (base32
+              "1jv8hvkvq0yvc8mh68ybj8fvhf6kcdzwjin1czs45i26s0dpsngj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/regexpatch")
+    (synopsis "High level patching of commands")
+    (description
+     "The package generalises the macro patching commands provided by
+P. Lehmann's @code{etoolbox}.  The difference between this package and its
+sibling @code{xpatch} is that this package sports a very powerful
+@code{\\regexpatchcmd} based on the @code{l3regex} module of the LaTeX3
+experimental packages.")
+    (license license:lppl1.3c)))
+
 (define-public texlive-rerunfilecheck
-  (let ((template (simple-texlive-package
-                   "texlive-rerunfilecheck"
-                   (list "doc/latex/rerunfilecheck/"
-                         "source/latex/rerunfilecheck/"
-                         "tex/latex/rerunfilecheck/")
-                   (base32
-                    "0f53b6dlnlrxkzj7h7x750p0489i2gg3isfqn0dlpncpq23w1r36"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/rerunfilecheck")
-         ((#:build-targets _ '())
-          #~(list "rerunfilecheck.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/rerunfilecheck")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (propagated-inputs
-       (list texlive-atveryend
-             texlive-infwarerr
-             texlive-kvoptions
-             texlive-pdftexcmds
-             texlive-uniquecounter))
-      (home-page "https://www.ctan.org/pkg/rerunfilecheck")
-      (synopsis "Checksum based rerun checks on auxiliary files")
-      (description
-       "This package provides additional rerun warnings if some auxiliary
-files have changed.  It is based on MD5 checksum, provided by pdfTeX.")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-rerunfilecheck")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/rerunfilecheck/"
+                   "source/latex/rerunfilecheck/"
+                   "tex/latex/rerunfilecheck/")
+             (base32
+              "0m3rvjgw0hg3n7db8hpyq55lq7py4scm35bqbawpc5mn5pmh2zg1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-atveryend texlive-uniquecounter))
+    (home-page "https://www.ctan.org/pkg/rerunfilecheck")
+    (synopsis "Checksum based rerun checks on auxiliary files")
+    (description
+     "This package provides additional rerun warnings if some auxiliary files
+have changed.  It is based on MD5 checksum, provided by pdfTeX.")
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-latex-rerunfilecheck texlive-rerunfilecheck)
 
 (define-public texlive-onedown
-  (let ((template
-         (simple-texlive-package
-          "texlive-onedown"
-          (list "doc/latex/onedown/"
-                "source/latex/onedown/"
-                "tex/latex/onedown/")
-          (base32
-           "04ih7i4v96ggwk4k1mpfx3dzcpi2siqablv93wryg7dk4cks5wkl"))))
-    (package
-      (inherit template)
-      (outputs '("doc" "out"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t) "latex/onedown")
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _ (chdir "source/latex/onedown/")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (texmf (string-append #$output "/share/texmf-dist"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (for-each
-                     (lambda (directory)
-                       (copy-recursively (string-append origin directory)
-                                         (string-append texmf directory)))
-                     '("/source" "/tex/latex/onedown"))
-                    (copy-recursively (string-append origin "/doc")
-                                      doc))))))))
-      (home-page "https://ctan.org/pkg/onedown")
-      (synopsis "Typeset bridge diagrams")
-      (description
-       "This is a comprehensive package to draw all sorts of bridge diagrams,
+  (package
+    (name "texlive-onedown")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/onedown/"
+                   "source/latex/onedown/"
+                   "tex/latex/onedown/")
+             (base32
+              "00yh6nyzzy6d2sj1ha7dgfbsicy2ip1irn3il5jhc29sn3crfahx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/onedown")
+    (synopsis "Typeset bridge diagrams")
+    (description
+     "This is a comprehensive package to draw all sorts of bridge diagrams,
 including hands, bidding tables, trick tables, and expert quizzes.
 
 It works for all font sizes.  Different fonts for hands, bidding diagrams and
 compass are possible.  It also provides annotations to card and bidding
 diagrams, automated check on consistency of suit and hands, and multilingual
 output of bridge terms.")
-      (license license:lppl1.3+))))
+    (license license:lppl1.3+)))
 
 (define-public texlive-tools
-  (let ((template (simple-texlive-package
-                   "texlive-tools"
-                   (list "doc/latex/tools/"
-                         "source/latex/tools/"
-                         "tex/latex/tools/")
-                   (base32
-                    "0c0ixkcvrlzx6sdj25ak3bx0j65qghf51w66yg5wlnpg08d3awrs"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/tools")
-         ((#:build-targets _ '())
-          #~(list "tools.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/tools")))
-              (replace 'copy-files
-                (lambda _
-                  (let ((origin #$(package-source this-package))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc)
-                    ;; These files are not generated.
-                    (let ((directory "/tex/latex/tools"))
-                      (with-directory-excursion (string-append origin directory)
-                        (for-each
-                         (lambda (f)
-                           (install-file f (string-append #$output
-                                                          "/share/texmf-dist"
-                                                          directory)))
-                         '("array-2016-10-06.sty"
-                           "array-2020-02-10.sty"
-                           "multicol-2017-04-11.sty"
-                           "varioref-2016-02-16.sty")))))))))))
-      (home-page "https://www.ctan.org/tex-archive/macros/latex/required/tools/")
-      (synopsis "LaTeX standard tools bundle")
-      (description "This package provides a collection of simple tools that
+  (package
+    (name "texlive-tools")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tools/"
+                   "source/latex/tools/"
+                   "tex/latex/tools/")
+             (base32
+              "04zafcgdgiricq0l6lplfxa2qdspx5wbzpql5h7hw90lsdiw8awk")))
+    (outputs '("out" "doc"))
+    (arguments
+     (list #:build-targets #~(list "tools.ins")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tools")
+    (synopsis "The LaTeX standard tools bundle")
+    (description "This package provides a collection of simple tools that
 are part of the LaTeX required tools distribution, comprising the packages:
 @code{afterpage}, @code{array}, @code{bm}, @code{calc}, @code{dcolumn},
 @code{delarray}, @code{enumerate}, @code{fileerr}, @code{fontsmpl},
@@ -4008,20 +12325,22 @@ are part of the LaTeX required tools distribution, comprising the packages:
 @code{longtable}, @code{multicol}, @code{rawfonts}, @code{showkeys},
 @code{somedefs}, @code{tabularx}, @code{theorem}, @code{trace},
 @code{varioref}, @code{verbatim}, @code{xr}, and @code{xspace}.")
-      (license license:lppl1.3+))))
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-latex-tools texlive-tools)
 
 (define-public texlive-url
   (package
-    (inherit (simple-texlive-package
-              "texlive-url"
-              (list "/doc/latex/url/"
-                    "/tex/latex/url/")
-              (base32
-               "184m40wgnx939ky2hbxnj0v9aak023ldrhgffp0lgyk9wdqpxlqg")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/url")
+    (name "texlive-url")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/url/" "tex/latex/url/")
+             (base32
+              "184m40wgnx939ky2hbxnj0v9aak023ldrhgffp0lgyk9wdqpxlqg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/url")
     (synopsis "Verbatim with URL-sensitive line breaks")
     (description "The command @code{\\url} is a form of verbatim command that
 allows linebreaks at certain characters or combinations of characters, accepts
@@ -4037,593 +12356,1067 @@ of file names.")
 
 (define-deprecated-package texlive-latex-url texlive-url)
 
-(define-public texlive-tetex
+(define-public texlive-l3experimental
   (package
-    (inherit (simple-texlive-package
-              "texlive-tetex"
-              (list "/dvips/tetex/"
-                    "/fonts/enc/dvips/tetex/"
-                    "/fonts/map/dvips/tetex/")
-              (base32
-               "05mf8yqdj2wrc1zm3al2j4aam2wx0ky6a7slxw17pkd1c7rmvjrq")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/tetex")
-    (synopsis "Font maps originally from teTeX")
-    (description "This package provides font maps that were originally part of
-the now obsolete teTeX distributions but are still used at the core of the TeX
-Live distribution.")
-    (license license:public-domain)))
+    (name "texlive-l3experimental")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/l3experimental/"
+                   "source/latex/l3experimental/l3benchmark/"
+                   "source/latex/l3experimental/l3bitset/"
+                   "source/latex/l3experimental/l3draw/"
+                   "source/latex/l3experimental/l3graphics/"
+                   "source/latex/l3experimental/l3opacity/"
+                   "source/latex/l3experimental/l3str/"
+                   "source/latex/l3experimental/l3sys-shell/"
+                   "source/latex/l3experimental/xcoffins/"
+                   "source/latex/l3experimental/xgalley/"
+                   "tex/latex/l3experimental/l3benchmark/"
+                   "tex/latex/l3experimental/l3bitset/"
+                   "tex/latex/l3experimental/l3draw/"
+                   "tex/latex/l3experimental/l3graphics/"
+                   "tex/latex/l3experimental/l3opacity/"
+                   "tex/latex/l3experimental/l3str/"
+                   "tex/latex/l3experimental/l3sys-shell/"
+                   "tex/latex/l3experimental/xcoffins/"
+                   "tex/latex/l3experimental/xgalley/")
+             (base32
+              "1s4v0f29hk5racmvj4imyn6d2az7i94s4fq3hag11hr08ipvi51v")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-l3kernel))
+    (home-page "https://ctan.org/pkg/l3experimental")
+    (synopsis "Experimental LaTeX3 concepts")
+    (description
+     "The l3experimental packages are a collection of experimental
+implementations for aspects of the LaTeX3 kernel, dealing with higher-level
+ideas such as the Designer Interface.  Some of them work as stand alone
+packages, providing new functionality, and can be used on top of LaTeX2e with
+no changes to the existing kernel.  The present release includes:
+@itemize @code
+@item l3benchmark
+for measuring the time taken by TeX to run certain code;
+@item l3draw
+a code-level interface for constructing drawings;
+@item l3graphics
+an interface for the inclusion of graphics files;
+@item l3opacity
+support for opacity in PDF output;
+@item l3str
+support for string manipulation;
+@item l3bitset
+support for bit vectors;
+@item l3sys-shell
+which provides abstractions for common shell functions like file
+deletion and copying;
+@item xcoffins
+which allows the alignment of boxes using a series of handle positions,
+supplementing the simple TeX reference point;
+@item xgalley
+which controls boxes receiving text for typesetting.
+@end itemize")
+    (license license:lppl1.3c)))
 
-(define-public texlive-latex-l3kernel
+(define-public texlive-l3kernel
   (package
-    (name "texlive-latex-l3kernel")
+    (name "texlive-l3kernel")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "l3kernel"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "068xkinrkl6qjf8r6a9i0msvnzp4y7a3gnd2h12ws0km1dv19r20"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/l3kernel/"
+                   "source/latex/l3kernel/"
+                   "tex/latex/l3kernel/")
+             (base32
+              "1jbll1x3pdjpm1v70h7kpxgkjsw2mi2zbdilc7qvh251amn0hdbv")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (arguments
-     '(#:tex-directory "latex/l3kernel"
-       #:tex-engine "tex"
-       #:tex-format #f
-       #:texlive-latex-base #f))
-    (native-inputs
-     (list texlive-docstrip))
-    (home-page "https://www.ctan.org/pkg/l3kernel")
-    (synopsis "LaTeX3 programmers’ interface")
-    (description
-     "The l3kernel bundle provides an implementation of the LaTeX3
-programmers’ interface, as a set of packages that run under LaTeX 2e.  The
-interface provides the foundation on which the LaTeX3 kernel and other future
-code are built: it is an API for TeX programmers.  The packages are set up so
-that the LaTeX3 conventions can be used with regular LaTeX 2e packages.")
+     (list
+      #:tex-engine "tex"
+      #:tex-format #f
+      #:texlive-latex-bin? #f))
+    (native-inputs (list texlive-docstrip))
+    (propagated-inputs (list texlive-l3backend))
+    (home-page "https://ctan.org/pkg/l3kernel")
+    (synopsis "LaTeX3 programming conventions")
+    (description
+     "The l3kernel bundle provides an implementation of the LaTeX3 programmers
+interface, as a set of packages that run under LaTeX2e.  The interface
+provides the foundation on which the LaTeX3 kernel and other future code are
+built: it is an API for TeX programmers.  The packages are set up so that the
+LaTeX3 conventions can be used with regular LaTeX2e packages.")
     (license license:lppl1.3c+)))
 
-(define-public texlive-latex-l3backend
+(define-deprecated-package texlive-latex-l3kernel texlive-l3kernel)
+
+(define-public texlive-l3backend
   (package
-    (name "texlive-latex-l3backend")
+    (name "texlive-l3backend")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "l3backend"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0mlwyzssqn6wkyv9hzp24d40p8f20zrjqgvqyqs1rd7q7awan42a"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/l3backend/"
+                   "dvips/l3backend/"
+                   "source/latex/l3backend/"
+                   "tex/latex/l3backend/")
+             (base32
+              "1pd2drks05k9w3fzgzg7vkj46plpw5z9r0zl43r1kzya9c4ldb38")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (arguments
-     '(#:tex-directory "latex/l3backend"
-       #:tex-engine "tex"
-       #:tex-format #f
-       #:texlive-latex-base #f))
-    (native-inputs
-     (list texlive-docstrip))
-    (home-page "https://www.ctan.org/pkg/l3backend")
+     (list #:tex-engine "tex"
+           #:tex-format #f
+           #:texlive-latex-bin? #f))
+    (native-inputs (list texlive-docstrip))
+    (home-page "https://ctan.org/pkg/l3backend")
     (synopsis "LaTeX3 backend drivers")
     (description
      "This package forms parts of expl3, and contains the code used to
-interface with backends (drivers) across the expl3 codebase. The functions
-here are defined differently depending on the engine in use. As such, these
+interface with backends (drivers) across the expl3 codebase.  The functions
+here are defined differently depending on the engine in use.  As such, these
 are distributed separately from l3kernel to allow this code to be updated on
 an independent schedule.")
-    (license license:lppl1.3c+)))
+    (license license:lppl1.3c)))
 
-(define-public texlive-latex-l3packages
+(define-deprecated-package texlive-dvips-l3backend texlive-l3backend)
+(define-deprecated-package texlive-latex-l3backend texlive-l3backend)
+
+(define-public texlive-l3packages
   (package
-    (name "texlive-latex-l3packages")
+    (name "texlive-l3packages")
     (version (number->string %texlive-revision))
-    (source (texlive-origin name version
-                            '("/source/latex/l3packages/"
-                              ;; These files have been generated with a
-                              ;; bespoke source tree and then modified by
-                              ;; hand. It's unfeasible to recreate them. See:
-                              ;; https://tug.org/pipermail/tex-live/2021-June/047188.html
-                              "/tex/latex/l3packages/xparse/xparse-2018-04-12.sty"
-                              "/tex/latex/l3packages/xparse/xparse-2020-10-01.sty"
-
-                              ;; TODO: This file can be removed when using
-                              ;; LaTeX version 2021-06-01 or newer. See:
-                              ;; https://tug.org/pipermail/tex-live/2021-June/047180.html
-                              "/tex/latex/l3packages/xparse/xparse-generic.tex")
-                            (base32 "05rjxdqhhg7z1z2rmhmwj2qf09xygymayy3jzj9fdphk0pab3amm")))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/l3packages/"
+                   "source/latex/l3packages/l3keys2e/"
+                   "source/latex/l3packages/xfp/"
+                   "source/latex/l3packages/xfrac/"
+                   "source/latex/l3packages/xparse/"
+                   "source/latex/l3packages/xtemplate/"
+                   "tex/latex/l3packages/l3keys2e/"
+                   "tex/latex/l3packages/xfp/"
+                   "tex/latex/l3packages/xfrac/"
+                   "tex/latex/l3packages/xparse/"
+                   "tex/latex/l3packages/xtemplate/")
+             (base32
+              "0l7mfm8ziil59drqmb723n0wjbwdsx54iah051haxlbj7psqmbax")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (arguments
-     '(#:tex-directory "latex/l3packages"
-       #:tex-engine "tex"
-       #:tex-format #f
-       #:texlive-latex-base #f
-       ;; build-targets must be specified manually since they are in
-       ;; sub-directories.
-       #:build-targets '("l3keys2e.ins" "xparse.ins" "xfrac.ins" "xfp.ins" "xtemplate.ins")
-       #:phases
-       (modify-phases %standard-phases
-         ;; All package sources are in sub-directories, so we need to add them
-         ;; to TEXINPUTS.
-         (add-after 'unpack 'set-TEXINPUTS
-           (lambda _
-             (let ((cwd (getcwd)))
-               (setenv "TEXINPUTS"
-                       (string-append cwd "/source/latex/l3packages/l3keys2e:"
-                                      cwd "/source/latex/l3packages/xparse:"
-                                      cwd "/source/latex/l3packages/xfrac:"
-                                      cwd "/source/latex/l3packages/xfp:"
-                                      cwd "/source/latex/l3packages/xtemplate"
-                                      ;; The terminating ":" is required to include the
-                                      ;; l3kernel input as well.
-                                      ":")))
-             #t))
-         (add-after 'install 'copy-generated-files
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((dest (string-append (assoc-ref outputs "out")
-                                        "/share/texmf-dist/tex/latex/l3packages")))
-               (copy-recursively "tex/latex/l3packages/xparse" dest)))))
-       ))
-    (native-inputs
-     (list texlive-docstrip))
-    (propagated-inputs
-     (list texlive-latex-l3kernel))
-    (home-page "https://www.ctan.org/pkg/l3packages")
+     (list #:build-targets
+           '(list "l3keys2e.ins"
+                  "xparse.ins"
+                  "xfrac.ins"
+                  "xfp.ins"
+                  "xtemplate.ins")
+           #:tex-engine "tex"
+           #:tex-format #f
+           #:texlive-latex-bin? #f))
+    (native-inputs (list texlive-docstrip))
+    (propagated-inputs (list texlive-l3kernel))
+    (home-page "https://ctan.org/pkg/l3packages")
     (synopsis "High-level LaTeX3 concepts")
     (description
-     "This bundle holds prototype implementations of concepts for a LaTeX
-designer interface, to be used with the experimental LaTeX kernel as
-programming tools and kernel support.  Packages provided in this release are:
-
-@enumerate
-@item l3keys2e, which makes the facilities of the kernel module l3keys
-  available for use by LaTeX 2e packages;
-@item xfrac, which provides flexible splitlevel fractions;
-@item xparse, which provides a high-level interface for declaring document
-  commands; and
-@item xtemplate, which provides a means of defining generic functions using a
-  key-value syntax.
-@end enumerate\n")
-    (license license:lppl1.3c+)))
+     "This collection contains implementations for aspects of the LaTeX3
+kernel, dealing with higher-level ideas such as the Designer Interface.  The
+packages here are considered broadly stable (The LaTeX3 Project does not
+expect the interfaces to alter radically).  These packages are built on
+LaTeX2e conventions at the interface level, and so may not migrate in the
+current form to a stand-alone LaTeX3 format.
+
+Packages provided are @code{xparse}, which provides a high-level interface for
+declaring document commands @code{xfp}, an expandable IEEE 754 FPU for LaTeX,
+@code{l3keys2e}, which makes the facilities of the kernel module l3keys
+available for use by LaTeX 2e packages, @code{xtemplate}, which provides
+a means of defining generic functions using a key-value syntax, and
+@code{xfrac}, which provides flexible split-level fractions.")
+    (license license:lppl1.3c)))
 
-(define-public texlive-dvips-l3backend
-  (package
-    (inherit (simple-texlive-package
-              "texlive-dvips-l3backend"
-              (list
-               "/dvips/l3backend/")
-              (base32
-               "1hvj153h1pn93h6n76dv3mg9ai0mcz9q9mysfiqjfpqzijz9ikky")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/l3backend")
-    (synopsis "LaTeX3 backend drivers for dvips")
-    (description
-     "This package forms parts of expl3, and contains the code used to
-interface with backends (drivers) across the expl3 codebase.  The functions
-here are defined for the dvips engine only.")
-    (license license:lppl1.3c+)))
+(define-deprecated-package texlive-latex-l3packages texlive-l3packages)
 
 (define-public texlive-fontspec
-  (let ((template (simple-texlive-package
-                   "texlive-fontspec"
-                   (list "/doc/latex/fontspec/"
-                         "/source/latex/fontspec/"
-                         "/tex/latex/fontspec/fontspec.cfg")
-                   (base32
-                    "06rms8dw1j67v3rgv6xmfykdmgbxi5rp78yxc782cy1sw07blgsg"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "latex/fontspec")
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/fontspec/") #t))))))
-      (propagated-inputs
-       (list texlive-cm texlive-latex-l3packages texlive-lm))
-      (home-page "https://www.ctan.org/pkg/fontspec")
-      (synopsis "Advanced font selection in XeLaTeX and LuaLaTeX")
-      (description
-       "Fontspec is a package for XeLaTeX and LuaLaTeX.  It provides an
+  (package
+    (name "texlive-fontspec")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/fontspec/"
+                   "source/latex/fontspec/"
+                   "tex/latex/fontspec/")
+             (base32
+              "0rh3x1h8glpmw0nmqv8lili3vf0zw2lcgffzk680c86k8jpjy4cm")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs
+     (list texlive-euenc
+           texlive-iftex
+           texlive-l3kernel
+           texlive-l3packages
+           texlive-lm
+           texlive-xunicode))
+    (home-page "https://ctan.org/pkg/fontspec")
+    (synopsis "Advanced font selection in XeLaTeX and LuaLaTeX")
+    (description
+     "Fontspec is a package for XeLaTeX and LuaLaTeX.  It provides an
 automatic and unified interface to feature-rich AAT and OpenType fonts through
-the NFSS in LaTeX running on XeTeX or LuaTeX engines.  The package requires
-the l3kernel and xparse bundles from the LaTeX 3 development team.")
-      (license license:lppl1.3+))))
+the NFSS in LaTeX running on XeTeX or LuaTeX engines.")
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-latex-fontspec texlive-fontspec)
 
 (define-public texlive-grffile
-  (let ((template (simple-texlive-package
-                   "texlive-grffile"
-                   (list "/doc/latex/grffile/README.md"
-                         "/source/latex/grffile/grffile.dtx")
-                   (base32
-                    "1ib2n4d52faipvxdvdh4ar1p5j997h7cza26sfyd8z3qdf0naqgx"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "latex/grffile")
-         ((#:build-targets _ #t)
-          '(list "grffile.dtx"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/grffile/")))))))
-      (home-page "https://www.ctan.org/pkg/grffile")
-      (synopsis "Extended file name support for graphics (legacy package)")
-      (description
-       "The original grffile package extended the file name processing of the
-@code{graphics} package to support a larger range of file names.  The base
-LaTeX code now supports multiple dots and spaces, and this package by default
-is a stub that just loads @code{graphicx}.")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-grffile")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/grffile/"
+                   "source/latex/grffile/"
+                   "tex/latex/grffile/")
+             (base32
+              "01mlvdhqwfwj1l91jfvkdfbn1hj95rlb6xhwikzx1r8qrz5whw7n")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://www.ctan.org/pkg/grffile")
+    (synopsis "Extended file name support for graphics (legacy package)")
+    (description
+     "The original @code{grffile} package extended the file name processing
+of the @code{graphics} package to support a larger range of file names.  The
+base LaTeX code now supports multiple dots and spaces, and this package by
+default is a stub that just loads @code{graphicx}.")
+    (license license:lppl1.3c+)))
+
+(define-public texlive-sansmath
+  (package
+    (name "texlive-sansmath")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/sansmath/" "tex/latex/sansmath/")
+             (base32
+              "1lqxfvmxan0c9s270jp8jw1a5s6ya1i4jlfp2xz2k4w0g0fryjpj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/sansmath")
+    (synopsis "Maths in a Sans font")
+    (description
+     "The package defines a new math version Sans, and a command
+@code{\\sansmath} that behaves somewhat like @code{\\boldmath}.")
+    (license license:public-domain)))
+
+(define-public texlive-sansmathfonts
+  (package
+    (name "texlive-sansmathfonts")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/sansmathfonts/"
+                   "fonts/map/dvips/sansmathfonts/"
+                   "fonts/source/public/sansmathfonts/"
+                   "fonts/tfm/public/sansmathfonts/"
+                   "fonts/type1/public/sansmathfonts/"
+                   "fonts/vf/public/sansmathfonts/"
+                   "tex/latex/sansmathfonts/")
+             (base32
+              "19349dxvqiinhsihn83yfhl6pgcvkd48l37w5jh59myx7sc6p8j6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs
+     (list texlive-amsfonts texlive-cm texlive-ec texlive-metafont))
+    (home-page "https://ctan.org/pkg/sansmathfonts")
+    (synopsis "Correct placement of accents in sans-serif maths")
+    (description
+     "This package provides sans serif small caps and math fonts for use with
+Computer Modern.")
+    (license license:lppl1.3c)))
 
 (define-public texlive-stringenc
-  (let ((template (simple-texlive-package
-                   "texlive-stringenc"
-                   (list "/doc/latex/stringenc/README.md"
-                         "/source/latex/stringenc/stringenc.dtx")
-                   (base32
-                    "19sfi5jxldxmy79pxmapmgmn3iknf8wjczasvlrrwv0gyycxdzhw"))))
-    (package
-      (inherit template)
-      (outputs '("doc" "out"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "generic/stringenc")
-         ((#:build-targets _ #t)
-          '(list "stringenc.dtx"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/stringenc/")))
-             (add-after 'copy-files 'clean-up
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (delete-file-recursively
-                  (string-append (assoc-ref outputs "out") "/share/texmf-dist/build"))
-                 (delete-file
-                  (string-append (assoc-ref outputs "out") "/share/texmf-dist/stringenc.dtx"))
-                 (install-file
-                  (string-append (assoc-ref inputs "source") "/source/latex/stringenc/stringenc.dtx")
-                  (string-append (assoc-ref outputs "out") "/share/texmf-dist/source/latex/stringenc/"))
-                 (install-file
-                  (string-append (assoc-ref inputs "source") "/doc/latex/stringenc/README.md")
-                  (string-append (assoc-ref outputs "doc") "/doc/latex/stringenc/"))))))))
-      (home-page "https://www.ctan.org/pkg/stringenc")
-      (synopsis "Converting a string between different encodings")
-      (description
-       "This package provides @code{\\StringEncodingConvert} for converting a
+  (package
+    (name "texlive-stringenc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/stringenc/"
+                   "source/latex/stringenc/"
+                   "tex/generic/stringenc/")
+             (base32
+              "1pz9fgn3zc1brbpkw2kkphsv8q6vpvbn51n0smmfl1n2m97fni9j")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/stringenc")
+    (synopsis "Converting a string between different encodings")
+    (description
+     "This package provides @code{\\StringEncodingConvert} for converting a
 string between different encodings.  Both LaTeX and plain-TeX are supported.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
+
+(define-public texlive-svn-prov
+  (package
+    (name "texlive-svn-prov")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/svn-prov/" "source/latex/svn-prov/"
+                   "tex/latex/svn-prov/")
+             (base32
+              "1w416cf1yb1m2j9y38002zq6rbhbmkafi7w100y9m9lrzya0ws06")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/svn-prov")
+    (synopsis "Subversion variants of @code{\\Provides}... macros")
+    (description
+     "The package introduces Subversion variants of the standard LaTeX macros
+@code{\\ProvidesPackage}, @code{\\ProvidesClass} and @code{\\ProvidesFile}
+where the file name and date is extracted from Subversion Id keywords.  The
+file name may also be given explicitly as an optional argument.")
+    (license license:lppl)))
 
 (define-public texlive-l3build
-  (let ((template (simple-texlive-package
-                   "texlive-l3build"
-                   (list "/doc/latex/l3build/"
-                         "/doc/man/man1/l3build.1"
-                         "/scripts/l3build/"
-                         "/tex/latex/l3build/"
-                         ;; TODO: The dtx file builds only the documentation.
-                         ;; We avoid this for a simpler package definition,
-                         ;; but it may be possible to exclude
-                         ;; /doc/latex/l3build and the man page in the future.
-                         "/source/latex/l3build/")
-                   (base32
-                    "1fcay05jj53qgp2b98jpawi0id298fs5xc4y1r5krrfr4sp4hd59")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'install 'patch-shebangs-again
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 ;; XXX: Since the 'patch-shebangs' phase cannot change the
-                 ;; original source files patch the shebangs again here.
-                 (let* ((coreutils (assoc-ref inputs "coreutils"))
-                        (texlive-bin (assoc-ref inputs "texlive-bin"))
-                        (path (list (string-append coreutils "/bin")
-                                    (string-append texlive-bin "/bin"))))
-                   (for-each (lambda (file)
-                               (format #t "~a~%" file)
-                               (patch-shebang file path))
-                             (find-files (assoc-ref outputs "out")))
-                   #t)))))))
-      (inputs
-       (list coreutils texlive-bin))
-      (home-page "https://github.com/latex3/luaotfload")
-      (synopsis "Testing and building system for LaTeX")
-      (description
-       "The l3build module is designed to support the development of
+  (package
+    (name "texlive-l3build")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/l3build/"
+                   "doc/man/man1/l3build.1"
+                   "doc/man/man1/l3build.man1.pdf"
+                   "scripts/l3build/"
+                   "source/latex/l3build/"
+                   "tex/latex/l3build/")
+             (base32
+              "19iq80vj1glf35zcrspj1bnk6bf6yr3r3b2c5rgqhz58m2znsla0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "l3build.lua")))
+    (propagated-inputs (list texlive-luatex))
+    (home-page "https://ctan.org/pkg/l3build")
+    (synopsis "Testing and building system for LaTeX")
+    (description
+     "The @code{l3build} module is designed to support the development of
 high-quality LaTeX code by providing: a unit testing system, automated
 typesetting of code sources, and a reliable packaging system for CTAN
-releases.  The bundle consists of a Lua script to run the tasks and a
-@code{.tex} file which provides the testing environment.")
-      (license license:lppl1.3c+))))
+releases.  The bundle consists of a Lua script to run the tasks and
+a @file{.tex} file which provides the testing environment.")
+    (license license:lppl1.3c+)))
+
+(define-public texlive-luabidi
+  (package
+    (name "texlive-luabidi")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luabidi/"
+                   "tex/lualatex/luabidi/")
+             (base32
+              "1dwdiwsdfhgwpx8r2271i5kqphcpkh69y3rx1wxfr9hl17lzw2cp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luabidi")
+    (synopsis "Bidi functions for LuaTeX")
+    (description
+     "The package attempts to emulate the XeTeX @code{bidi} package, in the
+context of LuaTeX.")
+    (license (list license:lppl1.3c license:expat))))
+
+(define-public texlive-luacode
+  (package
+    (name "texlive-luacode")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luacode/"
+                   "source/lualatex/luacode/"
+                   "tex/lualatex/luacode/")
+             (base32
+              "1dyld5yb57p3j7wz591plbgjy7dk7ngn8cxw1lfmvx8iprgk1f8d")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luacode")
+    (synopsis "Helper for executing Lua code from within TeX")
+    (description
+     "Executing Lua code from within TeX with directlua can sometimes be
+tricky: there is no easy way to use the percent character, counting
+backslashes may be hard, and Lua comments don't work the way you expect.  The
+package provides the @code{\\luaexec} command and the @code{luacode}
+environments to help with these problems.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-lualatex-math
+  (package
+    (name "texlive-lualatex-math")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/lualatex-math/"
+                   "source/lualatex/lualatex-math/"
+                   "tex/lualatex/lualatex-math/")
+             (base32
+              "0rzzlq6a0c7sj1x83wqn5iwaiz3w9prcpz4lqbjlkgr7my4m052z")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs
+     (list texlive-etoolbox texlive-filehook))
+    (home-page "https://ctan.org/pkg/lualatex-math")
+    (synopsis "Fixes for mathematics-related LuaLaTeX issues")
+    (description
+     "The package patches a few commands of the LaTeX2e kernel and the
+@code{amsmath} and @code{mathtools} packages to be more compatible with the
+LuaTeX engine.  It is only meaningful for LuaLaTeX documents containing
+mathematical formulas, and does not exhibit any new functionality.  The fixes
+are mostly moved from the @code{unicode-math} package to this package since
+they are not directly related to Unicode mathematics typesetting.")
+    (license license:lppl1.3c)))
 
 (define-public texlive-lualibs
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-lualibs"
-      (list "doc/luatex/lualibs/"
-            "source/luatex/lualibs/"
-            "tex/luatex/lualibs/")
-      (base32 "0gf60vj9y75a7dlrmpbyqgsa00s1717r6if3lm5ldm41i9fm8ywz")
-      ;; The source dtx file only unpacks three files.  This is why we
-      ;; install all the files as they are, because there is no clear
-      ;; way to generate them all.
-      #:trivial? #true))
-    (home-page "https://ctan.org/macros/luatex/generic/lualibs")
+    (name "texlive-lualibs")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/lualibs/" "source/luatex/lualibs/"
+                   "tex/luatex/lualibs/")
+             (base32
+              "0x53z6072z8qpp5fh2g9blz95zg20906k82jk6hz1hibv70is0pk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
+    (native-inputs (list texlive-docstrip texlive-pdftex))
+    (home-page "https://ctan.org/pkg/lualibs")
     (synopsis "Additional Lua functions for LuaTeX macro programmers")
     (description
      "Lualibs is a collection of Lua modules useful for general programming.
-The bundle is based on Lua modules shipped with ConTeXt, and made available in
+The bundle is based on lua modules shipped with ConTeXt, and made available in
 this bundle for use independent of ConTeXt.")
-    ;; GPL version 2 only
     (license license:gpl2)))
 
 (define-deprecated-package texlive-luatex-lualibs texlive-lualibs)
 
 (define-public texlive-lua-alt-getopt
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-lua-alt-getopt"
-      (list "doc/support/lua-alt-getopt/" "scripts/lua-alt-getopt/")
-      (base32 "0cizxzn33n3pn98xkqnxb8s6vdwkar3xrwhraqrs05pjfdn9d4wz")
-      #:trivial? #t))
-    (home-page "https://ctan.org/support/lualibs/lua-alt-getopt")
-    (synopsis "Process application arguments the same way as getopt_long")
+    (name "texlive-lua-alt-getopt")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/lua-alt-getopt/"
+                   "scripts/lua-alt-getopt/")
+             (base32
+              "0cizxzn33n3pn98xkqnxb8s6vdwkar3xrwhraqrs05pjfdn9d4wz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
+    (home-page "https://ctan.org/pkg/lua-alt-getopt")
+    (synopsis "Process application arguments as @code{getopt_long}")
     (description
      "This package provides a Lua module for processing application arguments
 in the same way as BSD/GNU @code{getopt_long(3)} functions do.")
     (license license:expat)))
 
-;; TODO: We should be able to build this from the sources on Github with
-;; texlive-l3build, but I haven't been able to get it to work.
+(define-public texlive-luatex
+  (package
+    (name "texlive-luatex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/base/"
+                   "doc/man/man1/dviluatex.1"
+                   "doc/man/man1/dviluatex.man1.pdf"
+                   "doc/man/man1/luatex.1"
+                   "doc/man/man1/luatex.man1.pdf"
+                   "doc/man/man1/texlua.1"
+                   "doc/man/man1/texlua.man1.pdf"
+                   "doc/man/man1/texluac.1"
+                   "doc/man/man1/texluac.man1.pdf"
+                   "tex/generic/config/luatex-unicode-letters.tex"
+                   "tex/generic/config/luatexiniconfig.tex"
+                   "web2c/texmfcnf.lua")
+             (base32
+              "14ad9qr5dn0796f8gqbry5axdm2mciibcgzva8kas1vrqs5a9f19")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:texlive-latex-bin? #f
+           #:create-formats #~(list "dviluatex" "luatex")))
+    (propagated-inputs
+     (list texlive-cm
+           texlive-etex
+           texlive-hyphen-complete
+           texlive-knuth-lib
+           texlive-plain
+           texlive-tex-ini-files
+           texlive-unicode-data))
+    (home-page "https://ctan.org/pkg/luatex")
+    (synopsis "Extended version of pdfTeX using Lua")
+    (description
+     "LuaTeX is an extended version of pdfTeX using Lua as an embedded
+scripting language.  The LuaTeX project's main objective is to provide an open
+and configurable variant of TeX while at the same time offering downward
+compatibility.  LuaTeX uses Unicode (as UTF-8) as its default input encoding,
+and is able to use modern (OpenType) fonts (for both text and mathematics).
+It should be noted that LuaTeX is still under development; its specification
+has been declared stable, but absolute stability may not in practice be
+assumed.")
+    (license license:gpl2)))
+
+(define-public texlive-luatexbase
+  (package
+    (name "texlive-luatexbase")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+
+             name version
+             (list "doc/luatex/luatexbase/"
+                   "source/luatex/luatexbase/"
+                   "tex/luatex/luatexbase/")
+             (base32
+              "1nz2k9czqdmn08v75qa2bwanvcvyp9jmqcgwaxcy4fy4mpbrn8ra")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-ctablestack))
+    (home-page "https://ctan.org/pkg/luatexbase")
+    (synopsis "Basic resource management for LuaTeX code")
+    (description
+     "The LaTeX kernel builds in support for LuaTeX functionality, also
+available as @file{ltluatex.tex} for users of plain TeX and those with older
+LaTeX kernel implementations.  This support is based on ideas taken from the
+original @code{luatexbase} package, but there are interface differences.  This
+stub package provides a compatibility layer to allow existing packages to
+upgrade smoothly to the new support structure.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-luatex85
+  (package
+    (name "texlive-luatex85")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/luatex85/"
+                   "source/generic/luatex85/"
+                   "tex/generic/luatex85/")
+             (base32
+              "02j42g9c5smgbrk898fpvrgqlxqcqi8xch23awvnbvg6y54cs573")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luatex85")
+    (synopsis "pdfTeX aliases for LuaTeX")
+    (description
+     "The package provides emulation of pdfTeX primitives for LuaTeX v0.85+.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-luahbtex
+  (package
+    (name "texlive-luahbtex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/luahbtex.1"
+                   "doc/man/man1/luahbtex.man1.pdf")
+             (base32
+              "1hfawh7vig7jsmd1y0qlbn80x6770q56sqd9rx638js4p5a4di3l")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:texlive-latex-bin? #f
+      #:create-formats #~(list "luahbtex")))
+    (propagated-inputs
+     (list texlive-cm
+           texlive-etex
+           texlive-hyphen-complete
+           texlive-knuth-lib
+           texlive-luatex
+           texlive-plain
+           texlive-tex-ini-files
+           texlive-unicode-data))
+    (home-page "https://ctan.org/pkg/luahbtex")
+    (synopsis "LuaTeX with HarfBuzz library for glyph shaping")
+    (description
+     "LuaHBTeX is a LuaTeX variant that can use the HarfBuzz engine for glyph
+shaping, instead of LuaTeX's built-in shaper.")
+    (license (package-license texlive-luatex))))
+
+(define-public texlive-lua-uni-algos
+  (package
+    (name "texlive-lua-uni-algos")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/lua-uni-algos/"
+                   "tex/luatex/lua-uni-algos/")
+             (base32
+              "1dx70msqkj101mgj88b7fmb28bghlrrrcy5v66m74gqb5i41dnc2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
+    (home-page "https://ctan.org/pkg/lua-uni-algos")
+    (synopsis "Unicode algorithms for LuaTeX")
+    (description
+     "Lua code working with Unicode data has to deal with quite some
+challenges.  For example there are many canonically equivalent sequences which
+should be treated in the same way, and even identifying a single character
+becomes quite different once you have to deal with all kinds of combining
+characters, emoji sequences and syllables in different scripts.  Therefore
+@code{lua-uni-algos} wants to build a collection of small libraries
+implementing algorithms to deal with lots of the details in Unicode, such that
+authors of LuaTeX packages can focus on their actual functionality instead of
+having to fight against the peculiarities of Unicode.  Given that this package
+provides Lua modules, it is only useful in Lua(HB)TeX.  Additionally, it
+expects an up-to-date version of the unicode-data package to be present.  This
+package is intended for package authors only; no user-level functionality
+provided.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-luaotfload
-  (let ((template (simple-texlive-package
-                   "texlive-luaotfload"
-                   (list "/doc/luatex/luaotfload/"
-                         "/doc/man/man1/luaotfload-tool.1"
-                         "/doc/man/man5/luaotfload.conf.5"
-                         "/source/luatex/luaotfload/fontloader-reference-load-order.lua"
-                         "/source/luatex/luaotfload/fontloader-reference-load-order.tex"
-                         "/scripts/luaotfload/luaotfload-tool.lua"
-                         "/tex/luatex/luaotfload/")
-                   (base32
-                    "10wznvxx3qsl88n560py5vyx5r3a3914anbqfhwcmhmwg097xxl4")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (propagated-inputs
-       (list texlive-lua-alt-getopt ;for luaotfload-tool
-             texlive-lualibs))
-      (home-page "https://github.com/lualatex/luaotfload")
-      (synopsis "OpenType font loader for LuaTeX")
-      (description
-       "Luaotfload is an adaptation of the ConTeXt font loading system for the
+  (package
+    (name "texlive-luaotfload")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/luaotfload/"
+                   "doc/man/man1/luaotfload-tool.1"
+                   "doc/man/man1/luaotfload-tool.man1.pdf"
+                   "doc/man/man5/luaotfload.conf.5"
+                   "doc/man/man5/luaotfload.conf.man5.pdf"
+                   "scripts/luaotfload/"
+                   "source/luatex/luaotfload/"
+                   "tex/luatex/luaotfload/")
+             (base32
+              "0x0vigy6g5sf9n5113p8w885qy9w72skay09p3x6p510lpzaafj5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:texlive-latex-bin? #f
+           #:link-scripts #~(list "luaotfload-tool.lua")))
+    (propagated-inputs
+     (list texlive-lm
+           texlive-lua-alt-getopt
+           texlive-lua-uni-algos
+           texlive-lualibs))
+    (home-page "https://ctan.org/pkg/luaotfload")
+    (synopsis "OpenType font loader for LuaTeX")
+    (description
+     "Luaotfload is an adaptation of the ConTeXt font loading system for the
 Plain and LaTeX formats.  It allows OpenType fonts to be loaded with font
 features accessible using an extended font request syntax while providing
 compatibilitywith XeTeX.  By indexing metadata in a database it facilitates
 loading fonts by their proper names instead of file names.")
-      ;; GPL version 2 only
-      (license license:gpl2))))
+    (license license:gpl2)))
 
 (define-deprecated-package texlive-luatex-luaotfload texlive-luaotfload)
 
 (define-public texlive-amsmath
-  (let ((template (simple-texlive-package
-                   "texlive-amsmath"
-                   (list "/doc/latex/amsmath/"
-                         "/source/latex/amsmath/"
-                         ;; These two files are not generated from any of the
-                         ;; dtx/ins files.
-                         "/tex/latex/amsmath/amsmath-2018-12-01.sty"
-                         "/tex/latex/amsmath/amstex.sty")
-                   (base32
-                    "0gmdzhgr0h57xhsl61c5jsp4fj4pbmdr8p6k96am5jbyrbbx121q"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "latex/amsmath")
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/amsmath/")))
-             (add-before 'copy-files 'unchdir
-               (lambda _
-                 (chdir "../../..")))
-             (add-after 'copy-files 'delete-extra-files
-               (lambda* (#:key outputs #:allow-other-keys)
-                 (delete-file-recursively
-                  (string-append (assoc-ref outputs "out")
-                                 "/share/texmf-dist/source/latex/amsmath/build"))))))))
-      (propagated-inputs
-       (list texlive-amsfonts))
-      (home-page "https://www.ctan.org/pkg/amsmath")
-      (synopsis "AMS mathematical facilities for LaTeX")
-      (description
-       "This is the principal package in the AMS-LaTeX distribution.  It adapts
+  (package
+    (name "texlive-amsmath")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/amsmath/" "source/latex/amsmath/"
+                   "tex/latex/amsmath/")
+             (base32
+              "1x97wjj664hvj73k2ffg7xmllaqm25ikjm8rcfjs2q920f5ixw2h")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://www.ctan.org/pkg/amsmath")
+    (synopsis "AMS mathematical facilities for LaTeX")
+    (description
+     "This is the principal package in the AMS-LaTeX distribution.  It adapts
 for use in LaTeX most of the mathematical features found in AMS-TeX; it is
 highly recommended as an adjunct to serious mathematical typesetting in LaTeX.
-When amsmath is loaded, AMS-LaTeX packages @code{amsbsyamsbsy} (for bold
-symbols), @code{amsopnamsopn} (for operator names) and
-@code{amstextamstext} (for text embedded in mathematics) are also loaded.
-This package is part of the LaTeX required distribution; however, several
-contributed packages add still further to its appeal; examples are
-@code{empheqempheq}, which provides functions for decorating and highlighting
-mathematics, and @code{ntheoremntheorem}, for specifying theorem (and similar)
-definitions.")
-      (license license:lppl1.3c+))))
+When amsmath is loaded, AMS-LaTeX packages @code{amsbsy} (for bold symbols),
+@code{amsopn} (for operator names) and @code{amstext} (for text embedded in
+mathematics) are also loaded.  This package is part of the LaTeX required
+distribution; however, several contributed packages add still further to its
+appeal; examples are @code{empheq}, which provides functions for decorating
+and highlighting mathematics, and @code{ntheorem}, for specifying theorem (and
+similar) definitions.")
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-latex-amsmath texlive-amsmath)
 
+(define-public texlive-manfnt
+  (package
+    (name "texlive-manfnt")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/manfnt/" "source/latex/manfnt/"
+                   "tex/latex/manfnt/")
+             (base32
+              "0iwka406hkxb85yqg4kwr81483s3h250way1pmbfb67vl3x4p60x")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/manfnt")
+    (synopsis "LaTeX support for the TeX book symbols")
+    (description
+     "This package provides a LaTeX package for easy access to the symbols of
+the Knuth's manual font, such as the Dangerous Bend and Manual-errata Arrow.")
+    (license license:lppl)))
+
+(define-public texlive-manfnt-font
+  (package
+    (name "texlive-manfnt-font")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "fonts/afm/hoekwater/manfnt-font/"
+                   "fonts/map/dvips/manfnt-font/"
+                   "fonts/type1/hoekwater/manfnt-font/")
+             (base32
+              "1cdd2a3xj00bwsby9z5iz5f2iy2iwsjl35gcack9q83hacbf3ssb")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/manual")
+    (synopsis "Knuth's manual fonts")
+    (description
+     "This package provides Metafont (by Donald Knuth) and Adobe Type 1 (by
+Taco Hoekwater) versions of the font containing the odd symbols Knuth uses in
+his books.  LaTeX support is available using the @code{manfnt} package.")
+    (license license:knuth)))
+
 (define-public texlive-mathdots
-  (let ((template
-         (simple-texlive-package
-          "texlive-mathdots"
-          (list "doc/generic/mathdots/"
-                "source/generic/mathdots/"
-                "tex/generic/mathdots/")
-          (base32"1jaffj343p1chdxs2g7s6lpckvihk0jfw22nw0vmijyjxfiy9yg0"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/mathdots")
-         ((#:build-targets _ '())
-          '(list "mathdots.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/generic/mathdots")))
-              (replace 'copy-files
-                (lambda* (#:key inputs outputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append (assoc-ref outputs "out")
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append (assoc-ref outputs "doc")
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://ctan.org/macros/generic/mathdots")
-      (synopsis "Commands to produce dots in math that respect font size")
-      (description
-       "Mathdots redefines @code{\\ddots} and @code{\\vdots}, and defines
+  (package
+    (name "texlive-mathdots")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/mathdots/"
+                   "source/generic/mathdots/"
+                   "tex/generic/mathdots/")
+             (base32
+              "1jaffj343p1chdxs2g7s6lpckvihk0jfw22nw0vmijyjxfiy9yg0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mathdots")
+    (synopsis "Commands to produce dots in math that respect font size")
+    (description
+     "Mathdots redefines @code{\\ddots} and @code{\\vdots}, and defines
 @code{\\iddots}.  The dots produced by @code{\\iddots} slant in the opposite
 direction to @code{\\ddots}.  All the commands are designed to change size
 appropriately in scripts, as well as in response to LaTeX size changing
 commands.  The commands may also be used in plain TeX.")
-      (license license:lppl))))
+    (license license:lppl)))
 
 (define-public texlive-amscls
-  (let ((template (simple-texlive-package
-                   "texlive-amscls"
-                   (list "/doc/latex/amscls/"
-                         "/source/latex/amscls/"
-                         "/bibtex/bst/amscls/")
-                   (base32
-                    "0vw0b815slvfqfd8qffyfzb3xfvyv6k77m12xp0l67hs8p08s5b7"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "latex/amscls")
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/amscls/") #t))))))
-      (home-page "https://www.ctan.org/pkg/amscls")
-      (synopsis "AMS document classes for LaTeX")
-      (description
-       "This bundle contains three AMS classes: @code{amsartamsart} (for writing
-articles for the AMS), @code{amsbookamsbook} (for books) and
-@code{amsprocamsproc} (for proceedings), together with some supporting
-material.  The material is made available as part of the AMS-LaTeX
-distribution.")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-amscls")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bst/amscls/" "doc/latex/amscls/"
+                   "source/latex/amscls/" "tex/latex/amscls/")
+             (base32
+              "1chy1rqwici66p9brphb3gsprmcyhia9cvm5fn9wb5a9cchxqa08")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://www.ctan.org/pkg/amscls")
+    (synopsis "AMS document classes for LaTeX")
+    (description
+     "This bundle contains three AMS classes: @code{amsart} (for writing
+articles for the AMS), @code{amsbook} (for books) and @code{amsproc} (for
+proceedings), together with some supporting material.  The material is made
+available as part of the AMS-LaTeX distribution.")
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-latex-amscls texlive-amscls)
 
 (define-public texlive-babel
-  (let ((template (simple-texlive-package
-                   "texlive-babel"
-                   (list "/doc/latex/babel/"
-                         "/source/latex/babel/"
-                         "/makeindex/babel/")
-                   (base32
-                    "0qr5vjp79g1c1l6k173qhfdfabgbky73wymzhm56pazx4a8r08wz"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "generic/babel")
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/babel/")))
-             ;; This package tries to produce babel.aux twice but refuses to
-             ;; overwrite the first one.
-             (add-before 'build 'fix-ins
-               (lambda _
-                 (substitute* "babel.ins"
-                   (("askonceonly") "askforoverwritefalse"))))
-           (add-before 'copy-files 'unchdir
-             (lambda _
-               (chdir "../../..")))
-           (add-after 'copy-files 'delete-extra-files
-             (lambda* (#:key outputs #:allow-other-keys)
-               (delete-file-recursively
-                (string-append (assoc-ref outputs "out")
-                               "/share/texmf-dist/source/latex/babel/build"))
-               (delete-file
-                (string-append (assoc-ref outputs "out")
-                               "/share/texmf-dist/tex/generic/babel/bbind.ist"))
-               (delete-file
-                (string-append (assoc-ref outputs "out")
-                               "/share/texmf-dist/tex/generic/babel/bbglo.ist"))))
-             (add-after 'install 'install-locales
-               (lambda* (#:key outputs #:allow-other-keys)
-                 (let ((locale-directory
-                        (string-append (assoc-ref outputs "out")
-                                       "/share/texmf-dist/tex/generic/babel/locale/")))
-                   (mkdir-p locale-directory)
-                   (invoke "unzip" "locale.zip" "-d"
-                           locale-directory))))))))
-      (native-inputs
-       (list unzip))
-      (home-page "https://www.ctan.org/pkg/babel")
-      (synopsis "Multilingual support for Plain TeX or LaTeX")
-      (description
-       "The package manages culturally-determined typographical (and other)
+  (package
+    (name "texlive-babel")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/babel/"
+                   "makeindex/babel/"
+                   "source/latex/babel/"
+                   "tex/generic/babel/")
+             (base32
+              "18q99xgga4448vk7wf5r5ry79sx5ymqx0zd7v7l1c4wyyiv4riw9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:texlive-latex-bin? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; This package tries to produce babel.aux twice but refuses to
+          ;; overwrite the first one.
+          (add-before 'build 'fix-ins
+            (lambda _
+              (substitute* "source/latex/babel/babel.ins"
+                (("askonceonly") "askforoverwritefalse"))))
+          (add-before 'build 'generate-locales
+            (lambda _
+              (let ((locale-directory (string-append (getcwd) "/build/locale")))
+                (mkdir-p locale-directory)
+                (with-directory-excursion "source/latex/babel/"
+                  (invoke "unzip" "locale.zip" "-d" locale-directory))))))))
+    (native-inputs (list texlive-docstrip texlive-pdftex unzip))
+    (home-page "https://www.ctan.org/pkg/babel")
+    (synopsis "Multilingual support for Plain TeX or LaTeX")
+    (description
+     "The package manages culturally-determined typographical (and other)
 rules, and hyphenation patterns for a wide range of languages.  A document may
 select a single language to be supported, or it may select several, in which
 case the document may switch from one language to another in a variety of
 ways.  Babel uses contributed configuration files that provide the detail of
 what has to be done for each language.  Users of XeTeX are advised to use the
 polyglossia package rather than Babel.")
-      (license license:lppl1.3+))))
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-latex-babel texlive-babel)
 
+(define-public texlive-babelbib
+  (package
+    (name "texlive-babelbib")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bst/babelbib/"
+                   "doc/bibtex/babelbib/" "tex/latex/babelbib/")
+             (base32
+              "0q65qy0jmy98zfaha26b09hzr7v02jn8i6942y51hfaphbgh8kpx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/babelbib")
+    (synopsis "Multilingual bibliographies")
+    (description
+     "This package enables the user to generate multilingual bibliographies in
+cooperation with @code{babel}.  Two approaches are possible: each citation may
+be written in another language, or the whole bibliography can be typeset in
+a language chosen by the user.  In addition, the package supports commands to
+change the typography of the bibliographies.")
+    (license license:lppl1.0+)))
+
+(define-public texlive-barcodes
+  (package
+    (name "texlive-barcodes")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/barcodes/"
+                   "fonts/source/public/barcodes/"
+                   "fonts/tfm/public/barcodes/"
+                   "source/latex/barcodes/"
+                   "tex/latex/barcodes/")
+             (base32
+              "1bxvmmmb4x0zpdkqa399rwdhz6yamfzx2kn2i7a8vz172q0b2msc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-metafont))
+    (home-page "https://ctan.org/pkg/barcodes")
+    (synopsis "Fonts for making barcodes")
+    (description
+     "The package deals with EAN barcodes; Metafont sources for fonts are
+provided, and a set of examples; for some codes, a small Perl script is
+needed.")
+    (license license:lppl)))
+
+(define-public texlive-bbcard
+  (package
+    (name "texlive-bbcard")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/bbcard/" "metapost/bbcard/")
+             (base32
+              "1f1d3l85d0308izqpydmqmb4vpw47lqx1pwjiq14npjs8zfzkp18")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bbcard")
+    (synopsis "Bullshit bingo, calendar and baseball-score cards")
+    (description
+     "This set contains three jiffy packages for creating cards of various
+sorts with MetaPost.")
+    (license license:public-domain)))
+
+(define-public texlive-blockdraw-mp
+  (package
+    (name "texlive-blockdraw-mp")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/blockdraw_mp/"
+                   "metapost/blockdraw_mp/")
+             (base32
+              "1z0cgjslx4kx8fspf3i5h4idxlzhgpm14i16vq88c96z8cdjb2xy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/blockdraw_mp")
+    (synopsis "Block diagrams and bond graphs, with MetaPost")
+    (description
+     "This package provides a set of simple MetaPost macros to draw block
+diagrams and bond graphs. While the task is not itself difficult to program,
+it is felt that many users will be happy to have a library for the job.")
+    (license license:lppl)))
+
+(define-public texlive-blopentype
+  (package
+    (name "texlive-blopentype")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/blopentype/"
+                   "tex/luatex/blopentype/")
+             (base32
+              "1zz19a0glxad0bq8kpa2qlrmgysdlda1hpxacf3m42m9n3byrb75")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-gates texlive-texapi texlive-yax))
+    (home-page "https://ctan.org/pkg/blopentype")
+    (synopsis "Basic LuaTeX OpenType handler")
+    (description
+     "This is a basic LuaTeX OpenType handler, based on Paul Isambert's PiTeX
+code.")
+    (license (list license:lppl1.3c license:expat))))
+
+(define-public texlive-bookcover
+  (package
+    (name "texlive-bookcover")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/bookcover/"
+                   "source/latex/bookcover/"
+                   "tex/latex/bookcover/")
+             (base32
+              "0m5km26diwv7xij4r64c3gk2hl8xc22lrbcccqlrk1fhdlz3i8zb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bookcover")
+    (synopsis "Class for book covers and dust jackets")
+    (description "This class helps typesetting book covers and dust jackets.")
+    (license license:lppl1.2+)))
+
+(define-public texlive-bpolynomial
+  (package
+    (name "texlive-bpolynomial")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/bpolynomial/"
+                   "metapost/bpolynomial/")
+             (base32
+              "1p4c3xc55zij85yy1jhmj7jrkxss935qx5zdxbm79mjlxx1aq1q0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bpolynomial")
+    (synopsis "Drawing polynomial functions of up to order 3")
+    (description
+     "This MetaPost package helps plotting polynomial and root functions up to
+order three.  The package provides macros to calculate Bezier curves exactly
+matching a given constant, linear, quadratic or cubic polynomial, or square or
+cubic root function.  In addition, tangents on all functions and derivatives
+of polynomials can be calculated.")
+    (license license:lppl)))
+
+(define-public texlive-businesscard-qrcode
+  (package
+    (name "texlive-businesscard-qrcode")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/businesscard-qrcode/"
+                   "tex/xelatex/businesscard-qrcode/")
+             (base32
+              "0r942lv7mymi9wmmshjgf3vnz2n38m91dzqzrg0dg6bckb09dhmf")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/businesscard-qrcode")
+    (synopsis "Business cards with QR-Code")
+    (description
+     "This package generates a configurable business card or visiting card
+with full vcard as QR-Code, ready to send to online printers.  You can specify
+the exact size of the paper and the content within the paper, including
+generation of crop marks.")
+    (license license:lgpl3)))
+
+(define-public texlive-cmarrows
+  (package
+    (name "texlive-cmarrows")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/cmarrows/"
+                   "metapost/cmarrows/")
+             (base32
+              "1awyf474n4f6fivb7ih9mpmz6641f815in8qrg2biagys3czsq96")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/cmarrows")
+    (synopsis "MetaPost arrows and braces in the Computer Modern style")
+    (description
+     "This MetaPost package contains macros to draw arrows and braces in the
+Computer Modern style.")
+    (license license:lppl)))
+
+(define-public texlive-cmexb
+  (package
+    (name "texlive-cmexb")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/cmexb/" "fonts/map/dvips/cmexb/"
+                   "fonts/tfm/public/cmexb/"
+                   "fonts/type1/public/cmexb/")
+             (base32
+              "1fwnxzlkcf58n1f91vz8xbcp8nmhqmhjqhswgkzvyrd6lnp5gzdk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/cmexb")
+    (synopsis "@code{cmexb10} metrics and Type 1")
+    (description
+     "This package provides Computer Modern Math Extension bold, metrics and
+@file{.pfb} file.")
+    (license license:public-domain)))   ;see "README-cmexb"
+
+(define-public texlive-cqubeamer
+  (package
+    (name "texlive-cqubeamer")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/cqubeamer/"
+                   "tex/xelatex/cqubeamer/")
+             (base32
+              "13ma7i3z64w59m2hkrh68j3vqa2k93hhb2lmarqb4pkhr72vk4s7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/cqubeamer")
+    (synopsis "LaTeX Beamer Template for Chongqing University")
+    (description
+     "This package provides a LaTeX beamer template designed for researchers
+of Chongqing University.  It can be used for academic reports, conferences, or
+thesis defense, and can be helpful for delivering a speech.  It should be used
+with the XeTeX engine.")
+    (license (list license:expat license:cc-by4.0))))
+
 (define-public texlive-cs
   (package
-    (inherit (simple-texlive-package
-              "texlive-cs"
-              (list
-               "fonts/enc/dvips/cs/"
-               "fonts/map/dvips/cs/"
-               "fonts/source/public/cs/"
-               ;; TODO: Remove these pre-built files after the manual
-               ;; build below is fixed.
-               ;; The font fails to build from the Metafont sources, with
-               ;; errors such as:
-               ;; This is METAFONT, Version 2.71828182 (TeX Live 2021/GNU Guix) [...]
-               ;; (./csaccent.mf
-               ;; >> cap_curve#-dot_size#
-               ;; ! Unknown relation will be considered false.
-               ;; <to be read again>
-               "fonts/tfm/cs/cs-a35/"
-               "fonts/tfm/cs/cs-charter/"
-               "fonts/tfm/public/cs/"
-               "fonts/type1/public/cs/"
-               "fonts/vf/cs/cs-a35/")
-              (base32 "1ww5lrqja051fh0ygmfdyy5a6bhwq9k5zv857vwiqf5syvw5djps")
-              #:trivial? #t))
-    (home-page "https://petr.olsak.net/cstex/")
+    (name "texlive-cs")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "fonts/enc/dvips/cs/"
+                   "fonts/map/dvips/cs/"
+                   "fonts/source/public/cs/"
+                   "fonts/tfm/cs/cs-a35/"
+                   "fonts/tfm/cs/cs-charter/"
+                   "fonts/tfm/public/cs/"
+                   "fonts/type1/public/cs/"
+                   "fonts/vf/cs/cs-a35/"
+                   "fonts/vf/cs/cs-charter/")
+             (base32
+              "0nzzcg1yvbslhqm5lsfcpqh6sbzkmnmmgyakg9l8855qpa8g9bf3")))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:phases
+      ;; FIXME: The phase fails for multiple font files with error: "cannot
+      ;; find cmb12".
+      #~(modify-phases %standard-phases
+          (delete 'generate-font-metrics))))
+    (native-inputs (list texlive-cm texlive-metafont))
+    (propagated-inputs (list texlive-cmexb))
+    (home-page "https://ctan.org/pkg/csfonts")
     (synopsis "Czech/Slovak-tuned Computer Modern fonts")
     (description "This package provides Czech/Slovak-tuned Computer Modern
 fonts in the Metafont format; Type 1 format versions (csfonts-t1) are also
@@ -4634,355 +13427,382 @@ available.")
 ;;; its license.
 (define-public texlive-csplain
   (package
-    (inherit (simple-texlive-package
-              "texlive-csplain"
-              (list "tex/csplain/base/")
-              (base32 "0cgrwc8lgf2x2hq6bb4kqxw597card985zdd9ipn7k98mmwrxhz3")
-              #:trivial? #t))
+    (name "texlive-csplain")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/csplain/base/"
+                   "tex/csplain/fonts/"
+                   "tex/csplain/opmac/")
+             (base32
+              "14z479gkiwgw17pdghrxh5q0rlxnij7ccj49kgf3macwgmh5lm0r")))
+    (arguments
+     (list #:create-formats #~(list "csplain" "luacsplain" "pdfcsplain")))
+    (build-system texlive-build-system)
+    (propagated-inputs
+     (list texlive-cm
+           texlive-cs
+           texlive-enctex
+           texlive-hyphen-complete
+           texlive-luatex
+           texlive-luatex85
+           texlive-plain
+           texlive-tex
+           texlive-tex-ini-files))
     (home-page "https://petr.olsak.net/csplain-e.html")
     (synopsis "Plain TeX multilanguage support")
-    (description "CSplain is a small extension of basic Plain TeX macros from
-which the formats @code{csplain} and @code{pdfcsplain} can be generated.  It
-supports: hyphenation of words for 50+ languages, simple and powerful font
-loading system (various sizes of fonts), TeX, pdfTeX, XeTeX and LuaTeX
-engines, math fonts simply loaded with full amstex-like features, three
-internal encodings (IL2 for Czech/Slovak languages, T1 for many languages with
-latin alphabet and Unicode in new TeX engines), natural UTF-8 input in pdfTeX
-using encTeX without any active characters, Czech and Slovak special
-typesetting features.  An important part of the package is OPmac, which
-implements most of LaTeX's features (sectioning, font selection, color, hyper
-reference and URLs, bibliography, index, table of contents, tables, etc.) by
-Plain TeX macros.  The OPmac macros can generate a bibliography without any
-external program.")
+    (description
+     "CSplain is a small extension of basic Plain TeX macros from which the
+formats @code{csplain} and @code{pdfcsplain} can be generated.  It supports:
+hyphenation of words for 50+ languages, simple and powerful font loading
+system (various sizes of fonts), TeX, pdfTeX, XeTeX and LuaTeX engines, math
+fonts simply loaded with full amstex-like features, three internal
+encodings (IL2 for Czech/Slovak languages, T1 for many languages with latin
+alphabet and Unicode in new TeX engines), natural UTF-8 input in pdfTeX using
+encTeX without any active characters, Czech and Slovak special typesetting
+features.  An important part of the package is OPmac, which implements most of
+LaTeX's features (sectioning, font selection, color, hyper reference and URLs,
+bibliography, index, table of contents, tables, etc.) by Plain TeX macros.
+The OPmac macros can generate a bibliography without any external program.")
     ;; This custom permissive license includes as a redistribution condition
     ;; that says the package must be renamed from 'csplain' if it is modified.
     (license (license:non-copyleft "file:///tex/csplain/base/csplain.ini"))))
 
-(define-public texlive-generic-babel-english
+(define-public texlive-ctable
   (package
-    (name "texlive-generic-babel-english")
+    (name "texlive-ctable")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "generic" "babel-english"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1s404wbx91z5w65hm024kyl4h56zsa096irx18vsx8jvlmwsr5wc"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ctable/" "source/latex/ctable/"
+                   "tex/latex/ctable/")
+             (base32
+              "1x624vz1gv8bsdafwhx89zaic7f2mz9vlvwjpv8fwzjhjwx4lxmv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ctable")
+    (synopsis "Flexible typesetting of table and figure floats")
+    (description
+     "This package provides commands to typeset centered, left- or
+right-aligned table and (multiple-)figure floats, with footnotes.")
+    (license license:lppl)))
+
+(define-public texlive-babel-basque
+  (package
+    (name "texlive-babel-basque")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/babel-basque/"
+                   "source/generic/babel-basque/"
+                   "tex/generic/babel-basque/")
+             (base32
+              "16bcy5wlkwh8cwvcff1sc3m4rq4a7fzzawpl158kscp7fmw7i7k4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/babel-basque")
+    (synopsis "Babel contributed support for Basque")
+    (description "The package establishes Basque conventions in a document.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-babel-english
+  (package
+    (name "texlive-babel-english")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/babel-english/"
+                   "source/generic/babel-english/"
+                   "tex/generic/babel-english/")
+             (base32
+              "0fh8xxxh79za80yvgypf8clzj0lk237lfyqfkl233id9rlias08d")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "generic/babel-english"))
-    (home-page "https://www.ctan.org/pkg/babel-english")
+    (home-page "https://ctan.org/pkg/babel-english")
     (synopsis "Babel support for English")
     (description
-     "This package provides the language definition file for support of
-English in @code{babel}.  Care is taken to select British hyphenation patterns
-for British English and Australian text, and default (\"american\") patterns
-for Canadian and USA text.")
+     "The package provides the language definition file for support of
+English in @code{babel}.  Care is taken to select british hyphenation patterns
+for British English and Australian text, and default (american) patterns for
+Canadian and USA text.")
     (license license:lppl1.3+)))
 
+(define-deprecated-package texlive-generic-babel-english texlive-babel-english)
+
 (define-public texlive-babel-french
-  (let ((template
-         (simple-texlive-package
-          "texlive-babel-french"
-          (list "doc/generic/babel-french/"
-                "source/generic/babel-french/"
-                "tex/generic/babel-french/")
-          (base32 "0cgn4dq5wnlfh9wddjzxsf7p56pk29lyndg56zg6558y7xf67cw8"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/babel-french")
-         ((#:build-targets _ '())
-          ;; TODO: use dtx and build documentation.
-          '(list "frenchb.ins"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/generic/babel-french")))
-             (replace 'copy-files
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (let ((origin (assoc-ref inputs "source"))
-                       (source (string-append (assoc-ref outputs "out")
-                                              "/share/texmf-dist/source"))
-                       (doc (string-append (assoc-ref outputs "doc")
-                                           "/share/texmf-dist/doc")))
-                   (copy-recursively (string-append origin "/source") source)
-                   (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://ctan.org/macros/latex/contrib/babel-contrib/french")
-      (synopsis "Babel contributed support for French")
-      (description
-       "The package, formerly known as frenchb, establishes French conventions
-in a document (or a subset of the conventions, if French is not the main
-language of the document).")
-      (license license:lppl1.3+))))
+  (package
+    (name "texlive-babel-french")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/babel-french/"
+                   "source/generic/babel-french/"
+                   "tex/generic/babel-french/")
+             (base32
+              "1p0gprdfvfincbkvqbc4bpyx6jf483k798hz5psg04rhmx5hi4wl")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/babel-french")
+    (synopsis "Babel contributed support for French")
+    (description
+     "The package establishes French conventions in a document (or a subset of
+the conventions, if French is not the main language of the document).")
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-generic-babel-french texlive-babel-french)
 
-(define-public texlive-generic-babel-german
+(define-public texlive-babel-german
   (package
-    (name "texlive-generic-babel-german")
+    (name "texlive-babel-german")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "generic" "babel-german"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1x9hnr9gz5mqdb97cinivn9xjnfr4qi996aa4cnr2sm2dsbhqxnp"))))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/babel-german/"
+                   "source/generic/babel-german/"
+                   "tex/generic/babel-german/")
+             (base32
+              "0iwnn35xnpczi2gxrzrgyilh30qbnj6w05p3q0gvcmnisawfva9q")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "generic/babel-german"))
-    (home-page "https://www.ctan.org/pkg/babel-german")
-    (synopsis "Babel support for German")
+    (home-page "https://ctan.org/pkg/babel-german")
+    (synopsis "Babel support for documents written in German")
     (description
-     "This package provides the language definition file for support of German
-in @code{babel}.  It provides all the necessary macros, definitions and
-settings to typeset German documents.  The bundle includes support for the
-traditional and reformed German orthography as well as for the Austrian and
-Swiss varieties of German.")
+     "This bundle is an extension to the babel package for multilingual typesetting.
+It provides all the necessary macros, definitions and settings to typeset
+German documents.  The bundle includes support for the traditional and
+reformed German orthography as well as for the Austrian and Swiss varieties of
+German.")
+    (license license:lppl1.3+)))
+
+(define-deprecated-package texlive-generic-babel-german texlive-babel-german)
+
+(define-public texlive-babel-hungarian
+  (package
+    (name "texlive-babel-hungarian")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/babel-hungarian/"
+                   "tex/generic/babel-hungarian/")
+             (base32
+              "1x54clczgvkq9slq5331hvp1rzlv4jm4g9gnpflz8y72jbqmcm24")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/babel-hungarian")
+    (synopsis "Babel support for Hungarian (Magyar)")
+    (description
+     "The package provides a language definition file that enables support of
+Magyar (Hungarian) with Babel.")
+    (license license:lppl)))
+
+(define-public texlive-babel-italian
+  (package
+    (name "texlive-babel-italian")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/babel-italian/"
+                   "source/generic/babel-italian/"
+                   "tex/generic/babel-italian/")
+             (base32
+              "04bj2igc4m59nsax2563dzkzk3f4rvfc8aph35x663a8rf70bvjy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/babel-italian")
+    (synopsis "Babel support for Italian text")
+    (description "The package provides language definitions for use in
+Babel.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-babel-portuges
+  (package
+    (name "texlive-babel-portuges")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/babel-portuges/"
+                   "source/generic/babel-portuges/"
+                   "tex/generic/babel-portuges/")
+             (base32
+              "0619ygyjz5vz3a6khx7yvsa059x59r54fgyxb0p8k196lss07lq2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/babel-portuges")
+    (synopsis "Babel support for Portuges")
+    (description
+     "The package provides the language definition file for support of
+Portuguese and Brazilian Portuguese in Babel.  Some shortcuts are defined, as
+well as translations to Portuguese of standard LaTeX names.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-babel-spanish
+  (package
+    (name "texlive-babel-spanish")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/babel-spanish/"
+                   "source/generic/babel-spanish/"
+                   "tex/generic/babel-spanish/")
+             (base32
+              "0nzc4hs91a901cjy2vhpamdw3gyxp7k2lmag9ni8zmy180zncm5g")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/babel-spanish")
+    (synopsis "Babel support for Spanish")
+    (description
+     "This bundle provides the means to typeset Spanish text, with the support
+provided by the LaTeX standard package Babel.  Note that separate support is
+provided for those who wish to typeset Spanish as written in Mexico.")
     (license license:lppl1.3+)))
 
 (define-public texlive-babel-swedish
-  (let ((template (simple-texlive-package
-                   "texlive-babel-swedish"
-                   (list "/source/generic/babel-swedish/")
-                   (base32
-                    "03rp4n9wkqyckman765r8v8j2pg5fg9frbfxsnhq0i2mr0yhbr6v"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/babel-swedish")
-         ((#:build-targets _ '())
-          ''("swedish.ins")) ; TODO: use dtx and build documentation
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/generic/babel-swedish")))))))
-      (home-page "https://www.ctan.org/pkg/babel-swedish")
-      (synopsis "Babel support for Swedish")
-      (description "This package provides the language definition file for
-support of Swedish in @code{babel}.  It provides all the necessary macros,
-definitions and settings to typeset Swedish documents.")
-      (license license:lppl1.3c+))))
-
-(define-public texlive-latex-cyrillic
-  (package
-    (name "texlive-latex-cyrillic")
+  (package
+    (name "texlive-babel-swedish")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "cyrillic"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "083xbwg7hrnlv47fkwvz8yjb830bhxx7y0mq7z7nz2f96y2ldr6b"))))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/babel-swedish/"
+                   "source/generic/babel-swedish/"
+                   "tex/generic/babel-swedish/")
+             (base32
+              "0qi2rzhlxikabrk9n0096inbczgp5hwghvy5zn0mph8zmsxlfbdf")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/babel-swedish")
+    (synopsis "Babel support for typesetting Swedish")
+    (description
+     "The package provides the language definition file for Swedish.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-cyrillic-bin
+  (package
+    (name "texlive-cyrillic-bin")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/rubibtex.1"
+                   "doc/man/man1/rubibtex.man1.pdf"
+                   "doc/man/man1/rumakeindex.1"
+                   "doc/man/man1/rumakeindex.man1.pdf"
+                   "scripts/texlive-extra/rubibtex.sh"
+                   "scripts/texlive-extra/rumakeindex.sh")
+             (base32
+              "09l5f7l91ph6sqfp2ia3yn23pa3s4cyfgyn020ncqvapg00s0mmg")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (arguments
-     '(#:tex-directory "latex/cyrillic"))
-    (home-page "https://www.ctan.org/pkg/latex-cyrillic")
+     (list
+      #:link-scripts #~(list "rubibtex.sh" "rumakeindex.sh")
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'patch-shell-scripts
+            (lambda _
+              (with-directory-excursion "scripts/texlive-extra/"
+                (with-fluids ((%default-port-encoding "ISO-8859-1"))
+                  (substitute* (list "rubibtex.sh" "rumakeindex.sh")
+                    (("\\b(basename|cat|mkdir|rm|sed)\\b" _ command)
+                     (which command))))))))))
+    (home-page "https://ctan.org/pkg/cyrillic-bin")
+    (synopsis "Cyrillic BibTeX and MakeIndex")
+    (description
+     "This package provides scripts for Cyrillic versions of BibTeX and
+MakeIndex.")
+    (license license:public-domain)))
+
+(define-public texlive-cyrillic
+  (package
+    (name "texlive-cyrillic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/cyrillic/"
+                   "source/latex/cyrillic/"
+                   "tex/latex/cyrillic/")
+             (base32
+              "08v670f7s74klnac7pzqsad9m4jsxfkckzkswxb94xxd61kanzdx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:tex-engine "tex"
+           #:tex-format #f))
+    (native-inputs (list texlive-docstrip))
+    (propagated-inputs (list texlive-cyrillic-bin))
+    (home-page "https://ctan.org/pkg/cyrillic")
     (synopsis "Support for Cyrillic fonts in LaTeX")
     (description
      "This bundle of macros files provides macro support (including font
 encoding macros) for the use of Cyrillic characters in fonts encoded under the
-T2* and X2 encodings. These encodings cover (between them) pretty much every
+T2* and X2 encodings.  These encodings cover (between them) pretty much every
 language that is written in a Cyrillic alphabet.")
-    (license license:lppl1.3c+)))
+    (license license:lppl1.3+)))
+
+(define-deprecated-package texlive-latex-cyrillic texlive-cyrillic)
+
+(define-public texlive-passivetex
+  (package
+    (name "texlive-passivetex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/xmltex/passivetex/")
+             (base32
+              "1h49v6sqbm27isfwwcql9dzxn4vmcn2algkqh7f1pzj860xw3ygn")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/passivetex")
+    (synopsis "Support package for XML/SGML typesetting")
+    (description
+     "This is a set of packages providing XML parsing, UTF-8 parsing,
+Unicode entities, and common formatting object definitions for JadeTeX.")
+    ;; License given in "tex/xmltex/passivetex/mlnames.sty".
+    (license license:lppl1.0+)))
 
 (define-public texlive-pict2e
-  (let ((template (simple-texlive-package
-                   "texlive-pict2e"
-                   (list "doc/latex/pict2e/"
-                         "source/latex/pict2e/"
-                         "tex/latex/pict2e/")
-                   (base32
-                    "0pazv1khsgjhxc673qrhjrbzlkgmcj53qccb9hw7ygdajxrjc2ba"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t) "latex/pict2e")
-         ((#:build-targets _ '()) '(list "pict2e.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _ (chdir "source/latex/pict2e/")))
-              (add-after 'build 'build-doc
-                (lambda _
-                  (copy-file "p2e-drivers.dtx" "build/p2e-drivers.dtx")
-                  (with-directory-excursion "build"
-                    (invoke "pdflatex" "p2e-drivers.dtx")
-                    (delete-file "p2e-drivers.dtx")
-                    ;; texlive.tlpbd expects a "pict2e.cfg" configuration file
-                    ;; instead of "pict2e-example.cfg".  Please it.
-                    (rename-file "pict2e-example.cfg" "pict2e.cfg"))))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://ctan.org/pkg/pict2e")
-      (native-inputs
-       (list (texlive-updmap.cfg)))
-      (synopsis "New implementation of picture commands")
-      (description
-       "This package extends the existing LaTeX @code{picture} environment,
+  (package
+    (name "texlive-pict2e")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pict2e/"
+                   "source/latex/pict2e/"
+                   "tex/latex/pict2e/")
+             (base32
+              "0pazv1khsgjhxc673qrhjrbzlkgmcj53qccb9hw7ygdajxrjc2ba")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pict2e")
+    (synopsis "New implementation of @code{picture} commands")
+    (description
+     "This package extends the existing LaTeX @code{picture} environment,
 using the familiar technique (the @code{graphics} and @code{color} packages)
 of driver files (at present, drivers for dvips, pdfTeX, LuaTeX, XeTeX, VTeX,
 dvipdfm, and dvipdfmx are available).  The package documentation has a fair
 number of examples of use, showing where things are improved by comparison
 with the LaTeX @code{picture} environment.")
-      (license license:lppl1.3+))))
+    (license license:lppl1.3+)))
 
 (define-public texlive-psnfss
-  (let ((template (simple-texlive-package
-                   "texlive-psnfss"
-                   (list "/doc/latex/psnfss/"
-                         "/source/latex/psnfss/"
-                         "/fonts/map/dvips/psnfss/"
-
-                         ;; Only the .sty files are generated from the sources.
-                         "/tex/latex/psnfss/8rbch.fd"
-                         "/tex/latex/psnfss/8rpag.fd"
-                         "/tex/latex/psnfss/8rpbk.fd"
-                         "/tex/latex/psnfss/8rpcr.fd"
-                         "/tex/latex/psnfss/8rphv.fd"
-                         "/tex/latex/psnfss/8rpnc.fd"
-                         "/tex/latex/psnfss/8rppl.fd"
-                         "/tex/latex/psnfss/8rptm.fd"
-                         "/tex/latex/psnfss/8rput.fd"
-                         "/tex/latex/psnfss/8rpzc.fd"
-                         "/tex/latex/psnfss/omlbch.fd"
-                         "/tex/latex/psnfss/omlpag.fd"
-                         "/tex/latex/psnfss/omlpbk.fd"
-                         "/tex/latex/psnfss/omlpcr.fd"
-                         "/tex/latex/psnfss/omlphv.fd"
-                         "/tex/latex/psnfss/omlpnc.fd"
-                         "/tex/latex/psnfss/omlppl.fd"
-                         "/tex/latex/psnfss/omlptm.fd"
-                         "/tex/latex/psnfss/omlptmcm.fd"
-                         "/tex/latex/psnfss/omlput.fd"
-                         "/tex/latex/psnfss/omlpzc.fd"
-                         "/tex/latex/psnfss/omlzplm.fd"
-                         "/tex/latex/psnfss/omlzpple.fd"
-                         "/tex/latex/psnfss/omlztmcm.fd"
-                         "/tex/latex/psnfss/omsbch.fd"
-                         "/tex/latex/psnfss/omspag.fd"
-                         "/tex/latex/psnfss/omspbk.fd"
-                         "/tex/latex/psnfss/omspcr.fd"
-                         "/tex/latex/psnfss/omsphv.fd"
-                         "/tex/latex/psnfss/omspnc.fd"
-                         "/tex/latex/psnfss/omsppl.fd"
-                         "/tex/latex/psnfss/omsptm.fd"
-                         "/tex/latex/psnfss/omsput.fd"
-                         "/tex/latex/psnfss/omspzc.fd"
-                         "/tex/latex/psnfss/omspzccm.fd"
-                         "/tex/latex/psnfss/omszplm.fd"
-                         "/tex/latex/psnfss/omszpple.fd"
-                         "/tex/latex/psnfss/omsztmcm.fd"
-                         "/tex/latex/psnfss/omxpsycm.fd"
-                         "/tex/latex/psnfss/omxzplm.fd"
-                         "/tex/latex/psnfss/omxzpple.fd"
-                         "/tex/latex/psnfss/omxztmcm.fd"
-                         "/tex/latex/psnfss/ot1bch.fd"
-                         "/tex/latex/psnfss/ot1pag.fd"
-                         "/tex/latex/psnfss/ot1pbk.fd"
-                         "/tex/latex/psnfss/ot1pcr.fd"
-                         "/tex/latex/psnfss/ot1phv.fd"
-                         "/tex/latex/psnfss/ot1pnc.fd"
-                         "/tex/latex/psnfss/ot1ppl.fd"
-                         "/tex/latex/psnfss/ot1pplj.fd"
-                         "/tex/latex/psnfss/ot1pplx.fd"
-                         "/tex/latex/psnfss/ot1ptm.fd"
-                         "/tex/latex/psnfss/ot1ptmcm.fd"
-                         "/tex/latex/psnfss/ot1put.fd"
-                         "/tex/latex/psnfss/ot1pzc.fd"
-                         "/tex/latex/psnfss/ot1zplm.fd"
-                         "/tex/latex/psnfss/ot1zpple.fd"
-                         "/tex/latex/psnfss/ot1ztmcm.fd"
-                         "/tex/latex/psnfss/t1bch.fd"
-                         "/tex/latex/psnfss/t1pag.fd"
-                         "/tex/latex/psnfss/t1pbk.fd"
-                         "/tex/latex/psnfss/t1pcr.fd"
-                         "/tex/latex/psnfss/t1phv.fd"
-                         "/tex/latex/psnfss/t1pnc.fd"
-                         "/tex/latex/psnfss/t1ppl.fd"
-                         "/tex/latex/psnfss/t1pplj.fd"
-                         "/tex/latex/psnfss/t1pplx.fd"
-                         "/tex/latex/psnfss/t1ptm.fd"
-                         "/tex/latex/psnfss/t1put.fd"
-                         "/tex/latex/psnfss/t1pzc.fd"
-                         "/tex/latex/psnfss/ts1bch.fd"
-                         "/tex/latex/psnfss/ts1pag.fd"
-                         "/tex/latex/psnfss/ts1pbk.fd"
-                         "/tex/latex/psnfss/ts1pcr.fd"
-                         "/tex/latex/psnfss/ts1phv.fd"
-                         "/tex/latex/psnfss/ts1pnc.fd"
-                         "/tex/latex/psnfss/ts1ppl.fd"
-                         "/tex/latex/psnfss/ts1pplj.fd"
-                         "/tex/latex/psnfss/ts1pplx.fd"
-                         "/tex/latex/psnfss/ts1ptm.fd"
-                         "/tex/latex/psnfss/ts1put.fd"
-                         "/tex/latex/psnfss/ts1pzc.fd"
-                         "/tex/latex/psnfss/ufplm.fd"
-                         "/tex/latex/psnfss/ufplmbb.fd"
-                         "/tex/latex/psnfss/upsy.fd"
-                         "/tex/latex/psnfss/upzd.fd")
-                   (base32
-                    "11f14dzhwsy4pli21acccip43d36nf3pac33ihjffnps1i2mhqkd"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "latex/psnfss")
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _
-                 (chdir "source/latex/psnfss")))
-             (add-after 'install 'chdir-back
-               (lambda _
-                 (chdir "../../..")))
-             (add-after 'chdir-back 'clean-installed-files
-               (lambda _
-                 ;; Remove the generated .sty files from the build area as
-                 ;; these were already copied to the default output in the
-                 ;; "install" phase.
-                 (delete-file-recursively "source/latex/psnfss/build")))
-             (add-after 'clean-installed-files 'move-doc-files
-               (lambda* (#:key outputs #:allow-other-keys)
-                 (let* ((doc (assoc-ref outputs "doc"))
-                        (doc-root (string-append doc "/share/texmf-dist"))
-                        (doc-path "doc/latex/psnfss")
-                        (source-path "source/latex/psnfss"))
-                   ;; Move the PDF documentation to the "doc" output.
-                   (let* ((file-name "psnfss2e.pdf")
-                          (source (string-append doc-path "/" file-name))
-                          (target-dir (string-append doc-root "/" doc-path)))
-                     (mkdir-p target-dir)
-                     (copy-file source
-                                (string-append target-dir "/" file-name))
-                     (delete-file source))
-
-                   ;; Keep the remaining files together with the package's
-                   ;; source, as per the installation instructions.
-                   (copy-recursively doc-path source-path)
-                   (delete-file-recursively "doc"))))))))
-      (native-inputs
-       (list texlive-cm))
-      (home-page "https://www.ctan.org/pkg/psnfss")
-      (synopsis "Font support for common PostScript fonts")
-      (description
-       "The PSNFSS collection includes a set of files that provide a complete
+  (package
+    (name "texlive-psnfss")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/psnfss/"
+                   "fonts/map/dvips/psnfss/"
+                   "source/latex/psnfss/"
+                   "tex/latex/psnfss/")
+             (base32
+              "17zxqz32ky99z22yaqayg9ih8lyaswi97d34jykc0s12w4k4i97c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs
+     (list texlive-cm))
+    (propagated-inputs
+     (list texlive-graphics texlive-symbol texlive-zapfding))
+    (home-page "https://www.ctan.org/pkg/psnfss")
+    (synopsis "Font support for common PostScript fonts")
+    (description
+     "The PSNFSS collection includes a set of files that provide a complete
 working setup of the LaTeX font selection scheme (NFSS2) for use with common
 PostScript fonts.  The base set of text fonts covered by PSNFSS includes the
 AvantGarde, Bookman, Courier, Helvetica, New Century Schoolbook, Palatino,
@@ -4993,235 +13813,131 @@ Helvetica to be loaded with its size scaled to something more appropriate for
 use as a Sans-Serif font to match Times, while @code{pifont} provides the
 means to select single glyphs from symbol fonts.  The bundle as a whole is
 part of the LaTeX required set of packages.")
-      (license license:lppl1.2+))))
+    (license license:lppl1.2+)))
 
 (define-deprecated-package texlive-latex-psnfss texlive-psnfss)
 
-;; For user profiles
-(define-public texlive-base
-  (let ((default-packages
-          (list texlive-bin
-                texlive-dvips
-                texlive-fontname
-                texlive-cm
-                texlive-cm-super ; to avoid bitmap fonts
-                texlive-fonts-latex
-                texlive-graphics
-                texlive-metafont
-                texlive-latex-base
-                texlive-kpathsea       ;for mktex.opt
-                ;; LaTeX packages from the "required" set.
-                texlive-amsmath
-                texlive-amscls
-                texlive-babel
-                texlive-generic-babel-english
-                texlive-latex-cyrillic
-                texlive-psnfss
-                texlive-tools
-                texlive-tetex)))
-    (package
-      (name "texlive-base")
-      (version (number->string %texlive-revision))
-      (source #f)
-      (build-system trivial-build-system)
-      (arguments
-       '(#:builder
-         (begin (mkdir (assoc-ref %outputs "out")))))
-      (propagated-inputs
-       (map (lambda (package)
-              (list (package-name package) package))
-            default-packages))
-      (home-page (package-home-page texlive-bin))
-      (synopsis "TeX Live base packages")
-      (description "This is a very limited subset of the TeX Live distribution.
-It includes little more than the required set of LaTeX packages.")
-      (license (fold (lambda (package result)
-                       (match (package-license package)
-                         ((lst ...)
-                          (append lst result))
-                         ((? license:license? license)
-                          (cons license result))))
-                     '()
-                     default-packages)))))
-
-(define-public texlive-default-updmap.cfg
-  (origin
-    (method url-fetch)
-    (uri (string-append "https://tug.org/svn/texlive/tags/"
-                        %texlive-tag "/Master/texmf-dist/web2c/updmap.cfg"
-                        "?revision=" (number->string %texlive-revision)))
-    (file-name (string-append "updmap.cfg-"
-                              (number->string %texlive-revision)))
-    (sha256
-     (base32
-      "0zhpyld702im6352fwp41f2hgfkpj2b4j1kfsjqbkijlcmvb6w2c"))))
-
-;;; TODO: Add a TeX Live profile hook computing fonts maps (and others?)
-;;; configuration from the packages in the profile, similar to what's done
-;;; below.
-(define-public texlive-updmap.cfg
-  (lambda* (#:optional (packages '()))
-    "Return a 'texlive-updmap.cfg' package which contains the fonts map
-configuration of a base set of packages plus PACKAGES."
-    (let ((default-packages (match (package-propagated-inputs texlive-base)
-                              (((labels packages) ...) packages))))
-      (package
-        (version (number->string %texlive-revision))
-        (source (origin
-                  (method url-fetch)
-                  (uri (string-append "https://tug.org/svn/texlive/tags/"
-                                      %texlive-tag
-                                      "/Master/texmf-dist/web2c/updmap.cfg"
-                                      "?revision=" version))
-                  (file-name "updmap.cfg")
-                  (sha256
-                   (base32
-                    "0zhpyld702im6352fwp41f2hgfkpj2b4j1kfsjqbkijlcmvb6w2c"))))
-        (name "texlive-updmap.cfg")
-        (build-system copy-build-system)
-        (arguments
-         '(#:modules ((guix build copy-build-system)
-                      (guix build utils)
-                      (ice-9 popen)
-                      (ice-9 textual-ports))
-           #:install-plan '(("updmap.cfg" "share/texmf-config/web2c/")
-                            ("map" "share/texmf-dist/fonts/map"))
-           #:phases
-           (modify-phases %standard-phases
-             (add-before 'install 'regenerate-updmap.cfg
-               (lambda _
-                 (make-file-writable "updmap.cfg")
-
-                 ;; Disable unavailable map files.
-                 (let* ((port (open-pipe* OPEN_WRITE "updmap-sys"
-                                          "--syncwithtrees"
-                                          "--nohash"
-                                          "--cnffile" "updmap.cfg")))
-                   (display "Y\n" port)
-                   (when (not (zero? (status:exit-val (close-pipe port))))
-                     (error "failed to filter updmap.cfg")))
-
-                 ;; Set TEXMFSYSVAR to a sane and writable value; updmap fails
-                 ;; if it cannot create its log file there.
-                 (setenv "TEXMFSYSVAR" (getcwd))
-
-                 ;; Generate maps.
-                 (invoke "updmap-sys"
-                         "--cnffile"           "updmap.cfg"
-                         "--dvipdfmxoutputdir" "map/dvipdfmx/updmap/"
-                         "--dvipsoutputdir"    "map/dvips/updmap/"
-                         "--pdftexoutputdir"   "map/pdftex/updmap/"))))))
-        (propagated-inputs (map (lambda (package)
-                                  (list (package-name package) package))
-                                (append default-packages packages)))
-        (home-page (package-home-page texlive-bin))
-        (synopsis "TeX Live fonts map configuration")
-        (description "This package contains the fonts map configuration file
-generated for the base TeX Live packages as well as, optionally, user-provided
-ones.")
-        (license (delete-duplicates
-                  (fold (lambda (package result)
-                          (match (package-license package)
-                            ((lst ...)
-                             (append lst result))
-                            ((? license:license? license)
-                             (cons license result))))
-                        '()
-                        (append default-packages packages))))))))
+(define-public texlive-ifplatform
+  (package
+    (name "texlive-ifplatform")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ifplatform/"
+                   "source/latex/ifplatform/"
+                   "tex/latex/ifplatform/")
+             (base32
+              "1llas0xwq3y9nk7gblg40l99cgmkl9r7rbfazrhpnbaz5cshl8pl")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ifplatform")
+    (synopsis "Conditionals to test which platform is being used")
+    (description
+     "This package uses the (La)TeX extension @samp{-shell-escape} to
+establish whether the document is being processed on a Windows or on
+a Unix-like system, or on Cygwin.
 
-(define-deprecated/alias texlive-union texlive-updmap.cfg)
-(export texlive-union)
+Booleans provided are: @code{\\ifwindows}, @code{\\iflinux}, @code{\\ifmacosx}
+and @code{\\ifcygwin}.  The package also preserves the output of
+@command{uname} on a Unix-like system, which may be used to distinguish
+between various classes of Unix systems.")
+    (license license:lppl1.3c)))
+
+(define-deprecated-package texlive-latex-ifplatform texlive-ifplatform)
 
-;; For use in package definitions only
-(define-public texlive-tiny
+(define-public texlive-iftex
   (package
-    (inherit (texlive-updmap.cfg))
-    (name "texlive-tiny")
-    (description "This is a very limited subset of the TeX Live distribution.
-It includes little more than the required set of LaTeX packages.")))
+    (name "texlive-iftex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/iftex/" "tex/generic/iftex/")
+             (base32
+              "05p8iw8c8vjs59zb8pgilwpvlzrlb8zxyf34fhyr67y6bwm8phnf")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "http://www.ctan.org/pkg/iftex")
+    (synopsis "Determine the currently used TeX engine")
+    (description
+     "This package, which works both for Plain TeX and for LaTeX, defines the
+@code{\\ifPDFTeX}, @code{\\ifXeTeX}, and @code{\\ifLuaTeX} conditionals for
+testing which engine is being used for typesetting.  The package also provides
+the @code{\\RequirePDFTeX}, @code{\\RequireXeTeX}, and @code{\\RequireLuaTeX}
+commands which throw an error if pdfTeX, XeTeX or LuaTeX (respectively) is not
+the engine in use.")
+    (license license:lppl1.3+)))
+
+(define-deprecated-package texlive-generic-iftex texlive-iftex)
+(define-deprecated-package texlive-generic-ifxetex texlive-iftex)
 
 (define-public texlive-tipa
   (package
-    (inherit (simple-texlive-package
-              "texlive-tipa"
-              (list "/tex4ht/ht-fonts/alias/tipa/"
-                    "/doc/fonts/tipa/"
-                    "/fonts/map/dvips/tipa/"
-                    "/fonts/source/public/tipa/"
-                    "/fonts/tfm/public/tipa/"
-                    "/fonts/type1/public/tipa/"
-                    "/tex/latex/tipa/")
-              (base32
-               "0cqzf8vb10b8jw99m9gflskxa4c3rpiznxglix6chl5lai5sgw44")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/tipa")
+    (name "texlive-tipa")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/tipa/"
+                   "fonts/map/dvips/tipa/"
+                   "fonts/source/public/tipa/"
+                   "fonts/tfm/public/tipa/"
+                   "fonts/type1/public/tipa/"
+                   "tex/latex/tipa/")
+             (base32
+              "11gi7yhq2lnfgvqa29i0sidi5mwkzpja5ggdcpvqwv4xljf4vpvh")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs
+     (list texlive-cm texlive-metafont))
+    (home-page "https://ctan.org/pkg/tipa")
     (synopsis "Fonts and macros for IPA phonetics characters")
-    (description "These fonts are considered the \"ultimate answer\" to IPA
-typesetting.  The encoding of these 8-bit fonts has been registered as LaTeX
-standard encoding T3, and the set of addendum symbols as encoding
-TS3. \"Times-like\" Adobe Type 1 versions are provided for both the T3 and the
-TS3 fonts.")
+    (description
+     "These fonts are considered the ultimate answer to IPA typesetting.  The
+encoding of these 8-bit fonts has been registered as LaTeX standard encoding
+T3, and the set of addendum symbols as encoding TS3.  Times-like Adobe Type
+1 versions are provided for both the T3 and the TS3 fonts.")
     (license license:lppl)))
 
-(define-public texlive-latex-amsrefs
+(define-public texlive-amsrefs
   (package
-    (name "texlive-latex-amsrefs")
+    (name "texlive-amsrefs")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "amsrefs"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "15i4k479dwrpr0kspmm70g1yn4p3dkh0whyzmr93hph9bggnh1i1"))))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bib/amsrefs/" "bibtex/bst/amsrefs/"
+                   "doc/latex/amsrefs/" "source/latex/amsrefs/"
+                   "tex/latex/amsrefs/")
+             (base32
+              "12la66vz5ic6jc1cy96b2zh2fxsbaii9kbs4wrz1ii8v508wdkhv")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/amsrefs"))
-    (home-page "https://www.ctan.org/pkg/amsrefs")
+    (home-page "https://ctan.org/pkg/amsrefs")
     (synopsis "LaTeX-based replacement for BibTeX")
     (description
-     "Amsrefs is a LaTeX package for bibliographies that provides an archival
-data format similar to the format of BibTeX database files, but adapted to
-make direct processing by LaTeX easier.  The package can be used either in
-conjunction with BibTeX or as a replacement for BibTeX.")
+     "Amsrefs is a LaTeX package for bibliographies that provides an
+archival data format similar to the format of BibTeX database files, but
+adapted to make direct processing by LaTeX easier.  The package can be used
+either in conjunction with BibTeX or as a replacement for BibTeX.")
     (license license:lppl1.3+)))
 
+(define-deprecated-package texlive-latex-amsrefs texlive-amsrefs)
+
 (define-public texlive-bigfoot
-  (let ((template (simple-texlive-package
-                   "texlive-bigfoot"
-                   (list "doc/latex/bigfoot/"
-                         "source/latex/bigfoot/"
-                         "tex/latex/bigfoot/")
-                   (base32
-                    "140b4bbjcgajd1flznmi3ga6lx5pna2nxybr2dqm9515lny8gwf0"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t) "latex/bigfoot")
-         ((#:build-targets _ '()) '(list "bigfoot.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _ (chdir "source/latex/bigfoot/")))
-              (add-after 'chdir 'delete-drv-files
-                (lambda _
-                  (for-each delete-file (find-files "." "\\.drv$"))))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (propagated-inputs
-       (list texlive-etex texlive-ncctools))
-      (home-page "https://ctan.org/pkg/bigfoot")
-      (synopsis "Footnotes for critical editions")
-      (description
-       "The package aims to provide a one-stop solution to requirements for
+  (package
+    (name "texlive-bigfoot")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/bigfoot/"
+                   "source/latex/bigfoot/"
+                   "tex/latex/bigfoot/")
+             (base32
+              "140b4bbjcgajd1flznmi3ga6lx5pna2nxybr2dqm9515lny8gwf0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bigfoot")
+    (synopsis "Footnotes for critical editions")
+    (description
+     "The package aims to provide a one-stop solution to requirements for
 footnotes.  It offers multiple footnote apparatus superior to that of
 @code{manyfoot}.  Footnotes can be formatted in separate paragraphs, or be run
 into a single paragraph.  Note that the majority of the @code{bigfoot}
@@ -5230,25 +13946,25 @@ information from that package's documentation.
 
 The @code{bigfoot} bundle also provides the @code{perpage} and @code{suffix}
 packages.")
-      (license license:gpl2+))))
+    (license license:gpl2+)))
 
 (define-deprecated-package texlive-latex-bigfoot texlive-bigfoot)
 
-(define-public texlive-latex-blindtext
+(define-public texlive-blindtext
   (package
-    (name "texlive-latex-blindtext")
+    (name "texlive-blindtext")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "blindtext"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1jrja9b1pzdh9zgv1jh807w4xijqja58n2mqny6dkwicv8qfgbfg"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/blindtext/"
+                   "source/latex/blindtext/"
+                   "tex/latex/blindtext/")
+             (base32
+              "1gakawih3mzm5jh01kb44sjpsa4r8c3zwzig5bac37g4ha2vqska")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/blindtext"))
-    (home-page "https://www.ctan.org/pkg/blindtext")
-    (synopsis "Producing 'blind' text for testing")
+    (home-page "https://ctan.org/pkg/blindtext")
+    (synopsis "Producing blind text for testing")
     (description
      "The package provides the commands @code{\\blindtext} and
 @code{\\Blindtext} for creating \"blind\" text useful in testing new classes
@@ -5259,34 +13975,34 @@ the @code{latin} option provides a short \"lorem ipsum\" (for a fuller \"lorem
 ipsum\" text, see the @code{lipsum} package).")
     (license license:lppl)))
 
-(define-public texlive-latex-dinbrief
+(define-deprecated-package texlive-latex-blindtext texlive-blindtext)
+
+(define-public texlive-dinbrief
   (package
-    (name "texlive-latex-dinbrief")
+    (name "texlive-dinbrief")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "dinbrief"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0lb0kiy8fxzl6cnhcw1sggy6jrjvcd6kj1kkw3k9lkimm388yjz6"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/dinbrief/"
+                   "source/latex/dinbrief/"
+                   "tex/latex/dinbrief/")
+             (base32
+              "0l6mmn3y07xglmh3h5f7pnpmyacqb2g6nqgq3q1p6k97kf708c5s")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (arguments
-     '(#:tex-directory "latex/dinbrief"
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'remove-generated-file
-           (lambda _
-             (delete-file "dinbrief.drv")
-             #t))
-         (add-after 'unpack 'fix-encoding-error
-           (lambda _
-             (with-fluids ((%default-port-encoding "ISO-8859-1"))
-               (substitute* "dinbrief.dtx"
-                 (("zur Verf.+ung. In der Pr\"aambel")
-                  "zur Verf\"ung. In der Pr\"aambel")))
-             #t)))))
-    (home-page "https://www.ctan.org/pkg/dinbrief")
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-build
+            (lambda _
+              (with-fluids ((%default-port-encoding "ISO-8859-1"))
+                (with-directory-excursion "source/latex/dinbrief"
+                  (delete-file "dinbrief.drv")
+                  (substitute* "dinbrief.dtx"
+                    (("zur Verf.+ung. In der Pr\"aambel")
+                     "zur Verf\"ung. In der Pr\"aambel")))))))))
+    (home-page "https://ctan.org/pkg/dinbrief")
     (synopsis "German letter DIN style")
     (description
      "This package implements a document layout for writing letters according
@@ -5299,44 +14015,131 @@ addition there are example files showing how letters may be created with the
 package.")
     (license license:lppl)))
 
-(define-public texlive-latex-draftwatermark
+(define-deprecated-package texlive-latex-dinbrief texlive-dinbrief)
+
+(define-public texlive-draftwatermark
   (package
-    (name "texlive-latex-draftwatermark")
+    (name "texlive-draftwatermark")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "draftwatermark"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0rhn74ywv000b89w8qjf1i0qsk6kd1mjapfwis14jwjvbjqgvj95"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/draftwatermark/"
+                   "source/latex/draftwatermark/"
+                   "tex/latex/draftwatermark/")
+             (base32
+              "04l3gqiq0bhzbz8zxr7428fap2x1skkaq5ppbambc4lk8c7iw6da")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/draftwatermark"))
-    (home-page "https://www.ctan.org/pkg/draftwatermark")
+    (home-page "https://ctan.org/pkg/draftwatermark")
     (synopsis "Put a grey textual watermark on document pages")
     (description
-     "This package provides a means to add a textual, light grey watermark on
-every page or on the first page of a document.  Typical usage may consist in
-writing words such as DRAFT or CONFIDENTIAL across document pages.  The
+     "This package provides a means to add a textual, light grey watermark
+on every page or on the first page of a document.  Typical usage may consist
+in writing words such as DRAFT or CONFIDENTIAL across document pages.  The
 package performs a similar function to that of @code{draftcopy}, but its
 implementation is output device independent, and made very simple by relying
-on everypage.")
+on @code{everypage}.")
     (license license:lppl1.3+)))
 
-(define-public texlive-latex-environ
+(define-public texlive-drv
   (package
-    (name "texlive-latex-environ")
+    (name "texlive-drv")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "environ"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "06h28b26dyjkj9shksphgqfv4130jfkwhbw737hxn7d3yvdfffyd"))))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/drv/" "metapost/drv/")
+             (base32
+              "0vjc9x9xa50zzzc3m2csj9x0gqwcamhyqz1xkdbkqwkcy8rfpnlh")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/drv")
+    (synopsis "Derivation trees with MetaPost")
+    (description
+     "This package provides a set of MetaPost macros for typesetting
+derivation trees (such as used in sequent calculus, type inference,
+programming language semantics...).")
+    (license license:lppl)))
+
+(define-public texlive-dviincl
+  (package
+    (name "texlive-dviincl")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/dviincl/" "metapost/dviincl/")
+             (base32
+              "05f6ll7cq4ad4i4nkzrjnlqg1456is06fbmjiinadahf7yrqk3lw")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/environ"))
-    (home-page "https://www.ctan.org/pkg/environ")
+    (home-page "https://ctan.org/pkg/dviincl")
+    (synopsis "Include a DVI page into MetaPost output")
+    (description
+     "DVItoMP is one of the auxiliary programs available to any MetaPost
+package; it converts a DVI file into a MetaPost file.  Using it, one can
+envisage including a DVI page into an EPS files generated by MetaPost.  Such
+files allow pages to include other pages.")
+    (license license:public-domain)))
+
+(define-public texlive-emp
+  (package
+    (name "texlive-emp")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/emp/" "source/latex/emp/"
+                   "tex/latex/emp/")
+             (base32
+              "183qwxxjws4l0jrn92dj4qd8avnv9gq2rk1zqak0h48wxlp0fpyq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/emp")
+    (synopsis "Encapsulate MetaPost figures in a document")
+    (description
+     "Emp is a package for encapsulating MetaPost figures in LaTeX: the
+package provides environments where you can place MetaPost commands, and means
+of using that code as fragments for building up figures to include in your
+document.  So, with Emp, the procedure is to run your document with LaTeX, run
+MetaPost, and then complete running your document in the normal way.  Emp is
+therefore useful for keeping illustrations in synchrony with the text.  It
+also frees you from inventing descriptive names for PostScript files that fit
+into the confines of file system conventions.")
+    (license license:gpl3+)))
+
+(define-public texlive-enctex
+  (package
+    (name "texlive-enctex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/enctex/"
+                   "tex/generic/enctex/")
+             (base32
+              "1j8ji1ka8vhskm5kn0iwmkhjfp88ly6rva30pr1c9llsmsac5sf2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/enctex")
+    (synopsis "TeX extension that translates input on its way into TeX")
+    (description
+     "EncTeX is (another) TeX extension, written at the change-file level.  It
+provides means of translating input on the way into TeX.  It allows, for
+example, translation of multibyte sequences, such as utf-8 encoding.")
+    (license license:gpl3+)))
+
+(define-public texlive-environ
+  (package
+    (name "texlive-environ")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/environ/"
+                   "source/latex/environ/"
+                   "tex/latex/environ/")
+             (base32
+              "08a3vhyzc647b9zp3yifdklj0vch9cv2vajh7ig3y01jcdqhjy41")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-trimspaces))
+    (home-page "https://ctan.org/pkg/environ")
     (synopsis "New interface for environments in LaTeX")
     (description
      "This package provides the @code{\\collect@@body} command (as in
@@ -5345,20 +14148,39 @@ for collecting the body text of an environment.  These commands are used to
 define a new author interface to creating new environments.")
     (license license:lppl)))
 
-(define-public texlive-latex-eqparbox
+(define-deprecated-package texlive-latex-environ texlive-environ)
+
+(define-public texlive-epsincl
   (package
-    (name "texlive-latex-eqparbox")
+    (name "texlive-epsincl")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "eqparbox"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1ib5xdwcj5wk23wgk41m2hdcjr1dzrs4l3wwnpink9mlapz12wjs"))))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/epsincl/" "metapost/epsincl/")
+             (base32
+              "1pjnfqayh42gavlbd9wqn86qyqhw1bxrbmwgsv39ycj4s63xjxqr")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/eqparbox"))
-    (home-page "https://www.ctan.org/pkg/eqparbox")
+    (home-page "https://ctan.org/pkg/epsincl")
+    (synopsis "Include EPS in MetaPost figures")
+    (description
+     "The package facilitates including EPS files in MetaPost figures.")
+    (license license:public-domain)))
+
+(define-public texlive-eqparbox
+  (package
+    (name "texlive-eqparbox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/eqparbox/"
+                   "source/latex/eqparbox/"
+                   "tex/latex/eqparbox/")
+             (base32
+              "16c5dyd4bz45a2c1ppbq05h9ixg15srk5az5pld5gpv4j0zwzrqw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/eqparbox")
     (synopsis "Create equal-widthed parboxes")
     (description
      "LaTeX users sometimes need to ensure that two or more blocks of text
@@ -5371,80 +14193,189 @@ where they are in the document---will stretch to fit the widest
 for a variety of alignment purposes, as is evidenced by the examples in
 @code{eqparbox}'s documentation.  Various derivatives of @code{\\eqparbox} are
 also provided.")
-    (license license:lppl1.3+)))
+    (license license:lppl1.3c)))
 
-(define-public texlive-latex-etoc
+(define-deprecated-package texlive-latex-eqparbox texlive-eqparbox)
+
+(define-public texlive-etoc
   (package
-    (inherit (simple-texlive-package
-              "texlive-latex-etoc"
-              '("/doc/latex/etoc/README.md"
-                "/doc/latex/etoc/etoc.pdf"
-                "/tex/latex/etoc/")
-              (base32
-               "0198cn75m1y8ggbfv1qlnif0d9275f6mxqsansyqw4np0rv6q9sv")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/etoc")
-    (synopsis "Completely customisable TOCs")
+    (name "texlive-etoc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/etoc/" "source/latex/etoc/"
+                   "tex/latex/etoc/")
+             (base32
+              "02xa9091vgz5gdzbsc202mzd4lalvvkh3b7slnzppx827sqbq917")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/etoc")
+    (synopsis "Customisable table of contents")
     (description
-     "This package gives the user complete control of how the entries of
-the table of contents should be constituted from the name, number, and page
-number of each sectioning unit.  The layout is controlled by the definition
-of ‘line styles’ for each sectioning level used in the document.
+     "This package gives the user complete control of how the entries of the
+table of contents should be constituted from the name, number, and page number
+of each sectioning unit.  The layout is controlled by the definition of line
+styles for each sectioning level used in the document.
 
 The package provides its own custom line styles (which may be used as
-examples), and continues to support the standard formatting inherited from
-the LaTeX document classes, but the package can also allow the user to
-delegate the details to packages dealing with list making environments (such
-as enumitem).  The package’s default global style typesets tables of contents
-in a multi-column format, with either a standard heading, or a ruled title
-(optionally with a frame around the table).
-
-The @code{\\tableofcontents} command may be used arbitrarily many times in
-the same document, while @code{\\localtableofcontents} provides a ‘local’
-table of contents.")
-    (license license:lppl1.3c+)))
+examples), and continues to support the standard formatting inherited from the
+LaTeX document classes, but the package can also allow the user to delegate
+the details to packages dealing with list making environments (such as
+@code{enumitem}).  The package's default global style typesets tables of
+contents in a multi-column format, with either a standard heading, or a ruled
+title (optionally with a frame around the table).
+
+The @code{\\tableofcontents} command may be used arbitrarily many times in the
+same document, while @code{\\localtableofcontents} provides a local table of
+contents.")
+    (license license:lppl1.3c)))
+
+(define-deprecated-package texlive-latex-etoc texlive-etoc)
 
-(define-public texlive-latex-expdlist
+(define-public texlive-expdlist
   (package
-    (name "texlive-latex-expdlist")
+    (name "texlive-expdlist")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "expdlist"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1x7byk6x10njir3y9rm56glhdzrxwqag7gsnw2sqn1czlq525w7r"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/expdlist/"
+                   "source/latex/expdlist/"
+                   "tex/latex/expdlist/")
+             (base32
+              "1kylmj615hmbmjbynn5bfzhfz0wk1drxmg0kjqljnglffkb6irv6")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments
-     '(#:tex-directory "latex/expdlist"
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'remove-generated-file
-           (lambda _
-             (for-each delete-file
-                       (find-files "." "\\.drv$"))
-             #t)))))
-    (home-page "https://www.ctan.org/pkg/expdlist")
+    (home-page "https://ctan.org/pkg/expdlist")
     (synopsis "Expanded description environments")
     (description
-     "The package provides additional features for the LaTeX
-@code{description} environment, including adjustable left margin.  The package
-also allows the user to \"break\" a list (for example, to interpose a comment)
-without affecting the structure of the list (this works for @code{itemize} and
-@code{enumerate} lists, and numbered lists remain in sequence).")
+     "The package provides additional features for the LaTeX @code{description} environment,
+including adjustable left margin.  The package also allows the user to break
+a list (for example, to interpose a comment) without affecting the structure
+of the list (this works for itemize and eumerate lists and numbered lists
+remain in sequence).")
+    (license license:lppl)))
+
+(define-deprecated-package texlive-latex-expdlist texlive-expdlist)
+
+(define-public texlive-expressg
+  (package
+    (name "texlive-expressg")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/expressg/"
+                   "metapost/expressg/"
+                   "source/metapost/expressg/")
+             (base32
+              "08f6lxxxmhfld6g2iy2kn68llalz3wayxqka7nd48s1ahm33kmdd")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/expressg")
+    (synopsis "Diagrams consisting of boxes, lines, and annotations")
+    (description
+     "This package provides a MetaPost package providing facilities to assist
+in drawing diagrams that consist of boxes, lines, and annotations.  Particular
+support is provided for creating EXPRESS-G diagrams, for example IDEF1X, OMT,
+Shlaer-Mellor, and NIAM diagrams.  The package may also be used to create UML
+and most other Box-Line-Annotation charts, but not Gantt charts directly.")
     (license license:lppl)))
 
+(define-public texlive-exteps
+  (package
+    (name "texlive-exteps")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/exteps/" "metapost/exteps/")
+             (base32
+              "1mmlmcjn8fk16y14p3q6xfmkcc75vcykblgcyzapzxd1nzy51ak7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/exteps")
+    (synopsis "Include EPS figures in MetaPost")
+    (description
+     "Exteps is a module for including external EPS figures into MetaPost
+figures.  It is written entirely in MetaPost, and does not therefore require
+any post processing of the MetaPost output.")
+    (license license:gpl3+)))
+
+(define-public texlive-featpost
+  (package
+    (name "texlive-featpost")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/featpost/"
+                   "metapost/featpost/")
+             (base32
+              "0a97syvr3vwpayhasb98ssvgwr99p13plrjnqb9ad24jd6srmmdg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/featpost")
+    (synopsis "MetaPost macros for 3D")
+    (description
+     "These macros allow the production of three-dimensional schemes
+containing angles, circles, cylinders, cones and spheres, among other
+things.")
+    (license license:gpl3+)))
+
+(define-public texlive-feynmf
+  (package
+    (name "texlive-feynmf")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/feynmf/" "metafont/feynmf/"
+                   "metapost/feynmf/" "source/latex/feynmf/"
+                   "tex/latex/feynmf/")
+             (base32
+              "1a6zhs4x6rkjl7vapc3y59hmrvmi570ji2bszpsk88w3fi8klckb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/feynmf")
+    (synopsis "Macros and fonts for creating Feynman (and other) diagrams")
+    (description
+     "The @code{feynmf} package provides an interface to Metafont to use
+simple structure specifications to produce relatively complex diagrams. While
+the package was designed for Feynman diagrams, it could in principle be used
+for diagrams in graph and similar theories, where the structure is
+semi-algorithmically determined.")
+    (license license:gpl3+)))
+
+(define-public texlive-feynmp-auto
+  (package
+    (name "texlive-feynmp-auto")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/feynmp-auto/"
+                   "source/latex/feynmp-auto/"
+                   "tex/latex/feynmp-auto/")
+             (base32
+              "19ghfblv641ghak049v42wbqmh7pfadz0mrbkfbx2jr4bvf57rv2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/feynmp-auto")
+    (synopsis "Automatic processing of @code{feynmp} graphics")
+    (description
+     "The package takes care of running Metapost on the output files produced
+by the @code{feynmp} package, so that the compiled pictures will be available
+in the next run of LaTeX. The package honours options that apply to
+@code{feynmp}.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-filemod
   (package
-    (inherit (simple-texlive-package
-              "texlive-filemod"
-              (list "/doc/latex/filemod/"
-                    "/tex/latex/filemod/"
-                    "/tex/generic/filemod/")
-              (base32
-               "1snsj7kblkj1ig3x3845lsypz7ab04lf0dcpdh946xakgjnz4fb5")
-              #:trivial? #t))
+    (name "texlive-filemod")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/filemod/" "tex/generic/filemod/"
+                   "tex/latex/filemod/")
+             (base32
+              "1snsj7kblkj1ig3x3845lsypz7ab04lf0dcpdh946xakgjnz4fb5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://www.ctan.org/pkg/filemod")
     (synopsis "Provide file modification times, and compare them")
     (description
@@ -5460,14 +14391,169 @@ but non-expandable ones.")
 
 (define-deprecated-package texlive-latex-filemod texlive-filemod)
 
-(define-public texlive-latex-hanging
+(define-public texlive-fix2col
   (package
-    (inherit (simple-texlive-package
-              "texlive-latex-hanging"
-              '("/tex/latex/hanging/")
-              (base32
-               "0s86yaxyfv9zxf4svwg9s13by9vrw38apfg0hsfchsimsdd6gsbb")
-              #:trivial? #t))
+    (name "texlive-fix2col")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/fix2col/" "source/latex/fix2col/"
+                   "tex/latex/fix2col/")
+             (base32
+              "04mzs1qn9ish5sdp1v9adqvl92ljbs9rjxxfsqskalm4g9ckn8dy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fix2col")
+    (synopsis "Fix miscellaneous two column mode features")
+    (description
+     "This package is obsolete; do not use in new documents.  It will do
+nothing in LaTeX formats after 2015/01/01 as the fixes that it implements were
+incorporated into the @code{fixltx2e} package, which is itself obsolete as
+since the 2015/01/01 release these fixes are in the LaTeX format itself.
+
+Fix mark handling so that @code{\\firstmark} is taken from the first column if
+that column has any marks at all; keep two column floats like @code{figure*}
+in sequence with single column floats like figure.")
+    (license license:lppl)))
+
+(define-public texlive-fixlatvian
+  (package
+    (name "texlive-fixlatvian")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/fixlatvian/"
+                   "makeindex/fixlatvian/"
+                   "source/xelatex/fixlatvian/"
+                   "tex/xelatex/fixlatvian/")
+             (base32
+              "09bivnc287z57k9rhwfl16w66dkvb55shnwpqv972n6dsjdcrh7j")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fixlatvian")
+    (synopsis "Improve Latvian language support in XeLaTeX")
+    (description
+     "The package offers improvement of the Latvian language support in
+@code{polyglossia}, in particular in the area of the standard classes.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-fiziko
+  (package
+    (name "texlive-fiziko")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin name version
+                            (list "doc/metapost/fiziko/" "metapost/fiziko/")
+                            (base32
+                             "160iqgm4f7imnj89gj4822xv5wnnxf336k261v52h6sd0lhnhany")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fiziko")
+    (synopsis "MetaPost library for physics textbook illustrations")
+    (description
+     "This MetaPost library was initially written to automate some elements of
+black and white illustrations for a physics textbook.  It provides functions
+to draw things like lines of variable width, shaded spheres, and tubes of
+different kinds, which can be used to produce images of a variety of objects.
+The library also contains functions to draw some objects constructed from
+these primitives.")
+    (license (list license:gpl3+ license:cc-by-sa4.0))))
+
+(define-public texlive-font-change-xetex
+  (package
+    (name "texlive-font-change-xetex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xetex/font-change-xetex/"
+                   "tex/xetex/font-change-xetex/")
+             (base32
+              "1qhkxsk3wl6a8isik4ln1jq7ifhk7hbidq2i1lfy18c1py87xw5k")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/font-change-xetex")
+    (synopsis "Macros to change text and mathematics fonts in plain XeTeX")
+    (description
+     "This package consists of macros that can be used to typeset plain XeTeX
+documents using any OpenType or TrueType font installed on the computer
+system.  The macros allow the user to change the text mode fonts and some math
+mode fonts.  For any declared font family, various font style, weight, and
+size variants like bold, italics, small caps, etc., are available through
+standard and custom TeX control statements.  Using the optional argument of
+the macros, the available XeTeX font features and OpenType tags can be
+accessed.  Other features of the package include activating and deactivating
+hanging punctuation, and support for special Unicode characters.")
+    (license license:cc-by-sa4.0)))
+
+(define-public texlive-fontbook
+  (package
+    (name "texlive-fontbook")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/fontbook/"
+                   "source/xelatex/fontbook/"
+                   "tex/xelatex/fontbook/")
+             (base32
+              "1n5yn6rgndk0yr91bhglby9nr5mifgfi895klvsixmxc0k5bqp97")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fontbook")
+    (synopsis "Generate a font book")
+    (description
+     "The package provides a means of producing a book of font samples (for
+evaluation, etc.).")
+    (license license:lppl1.3+)))
+
+(define-public texlive-fontwrap
+  (package
+    (name "texlive-fontwrap")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/fontwrap/"
+                   "tex/xelatex/fontwrap/")
+             (base32
+              "0nzphhwgm9387mn2rfhmsandyvcwv99lxm5978jg6pycs43dggs7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fontwrap")
+    (synopsis "Bind fonts to specific Unicode blocks")
+    (description
+     "The package (which runs under XeLaTeX) lets you bind fonts to specific
+Unicode blocks, for automatic font tagging of multilingual text.")
+    (license license:gpl3+)))
+
+(define-public texlive-garrigues
+  (package
+    (name "texlive-garrigues")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/garrigues/"
+                   "metapost/garrigues/")
+             (base32
+              "0vg1j0r4mkp057v7kjr8yza1danc3zj7k590x5531yi0gzp7hgq2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/garrigues")
+    (synopsis "MetaPost macros for the reproduction of Garrigues' Easter nomogram")
+    (description
+     "This library provides MetaPost macros for the reproduction of Garrigues
+Easter nomogram.")
+    (license license:lppl)))
+
+(define-public texlive-hanging
+  (package
+    (name "texlive-hanging")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/hanging/" "source/latex/hanging/"
+                   "tex/latex/hanging/")
+             (base32
+              "18ichpmmghz0nmv6m646r64y5jvyp52qz9hj7hadrf34xj1ijmlk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://www.ctan.org/pkg/hanging")
     (synopsis "Typeset hanging paragraphs")
     (description
@@ -5476,22 +14562,27 @@ paragraphs.  The package also enables typesetting with hanging punctuation,
 by making punctuation characters active.")
     (license license:lppl1.3c+)))
 
+(define-deprecated-package texlive-latex-hanging texlive-hanging)
+
 (define-public texlive-fira
   (package
-    (inherit (simple-texlive-package
-              "texlive-fira"
-              (list "doc/fonts/fira/"
-                    "tex/latex/fira/"
-                    "fonts/vf/public/fira/"
-                    "fonts/type1/public/fira/"
-                    "fonts/tfm/public/fira/"
-                    "fonts/opentype/public/fira/"
-                    "fonts/map/dvips/fira/"
-                    "fonts/enc/dvips/fira/")
-              (base32 "1v3688hziqz4jywfysiv19vsdzfkknrf83zfbi7lhiqpgkpsfsm2")
-              #:trivial? #t))
-    (build-system texlive-build-system)
-    (home-page "https://ctan.org/fonts/fira")
+    (name "texlive-fira")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/fira/"
+                   "fonts/enc/dvips/fira/"
+                   "fonts/map/dvips/fira/"
+                   "fonts/opentype/public/fira/"
+                   "fonts/tfm/public/fira/"
+                   "fonts/type1/public/fira/"
+                   "fonts/vf/public/fira/"
+                   "tex/latex/fira/")
+             (base32
+              "19sb6c1h1crhs1597i3nlvr2ahl20hxj7a1a5xkpfr5vj4n3x5kv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fira")
     (synopsis "Fira fonts with LaTeX support")
     (description
      "This package provides LaTeX, pdfLaTeX, XeLaTeX and LuaLaTeX support for
@@ -5502,101 +14593,541 @@ corresponding italics: light, regular, medium, bold, ...")
                    license:silofl1.1))))
 
 (define-public texlive-firstaid
-  (let ((template (simple-texlive-package
-                   "texlive-firstaid"
-                   (list "/doc/latex/firstaid/"
-                         "/source/latex/firstaid/"
-                         "/tex/latex/firstaid/")
-                   (base32
-                    "1ahn47kz8a2qdmzdfdgjanf6h5bn8f2rzp1zvwgjpk1plcix8k90"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t) "tex/latex/firstaid")
-         ((#:build-targets _ '()) '(list "firstaid.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _ (chdir "source/latex/firstaid/")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://ctan.org/macros/latex/required/firstaid")
-      (synopsis
-       "First aid for external LaTeX files and packages that need updating")
-      (description
-       "This package contains some first aid for LaTeX packages or classes
-that require updates because of internal changes to the LaTeX kernel that are
-not yet reflected in the package's or class's code.  The file
+  (package
+    (name "texlive-firstaid")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/firstaid/" "source/latex/firstaid/"
+                   "tex/latex/firstaid/")
+             (base32
+              "1gpbl3l77mrrf88iqcnfvcgxwraqm2rsvisnngak9fbwbinc489v")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
+    (native-inputs (list texlive-docstrip texlive-pdftex))
+    (home-page "https://ctan.org/pkg/firstaid")
+    (synopsis
+     "First aid for external LaTeX files and packages that need updating")
+    (description
+     "This package contains some first aid for LaTeX packages or classes that
+require updates because of internal changes to the LaTeX kernel that are not
+yet reflected in the package's or class's code.  The file
 @file{latex2e-first-aid-for-external-files.ltx} provided by this package is
 meant to be loaded during format generation and not by the user.")
-      (license license:lppl1.3c))))
+    (license license:lppl1.3c)))
 
-(define-public texlive-latex-ifplatform
+(define-public texlive-gmp
   (package
-    (name "texlive-latex-ifplatform")
+    (name "texlive-gmp")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "ifplatform"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "157pplavvm2z97b3jl4x41w11k6q9wgy074mfg0dwmsx5lm328jy"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/gmp/" "source/latex/gmp/"
+                   "tex/latex/gmp/")
+             (base32
+              "1zvl80wjg4xsika0p0v6jskrwdpy3n7qbfvbg76qbzzpc03n6x6a")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (propagated-inputs (list texlive-catchfile))
-    (arguments '(#:tex-directory "latex/ifplatform"))
-    (home-page "https://www.ctan.org/pkg/ifplatform")
-    (synopsis "Conditionals to test which platform is being used")
+    (home-page "https://ctan.org/pkg/gmp")
+    (synopsis "Enable integration between MetaPost pictures and LaTeX")
     (description
-     "This package uses the (La)TeX extension @code{-shell-escape} to
-establish whether the document is being processed on a Windows or on a
-Unix-like system, or on Cygwin (Unix environment over a Windows system).
-Booleans provided are: @code{\\ifwindows}, @code{\\iflinux}, @code{\\ifmacosx}
-and @code{\\ifcygwin}.  The package also preserves the output of @code{uname}
-on a Unix-like system, which may be used to distinguish between various
-classes of systems.")
+     "The package allows integration between MetaPost pictures and LaTeX.
+The main feature is that passing parameters to the MetaPost pictures is
+possible and the picture code can be put inside arguments to commands,
+including @code{\\newcommand}.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-hershey-mp
+  (package
+    (name "texlive-hershey-mp")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/hershey-mp/"
+                   "metapost/hershey-mp/")
+             (base32
+              "1pbybiqh5qgj9zh0yifxm2hn25h73kz1glrv1cz9sw38h6iydlzw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/hershey-mp")
+    (synopsis "MetaPost support for the Hershey font file format")
+    (description
+     "This package provides MetaPost support for reading jhf vector font
+files, used by (mostly? only?) the so-called Hershey Fonts of the late 1960s.
+The package does not include the actual font files, which you can probably
+find in the software repository of your operating system.")
+    (license license:eupl1.2)))
+
+(define-public texlive-interchar
+  (package
+    (name "texlive-interchar")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/interchar/"
+                   "tex/xelatex/interchar/")
+             (base32
+              "06pvpaph1gi3rjvwzpvzc2rlx0wb8fqmidbfh8dw2qazzbirdlnz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/interchar")
+    (synopsis "Managing character class schemes in XeTeX")
+    (description
+     "The package manages character class schemes of XeTeX.  Using this
+package, you may switch among different character class schemes.  Migration
+commands are provided for make packages using this mechanism compatible with
+each others.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-latexmk
+  (package
+    (name "texlive-latexmk")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/latexmk.1"
+                   "doc/man/man1/latexmk.man1.pdf"
+                   "doc/support/latexmk/" "scripts/latexmk/")
+             (base32
+              "1hgzx4xcny2ffm63afhfh3msy1i9llmcdqq2xf3fqlc95rkzn59z")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "latexmk.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/latexmk")
+    (synopsis "Fully automated LaTeX document generation")
+    (description
+     "Latexmk completely automates the process of generating a LaTeX document.
+Given the source files for a document, @command{latexmk} issues the
+appropriate sequence of commands to generate a @file{.dvi}, @file{.ps},
+@file{.pdf} or hardcopy version of the document.  An important feature is the
+preview continuous mode, where the script watches all of the source files and
+reruns LaTeX, etc., whenever a source file has changed.  Thus a previewer can
+offer a display of the document's latest state.")
+    (license license:gpl2)))
+
+(define-public texlive-latexmp
+  (package
+    (name "texlive-latexmp")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/latexmp/" "metapost/latexmp/")
+             (base32
+              "1zxwxss5sl16laaqalr8043wmyk2bhlja3al5xlxkizvlnflqy0f")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/latexmp")
+    (synopsis "Interface for LaTeX-based typesetting in MetaPost")
+    (description
+     "The MetaPost package @code{latexMP} implements a user-friendly interface
+to access LaTeX-based typesetting capabilities in MetaPost.  The text to be
+typeset is given as string.  This allows even dynamic text elements, for
+example counters, to be used in labels.  Compared to other implementations it
+is much more flexible, since it can be used as direct replacement for
+@code{btex.etex}, and much faster, compared for example to the solution
+provided by @code{tex.mp}.")
+    (license license:public-domain)))
+
+(define-public texlive-markdown
+  (package
+    (name "texlive-markdown")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/markdown/examples/"
+                   "doc/generic/markdown/"
+                   "doc/latex/markdown/examples/"
+                   "scripts/markdown/"
+                   "source/generic/markdown/"
+                   "tex/context/third/markdown/"
+                   "tex/generic/markdown/"
+                   "tex/latex/markdown/"
+                   "tex/luatex/markdown/")
+             (base32
+              "0nmw1c4ynn0vzdkgpz2dnqimbxbyl6pc0khl2gbi8bd4g9dkai55")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/markdown")
+    (synopsis "Converting and rendering Markdown documents inside TeX")
+    (description
+     "The package provides facilities for the conversion of Markdown markup to
+plain TeX.  These are provided both in form of a Lua module and in form of
+plain TeX, LaTeX, and ConTeXt macro packages that enable the direct inclusion
+of Markdown documents inside TeX documents.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-mcf2graph
+  (package
+    (name "texlive-mcf2graph")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/mcf2graph/")
+             (base32
+              "1pji3d2mllfi74kalvs11h7yy3hkm5g5nlmcpq2vn7cxjbaqk9sq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mcf2graph")
+    (synopsis "Draw chemical structure diagrams with MetaPost")
+    (description
+     "The Molecular Coding Format (MCF) is a linear notation for describing
+chemical structure diagrams.  This package converts MCF to graphic files using
+MetaPost.")
+    (license license:expat)))
+
+(define-public texlive-metago
+  (package
+    (name "texlive-metago")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/metago/" "metapost/metago/")
+             (base32
+              "13m61ml8wfs5888nifilgzi503m3gz1f2fa44408jdhlr6zk6fa0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/metago")
+    (synopsis "MetaPost output of Go positions")
+    (description
+     "The package allows you to draw Go game positions with MetaPost.  Two
+methods of usage are provided, either using the package programmatically, or
+using the package via a script (which may produce several images).")
     (license license:lppl)))
 
-(define-public texlive-latex-natbib
+(define-public texlive-metaobj
   (package
-    (name "texlive-latex-natbib")
+    (name "texlive-metaobj")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "natbib"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0aqliq0nwblxyrzhwhv77pnmk7qh2y3prgq7z7qhwcbgz5kisld7"))))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/metaobj/" "metapost/metaobj/")
+             (base32
+              "1ir6p14h79x5iqbxmj2893x8j1d490bnhs83jwnrbcjxn0yxky6w")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/metaobj")
+    (synopsis "MetaPost package providing high-level objects")
+    (description
+     "METAOBJ is a large MetaPost package providing high-level objects.  It
+implements many of PSTricks features for node connections, but also trees,
+matrices, and many other things.  It more or less contains @code{boxes.mp} and
+@code{rboxes.mp}.  It is easily extensible with new objects.")
+    (license license:lppl)))
+
+(define-public texlive-metaplot
+  (package
+    (name "texlive-metaplot")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/metaplot/" "metapost/metaplot/")
+             (base32
+              "19y8lj28gvky7f7g2i562ixwvmnxnflnfc8l8r0x7zg384hg8835")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/metaplot")
+    (synopsis "Plot-manipulation macros for use in MetaPost")
+    (description
+     "MetaPlot is a set of MetaPost macros for manipulating pre-generated
+plots (and similar objects), and formatting them for inclusion in a MetaPost
+figure.  The intent is that the plots can be generated by some outside
+program, in an abstract manner that does not require making decisions about
+on-page sizing and layout, and then they can be imported into MetaPlot and
+arranged using the full capabilities of MetaPost.  Metaplot also includes
+a very flexible set of macros for generating plot axes, which may be useful in
+other contexts as well.")
+    (license license:lppl)))
+
+(define-public texlive-metapost-colorbrewer
+  (package
+    (name "texlive-metapost-colorbrewer")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/metapost-colorbrewer/"
+                   "metapost/metapost-colorbrewer/")
+             (base32
+              "00bpdz2k849k1sfrlflxhdbylncb5y2bixgmylyh0i8rbb467q7l")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/metapost-colorbrewer")
+    (synopsis
+     "Implementation of the @code{colorbrewer2.org} colours for MetaPost")
+    (description
+     "This package provides two MetaPost include files that define all the
+@code{colorbrewer2.org} colours: @code{colorbrewer-cmyk.mp} and
+@code{colorbrewer-rgb.mp}. The first defines all the colours as CMYK, the
+second as RGB.")
+    (license license:gpl3+)))
+
+(define-public texlive-metauml
+  (package
+    (name "texlive-metauml")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/metauml/" "metapost/metauml/")
+             (base32
+              "01hs234mjqnr39zm7jl6dpbm5w0k4p73pr0aj35ii0dhakln2jsy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/metauml")
+    (synopsis "MetaPost library for typesetting UML diagrams")
+    (description
+     "MetaUML is a MetaPost library for typesetting UML diagrams, which
+provides a usable, human-friendly textual notation for UML, offering now
+support for class, package, activity, state, and use case diagrams.")
+    (license license:gpl3+)))
+
+(define-public texlive-mfpic
+  (package
+    (name "texlive-mfpic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/mfpic/" "metafont/mfpic/"
+                   "metapost/mfpic/" "source/generic/mfpic/"
+                   "tex/generic/mfpic/")
+             (base32
+              "1s3z31mglmij7qc1f0681vv2a6md9wz9zbi6zlh7zvmhy5hzkjkv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mfpic")
+    (synopsis "Draw Metafont/post pictures from (La)TeX commands")
+    (description
+     "Mfpic is a scheme for producing pictures from (La)TeX commands.
+Commands @code{\\mfpic} and @code{\\endmfpic} (in LaTeX, the @code{mfpic}
+environment) enclose a group in which drawing commands may be placed.  The
+commands generate a Meta-language file, which may be processed by MetaPost (or
+even Metafont).  The resulting image file will be read back in to the document
+to place the picture at the point where the original (La)TeX commands
+appeared.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-mfpic4ode
+  (package
+    (name "texlive-mfpic4ode")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/mfpic4ode/"
+                   "source/latex/mfpic4ode/"
+                   "tex/latex/mfpic4ode/")
+             (base32
+              "0ssmpvp1apxvinidq42pfpvjimpvd250har85n6rl7dj5fws9j8m")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mfpic4ode")
+    (synopsis "Macros to draw direction fields and solutions of ODEs")
+    (description
+     "The package is a small set of macros for drawing direction fields, phase
+portraits and trajectories of differential equations and two dimensional
+autonomous systems.  The Euler, Runge-Kutta and fourth order Runge-Kutta
+algorithms are available to solve the ODEs.  The picture is translated into
+@code{mfpic} macros and MetaPost is used to create the final drawing.")
+    (license license:lppl)))
+
+(define-public texlive-minim-hatching
+  (package
+    (name "texlive-minim-hatching")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/minim-hatching/"
+                   "metapost/minim-hatching/")
+             (base32
+              "0qcd5zvhj9hrdhb7il1hbfdh5sgccl6mvwwmpw9fymbwdri9224f")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/minim-hatching")
+    (synopsis "Create tiling patterns with @code{minim-mp} MetaPost processor")
+    (description
+     "This is a small proof-of-concept library of tiling patterns for use with
+the @code{minim-mp} MetaPost processor.")
+    (license license:eupl1.2)))
+
+(define-public texlive-mp3d
+  (package
+    (name "texlive-mp3d")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/mp3d/" "metapost/mp3d/")
+             (base32
+              "1qfg4ifm5z72sr8vimibmpmqh0cxzipiy4jr8rbq5qsj2mfqzphd")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/natbib"))
-    (home-page "https://www.ctan.org/pkg/natbib")
+    (home-page "https://ctan.org/pkg/mp3d")
+    (synopsis "3D animations")
+    (description
+     "This library creates animations of 3-dimensional objects (such as
+polyhedra) in MetaPost.")
+    (license license:lppl)))
+
+(define-public texlive-mparrows
+  (package
+    (name "texlive-mparrows")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/mparrows/"
+                   "metapost/mparrows/")
+             (base32
+              "0pc9w5g6qasfpv4dxf0aahahbxk6kjwirdmx8l4i27syjb1lgzw9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mparrows")
+    (synopsis "MetaPost module with different types of arrow heads")
+    (description
+     "This package provides a package to provide different types of arrow
+heads to be used with MetaPost commands")
+    (license license:public-domain)))
+
+(define-public texlive-mpattern
+  (package
+    (name "texlive-mpattern")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/mpattern/"
+                   "metapost/mpattern/")
+             (base32
+              "00g250vl6gnvwx6zgmfqcw3nwkh546i1vjz4zjp3dc5n5yj5y6ls")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mpattern")
+    (synopsis "Patterns in MetaPost")
+    (description
+     "This package provides a package for defining and using patterns in MetaPost,
+using the Pattern Color Space available in PostScript Level 2.")
+    (license license:public-domain)))
+
+(define-public texlive-mpcolornames
+  (package
+    (name "texlive-mpcolornames")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/mpcolornames/"
+                   "metapost/mpcolornames/"
+                   "source/metapost/mpcolornames/")
+             (base32
+              "1s5yb57yamg1fd7w5hmkmfyxyqj3mivhkvrkqzm31dzh4y22qg3k")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mpcolornames")
+    (synopsis "Extend list of predefined colour names for MetaPost")
+    (description
+     "The MetaPost format @code{plain.mp} provides only five built-in colour names
+(variables), all of which are defined in the RGB model: red, green and blue
+for the primary colours and black and white.  The package makes more than 500
+colour names from different colour sets in different colour models available
+to MetaPost.")
+    (license license:lppl)))
+
+(define-public texlive-mpgraphics
+  (package
+    (name "texlive-mpgraphics")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/mpgraphics/"
+                   "source/latex/mpgraphics/"
+                   "tex/latex/mpgraphics/")
+             (base32
+              "0z51scc8vimwihdyxv3g1cb7bjbj8w2a2ck1ygjyf8xzz4hcic2s")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mpgraphics")
+    (synopsis "Process and display MetaPost figures inline")
+    (description
+     "The package allows LaTeX users to typeset MetaPost code inline and
+display figures in their documents with only and only one run of LaTeX,
+pdfLaTeX or XeLaTeX (no separate runs of @command{mpost}).  Mpgraphics
+achieves this by using the shell escape (@samp{\\write 18}) feature of current
+TeX distributions, so that the whole process is automatic and the end user is
+saved the tiresome processing.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-mptrees
+  (package
+    (name "texlive-mptrees")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/mptrees/" "metapost/mptrees/")
+             (base32
+              "17jaj27pjnm3k8qcn1ijkwzgm0nacm0mb3fb7rx3a3cf1pi2qwd2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mptrees")
+    (synopsis "Probability trees with MetaPost")
+    (description
+     "This package provides MetaPost tools for drawing simple probability
+trees.  One command and several parameters to control the output are
+provided.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-na-position
+  (package
+    (name "texlive-na-position")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/na-position/"
+                   "tex/xelatex/na-position/")
+             (base32
+              "0rp1css44sl6j762kfwzq53k6690djgag6yc85dd9134i837gvqr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/na-position")
+    (synopsis
+     "Tables of relative positions of curves, asymptotes, tangents in Arabic documents")
+    (description
+     "This package facilitates, in most cases, the creation of tables of
+relative positions of a curve and its asymptote, or a curve and a tangent in
+one of its points.  This package has to be used with @code{polyglossia} and
+XeLaTeX to produce documents in Arabic.")
+    (license license:lppl)))
+
+(define-public texlive-natbib
+  (package
+    (name "texlive-natbib")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bst/natbib/" "doc/latex/natbib/"
+                   "source/latex/natbib/" "tex/latex/natbib/")
+             (base32
+              "17hyba6v24wrbjvakgjxkndjb418mmi2wmnhrm7zmfwb0bvy6f2j")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/natbib")
     (synopsis "Flexible bibliography support")
     (description
-     "This bundle provides a package that implements both author-year and
+     "The bundle provides a package that implements both author-year and
 numbered references, as well as much detailed of support for other
-bibliography use.  Also provided are versions of the standard BibTeX styles
-that are compatible with @code{natbib}: @code{plainnat}, @code{unsrtnat},
-@code{abbrnat}.  The bibliography styles produced by @code{custom-bib} are
-designed from the start to be compatible with @code{natbib}.")
+bibliography use.  Also Provided are versions of the standard BibTeX styles
+that are compatible with natbib--plainnat, unsrtnat, abbrnat.  The
+bibliography styles produced by custom-bib are designed from the start to be
+compatible with @code{natbib}.")
     (license license:lppl)))
 
-(define-public texlive-latex-newfloat
+(define-deprecated-package texlive-latex-natbib texlive-natbib)
+
+(define-public texlive-newfloat
   (package
-    (inherit (simple-texlive-package
-              "texlive-latex-newfloat"
-              (list "doc/latex/newfloat/"
-                    "tex/latex/newfloat/")
-              (base32 "1047max3li9ni15njgsvc7qglakgrjy2l0s72imgzdmwgb2h8jyf")
-              #:trivial? #t))
+    (name "texlive-newfloat")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/newfloat/" "source/latex/newfloat/"
+                   "tex/latex/newfloat/")
+             (base32
+              "1hrackdfrzad8cgbl3f3yaagk4p4zjbvq710rm8b1z02fr9z2zkq")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/newfloat")
     (synopsis "Define new floating environments")
@@ -5606,14 +15137,43 @@ which the user may use to define new floating environments which behave like
 the LaTeX standard foating environments @code{figure} and @code{table}.")
     (license license:lppl)))
 
-(define-public texlive-latex-newunicodechar
+(define-deprecated-package texlive-latex-newfloat texlive-newfloat)
+
+(define-public texlive-newpax
   (package
-    (inherit (simple-texlive-package
-              "texlive-latex-newunicodechar"
-              '("/doc/latex/newunicodechar/" "/tex/latex/newunicodechar/")
-              (base32
-               "0pwx3ylhvk5hxjnalas00grrbwla79j424i27hrm0zgflq7wsbrj")
-              #:trivial? #t))
+    (name "texlive-newpax")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/newpax/" "source/latex/newpax/"
+                   "tex/latex/newpax/")
+             (base32
+              "1b8z1k9gn0g1q6qyixgwds61b2844kiqb0sfvhn9x38fnqgzy83j")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/newpax")
+    (synopsis "Experimental package to extract and reinsert PDF annotations")
+    (description
+     "The package is based on the @code{pax} package from Heiko Oberdiek.  It
+offers a Lua-based alternative to the java based @file{pax.jar} to extract the
+annotations from a PDF.  The resulting file can then be used together with
+@file{pax.sty}.  It also offers an extended style which works with all three
+major engines.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-newunicodechar
+  (package
+    (name "texlive-newunicodechar")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/newunicodechar/"
+                   "source/latex/newunicodechar/"
+                   "tex/latex/newunicodechar/")
+             (base32
+              "1b3n5mdfw9csp0ri1vw4jh1ibnpsllb5n6pwfkg1jad10ml9wavz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://www.ctan.org/pkg/newunicodechar")
     (synopsis "Definitions of the meaning of Unicode characters")
     (description
@@ -5622,177 +15182,589 @@ Unicode characters.  The document should be processed by (pdf)LaTeX with the
 Unicode option of @code{inputenc} or @code{inputenx}, or by XeLaTeX/LuaLaTeX.")
     (license license:lppl1.3c+)))
 
+(define-deprecated-package texlive-latex-newunicodechar texlive-newunicodechar)
+
+(define-public texlive-newverbs
+  (package
+    (name "texlive-newverbs")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/newverbs/" "source/latex/newverbs/"
+                   "tex/latex/newverbs/")
+             (base32
+              "02mhqgsfd13i1llhm0rgq3f9qs067jih2s15q1zvsfd5bhzls1pq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'copy-ydocstrip.tex
+            ;; There's a circular dependency between `newverbs' (where `ydoc'
+            ;; should be a native input) and `ydoc' (where `newverbs' is
+            ;; a propagated input).  To work around this, install the specific
+            ;; "ydocstrip.tex" file from `ydoc' in the build directory and set
+            ;; TEXINPUTS variable accordingly so the process can find it.
+            (lambda* (#:key inputs #:allow-other-keys)
+              (install-file (search-input-file inputs
+                                               "tex/generic/ydoc/ydocstrip.tex")
+                            "build/")
+              (setenv "TEXINPUTS" (string-append (getcwd) "/build:")))))))
+    (native-inputs
+     (list
+      (texlive-origin
+       "ydocstrip.tex" (number->string %texlive-revision)
+       (list "tex/generic/ydoc/ydocstrip.tex")
+       (base32
+        "1nixgvmw8c6jznhxys3yfzr3qw1lci8kyx54rs0shm6i63xjgr9i"))))
+    (home-page "https://ctan.org/pkg/newverbs")
+    (synopsis "Define new versions of @code{\\verb}")
+    (description
+     "The package allows the definition of @code{\\verb} variants which add
+TeX code before and after the verbatim text (e.g., quotes or surrounding
+@code{\\fbox@{@}}).  When used together with the @code{shortvrb} package it
+allows the definition of short verbatim characters which use this package's
+variant instead of the normal @code{\\verb}.  In addition, it is possible to
+collect an argument verbatim to either typeset or write it into a file.  The
+@code{\\Verbdef} command defines verbatim text to a macro which can later be
+used to write the verbatim text to a file.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-nodetree
+  (package
+    (name "texlive-nodetree")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/nodetree/"
+                   "source/luatex/nodetree/"
+                   "tex/luatex/nodetree/")
+             (base32
+              "00lj7wykgc2r5pgijm9lxjrghq8bsx6whanzvsxcwf639mzv3528")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/nodetree")
+    (synopsis "Visualize node lists in a tree view")
+    (description
+     "@code{nodetree} is a development package that visualizes the structure
+of node lists.  It uses a similar visual representation for node lists as the
+UNIX @command{tree} command for a folder structure.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-noto
+  (package
+    (name "texlive-noto")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/noto/"
+                   "fonts/enc/dvips/noto/"
+                   "fonts/map/dvips/noto/"
+                   "fonts/tfm/google/noto/"
+                   "fonts/truetype/google/noto/"
+                   "fonts/type1/google/noto/"
+                   "fonts/vf/google/noto/"
+                   "tex/latex/noto/")
+             (base32
+              "14nf6xd85cb5s9f1sk8zzshgfhjda0r712dp592j8cb4s5v2hf7p")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/noto")
+    (synopsis "Support for Noto fonts")
+    (description
+     "This package provides LaTeX, pdfLaTeX, XeLaTeX and LuaLaTeX support for
+the NotoSerif, NotoSans and NotoSansMono families of fonts, designed by Steve
+Matteson for Google.")
+    (license (list license:lppl license:silofl1.1))))
+
+(define-public texlive-novel
+  (package
+    (name "texlive-novel")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/novel/"
+                   "fonts/opentype/novel/"
+                   "tex/lualatex/novel/")
+             (base32
+              "0qg6rs54w1n1vr5dmi6vjks8xn8x04zngk8zz4cv0035jxn4irpc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/novel")
+    (synopsis "Class for printing fiction, such as novels")
+    (description
+     "This LuaLaTeX document class is specifically written to meet the needs
+of original fiction writers, who are typesetting their own novels for
+non-color print-on-demand technology.  The package is well suited for
+detective novels, science fiction, and short stories.  It is however not
+recommended for creating color picture books or dissertations.")
+    (license (list license:lppl1.3c license:silofl1.1))))
+
+(define-public texlive-octavo
+  (package
+    (name "texlive-octavo")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/octavo/" "source/latex/octavo/"
+                   "tex/latex/octavo/")
+             (base32
+              "10ycj2xg2v7cq4my51dcc749hrrkg2gd41xyrwv1dg1lp9vh7j4z")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/octavo")
+    (synopsis "Typeset books following classical design and layout")
+    (description
+     "The @code{octavo} class is a modification of the standard LaTeX
+@code{book} class.  Its purpose is to typeset books following classical design
+and layout principles, with the express intention of encouraging the making of
+beautiful books by anyone with access to a good printer and with an
+inclination towards venerable crafts, e.g., bookbinding.  The @code{octavo}
+class differs from the book class by implementing many of the proposals and
+insights of respected experts, especially Jan Tschichold and Hugh Williamson.
+The documentation discusses methods to organise and print out any text into
+signatures, which can then be gathered, folded and sewn into a book.")
+    (license license:lppl)))
+
+(define-public texlive-odsfile
+  (package
+    (name "texlive-odsfile")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/odsfile/"
+                   "tex/lualatex/odsfile/")
+             (base32
+              "03zfzwjhrrsw8z9v8jsd730iiqbc44s38jra36b0il4xqgbknyqg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/odsfile")
+    (synopsis "Read OpenDocument Spreadsheet documents as LaTeX tables")
+    (description
+     "The distribution includes a package and a Lua library that can together
+read OpenDocument spreadsheet documents as LaTeX tables.  Cells in the tables
+may be processed by LaTeX macros, so that, for example, the package may be
+used for drawing some plots.  The package uses Lua's @code{zip} library.")
+    (license license:lppl1.3c)))
+
 (define-public texlive-pdftexcmds
-  (let ((template (simple-texlive-package
-                   "texlive-pdftexcmds"
-                   (list "doc/generic/pdftexcmds/"
-                         "source/generic/pdftexcmds/"
-                         "tex/generic/pdftexcmds/")
-                   (base32
-                    "0gad1vi0r5xw7gyj1cb2cp58j4dqrw4awcfxmfrna9xbz91g4sn9"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/pdftexcmds")
-         ((#:build-targets _ '())
-          #~(list "pdftexcmds.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/generic/pdftexcmds")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (propagated-inputs
-       (list texlive-iftex texlive-infwarerr texlive-ltxcmds))
-      (home-page "https://www.ctan.org/pkg/pdftexcmds")
-      (synopsis "LuaTeX support for pdfTeX utility functions")
-      (description
-       "This package makes a number of utility functions from pdfTeX
+  (package
+    (name "texlive-pdftexcmds")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/pdftexcmds/"
+                   "source/generic/pdftexcmds/"
+                   "tex/generic/pdftexcmds/")
+             (base32
+              "0gad1vi0r5xw7gyj1cb2cp58j4dqrw4awcfxmfrna9xbz91g4sn9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://www.ctan.org/pkg/pdftexcmds")
+    (synopsis "LuaTeX support for pdfTeX utility functions")
+    (description
+     "This package makes a number of utility functions from pdfTeX
 available for LuaTeX by reimplementing them using Lua.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-latex-pdftexcmds texlive-pdftexcmds)
 
-(define-public texlive-latex-psfrag
+(define-public texlive-philokalia
   (package
-    (name "texlive-latex-psfrag")
+    (name "texlive-philokalia")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "psfrag"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1dxbl5il7wbbsp0v45vk884xi1192wxw03849pb1g5q4x808n352"))))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/philokalia/"
+                   "fonts/opentype/public/philokalia/"
+                   "source/xelatex/philokalia/"
+                   "tex/xelatex/philokalia/")
+             (base32
+              "1pcszddyyc4caqd1ahcl10rf1mn0m1lrdgn1gldv94cpa89653kg")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/psfrag"))
-    (home-page "https://www.ctan.org/pkg/psfrag")
+    (home-page "https://ctan.org/pkg/philokalia")
+    (synopsis "Font to typeset the Philokalia Books")
+    (description
+     "The @code{philokalia} package has been designed to ease the use of the
+Philokalia-Regular OpenType font with XeLaTeX.  The font started as a project
+to digitize the typeface used to typeset the Philokalia books.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-piechartmp
+  (package
+    (name "texlive-piechartmp")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/piechartmp/"
+                   "metapost/piechartmp/")
+             (base32
+              "0xf83k85bwbdy4d1m23zyk5zjg9qw960q4rkgf2i1449w30gf3hp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/piechartmp")
+    (synopsis "Draw pie-charts using MetaPost")
+    (description
+     "The @code{piechartmp} package is an easy way to draw pie-charts with
+MetaPost.  The package implements an interface that enables users with little
+MetaPost experience to draw charts.  A highlight of the package is the
+possibility of suppressing some segments of the chart, thus creating the
+possibility of several charts from the same data.")
+    (license license:lppl)))
+
+(define-public texlive-placeins
+  (package
+    (name "texlive-placeins")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/placeins/" "tex/latex/placeins/")
+             (base32
+              "0785ppjhf4x3by61mskwz289nzvbbw6iw7n0fq2dckgywjw3p2mz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/placeins")
+    (synopsis "Control float placement")
+    (description
+     "This package defines a @code{\\FloatBarrier} command, beyond which
+floats may not pass; useful, for example, to ensure all floats for a section
+appear before the next @code{\\section} command.")
+    (license license:public-domain)))
+
+(define-public texlive-psfrag
+  (package
+    (name "texlive-psfrag")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/psfrag/"
+                   "dvips/psfrag/"
+                   "source/latex/psfrag/"
+                   "tex/latex/psfrag/")
+             (base32
+              "06vp5x6rnl4gqwxzzynbl169q23k8pmaxjhb0lbzdcm3ihvzp47z")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/psfrag")
     (synopsis "Replace strings in encapsulated PostScript figures")
     (description
      "This package allows LaTeX constructions (equations, picture
 environments, etc.) to be precisely superimposed over Encapsulated PostScript
 figures, using your own favorite drawing tool to create an EPS figure and
-placing simple text \"tags\" where each replacement is to be placed, with
-PSfrag automatically removing these tags from the figure and replacing them
-with a user specified LaTeX construction, properly aligned, scaled, and/or
+placing simple text tags where each replacement is to be placed, with PSfrag
+automatically removing these tags from the figure and replacing them with
+a user specified LaTeX construction, properly aligned, scaled, and/or
 rotated.")
     (license (license:fsf-free "file://psfrag.dtx"))))
 
+(define-deprecated-package texlive-latex-psfrag texlive-psfrag)
+
 (define-public texlive-pstool
   (package
-    (inherit (simple-texlive-package
-              "texlive-pstool"
-              (list "/doc/latex/pstool/"
-                    "/tex/latex/pstool/")
-              (base32
-               "12clzcw2cl7g2chr2phgmmiwxw4859cln1gbx1wgp8bl9iw590nc")
-              #:trivial? #t))
-    (propagated-inputs
-     (list texlive-bigfoot ; for suffix
-           texlive-filemod
-           texlive-graphics
-           texlive-latex-ifplatform
-           texlive-latex-l3kernel ; for expl3
-           texlive-oberdiek
-           texlive-latex-psfrag
-           texlive-tools ; for shellesc
-           texlive-latex-trimspaces
-           texlive-latex-xkeyval))
-    (home-page "https://www.ctan.org/pkg/pstool")
-    (synopsis "Process PostScript graphics within pdfLaTeX documents")
+    (name "texlive-pstool")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pstool/" "tex/latex/pstool/")
+             (base32
+              "12clzcw2cl7g2chr2phgmmiwxw4859cln1gbx1wgp8bl9iw590nc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pstool")
+    (synopsis "Support for @code{psfrag} within pdfLaTeX")
     (description
      "This is a package for processing PostScript graphics with @code{psfrag}
 labels within pdfLaTeX documents.  Every graphic is compiled individually,
 drastically speeding up compilation time when only a single figure needs
 re-processing.")
-    (license license:lppl)))
+    (license license:lppl1.3c)))
 
 (define-deprecated-package texlive-latex-pstool texlive-pstool)
 
+(define-public texlive-ptext
+  (package
+    (name "texlive-ptext")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/ptext/" "tex/xelatex/ptext/")
+             (base32
+              "0ipb1mlg266rziznskdxi3iwi0s6374lp8ky0hhbi5llryg505p9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ptext")
+    (synopsis "Lipsum for Persian")
+    (description
+     "The package provides lipsum-like facilities for the Persian language.
+The source of the filling text is the Persian epic @emph{the Shanameh} (100
+paragraphs are used).")
+    (license license:lppl1.2+)))
+
+(define-public texlive-realscripts
+  (package
+    (name "texlive-realscripts")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/realscripts/"
+                   "source/latex/realscripts/"
+                   "tex/latex/realscripts/")
+             (base32
+              "1yk1v1ybd1zv1x6rc8qd2mbbwc5h91i44scnih6v2n5nrh61jfxb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/realscripts")
+    (synopsis "Access OpenType subscript and superscript glyphs")
+    (description
+     "This package replaces @code{\\textsuperscript} and
+@code{\\textsubscript} commands by equivalent commands that use OpenType font
+features to access appropriate glyphs if possible.  It also patches LaTeX's
+default footnote command to use this new @code{\\textsuperscript} for footnote
+symbols.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-refcount
-  (let ((template (simple-texlive-package
-                   "texlive-refcount"
-                   (list "doc/latex/refcount/"
-                         "source/latex/refcount/"
-                         "tex/latex/refcount/")
-                   (base32
-                    "128cvwdl4wcdshvs59yn5iljdxxdrc5jircbxav77y7kc3l33z7z"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/refcount")
-         ((#:build-targets _ '())
-          #~(list "refcount.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/refcount")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/refcount")
-      (synopsis "Counter operations with label references")
-      (description
-       "This package provides the @code{\\setcounterref} and
+  (package
+    (name "texlive-refcount")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/refcount/" "source/latex/refcount/"
+                   "tex/latex/refcount/")
+             (base32
+              "128cvwdl4wcdshvs59yn5iljdxxdrc5jircbxav77y7kc3l33z7z")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://www.ctan.org/pkg/refcount")
+    (synopsis "Counter operations with label references")
+    (description
+     "This package provides the @code{\\setcounterref} and
 @code{\\addtocounterref} commands which use the section (or other) number
 from the reference as the value to put into the counter.  It also provides
 @code{\\setcounterpageref} and @code{\\addtocounterpageref} that do the
 corresponding thing with the page reference of the label.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-latex-refcount texlive-refcount)
 
+(define-public texlive-repere
+  (package
+    (name "texlive-repere")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/repere/" "metapost/repere/")
+             (base32
+              "06p184mgv0cac36pp1srrd80axvkxf155l3jf01dnvd2x1d7dwlk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/repere")
+    (synopsis "MetaPost macros for secondary school mathematics teachers")
+    (description
+     "This package provides MetaPost macros for drawing secondary school
+mathematics figures in a coordinate system: axis, grids points, vectors
+functions (curves, tangents, integrals, sequences) statistic diagrams plane
+geometry (polygons, circles), arrays and game boards.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-revtex
+  (package
+    (name "texlive-revtex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bst/revtex/" "doc/latex/revtex/"
+                   "source/latex/revtex/" "tex/latex/revtex/")
+             (base32
+              "0w4vmrghnhs8bgpbdp2rzsh4b7hgvldyzkd870wa27k9wk2lk6a1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/revtex")
+    (synopsis "Styles for various Physics Journals")
+    (description
+     "This package includes styles for American Physical Society, American
+Institute of Physics, and Optical Society of America.  The distribution
+consists of the RevTeX class itself, and several support packages.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-roex
+  (package
+    (name "texlive-roex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "metafont/roex/" "source/metafont/roex/")
+             (base32
+              "12w5wrrlk8rd4gx57646r01rb49ckmgnzhmx9385ll0sag8c9s2v")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mf-ps")
+    (synopsis "Metafont-PostScript conversions")
+    (description
+     "This package provides a Metafont support package including: @code{epstomf},
+a tiny AWK script for converting EPS files into Metafont; @code{mftoeps} for
+generating (encapsulated) PostScript files readable, e.g., by CorelDRAW, Adobe
+Illustrator and Fontographer; a collection of routines (in folder progs) for
+converting Metafont-coded graphics into encapsulated PostScript; and
+@code{roex.mf}, which provides Metafont macros for removing overlaps and
+expanding strokes.  In @code{mftoeps}, Metafont writes PostScript code to
+a log-file, from which it may be extracted by either TeX or AWK.")
+    (license license:public-domain)))
+
+(define-public texlive-roundrect
+  (package
+    (name "texlive-roundrect")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/roundrect/"
+                   "metapost/roundrect/"
+                   "source/metapost/roundrect/")
+             (base32
+              "0bx6xfr49rrcrnbyw917fab2qi0x29h66ip4nyhw6477815ic0wq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/roundrect")
+    (synopsis "MetaPost macros for configurable rounded rectangles")
+    (description
+     "The @code{roundrect} macros for MetaPost provide ways to produce rounded
+rectangles, which may or may not contain a title bar or text (the title bar
+may itself contain text).")
+    (license license:lppl1.3+)))
+
+(define-public texlive-sauerj
+  (package
+    (name "texlive-sauerj")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/sauerj/" "source/latex/sauerj/"
+                   "tex/latex/sauerj/")
+             (base32
+              "03dmw150qcravzndikijhq2a89sjdplxgi93fx0zxln2l4flvz5k")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/sauerj")
+    (synopsis "Bundle of utilities by Jonathan Sauer")
+    (description
+     "The bundle consists of:
+@itemize
+@item a tool for collecting text for later re-use,
+@item a tool for typesetting the meta-information within a text,
+@item a tool for use in constructing macros with multiple optional parameters,
+@item a package for multiple column parallel texts,
+@item a tool for processing key-value structured lists,
+@item macros for typesetting a number as a German-language string.
+@end itemize")
+    (license license:lppl)))
+
+(define-public texlive-selinput
+  (package
+    (name "texlive-selinput")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/selinput/" "source/latex/selinput/"
+                   "tex/latex/selinput/")
+             (base32
+              "0x8l98r6xzyi4lc909bv7ii2nbpff8j7j3q4z86l7rrjk1jkx9qi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/selinput")
+    (synopsis "Semi-automatic detection of input encoding")
+    (description
+     "This package selects the input encoding by specifying pairs of input
+characters and their glyph names.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-semaphor
+  (package
+    (name "texlive-semaphor")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/semaphor/"
+                   "fonts/afm/public/semaphor/"
+                   "fonts/enc/dvips/semaphor/"
+                   "fonts/map/dvips/semaphor/"
+                   "fonts/opentype/public/semaphor/"
+                   "fonts/source/public/semaphor/"
+                   "fonts/tfm/public/semaphor/"
+                   "fonts/type1/public/semaphor/"
+                   "tex/context/third/semaphor/"
+                   "tex/latex/semaphor/"
+                   "tex/plain/semaphor/")
+             (base32
+              "1yigah8x75fd13x0f6ncpp21ly75nyfz6h5y5sfc590n7wcm0gvr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-metafont))
+    (home-page "https://ctan.org/pkg/semaphor")
+    (synopsis "Semaphore alphabet font")
+    (description
+     "These fonts represent semaphore in a highly schematic, but very clear,
+fashion.  The fonts are provided as Metafont source, and in both OpenType and
+Adobe Type 1 formats.")
+    (license license:gpl3+)))
+
 (define-public texlive-seminar
   (package
-    (inherit (simple-texlive-package
-              "texlive-seminar"
-              (list "/doc/latex/seminar/"
-                    "/tex/latex/seminar/")
-              (base32
-               "1clgw5xy867khzfn8d210rc5hsw5s7r0pznhk84niybvw4zc7r3f")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/seminar")
+    (name "texlive-seminar")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/seminar/" "tex/latex/seminar/")
+             (base32
+              "1xm78f9qsy3zr1vllb8mgp1azhn7a2jaqkj2lkrsgc3m7ag9w9hh")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/seminar")
     (synopsis "Make overhead slides")
-    ;; TODO: This package may need fancybox and xcomment at runtime.
     (description
      "This package provides a class that produces overhead
 slides (transparencies), with many facilities.  Seminar is not nowadays
 reckoned a good basis for a presentation — users are advised to use more
-recent classes such as powerdot or beamer, both of which are tuned to
-21st-century presentation styles.")
+recent classes such as @code{powerdot} or @code{beamer}, both of which are
+tuned to 21st-century presentation styles.")
     (license license:lppl1.2+)))
 
 (define-deprecated-package texlive-latex-seminar texlive-seminar)
 
-(define-public texlive-latex-seqsplit
+(define-public texlive-sepnum
   (package
-    (inherit (simple-texlive-package
-              "texlive-latex-seqsplit"
-              (list "doc/latex/seqsplit/"
-                    "tex/latex/seqsplit/")
-              (base32 "1vwzs90520qsk22djl6gs6gpqx83y4b19kziirwj2xwbivcfk1h4")
-              #:trivial? #t))
+    (name "texlive-sepnum")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/sepnum/" "tex/latex/sepnum/")
+             (base32
+              "1vzjhb470imd1f5wlj32jysn825vyygq9xkscqdjaa9jby70a26x")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/sepnum")
+    (synopsis "Print numbers in a friendly format")
+    (description
+     "This package provides a command to print a number with (potentially
+different) separators every three digits in the parts either side of the
+decimal point (the point itself is also configurable).  The macro is fully
+expandable and not fragile (unless one of the separators is).  There is also
+a command @code{\\sepnumform}, that may be used when defining
+@samp{\\the<counter> macros}.")
+    (license license:lppl)))
+
+(define-public texlive-seqsplit
+  (package
+    (name "texlive-seqsplit")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/seqsplit/"
+                   "source/latex/seqsplit/"
+                   "tex/latex/seqsplit/")
+             (base32
+              "0x6xcism9s9mhpr278xi4c1gimz3mlqnrpr40vkx5abglr0gzm0j")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/seqsplit")
     (synopsis "Split long sequences of characters in a neutral way")
@@ -5806,16 +15778,142 @@ numbers.  While the package may obviously be used to typeset DNA sequences, the
 user may consider the @code{dnaseq} as a rather more powerful alternative.")
     (license license:lppl1.3+)))
 
-(define-public texlive-latex-stackengine
+(define-deprecated-package texlive-latex-seqsplit texlive-seqsplit)
+
+(define-public texlive-shapes
   (package
-    (inherit (simple-texlive-package
-              "texlive-latex-stackengine"
-              (list "/doc/latex/stackengine/"
-                    "/tex/latex/stackengine/")
-              (base32
-               "1rbw3dmb6kl3wlnpxacr8cmp2ivac1kpnb33k7r5s3lp1q59ck38")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/stackengine")
+    (name "texlive-shapes")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/shapes/" "metapost/shapes/"
+                   "source/metapost/shapes/")
+             (base32
+              "0q93ycxjzmvp73z92rc7vlzvmijbj2w1ldq709r9jflk044lsrh2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/shapes")
+    (synopsis "Draw polygons, reentrant stars, and fractions in circles")
+    (description
+     "The shapes set of macros allows drawing regular polygons; their
+corresponding reentrant stars in all their variations; and fractionally filled
+circles (useful for visually demonstrating the nature of fractions) in
+MetaPost.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-showexpl
+  (package
+    (name "texlive-showexpl")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/showexpl/" "source/latex/showexpl/"
+                   "tex/latex/showexpl/")
+             (base32
+              "0vff1yk7a3f4csxibfk6r37s3h6n4wdpnk3qj4dsx7kh5zrcysha")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/showexpl")
+    (synopsis "Typesetting LaTeX source code")
+    (description
+     "This package provides a way to typeset LaTeX source code and the related
+result in the same document.")
+    (license license:lppl1.2+)))
+
+(define-public texlive-simple-resume-cv
+  (package
+    (name "texlive-simple-resume-cv")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/simple-resume-cv/"
+                   "tex/xelatex/simple-resume-cv/")
+             (base32
+              "07lqmjfjr58q7jgl59syv67hsy54rsig9f002wkwr1297z02k862")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/simple-resume-cv")
+    (synopsis "Template for a simple resume or curriculum vitae (CV)")
+    (description
+     "This package provides a template for a simple resume or curriculum
+vitae (CV), in XeLaTeX.  This simple template can be further customized or
+extended, with numerous examples.")
+    (license license:public-domain)))
+
+(define-public texlive-simple-thesis-dissertation
+  (package
+    (name "texlive-simple-thesis-dissertation")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list
+              "doc/xelatex/simple-thesis-dissertation/Figures/"
+              "tex/xelatex/simple-thesis-dissertation/")
+             (base32
+              "023bl8ic6bn86297wbxip5lm34wkbq1kcrizkmmsdz7cfxpn6637")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/simple-thesis-dissertation")
+    (synopsis "Template for a simple thesis, dissertation, or technical report")
+    (description
+     "This package provides a template for a simple thesis or dissertation or
+technical report, in XeLaTeX.  This simple template that can be further
+customized or extended, with numerous examples.")
+    (license license:public-domain)))
+
+(define-public texlive-slideshow
+  (package
+    (name "texlive-slideshow")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/slideshow/"
+                   "metapost/slideshow/")
+             (base32
+              "07r58whn61nyxj0cldzf9bbwhh0kc72d6708ldf03q7sbf5zi37s")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/slideshow")
+    (synopsis "Generate slideshow with MetaPost")
+    (description
+     "The package provides a means of creating presentations in MetaPost,
+without intervention from other utilities (except a distiller).")
+    (license (license:fsf-free "file://metapost/slideshow/slideshow.mp"))))
+
+(define-public texlive-splines
+  (package
+    (name "texlive-splines")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/splines/" "metapost/splines/"
+                   "source/metapost/splines/")
+             (base32
+              "15pvr4vl5whcrij6gq3al5jaqrshvm2qybvxq7qx0gdxzfsli38z")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/splines")
+    (synopsis "MetaPost macros for drawing cubic spline interpolants")
+    (description
+     "This is a small package of macros for creating cubic spline interpolants
+in MetaPost or Metafont.  Given a list of points the macros can produce
+a closed or a relaxed spline joining them.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-stackengine
+  (package
+    (name "texlive-stackengine")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/stackengine/"
+                   "tex/latex/stackengine/")
+             (base32
+              "0c12ygqxdb6vn1y03jzcjpmdp53r076hq3hgjzwy2ch1dw81cnpd")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-listofitems))
+    (home-page "https://ctan.org/pkg/stackengine")
     (synopsis "Customised stacking of objects")
     (description
      "The package provides a versatile way to stack objects vertically in a
@@ -5823,166 +15921,650 @@ variety of customizable ways.  A number of useful macros are provided, all
 of which make use of the @code{stackengine} core.")
     (license license:lppl1.3+)))
 
-(define-public texlive-latex-tocloft
+(define-deprecated-package texlive-latex-stackengine texlive-stackengine)
+
+(define-public texlive-suanpan
   (package
-    (inherit (simple-texlive-package
-              "texlive-latex-tocloft"
-              '("/doc/latex/tocloft/" "/tex/latex/tocloft/")
-              (base32
-               "0mg3hpzq7wpm6mnnvb0rp3wby56zyxkyai8d2h3f4vk93zrc6awk")
-              #:trivial? #t))
+    (name "texlive-suanpan")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/suanpan/" "metapost/suanpan/")
+             (base32
+              "1ddhk8d98bc4l2xbx5w6kaynl4n125nnv4hadfp5s19vwcc6slqv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/suanpan")
+    (synopsis "MetaPost macros for drawing Chinese and Japanese abaci")
+    (description
+     "The package provides macros for drawing Chinese and Japanese abaci.")
+    (license license:lppl)))
+
+(define-public texlive-synctex
+  (package
+    (name "texlive-synctex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/synctex.1"
+                   "doc/man/man1/synctex.man1.pdf"
+                   "doc/man/man5/synctex.5"
+                   "doc/man/man5/synctex.man5.pdf")
+             (base32
+              "1a2nlmbib8723jjhf6xxh5rpmnd5jv3cd69br4ihchbq5ipzircp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/synctex")
+    (synopsis "Engine-level feature synchronizing output and source")
+    (description
+     "SyncTeX allows navigating between the TeX source and (usually PDF)
+output, in both directions, given a SyncTeX-aware front end.  It is compiled
+into most engines and can be enabled with the @samp{--synctex=1} option.")
+    (license license:expat)))
+
+(define-public texlive-tetragonos
+  (package
+    (name "texlive-tetragonos")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/tetragonos/"
+                   "tex/xelatex/tetragonos/")
+             (base32
+              "191727d2craai25847i2xfzlm04852afvrwdjsk3jjss46a43ixn")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tetragonos")
+    (synopsis "Four-Corner codes of Chinese characters")
+    (description
+     "This is a XeLaTeX package for mapping Chinese characters to their codes
+in the Four-Corner method.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-threeddice
+  (package
+    (name "texlive-threeddice")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/threeddice/"
+                   "metapost/threeddice/")
+             (base32
+              "1sj4f3bbxjzwbncxlvlbmsnfi7jkf5625gwhbqfh399vlh0nb56j")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/threeddice")
+    (synopsis "Create images of dice with one, two, or three faces showing")
+    (description
+     "The package provides MetaPost code to create all possible symmetrical
+views (up to rotation) of a right-handed die.")
+    (license license:lppl)))
+
+(define-public texlive-textpath
+  (package
+    (name "texlive-textpath")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/textpath/"
+                   "metapost/textpath/" "tex/latex/textpath/")
+             (base32
+              "07g7n0hjsvsk0cibprpqid43vvljjzagap07zbp2kirkiv7yq3k0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/textpath")
+    (synopsis "Setting text along a path with MetaPost")
+    (description
+     "This MetaPost package provides macros to typeset text along a free path
+with the help of LaTeX, thereby preserving kerning and allowing for 8-bit
+input (accented characters).")
+    (license license:lppl)))
+
+(define-public texlive-tocloft
+  (package
+    (name "texlive-tocloft")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tocloft/"
+                   "source/latex/tocloft/"
+                   "tex/latex/tocloft/")
+             (base32
+              "1s09g02pq2zi5ywm3yhyp4lpzq77n9aahr6wnm1c0wb9zawq2mpk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://www.ctan.org/pkg/tocloft")
     (synopsis "Control table of contents")
     (description
-     "This package provides control over the typography of the
-@dfn{Table of Contents}, @dfn{List of Figures} and @dfn{List of Tables},
-and the ability to create new ‘List of ...’. The ToC @code{\\parskip} may
-be changed.")
+     "This package provides control over the typography of the @dfn{Table of
+Contents}, @dfn{List of Figures} and @dfn{List of Tables}, and the ability to
+create new @samp{List of ...}.  The ToC @code{\\parskip} may be changed.")
     (license license:lppl1.3c+)))
 
-(define-public texlive-latex-trimspaces
+(define-deprecated-package texlive-latex-tocloft texlive-tocloft)
+
+(define-public texlive-trimspaces
   (package
-    (name "texlive-latex-trimspaces")
+    (name "texlive-trimspaces")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "trimspaces"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0da00lb32am4g63mn96625wg48p3pj3spx79lajrk17d549apwqa"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/trimspaces/"
+                   "source/latex/trimspaces/"
+                   "tex/latex/trimspaces/")
+             (base32
+              "0if7pqaib533fbrj9r62mmr4h012hrpszdxs759rwhmyycikg6dk")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (arguments
-     '(#:tex-directory "latex/trimspaces"
-       #:tex-format "latex"
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-bug
-           (lambda _
-             ;; The "ins" file refers to the wrong source file.
-             (substitute* "trimspaces.ins"
-               (("pstool.tex") "trimspaces.tex"))
-             #t)))))
-    (inputs
-     (list texlive-filecontents))
-    (home-page "https://www.ctan.org/pkg/trimspaces")
+     (list
+      #:tex-format "latex"
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-bug
+            (lambda _
+              ;; The "ins" file refers to the wrong source file.
+              (substitute* "source/latex/trimspaces/trimspaces.ins"
+                (("pstool\\.tex") "trimspaces.tex")))))))
+    (native-inputs (list texlive-filecontents))
+    (home-page "https://ctan.org/pkg/trimspaces")
     (synopsis "Trim spaces around an argument or within a macro")
     (description
-     "This very short package allows you to expandably remove spaces around a
-token list (commands are provided to remove spaces before, spaces after, or
-both); or to remove surrounding spaces within a macro definition, or to define
-space-stripped macros.")
+     "This package provides a very short package that allows you to expandably
+remove spaces around a token list (commands are provided to remove spaces
+before, spaces after, or both); or to remove surrounding spaces within a macro
+definition, or to define space-stripped macros.")
     (license license:lppl)))
 
+(define-deprecated-package texlive-latex-trimspaces texlive-trimspaces)
+
+(define-public texlive-tufte-latex
+  (package
+    (name "texlive-tufte-latex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bst/tufte-latex/"
+                   "doc/latex/tufte-latex/"
+                   "tex/latex/tufte-latex/")
+             (base32
+              "16jqf8assirdj769rajrdb70w8rc0kyj0q07bs6v13kfil5h0bdp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs
+     (list texlive-changepage
+           texlive-ifmtarg
+           texlive-paralist
+           texlive-placeins
+           texlive-sauerj
+           texlive-xifthen))
+    (home-page "https://ctan.org/pkg/tufte-latex")
+    (synopsis "Document classes inspired by the work of Edward Tufte")
+    (description
+     "This package provides two classes inspired, respectively, by handouts
+and books created by Edward Tufte.")
+    (license license:asl2.0)))
+
+(define-public texlive-ucharclasses
+  (package
+    (name "texlive-ucharclasses")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/ucharclasses/"
+                   "tex/xelatex/ucharclasses/")
+             (base32
+              "0pgzs730zqmcck693i7fq771p7szq6nqdxb9w8dy6l2b4zdql14m")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ucharclasses")
+    (synopsis "Font actions in XeTeX according to what is being processed")
+    (description
+     "The package takes care of switching fonts when you switch from one
+Unicode block to another in the text of a document.  This way, you can write
+a document with no explicit font selection, but a series of rules of the form
+``when entering block ..., switch font to use ...''.")
+    (license license:public-domain)))
+
+(define-public texlive-unicode-bidi
+  (package
+    (name "texlive-unicode-bidi")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/unicode-bidi/"
+                   "tex/xelatex/unicode-bidi/")
+             (base32
+              "0anwaaf21qcdgni9z85hqap1wb4y9pv13p96x13w29hbqizmf69l")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/unicode-bidi")
+    (synopsis "Experimental Unicode Bidi package for XeTeX")
+    (description
+     "The experimental Unicode-Bidi package allows to mix non-RTL script with
+RTL script without any markup.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-unimath-plain-xetex
+  (package
+    (name "texlive-unimath-plain-xetex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xetex/unimath-plain-xetex/"
+                   "fonts/misc/xetex/fontmapping/unimath-plain-xetex/"
+                   "tex/xetex/unimath-plain-xetex/")
+             (base32
+              "0vqnqfklg1mj7mipgrfng0qq1i9psiqri0yh30ixrz8j6mkaqb35")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/unimath-plain-xetex")
+    (synopsis "OpenType math support in (plain) XeTeX")
+    (description
+     "This package provides OpenType math font support in plain TeX format.
+It only works with the XeTeX engine.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-unisugar
+  (package
+    (name "texlive-unisugar")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/unisugar/"
+                   "tex/xelatex/unisugar/")
+             (base32
+              "1bn88ghfn14am1grph1pjw9k0xy1rz8swzhsbxsxyzz6cqk9s161")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/unisugar")
+    (synopsis "Define syntactic sugar for Unicode LaTeX")
+    (description
+     "The package allows the user to define shorthand aliases for single
+Unicode characters, and also provides support for such aliases in RTL-text.
+The package requires an TeX-alike system that uses Unicode input in a native
+way: current examples are XeTeX and LuaTeX.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-xebaposter
+  (package
+    (name "texlive-xebaposter")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/xebaposter/"
+                   "tex/latex/xebaposter/")
+             (base32
+              "18fnwfhfk3jzkp4yd0dfi49jnf8njccbhhd6k15pvghs4brd9hba")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xebaposter")
+    (synopsis "Create scientific Persian/Latin posters using TikZ")
+    (description
+     "This package is designed for making scientific Persian/Latin posters.
+It is a fork of @code{baposter} by Brian Amberg and Reinhold Kainhofer.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-xechangebar
+  (package
+    (name "texlive-xechangebar")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/xechangebar/"
+                   "tex/xelatex/xechangebar/")
+             (base32
+              "0a7b9bffh5b435gw4qxydmfrpizly79cjgjhhlgywwg6gibvxn4s")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xechangebar")
+    (synopsis "Extension of package @code{changebar} for use with XeLaTeX")
+    (description
+     "The package extends package @code{changebar} so it can be used with
+XeLaTeX.  It introduces the new option @code{xetex} for use with XeLaTeX.
+Everything else remains the same and users should consult the original
+documentation for usage information.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-xecolor
+  (package
+    (name "texlive-xecolor")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/xecolor/"
+                   "tex/xelatex/xecolor/")
+             (base32
+              "0adzg2j1lmclr5zcs8da3m1b9q5xs50rxga6k2pzzxy2x0nh1xpi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xecolor")
+    (synopsis "Support for color in XeLaTeX")
+    (description
+     "This is a simple package which defines about 140 different colours using
+XeTeX's colour feature.  The colours can be used in bidirectional texts
+without any problem.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-xecyr
+  (package
+    (name "texlive-xecyr")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/xecyr/" "tex/xelatex/xecyr/")
+             (base32
+              "07qvxfnwha6iqzcv84ws074jdi8jn60h42l93jn037n3zj2qxkg8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xecyr")
+    (synopsis "Using Cyrillic languages in XeTeX")
+    (description
+     "This package provides helper tools for using Cyrillic languages with
+XeLaTeX and @code{babel}.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-xeindex
+  (package
+    (name "texlive-xeindex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/xeindex/"
+                   "tex/xelatex/xeindex/")
+             (base32
+              "1sps9lrzm9y2rrin5pkgzyk56c77xnydvp21ljmvsimqgafr5aqb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xeindex")
+    (synopsis "Automatic index generation for XeLaTeX")
+    (description
+     "The package is based on XeSearch, and will automatically index words or
+phrases in an XeLaTeX document.  Words are declared in a list, and every
+occurrence then creates an index entry whose content can be fully specified
+beforehand.")
+    (license license:lppl)))
+
+(define-public texlive-xesearch
+  (package
+    (name "texlive-xesearch")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xetex/xesearch/" "tex/xetex/xesearch/")
+             (base32
+              "13fdllqswyyvvyjqn0a4ld18dixxnn7zlpagsdaq8cl1svpaxpk5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xesearch")
+    (synopsis "String finder for XeTeX")
+    (description
+     "The package finds strings (e.g., parts of words or phrases) and
+manipulates them, thus turning each word or phrase into a possible command.
+It is written in plain XeTeX and should thus work with any format.  The main
+application for the moment is XeIndex, an automatic index for XeLaTeX, but
+examples are given of simple use to check spelling, count words, and highlight
+syntax of programming languages.")
+    (license license:lppl)))
+
+(define-public texlive-xespotcolor
+  (package
+    (name "texlive-xespotcolor")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/xespotcolor/"
+                   "source/xelatex/xespotcolor/"
+                   "tex/xelatex/xespotcolor/")
+             (base32
+              "0pqv4y2idcazwdy94ryyrk5s2g66sb7liy9hypqaq69symn8myf7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xespotcolor")
+    (synopsis "Spot colours support for XeLaTeX")
+    (description
+     "The package provides macros for using spot colours in LaTeX documents.
+The package is a reimplementation of the @code{spotcolor} package for use with
+XeLaTeX.  As such, it has the same user interface and the same capabilities.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-xetex-itrans
+  (package
+    (name "texlive-xetex-itrans")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/xetex-itrans/"
+                   "fonts/misc/xetex/fontmapping/xetex-itrans/")
+             (base32
+              "1chx2s0p6y5p767cr23jh9x61axjrdnyc5lcvf7kyrg74cszsmql")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xetex-itrans")
+    (synopsis "Itrans input maps for use with XeLaTeX")
+    (description
+     "The package provides maps for use with XeLaTeX with coding done using
+@code{itrans}.  Fontspec maps are provided for Devanagari (Sanskrit), for
+Sanskrit in Kannada and for Kannada itself.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-xetex-pstricks
+  (package
+    (name "texlive-xetex-pstricks")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xetex/xetex-pstricks/"
+                   "tex/xelatex/xetex-pstricks/"
+                   "tex/xetex/xetex-pstricks/")
+             (base32
+              "195zjdxddlwl69gnp2x3jg3l8gn36mxsdbz03qs0r940frx533ls")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xetex-pstricks")
+    (synopsis "Running PSTricks under XeTeX")
+    (description
+     "The package provides an indirection scheme for XeTeX to use the PSTricks
+@file{xdvipdfmx.cfg} configuration file, so that XeTeX documents will load it
+in preference to the standard pstricks.con configuration file.  With this
+configuration, many PSTricks features can be used in XeLaTeX or plain XeTeX
+documents.")
+    (license license:public-domain)))
+
+(define-public texlive-xetex-tibetan
+  (package
+    (name "texlive-xetex-tibetan")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xetex/xetex-tibetan/"
+                   "fonts/misc/xetex/fontmapping/xetex-tibetan/")
+             (base32
+              "02z3jzf16hi9zj50lpf9map5f6ydvxw66f0k4n5ry88s7frbxwmw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xetex-tibetan")
+    (synopsis "XeTeX input maps for Unicode Tibetan")
+    (description
+     "The package provides a map for use with Jonathan Kew's TECkit, to
+translate Tibetan to Unicode (range 0F00-0FFF).")
+    (license license:lppl)))
+
+(define-public texlive-xetexfontinfo
+  (package
+    (name "texlive-xetexfontinfo")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xetex/xetexfontinfo/"
+                   "tex/xetex/xetexfontinfo/")
+             (base32
+              "0x1llikcvwlf74anmvaks73gvd99xha9dg49zh75dwki0nwisn2j")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xetexfontinfo")
+    (synopsis "Report font features in XeTeX")
+    (description
+     "This package provides a pair of documents to reveal the font features
+supported by fonts usable in XeTeX.")
+    (license license:asl2.0)))
+
+(define-public texlive-xetexko
+  (package
+    (name "texlive-xetexko")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xetex/xetexko/" "tex/xetex/xetexko/")
+             (base32
+              "1jp5caxnyjf5fnndszaqpzsgcm2rhk5iapnpf1ca6mvxbnpf1x5l")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xetexko")
+    (synopsis "Typeset Korean with Xe(La)TeX")
+    (description
+     "The package supports typesetting Korean documents (including old Hangul
+texts), using XeTeX.  It enhances the existing support, in XeTeX, providing
+features that provide quality typesetting.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-xevlna
+  (package
+    (name "texlive-xevlna")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/xevlna/" "tex/xelatex/xevlna/")
+             (base32
+              "0gwh1rd5s01rnb11nxk6nxwyqj32bi739p10hwqz3sw1hfy8mnfi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xevlna")
+    (synopsis "Insert non-breakable spaces using XeTeX")
+    (description
+     "The package will directly insert nonbreakable spaces (in Czech, vlna or
+vlnka), after nonsyllabic prepositions and single letter conjuctions, while
+the document is being typeset.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-currfile
+  (package
+    (name "texlive-currfile")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/currfile/" "source/latex/currfile/"
+                   "tex/latex/currfile/")
+             (base32
+              "0g28y2bwqnc3xfcp0ak7rxx0c40b88vl85pj7x5dccmvx0yrxy9n")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-ydoc))
+    (home-page "https://ctan.org/pkg/currfile")
+    (synopsis "Provide file name and path of input files")
+    (description
+     "The package provides macros holding file name information (directory,
+base name, extension, full name and full path) for files read by LaTeX
+@code{\\input} and @code{\\include} macros; it uses the file hooks provided by
+the author's @code{filehook}.  In particular, it restores the parent file name
+after the trailing @code{\\clearpage} of an @code{\\included} file; as
+a result, the macros may be usefully employed in the page header and footer of
+the last printed page of such a file.  The depth of inclusion is made
+available, together with the parent (including file) and parents (all
+including files to the root of the tree).  The package supersedes FiNK.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-calrsfs
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-calrsfs"
-      (list "doc/latex/calrsfs/" "tex/latex/calrsfs/")
-      (base32 "0aqa0k0zzzicx5nynd29i9pdb7a4j6fvf1xwrbm4qg64pl55i6xa")
-      #:trivial? #t))
-    (home-page "https://ctan.org/macros/latex/contrib/calrsfs")
+    (name "texlive-calrsfs")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/calrsfs/" "tex/latex/calrsfs/")
+             (base32
+              "0aqa0k0zzzicx5nynd29i9pdb7a4j6fvf1xwrbm4qg64pl55i6xa")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/calrsfs")
     (synopsis "Copperplate calligraphic letters in LaTeX")
-    (description "This package provides a math interface to the Rsfs fonts.")
+    (description "This package provides a maths interface to the @code{rsfs}
+fonts.")
     (license license:public-domain)))
 
 (define-public texlive-capt-of
-  (let ((template
-         (simple-texlive-package
-          "texlive-capt-of"
-          (list "doc/latex/capt-of/"
-                "source/latex/capt-of/"
-                "tex/latex/capt-of/")
-          (base32 "0bf0cdd9ca3kkqxqqkq6jalh5ybs60l80l5gfkl2whk2v4bnzfvz"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/capt-of")
-         ((#:build-targets _ '())
-          '(list "capt-of.ins"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _
-                 (chdir "source/latex/capt-of")))
-             (replace 'copy-files
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (let ((origin (assoc-ref inputs "source"))
-                       (source (string-append (assoc-ref outputs "out")
-                                              "/share/texmf-dist/source"))
-                       (doc (string-append (assoc-ref outputs "doc")
-                                           "/share/texmf-dist/doc")))
-                   (copy-recursively (string-append origin "/source") source)
-                   (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/capt-of")
-      (synopsis "Captions on more than floats")
-      (description
-       "This package defines a command @code{\\captionof} for putting a caption
+  (package
+    (name "texlive-capt-of")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/capt-of/" "source/latex/capt-of/"
+                   "tex/latex/capt-of/")
+             (base32
+              "0bf0cdd9ca3kkqxqqkq6jalh5ybs60l80l5gfkl2whk2v4bnzfvz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://www.ctan.org/pkg/capt-of")
+    (synopsis "Captions on more than floats")
+    (description
+     "This package defines a command @code{\\captionof} for putting a caption
 to something that's not a float.")
-      (license license:lppl))))
+    (license license:lppl)))
 
 (define-deprecated-package texlive-latex-capt-of texlive-capt-of)
 
 (define-public texlive-carlisle
   (package
-    (inherit (simple-texlive-package
-              "texlive-carlisle"
-              (list "doc/latex/carlisle/"
-                    "source/latex/carlisle/"
-                    "tex/latex/carlisle/")
-              (base32 "139k4n8dv6pbal1mx4m8b239x3i9cw61f6digk9mxscbxwvxfngb")
-              #:trivial? #t))
-    (home-page "https://ctan.org/macros/latex/contrib/carlisle")
+    (name "texlive-carlisle")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/carlisle/" "source/latex/carlisle/"
+                   "tex/latex/carlisle/")
+             (base32
+              "0kgbs8k6ma3kng2srwpzkla1c51ylzgb7yn8bib2zy46rmysrk86")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/carlisle")
     (synopsis "David Carlisle's small packages")
     (description
      "Many of David Carlisle's more substantial packages stand on their own,
 or as part of the LaTeX latex-tools set; this set contains: making dotless
 @emph{j} characters for fonts that don't have them; a method for combining the
-capabilities of longtable and tabularx; an environment for including plain TeX
-in LaTeX documents; a jiffy to create slashed characters for physicists.")
+capabilities of @code{longtable} and @code{tabularx}; an environment for
+including plain TeX in LaTeX documents; a jiffy to create slashed characters
+for physicists.")
     (license license:lppl)))
 
 (define-public texlive-catchfile
-  (let ((template (simple-texlive-package
-                   "texlive-catchfile"
-                   (list "/doc/latex/catchfile/"
-                         "/source/latex/catchfile/"
-                         "/tex/generic/catchfile/")
-                   (base32
-                    "1dpxy64hs0bjp8d2dmikflc995vazf7fi6z92w51fnj2fidgl8gx"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "latex/catchfile")))
-      (home-page "https://ctan.org/macros/latex/contrib/catchfile")
-      (synopsis "Catch an external file into a macro")
-      (description
-       "Catchfile catches the contents of a file and puts it in a macro.")
-      (license license:lppl1.3+))))
+  (package
+    (name "texlive-catchfile")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/catchfile/" "source/latex/catchfile/"
+                   "tex/generic/catchfile/")
+             (base32
+              "1dpxy64hs0bjp8d2dmikflc995vazf7fi6z92w51fnj2fidgl8gx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/macros/latex/contrib/catchfile")
+    (synopsis "Catch an external file into a macro")
+    (description
+     "Catchfile catches the contents of a file and puts it in a macro.")
+    (license license:lppl1.3+)))
 
 (define-public texlive-ddphonism
   (package
-    (inherit (simple-texlive-package
-              "texlive-ddphonism"
-              (list "doc/latex/ddphonism/"
-                    "tex/latex/ddphonism/")
-              (base32 "1p02ai76nnh6042pnmqv4n30z6yxsvyyk2nb9jk7xlyyc87zzbdd")
-              #:trivial? #t))
-    (propagated-inputs
-     (list texlive-etoolbox
-           texlive-hyperref
-           texlive-latex-l3packages
-           texlive-listings
-           texlive-pgf
-           texlive-tools
-           texlive-xstring))
-    (home-page "https://www.ctan.org/pkg/ddphonism")
+    (name "texlive-ddphonism")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ddphonism/" "tex/latex/ddphonism/")
+             (base32
+              "1p02ai76nnh6042pnmqv4n30z6yxsvyyk2nb9jk7xlyyc87zzbdd")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ddphonism")
     (synopsis "Dodecaphonic diagrams for LaTeX")
     (description
      "This is a music-related package which is focused on notation from the
@@ -5993,14 +16575,16 @@ sequence, of variable length.")
 
 (define-public texlive-doi
   (package
-    (inherit (simple-texlive-package
-              "texlive-doi"
-              (list "/doc/latex/doi/README.md"
-                    "/tex/latex/doi/")
-              (base32
-               "18z9922lqb3hliqn95h883fndqs4lgyi5yqbnq2932ya0imc3j7h")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/doi")
+    (name "texlive-doi")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/doi/" "tex/latex/doi/")
+             (base32
+              "18z9922lqb3hliqn95h883fndqs4lgyi5yqbnq2932ya0imc3j7h")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/doi")
     (synopsis "Create correct hyperlinks for DOI numbers")
     (description
      "You can hyperlink DOI numbers to doi.org.  However, some publishers have
@@ -6016,54 +16600,42 @@ hyperlink to the target of the DOI.")
 
 (define-public texlive-etoolbox
   (package
-    (inherit (simple-texlive-package
-              "texlive-etoolbox"
-              (list "/doc/latex/etoolbox/"
-                    "/tex/latex/etoolbox/")
-              (base32
-               "070iaj540rglf0c80l0hjkwg6aa7qyskhh4iwyhf7n8vrg5cjjab")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/etoolbox")
+    (name "texlive-etoolbox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/etoolbox/" "tex/latex/etoolbox/")
+             (base32
+              "070iaj540rglf0c80l0hjkwg6aa7qyskhh4iwyhf7n8vrg5cjjab")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/etoolbox")
     (synopsis "e-TeX tools for LaTeX")
     (description
-     "This package is a toolbox of programming facilities geared primarily
+     "The package is a toolbox of programming facilities geared primarily
 towards LaTeX class and package authors.  It provides LaTeX frontends to some
 of the new primitives provided by e-TeX as well as some generic tools which
 are not strictly related to e-TeX but match the profile of this package.  The
 package provides functions that seem to offer alternative ways of implementing
 some LaTeX kernel commands; nevertheless, the package will not modify any part
 of the LaTeX kernel.")
-    (license license:lppl1.3+)))
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-latex-etoolbox texlive-etoolbox)
 
-(define-public texlive-latex-fncychap
+(define-public texlive-fncychap
   (package
-    (name "texlive-latex-fncychap")
+    (name "texlive-fncychap")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/fncychap"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0fdk84dbicfjfprkz6vk15x36mvlhaw9isjmgkc56jp2khwjswwq"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/fncychap")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/fncychap")
+    (source (texlive-origin
+             name version
+             (list "doc/latex/fncychap/"
+                   "tex/latex/fncychap/")
+             (base32
+              "1javlws18ncrf7rz7qfbx1db9jwk45lm6sa0s67hlr6hqnyjxf94")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fncychap")
     (synopsis "Seven predefined chapter heading styles")
     (description
      "This package provides seven predefined chapter heading styles.  Each
@@ -6072,88 +16644,73 @@ modify the formatting routines in order to create additional chapter
 headings.")
     (license license:lppl1.3+)))
 
-(define-public texlive-latex-framed
+(define-deprecated-package texlive-latex-fncychap texlive-fncychap)
+
+(define-public texlive-framed
   (package
-    (name "texlive-latex-framed")
+    (name "texlive-framed")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/framed"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "14a4ydqsvp3vcfavl21jrv0ybiqypaaqzg2q2cs3rzkandg7w98x"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/framed")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/framed")
+    (source (texlive-origin
+             name version
+             (list "doc/latex/framed/"
+                   "tex/latex/framed/")
+             (base32
+              "09hlzjlhz3q3l62h6gj997pfx1hc4726frhcdc6y5g66c3gh621g")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/framed")
     (synopsis "Framed or shaded regions that can break across pages")
     (description
      "The package creates three environments: @code{framed}, which puts an
 ordinary frame box around the region, @code{shaded}, which shades the region,
 and @code{leftbar}, which places a line at the left side.  The environments
-allow a break at their start (the @code{\\FrameCommand} enables creation of a
-title that is “attached” to the environment); breaks are also allowed in the
+allow a break at their start (the @code{\\FrameCommand} enables creation of
+a title that is “attached” to the environment); breaks are also allowed in the
 course of the framed/shaded matter.  There is also a command
 @code{\\MakeFramed} to make your own framed-style environments.")
     ;; The header states: "These macros may be freely transmitted, reproduced,
     ;; or modified for any purpose provided that this notice is left intact."
     (license (license:fsf-free "file://framed.sty"))))
 
-(define-public texlive-latex-g-brief
+(define-deprecated-package texlive-latex-framed texlive-framed)
+
+(define-public texlive-g-brief
   (package
-    (name "texlive-latex-g-brief")
+    (name "texlive-g-brief")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "g-brief"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1br4kv9y17cvngp83ykpvy7gy3jqfan5plk7sggcgbdfhndi5dsr"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/g-brief/"
+                   "source/latex/g-brief/"
+                   "tex/latex/g-brief/")
+             (base32
+              "0sicgf3wjw5jymh5xjxby2hsilakhw2lqgywx0f2zax1z854xc2m")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments
-     '(#:tex-directory "latex/g-brief"
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'remove-generated-file
-           (lambda _
-             (delete-file "g-brief.drv")
-             #t)))))
     (home-page "https://www.ctan.org/pkg/g-brief")
     (synopsis "Letter document class")
     (description
      "This package is designed for formatting formless letters in German; it
 can also be used for English (by those who can read the documentation).  There
-are LaTeX 2.09 @code{documentstyle} and LaTeX 2e class files for both an
-\"old\" and a \"new\" version of g-brief.")
+are LaTeX 2.09 @code{documentstyle} and LaTeX 2e class files for both an old
+and a new version of @code{g-brief}.")
     (license license:lppl)))
 
-(define-public texlive-latex-galois
+(define-deprecated-package texlive-latex-g-brief texlive-g-brief)
+
+(define-public texlive-galois
   (package
-    (name "texlive-latex-galois")
+    (name "texlive-galois")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "galois"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0d4l0msk8j5pi95xnmm9wygv1vbpkwkv5amx9l0km86cs79jpp1h"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/galois/"
+                   "source/latex/galois/"
+                   "tex/latex/galois/")
+             (base32
+              "1324nw1r1aj6khz6fvrhd1p1sinadrd83j0s2q2fhnsgwp6sw94f")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/galois"))
     (home-page "https://www.ctan.org/pkg/galois")
     (synopsis "Typeset Galois connections")
     (description
@@ -6161,19 +16718,21 @@ are LaTeX 2.09 @code{documentstyle} and LaTeX 2e class files for both an
 in colour.")
     (license license:lppl)))
 
-(define-public texlive-latex-gcite
+(define-deprecated-package texlive-latex-galois texlive-galois)
+
+(define-public texlive-gcite
   (package
-    (name "texlive-latex-gcite")
+    (name "texlive-gcite")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "gcite"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "03g9by54yrypn599y98r1xh7qw0bbbmpzq0bfwpj6j5q5rkl1mfa"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/gcite/"
+                   "source/latex/gcite/"
+                   "tex/latex/gcite/")
+             (base32
+              "0yb7sid13bx25yar3aw6pbf4jmmfi0gdmcd7ynf5hjh9qdfb3zyh")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/gcite"))
     (home-page "https://www.ctan.org/pkg/gcite")
     (synopsis "Citations in a reader-friendly style")
     (description
@@ -6185,22 +16744,22 @@ look-up efficiency afforded by numeric citations.  The package makes use of
 BibLaTeX, and is considered experimental.")
     (license license:lppl1.3+)))
 
-(define-public texlive-latex-geometry
+(define-deprecated-package texlive-latex-gcite texlive-gcite)
+
+(define-public texlive-geometry
   (package
-    (name "texlive-latex-geometry")
+    (name "texlive-geometry")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "geometry"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0a9nrmiwksnpa6iaapirqid974ai56qgin2n4h9mggy9v8gp7r71"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/geometry/"
+                   "source/latex/geometry/"
+                   "tex/latex/geometry/")
+             (base32
+              "09jwdrg4s1c0gqmx7s57byw5kc09cna3li85y9ix0vxa6f6iqzi1")))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/geometry"))
-    (propagated-inputs
-     (list texlive-oberdiek             ;for ifpdf
-           texlive-graphics))           ;for keyval
+    (outputs '("out" "doc"))
+    (propagated-inputs (list texlive-graphics texlive-iftex))
     (home-page "https://www.ctan.org/pkg/geometry")
     (synopsis "Flexible and complete interface to document dimensions")
     (description
@@ -6208,24 +16767,26 @@ BibLaTeX, and is considered experimental.")
 page layout, implementing auto-centering and auto-balancing mechanisms so that
 the users have only to give the least description for the page layout.  The
 package knows about all the standard paper sizes, so that the user need not
-know what the nominal \"real\" dimensions of the paper are, just its standard
+know what the nominal real dimensions of the paper are, just its standard
 name (such as a4, letter, etc.).  An important feature is the package's
 ability to communicate the paper size it's set up to the output.")
     (license license:lppl)))
 
-(define-public texlive-latex-mdwtools
+(define-deprecated-package texlive-latex-geometry texlive-geometry)
+
+(define-public texlive-mdwtools
   (package
-    (name "texlive-latex-mdwtools")
+    (name "texlive-mdwtools")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "mdwtools"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0caxs74hla28hc67csf5i5ahadx97w8vxh3mdmsprxbpd1mr7ssg"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/mdwtools/"
+                   "source/latex/mdwtools/"
+                   "tex/latex/mdwtools/")
+             (base32
+              "08wyw0k6r3fv7vdgwbcpq9ckifldy17fzhpar51s1qn0yib93zdg")))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/mdwtools"))
+    (outputs '("out" "doc"))
     (home-page "https://www.ctan.org/pkg/mdwtools")
     (synopsis "Miscellaneous tools by Mark Wooding")
     (description
@@ -6233,46 +16794,26 @@ ability to communicate the paper size it's set up to the output.")
 starting with @code{@@}, macros to sanitize the OT1 encoding of the
 @code{cmtt} fonts; a @code{doafter} command; improved @code{footnote} support;
 @code{mathenv} for various alignment in maths; list handling; @code{mdwmath}
-which adds some minor changes to LaTeX maths; a rewrite of LaTeX's tabular and
-array environments; verbatim handling; and syntax diagrams.")
+which adds some minor changes to LaTeX maths; a rewrite of LaTeX's
+@code{tabular} and @code{array} environments; verbatim handling; and syntax
+diagrams.")
     (license license:gpl3+)))
 
+(define-deprecated-package texlive-latex-mdwtools texlive-mdwtools)
+
 (define-public texlive-makecmds
   (package
-    (inherit (simple-texlive-package
-              "texlive-makecmds"
-              (list "doc/latex/makecmds/README"
-                    "source/latex/makecmds/makecmds.dtx"
-                    "source/latex/makecmds/makecmds.ins")
-              (base32 "0znx80x6ic7a25v9dw8yjibq7lx65wangcyii18kk5x5z4jljba9")))
+    (name "texlive-makecmds")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/makecmds/" "source/latex/makecmds/"
+                   "tex/latex/makecmds/")
+             (base32
+              "05y5n265in7mrbpgjxqg339l8r8dmp6lvl4k528pr3rkb8z94qaf")))
     (outputs '("out" "doc"))
-    (arguments
-     (list
-      #:tex-directory "latex/makecmds"
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-before 'build 'chdir
-            (lambda _
-              (setenv "ROOT_DIR" (getcwd))
-              (chdir "source/latex/makecmds")))
-          (add-after 'build 'build-doc
-            (lambda _
-              (copy-file "makecmds.dtx" "build/makecmds.dtx")
-              (chdir "build")
-              (invoke "pdflatex" "makecmds.dtx"))) ;generate makecmds.pdf
-          (replace 'install
-            (lambda* (#:key outputs tex-directory #:allow-other-keys)
-              (let ((doc (string-append (assoc-ref outputs "doc")
-                                        "/share/doc/" tex-directory))
-                    (out (string-append #$output "/share/texmf-dist/tex/"
-                                        tex-directory)))
-                (install-file "makecmds.pdf" doc)
-                (install-file (car (find-files (getenv "ROOT_DIR") "README"))
-                              doc)
-                (install-file "makecmds.sty" out)))))))
-    (native-inputs (list (texlive-updmap.cfg
-                          (list texlive-amsfonts
-                                texlive-cm))))
+    (build-system texlive-build-system)
+    (native-inputs (list (texlive-updmap.cfg)))
     (home-page "https://www.ctan.org/pkg/makecmds")
     (synopsis "TeX macro to define or redefine a command")
     (description "The package provides a @code{\\makecommand} command, which
@@ -6281,247 +16822,169 @@ always (re)defines a command.  There is also @code{\\makeenvironment} and
 @code{\\provideenvironment} for environments.")
     (license license:lppl1.3c+)))
 
-(define-public texlive-latex-marginfix
+(define-public texlive-makeindex
+  (package
+    (name "texlive-makeindex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/makeindex.1"
+                   "doc/man/man1/makeindex.man1.pdf"
+                   "doc/man/man1/mkindex.1"
+                   "doc/man/man1/mkindex.man1.pdf"
+                   "doc/support/makeindex/"
+                   "makeindex/base/"
+                   "tex/plain/makeindex/")
+             (base32
+              "0m01m0x1kf10yvzxgrkvpic0amsr0g6q2r2wsg5f4ngybq4y9gyi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/makeindexk")
+    (synopsis "Makeindex development sources")
+    (description
+     "The package contains the development sources of MakeIndex.")
+    (license
+     (license:fsf-free "https://mirrors.ctan.org/indexing/makeindex/COPYING"))))
+
+(define-public texlive-marginfix
   (package
-    (inherit (simple-texlive-package
-              "texlive-latex-marginfix"
-              (list "doc/latex/marginfix/"
-                    "tex/latex/marginfix/")
-              (base32 "1qinf42mjry8bi5h3kgbi6hcymnk8fw0w43527wm95nc365dq0mf")
-              #:trivial? #t))
+    (name "texlive-marginfix")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/marginfix/"
+                   "source/latex/marginfix/"
+                   "tex/latex/marginfix/")
+             (base32
+              "0y6lmxm5ws2g0rqisvgdc8kg3whnvabrkl662sb4jvvaz02y3qdi")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/marginfix")
-    (synopsis "Patch \\marginpar to avoid overfull margins")
+    (synopsis "Patch @code{\\marginpar} to avoid overfull margins")
     (description
      "Authors using LaTeX to typeset books with significant margin material
 often run into the problem of long notes running off the bottom of the page.
-This package implements a solution to make marginpars ``just work'' by keeping
-a list of floating inserts and arranging them intelligently in the output
-routine.")
+This package implements a solution to make @code{marginpars} just work by
+keeping a list of floating inserts and arranging them intelligently in the
+output routine.")
     (license license:lppl)))
 
+(define-deprecated-package texlive-latex-marginfix texlive-marginfix)
+
 (define-public texlive-metalogo
   (package
-    (inherit (simple-texlive-package
-              "texlive-metalogo"
-              (list "doc/latex/metalogo/README"
-                    ;; These PDFs are apparently used as graphic files, not
-                    ;; built.
-                    "doc/latex/metalogo/TeXoutline.pdf"
-                    "doc/latex/metalogo/eLaToutline.pdf"
-                    "source/latex/metalogo/metalogo.dtx"
-                    "source/latex/metalogo/metalogo.ins")
-              (base32 "0v1jwp8xhzwn0a4apiyya17s4r1kpn6q9nmv38jj1wwdvgia0jpi")))
+    (name "texlive-metalogo")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/metalogo/" "source/latex/metalogo/"
+                   "tex/latex/metalogo/")
+             (base32
+              "1xzy982kc7k5n7gy019rk4hbvxli2mlf4s7h7s11diasmh5fa2gf")))
     (outputs '("out" "doc"))
-    (arguments
-     (list
-      #:tex-directory "latex/metalogo"
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-before 'build 'chdir
-            (lambda _
-              (setenv "ROOT_DIR" (getcwd))
-              (chdir "source/latex/metalogo")))
-          (add-after 'chdir 'patch-metalogo.dtx
-            (lambda _
-              (substitute* "metalogo.dtx"
-                ;; Prevent embedding a build time date, for reproducibility.
-                (("^% \\\\date.*") "")
-                ;; These fonts are not free.
-                (("^\\\\setmainfont.*") "")
-                (("^\\\\DeclareSymbolFont\\{SabonMaths}.*") "")
-                (("^\\\\AtBeginDocument\\{.*") "")
-                ((".*\\\\expandafter.*\\\\symSabonMaths.*") "")
-                (("^\\\\setsansfont.*MgOpen Cosmetica.*") "")
-                (("^\\\\setmonofont.*Consolas.*") "")
-                ;; The 'stix' texlive font package has been obsoleted by
-                ;; stix2.
-                (("^\\\\newfontfamily\\\\stixgeneral\\{STIXGeneral}")
-                 "\\newfontfamily\\stixgeneral{STIX Two Text}"))))
-          (add-after 'build 'build-doc
-            (lambda* (#:key outputs tex-directory #:allow-other-keys)
-              (define doc-sources (string-append (getenv "ROOT_DIR")
-                                                 "/doc/latex/metalogo"))
-              (copy-file "metalogo.dtx" "build/metalogo.dtx")
-              (mkdir "build/graphics")
-              (copy-file (string-append doc-sources "/TeXoutline.pdf")
-                         "build/graphics/TeXoutline.pdf")
-              (copy-file (string-append doc-sources "/eLaToutline.pdf")
-                         "build/graphics/eLaToutline.pdf")
-              (chdir "build")
-              (invoke "xelatex" "metalogo.dtx"))) ;generate metalogo.pdf
-          (replace 'install
-            (lambda* (#:key outputs tex-directory #:allow-other-keys)
-              (let ((doc (string-append (assoc-ref outputs "doc")
-                                        "/share/doc/" tex-directory))
-                    (out (string-append #$output "/share/texmf-dist/tex/"
-                                        tex-directory)))
-                (install-file "metalogo.pdf" doc)
-                (install-file (car (find-files (getenv "ROOT_DIR") "README"))
-                              doc)
-                (install-file "metalogo.sty" out)))))))
-    (native-inputs (list fontconfig     ;for XDG_DATA_DIRS, to locate OTF fonts
-                         texlive-booktabs
-                         texlive-cm
-                         texlive-fontspec
-                         texlive-iftex
-                         texlive-latex-base
-                         texlive-latex-eukdate
-                         texlive-graphics
-                         texlive-latex-multirow
-                         texlive-lm     ;for lmroman10-regular
-                         texlive-stix2-otf))
-    (propagated-inputs (list texlive-fontspec texlive-iftex
-                             texlive-graphics))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/metalogo")
     (synopsis "Extended TeX logo macros")
-    (description "This package exposes spacing parameters for various TeX
-logos to the end user, to optimise the logos for different fonts.  It is
-written especially for XeLaTeX users.")
+    (description
+     "This package exposes spacing parameters for various TeX logos to the end
+user, to optimise the logos for different fonts.  It is written especially for
+XeLaTeX users.")
     (license license:lppl1.3c+)))
 
 (define-public texlive-paralist
   (package
-    (inherit (simple-texlive-package
-              "texlive-paralist"
-              (list "doc/latex/paralist/README"
-                    "source/latex/paralist/paralist.dtx"
-                    "source/latex/paralist/paralist.ins")
-              (base32 "1lz8yds2i64wkb89a9amydwkzsdbc09s1kbgn7vgh2qsxqrrgwam")))
+    (name "texlive-paralist")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/paralist/" "source/latex/paralist/"
+                   "tex/latex/paralist/")
+             (base32
+              "003gs7rjm97vqh903wdjys3ls96kx45w3s4qghjk1fdjx6qxd32l")))
     (outputs '("out" "doc"))
-    (arguments
-     (list
-      #:tex-directory "latex/paralist"
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-before 'build 'chdir
-            (lambda _
-              (setenv "ROOT_DIR" (getcwd))
-              (chdir "source/latex/paralist")))
-          (add-after 'build 'build-doc
-            (lambda* (#:key outputs tex-directory #:allow-other-keys)
-              (copy-file "paralist.dtx" "build/paralist.dtx")
-              (chdir "build")
-              (invoke "pdflatex" "paralist.dtx")))
-          (replace 'install
-            (lambda* (#:key outputs tex-directory #:allow-other-keys)
-              (let ((doc (string-append (assoc-ref outputs "doc")
-                                        "/share/doc/" tex-directory))
-                    (out (string-append #$output "/share/texmf-dist/tex/"
-                                        tex-directory)))
-                (install-file "paralist.pdf" doc)
-                (install-file (car (find-files (getenv "ROOT_DIR") "README"))
-                              doc)
-                (install-file "paralist.sty" out)))))))
-    (native-inputs (list texlive-latex-base
-                         (texlive-updmap.cfg
-                          (list texlive-cm
-                                texlive-jknappen))))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/paralist")
-    (synopsis "Enumerate and itemize within paragraphs")
-    (description "The @code{paralist} package provides enumerate and itemize
+    (synopsis "@code{enumerate} and @code{itemize} within paragraphs")
+    (description
+     "The @code{paralist} package provides @code{enumerate} and @code{itemize}
 environments that can be used within paragraphs to format the items either as
 running text or as separate paragraphs with a preceding number or symbol.  It
-also provides compacted versions of enumerate and itemize.")
+also provides compacted versions of @code{enumerate} and @code{itemize}.")
     (license license:lppl1.0+)))
 
 (define-public texlive-polyglossia
   (package
-    (inherit (simple-texlive-package
-              "texlive-polyglossia"
-              (list "source/latex/polyglossia/"
-                    ;; These files are not part of polyglossia.dtx
-                    "tex/latex/polyglossia/arabicnumbers.sty"
-                    "tex/latex/polyglossia/xpg-cyrillicnumbers.sty")
-              (base32 "1p0hhclypv2zbs8h64c6sd689m9ym3vvpn966qpwpjxbymsrc49g")))
+    (name "texlive-polyglossia")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/polyglossia/"
+                   "fonts/misc/xetex/fontmapping/polyglossia/"
+                   "source/latex/polyglossia/"
+                   "tex/latex/polyglossia/")
+             (base32
+              "15rqqf0yb09qcs6ibsrkg5jbpzicxkpbj211p6qkfl2fcrc1gndv")))
     (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (arguments
      (list
-      #:tex-directory "latex/polyglossia"
       #:tex-format "xelatex"
       #:phases
       #~(modify-phases %standard-phases
-          (add-after 'unpack 'build-and-install-xelatex.fmt
-            (lambda* (#:key tex-format #:allow-other-keys)
-              (invoke "fmtutil-sys" "--byfmt" tex-format "--fmtdir=web2c")
-              ;; Extend the current TEXMF environment variable to make
-              ;; available the newly built formats.
-              (setenv "GUIX_TEXMF" (string-append (getcwd) ":"
-                                                  (getenv "GUIX_TEXMF")))
-              ;; XXX: Extend the base (more limited) xelatex.fmt provided by
-              ;; texlive-latex-base, otherwise packages using Polyglossia
-              ;; would encounter the same lack of hyphenation support problem.
-              (install-file "web2c/xetex/xelatex.fmt"
-                            (string-append #$output
-                                           "/share/texmf-dist/web2c/xetex"))))
-          (add-before 'build 'chdir
+          (add-after 'unpack 'substitute-fonts
             (lambda _
-              ;; This is so the build can find the files not part of the .dtx.
-              (setenv "TEXINPUTS" (string-append (getcwd)
-                                                 "/tex/latex/polyglossia:"))
-              (chdir "source/latex/polyglossia")))
-          (add-after 'chdir 'substitute-nonfree-fonts
+              ;; Use dummy fonts for documentation.  We will install
+              ;; pre-generated one anyway. Moreover, adding appropriate fonts
+              ;; would bring in some large dependencies, such as webkitgtk for
+              ;; Amiri.
+              (substitute* "source/latex/polyglossia/polyglossia.dtx"
+                (("\\{Serto Jerusalem}") "{FreeSans}")
+                (("\\{Amiri-Regular}") "{FreeSans}")
+                (("\\{Noto Serif CJK SC}") "{FreeSans}")
+                (("\\{GFSPolyglot.otf}") "{FreeSans}"))))
+          (add-after 'unpack 'extend-texmf
             (lambda _
-              (substitute* "polyglossia.dtx"
-                (("\\{Serto Jerusalem}")
-                 "{FreeSans}"))))
-          (add-after 'substitute-nonfree-fonts 'extract-dtx
-            (lambda* (#:key tex-format #:allow-other-keys)
-              (invoke tex-format "polyglossia.dtx")))
-          (add-after 'install 'install-doc
-            (lambda* (#:key outputs tex-directory #:allow-other-keys)
-              (let ((doc (string-append (assoc-ref outputs "doc")
-                                        "/share/texmf-dist/doc" tex-directory)))
-                (install-file "README.md" doc)
-                (install-file "polyglossia.pdf" doc)))))))
-    (native-inputs (list fontconfig     ;for XDG_DATA_DIRS (to locate fonts)
-                         font-amiri
-                         font-dejavu
-                         font-gfs-ambrosia
-                         font-gnu-freefont
-                         font-linuxlibertine
-                         font-sil-ezra
-                         texlive-latex-base
-                         texlive-babel
-                         texlive-bin    ;for fmtutil.cnf
-                         texlive-bidi
-                         texlive-booktabs
-                         texlive-caption
-                         texlive-context
-                         texlive-fancyvrb
-                         texlive-etoolbox
-                         texlive-fonts-latex
-                         texlive-fontspec
-                         texlive-hyperref
-                         ;; TODO: Remove texlive-stringenc and
-                         ;; texlive-zapfding after texlive-hyperref propagates
-                         ;; them.
-                         texlive-stringenc
-                         texlive-zapfding
-                         texlive-graphics
-                         texlive-kpathsea ;for cp227.tcx & friends
-                         texlive-makecmds
-                         texlive-metalogo
-                         texlive-microtype
-                         texlive-paralist
-                         texlive-tools
-                         texlive-tex-ini-files)) ;for pdftexconfig
-    ;; polyglossia.sty \RequirePackage or \\usepackage these other TexLive
-    ;; packages.
+              ;; Extend the current TEXMF environment variable to make
+              ;; Polyglossia own libraries visible.
+              (setenv "GUIX_TEXMF"
+                      (string-append (getcwd) ":"
+                                     (getenv "GUIX_TEXMF"))))))))
+    (native-inputs
+     (list font-dejavu
+           font-gnu-freefont
+           font-linuxlibertine
+           font-sil-ezra
+           fontconfig                   ;for XDG_DATA_DIRS (to locate fonts)
+           texlive-amiri
+           texlive-babel
+           texlive-bidi
+           texlive-booktabs
+           texlive-caption
+           texlive-context
+           texlive-fancyvrb
+           texlive-graphics
+           texlive-hyperref
+           texlive-infwarerr
+           texlive-kvoptions
+           texlive-latex-fonts
+           texlive-libertine
+           texlive-metalogo
+           texlive-microtype
+           texlive-noto
+           texlive-paralist
+           texlive-pdftexcmds
+           texlive-tex
+           texlive-tools
+           texlive-xcolor
+           texlive-xetex
+           texlive-zref))
     (propagated-inputs
-     (list texlive-bidi
-           texlive-etoolbox
+     (list texlive-etoolbox
+           texlive-filehook
            texlive-fontspec
-           texlive-hyperref
-           ;; TODO: Remove texlive-stringenc and
-           ;; texlive-zapfding after texlive-hyperref propagates
-           ;; them.
-           texlive-stringenc
-           texlive-zapfding
+           texlive-iftex
            texlive-makecmds
-           texlive-latex-l3packages     ;expl3, l3keys2e, xparse
-           texlive-tools
-           texlive-latex-xkeyval))
+           texlive-xkeyval))
     (home-page "https://www.ctan.org/pkg/polyglossia")
     (synopsis "Alternative to Babel for XeLaTeX and LuaLaTeX")
     (description "This package provides a complete Babel replacement for users
@@ -6533,80 +16996,65 @@ different writing system.  It enables:
 Loading the appropriate hyphenation patterns.
 @item
 Setting the script and language tags of the current font (if possible and
-available), using the package fontspec.
+available), using the package @code{fontspec}.
 @item
 Switching to a font assigned by the user to a particular script or language.
 @item
 Adjusting some typographical conventions in function of the current language
-(such as afterindent, frenchindent, spaces before or after punctuation marks,
-etc.)
+(such as @code{afterindent}, @code{frenchindent}, spaces before or after
+punctuation marks, etc.)
 @item
 Redefining the document strings (like @samp{chapter}, @samp{figure},
 @samp{bibliography}).  Adapting the formatting of dates (for non-gregorian
-calendars via external packages bundled with polyglossia: currently the
+calendars via external packages bundled with @code{polyglossia}: currently the
 Hebrew, Islamic and Farsi calendars are supported).
 @item
 For languages that have their own numeration system, modifying the formatting
 of numbers appropriately.
 @item
 Ensuring the proper directionality if the document contains languages
-written from right to left (via the packages bidi and luabidi, available
-separately).
+written from right to left.
 @end itemize")
     (license license:expat)))
 
 (define-deprecated-package texlive-latex-polyglossia texlive-polyglossia)
 
-(define-public texlive-latex-supertabular
+(define-public texlive-supertabular
   (package
-    (name "texlive-latex-supertabular")
+    (name "texlive-supertabular")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "supertabular"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "19fd0bqxjkzc16bza3w20pnsc90gbhbllm244b3h6sink4dlnn54"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/supertabular/"
+                   "source/latex/supertabular/"
+                   "tex/latex/supertabular/")
+             (base32
+              "1z4kyx20w2zvn6c5a7p702pxj254f2pwlk7x815gzlcc6563js6a")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/supertabular"))
     (home-page "https://www.ctan.org/pkg/supertabular")
     (synopsis "Multi-page tables package")
     (description
      "This package was a predecessor of @code{longtable}; the newer
 package (designed on quite different principles) is easier to use and more
-flexible, in many cases, but supertabular retains its usefulness in a few
-situations where longtable has problems.")
+flexible, in many cases, but @code{supertabular} retains its usefulness in
+a few situations where longtable has problems.")
     (license license:lppl1.3+)))
 
-(define-public texlive-tex-texinfo
+(define-deprecated-package texlive-latex-supertabular texlive-supertabular)
+
+(define-public texlive-texinfo
   (package
-    (name "texlive-tex-texinfo")
+    (name "texlive-texinfo")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/texinfo"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1qcmcsxdsibca0mad559vhz36xaxsbkivgv1hc98vdyd90fg4y31"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/texinfo")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/texinfo")
-    (synopsis "TeX macros to handle Texinfo files")
+    (source (texlive-origin
+             name version
+             (list "tex/texinfo/")
+             (base32
+              "1wdrqwksbhxxx275mzhcr3mc67f76nbflplqs4y1xx67iw724dmx")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/texinfo")
+    (synopsis "Texinfo documentation system")
     (description
      "Texinfo is the preferred format for documentation in the GNU project;
 the format may be used to produce online or printed output from a single
@@ -6615,53 +17063,57 @@ other programs in the distribution offer online interactive use (with
 hypertext linkages in some cases).")
     (license license:gpl3+)))
 
+(define-deprecated-package texlive-tex-texinfo texlive-texinfo)
+
 (define-public texlive-textcase
   (package
-    (inherit (simple-texlive-package
-              "texlive-textcase"
-              (list "doc/latex/textcase/"
-                    "tex/latex/textcase/"
-                    "source/latex/textcase/")
-              (base32
-               "185fibd41wd0v51gnai29ygi32snkk00p00110kcnk1bcnmpiw82")
-              #:trivial? #t))
-    (home-page "https://ctan.org/macros/latex/contrib/textcase")
+    (name "texlive-textcase")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/textcase/" "source/latex/textcase/"
+                   "tex/latex/textcase/")
+             (base32
+              "15jb7r1p7vjm1i02lf5c9g5i7fcgkc7a6b59jhyzzk2l7ch41d7f")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/textcase")
     (synopsis "Case conversion ignoring mathematics, etc")
     (description
-     "The textcase package offers commands @code{\\MakeTextUppercase} and
-@code{\\MakeTextLowercase} are similar to the standard @code{\\MakeUppercase}
-and @code{\\MakeLowercase}, but they do not change the case of any sections of
-mathematics, or the arguments of @code{\\cite}, @code{\\label} and
-@code{\\ref} commands within the argument.  A further command
-@code{\\NoCaseChange} does nothing but suppress case change within its
+     "The @code{textcase} package offers commands @code{\\MakeTextUppercase}
+and @code{\\MakeTextLowercase} are similar to the standard
+@code{\\MakeUppercase} and @code{\\MakeLowercase}, but they do not change the
+case of any sections of mathematics, or the arguments of @code{\\cite},
+@code{\\label} and @code{\\ref} commands within the argument.  A further
+command @code{\\NoCaseChange} does nothing but suppress case change within its
 argument, so to force uppercase of a section including an environment, one
 might say:
 
 @example
 \\MakeTextUppercase{...\\NoCaseChange{\\begin{foo}} ...\\NoCaseChange{\\end{foo}}...}
-@end example\n")
+@end example")
     (license license:lppl)))
 
-(define-public texlive-latex-upquote
+(define-public texlive-upquote
   (package
-    (name "texlive-latex-upquote")
+    (name "texlive-upquote")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "upquote"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0d1050i973wnxigy0xpky5l7vn4ff7ldhkjpdqsw5s653gagwixp"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/upquote/"
+                   "source/latex/upquote/"
+                   "tex/latex/upquote/")
+             (base32
+              "1manbljqx2859wq9by6bpcx4rnxvc596a05d21cw464484f8a8z2")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/upquote"))
     (home-page "https://www.ctan.org/pkg/upquote")
-    (synopsis "Show \"realistic\" quotes in verbatim")
+    (synopsis "Show realistic quotes in verbatim")
     (description
      "Typewriter-style fonts are best for program listings, but Computer
-Modern Typewriter prints @code{`} and @code{'} as bent opening and closing
-single quotes.  Other fonts, and most programming languages, print @code{`} as
-a grave accent and @code{'} upright; @code{'} is used both to open and to
+Modern Typewriter prints @samp{`} and @samp{'} as bent opening and closing
+single quotes.  Other fonts, and most programming languages, print @samp{`} as
+a grave accent and @samp{'} upright; @samp{'} is used both to open and to
 close quoted strings.  The package switches the typewriter font to Computer
 Modern Typewriter in OT1 encoding, and modifies the behaviour of
 @code{verbatim}, @code{verbatim*}, @code{\\verb}, and @code{\\verb*} to print
@@ -6670,33 +17122,21 @@ use, so long as the package is loaded after the other fonts were.  The package
 does not affect @code{\\tt}, @code{\\texttt}, etc.")
     (license license:lppl1.2+)))
 
-(define-public texlive-latex-anysize
+(define-deprecated-package texlive-latex-upquote texlive-upquote)
+
+(define-public texlive-anysize
   (package
-    (name "texlive-latex-anysize")
+    (name "texlive-anysize")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/anysize"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "19khwqjlvznc955sijhww3c4zbb0053rvzwv9nz738qknq7y18vb"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/anysize")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/anysize")
+    (source (texlive-origin
+             name version
+             (list "doc/latex/anysize/"
+                   "tex/latex/anysize/")
+             (base32
+              "155s0v82zpkmv97kwqhhfw52230hka9zl3wzjw1d5ayxd4n11bxq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/anysize")
     (synopsis "Simple package to set up document margins")
     (description
      "This is a simple package to set up document margins.  This package is
@@ -6704,151 +17144,306 @@ considered obsolete; alternatives are the @code{typearea} package from the
 @code{koma-script} bundle, or the @code{geometry} package.")
     (license license:public-domain)))
 
-(define-public texlive-latex-appendix
+(define-deprecated-package texlive-latex-anysize texlive-anysize)
+
+(define-public texlive-appendix
   (package
-    (name "texlive-latex-appendix")
+    (name "texlive-appendix")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "appendix"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1gc2brr2rs495w7qi6spdva1xrza94x7a36dncjdkghnsq8r92h4"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/appendix/"
+                   "source/latex/appendix/"
+                   "tex/latex/appendix/")
+             (base32
+              "1vqkqpzs7bc6pbjnafakrwayjyfx9mvadrqxccdf549m8172qvzk")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/appendix"))
-    (home-page "https://www.ctan.org/pkg/appendix")
+    (home-page "https://ctan.org/pkg/appendix")
     (synopsis "Extra control of appendices")
     (description
-     "The appendix package provides various ways of formatting the titles of
-appendices.  Also (sub)appendices environments are provided that can be used,
-for example, for per chapter/section appendices.  An @code{appendices}
-environment is provided which can be used instead of the @code{\\appendix}
-command.")
-    (license license:lppl)))
+     "The @code{appendix} package provides various ways of formatting the
+titles of appendices.  Also (sub)appendices environments are provided that can
+be used, for example, for per chapter/section appendices.  An
+@code{appendices} environment is provided which can be used instead of the
+@code{\\appendix} command.")
+    (license license:lppl1.3c)))
+
+(define-deprecated-package texlive-latex-appendix texlive-appendix)
 
-(define-public texlive-latex-bookmark
+(define-public texlive-bookman
   (package
-    (inherit (simple-texlive-package
-              "texlive-latex-bookmark"
-              (list "/doc/latex/bookmark/"
-                    "/tex/latex/bookmark/")
-              (base32
-               "0xwjdah0p4an0fknvgj9y5phl62sf522z6570pvy6c09hkz0j4h1")
-              #:trivial? #t))
+    (name "texlive-bookman")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "dvips/bookman/"
+                   "fonts/afm/adobe/bookman/"
+                   "fonts/afm/urw/bookman/"
+                   "fonts/map/dvips/bookman/"
+                   "fonts/tfm/adobe/bookman/"
+                   "fonts/tfm/urw35vf/bookman/"
+                   "fonts/type1/urw/bookman/"
+                   "fonts/vf/adobe/bookman/"
+                   "fonts/vf/urw35vf/bookman/"
+                   "tex/latex/bookman/")
+             (base32
+              "12wkjwpzxn1a1k3bb41gpnky1jjsh7gzj4xahsjd087fpmrsj9p9")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/urw-base35")
+    (synopsis "Replacement for Adobe's Bookman font")
+    (description
+     "This package provides a drop-in replacement for the Bookman font from
+Adobe's basic set")
+    (license license:gpl3+)))
+
+(define-public texlive-bookmark
+  (package
+    (name "texlive-bookmark")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/bookmark/"
+                   "source/latex/bookmark/"
+                   "tex/latex/bookmark/")
+             (base32
+              "111sjwabcbr8ry8fh94ywpzska032y8r4iz4waxa4kf5l3k0p4bs")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:build-targets #~(list "bookmark.dtx")))
     (home-page "https://www.ctan.org/pkg/bookmark")
-    (synopsis "Bookmark (outline) organization for hyperref")
+    (synopsis "Bookmark (outline) organization for @code{hyperref}")
     (description
      "This package implements a new bookmark (outline) organization for the
 @code{hyperref} package.  Bookmark properties such as style and color.  Other
 action types are available (URI, GoToR, Named).")
     (license license:lppl1.3c+)))
 
-(define-public texlive-latex-changebar
+(define-deprecated-package texlive-latex-bookmark texlive-bookmark)
+
+(define-public texlive-changebar
   (package
-    (name "texlive-latex-changebar")
+    (name "texlive-changebar")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "changebar"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "05x15ilynqrl448h8l6qiraygamdldlngz89a2bw7kg74fym14ch"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/changebar/"
+                   "source/latex/changebar/"
+                   "tex/latex/changebar/")
+             (base32
+              "0k6r3f6xqbl5gr3i2kwh82lkbwk76gwyfvj7nsvzi1awjk84hqd2")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/changebar"))
     (home-page "https://www.ctan.org/pkg/changebar")
     (synopsis "Generate changebars in LaTeX documents")
     (description
      "Identify areas of text to be marked with changebars with the
 @code{\\cbstart} and @code{\\cbend} commands; the bars may be coloured.  The
-package uses @code{drivers} to place the bars; the available drivers can work
-with @code{dvitoln03}, @code{dvitops}, @code{dvips}, the emTeX and TeXtures DVI
+package uses drivers to place the bars; the available drivers can work with
+@code{dvitoln03}, @code{dvitops}, @code{dvips}, the emTeX and TeXtures DVI
 drivers, and VTeX and pdfTeX.")
     (license license:lppl)))
 
-(define-public texlive-latex-cmap
+(define-deprecated-package texlive-latex-changebar texlive-changebar)
+
+(define-public texlive-checkcites
   (package
-    (name "texlive-latex-cmap")
+    (name "texlive-checkcites")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/cmap"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0m4r52gw9vwsi1pzwh0cy03jxhwizymi4a2fj3jfs5rrvh105r5y"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/cmap")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.tug.org/svn/texlive/tags/texlive-2017.1/\
-Master/texmf-dist/tex/latex/cmap/")
-    (synopsis "CMap support for PDF files")
+    (source (texlive-origin
+             name version
+             (list "doc/support/checkcites/"
+                   "scripts/checkcites/")
+             (base32
+              "0zfghyyq86xrbnb9bzl7z1p96s0n255b39v2srqslb2z37ppvjyz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/checkcites")
+    (synopsis "Check citation commands in a document")
+    (description
+     "The package provides a Lua script written for the sole purpose of
+detecting undefined and unused references from LaTeX auxiliary or bibliography
+files.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-chickenize
+  (package
+    (name "texlive-chickenize")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/chickenize/"
+                   "source/luatex/chickenize/"
+                   "tex/luatex/chickenize/")
+             (base32
+              "055lkxc2igr0qh1lcdbnh2w0z92v3wkjgp1hpbbrj8r5kvpm7nvy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/chickenize")
+    (synopsis "Use Lua callbacks for some textual effects")
+    (description
+     "The package allows manipulations of any LuaTeX document.  Most of the
+package's functions are merely for fun or educational use, but some
+functions (for example, @code{colorstretch} for visualising the badness and
+font expansion of each line, and @code{letterspaceadjust} doing what its name
+says) could be useful in a normal LuaTeX document.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-chinese-jfm
+  (package
+    (name "texlive-chinese-jfm")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/chinese-jfm/"
+                   "tex/luatex/chinese-jfm/")
+             (base32
+              "0ixlwivijp6vvzn2j3drr13hk0ylslcd9ws8df24abda93wjm35r")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/chinese-jfm")
+    (synopsis "Luatexja-jfm files for Chinese typesetting")
+    (description
+     "ChineseJFM is a series of @code{luatexja-jfm} files for better Chinese
+typesetting, providing @code{quanjiao}, @code{banjiao}, and @code{kaiming}
+three styles and other fancy features.  It can be used for both horizontal and
+vertical writing mode in Simplified/Traditional Chinese or Japanese fonts.")
+    (license license:expat)))
+
+(define-public texlive-cloze
+  (package
+    (name "texlive-cloze")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/cloze/" "scripts/cloze/"
+                   "source/luatex/cloze/" "tex/luatex/cloze/")
+             (base32
+              "0i0bsflqgw14bik1r8qlx2287fx6lv8jmha57bx54d7icaswssf9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/cloze")
+    (synopsis "Lualatex package for creating cloze texts")
+    (description
+     "This is a LuaTeX or LuaLaTeX package for generating cloze texts.  The
+main feature of the package is that the formatting doesn't change when using
+the hide and show options.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-cmap
+  (package
+    (name "texlive-cmap")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/cmap/"
+                   "tex/latex/cmap/")
+             (base32
+              "1hag26l3g9mpmmy1kn7lrnfzzr8k0hpm259qp087smggykvsjc4v")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/cmap")
+    (synopsis "Make PDF files searchable and copyable")
     (description
      "This package embeds CMap tables into PDF files to make search and
 copy-and-paste functions work properly.")
     (license license:lppl)))
 
-(define-public texlive-latex-colortbl
+(define-deprecated-package texlive-latex-cmap texlive-cmap)
+
+(define-public texlive-colorprofiles
   (package
-    (name "texlive-latex-colortbl")
+    (name "texlive-colorprofiles")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "colortbl"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1qa0mh0fy9hcvfsmprv6q50q0qzdjjfbxi3axap26z6zg3qj68bc"))))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/colorprofiles/"
+                   "tex/generic/colorprofiles/")
+             (base32
+              "1nxbds0jhn5wvf50iy1a4mpfgk56587kqvs4wxf08ysvqx6xiaxv")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/colortbl"))
-    (home-page "https://www.ctan.org/pkg/colortbl")
+    (home-page "https://ctan.org/pkg/colorprofiles")
+    (synopsis "Collection of free ICC profiles")
+    (description
+     "This package collects ICC profiles that can be used by color profile
+aware applications or tools like the @code{pdfx} package, as well as TeX and
+LaTeX packages to access them.")
+    (license license:lppl1.2+)))        ;per "colorprofiles.sty"
+
+(define-public texlive-colortbl
+  (package
+    (name "texlive-colortbl")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/colortbl/" "source/latex/colortbl/"
+                   "tex/latex/colortbl/")
+             (base32
+              "17hslagzpbi5jq08sjinrc3cv65m8g667mb2zlq89fq5ix9808vx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/colortbl")
     (synopsis "Add colour to LaTeX tables")
     (description
-     "This package allows rows, columns, and even individual cells in LaTeX
-tables to be coloured.")
+     "The package allows rows and columns to be coloured, and even
+individual cells.")
     (license license:lppl)))
 
-(define-public texlive-latex-fancybox
+(define-deprecated-package texlive-latex-colortbl texlive-colortbl)
+
+(define-public texlive-combofont
   (package
-    (name "texlive-latex-fancybox")
+    (name "texlive-combofont")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/fancybox"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0smmnaad2q8qwicay1frri990lv65l0k8cwzsvdsyp3jk8kp042w"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/fancybox")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/fancybox")
-    (synopsis "Variants of \\fbox and other games with boxes")
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/combofont/"
+                   "tex/lualatex/combofont/")
+             (base32
+              "05p044znavjjd7cpgjx46i8n6b56rpybhixqs9yaam86nb70ha7n")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/combofont")
+    (synopsis "Add NFSS-declarations of combo fonts to LuaLaTeX documents")
+    (description
+     "This highly experimental package can be used to add NFSS-declarations of
+combo fonts to LuaLaTeX documents.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-cstypo
+  (package
+    (name "texlive-cstypo")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/cstypo/"
+                   "tex/lualatex/cstypo/" "tex/luatex/cstypo/")
+             (base32
+              "07cgcda6jcmkvhp90n4a8g4x98jmzwf4199gp6nh19718v6n15j8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/cstypo")
+    (synopsis "Czech typography rules enforced through LuaTeX hooks")
+    (description
+     "This package provides macros that enforce basic Czech typography rules
+through Lua hooks available in LuaTeX.")
+    (license license:expat)))
+
+(define-public texlive-fancybox
+  (package
+    (name "texlive-fancybox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/fancybox/"
+                   "tex/latex/fancybox/")
+             (base32
+              "0pb1j0a1va8yhrzig7dwrd8jgq39mbcpygl810jhrv8pl473mfmn")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fancybox")
+    (synopsis "Variants of @code{\\fbox} and other games with boxes")
     (description
      "This package provides variants of @code{\\fbox}: @code{\\shadowbox},
 @code{\\doublebox}, @code{\\ovalbox}, @code{\\Ovalbox}, with helpful tools for
@@ -6856,84 +17451,89 @@ using box macros and flexible verbatim macros.  You can box mathematics,
 floats, center, flushleft, and flushright, lists, and pages.")
     (license license:lppl1.2+)))
 
+(define-deprecated-package texlive-latex-fancybox texlive-fancybox)
+
 (define-public texlive-fancyhdr
-  (let ((template (simple-texlive-package
-                   "texlive-fancyhdr"
-                   (list "doc/latex/fancyhdr/"
-                         "source/latex/fancyhdr/"
-                         "tex/latex/fancyhdr/")
-                   (base32
-                    "15fainwxs22gg4xhwsv1vmjgdhg34dbkir26nnk4pb6jprpwb83f"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/fancyhdr")
-         ((#:build-targets _ '())
-          #~(list "fancyhdr.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _ (chdir "source/latex/fancyhdr")))
-              (replace 'copy-files
-                (lambda* (#:key inputs outputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/fancyhdr")
-      (synopsis "Extensive control of page headers and footers in LaTeX2e")
-      (description
-       "This package provides extensive facilities, both for constructing
-headers and footers, and for controlling their use (for example, at times when
-LaTeX would automatically change the heading style in use).")
-      (license license:lppl))))
+  (package
+    (name "texlive-fancyhdr")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/fancyhdr/" "source/latex/fancyhdr/"
+                   "tex/latex/fancyhdr/")
+             (base32
+              "0asx5l8kx1zsvja5arnbspr37hwmmjp01837kfrsy7dsm8wfclgr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fancyhdr")
+    (synopsis "Extensive control of page headers and footers in LaTeX2e")
+    (description
+     "The package provides extensive facilities, both for constructing headers
+and footers, and for controlling their use (for example, at times when LaTeX
+would automatically change the heading style in use).")
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-latex-fancyhdr texlive-fancyhdr)
 
-(define-public texlive-latex-float
+(define-public texlive-fancyref
   (package
-    (name "texlive-latex-float")
+    (name "texlive-fancyref")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "float"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0nbl7wylkv22fcdv4p8byhhj575fli6jnqjpkhrkbv8dzwah84nq"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/fancyref/"
+                   "source/latex/fancyref/"
+                   "tex/latex/fancyref/")
+             (base32
+              "0njgl53f5farwbd8xkw8im8id0scf6agbfqcdjkbqlk540vdzwbp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fancyref")
+    (synopsis "LaTeX package for fancy cross-referencing")
+    (description
+     "This package provides fancy cross-referencing support, based on the
+package's reference commands (@code{\\fref} and @code{\\Fref}) that recognise
+what sort of object is being referenced.")
+    (license license:gpl3+)))
+
+(define-public texlive-float
+  (package
+    (name "texlive-float")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/float/"
+                   "source/latex/float/"
+                   "tex/latex/float/")
+             (base32
+              "1rfyvk1n83zsmrrp0x643052nrjb00cj935d2cpm37x4pz649f5d")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/float"))
-    (home-page "https://www.ctan.org/pkg/float")
+    (home-page "https://ctan.org/pkg/float")
     (synopsis "Improved interface for floating objects")
     (description
-     "This package improves the interface for defining floating objects such
-as figures and tables.  It introduces the boxed float, the ruled float and the
-plaintop float.  You can define your own floats and improve the behaviour of
-the old ones.  The package also provides the @code{H} float modifier option of
-the obsolete @code{here} package.  You can select this as automatic default
-with @code{\\floatplacement{figure}{H}}.")
+     "The @code{float} package improves the interface for defining floating
+objects such as figures and tables.  It introduces the boxed float, the ruled
+float and the plaintop float.  You can define your own floats and improve the
+behaviour of the old ones.  The package also provides the @samp{H} float
+modifier option of the obsolete @code{here} package.")
     (license license:lppl)))
 
-(define-public texlive-latex-footmisc
+(define-deprecated-package texlive-latex-float texlive-float)
+
+(define-public texlive-footmisc
   (package
-    (name "texlive-latex-footmisc")
+    (name "texlive-footmisc")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "footmisc"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "03x61wwql8nh6zrqiiiq3rb0x7m3pn48c606zapy19y21fybwdxs"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/footmisc/" "source/latex/footmisc/"
+                   "tex/latex/footmisc/")
+             (base32
+              "1vs69z6hqvx9rxqqr0aqs56wvl0y0102szq954hb9gyqzwj2q225")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/footmisc"))
-    (home-page "https://www.ctan.org/pkg/footmisc")
+    (home-page "https://ctan.org/pkg/footmisc")
     (synopsis "Range of footnote options")
     (description
      "This is a collection of ways to change the typesetting of footnotes.
@@ -6944,306 +17544,409 @@ the same place.  The package also has a range of techniques for labelling
 footnotes with symbols rather than numbers.")
     (license license:lppl1.3+)))
 
+(define-deprecated-package texlive-latex-footmisc texlive-footmisc)
+
+(define-public texlive-footnotehyper
+  (package
+    (name "texlive-footnotehyper")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/footnotehyper/"
+                   "source/latex/footnotehyper/"
+                   "tex/latex/footnotehyper/")
+             (base32
+              "0f8d13zr07bl295rvpagj99s9fn4dgrcjzv1xpjmla3h6xhrv914")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/footnotehyper")
+    (synopsis "hyperref aware @file{footnote.sty}")
+    (description
+     "The @code{footnote} package by Mark Wooding dates back to 1997 and has
+not been made @code{hyperref} compatible.  The aim of the present package is
+to do that.")
+    (license license:lppl1.3c)))
+
 (define-public texlive-letltxmacro
-  (let ((template (simple-texlive-package
-                   "texlive-letltxmacro"
-                   (list "doc/latex/letltxmacro/"
-                         "source/latex/letltxmacro/"
-                         "tex/latex/letltxmacro/")
-                   (base32
-                    "16bmwsng9p80jf78sdmib24apwnw3raw306cs1ms50z5s9dsfdby"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/letltxmacro")
-         ((#:build-targets _ '())
-          #~(list "letltxmacro.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/letltxmacro")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/letltxmacro")
-      (synopsis "Let assignment for macros")
-      (description
-       "TeX’s @code{\\let} assignment does not work for LaTeX macros with
-optional arguments, or for macros that are defined as robust macros by
-@code{\\DeclareRobustCommand}.  This package defines @code{\\LetLtxMacro}
-that also takes care of the involved internal macros.")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-letltxmacro")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/letltxmacro/"
+                   "source/latex/letltxmacro/"
+                   "tex/latex/letltxmacro/")
+             (base32
+              "16bmwsng9p80jf78sdmib24apwnw3raw306cs1ms50z5s9dsfdby")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/letltxmacro")
+    (synopsis "Let assignment for LaTeX macros")
+    (description
+     "TeX's @code{\\let} assignment does not work for LaTeX macros with
+optional arguments or for macros that are defined as robust macros by
+@code{\\DeclareRobustCommand}.  This package defines @code{\\LetLtxMacro} that
+also takes care of the involved internal macros.")
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-latex-letltxmacro texlive-letltxmacro)
 
-(define-public texlive-latex-frankenstein
+(define-public texlive-frankenstein
   (package
-    (name "texlive-latex-frankenstein")
+    (name "texlive-frankenstein")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference (url (string-append
-                                        "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/frankenstein"))
-                                  (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1zhdvn3zgdarlzfcyq8nzilvw0v0bqgl4m0y7j233cbqw8wiil4z"))))
-    (build-system trivial-build-system)
+    (source (texlive-origin
+             name version
+             (list "bibtex/bib/frankenstein/"
+                   "bibtex/bst/frankenstein/"
+                   "doc/latex/frankenstein/"
+                   "source/latex/frankenstein/"
+                   "tex/latex/frankenstein/")
+             (base32
+              "1x494vl4acl0bhfshs96ap8j47xk4m4njfincfhg2b0mi7l5mj1i")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (arguments
-     `(#:modules ((guix build utils))
-       #:builder (begin
-                   (use-modules (guix build utils))
-                   (let ((target (string-append (assoc-ref %outputs "out")
-                                  "/share/texmf-dist/tex/latex/frankenstein")))
-                     (mkdir-p target)
-                     (copy-recursively (assoc-ref %build-inputs "source")
-                                       target) #t))))
+     (list
+      #:modules '((guix build texlive-build-system)
+                  (guix build utils)
+                  (ice-9 match))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'set-TEXINPUTS
+            ;; The ".ins" files strip comments from ".sty", turning them into
+            ;; faster ".stq" (and ".bsq") files.  Unfortunately, the ".ins"
+            ;; and the ".sty" files are not located in the same
+            ;; directory. This phase extends TEXINPUTS so everyone can see
+            ;; each other, including the docstrip utility.
+            (lambda* (#:key inputs #:allow-other-keys)
+              (setenv "TEXINPUTS"
+                      (let ((cwd (getcwd)))
+                        (string-append
+                         cwd "/tex/latex/frankenstein//:"
+                         cwd "/source/latex/frankenstein//:"
+                         (string-join
+                          (map (match-lambda ((_ . dir) dir)) inputs)
+                          "//:"))))))
+          (add-before 'install 'install-faster-files
+            (lambda _
+              ;; Replace ".sty" and ".bst" files with their faster
+              ;; counterpart.
+              (copy-file "build/achicago.bsq"
+                         "bibtex/bst/frankenstein/achicago.bst")
+              ;; "build/tex/.../xxx.stq" -> "tex/.../xxx.sty"
+              (for-each (lambda (file)
+                          (copy-file file
+                                     (string-append "tex/latex/frankenstein/"
+                                                    (basename file ".stq")
+                                                    ".sty")))
+                        (find-files "build/tex" "\\.stq$")))))))
     (home-page "https://ctan.org/pkg/frankenstein")
-    (synopsis "Collection of unrelated LaTeX packages")
+    (synopsis "Collection of LaTeX packages")
     (description
-     "Frankenstein is a bundle of LaTeX packages serving various purposes and a
-BibTeX bibliography style.  The individual packages are: @code{abbrevs},
+     "Frankenstein is a bundle of LaTeX packages serving various purposes
+and a BibTeX bibliography style.  The individual packages are: @code{abbrevs},
 @code{achicago}, @code{achicago} bibstyle, @code{attrib}, @code{blkcntrl},
-@code{compsci}, @code{dialogue}, @code{lips}, @code{moredefs}, @code{newclude},
-@code{slemph} and @code{titles}.  Note: The installation follows the suboptimal
-``Quick and dirty'' recipe, rendering some features unavailable.")
-    ;; README mentions an unspecified version of GNU GPL and points to COPYING,
-    ;; which is missing. However, the individual files mention LPPL 1.2 or
-    ;; later.
+@code{compsci}, @code{dialogue}, @code{lips}, @code{moredefs},
+@code{newclude}, @code{slemph} and @code{titles}.")
+    ;; README mentions an unspecified version of GNU GPL and points to
+    ;; COPYING, which is missing. However, the individual files mention LPPL
+    ;; 1.2 or later.
     (license license:lppl1.2+)))
 
+(define-deprecated-package texlive-latex-frankenstein texlive-frankenstein)
+
+(define-public texlive-kantlipsum
+  (package
+    (name "texlive-kantlipsum")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/kantlipsum/"
+                   "source/latex/kantlipsum/"
+                   "tex/latex/kantlipsum/")
+             (base32
+              "1bz08i8b7ihzd2qi4v9r9kjl2kr5a3l516lqb36spxyyrlmmwv4p")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/kantlipsum")
+    (synopsis "Generate sentences in Kant's style")
+    (description
+     "The package spits out sentences in Kantian style; the text is provided
+by the Kant generator for Python by Mark Pilgrim, described in the book ``Dive
+into Python''.  The package is modelled on @code{lipsum}, and may be used for
+similar purposes.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-kurier
+  (package
+    (name "texlive-kurier")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/kurier/"
+                   "fonts/afm/nowacki/kurier/"
+                   "fonts/enc/dvips/kurier/"
+                   "fonts/map/dvips/kurier/"
+                   "fonts/opentype/nowacki/kurier/"
+                   "fonts/tfm/nowacki/kurier/"
+                   "fonts/type1/nowacki/kurier/"
+                   "tex/latex/kurier/"
+                   "tex/plain/kurier/")
+             (base32
+              "0j89iv0yyy33dyyka0w0v5jykl41sdn7plxrrxa91qmxzqvi2y67")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/kurier")
+    (synopsis "Two-element sans-serif typeface")
+    (description
+     "Kurier is a two-element sans-serif typeface.  It was designed for
+a diploma in typeface design at the Warsaw Academy of Fine Arts under the
+supervision of Roman Tomaszewski.  This distribution contains a significantly
+extended set of characters covering the following modern alphabets:
+latin (including Vietnamese), Cyrillic and Greek as well as a number of
+additional symbols (including mathematical symbols).  The fonts are prepared
+in Type 1 and OpenType formats.  For use with TeX the following encoding files
+have been prepared: T1 (ec), T2 (abc), and OT2--Cyrillic, T5 (Vietnamese),
+OT4, QX, texansi and--nonstandard (IL2 for the Czech fonts), as well as
+supporting macros and files defining fonts for LaTeX.")
+    (license license:gfl1.0)))
+
+(define-public texlive-lipsum
+  (package
+    (name "texlive-lipsum")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/lipsum/" "source/latex/lipsum/"
+                   "tex/latex/lipsum/")
+             (base32
+              "07kcma66p3s68baygzvgcmb7jvwaan7jj6s3hxmx42npcfsp57s3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lipsum")
+    (synopsis "Easy access to the Lorem Ipsum dummy text")
+    (description
+     "This package gives you easy access to the Lorem Ipsum dummy text; an
+option is available to separate the paragraphs of the dummy text into
+TeX-paragraphs.  All the paragraphs are taken with permission from
+@url{http://lipsum.com/}.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-listings
-  (let ((template
-         (simple-texlive-package
-          "texlive-listings"
-          (list "doc/latex/listings/"
-                "source/latex/listings/"
-                "tex/latex/listings/")
-          (base32 "15dnm0j86305x84ss3ymhhcczcw45b2liq01vrab6fj204wzsahk"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/listings")
-         ((#:build-targets _ '())
-          #~(list "listings.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/listings")))
-              (replace 'copy-files
-                (lambda* (#:key inputs outputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/listings")
-      (synopsis "Typeset source code listings using LaTeX")
-      (description
-       "The package enables the user to typeset programs (programming code)
+  (package
+    (name "texlive-listings")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/listings/" "source/latex/listings/"
+                   "tex/latex/listings/")
+             (base32
+              "12db0jnambf3j2c2drnbjz369iwssbbcd7yqjcv0wrzq284lzc0m")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    ;; Do not build intermediate "lstdrvrs.ins".
+    (arguments (list #:build-targets '(list "listings.ins")))
+    (home-page "https://ctan.org/pkg/listings")
+    (synopsis "Typeset source code listings using LaTeX")
+    (description
+     "The package enables the user to typeset programs (programming code)
 within LaTeX; the source code is read directly by TeX---no front-end processor
 is needed.  Keywords, comments and strings can be typeset using different
 styles.  Support for @code{hyperref} is provided.")
-      (license license:lppl1.3+))))
+    (license license:lppl1.3+)))
+
+(define-public texlive-listingsutf8
+  (package
+    (name "texlive-listingsutf8")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/listingsutf8/"
+                   "source/latex/listingsutf8/"
+                   "tex/latex/listingsutf8/")
+             (base32
+              "152gzkzm7sl3bvggmmfcj1pw74vc40s2kpkbp01fd9i0d0v60wma")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/listingsutf8")
+    (synopsis "Allow UTF-8 in listings input")
+    (description
+     "Package @code{listings} does not support files with multi-byte encodings
+such as UTF-8.  In the case of @code{\\lstinputlisting}, a simple workaround
+is possible if a one-byte encoding exists that the file can be converted to.
+The package requires the e-TeX extensions under pdfTeX (in either PDF or DVI
+output mode).")
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-latex-listings texlive-listings)
 
-(define-public texlive-latex-jknapltx
+(define-public texlive-jknapltx
   (package
-    (name "texlive-latex-jknapltx")
+    (name "texlive-jknapltx")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/jknapltx"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0m034x72f2g07icr50gacyxfb9g1lz2rmqh4kqr1qjb421x2kds9"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/jknapltx")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/jknappen")
+    (source (texlive-origin
+             name version
+             (list "doc/latex/jknapltx/"
+                   "tex/latex/jknapltx/")
+             (base32
+              "0as43yqq123cacxhvp4sbdp4ka3cyp2spmxwayqny0fh5rsk6qaq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/jknapltx")
     (synopsis "Miscellaneous packages by Joerg Knappen")
     (description
-     "This package provides miscellaneous macros by Joerg Knappen, including:
-represent counters in greek; Maxwell's non-commutative division;
+     "This package provides miscellaneous macros by Joerg Knappen,
+including: represent counters in greek; Maxwell's non-commutative division;
 @code{latin1jk}, @code{latin2jk} and @code{latin3jk}, which are
 @code{inputenc} definition files that allow verbatim input in the respective
 ISO Latin codes; blackboard bold fonts in maths; use of RSFS fonts in maths;
 extra alignments for @code{\\parboxes}; swap Roman and Sans fonts;
 transliterate semitic languages; patches to make (La)TeX formulae embeddable
 in SGML; use maths minus in text as appropriate; simple Young tableaux.")
-    (license license:gpl2)))
+    (license license:gpl3+)))
+
+(define-deprecated-package texlive-latex-jknapltx texlive-jknapltx)
+(define-deprecated-package texlive-jknappen texlive-jknapltx)
+
+(define-public texlive-jmn
+  (package
+    (name "texlive-jmn")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "fonts/afm/jmn/hans/" "fonts/enc/dvips/jmn/"
+                   "fonts/map/dvips/jmn/" "fonts/tfm/jmn/hans/"
+                   "fonts/type1/jmn/hans/")
+             (base32
+              "0iq5ky3llx50smw80lpylv11jmqc51m5yrhlslz3sakmgdqgg1yi")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/jmn")
+    (synopsis "Special fonts for ConTeXt")
+    (description "This ConTeXt module provides special fonts.")
+    (license license:bsd-2)))           ;as the whole ConTeXt project
 
 (define-public texlive-kvoptions
-  (let ((template (simple-texlive-package
-                   "texlive-kvoptions"
-                   (list "doc/latex/kvoptions/"
-                         "source/latex/kvoptions/"
-                         "tex/latex/kvoptions/")
-                   (base32
-                    "1b8q93l54160b8gn3fq484n15n6cylrhmf2xk7p42czg2rqw7w3l"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/kvoptions")
-         ((#:build-targets _ '())
-          #~(list "kvoptions.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/kvoptions")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (propagated-inputs
-       (list texlive-kvsetkeys texlive-ltxcmds))
-      (home-page "https://www.ctan.org/pkg/kvoptions")
-      (synopsis "Key/value format for package options")
-      (description
-       "This package provides facilities for using key-value format in
+  (package
+    (name "texlive-kvoptions")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/kvoptions/"
+                   "source/latex/kvoptions/"
+                   "tex/latex/kvoptions/")
+             (base32
+              "14f19c53s5m067vp25h7yk1f209h1xm352zkhzv6qk5xc0ckkbxm")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://www.ctan.org/pkg/kvoptions")
+    (synopsis "Key/value format for package options")
+    (description
+     "This package provides facilities for using key-value format in
 package options.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-latex-kvoptions texlive-kvoptions)
 
-(define-public texlive-fonts-ec
+(define-public texlive-ekdosis
   (package
-    (name "texlive-fonts-ec")
+    (name "texlive-ekdosis")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/fonts/source/jknappen/ec/"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "12av65fbz9xiashm09c9m1fj1mijxls5xspd7652ry1n5s0nixy4"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (srfi srfi-1)
-                  (srfi srfi-26))
-       #:tests? #f                      ; no tests
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)
-         (replace 'build
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((mf (assoc-ref inputs "texlive-metafont")))
-               ;; Tell mf where to find mf.base
-               (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
-               ;; Tell mf where to look for source files
-               (setenv "MFINPUTS"
-                       (string-append (getcwd) ":"
-                                      mf "/share/texmf-dist/metafont/base:"
-                                      (assoc-ref inputs "texlive-cm")
-                                      "/share/texmf-dist/fonts/source/public/cm")))
-             (mkdir "build")
-             (for-each (lambda (font)
-                         (format #t "building font ~a\n" font)
-                         (invoke "mf" "-progname=mf"
-                                 "-output-directory=build"
-                                 (string-append "\\"
-                                                "mode:=ljfour; "
-                                                "mag:=1; "
-                                                "batchmode; "
-                                                "input " (basename font ".mf"))))
-                       (find-files "." "[0-9]+\\.mf$"))
-             #t))
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (tfm (string-append
-                          out "/share/texmf-dist/fonts/tfm/jknappen/ec"))
-                    (mf  (string-append
-                          out "/share/texmf-dist/fonts/source/jknappen/ec")))
-               (for-each (cut install-file <> tfm)
-                         (find-files "build" "\\.*"))
-               (for-each (cut install-file <> mf)
-                         (find-files "." "\\.mf"))
-               #t))))))
-    (native-inputs
-     (list texlive-bin texlive-metafont texlive-cm))
-    (home-page "https://www.ctan.org/pkg/ec")
-    (synopsis "Computer modern fonts in T1 and TS1 encodings")
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/ekdosis/"
+                   "source/lualatex/ekdosis/"
+                   "tex/lualatex/ekdosis/")
+             (base32
+              "0bzydy6gcmikqsdiaji30a2ycifzaafbg0ccv5lq5an7rv2hajmj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ekdosis")
+    (synopsis "Typesetting TEI-xml compliant Critical Editions")
     (description
-     "The EC fonts are European Computer Modern Fonts, supporting the complete
-LaTeX T1 encoding defined at the 1990 TUG conference hold at Cork/Ireland.
-These fonts are intended to be stable with no changes being made to the tfm
-files.  The set also contains a Text Companion Symbol font, called @code{tc},
-featuring many useful characters needed in text typesetting, for example
-oldstyle digits, currency symbols (including the newly created Euro symbol),
-the permille sign, copyright, trade mark and servicemark as well as a copyleft
-sign, and many others.  Recent releases of LaTeX2e support the EC fonts.  The
-EC fonts supersede the preliminary version released as the DC fonts.  The
-fonts are available in (traced) Adobe Type 1 format, as part of the
-@code{cm-super} bundle.  The other Computer Modern-style T1-encoded Type 1
-set, Latin Modern, is not actually a direct development of the EC set, and
-differs from the EC in a number of particulars.")
-    (license (license:fsf-free "https://www.tug.org/svn/texlive/tags/\
-texlive-2019.3/Master/texmf-dist/doc/fonts/ec/copyrite.txt"))))
+     "@code{ekdosis} is a LuaLaTeX package designed for multilingual critical
+editions.  It can be used to typeset texts and different layers of critical
+notes in any direction accepted by LuaTeX. Texts can be arranged in running
+paragraphs or on facing pages, in any number of columns which in turn can be
+synchronized or not.  In addition to printed texts, @code{ekdosis} can convert
+@file{.tex} source files so as to produce TEI XML-compliant critical editions.
+Database-driven encoding under LaTeX then allows extraction of texts entered
+segment by segment according to various criteria: main edited text, variant
+readings, translations or annotated borrowings between texts.")
+    (license (list license:gpl3+ license:fdl1.3+))))
+
+(define-public texlive-emoji
+  (package
+    (name "texlive-emoji")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/emoji/" "tex/latex/emoji/")
+             (base32
+              "17i2kjb1rlgj2ipg6bkni1n8l1yhhnm1m96ynj1nv8gkmgkfklal")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/emoji")
+    (synopsis "Emoji support in (Lua)LaTeX")
+    (description
+     "This package allows users to typeset emojis in LaTeX documents.  It
+requires the LuaHBTeX engine.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-emojicite
+  (package
+    (name "texlive-emojicite")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/emojicite/"
+                   "tex/lualatex/emojicite/")
+             (base32
+              "0wfr4alglwhsp728fp91qxdmc9413c6k9j7hgg0qk3j4w464srbj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/emojicite")
+    (synopsis "Add emojis to citations")
+    (description "This package adds emojis to citations.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-enigma
+  (package
+    (name "texlive-enigma")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/enigma/enigma/"
+                   "scripts/context/lua/third/enigma/mtx-t-enigma.lua/"
+                   "tex/context/third/enigma/t-enigma.mkv/"
+                   "tex/generic/enigma/"
+                   "tex/latex/enigma/"
+                   "tex/plain/enigma/")
+             (base32
+              "1rnp2c903bfgq0gqshaccd1zxcb0zpbk2sh7w3lwynpp0zx8d435")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/enigma")
+    (synopsis "Encrypt documents with a three rotor Enigma")
+    (description
+     "The package provides historical encryption (Enigma cipher) for
+LuaTeX-based formats.")
+    (license license:bsd-2)))
 
-;; FIXME: the fonts should be built from source, but running "tex aefonts.tex"
-;; fails with obscure TeX-typical error messages.
 (define-public texlive-ae
   (package
-    (inherit (simple-texlive-package
-              "texlive-ae"
-              (list "/doc/fonts/ae/"
-                    "/source/fonts/ae/"
-                    "/fonts/tfm/public/ae/"
-                    "/fonts/vf/public/ae/"
-                    "/tex/latex/ae/")
-              (base32
-               "1xkzg381y0avdq381r2m990wp27czkdff0qkvsp2n5q62yc0bdsw")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/ae")
+    (name "texlive-ae")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/ae/" "fonts/tfm/public/ae/"
+                   "fonts/vf/public/ae/" "source/fonts/ae/"
+                   "tex/latex/ae/")
+             (base32
+              "1xkzg381y0avdq381r2m990wp27czkdff0qkvsp2n5q62yc0bdsw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ae")
     (synopsis "Virtual fonts for T1 encoded CMR-fonts")
     (description
      "This package provides a set of virtual fonts which emulates T1 coded
@@ -7254,21 +17957,66 @@ fonts.  Note that direct substitutes for the bitmapped EC fonts are available,
 via the CM-super, Latin Modern and (in a restricted way) CM-LGC font sets.")
     (license license:lppl1.3+)))
 
+(define-public texlive-aeguill
+  (package
+    (name "texlive-aeguill")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/aeguill/" "tex/latex/aeguill/")
+             (base32
+              "0dbl2dky8gbax9blj0nvk23y2pwkmyikxnbbn27zivpamwc0j8nc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/aeguill")
+    (synopsis "Add several kinds of guillemets to the @code{ae} fonts")
+    (description
+     "The package enables the user to add guillemets from several
+source (Polish cmr, Cyrillic cmr, lasy and ec) to the @code{ae} fonts.  This
+was useful when the @code{ae} fonts were used to produce PDF files, since the
+additional guillemets exist in fonts available in Adobe Type 1 format.")
+    (license license:lppl)))
+
+(define-public texlive-incgraph
+  (package
+    (name "texlive-incgraph")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/incgraph/" "tex/latex/incgraph/")
+             (base32
+              "18ygl211wpnx433xy4v3jyl7wn9vn0dw23m709xs01kq7pwmsz3i")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/incgraph")
+    (synopsis "Sophisticated graphics inclusion in a PDF document")
+    (description
+     "The package provides tools for including graphics at the full size of
+the output medium, or for creating pages whose size is that of the graphic
+they contain.  A principal use case is documents that require inclusion
+of (potentially many) scans or photographs.  Bookmarking is especially
+supported.  The tool box has basic macros and a convenience user interface
+that wraps @code{\\includegraphics}.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-inconsolata
   (package
-    (inherit (simple-texlive-package
-              "texlive-inconsolata"
-              (list "/doc/fonts/inconsolata/"
-                    "/fonts/enc/dvips/inconsolata/"
-                    "/fonts/map/dvips/inconsolata/"
-                    "/fonts/opentype/public/inconsolata/"
-                    "/fonts/tfm/public/inconsolata/"
-                    "/fonts/type1/public/inconsolata/"
-                    "/tex/latex/inconsolata/")
-              (base32
-               "19lvma52vk7x8d7j4s9ymjwm3w2k08860fh6dkzn76scgpdm4wlb")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/inconsolata")
+    (name "texlive-inconsolata")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/inconsolata/"
+                   "fonts/enc/dvips/inconsolata/"
+                   "fonts/map/dvips/inconsolata/"
+                   "fonts/opentype/public/inconsolata/"
+                   "fonts/tfm/public/inconsolata/"
+                   "fonts/type1/public/inconsolata/"
+                   "tex/latex/inconsolata/")
+             (base32
+              "19lvma52vk7x8d7j4s9ymjwm3w2k08860fh6dkzn76scgpdm4wlb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/inconsolata")
     (synopsis "Monospaced font with support files for use with TeX")
     (description
      "Inconsolata is a monospaced font designed by Raph Levien.  This package
@@ -7280,27 +18028,94 @@ TeX, and LaTeX font definition and other relevant files.")
                    license:silofl1.1
                    license:asl2.0))))
 
+(define-public texlive-innerscript
+  (package
+    (name "texlive-innerscript")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/innerscript/"
+                   "source/lualatex/innerscript/"
+                   "tex/lualatex/innerscript/")
+             (base32
+              "1nq2il8av1169is3kbq761375vk4znb2cc3f8vk9ab3fh5vqkcjv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:tex-format "lualatex"
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'skip-documentation-build
+            ;; Only extract the ".sty" file.  Documentation build fails with
+            ;; "Command \code already defined" error.
+            (lambda _
+              (substitute* "source/lualatex/innerscript/innerscript.dtx"
+                (("\\DocInput\\{innerscript.dtx\\}") "")))))))
+    (native-inputs
+     (list (texlive-updmap.cfg
+            (list texlive-booktabs
+                  texlive-etoolbox
+                  texlive-hypdoc
+                  texlive-infwarerr
+                  texlive-kvoptions
+                  texlive-microtype
+                  texlive-pdftexcmds))))
+    (home-page "https://ctan.org/pkg/innerscript")
+    (synopsis "Modifies automatic mathematics spacing")
+    (description
+     "This package modifies two aspects of TeX's automatic interatom
+mathematics spacing.  It uses LuaTeX's @code{\\Umath} primitives to make
+superscripts and subscripts more closely resemble @code{\\textstyle} and
+@code{\\displaystyle} math and to treat @code{\\mathinner} subformulas as
+@code{\\mathord}, effectively eliminating this class.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-interpreter
+  (package
+    (name "texlive-interpreter")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/interpreter/"
+                   "tex/luatex/interpreter/")
+             (base32
+              "03h6bjhvbl3bfkiyssplivqmn2986asv8b1jvr1ahsh7p04bkk4j")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/interpreter")
+    (synopsis "Translate input files on the fly")
+    (description
+     "The package preprocesses input files to a Lua(La)TeX run, on the fly.
+The user defines Lua regular expressions to search for patterns and modify
+input lines (or entire paragraphs) accordingly, before TeX reads the material.
+In this way, documents may be prepared in a non-TeX language (e.g., some
+lightweight markup language) and turned into proper TeX for processing.")
+    (license license:lppl)))
+
 (define-public texlive-times
   (package
-    (inherit (simple-texlive-package
-              "texlive-times"
-              (list "/dvips/times/"
-                    "/fonts/afm/adobe/times/"
-                    "/fonts/afm/urw/times/"
-                    "/fonts/tfm/adobe/times/"
-                    "/fonts/tfm/urw35vf/times/"
-                    "/fonts/type1/urw/times/"
-                    "/fonts/vf/adobe/times/"
-                    "/fonts/vf/urw35vf/times/"
-                    "/fonts/map/dvips/times/"
-                    "/tex/latex/times/")
-              (base32
-               "13g41a7vbkvsf7ki9dgl7qm100w382mnlqkcngwgl3axp6s5s8l0")
-              #:trivial? #t))
+    (name "texlive-times")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "dvips/times/"
+                   "fonts/afm/adobe/times/"
+                   "fonts/afm/urw/times/"
+                   "fonts/map/dvips/times/"
+                   "fonts/tfm/adobe/times/"
+                   "fonts/tfm/urw35vf/times/"
+                   "fonts/type1/urw/times/"
+                   "fonts/vf/adobe/times/"
+                   "fonts/vf/urw35vf/times/"
+                   "tex/latex/times/")
+             (base32
+              "13g41a7vbkvsf7ki9dgl7qm100w382mnlqkcngwgl3axp6s5s8l0")))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/urw-base35")
-    (synopsis "URW Base 35 font pack for LaTeX")
+    (synopsis "Replacement for Adobe's Times font")
     (description
-     "This package provides a drop-in replacements for the Times font from
+     "This package provides a drop-in replacement for the Times font from
 Adobe's basic set.")
     ;; No license version specified.
     (license license:gpl3+)))
@@ -7309,67 +18124,154 @@ Adobe's basic set.")
 
 (define-public texlive-palatino
   (package
-    (inherit (simple-texlive-package
-              "texlive-palatino"
-              (list "/dvips/palatino/"
-                    "/fonts/afm/adobe/palatino/"
-                    "/fonts/afm/urw/palatino/"
-                    "/fonts/tfm/adobe/palatino/"
-                    "/fonts/tfm/urw35vf/palatino/"
-                    "/fonts/type1/urw/palatino/"
-                    "/fonts/vf/adobe/palatino/"
-                    "/fonts/vf/urw35vf/palatino/"
-
-                    "/fonts/map/dvips/palatino/"
-                    "/tex/latex/palatino/")
-              (base32
-               "12jc0av7v99857jigmva47qaxyllhpzsnqis10n0qya2kz44xf22")
-              #:trivial? #t))
+    (name "texlive-palatino")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "dvips/palatino/"
+                   "fonts/afm/adobe/palatino/"
+                   "fonts/afm/urw/palatino/"
+                   "fonts/map/dvips/palatino/"
+                   "fonts/tfm/adobe/palatino/"
+                   "fonts/tfm/urw35vf/palatino/"
+                   "fonts/type1/urw/palatino/"
+                   "fonts/vf/adobe/palatino/"
+                   "fonts/vf/urw35vf/palatino/"
+                   "tex/latex/palatino/")
+             (base32
+              "12jc0av7v99857jigmva47qaxyllhpzsnqis10n0qya2kz44xf22")))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/urw-base35")
-    (synopsis "URW Base 35 font pack for LaTeX")
+    (synopsis "Replacement for Adobe's Palatino font")
     (description
-     "This package provides a drop-in replacements for the Palatino font from
+     "This package provides a drop-in replacement for the Palatino font from
 Adobe's basic set.")
     ;; No license version specified.
     (license license:gpl3+)))
 
 (define-deprecated-package texlive-fonts-adobe-palatino texlive-palatino)
 
+(define-public texlive-poltawski
+  (package
+    (name "texlive-poltawski")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/poltawski/"
+                   "fonts/afm/gust/poltawski/"
+                   "fonts/enc/dvips/poltawski/"
+                   "fonts/map/dvips/poltawski/"
+                   "fonts/opentype/gust/poltawski/"
+                   "fonts/tfm/gust/poltawski/"
+                   "fonts/type1/gust/poltawski/"
+                   "tex/latex/poltawski/")
+             (base32
+              "1cf8vxah8j6nnaq2lhmiy1q3dnq6swprfmizzxd6y67sc60rznzm")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/poltawski")
+    (synopsis "Antykwa Poltawskiego Family of Fonts")
+    (description
+     "The package contains the Antykwa Poltawskiego family of fonts in the
+PostScript Type 1 and OpenType formats Following the route set out by the
+Latin Modern and TeX Gyre projects, the Antykwa Poltawskiego digitisation
+project aims at providing a rich collection of diacritical characters in the
+attempt to cover as many Latin-based scripts as possible.  To our knowledge,
+the repertoire of characters covers all European languages as well as some
+other Latin-based alphabets such as Vietnamese and Navajo; at the request of
+users, recent extensions (following the enhancement of the Latin Modern
+collection) provide glyphs sufficient for typesetting of romanized
+transliterations of Arabic and Sanskrit scripts.  The Antykwa Poltawskiego
+family consists of 4 weights (light, normal, medium, bold), each having
+upright and italic forms and one of 5 design sizes: 6, 8, 10, 12 and 17pt.")
+    (license license:gfl1.0)))
+
+(define-public texlive-zapfchan
+  (package
+    (name "texlive-zapfchan")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "dvips/zapfchan/"
+                   "fonts/afm/adobe/zapfchan/"
+                   "fonts/afm/urw/zapfchan/"
+                   "fonts/map/dvips/zapfchan/"
+                   "fonts/tfm/adobe/zapfchan/"
+                   "fonts/tfm/urw35vf/zapfchan/"
+                   "fonts/type1/urw/zapfchan/"
+                   "fonts/vf/adobe/zapfchan/"
+                   "fonts/vf/urw35vf/zapfchan/"
+                   "tex/latex/zapfchan/")
+             (base32
+              "1753lvv2bq29g43s4chc884n742695agvgal0b99gsrvlkyfp8gn")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/urw-base35")
+    (synopsis "Replacement for Adobe's Zapf Chancery font")
+    (description
+     "This package provides a drop-in replacement for the Zapf Chancery
+font from Adobe's basic set.")
+    (license license:gpl3+)))
+
 (define-public texlive-zapfding
   (package
-    (inherit (simple-texlive-package
-              "texlive-zapfding"
-              (list "/dvips/zapfding/"
-                    "/fonts/afm/adobe/zapfding/"
-                    "/fonts/afm/urw/zapfding/"
-                    "/fonts/tfm/adobe/zapfding/"
-                    "/fonts/tfm/urw35vf/zapfding/"
-                    "/fonts/type1/urw/zapfding/"
-                    "/fonts/map/dvips/zapfding/"
-                    "/tex/latex/zapfding/")
-              (base32
-               "17mls8wilz9api9ivsbcczpiqp1f39qy8wa6ajssi8zhnc5lq7zn")
-              #:trivial? #t))
+    (name "texlive-zapfding")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "dvips/zapfding/"
+                   "fonts/afm/adobe/zapfding/"
+                   "fonts/afm/urw/zapfding/"
+                   "fonts/map/dvips/zapfding/"
+                   "fonts/tfm/adobe/zapfding/"
+                   "fonts/tfm/urw35vf/zapfding/"
+                   "fonts/type1/urw/zapfding/"
+                   "tex/latex/zapfding/")
+             (base32
+              "17mls8wilz9api9ivsbcczpiqp1f39qy8wa6ajssi8zhnc5lq7zn")))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/urw-base35")
-    (synopsis "URW Base 35 font pack for LaTeX")
+    (synopsis "Replacement for Adobe's Zapfding font")
     (description
-     "This package provides a drop-in replacements for the Zapfding font from
+     "This package provides a drop-in replacement for the Zapfding font from
 Adobe's basic set.")
     ;; No license version specified.
     (license license:gpl3+)))
 
+(define-public texlive-zbmath-review-template
+  (package
+    (name "texlive-zbmath-review-template")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/zbmath-review-template/"
+                   "tex/xelatex/zbmath-review-template/")
+             (base32
+              "1m5q03vjscla4wmy9fr3kl23pk8zmqw760i89zg62pj4np8vyplj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/zbmath-review-template")
+    (synopsis "Template for a zbMATH Open review")
+    (description
+     "This package contains a template for zbMATH Open reviews.  It will show
+what your review will look like on zbMATH Open and you can test whether your
+LaTeX-Code will compile on our system.")
+    (license (list license:gpl3 license:cc-by-sa4.0))))
+
 (define-public texlive-zhspacing
   (package
-    (inherit
-     (simple-texlive-package "texlive-zhspacing"
-                             (list "doc/generic/zhspacing/"
-                                   "tex/context/third/zhspacing/"
-                                   "tex/generic/zhspacing/"
-                                   "tex/xelatex/zhspacing/")
-                             (base32
-                              "02hwa7yjwb6wxkkib83mjdbara5zcsixbp5xlawri8n9ah54vxjm")
-                             #:trivial? #t))
-    (home-page "https://ctan.org/macros/xetex/generic/zhspacing")
+    (name "texlive-zhspacing")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/zhspacing/"
+                   "tex/context/third/zhspacing/"
+                   "tex/generic/zhspacing/"
+                   "tex/xelatex/zhspacing/")
+             (base32
+              "02hwa7yjwb6wxkkib83mjdbara5zcsixbp5xlawri8n9ah54vxjm")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/zhspacing")
     (synopsis "Spacing for mixed CJK-English documents in XeTeX")
     (description
      "The package manages spacing in a CJK document; between consecutive Chinese
@@ -7380,36 +18282,16 @@ format under XeTeX.")
 
 (define-public texlive-zref
   (package
-    (inherit (simple-texlive-package
-              "texlive-zref"
-              (list "doc/latex/zref/"
-                    "source/latex/zref/")
-              (base32 "09l2wrqx0navislkx15iazv7jy0ip8bqaw3c0hjf0jy81kqrrm01")))
+    (name "texlive-zref")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/zref/" "source/latex/zref/"
+                   "tex/latex/zref/")
+             (base32
+              "188m3xb2q471mmm54akpdbj65n9sz70n0krapnrbwa8glxjrvlxk")))
     (outputs '("out" "doc"))
-    (arguments
-     (list
-      #:build-targets #~(list "zref.dtx")
-      #:tex-directory "latex/zref"
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'chdir
-            (lambda _
-              (setenv "ROOT_DIR" (getcwd))
-              (chdir "source/latex/zref")))
-          (add-after 'install 'install-doc
-            (lambda* (#:key outputs #:allow-other-keys)
-              (define doc (string-append (assoc-ref outputs "doc")
-                                         "/share/texmf-dist/doc"))
-              (mkdir-p doc)
-              (copy-recursively (string-append (getenv "ROOT_DIR") "/doc")
-                                doc))))))
-    (propagated-inputs (list texlive-atbegshi
-                             texlive-gettitlestring
-                             texlive-iftex
-                             texlive-atveryend
-                             texlive-kvoptions
-                             texlive-pdftexcmds
-                             texlive-latex-xkeyval))
+    (build-system texlive-build-system)
     (home-page "https://github.com/ho-tex/zref")
     (synopsis "Reference scheme for LaTeX")
     (description "This package offers a means to remove the limitation, of
@@ -7417,205 +18299,98 @@ only two properties, that is inherent in the way LaTeX's reference system
 works.  The package implements an extensible referencing system, where
 properties may be defined and used in the course of a document.  It provides
 an interface for macro programmers to access the new reference scheme and some
-modules that use it.  Modules available are:
-@table @code
-@item zref-user
-use zref for traditional labels and references;
-@item zref-abspage
-retrieve absolute page numbers (physical pages, as opposed to the logical page
-number that is normally typeset when a page number is requested;
-@item zref-lastpage
-provide a zref-label for the last page of the document;
-@item zref-nextpage
-provide the page number of the next page of the document;
-@item zref-totpages
-provide the total number of pages in the document;
-@item zref-pagelayout
-provide the page layout parameters of a each page (which may then be printed
-at the end of the document);
-@item zref-perpage
-make a counter reset for each new page;
-@item zref-titleref
-make section title or caption text available through the reference system;
-@item zref-savepos
-make positions on a page available;
-@item zref-dotfill
-controlled dot-filling
-@item zref-env
-record the latest environment's name and the line it started on;
-@item zref-xr
-provide the facilities of the xr and xr-hyper packages.
-@end table")
+modules that use it.")
     (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-fonts-adobe-zapfding texlive-zapfding)
 
-(define-public texlive-fonts-rsfs
+(define-public texlive-rsfs
   (package
-    (name "texlive-fonts-rsfs")
+    (name "texlive-rsfs")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/fonts/source/public/rsfs/"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0r12pn02r4a955prcvq0048nifh86ihlcgvw3pppqqvfngv34l5h"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (srfi srfi-1)
-                  (srfi srfi-26))
-       #:tests? #f                      ; no tests
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)
-         (replace 'build
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((mf (assoc-ref inputs "texlive-metafont")))
-               ;; Tell mf where to find mf.base
-               (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
-               ;; Tell mf where to look for source files
-               (setenv "MFINPUTS"
-                       (string-append (getcwd) ":"
-                                      mf "/share/texmf-dist/metafont/base:"
-                                      (assoc-ref inputs "texlive-cm")
-                                      "/share/texmf-dist/fonts/source/public/cm")))
-             (mkdir "build")
-             (for-each (lambda (font)
-                         (format #t "building font ~a\n" font)
-                         (invoke "mf" "-progname=mf"
-                                 "-output-directory=build"
-                                 (string-append "\\"
-                                                "mode:=ljfour; "
-                                                "mag:=1; "
-                                                "batchmode; "
-                                                "input " (basename font ".mf"))))
-                       (find-files "." "[0-9]+\\.mf$"))
-             #t))
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (tfm (string-append
-                          out "/share/texmf-dist/fonts/tfm/public/rsfs"))
-                    (mf  (string-append
-                          out "/share/texmf-dist/fonts/source/public/rsfs")))
-               (for-each (cut install-file <> tfm)
-                         (find-files "build" "\\.*"))
-               (for-each (cut install-file <> mf)
-                         (find-files "." "\\.mf"))
-               #t))))))
-    (native-inputs
-     (list texlive-bin texlive-metafont texlive-cm))
-    (home-page "https://www.ctan.org/pkg/rsfs")
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/rsfs/"
+                   "fonts/afm/public/rsfs/"
+                   "fonts/map/dvips/rsfs/"
+                   "fonts/source/public/rsfs/"
+                   "fonts/tfm/public/rsfs/"
+                   "fonts/type1/public/rsfs/"
+                   "tex/plain/rsfs/")
+             (base32
+              "1sa32wnsj84wbwqji1fb4k9ik99dy5ji7zz4v0xbd7306agyhns5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-cm texlive-metafont))
+    (home-page "https://ctan.org/pkg/rsfs")
     (synopsis "Ralph Smith's Formal Script font")
     (description
      "The fonts provide uppercase formal script letters for use as symbols in
 scientific and mathematical typesetting (in contrast to the informal script
 fonts such as that used for the calligraphic symbols in the TeX maths symbol
-font).  The fonts are provided as Metafont source, and as derived Adobe Type 1
-format.  LaTeX support, for using these fonts in mathematics, is available via
-one of the packages @code{calrsfs} and @code{mathrsfs}.")
+font).  The fonts are provided as Metafont source, and as derived Adobe Type
+1 format.  LaTeX support, for using these fonts in mathematics, is available
+via one of the packages @code{calrsfs} and @code{mathrsfs}.")
     (license (license:fsf-free "http://mirrors.ctan.org/fonts/rsfs/README"))))
 
+(define-deprecated-package texlive-fonts-rsfs texlive-rsfs)
+
 (define-public texlive-eso-pic
-  (let ((template (simple-texlive-package
-                   "texlive-eso-pic"
-                   (list "doc/latex/eso-pic/"
-                         "source/latex/eso-pic/"
-                         "tex/latex/eso-pic/")
-                   (base32
-                    "05bqm4x209wji0q6xk1jrjp0nzqafp44dlq30hlpcagrggjb3d9s"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/eso-pic")
-         ((#:build-targets _ '())
-          #~(list "eso-pic.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/eso-pic")))
-              (replace 'copy-files
-                (lambda _
-                  (let ((origin #$(package-source this-package))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc)
-                    ;; This file is not generated.
-                    (install-file
-                     (string-append origin
-                                    "/tex/latex/eso-pic/showframe.sty")
-                     (string-append
-                      #$output
-                      "/share/texmf-dist/tex/latex/eso-pic")))))))))
-      (home-page "https://ctan.org/macros/latex/contrib/eso-pic")
-      (synopsis "Add picture commands (or backgrounds) to every page")
-      (description
-       "The package adds one or more user commands to LaTeX's @code{shipout}
+  (package
+    (name "texlive-eso-pic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/eso-pic/" "source/latex/eso-pic/"
+                   "tex/latex/eso-pic/")
+             (base32
+              "05bqm4x209wji0q6xk1jrjp0nzqafp44dlq30hlpcagrggjb3d9s")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/eso-pic")
+    (synopsis "Add picture commands (or backgrounds) to every page")
+    (description
+     "The package adds one or more user commands to LaTeX's @code{shipout}
 routine, which may be used to place the output at fixed positions.  The
 @code{grid} option may be used to find the correct places.")
-      (license license:lppl1.3+))))
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-latex-eso-pic texlive-eso-pic)
 
-(define-public texlive-latex-eepic
+(define-public texlive-eepic
   (package
-    (name "texlive-latex-eepic")
+    (name "texlive-eepic")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/eepic"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1c68gvh021pvybg07apsd2xhq2ljbg80kq94wh71drdga3c2zqjw"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/eepic")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/eepic/"
+                   "tex/latex/eepic/")
+             (base32
+              "16v8j3f8bgww9adddpfzpwd5q9kvak7xnp5kkvkrvhw8vshdspaa")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://www.ctan.org/pkg/eepic")
-    (synopsis "Extensions to epic and the LaTeX drawing tools")
-    (description
-     "Extensions to @code{epic} and the LaTeX picture drawing environment,
-include the drawing of lines at any slope, the drawing of circles in any
-radii, and the drawing of dotted and dashed lines much faster with much less
-TeX memory, and providing several new commands for drawing ellipses, arcs,
-splines, and filled circles and ellipses.  The package uses @code{tpic}
-@code{\\special} commands.")
+    (synopsis "Extensions to @code{epic} and the LaTeX drawing tools")
+    (description
+     "This package provides extensions to @code{epic} and the LaTeX picture
+drawing environment.  It includes the drawing of lines at any slope, the
+drawing of circles in any radii, and the drawing of dotted and dashed lines
+much faster with much less TeX memory, and providing several new commands for
+drawing ellipses, arcs, splines, and filled circles and ellipses.")
     (license license:public-domain)))
 
-(define-public texlive-latex-enotez
+(define-deprecated-package texlive-latex-eepic texlive-eepic)
+
+(define-public texlive-enotez
   (package
-    (inherit (simple-texlive-package
-              "texlive-latex-enotez"
-              (list "doc/latex/enotez/"
-                    "tex/latex/enotez/")
-              (base32 "1s1wyq6m5932gpbpvvkiw857q94jn1rp7xy9y7hysz9aafjqjyk2")
-              #:trivial? #t))
+    (name "texlive-enotez")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/enotez/" "tex/latex/enotez/")
+             (base32
+              "0498zr9niylpj9q5ndnj52lb06cj0b424yyq587vqhckxq4l24ik")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/enotez")
     (synopsis "Support for end-notes")
@@ -7624,90 +18399,111 @@ splines, and filled circles and ellipses.  The package uses @code{tpic}
 provides means for easy customization of the list of notes.")
     (license license:lppl1.3c+)))
 
+(define-deprecated-package texlive-latex-enotez texlive-enotez)
+
 (define-public texlive-endnotes
   (package
-    (inherit (simple-texlive-package
-              "texlive-endnotes"
-              (list "doc/latex/endnotes/"
-                    "tex/latex/endnotes/")
-              (base32
-               "1s7j5sg8fbhifng0gfqnghbvalbbh0p7j9v06r660w089364ypwz")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/endnotes")
-    (synopsis "Deal with endnotesings in strings")
-    (description
-     "Accumulates notes (using the @code{\\endnote} command, which can be used
-as a replacement for @code{\\footnote}), and places them at the end of
-the section, chapter or document.")
-    (license license:lppl1.0+)))
+    (name "texlive-endnotes")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/endnotes/" "tex/latex/endnotes/")
+             (base32
+              "1s7j5sg8fbhifng0gfqnghbvalbbh0p7j9v06r660w089364ypwz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/endnotes")
+    (synopsis "Place footnotes at the end")
+    (description
+     "The @code{endnotes} package can be used to accumulate notes (using the
+@code{\\endnote} command, which can be used as a replacement for
+@code{\\footnote}), and place them at the end of the section, chapter or
+document.")
+    (license license:lppl1.2+)))
 
 (define-public texlive-enumitem
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-enumitem"
-      (list "doc/latex/enumitem/" "tex/latex/enumitem/")
-      (base32 "0qwbyjb4a82qjxrfmz06v3w5vly75id4ix4sw7lz2az68kz080dv")
-      #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/enumitem")
-    (synopsis "Customize basic list environments")
+    (name "texlive-enumitem")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/enumitem/" "tex/latex/enumitem/")
+             (base32
+              "0qwbyjb4a82qjxrfmz06v3w5vly75id4ix4sw7lz2az68kz080dv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/enumitem")
+    (synopsis "Control layout of itemize, enumerate, description")
     (description
-     "This package is intended to ease customizing the three basic list
-environments: @code{enumerate}, @code{itemize} and @code{description}.  It
-extends their syntax to allow an optional argument where a set of parameters
-in the form @code{key=value} are available, for example:
-@code{\\begin{itemize}[itemsep=1ex,leftmargin=1cm]}.")
-    (license license:lppl1.3+)))
+     "This package provides user control over the layout of the three basic
+list environments: enumerate, itemize and description.  It supersedes both
+@code{enumerate} and @code{mdwlist} (providing well-structured replacements
+for all their functionality), and in addition provides functions to compute
+the layout of labels, and to clone the standard environments, to create new
+environments with counters of their own.")
+    (license license:expat)))
 
 (define-deprecated-package texlive-latex-enumitem texlive-enumitem)
 
-(define-public texlive-latex-multirow
+(define-public texlive-multido
   (package
-    (name "texlive-latex-multirow")
+    (name "texlive-multido")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "multirow"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1kak9i6nwz6vc4xjj6lbvkb69s49pis6qynjzvsjraxbdw28y2dq"))))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/multido/"
+                   "source/generic/multido/"
+                   "tex/generic/multido/" "tex/latex/multido/")
+             (base32
+              "1vwf2naw5bgs93s2gcmf226f60ws9z6cmw6gi1562fs8vg4mnjsh")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/multido")
+    (synopsis "Loop facility for Generic TeX")
+    (description
+     "The package provides the @code{\\multido} command, which was originally
+designed for use with PSTricks.  Fixed-point arithmetic is used when working
+on the loop variable, so that the package is equally applicable in graphics
+applications like PSTricks as it is with the more common integer loops.")
+    (license license:lppl)))
+
+(define-public texlive-multirow
+  (package
+    (name "texlive-multirow")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/multirow/"
+                   "source/latex/multirow/"
+                   "tex/latex/multirow/")
+             (base32
+              "18xnxqbkkzblngws1ydmkiwfrf9gvrriqrjpb6g6kmaxciwypqd6")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/multirow"))
-    (home-page "https://www.ctan.org/pkg/multirow")
+    (home-page "https://ctan.org/pkg/multirow")
     (synopsis "Create tabular cells spanning multiple rows")
     (description
-     "The package provides tools for creating tabular cells spanning multiple
-rows.  It has a lot of flexibility, including an option for specifying an
-entry at the \"natural\" width of its text.")
+     "The package has a lot of flexibility, including an option for specifying
+an entry at the natural width of its text.  The package is distributed with
+the @code{bigdelim} and @code{bigstrut} packages, which can be used to
+advantage with @code{\\multirow} cells.")
     (license license:lppl1.3+)))
 
-(define-public texlive-latex-overpic
+(define-deprecated-package texlive-latex-multirow texlive-multirow)
+
+(define-public texlive-overpic
   (package
-    (name "texlive-latex-overpic")
+    (name "texlive-overpic")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/overpic"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1ygsr0rsdabj61zask3346xrwiphz5i6f1nfb9k4d3234psh09kb"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/overpic")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/overpic/"
+                   "source/latex/overpic/"
+                   "tex/latex/overpic/")
+             (base32
+              "0z6jkn54b4yfk2ia8cxcb5is3qyg64r0na05ixd8xbirrks9ir7w")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://www.ctan.org/pkg/overpic")
     (synopsis "Combine LaTeX commands over included graphics")
     (description
@@ -7718,267 +18514,237 @@ the included graphic.  LaTeX commands can be placed on the graphic at defined
 positions; a grid for orientation is available.")
     (license license:lppl1.0+)))
 
-(define-public texlive-latex-parskip
+(define-deprecated-package texlive-latex-overpic texlive-overpic)
+
+(define-public texlive-parskip
   (package
-    (name "texlive-latex-parskip")
+    (name "texlive-parskip")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/parskip"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1zll8jci8lsd7y44j567akf6y8fp2p7qq23rs527zhr0br9mn3sh"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/parskip")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/parskip/"
+                   "source/latex/parskip/"
+                   "tex/latex/parskip/")
+             (base32
+              "18yygddxv3kblvf4jhzqa8h1js0n8g1bw723r6ss2hlz4lj64kf0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://www.ctan.org/pkg/parskip")
-    (synopsis "Layout with zero \\parindent, non-zero \\parskip")
+    (synopsis "Layout with zero @code{\\parindent}, non-zero @code{\\parskip}")
     (description
      "Simply changing @code{\\parskip} and @code{\\parindent} leaves a layout
 that is untidy; this package (though it is no substitute for a properly
 designed class) helps alleviate this untidiness.")
     (license license:lppl)))
 
-(define-public texlive-latex-pbox
+(define-deprecated-package texlive-latex-parskip texlive-parskip)
+
+(define-public texlive-pbox
   (package
-    (inherit (simple-texlive-package
-              "texlive-latex-pbox"
-              (list "doc/latex/pbox/"
-                    "tex/latex/pbox/")
-              (base32 "0902snjidmhjml01zcppcpp4j6pidin1sdvfi7gnbb5v86zd5f0n")
-              #:trivial? #t))
+    (name "texlive-pbox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pbox/"
+                   "source/latex/pbox/"
+                   "tex/latex/pbox/")
+             (base32
+              "104x4y22msgxhnlz2x331zq7rw28v129s5ym1jqhsk685izb3hcl")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/pbox")
-    (synopsis "\\parbox with a variable width")
+    (synopsis "@code{\\parbox} with a variable width")
     (description
-     "@code{pbox} defines a \\pbox{<max width>}{<text>} command which adjusts
-the box width to that of the enclosed text, up to the maximum width given.  The
-package also defines some associated length commands.")
+     "@code{pbox} defines a @code{\\pbox} command which adjusts the box width
+to that of the enclosed text, up to the maximum width given.  The package also
+defines some associated length commands.")
     (license license:gpl3+)))
 
+(define-deprecated-package texlive-latex-pbox texlive-pbox)
+
 (define-public texlive-pdfpages
-  (let ((template (simple-texlive-package
-                   "texlive-pdfpages"
-                   (list "doc/latex/pdfpages/"
-                         "source/latex/pdfpages/"
-                         "tex/latex/pdfpages/")
-                   (base32
-                    "0a68vxkygk20fp51fkp7nvs8mc7h6irdvxal8qsnn9zrgr965d76"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/pdfpages")
-         ((#:build-targets _ '())
-          #~(list "pdfpages.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/pdfpages")))
-              (replace 'copy-files
-                (lambda _
-                  (let ((origin #$(package-source this-package))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (propagated-inputs
-       (list texlive-tools texlive-oberdiek texlive-graphics texlive-eso-pic))
-      (home-page "https://ctan.org/macros/latex/contrib/pdfpages")
-      (synopsis "Include PDF documents in LaTeX")
-      (description
-       "This package simplifies the inclusion of external multi-page PDF
+  (package
+    (name "texlive-pdfpages")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pdfpages/" "source/latex/pdfpages/"
+                   "tex/latex/pdfpages/")
+             (base32
+              "0ihihrrim9fwmgkmrqxmss4wjcv8mv1gr2cpigihlzl6q6iqggjx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs
+     (list texlive-eso-pic texlive-graphics texlive-oberdiek texlive-tools))
+    (home-page "https://ctan.org/pkg/pdfpages")
+    (synopsis "Include PDF documents in LaTeX")
+    (description
+     "This package simplifies the inclusion of external multi-page PDF
 documents in LaTeX documents.  Pages may be freely selected and it is possible
 to put several logical pages onto each sheet of paper.  Furthermore a lot of
 hypertext features like hyperlinks and article threads are provided.  The
 package supports pdfTeX (pdfLaTeX) and VTeX.  With VTeX it is even possible to
 use this package to insert PostScript files, in addition to PDF files.")
-      (license license:lppl1.3+))))
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-latex-pdfpages texlive-pdfpages)
 
 (define-public texlive-stix2-otf
-  (let ((base (simple-texlive-package
-               "texlive-stix2-otf"
-               (list "/doc/fonts/stix2-otf/"
-                     "/fonts/opentype/public/stix2-otf/")
-               (base32 "0i7rd1wn5jgm3gbi779gy78apz63w034ck4pn73xw6s10zgjzmgl")
-               ;; Building these fonts requires FontLab, which is nonfree.
-               #:trivial? #t)))
-    (package
-      (inherit base)
-      (arguments
-       (substitute-keyword-arguments (package-arguments base)
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'install 'symlink-fonts-to-system-fonts-prefix
-                ;; This is so that fontconfig can locate the fonts, such as
-                ;; when using xetex or xelatex.
-                (lambda _
-                  (let ((system-fonts-prefix (string-append #$output
-                                                            "/share/fonts")))
-                    (mkdir-p system-fonts-prefix)
-                    (symlink (string-append
-                              #$output "/share/texmf-dist/fonts/opentype"
-                              "/public/stix2-otf")
-                             (string-append system-fonts-prefix
-                                            "/stix2-otf")))))))))
-      (home-page "https://www.stixfonts.org/")
-      (synopsis "OpenType Unicode text and maths fonts")
-      (description "The Scientific and Technical Information eXchange (STIX)
-fonts are intended to satisfy the demanding needs of authors, publishers,
-printers, and others working in the scientific, medical, and technical fields.
-They combine a comprehensive Unicode-based collection of mathematical symbols
-and alphabets with a set of text faces suitable for professional publishing.")
-      (license license:silofl1.1))))
-
-(define-public texlive-latex-sidecap
-  (package
-    (inherit (simple-texlive-package
-              "texlive-latex-sidecap"
-              (list "doc/latex/sidecap/"
-                    "tex/latex/sidecap/")
-              (base32 "1biyxvh7fm70pq1rxqrla2vs013bpsd1j8jvlyl3vjg433d5bly3")
-              #:trivial? #t))
+  (package
+    (name "texlive-stix2-otf")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/stix2-otf/"
+                   "fonts/opentype/public/stix2-otf/")
+             (base32
+              "05xqlg61rkfky34x7mc92203z440kanr7bwpmw1djq2y36ql3p1l")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/stix2-otf")
+    (synopsis "OpenType Unicode text and maths fonts")
+    (description
+     "The Scientific and Technical Information eXchange (STIX) fonts are
+intended to satisfy the demanding needs of authors, publishers, printers, and
+others working in the scientific, medical, and technical fields.  They combine
+a comprehensive Unicode-based collection of mathematical symbols and alphabets
+with a set of text faces suitable for professional publishing.")
+    (license license:silofl1.1)))
+
+(define-public texlive-sidecap
+  (package
+    (name "texlive-sidecap")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/sidecap/" "source/latex/sidecap/"
+                   "tex/latex/sidecap/")
+             (base32
+              "1h4ysw90dpvnj0x1j9krx40078kyzzs4ynpjz7y50v9hwrrrynjk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs
+     (list texlive-ragged2e))
     (home-page "https://ctan.org/pkg/sidecap")
     (synopsis "Typeset captions sideways")
     (description
-     "@code{sidecap} defines environments called @code{SCfigure} and
-@code{SCtable} (analogous to @code{figure} and @code{table}) to typeset
+     "The @code{sidecap} package defines environments called @code{SCfigure}
+and @code{SCtable} (analogous to @code{figure} and @code{table}) to typeset
 captions sideways.  Options include @code{outercaption}, @code{innercaption},
 @code{leftcaption} and @code{rightcaption}.")
     (license license:lppl1.0+)))
 
+(define-deprecated-package texlive-latex-sidecap texlive-sidecap)
+
 (define-public texlive-stmaryrd
-  (let ((template (simple-texlive-package
-                   "texlive-stmaryrd"
-                   (list "/fonts/afm/public/stmaryrd/"
-                         "/fonts/map/dvips/stmaryrd/"
-                         "/fonts/source/public/stmaryrd/"
-                         "/fonts/tfm/public/stmaryrd/"
-                         "/fonts/type1/public/stmaryrd/"
-                         "/source/fonts/stmaryrd/"
-                         "/doc/fonts/stmaryrd/")
-                   (base32
-                    "0yn0yl6x1z9ab5gb56lhvkqabd2agz3ggxifwxkiysrj5780j29z"))))
-    (package
-      (inherit template)
-      (arguments (substitute-keyword-arguments (package-arguments template)
-                   ((#:tex-directory _ #t)
-                    "latex/stmaryrd")
-                   ((#:phases phases)
-                    `(modify-phases ,phases
-                       (add-after 'unpack 'chdir
-                         (lambda _
-                           (chdir "source/fonts/stmaryrd")
-                           #t))
-                       (add-after 'chdir 'patch-ins
-                         (lambda _
-                           (substitute* "stmaryrd.ins"
-                             (("^%% LaTeX2e.*") "\\input docstrip\n")
-                             (("fontdef\\}\\}" line)
-                              (string-append line "\n\\endbatchfile")))
-                           #t))
-                       (add-before 'copy-files 'unchdir
-                         (lambda _
-                           (chdir "../../..")))
-                       (add-after 'copy-files 'delete-extra-files
-                         (lambda* (#:key outputs #:allow-other-keys)
-                           (delete-file-recursively
-                            (string-append (assoc-ref outputs "out")
-                                           "/share/texmf-dist/source/fonts/stmaryrd/build"))))))))
-      (home-page "https://www.ctan.org/pkg/stmaryrd")
-      (synopsis "St Mary Road symbols for theoretical computer science")
-      (description
-       "The fonts were originally distributed as Metafont sources only, but
+  (package
+    (name "texlive-stmaryrd")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/stmaryrd/"
+                   "fonts/afm/public/stmaryrd/"
+                   "fonts/map/dvips/stmaryrd/"
+                   "fonts/source/public/stmaryrd/"
+                   "fonts/tfm/public/stmaryrd/"
+                   "fonts/type1/public/stmaryrd/"
+                   "source/fonts/stmaryrd/"
+                   "tex/latex/stmaryrd/")
+             (base32
+              "0ljrxbf2p301p4cmadf2w0qb5idvgmx4j6y3kq7qg2v8x4maqqj4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-ins
+            (lambda _
+              (substitute* "source/fonts/stmaryrd/stmaryrd.ins"
+                (("^%% LaTeX2e.*") "\\input docstrip\n")
+                (("fontdef\\}\\}" line)
+                 (string-append line "\n\\endbatchfile"))))))))
+    (native-inputs (list texlive-cm texlive-metafont))
+    (home-page "https://ctan.org/pkg/stmaryrd")
+    (synopsis "St Mary Road symbols for theoretical computer science")
+    (description
+     "The fonts were originally distributed as Metafont sources only, but
 Adobe Type 1 versions are also now available.  Macro support is provided for
 use under LaTeX; the package supports the @code{only} option (provided by the
 @code{somedefs} package) to restrict what is loaded, for those who don't need
 the whole font.")
-      (license license:lppl))))
+    (license license:lppl)))
 
 (define-deprecated-package texlive-fonts-stmaryrd texlive-stmaryrd)
 
+(define-public texlive-subfig
+  (package
+    (name "texlive-subfig")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/subfig/" "source/latex/subfig/"
+                   "tex/latex/subfig/")
+             (base32
+              "0bq1328pb1ak91j7q8n1kh2fncr742lvff7apgf8kkxzxjfg2z9r")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
+    (home-page "https://ctan.org/pkg/subfig")
+    (synopsis "Figures broken into subfigures")
+    (description
+     "The package provides support for the manipulation and reference of small
+or sub figures and tables within a single figure or table environment.  It is
+convenient to use this package when your subfigures are to be separately
+captioned, referenced, or are to be included in the List-of-Figures.  A new
+@code{\\subfigure} command is introduced which can be used inside a figure
+environment for each subfigure.  An optional first argument is used as the
+caption for that subfigure.")
+    (license license:lppl)))
+
 (define-public texlive-subfigure
-  (let ((template (simple-texlive-package
-                   "texlive-subfigure"
-                   (list "doc/latex/subfigure/"
-                         "source/latex/subfigure/"
-                         "tex/latex/subfigure/")
-                   (base32
-                    "1327ygajf6gza5msvhfjjnk6r3sw7vb7rxg23v4gx4dmyxqfqrbi"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/subfigure")
-         ((#:build-targets _ '())
-          #~(list "subfigure.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/subfigure")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/subfigure")
-      (synopsis "Figures divided into subfigures")
-      (description
+  (package
+    (name "texlive-subfigure")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/subfigure/"
+                   "source/latex/subfigure/"
+                   "tex/latex/subfigure/")
+             (base32
+              "1327ygajf6gza5msvhfjjnk6r3sw7vb7rxg23v4gx4dmyxqfqrbi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
+    (home-page "https://ctan.org/pkg/subfigure")
+    (synopsis "Deprecated: Figures divided into subfigures")
+    (description
        "This (deprecated) package provides support for the manipulation and
-reference of small or \"sub\" figures and tables within a single figure or
-table environment.  It is convenient to use this package when your subfigures
-are to be separately captioned, referenced, or are to be included in the
+reference of small, or sub, figures and tables within a single figure or table
+environment.  It is convenient to use this package when your subfigures are to
+be separately captioned, referenced, or are to be included in the
 List-of-Figures.  A new @code{\\subfigure} command is introduced which can be
 used inside a figure environment for each subfigure.  An optional first
 argument is used as the caption for that subfigure.  The package is now
 considered obsolete: it was superseded by @code{subfig}, but users may find
 the more recent @code{subcaption} package more satisfactory.")
-      (license license:lppl))))
+      (license license:lppl)))
 
 (define-deprecated-package texlive-latex-subfigure texlive-subfigure)
 
-(define-public texlive-latex-tabulary
+(define-public texlive-tabulary
   (package
-    (name "texlive-latex-tabulary")
+    (name "texlive-tabulary")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "tabulary"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1adkdx2zkk42g82nqf57lv1nc1z7kwl13jmy8vpcsizsa0xdnx9n"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tabulary/" "source/latex/tabulary/"
+                   "tex/latex/tabulary/")
+             (base32
+              "00afi9r5264rhfy5kg73fk763i7wm6bvzkmrlg7n17fwl6hx0sa1")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/tabulary"))
-    (home-page "https://www.ctan.org/pkg/tabulary")
+    (home-page "https://ctan.org/pkg/tabulary")
     (synopsis "Tabular with variable width columns balanced")
     (description
      "The package defines a @code{tabular*}-like environment, @code{tabulary},
@@ -7990,33 +18756,21 @@ variable width columns (@code{\\raggedright}, @code{\\centering},
 according to the natural width of the widest cell in the column.")
     (license license:lppl)))
 
-(define-public texlive-latex-threeparttable
+(define-deprecated-package texlive-latex-tabulary texlive-tabulary)
+
+(define-public texlive-threeparttable
   (package
-    (name "texlive-latex-threeparttable")
+    (name "texlive-threeparttable")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/threeparttable"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "10vy9k150w2lviw8h22s2mcykff38xci653m5823s2vv44pwbmzq"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/threeparttable")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/threeparttable")
+    (source (texlive-origin
+             name version
+             (list "doc/latex/threeparttable/"
+                   "tex/latex/threeparttable/")
+             (base32
+              "05i50k1y736m52903nz4kf2xl23w6y7rrzyacs4kgd1w6kmjm6f7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/threeparttable")
     (synopsis "Tables with captions and notes all the same width")
     (description
      "This package facilitates tables with titles (captions) and notes.  The
@@ -8026,24 +18780,51 @@ float, but you can put it in a @code{table} or a @code{table*} or some other
 environment.")
     (license (license:fsf-free "file://threeparttable.sty"))))
 
-(define-public texlive-txfonts
+(define-public texlive-thumbpdf
   (package
-    (inherit (simple-texlive-package
-              "texlive-txfonts"
-              (list "/doc/fonts/txfonts/"
-
-                    "/fonts/afm/public/txfonts/"
-                    "/fonts/tfm/public/txfonts/"
-                    "/fonts/type1/public/txfonts/"
-                    "/fonts/vf/public/txfonts/"
+    (name "texlive-thumbpdf")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/thumbpdf/"
+                   "doc/man/man1/thumbpdf.1"
+                   "doc/man/man1/thumbpdf.man1.pdf"
+                   "scripts/thumbpdf/" "tex/generic/thumbpdf/")
+             (base32
+              "0ya18440rpkav0z1zddzii9jh2swybicj87413l5iin2acrssw42")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "thumbpdf.pl")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/thumbpdf")
+    (synopsis "Thumbnails for pdfTeX and dvips/ps2pdf")
+    (description
+     "This package provides a Perl script that provides support for thumbnails
+in pdfTeX and dvips/ps2pdf.  The script uses Ghostscript to generate the
+thumbnails which get represented in a TeX readable file that is read by the
+package @code{thumbpdf.sty} to automatically include the thumbnails.  This
+arrangement works with both plain TeX and LaTeX.")
+    (license license:lppl1.3+)))
 
-                    "/fonts/map/dvips/txfonts/"
-                    "/fonts/enc/dvips/txfonts/"
-                    "/tex/latex/txfonts/")
-              (base32
-               "017zjas5y1zlyq0iy4x6mv1qbz23xcy3y5xs0crj6zdnfvnccqgp")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/txfonts")
+(define-public texlive-txfonts
+  (package
+    (name "texlive-txfonts")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/txfonts/"
+                   "fonts/afm/public/txfonts/"
+                   "fonts/enc/dvips/txfonts/"
+                   "fonts/map/dvips/txfonts/"
+                   "fonts/tfm/public/txfonts/"
+                   "fonts/type1/public/txfonts/"
+                   "fonts/vf/public/txfonts/"
+                   "tex/latex/txfonts/")
+             (base32
+              "017zjas5y1zlyq0iy4x6mv1qbz23xcy3y5xs0crj6zdnfvnccqgp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/txfonts")
     (synopsis "Times-like fonts in support of mathematics")
     (description
      "Txfonts supplies virtual text roman fonts using Adobe Times (or URW
@@ -8063,39 +18844,48 @@ TeX metrics (VF and TFM files) and macros for use with LaTeX.")
 
 (define-deprecated-package texlive-fonts-txfonts texlive-txfonts)
 
-(define-public texlive-fonts-iwona
+(define-public texlive-typehtml
   (package
-    (name "texlive-fonts-iwona")
-    (version "0.995b")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "http://jmn.pl/pliki/Iwona-tex-"
-                                  (string-map (lambda (c)
-                                                (if (char=? c #\.)
-                                                    #\_ c))
-                                              version)
-                                  ".zip"))
-              (sha256
-               (base32
-                "13684iqx5granpc5rfvqnmyvdpgpbr1x9y7i7y7bcaq0qxv7ph1x"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/"))
-               (unzip  (search-input-file %build-inputs "/bin/unzip")))
-           (invoke unzip (assoc-ref %build-inputs "source"))
-           (mkdir-p target)
-           (copy-recursively "iwona" target)
-           #t))))
-    (native-inputs
-     (list unzip))
-    (home-page "http://jmn.pl/en/kurier-i-iwona/")
+    (name "texlive-typehtml")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/typehtml/"
+                   "source/latex/typehtml/"
+                   "tex/latex/typehtml/")
+             (base32
+              "1nmdh2mhkzdqs5y4k95g9il6vz4rgndzhkikiilknkwg1a04rrzi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/typehtml")
+    (synopsis "Typeset HTML directly from LaTeX")
+    (description
+     "This package typesets HTML directly from LaTeX.  It can handle almost
+all of HTML2, and most of the math fragment of the draft HTML3.")
+    (license license:lppl)))
+
+(define-public texlive-iwona
+  (package
+    (name "texlive-iwona")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/iwona/"
+                   "fonts/afm/nowacki/iwona/"
+                   "fonts/enc/dvips/iwona/"
+                   "fonts/map/dvips/iwona/"
+                   "fonts/opentype/nowacki/iwona/"
+                   "fonts/tfm/nowacki/iwona/"
+                   "fonts/type1/nowacki/iwona/"
+                   "tex/latex/iwona/"
+                   "tex/plain/iwona/")
+             (base32
+              "1gk80zj711rcnk06cvszic7lpm06nj47kbypg13rpijdzfsvmi8m")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/iwona")
     (synopsis "Sans-serif typeface for TeX")
-    (description "Iwona is a two-element sans-serif typeface. It was created
+    (description "Iwona is a two-element sans-serif typeface.  It was created
 as an alternative version of the Kurier typeface, which was designed in 1975
 for a diploma in typeface design at the Warsaw Academy of Fine Arts under the
 supervision of Roman Tomaszewski.  Kurier was designed for linotype
@@ -8104,187 +18894,184 @@ alternative version of the Kurier fonts.  The difference lies in the absence
 of ink traps which typify the Kurier font.")
     (license license:gfl1.0)))
 
-(define-public texlive-jknappen
-  (package
-    (inherit (simple-texlive-package
-              "texlive-jknappen"
-              (list "/fonts/source/jknappen/"
-                    "/fonts/tfm/jknappen/"
-                    "/tex4ht/ht-fonts/alias/jknappen/"
-                    "/tex4ht/ht-fonts/unicode/jknappen/")
-              (base32
-               "0xvy3c845jc7iw1h9rcm1r2yvm1ni1sm9r9k9j2cfc82xy43rwij")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/jknappen")
-    (synopsis "Miscellaneous packages by Jörg Knappen")
-    (description
-     "This package contains a collection of macros by Jörg Knappen:
-@table @code
-@item greekctr
-New counterstyles @code{\\greek} and @code{\\Greek}.
-@item holtpolt
-Non-commutative fractions
-@item latin1jk
-@itemx latin2jk
-@itemx latin3jk
-Inputenc definition files that allow verbatim input in the respective ISO
-Latin codes.
-@item mathbol
-Blackboard bold fonts for use in maths.
-@item mathrsfs
-Mathematical script letters, as traditionally used in physics for Lagrangian,
-Hamiltonian, path integral measures, etc.
-@item parboxx
-New alignment options for parboxen at top and bottom of the box.
-@item sans
-Interchanges the roles of sans serif and roman fonts throughout the document.
-@item semtrans
-Support for special latin letters and diacritics used in transliteration of
-semitic languages
-@item smartmn
-Intelligent hyphen/minus, which guesses whether to render as hyphen or minus.
-@item sgmlcmpt
-Commands replacing the characters <, >, and &.
-@item tccompat
-A compatibility package for users of the older versions of the textcomp package.
-@item young
-Simple Young tableaux.
-@end table")
-    (license license:gpl2)))                    ;per the 00readme_txt file.
+(define-deprecated-package texlive-fonts-iwona texlive-iwona)
 
 (define-public texlive-jadetex
-  (let ((template (simple-texlive-package
-                   "texlive-jadetex"
-                   (list "/doc/man/man1/jadetex.1"
-                         "/doc/man/man1/jadetex.man1.pdf"
-                         "/doc/man/man1/pdfjadetex.1"
-                         "/doc/man/man1/pdfjadetex.man1.pdf"
-                         "/source/jadetex/base/"
-                         ;; The following files are not generated from
-                         ;; sources.
-                         "/tex/jadetex/base/jadetex.ini"
-                         "/tex/jadetex/base/pdfjadetex.ini"
-                         "/tex/jadetex/base/uentities.sty")
-                   (base32
-                    "03chyc3vjqgxcj985gy4k0bd0lf1n4a6sgbhc7k84jparjk3hx4i"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "jadetex/base")
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'unify-source-directory
-               (lambda _
-                 (chdir "source/jadetex/base")
-                 (for-each (lambda (f)
-                             (copy-file f (basename f)))
-                           (find-files "../../../tex/jadetex/base"))
-                 #t))
-             (add-after 'build 'generate-formats
-               (lambda* (#:key inputs #:allow-other-keys)
-                 (mkdir "web2c")
-                 (for-each (lambda (f)
-                             (symlink f (basename f)))
-                           (find-files "build"))
-                 (invoke "fmtutil-sys" "--byfmt" "jadetex"
-                         "--fmtdir=web2c")
-                 (invoke "fmtutil-sys" "--byfmt" "pdfjadetex"
-                         "--fmtdir=web2c")))
-             (add-after 'install 'install-formats-and-wrappers
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (let* ((out (assoc-ref outputs "out"))
-                        (texlive-bin (assoc-ref inputs "texlive-bin"))
-                        (pdftex (string-append texlive-bin "/bin/pdftex"))
-                        (web2c (string-append out "/share/texmf-dist/web2c")))
-                   (mkdir-p web2c)
-                   (copy-recursively "web2c" web2c)
-                   ;; Create convenience command wrappers.
-                   (mkdir-p (string-append out "/bin"))
-                   (symlink pdftex (string-append out "/bin/jadetex"))
-                   (symlink pdftex (string-append out "/bin/pdfjadetex"))
-                   #t)))))))
-      (propagated-inputs
-       ;; Propagate the texlive-updmap.cfg input used by xmltex, which provides the
-       ;; required fonts for its use.
-       (list texlive-xmltex texlive-kpathsea)) ;for fmtutil.cnf template
-      (native-inputs
-       (list texlive-cm ;for cmex10 and others
-             texlive-fonts-latex ;for lasy6
-             ;; The t1cmr.fd file of texlive-latex-base refers to the ecrm font,
-             ;; provided by the jknappen package collection.
-             texlive-jknappen
-             texlive-hyperref
-             texlive-latex-colortbl
-             texlive-fancyhdr
-             texlive-graphics ;for color.sty
-             texlive-tools ;for array.sty
-             texlive-marvosym
-             texlive-tex-ini-files ;for pdftexconfig
-             texlive-ulem))
-      (home-page "https://www.ctan.org/pkg/jadetex/")
-      (synopsis "TeX macros to produce TeX output using OpenJade")
-      (description "JadeTeX is a companion package to the OpenJade DSSSL
+  (package
+    (name "texlive-jadetex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/jadetex.1"
+                   "doc/man/man1/jadetex.man1.pdf"
+                   "doc/man/man1/pdfjadetex.1"
+                   "doc/man/man1/pdfjadetex.man1.pdf"
+                   "doc/otherformats/jadetex/base/"
+                   "source/jadetex/base/"
+                   "tex/jadetex/base/")
+             (base32
+              "0acan496ixymwjvygcd5rx5pmz4p5vffzkmazdryw1kpilhiixcx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:create-formats #~(list "jadetex" "pdfjadetex")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'install-wrappers
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((pdftex (search-input-file inputs "/bin/pdftex"))
+                    (web2c (string-append #$output "/share/texmf-dist/web2c")))
+                (mkdir-p (string-append #$output "/bin"))
+                (symlink pdftex
+                         (string-append #$output "/bin/jadetex"))
+                (symlink pdftex
+                         (string-append #$output "/bin/pdfjadetex"))))))))
+    (propagated-inputs
+     (list texlive-amsfonts
+           texlive-atbegshi
+           texlive-atveryend
+           texlive-auxhook
+           texlive-babel
+           texlive-bigintcalc
+           texlive-bitset
+           texlive-cm
+           texlive-colortbl
+           texlive-cyrillic
+           texlive-ec
+           texlive-etexcmds
+           texlive-everyshi
+           texlive-fancyhdr
+           texlive-firstaid
+           texlive-graphics
+           texlive-graphics-cfg
+           texlive-graphics-def
+           texlive-hycolor
+           texlive-hyperref
+           texlive-hyphen-complete
+           texlive-iftex
+           texlive-infwarerr
+           texlive-intcalc
+           texlive-kvdefinekeys
+           texlive-kvoptions
+           texlive-kvsetkeys
+           texlive-l3backend
+           texlive-l3kernel
+           texlive-l3packages
+           texlive-latex
+           texlive-latex-fonts
+           texlive-latexconfig
+           texlive-letltxmacro
+           texlive-ltxcmds
+           texlive-marvosym
+           texlive-passivetex
+           texlive-pdfescape
+           texlive-pdftex
+           texlive-pdftexcmds
+           texlive-psnfss
+           texlive-rerunfilecheck
+           texlive-stmaryrd
+           texlive-symbol
+           texlive-tex
+           texlive-tex-ini-files
+           texlive-tipa
+           texlive-tools
+           texlive-ulem
+           texlive-unicode-data
+           texlive-uniquecounter
+           texlive-url
+           texlive-wasysym
+           texlive-zapfding))
+    (home-page "https://www.ctan.org/pkg/jadetex/")
+    (synopsis "TeX macros to produce TeX output using OpenJade")
+    (description "JadeTeX is a companion package to the OpenJade DSSSL
 processor.  OpenJade applies a DSSSL stylesheet to an SGML or XML document.
 The output of this process can be in a number of forms, including a set of
 high level LaTeX macros.  It is the task of the JadeTeX package to transform
 these macros into DVI/PostScript (using the @command{jadetex} command) or
 Portable Document Format (PDF) form (using the @command{pdfjadetex}
 command).")
-      ;; The license text is found at the header of the jadetex.dtx file.
-      (license license:expat))))
+    ;; The license text is found at the header of the jadetex.dtx file.
+    (license license:expat)))
 
 (define-public texlive-libertine
   (package
-    (inherit (simple-texlive-package
-              "texlive-libertine"
-              (list "/doc/fonts/libertine/"
-
-                    "/fonts/enc/dvips/libertine/"
-                    "/fonts/map/dvips/libertine/"
-                    "/fonts/opentype/public/libertine/"
-                    "/fonts/tfm/public/libertine/"
-                    "/fonts/type1/public/libertine/"
-                    "/fonts/vf/public/libertine/"
-
-                    "/tex/latex/libertine/")
-              (base32
-               "1d5r80isyvs2v3i8pzlhsn7ns6bn8ldkbs82g25widraixlhg6yg")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/libertine")
-    (synopsis "Use Linux Libertine and Biolinum fonts with LaTeX")
+    (name "texlive-libertine")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/libertine/"
+                   "fonts/enc/dvips/libertine/"
+                   "fonts/map/dvips/libertine/"
+                   "fonts/opentype/public/libertine/"
+                   "fonts/tfm/public/libertine/"
+                   "fonts/type1/public/libertine/"
+                   "fonts/vf/public/libertine/"
+                   "tex/latex/libertine/")
+             (base32
+              "04bb0v1fp9adcgx6s4zc0fs5z4f85ihbhbkk9zf5pf0ni3gy70fd")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs
+     (list texlive-fontaxes
+           texlive-iftex
+           texlive-mweights
+           texlive-xkeyval))
+    (home-page "https://ctan.org/pkg/libertine")
+    (synopsis "Use of Linux Libertine and Biolinum fonts with LaTeX")
     (description
      "The package provides the Libertine and Biolinum fonts in both Type 1 and
 OTF styles, together with support macros for their use.  Monospaced and
-display fonts, and the \"keyboard\" set are also included, in OTF style, only.
-The @code{mweights} package is used to manage the selection of font weights.
-The package supersedes both the @code{libertineotf} and the
-@code{libertine-legacy} packages.")
+display fonts, and the keyboard set are also included, in OTF style, only.
+The @code{mweights} package is used to manage the selection of font weights.")
     (license (list license:gpl2+        ; with font exception
                    license:silofl1.1
                    license:lppl))))
 
-(define-public texlive-dejavu
+(define-public texlive-librarian
   (package
-    (inherit (simple-texlive-package
-              "texlive-dejavu"
-              (list "/doc/fonts/dejavu/"
-
-                    "/fonts/enc/dvips/dejavu/"
-                    "/fonts/map/dvips/dejavu/"
-
-                    "/fonts/afm/public/dejavu/"
-                    "/fonts/tfm/public/dejavu/"
-                    "/fonts/truetype/public/dejavu/"
-                    "/fonts/type1/public/dejavu/"
-                    "/fonts/vf/public/dejavu/"
+    (name "texlive-librarian")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/librarian/"
+                   "tex/generic/librarian/")
+             (base32
+              "1a40ac9vg2niafg6dd2iv0c5nrxqxz8vhh2awdw756xsd0znb5n0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/librarian")
+    (synopsis "Tools to create bibliographies in TeX")
+    (description
+     "The package extracts information in @file{.bib} files, makes it
+available in the current document, and sorts lists of entries according to
+that information and the user's specifications.  Citation and bibliography
+styles can then be written directly in TeX, without any use of BibTeX.  The
+package works with all formats that use plain TeX's basic syntactic sugar; the
+distribution includes a third-party file for ConTeXt and a style file for
+LaTeX.")
+    (license license:lppl)))
 
-                    "/tex/latex/dejavu/")
-              (base32
-               "0y4qf5jl0xncah9nkcaalmy69wwq02n3j895zp71n2p0nfi24aka")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/libertine")
+(define-public texlive-dejavu
+  (package
+    (name "texlive-dejavu")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/dejavu/"
+                   "fonts/afm/public/dejavu/"
+                   "fonts/enc/dvips/dejavu/"
+                   "fonts/map/dvips/dejavu/"
+                   "fonts/tfm/public/dejavu/"
+                   "fonts/truetype/public/dejavu/"
+                   "fonts/type1/public/dejavu/"
+                   "fonts/vf/public/dejavu/"
+                   "tex/latex/dejavu/")
+             (base32
+              "0y4qf5jl0xncah9nkcaalmy69wwq02n3j895zp71n2p0nfi24aka")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dejavu")
     (synopsis "LaTeX support for the DejaVu fonts")
     (description
      "The package contains LaTeX support for the DejaVu fonts, which are
@@ -8296,13 +19083,16 @@ LGR.  The package doesn't (currently) support mathematics.")
 
 (define-public texlive-titlesec
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-titlesec"
-      (list "doc/latex/titlesec/" "tex/latex/titlesec/")
-      (base32 "01nwh4p15xblc3kgivjliihy9kr8yr2cqsf9wn2iwqv1njx0i2zw")
-      #:trivial? #t))
-    (home-page "https://ctan.org/macros/latex/contrib/titlesec")
+    (name "texlive-titlesec")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/titlesec/" "tex/latex/titlesec/")
+             (base32
+              "0331f6f6sv6sfn4dx7qhx2fgnj9lf3hgbqkh603paqpknfmfjyfm")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/titlesec")
     (synopsis "Select alternative section titles")
     (description
      "This package provides an interface to sectioning commands for selection
@@ -8310,81 +19100,70 @@ from various title styles, e.g. for marginal titles and to change the font of
 all headings with a single command, also providing simple one-step page
 styles.  It also includes a package to change the page styles when there are
 floats in a page.  You may assign headers/footers to individual floats, too.")
-    (license license:lppl)))
+    (license license:expat)))
 
 (define-deprecated-package texlive-latex-titlesec texlive-titlesec)
 
-(define-public texlive-latex-type1cm
+(define-public texlive-type1cm
   (package
-    (name "texlive-latex-type1cm")
+    (name "texlive-type1cm")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "type1cm"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1lvxrqfwcwa4p31zyfm80gr05v8c28xybv5ri79zi2ngz6834z12"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/type1cm/" "source/latex/type1cm/"
+                   "tex/latex/type1cm/")
+             (base32
+              "1922af5xvhrh4l8rqwz3bjd1gqvzfkxrfim28rpnvbx4n7jl6sdh")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/type1cm"))
-    (home-page "https://www.ctan.org/pkg/type1cm")
+    (home-page "https://ctan.org/pkg/type1cm")
     (synopsis "Arbitrary size font selection in LaTeX")
     (description
      "LaTeX, by default, restricts the sizes at which you can use its default
 computer modern fonts, to a fixed set of discrete sizes (effectively, a set
 specified by Knuth).  The @code{type1cm} package removes this restriction;
-this is particularly useful when using scalable versions of the CM
+this is particularly useful when using scalable versions of the @code{cm}
 fonts (Bakoma, or the versions from BSR/Y&Y, or True Type versions from Kinch,
-PCTeX, etc.).  In fact, since modern distributions will automatically generate
-any bitmap font you might need, @code{type1cm} has wider application than just
-those using scalable versions of the fonts.  Note that the LaTeX distribution
-now contains a package @code{fix-cm},f which performs the task of
-@code{type1cm}, as well as doing the same job for T1- and TS1-encoded
-@code{ec} fonts.")
+PCTeX, etc.).  Note that the LaTeX distribution now contains a package
+@code{fix-cm}, which performs the task of @code{type1cm}, as well as doing the
+same job for T1- and TS1-encoded @code{ec} fonts.")
     (license license:lppl)))
 
+(define-deprecated-package texlive-latex-type1cm texlive-type1cm)
+
 (define-public texlive-lh
-  (let ((template (simple-texlive-package
-                   "texlive-lh"
-                   (list "/doc/fonts/lh/"
-                         "/source/fonts/lh/"
-                         "/source/latex/lh/"
-                         "/fonts/source/lh/"
-                         "/tex/plain/lh/")
-                   (base32
-                    "0vw75i52asi5sssp8k9r8dy4ihvqbvmbsl3dini3ls8cky15lz37"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "latex/lh")
-         ((#:build-targets _ '())
-          ''("nfssfox.ins" "lcyfonts.ins" "ot2fonts.ins" "t2ccfonts.ins"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/lh")))
-             (replace 'copy-files
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (let* ((source (assoc-ref inputs "source"))
-                        (doc (string-append (assoc-ref outputs "doc")
-                                           "/share/texmf-dist/doc"))
-                        (target (string-append (assoc-ref outputs "out")
-                                               "/share/texmf-dist"))
-                        (tex (string-append target "/tex/latex/lh/")))
-                   (copy-recursively "build/" tex)
-                   (copy-recursively (string-append source "/fonts/source/lh")
-                                     (string-append target "/fonts/source/lh"))
-                   (copy-recursively (string-append source "/tex/plain/lh")
-                                     (string-append target "/tex/plain/lh"))
-                   (copy-recursively (string-append source "/doc")
-                                     doc))))))))
-      (home-page "https://www.ctan.org/pkg/lh")
-      (synopsis "Cyrillic fonts that support LaTeX standard encodings")
-      (description
-       "The LH fonts address the problem of the wide variety of alphabets that
+  (package
+    (name "texlive-lh")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/lh/"
+                   "fonts/source/lh/base/"
+                   "fonts/source/lh/lh-XSlav/"
+                   "fonts/source/lh/lh-conc/"
+                   "fonts/source/lh/lh-lcy/"
+                   "fonts/source/lh/lh-ot2/"
+                   "fonts/source/lh/lh-t2a/"
+                   "fonts/source/lh/lh-t2b/"
+                   "fonts/source/lh/lh-t2c/"
+                   "fonts/source/lh/lh-t2d/"
+                   "fonts/source/lh/lh-x2/"
+                   "fonts/source/lh/nont2/"
+                   "fonts/source/lh/specific/"
+                   "source/fonts/lh/"
+                   "source/latex/lh/"
+                   "tex/latex/lh/"
+                   "tex/plain/lh/")
+             (base32
+              "0cqwns4zy1847fn3dp8z3wbfpy4dl05cr065nk9k65fmp7wksnjk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-cm texlive-ec texlive-metafont))
+    (propagated-inputs (list texlive-ec))
+    (home-page "https://ctan.org/pkg/lh")
+    (synopsis "Cyrillic fonts that support LaTeX standard encodings")
+    (description
+     "The LH fonts address the problem of the wide variety of alphabets that
 are written with Cyrillic-style characters.  The fonts are the original basis
 of the set of T2* and X2 encodings that are now used when LaTeX users need to
 write in Cyrillic languages.  Macro support in standard LaTeX encodings is
@@ -8393,33 +19172,37 @@ offers support for other (more traditional) encodings.  The fonts, in the
 standard T2* and X2 encodings are available in Adobe Type 1 format, in the
 CM-Super family of fonts.  The package also offers its own LaTeX support for
 OT2 encoded fonts, CM bright shaped fonts and Concrete shaped fonts.")
-      (license license:lppl))))
+    (license license:lppl)))
 
 (define-deprecated-package texlive-latex-lh texlive-lh)
 
 (define-public texlive-marvosym
   (package
-    (inherit (simple-texlive-package
-              "texlive-marvosym"
-              (list "/doc/fonts/marvosym/"
-                    "/fonts/afm/public/marvosym/"
-                    "/fonts/map/dvips/marvosym/"
-                    "/fonts/tfm/public/marvosym/"
-                    "/fonts/truetype/public/marvosym/"
-                    "/fonts/type1/public/marvosym/"
-                    "/tex/latex/marvosym/")
-              (base32
-               "0m3bbg06cia8ni86fjhvb7x4a5qcxgnpqcvicfms91w2px9ysc46")
-              #:trivial? #t))
-    (home-page "https://martinvogel.de/blog/index.php?\
-/archives/131-Marvosym.ttf.html")
+    (name "texlive-marvosym")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/marvosym/"
+                   "fonts/afm/public/marvosym/"
+                   "fonts/map/dvips/marvosym/"
+                   "fonts/tfm/public/marvosym/"
+                   "fonts/truetype/public/marvosym/"
+                   "fonts/type1/public/marvosym/"
+                   "source/fonts/marvosym/"
+                   "tex/latex/marvosym/")
+             (base32
+              "16s5ibpw6c9d3vzc82hfn90dg643xlracivikdbr9s43f2ayak41")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/marvosym")
     (synopsis "Martin Vogel's Symbols (marvosym) font")
-    (description "The Martin Vogel’s Symbols fonts (marvosym) contains the
-Euro currency symbol as defined by the European commission, along with symbols
-for structural engineering, symbols for steel cross-sections, astronomy
-signs (sun, moon, planets), the 12 signs of the zodiac, scissor symbols, CE
-sign and others.  This package contains both the original TrueType font and
-the derived Type 1 font, together with support files for TeX (LaTeX).")
+    (description
+     "Martin Vogel's Symbol font (marvosym) contains the Euro currency symbol
+as defined by the European commission, along with symbols for structural
+engineering; symbols for steel cross-sections; astronomy signs (sun, moon,
+planets); the 12 signs of the zodiac; scissor symbols; CE sign and others.
+The package contains both the original TrueType font and the derived Type
+1 font, together with support files for TeX (LaTeX).")
     (license (list license:lppl          ;for TeX support files
                    license:silofl1.1)))) ;for fonts
 
@@ -8427,29 +19210,29 @@ the derived Type 1 font, together with support files for TeX (LaTeX).")
   (package
     (name "texlive-metapost")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/metapost"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "140k9dz2g2vj5ypgyqx3px9c1y9a820y8kq139p96lw0yk6839aw"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/metapost")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/metapost")
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/dvitomp.1"
+                   "doc/man/man1/dvitomp.man1.pdf"
+                   "doc/man/man1/mpost.1"
+                   "doc/man/man1/mpost.man1.pdf"
+                   "doc/metapost/base/"
+                   "fonts/afm/metapost/"
+                   "fonts/enc/dvips/metapost/"
+                   "fonts/map/dvips/metapost/"
+                   "fonts/tfm/metapost/"
+                   "fonts/type1/metapost/"
+                   "metapost/base/"
+                   "metapost/config/"
+                   "metapost/misc/"
+                   "metapost/support/charlib/"
+                   "tex/generic/metapost/")
+             (base32
+              "0i6mjq59n7vll81m7r2k83x0q6xx7cg6qcia46298zqc0b0l3qb0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-kpathsea))
+    (home-page "https://ctan.org/pkg/metapost")
     (synopsis "Create scalable illustrations")
     (description
      "MetaPost uses a language based on that of Metafont to produce precise
@@ -8457,126 +19240,146 @@ technical illustrations.  Its output is scalable PostScript or SVG, rather
 than the bitmaps Metafont creates.")
     (license license:lppl)))
 
-(define-public texlive-latex-acmart
+(define-public texlive-acmart
   (package
-    (name "texlive-latex-acmart")
-    (version "1.60")
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "acmart"))
-              (sha256
-               (base32
-                "12wxav9r6v7dlfja9myrwz7famgfpcfwd292qzmgg283xgngh9kd"))
-              (file-name (string-append name "-" version "-checkout"))))
+    (name "texlive-acmart")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bst/acmart/" "doc/latex/acmart/"
+                   "source/latex/acmart/" "tex/latex/acmart/")
+             (base32
+              "0g27q3r7w83347az77d64xbcxzr9rl64a2qq8l0xs6drfpsq0llb")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/acmart"))
-    (home-page "https://www.ctan.org/pkg/acmart")
+    (home-page "https://ctan.org/pkg/acmart")
     (synopsis "Class for typesetting publications of ACM")
     (description
      "This package provides a class for typesetting publications of the
 Association for Computing Machinery (ACM).")
     (license license:lppl1.3+)))
 
-(define-public texlive-latex-varwidth
-  (package
-    (name "texlive-latex-varwidth")
-    (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/varwidth"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1bmz9ap0ffyg7qry2xi7lki06qx4809w028xvk88cl66h7p46g52"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/varwidth")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/varwidth")
-    (synopsis "Variable-width minipage")
-    (description
-     "The @code{varwidth} environment is superficially similar to
-@code{minipage}, but the specified width is just a maximum value — the box may
-get a narrower “natural” width.")
-    (license license:lppl)))
+(define-deprecated-package texlive-latex-acmart texlive-acmart)
 
 (define-public texlive-varwidth
   (package
-    (inherit (simple-texlive-package
-              "texlive-varwidth"
-              (list "doc/latex/varwidth/" "tex/latex/varwidth/")
-              (base32 "0jcrv4klcjpl17ml0zyqfvkrq6qwn2imxv8syqs5m6qk0fk7hg6l")
-              #:trivial? #t))
-    (home-page "https://ctan.org/macros/latex/contrib/varwidth")
-    (synopsis "Variable-width minipage LaTeX environment")
+    (name "texlive-varwidth")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/varwidth/" "tex/latex/varwidth/")
+             (base32
+              "0jcrv4klcjpl17ml0zyqfvkrq6qwn2imxv8syqs5m6qk0fk7hg6l")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/varwidth")
+    (synopsis "Variable-width @code{minipage}")
     (description
-     "The varwidth environment is superficially similar to minipage, but the
-specified width is just a maximum value --- the box may get a narrower natural
-width.")
+     "The @code{varwidth} environment is superficially similar to @code{minipage},
+but the specified width is just a maximum value -- the box may get a narrower
+natural width.")
     (license license:lppl)))
 
+(define-deprecated-package texlive-latex-varwidth texlive-varwidth)
+
 (define-public texlive-wasy
   (package
-    (inherit (simple-texlive-package
-              "texlive-wasy"
-              (list "/fonts/source/public/wasy/"
-                    "/fonts/tfm/public/wasy/"
-                    "/tex/plain/wasy/"
-                    "/doc/fonts/wasy/")
-              (base32
-               "1swzxgld3lndi5q0q6zkwbw06ndh13fvp04as7zpwyhh646s0hbx")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/wasy")
+    (name "texlive-wasy")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/wasy/" "fonts/source/public/wasy/"
+                   "fonts/tfm/public/wasy/" "tex/plain/wasy/")
+             (base32
+              "1swzxgld3lndi5q0q6zkwbw06ndh13fvp04as7zpwyhh646s0hbx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-cm texlive-metafont))
+    (home-page "https://ctan.org/pkg/wasy")
     (synopsis "Waldi symbol fonts")
     (description "This package provides the @code{wasy} (Waldi symbol) fonts,
 in the Metafont and Adobe Type 1 formats.  Support under LaTeX is provided by
 the @code{wasysym} package.")
     (license license:public-domain)))
 
+(define-public texlive-wasy-type1
+  (package
+    (name "texlive-wasy-type1")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/wasy-type1/"
+                   "fonts/afm/public/wasy-type1/"
+                   "fonts/map/dvips/wasy-type1/"
+                   "fonts/type1/public/wasy-type1/")
+             (base32
+              "01xwryijs787ab4ayfsj44ylf72s0zkm49zm0yk4ghs4vck2qvq3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-wasy))
+    (home-page "https://ctan.org/pkg/wasy-type1")
+    (synopsis "Type 1 versions of @code{wasy} fonts")
+    (description
+     "This package provides converted (Adobe Type 1) outlines of the
+@code{wasy} fonts.")
+    (license license:public-domain)))
+
 (define-public texlive-wasysym
   (package
     (name "texlive-wasysym")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "wasysym"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0zxcf0pfqf439cfwl0r5dd93b0v4pbiih36n2pwshdlvnmy0nr50"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/wasysym/" "source/latex/wasysym/"
+                   "tex/latex/wasysym/")
+             (base32
+              "1n0rrrh510hy04a4fkxqh7skwfhp3xiiji78cw3mc65g06h1jyjc")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/wasysym"))
-    (home-page "https://www.ctan.org/pkg/wasysym")
-    (synopsis "LaTeX support file to use the @code{wasy} fonts")
+    (home-page "https://ctan.org/pkg/wasysym")
+    (synopsis "LaTeX support for the @code{wasy} fonts")
     (description
-     "The @code{wasy} (Waldi Symbol) font by Roland Waldi provides many glyphs like
-male and female symbols and astronomical symbols, as well as the complete
+     "The @code{wasy} (Waldi Symbol) font by Roland Waldi provides many glyphs
+like male and female symbols and astronomical symbols, as well as the complete
 @code{lasy} font set and other odds and ends.  The @code{wasysym} package
 implements an easy to use interface for these symbols.")
-    (license license:lppl)))
+    (license license:lppl1.3c)))
 
 (define-deprecated-package texlive-latex-wasysym texlive-wasysym)
 
+(define-public texlive-willowtreebook
+  (package
+    (name "texlive-willowtreebook")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/willowtreebook/"
+                   "tex/latex/willowtreebook/")
+             (base32
+              "1rv6pmyl02fpysviz4mvz9az9bgk96p6s7mbi9ykxxp74xzh8jik")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/willowtreebook")
+    (synopsis "Easy basic book class, built on @code{memoir}")
+    (description
+     "The @code{willowtreebook} class is a simple book class, which the author
+uses for his lecture notes to be found on his web page Benjamin McKay.  It
+actually just selects options for the more sophisticated @code{memoir}
+class.")
+    (license license:lppl1.3c)))
+
 (define-public texlive-wrapfig
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-wrapfig"
-      (list "doc/latex/wrapfig/" "tex/latex/wrapfig/")
-      (base32 "0wk1vp0dqsp597xzsqbwj8xk80v7d77qmpjir84n54f920rf9ka9")
-      #:trivial? #t))
-    (home-page "https://ctan.org/macros/latex/contrib/wrapfig")
+    (name "texlive-wrapfig")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/wrapfig/" "tex/latex/wrapfig/")
+             (base32
+              "0wk1vp0dqsp597xzsqbwj8xk80v7d77qmpjir84n54f920rf9ka9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/wrapfig")
     (synopsis "Produces figures which text can flow around")
     (description
      "This package allows figures or tables to have text wrapped around them.
@@ -8586,67 +19389,68 @@ It does not work in combination with list environments, but can be used in a
 
 (define-deprecated-package texlive-latex-wrapfig texlive-wrapfig)
 
-(define-public texlive-latex-ucs
+(define-public texlive-ucharcat
   (package
-    (name "texlive-latex-ucs")
+    (name "texlive-ucharcat")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/ucs"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0rrxwi60wmz5dfjifl4fwk66plf7wix85qnhfv4ylvmj6qi6hw37"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/ucs")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/ucs")
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ucharcat/"
+                   "source/latex/ucharcat/"
+                   "tex/latex/ucharcat/")
+             (base32
+              "0r6mphnn26053vb4bgw1zjhw7y7xjavii9hnn7607cbscnx5f9di")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ucharcat")
+    (synopsis
+     "Implementation of the XeTeX @code{\\Ucharcat} command for LuaTeX")
+    (description
+     "The package implements the @code{\\Ucharcat} command for LuaLaTeX.
+@code{\\Ucharcat} is a new primitive in XeTeX, an extension of the existing
+@code{\\Uchar} command, that allows the specification of the catcode as well
+as character code of the character token being constructed.")
+    (license license:lppl)))
+
+(define-public texlive-ucs
+  (package
+    (name "texlive-ucs")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ucs/" "fonts/enc/dvips/ucs/"
+                   "source/latex/ucs/" "tex/latex/ucs/")
+             (base32
+              "1viisfamsf0x984ak53dwznhw0yhb394xv66rbfaml6igizvkj83")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ucs")
     (synopsis "Extended UTF-8 input encoding support for LaTeX")
     (description
-     "The bundle provides the @code{ucs} package, and @code{utf8x.def},
-together with a large number of support files.  The @code{utf8x.def}
+     "The bundle provides the @code{ucs} package, and @file{utf8x.def},
+together with a large number of support files.  The @file{utf8x.def}
 definition file for use with @code{inputenc} covers a wider range of Unicode
-characters than does @code{utf8.def} in the LaTeX distribution.  The package
+characters than does @file{utf8.def} in the LaTeX distribution.  The package
 provides facilities for efficient use of its large sets of Unicode characters.
 Glyph production may be controlled by various options, which permits use of
-non-ASCII characters when coding mathematical formulae.  Note that the bundle
-previously had an alias “unicode”; that alias has now been withdrawn, and no
-package of that name now exists.")
+non-ASCII characters when coding mathematical formulae.")
     (license license:lppl1.3+)))
 
-(define-public texlive-latex-preview
+(define-deprecated-package texlive-latex-ucs texlive-ucs)
+
+(define-public texlive-preview
   (package
-    (name "texlive-latex-preview")
+    (name "texlive-preview")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "preview"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0hnf821yvki9bzfkz79ns9m1msjp3yvd4dhf3268wrpr1zjx6w8v"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/preview/" "source/latex/preview/"
+                   "tex/latex/preview/")
+             (base32
+              "05ixx2il8xajakh1nkpf7qjczc1kvniiimv585b3gkg6fwx92wzb")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments
-     '(#:tex-directory "latex/preview"
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'remove-generated-file
-           (lambda _
-             (delete-file "preview.drv")
-             #t)))))
-    (home-page "https://www.ctan.org/pkg/preview")
+    (home-page "https://ctan.org/pkg/preview")
     (synopsis "Extract bits of a LaTeX source for output")
     (description
      "The main purpose of the preview package is the extraction of selected
@@ -8658,302 +19462,401 @@ dvipng, but it also works when you are using PDFTeX for generating PDF
 files.")
     (license license:gpl3+)))
 
+(define-deprecated-package texlive-latex-preview texlive-preview)
+
 (define-public texlive-acronym
-  (let ((template (simple-texlive-package
-                   "texlive-acronym"
-                   (list "doc/latex/acronym/"
-                         "source/latex/acronym/"
-                         "tex/latex/acronym/")
-                   (base32
-                    "0p2sws3qy7wv0v6bsy6c5j36n9s1ps7b1z7dmg1370schrjpqnfh"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t) "latex/acronym")
-         ((#:build-targets _ '()) '(list "acronym.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _ (chdir "source/latex/acronym/")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (propagated-inputs
-       (list texlive-bigfoot texlive-relsize texlive-xstring))
-      (home-page "https://ctan.org/pkg/acronym")
-      (synopsis "Expand acronyms at least once")
-      (description
-       "This package ensures that all acronyms used in the text are spelled
-out in full at least once.  It also provides an environment to build a list of
+  (package
+    (name "texlive-acronym")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/acronym/" "source/latex/acronym/"
+                   "tex/latex/acronym/")
+             (base32
+              "0p2sws3qy7wv0v6bsy6c5j36n9s1ps7b1z7dmg1370schrjpqnfh")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/acronym")
+    (synopsis "Expand acronyms at least once")
+    (description
+     "This package ensures that all acronyms used in the text are spelled out
+in full at least once.  It also provides an environment to build a list of
 acronyms used.  The package is compatible with PDF bookmarks.  The package
 requires the @code{suffix} package, which in turn requires that it runs under
 e-TeX.")
-      (license license:lppl1.3+))))
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-latex-acronym texlive-acronym)
 
 (define-public texlive-pdftex
   (package
-    (inherit (simple-texlive-package
-              "texlive-pdftex"
-              (list "/doc/pdftex/"
-                    "/doc/man/man1/pdftex.1"
-                    "/doc/man/man1/pdfetex.1"
-                    "/fonts/map/dvips/dummy-space/dummy-space.map"
-                    "/fonts/tfm/public/pdftex/dummy-space.tfm"
-                    "/fonts/type1/public/pdftex/dummy-space.pfb"
-                    "/scripts/simpdftex/simpdftex"
-                    "/tex/generic/config/pdftex-dvi.tex"
-                    "/tex/generic/pdftex/glyphtounicode.tex"
-                    "/tex/generic/pdftex/pdfcolor.tex")
-              (base32
-               "0w4ar5g7x4w8zw8z6hdwqxwcbglfzzq7pcznz8rawllwy6dssr8g")
-              #:trivial? #t))
-    ;; TODO: add this missing package:
-    ;; dehyph
+    (name "texlive-pdftex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/pdfetex.1"
+                   "doc/man/man1/pdfetex.man1.pdf"
+                   "doc/man/man1/pdftex.1"
+                   "doc/man/man1/pdftex.man1.pdf"
+                   "doc/pdftex/"
+                   "fonts/map/dvips/dummy-space/"
+                   "fonts/tfm/public/pdftex/"
+                   "fonts/type1/public/pdftex/"
+                   "scripts/simpdftex/"
+                   "tex/generic/config/pdftex-dvi.tex"
+                   "tex/generic/pdftex/")
+             (base32
+              "1fp8w8pkxqcv6n8y0zy2rdclm2hcyx4zv93h0fmqai1yvgcx6yh6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:texlive-latex-bin? #f
+           #:link-scripts #~(list "simpdftex")
+           #:create-formats #~(list "etex" "pdfetex" "pdftex")
+           #:phases
+           #~(modify-phases %standard-phases
+               (replace 'patch-shell-scripts
+                 (lambda _
+                   (substitute* "scripts/simpdftex/simpdftex"
+                     (("/bin/(cp|date|echo|mv|rm)" _ command)
+                      (which command))
+                     (("basename|dirname|mkdir|sed" command)
+                      (which command))
+                     (("(^[ \t]*)(cat|rm)" _ indent command)
+                      (string-append indent (which command)))
+                     (("(distillerpath=\").*" _ prefix)
+                      (string-append prefix
+                                     #$(this-package-input "ghostscript")
+                                     "/bin\"\n"))))))))
+    (inputs (list ghostscript))
     (propagated-inputs
      (list texlive-cm
            texlive-etex
+           texlive-hyphen-complete
            texlive-knuth-lib
-           texlive-hyphen-base
            texlive-kpathsea
-           texlive-tex-ini-files
-           texlive-tex-plain))
-    (home-page "https://www.ctan.org/pkg/pdftex")
+           texlive-plain
+           texlive-tex-ini-files))
+    (home-page "https://ctan.org/pkg/pdftex")
     (synopsis "TeX extension for direct creation of PDF")
     (description
-     "This package provides an extension of TeX which can be configured to
-directly generate PDF documents instead of DVI.")
-    (license license:gpl2+)))
+     "This package is an extension of TeX which can directly generate PDF
+documents as well as DVI output.")
+    (license license:gpl3+)))
 
 (define-deprecated-package texlive-generic-pdftex texlive-pdftex)
 
+(define texlive-bin-full
+  (package/inherit texlive-bin
+    (name "texlive-bin-full")
+    (arguments
+     (substitute-keyword-arguments (package-arguments texlive-bin)
+       ((#:configure-flags _)
+        #~(let ((kpathsea #$(this-package-input "texlive-libkpathsea")))
+            (list "--with-banner-add=/GNU Guix"
+                  "--enable-shared"
+                  "--disable-native-texlive-build"
+                  "--disable-static"
+                  "--disable-kpathsea"
+                  "--with-system-cairo"
+                  "--with-system-freetype2"
+                  "--with-system-gd"
+                  "--with-system-gmp"
+                  "--with-system-graphite2"
+                  "--with-system-harfbuzz"
+                  "--with-system-icu"
+                  "--with-system-libgs"
+                  "--with-system-libpaper"
+                  "--with-system-libpng"
+                  "--with-system-mpfr"
+                  "--with-system-pixman"
+                  "--with-system-potrace"
+                  "--with-system-teckit"
+                  "--with-system-zlib"
+                  "--with-system-zziplib"
+                  ;; Help locating external kpathsea.  For some reason
+                  ;; PKG-CONFIG is unable to find it.
+                  "--with-system-kpathsea"
+                  (format #f "--with-kpathsea-includes=~a/include" kpathsea)
+                  (format #f "--with-kpathsea-lib=~a/lib" kpathsea)
+                  ;; LuaJIT is not ported to some architectures yet.
+                  #$@(if (or (target-ppc64le?)
+                             (target-riscv64?))
+                         '("--disable-luajittex"
+                           "--disable-luajithbtex"
+                           "--disable-mfluajit")
+                         '()))))
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (add-after 'install 'symlink-kpathsea-binaries
+              (lambda _
+                (let ((bin (string-append
+                            #$(this-package-input "texlive-libkpathsea")
+                            "/bin"))
+                      (files
+                       '("kpseaccess" "kpsereadlink" "kpsestat" "kpsewhich")))
+                  (with-directory-excursion (string-append #$output "/bin")
+                    (for-each (lambda (b) (symlink (string-append bin "/" b) b))
+                              files)))))
+            (add-after 'install 'merge-core-scripts
+              (lambda* (#:key inputs native-inputs #:allow-other-keys)
+                (let ((texlive-scripts
+                       (dirname
+                        (dirname
+                         (search-input-file (or native-inputs inputs)
+                                            "tlpkg/texlive.tlpdb"))))
+                      (tlpkg (string-append #$output "/share/tlpkg")))
+                  ;; "tlpkg" directory is neither provided by texlive-bin nor
+                  ;; by texlive-texmf.
+                  (mkdir-p tlpkg)
+                  (copy-recursively (string-append texlive-scripts "/tlpkg")
+                                    tlpkg)
+                  ;; texlive-bin source doesn't provide this Perl script.
+                  ;; Yet, it is referenced in "fmtutil.pl" so we need to move
+                  ;; it here too.
+                  (install-file
+                   (string-append texlive-scripts
+                                  "/texmf-dist/scripts/texlive/mktexlsr.pl")
+                   (string-append #$output
+                                  "/share/texmf-dist/scripts/texlive")))))
+            (add-after 'merge-core-scripts 'patch-core-scripts
+              (lambda _
+                (with-directory-excursion
+                    (string-append #$output "/share/texmf-dist/scripts/texlive")
+                  ;; Make sure that fmtutil can find its Perl modules.
+                  (substitute* "fmtutil.pl"
+                    (("\\$TEXMFROOT/")
+                     (string-append #$output "/share/")))
+                  ;; Likewise for updmap.pl.
+                  (substitute* "updmap.pl"
+                    (("\\$TEXMFROOT/tlpkg")
+                     (string-append #$output "/share/tlpkg")))
+                  ;; Likewise for the tlmgr.
+                  (substitute* "tlmgr.pl"
+                    ((".*\\$::installerdir = \\$Master.*" all)
+                     (format #f "  $Master = ~s;~%~a"
+                             (string-append #$output "/share")
+                             all))))))
+            (add-after 'patch-core-scripts 'patch-shell-scripts
+              (lambda _
+                (with-directory-excursion
+                    (string-append #$output "/share/texmf-dist/scripts")
+                  ;; First patch shell scripts with ".sh" extension.
+                  (let* ((scripts (find-files "." "\\.sh$"))
+                         (commands '("awk" "basename" "cat" "grep" "mkdir" "rm"
+                                     "sed" "sort" "uname"))
+                         (command-regexp
+                          (format #f "\\b(~a)\\b" (string-join commands "|")))
+                         (iso-8859-1-encoded-scripts
+                          '("./texlive-extra/rubibtex.sh"
+                            "./texlive-extra/rumakeindex.sh")))
+                    (define (substitute-commands scripts)
+                      (substitute* scripts
+                        ((command-regexp dummy command)
+                         (which command))))
+                    (substitute-commands
+                     (lset-difference string= scripts iso-8859-1-encoded-scripts))
+                    (with-fluids ((%default-port-encoding "ISO-8859-1"))
+                      (substitute-commands iso-8859-1-encoded-scripts)))
+                  ;; Then patch scripts without such extension.
+                  (let ((dirs (map (compose dirname which)
+                                   (list "awk" "cat" "grep" "sed"))))
+                    (substitute* (find-files "texlive" "^mktex(mf|pk|tfm)$")
+                      (("^version=" m)
+                       (format #false "PATH=\"~{~a:~}$PATH\"; export PATH~%~a"
+                               dirs m)))))))))))
+    (native-inputs
+     (modify-inputs (package-native-inputs texlive-bin)
+       (append (package-source texlive-scripts))))
+    (inputs
+     (modify-inputs (package-inputs texlive-bin)
+       (append texlive-libkpathsea)))
+    (propagated-inputs '())))
+
 (define texlive-texmf
   (package
-   (name "texlive-texmf")
-   (version "20210325")
-   (source texlive-texmf-src)
-   (build-system gnu-build-system)
-   (inputs
-    `(("texlive-bin" ,texlive-bin)
-      ("lua" ,lua)
-      ("perl" ,perl)
-      ("python" ,python)
-      ("ruby" ,ruby)
-      ("tcsh" ,tcsh)))
-   (arguments
-    `(#:modules ((guix build gnu-build-system)
-                 (guix build utils)
-                 (srfi srfi-26))
-
+    (name "texlive-texmf")
+    (version (package-version texlive-bin))
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "ftp://tug.org/historic/systems/texlive/"
+                                  (string-take version 4)
+                                  "/texlive-" version "-texmf.tar.xz"))
+              (sha256
+               (base32
+                "0lqjm11pr9vasvivaci3k9xcmdyd08ldnh31zf8avjjs09xcfkac"))))
+    (build-system copy-build-system)
+    (arguments
+     (list
+      #:modules '((guix build copy-build-system)
+                  (guix build utils)
+                  (srfi srfi-1)
+                  (srfi srfi-26))
       ;; This package takes 4 GiB, which we can't afford to distribute from
       ;; our servers.
       #:substitutable? #f
-
+      #:install-plan #~'(("texmf-dist/" "share/texmf-dist"))
       #:phases
-        (modify-phases (map (cut assq <> %standard-phases)
-                            '(set-paths unpack patch-source-shebangs))
-          (add-after 'unpack 'unset-environment-variables
-            (lambda _
-              (unsetenv "TEXMF")
-              (unsetenv "TEXMFCNF")
-              #t))
-          (add-after 'patch-source-shebangs 'install
-            (lambda* (#:key outputs #:allow-other-keys)
-              (let ((share (string-append (assoc-ref outputs "out") "/share")))
-                (mkdir-p share)
-                (invoke "mv" "texmf-dist" share))))
+      #~(modify-phases %standard-phases
           (add-after 'install 'texmf-config
-            (lambda* (#:key inputs outputs #:allow-other-keys)
-              (let* ((out (assoc-ref outputs "out"))
-                     (share (string-append out "/share"))
-                     (texmfroot (string-append share "/texmf-dist/web2c"))
-                     (texmfcnf (string-append texmfroot "/texmf.cnf"))
-                     (fmtutilcnf (string-append texmfroot "/fmtutil.cnf"))
-                     (texlive-bin (assoc-ref inputs "texlive-bin"))
-                     (texbin (string-append texlive-bin "/bin"))
-                     (tlpkg (string-append texlive-bin "/share/tlpkg")))
+            (lambda* (#:key inputs native-inputs  #:allow-other-keys)
+              (let* ((share (string-append #$output "/share"))
+                     (texmf-dist (string-append share "/texmf-dist"))
+                     (web2c (string-append texmf-dist "/web2c"))
+                     (fmtutil.cnf (string-append web2c "/fmtutil.cnf"))
+                     (texlive-bin
+                      #$(this-package-native-input "texlive-bin-full")))
                 ;; LuaJIT is not ported to powerpc64* yet.
-                (if ,(target-ppc64le?)
-                    (substitute* fmtutilcnf
+                (if #$(target-ppc64le?)
+                    (substitute* fmtutil.cnf
                       (("^(luajittex|luajithbtex|mfluajit)" m)
                        (string-append "#! " m))))
-                ;; Register SHARE as TEXMFROOT in texmf.cnf.
-                (substitute* texmfcnf
-                  (("TEXMFROOT = \\$SELFAUTOPARENT")
-                   (string-append "TEXMFROOT = " share))
-                  (("TEXMFLOCAL = \\$SELFAUTOGRANDPARENT/texmf-local")
-                   "TEXMFLOCAL = $SELFAUTODIR/share/texmf-local")
-                  (("!!\\$TEXMFLOCAL") "$TEXMFLOCAL"))
                 ;; Register paths in texmfcnf.lua, needed for context.
-                (substitute* (string-append texmfroot "/texmfcnf.lua")
-                  (("selfautodir:") out)
+                (substitute* (string-append web2c "/texmfcnf.lua")
+                  (("selfautodir:") #$output)
                   (("selfautoparent:") (string-append share "/")))
                 ;; Set path to TeXLive Perl modules
                 (setenv "PERL5LIB"
-                        (string-append (getenv "PERL5LIB") ":" tlpkg))
-                ;; Configure the texmf-dist tree; inspired from
-                ;; http://slackbuilds.org/repository/13.37/office/texlive/
-                (setenv "PATH" (string-append (getenv "PATH") ":" texbin))
-                (setenv "TEXMFCNF" texmfroot)
-                (invoke "updmap-sys" "--nohash" "--syncwithtrees")
-                (invoke "mktexlsr")
-                (invoke "fmtutil-sys" "--all")))))))
-   (properties `((max-silent-time . 9600))) ; don't time out while grafting
-   (synopsis "TeX Live, a package of the TeX typesetting system")
-   (description
-    "TeX Live provides a comprehensive TeX document production system.
+                        (string-append (getenv "PERL5LIB") ":"
+                                       (string-append texlive-bin
+                                                      "/share/tlpkg")))
+                ;; Configure the texmf-dist tree.
+                (setenv "GUIX_TEXMF" texmf-dist)
+                (setenv "PATH"
+                        (string-append (getenv "PATH") ":" texlive-bin "/bin:"))
+                (let ((updmap.cfg (string-append web2c "/updmap.cfg")))
+                  (invoke (string-append texlive-bin "/bin/updmap-sys")
+                          "--nohash" "--syncwithtrees"
+                          (string-append "--cnffile=" updmap.cfg)))
+                (invoke (string-append texlive-bin "/bin/fmtutil-sys")
+                        "--cnffile" fmtutil.cnf
+                        "--all"
+                        "--fmtdir" web2c)))))))
+    (native-inputs (list texlive-bin-full))
+    (inputs (list lua perl python-wrapper ruby tcsh))
+    (properties `((max-silent-time . 9600))) ; don't time out while grafting
+    (synopsis "TeX Live, a package of the TeX typesetting system")
+    (description
+     "TeX Live provides a comprehensive TeX document production system.
 It includes all the major TeX-related programs, macro packages, and fonts
 that are free software, including support for many languages around the
 world.
 
 This package contains the complete tree of texmf-dist data.")
-   (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
-   (home-page "https://www.tug.org/texlive/")))
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
+    (home-page "https://www.tug.org/texlive/")))
 
 (define-public texlive
   (package
-   (name "texlive")
-   (version "20210325")
-   (source #f)
-   (build-system trivial-build-system)
-   (inputs `(("bash" ,bash-minimal)     ;for wrap-program
-             ("texlive-bin" ,texlive-bin)
-             ("texlive-texmf" ,texlive-texmf)))
-   (native-search-paths
-    (list (search-path-specification
-           (variable "TEXMFLOCAL")
-           (files '("share/texmf-local")))))
-   (arguments
-    `(#:modules ((guix build utils))
+    (name "texlive")
+    (version (package-version texlive-bin))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments
+     (list
+      #:modules '((guix build utils))
       #:builder
-        ;; Build the union of texlive-bin and texlive-texmf, but take the
-        ;; conflicting subdirectory share/texmf-dist from texlive-texmf.
-        (begin
+      ;; Build the union of texlive-bin-full and texlive-texmf, but take the
+      ;; conflicting subdirectory share/texmf-dist from texlive-texmf.
+      #~(begin
           (use-modules (guix build utils))
-          (let ((out (assoc-ref %outputs "out"))
-                (bin (assoc-ref %build-inputs "texlive-bin"))
-                (texmf (assoc-ref %build-inputs "texlive-texmf"))
-                (bash (assoc-ref %build-inputs "bash")))
-               (mkdir out)
-               (with-directory-excursion out
-                 (for-each
-                   (lambda (name)
-                     (symlink (string-append bin "/" name) name))
-                   '("include" "lib"))
-                 (mkdir "bin")
-                 (with-directory-excursion "bin"
-                   (setenv "PATH" (string-append bash "/bin"))
-                   (for-each
-                     (lambda (name)
-                       (symlink name (basename name))
-                       (wrap-program
-                         (basename name)
-                         `("TEXMFCNF" =
-                           (,(string-append texmf "/share/texmf-dist/web2c")))))
-                     (find-files (string-append bin "/bin/") "")))
-                 (mkdir "share")
-                 (with-directory-excursion "share"
-                   (for-each
-                     (lambda (name)
-                       (symlink (string-append bin "/share/" name) name))
-                     '("info" "man" "tlpkg"))
-                   (for-each
-                     (lambda (name)
-                       (symlink (string-append texmf "/share/" name) name))
-                     '("texmf-dist" "texmf-var"))))
-               #t))))
-   (synopsis "TeX Live, a package of the TeX typesetting system")
-   (description
-    "TeX Live provides a comprehensive TeX document production system.
-It includes all the major TeX-related programs, macro packages, and fonts
-that are free software, including support for many languages around the
-world.
+          (let ((bin #$(this-package-input "texlive-bin-full"))
+                (texmf #$(this-package-input "texlive-texmf")))
+            (mkdir #$output)
+            (with-directory-excursion #$output
+              ;; "include/" and "lib/" directories.
+              (for-each
+               (lambda (name)
+                 (symlink (string-append bin "/" name) name))
+               '("include" "lib"))
+              ;; "bin/" directory.
+              (mkdir "bin")
+              (with-directory-excursion "bin"
+                (for-each
+                 (lambda (name) (symlink name (basename name)))
+                 (find-files (string-append bin "/bin/") "")))
+              ;; "share/info", "share/man", share/texmf-dist/" and
+              ;; "share/tlpkg/" directories.
+              (mkdir "share")
+              (with-directory-excursion "share"
+                (for-each
+                 (lambda (name)
+                   (symlink (string-append bin "/share/" name) name))
+                 '("info" "man" "tlpkg"))
+                (symlink (string-append texmf "/share/texmf-dist")
+                         "texmf-dist"))
+              ;; Now everything is in place, generate ls-R file.
+              (setenv "PATH"
+                      (string-append
+                       (getenv "PATH") ":"
+                       #$(this-package-input "texlive-bin-full") "/bin"))
+              (invoke (string-append bin "/bin/mktexlsr")))))))
+    (inputs (list texlive-bin-full texlive-texmf))
+    (propagated-inputs (list texlive-libkpathsea))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "TEXMFLOCAL")
+            (files '("share/texmf-local")))))
+    (synopsis "TeX Live, a package of the TeX typesetting system")
+    (description
+     "TeX Live provides a comprehensive TeX document production system.
+It includes all the major TeX-related programs, macro packages, and fonts that
+are free software, including support for many languages around the world.
 
 This package contains the complete TeX Live distribution.")
-   (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
-   (home-page "https://www.tug.org/texlive/")))
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
+    (home-page "https://www.tug.org/texlive/")))
 
-(define-public perl-text-bibtex
+(define-public texlive-biber
   (package
-    (name "perl-text-bibtex")
-    (version "0.88")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "mirror://cpan/authors/id/A/AM/AMBS/Text-BibTeX-"
-                           version ".tar.gz"))
-       (sha256
-        (base32
-         "0b7lmjvfmypps1nw6nsdikgaakm0n0g4186glaqazg5xd1p5h55h"))))
-    (build-system perl-build-system)
+    (name "texlive-biber")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/bibtex/biber/" "source/bibtex/biber/")
+             (base32
+              "0i1hqr9zb7b9d1zjlyg4awa6mkyq6wnrb6z4689j1rg07vnbd7mw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'add-output-directory-to-rpath
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "inc/MyBuilder.pm"
-               (("-Lbtparse" line)
-                (string-append "-Wl,-rpath="
-                               (assoc-ref outputs "out") "/lib " line)))
-             #t))
-         (add-after 'unpack 'install-libraries-to-/lib
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "Build.PL"
-               (("lib64") "lib"))
-             #t)))))
+     (list
+      #:tests? #true
+      #:imported-modules `(,@%texlive-build-system-modules
+                           (guix build perl-build-system))
+      #:modules '((guix build texlive-build-system)
+                  ((guix build perl-build-system) #:prefix perl:)
+                  (guix build utils))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'unpack-biber-source
+            (lambda _
+              (mkdir-p "build")
+              (with-directory-excursion "build"
+                (invoke "tar" "xvf"
+                        "../source/bibtex/biber/biblatex-biber.tar.gz"
+                        "--strip-components=1"))))
+          (add-after 'unpack-biber-source 'build-biber
+            (lambda args
+              (with-directory-excursion "build"
+                (for-each (lambda (phase)
+                            (apply (assoc-ref perl:%standard-phases phase) args))
+                          '(configure build check install)))))
+          (add-after 'install 'wrap-programs
+            (lambda _
+              (let ((perl5lib (getenv "PERL5LIB")))
+                (wrap-program (string-append #$output "/bin/biber")
+                  `("PERL5LIB" ":" prefix
+                    (,(string-append perl5lib ":"
+                                     #$output "/lib/perl5/site_perl"))))))))))
     (native-inputs
-     (list perl-capture-tiny perl-config-autoconf perl-extutils-libbuilder
-           perl-module-build))
-    (home-page "https://metacpan.org/release/Text-BibTeX")
-    (synopsis "Interface to read and parse BibTeX files")
-    (description "@code{Text::BibTeX} is a Perl library for reading, parsing,
-and processing BibTeX files.  @code{Text::BibTeX} gives you access to the data
-at many different levels: you may work with BibTeX entries as simple field to
-string mappings, or get at the original form of the data as a list of simple
-values (strings, macros, or numbers) pasted together.")
-    (license license:perl-license)))
-
-(define-public biber
-  (package
-    ;; Note: When updating Biber, make sure it matches our BibLaTeX version by
-    ;; checking the Biber/BibLaTeX compatibility matrix in the BibLaTeX manual
-    ;; at <https://ctan.org/pkg/biblatex>.
-    (name "biber")
-    (version "2.16")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/plk/biber/")
-                    (commit (string-append "v" version))))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "0586q8y1f2k23mvb02ccm3qsb35cwskafksixsjaih7a7xcf5gxx"))
-              (patches (search-patches "biber-adapt-perl-5.36.patch"))))
-    (build-system perl-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'install 'wrap-programs
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (perl5lib (getenv "PERL5LIB")))
-               (wrap-program (string-append out "/bin/biber")
-                 `("PERL5LIB" ":" prefix
-                   (,(string-append perl5lib ":" out
-                                    "/lib/perl5/site_perl")))))
-             #t)))))
+     (list perl-config-autoconf
+           perl-extutils-libbuilder
+           perl-file-which
+           perl-module-build
+           perl-test-differences))
     (inputs
-     (list perl-autovivification
+     (list perl
+           perl-autovivification
            perl-class-accessor
            perl-data-dump
            perl-data-compare
@@ -8992,20 +19895,16 @@ values (strings, macros, or numbers) pasted together.")
            perl-business-issn
            perl-business-ismn
            perl-lingua-translit))
-    (native-inputs
-     `(("perl-config-autoconf" ,perl-config-autoconf)
-       ("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
-       ("perl-module-build" ,perl-module-build)
-       ;; for tests
-       ("perl-file-which" ,perl-file-which)
-       ("perl-test-more" ,perl-test-most) ; FIXME: "more" would be sufficient
-       ("perl-test-differences" ,perl-test-differences)))
-    (home-page "https://biblatex-biber.sourceforge.net/")
-    (synopsis "Backend for the BibLaTeX citation management tool")
-    (description "Biber is a BibTeX replacement for users of biblatex.  Among
-other things it comes with full Unicode support.")
+    (home-page "https://ctan.org/pkg/biber")
+    (synopsis "BibTeX replacement for users of BibLaTeX")
+    (description
+     "Biber is a BibTeX replacement for users of BibLaTeX.  It supports full
+UTF-8, can (re)-encode input and output, supports highly configurable sorting,
+dynamic bibliography sets and many other features.")
     (license license:artistic2.0)))
 
+(define-deprecated-package biber texlive-biber)
+
 (define-public rubber
   (package
     (name "rubber")
@@ -9195,13 +20094,13 @@ and PostScript specials.  A working TeX installation is needed.")
                           (("timestamp.*%")
                            (string-append "timestamp{"
                                           ,version "}"))))))))
-      (native-inputs (list autoconf automake
-                           (texlive-updmap.cfg (list texlive-amsfonts
-                                                     texlive-palatino
-                                                     texlive-zapfding
-                                                     texlive-knuth-lib
-                                                     texlive-mflogo-font
-                                                     texlive-pdftex))))
+      (native-inputs
+       (list autoconf
+             automake
+             (texlive-updmap.cfg
+              (list texlive-mflogo-font
+                    texlive-palatino
+                    texlive-zapfding))))
       (home-page "https://www.gnu.org/software/teximpatient/")
       (synopsis "Book on TeX, plain TeX and Eplain")
       (description
@@ -9267,8 +20166,6 @@ and Karl Berry.")
            qtbase-5
            qtsvg-5
            zlib))
-    (propagated-inputs
-     (list (texlive-updmap.cfg (list texlive-fonts-ec))))
     (native-inputs
      (list python pkg-config))
     (home-page "https://www.lyx.org/")
@@ -9280,165 +20177,133 @@ with documents of any length in which the usual processing abilities are
 required: automatic sectioning and pagination, spell checking and so forth.")
     (license license:gpl2+)))
 
-(define-public texlive-latex-media9
+(define-public texlive-media9
   (package
-    (name "texlive-latex-media9")
+    (name "texlive-media9")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/media9"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0a1v70k6231323y1lazfda1y9568w8hn7c8jhc7rblkhdfv3slw7"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/media9")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/media9")
+    (source (texlive-origin
+             name version
+             (list "doc/latex/media9/" "source/latex/media9/"
+                   "tex/latex/media9/")
+             (base32
+              "1hzwan5y199a6za32h7bn653f2pzd91z9idrq8xdz6fjhns3fcdr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/media9")
     (synopsis "Multimedia inclusion package with Adobe Reader-9/X compatibility")
     (description
-     "The package provides an interface to embed interactive Flash (SWF) and 3D
-objects (Adobe U3D & PRC), as well as video and sound files or streams in the
-popular MP4, FLV and MP3 formats into PDF documents with Acrobat-9/X
+     "The package provides an interface to embed interactive Flash (SWF) and
+3D objects (Adobe U3D & PRC), as well as video and sound files or streams in
+the popular MP4, FLV and MP3 formats into PDF documents with Acrobat-9/X
 compatibility.  Playback of multimedia files uses the built-in Flash Player of
-Adobe Reader and does, therefore, not depend on external plug-ins.  Flash Player
-supports the efficient H.264 codec for video compression.
+Adobe Reader and does, therefore, not depend on external plug-ins.  Flash
+Player supports the efficient H.264 codec for video compression.
 
 The package is based on the RichMedia Annotation, an Adobe addition to the PDF
 specification.  It replaces the now obsolete @code{movie15} package.")
     (license license:lppl)))
 
-(define-public texlive-latex-ocgx2
+(define-deprecated-package texlive-latex-media9 texlive-media9)
+
+(define-public texlive-ocgx2
   (package
-    (name "texlive-latex-ocgx2")
+    (name "texlive-ocgx2")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/ocgx2"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1mrz1mj59m27bfya52vi4lm84ifisaf30pmf8id1biqwcq4jyynh"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/ogcx2")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/ocgx2")
-    (synopsis "Provide OCG (Optional Content Groups) support within a PDF document")
-    (description
-     "This package provides OCG (Optional Content Groups) support within a PDF
-document.
-
-It re-implements the functionality of the @code{ocg}, @code{ocgx}, and
-@code{ocg-p} packages and adds support for all known engines and back-ends
-including:
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ocgx2/" "tex/latex/ocgx2/")
+             (base32
+              "0jpvwy6sp7almdbhxizz22h3jxgfnsl4nirs93p7y1lqdgc4srl4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ocgx2")
+    (synopsis "Drop-in replacement for 'ocgx' and 'ocg-p'")
+    (description
+     "This package serves as a drop-in replacement for the packages
+@code{ocgx} by Paul Gaborit and @code{ocg-p} by Werner Moshammer for the
+creation of PDF Layers.  It re-implements the functionality of the @code{ocg},
+@code{ocgx}, and @code{ocg-p} packages and adds support for all known engines
+and back-ends.  It also ensures compatibility with the @code{media9} and
+@code{animate} packages.")
+    (license license:lppl)))
 
-@itemize
-@item LaTeX → dvips → @code{ps2pdf}/Distiller
-@item (Xe)LaTeX(x) → @code{dvipdfmx}
-@item pdfLaTeX and LuaLaTeX .
-@end itemize
+(define-deprecated-package texlive-latex-ocgx2 texlive-ocgx2)
 
-It also ensures compatibility with the @code{media9} and @code{animate} packages.")
-    (license license:lppl)))
+(define-public texlive-optex
+  (package
+    (name "texlive-optex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/optex.1"
+                   "doc/man/man1/optex.man1.pdf"
+                   "doc/optex/base/"
+                   "tex/optex/base/"
+                   "tex/optex/demo/"
+                   "tex/optex/pkg/")
+             (base32
+              "0bcrj9wrimcd2pxrcfk7x3vkhxzij4422l19a8j4h299lkq3pbx0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:create-formats #~(list "optex")))
+    (propagated-inputs
+     (list texlive-amsfonts
+           texlive-cm
+           texlive-ec
+           texlive-hyphen-base
+           texlive-librarian
+           texlive-lm
+           texlive-luaotfload
+           texlive-luatex
+           texlive-rsfs
+           texlive-unicode-data))
+    (home-page "https://ctan.org/pkg/optex")
+    (synopsis "LuaTeX format based on Plain TeX and OPmac")
+    (description
+     "OpTeX is a LuaTeX format based on Plain TeX macros with power from
+OPmac (fonts selection system, colors, external graphics, references,
+hyperlinks, ...) with Unicode fonts.")
+    (license license:public-domain)))
 
 (define-public texlive-ms
-  (let ((template
-         (simple-texlive-package
-          "texlive-ms"
-          (list "doc/latex/ms/" "source/latex/ms/" "tex/latex/ms/")
-          (base32 "1cgrpx5mybiirjjdmni8kvqdg37dwfkixq3h9ami0mgxqqqfl2x3"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/ms")
-         ((#:tex-format _ "latex") "latex")
-         ((#:build-targets _ '())
-          #~(list "count1to.ins" "multitoc.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/ms")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://ctan.org/macros/latex/contrib/ms")
-      (synopsis "Various LaTeX packages by Martin Schroder")
-      (description
-       "The remains of a bundle of LaTeX packages by Martin Schroder; the
-collection comprises: count1to, make use of TeX counters; and multitoc,
-typeset the table of contents in multiple columns.")
-      (license license:lppl))))
+  (package
+    (name "texlive-ms")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ms/" "source/latex/ms/"
+                   "tex/latex/ms/")
+             (base32
+              "1cgrpx5mybiirjjdmni8kvqdg37dwfkixq3h9ami0mgxqqqfl2x3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
+    (home-page "https://ctan.org/pkg/ms")
+    (synopsis "Various LaTeX packages by Martin Schroder")
+    (description
+     "This package is the remains of a bundle of LaTeX packages by Martin
+Schroder; the collection comprises: @code{count1to}, make use of TeX counters;
+and @code{multitoc}, typeset the table of contents in multiple columns.")
+    (license license:lppl)))
 
 (define-deprecated-package texlive-latex-ms texlive-ms)
 
 (define-public texlive-ncctools
-  (let ((template (simple-texlive-package
-                   "texlive-ncctools"
-                   (list "doc/latex/ncctools/"
-                         "source/latex/ncctools/"
-                         "tex/latex/ncctools/")
-                   (base32
-                    "1g3fpvrg6kx2ns97ih6iwdk0rcbxlv043x8rdppxdincl2lvbdx5"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t) "latex/ncctools")
-         ((#:build-targets _ '()) '(list "ncctools.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _ (chdir "source/latex/ncctools/")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (propagated-inputs
-       (list texlive-amsmath texlive-graphics))
-      (home-page "https://ctan.org/pkg/ncctools")
-      (synopsis "Collection of general packages for LaTeX")
-      (description
-       "The NCCtools bundle contains many packages for general use under LaTeX;
+  (package
+    (name "texlive-ncctools")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ncctools/" "source/latex/ncctools/"
+                   "tex/latex/ncctools/")
+             (base32
+              "1g3fpvrg6kx2ns97ih6iwdk0rcbxlv043x8rdppxdincl2lvbdx5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ncctools")
+    (synopsis "A collection of general packages for LaTeX")
+    (description
+     "The NCCtools bundle contains many packages for general use under LaTeX;
 many are also used by NCC LaTeX.  The bundle includes tools for:
 @itemize
 @item executing commands after a package is loaded;
@@ -9467,198 +20332,293 @@ toc-entries;
 @item centered page layouts;
 @item un-numbered top-level section.
 @end itemize")
-      (license license:lppl))))
-
-(define-public texlive-numprint
-  (let ((template
-         (simple-texlive-package
-          "texlive-numprint"
-          (list "doc/latex/numprint/"
-                "source/latex/numprint/"
-                "tex/latex/numprint/")
-          (base32 "1rqbqj4ffcfxxxxbs100pdslaiimwzgg19mf2qzcmm5snxwrf7zj"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/numprint")
-         ((#:build-targets _ '())
-          '(list "numprint.ins"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _
-                 (chdir "source/latex/numprint")))
-             (replace 'copy-files
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (let ((origin (assoc-ref inputs "source"))
-                       (source (string-append (assoc-ref outputs "out")
-                                              "/share/texmf-dist/source"))
-                       (doc (string-append (assoc-ref outputs "doc")
-                                           "/share/texmf-dist/doc")))
-                   (copy-recursively (string-append origin "/source") source)
-                   (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/numprint")
-      (synopsis "Print numbers with separators and exponent if necessary")
-      (description
-       "The package numprint prints numbers with a separator every three
-digits and converts numbers given as 12345.6e789 to 12\\,345,6\\cdot
-10^{789}.  Numbers are printed in the current mode (text or math) in
-order to use the correct font.
-
-Many things, including the decimal sign, the thousand separator, as
-well as the product sign can be changed by the user, e.g., to reach
-12,345.6\\times 10^{789}.
+    (license license:lppl)))
 
-If an optional argument is given it is printed upright as unit.
-Numbers can be rounded to a given number of digits.  The package
-supports an automatic, language-dependent change of the number format.
+(define-public texlive-ncntrsbk
+  (package
+    (name "texlive-ncntrsbk")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "dvips/ncntrsbk/"
+                   "fonts/afm/adobe/ncntrsbk/"
+                   "fonts/afm/urw/ncntrsbk/"
+                   "fonts/map/dvips/ncntrsbk/"
+                   "fonts/tfm/adobe/ncntrsbk/"
+                   "fonts/tfm/urw35vf/ncntrsbk/"
+                   "fonts/type1/urw/ncntrsbk/"
+                   "fonts/vf/adobe/ncntrsbk/"
+                   "fonts/vf/urw35vf/ncntrsbk/"
+                   "tex/latex/ncntrsbk/")
+             (base32
+              "0i6a48zbn9lg4pwbw8ya2wjjgppwac816fnbpmahm67kknx4d7ij")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/urw-base35")
+    (synopsis "Replacement for Adobe's New Century Schoolbook font")
+    (description
+     "This package provides a drop-in replacement for the New Century
+Schoolbook font from Adobe's basic set.")
+    (license license:gpl3+)))
 
-Tabular alignment using the tabular, array, tabularx, and longtable
-environments (similar to the dcolumn and rccol packages) is supported
-using all features of numprint.  Additional text can be added before
-and after the formatted number.")
-      (license license:lppl))))
+(define-public texlive-numprint
+  (package
+    (name "texlive-numprint")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/numprint/" "source/latex/numprint/"
+                   "tex/latex/numprint/")
+             (base32
+              "1rqbqj4ffcfxxxxbs100pdslaiimwzgg19mf2qzcmm5snxwrf7zj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/numprint")
+    (synopsis "Print numbers with separators and exponent if necessary")
+    (description
+     "The package numprint prints numbers with a separator every three digits
+and converts numbers given as @samp{12345.6e789} to @samp{12\\,345,6\\cdot
+10^@{789@}}.  Numbers are printed in the current mode (text or math) in order
+to use the correct font.
+
+Many things, including the decimal sign, the thousand separator, as well as
+the product sign can be changed by the user.  If an optional argument is given
+it is printed upright as unit.  Numbers can be rounded to a given number of
+digits.  The package supports an automatic, language-dependent change of the
+number format.")
+    (license license:lppl)))
 
 (define-deprecated-package texlive-latex-numprint texlive-numprint)
 
-(define-public texlive-latex-needspace
+(define-public texlive-needspace
   (package
-    (name "texlive-latex-needspace")
+    (name "texlive-needspace")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "needspace"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0kw80f5jh4gdpa2ka815abza3gr5z8b929w0745vrlc59pl0017y"))))
+    (source (texlive-origin name version
+                            (list "doc/latex/needspace/"
+                                  "source/latex/needspace/"
+                                  "tex/latex/needspace/")
+                            (base32
+                             "12hbvv1w6b1k29qjvp72bkpnzsxpvrimzshllwinrxh9rx1mn550")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments
-     '(#:tex-directory "latex/needspace"
-       #:tex-format "latex"))
-    (inputs
-     (list texlive-filecontents))
-    (home-page "https://www.ctan.org/pkg/needspace")
+    (arguments (list #:tex-format "latex"))
+    (native-inputs (list texlive-filecontents))
+    (home-page "https://ctan.org/pkg/needspace")
     (synopsis "Insert pagebreak if not enough space")
     (description
-     "Provides commands to disable pagebreaking within a given vertical
-space.  If there is not enough space between the command and the bottom of the
-page, a new page will be started.")
+     "This package provides commands to disable pagebreaking within a given
+vertical space.  If there is not enough space between the command and the
+bottom of the page, a new page will be started.")
     (license license:lppl)))
 
-(define-public texlive-latex-changepage
+(define-deprecated-package texlive-latex-needspace texlive-needspace)
+
+(define-public texlive-changepage
   (package
-    (name "texlive-latex-changepage")
+    (name "texlive-changepage")
     (version (number->string %texlive-revision))
-    (source
-     (origin
-       (method svn-fetch)
-       (uri (texlive-ref "latex" "changepage"))
-       (file-name (string-append name "-" version "-checkout"))
-       (sha256
-        (base32
-         "1rpw8xg5p4jsyh236jma9dz3l29wjx4062f154b3wak5yjcxyxyb"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/changepage/"
+                   "source/latex/changepage/"
+                   "tex/latex/changepage/")
+             (base32
+              "0g9zlbqrgxh3p2vys2s84i8v590qi4fbpppp5lkaqc1di8kw60lm")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments
-     '(#:tex-directory "latex/changepage"
-       #:tex-format "latex"))
-    (inputs
-     (list texlive-filecontents))
-    (home-page "https://www.ctan.org/pkg/changepage")
+    (arguments (list #:tex-format "latex"))
+    (native-inputs (list texlive-filecontents))
+    (home-page "https://ctan.org/pkg/changepage")
     (synopsis "Margin adjustment and detection of odd/even pages")
     (description
      "The package provides commands to change the page layout in the middle of
-a document, and to robustly check for typesetting on odd or even pages.
-Instructions for use are at the end of the file.  The package is an extraction
-of code from the @code{memoir} class, whose user interface it shares.")
+a document, and to robustly check for typesetting on odd or even pages.  The
+package is an extraction of code from the @code{memoir} class, whose user
+interface it shares.  This package will eventually replace the @code{chngpage}
+package, which is distributed with the package.")
     (license license:lppl1.3+)))
 
-(define-public texlive-latex-eukdate
+(define-deprecated-package texlive-latex-changepage texlive-changepage)
+
+(define-public texlive-eukdate
   (package
-    (name "texlive-latex-eukdate")
+    (name "texlive-eukdate")
     (version (number->string %texlive-revision))
-    (source
-     (origin
-       (method svn-fetch)
-       (uri (svn-reference
-             (url (string-append "svn://www.tug.org/texlive/tags/"
-                                 %texlive-tag "/Master/texmf-dist/"
-                                 "/tex/latex/eukdate"))
-             (revision %texlive-revision)))
-       (file-name (string-append name "-" version "-checkout"))
-       (sha256
-        (base32
-         "18xan116l8w47v560bkw6nbhkrml7g04xrlzk3jrpc7qsyf3n5fz"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/eukdate")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/eukdate")
+    (source (texlive-origin
+             name version
+             (list "doc/latex/eukdate/" "source/latex/eukdate/"
+                   "tex/latex/eukdate/")
+             (base32
+              "1bz32l4500y4sx7ighpcvzfh0z45lzyyxm1dq1knmhdsv46gqaxi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/eukdate")
     (synopsis "UK format dates, with weekday")
     (description
      "The package is used to change the format of @code{\\today}’s date,
-including the weekday, e.g., \"Saturday, 26 June 2008\", the 'UK format', which
-is preferred in many parts of the world, as distinct from that which is used in
-@code{\\maketitle} of the article class, \"June 26, 2008\", the 'US format'.")
+including the weekday, e.g., @samp{Saturday, 26 June 2008}, the UK format,
+which is preferred in many parts of the world, as distinct from that which is
+used in @code{\\maketitle} of the article class, @samp{June 26, 2008}, the US
+format.")
+    (license license:lppl)))
+
+(define-deprecated-package texlive-latex-eukdate texlive-eukdate)
+
+(define-public texlive-euler
+  (package
+    (name "texlive-euler")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/euler/" "source/latex/euler/"
+                   "tex/latex/euler/")
+             (base32
+              "0xd4lniaj243jvmlgfan7rp1zx308cfvpdd02nvvqpdnrwc69irk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/euler")
+    (synopsis "Use AMS Euler fonts for math")
+    (description
+     "This package provides a setup for using the AMS Euler family of fonts
+for mathematics in LaTeX documents. ``The underlying philosophy of Zapf's
+Euler design was to capture the flavour of mathematics as it might be written
+by a mathematician with excellent handwriting.'' The @code{euler} package is
+based on Knuth's macros for the book Concrete Mathematics'.  The text fonts
+for the Concrete book are supported by the @code{beton} package.")
+    (license license:lppl)))
+
+(define-public texlive-extsizes
+  (package
+    (name "texlive-extsizes")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/extsizes/" "tex/latex/extsizes/")
+             (base32
+              "1akxh0x8y1rhmpq8qzqi2bpbm1ffy8x0212jkyib7gm1i1d9ijgl")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/extsizes")
+    (synopsis "Extend the standard classes' size options")
+    (description
+     "This package provides classes @code{extarticle}, @code{extreport},
+@code{extletter}, @code{extbook} and @code{extproc} which provide for
+documents with a base font size from 8-20pt.  There is also a LaTeX package,
+@file{extsizes.sty}, which can be used with nonstandard document classes.  But
+it cannot be guaranteed to work with any given class.")
     (license license:lppl)))
 
 (define-public texlive-ulem
   (package
-    (inherit (simple-texlive-package
-              "texlive-ulem"
-              (list "doc/generic/ulem/" "tex/generic/ulem/")
-              (base32 "0wcfnw5h6lsg2ilvkkf7mns8jgcn0n5sh45iznfsb49pfb4mming")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/ulem")
-    (synopsis "Underline text in TeX")
+    (name "texlive-ulem")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/ulem/" "tex/generic/ulem/")
+             (base32
+              "0wcfnw5h6lsg2ilvkkf7mns8jgcn0n5sh45iznfsb49pfb4mming")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ulem")
+    (synopsis "Package for underlining")
     (description
      "The package provides an @code{\\ul} (underline) command which will break
-over line ends; this technique may be used to replace @code{\\em} (both in that
-form and as the @code{\\emph} command), so as to make output look as if it comes
-from a typewriter.  The package also offers double and wavy underlining, and
-striking out (line through words) and crossing out (/// over words).")
+over line ends; this technique may be used to replace @code{\\em} (both in
+that form and as the @code{\\emph} command), so as to make output look as if
+it comes from a typewriter.  The package also offers double and wavy
+underlining, and striking out, and crossing out.")
     (license license:lppl1.3c+)))
 
+(define-public texlive-pdfarticle
+  (package
+    (name "texlive-pdfarticle")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/pdfarticle/"
+                   "tex/lualatex/pdfarticle/")
+             (base32
+              "16cy8n3hws1gm3bsv3h4mwnpvaajiy5sj6hpchy0r9hq28liara4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pdfarticle")
+    (synopsis "Class for PDF publications")
+    (description
+     "pdfArticle is simple document class dedicated for creating PDF documents
+with LuaLaTeX.")
+    (license license:expat)))
+
+(define-public texlive-pdfextra
+  (package
+    (name "texlive-pdfextra")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/optex/pdfextra/" "tex/luatex/pdfextra/"
+                   "tex/optex/pdfextra/")
+             (base32
+              "0vv7vidcvi6c9bg9rdp00d324d3xfyazpwlc7l4vggz1w6n8l96y")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pdfextra")
+    (synopsis "Extra PDF features for (Op)TeX")
+    (description
+     "This package provides extra PDF features for OpTeX (or in limited form
+for plain LuaTeX and LuaLaTeX).  As a minimalistic format, OpTeX does not
+support advanced features of the PDF file format in its base.  This third
+party package aims to provide them.  As such, it supports insertion of
+multimedia (audio, video, 3D), hyperlinks and other actions, triggering
+events, transitions, and attachments.")
+    (license license:bsd-0)))
+
+(define-public texlive-penlight
+  (package
+    (name "texlive-penlight")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/penlight/"
+                   "tex/luatex/penlight/")
+             (base32
+              "1jdq8x0rbknlvrlh2wc7q5gd463xhi845ajkkiirz65n23m7wyg6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/penlight")
+    (synopsis "Penlight Lua libraries made available to LuaLaTeX users")
+    (description
+     "This LuaLaTeX package provides a wrapper to use the penlight Lua
+libraries with LuaLaTeX, with some extra functionality added.")
+    (license license:expat)))
+
 (define-public texlive-pgf
   (package
-    (inherit (simple-texlive-package
-              "texlive-pgf"
-              (list "doc/generic/pgf/"
-                    "scripts/pgf/"
-                    "source/generic/pgf/c/"
-                    "source/generic/pgf/testsuite/external/"
-                    "source/generic/pgf/testsuite/mathtest/"
-                    "tex/context/third/pgf/basiclayer/"
-                    "tex/context/third/pgf/frontendlayer/"
-                    "tex/context/third/pgf/math/"
-                    "tex/context/third/pgf/systemlayer/"
-                    "tex/context/third/pgf/utilities/"
-                    "tex/generic/pgf/"
-                    "tex/latex/pgf/basiclayer/"
-                    "tex/latex/pgf/compatibility/"
-                    "tex/latex/pgf/doc/"
-                    "tex/latex/pgf/frontendlayer/"
-                    "tex/latex/pgf/math/"
-                    "tex/latex/pgf/systemlayer/"
-                    "tex/latex/pgf/utilities/"
-                    "tex/plain/pgf/basiclayer/"
-                    "tex/plain/pgf/frontendlayer/"
-                    "tex/plain/pgf/math/"
-                    "tex/plain/pgf/systemlayer/"
-                    "tex/plain/pgf/utilities/")
-              (base32
-               "02qfx9k0ggqfrbrjpfz74w8rkvvzk07rmgr37r7y64gggwpn4cw5")
-              #:trivial? #t))
+    (name "texlive-pgf")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/pgf/"
+                   "tex/context/third/pgf/basiclayer/"
+                   "tex/context/third/pgf/frontendlayer/"
+                   "tex/context/third/pgf/math/"
+                   "tex/context/third/pgf/systemlayer/"
+                   "tex/context/third/pgf/utilities/"
+                   "tex/generic/pgf/"
+                   "tex/latex/pgf/basiclayer/"
+                   "tex/latex/pgf/compatibility/"
+                   "tex/latex/pgf/doc/"
+                   "tex/latex/pgf/frontendlayer/"
+                   "tex/latex/pgf/math/"
+                   "tex/latex/pgf/systemlayer/"
+                   "tex/latex/pgf/utilities/"
+                   "tex/plain/pgf/basiclayer/"
+                   "tex/plain/pgf/frontendlayer/"
+                   "tex/plain/pgf/math/"
+                   "tex/plain/pgf/systemlayer/"
+                   "tex/plain/pgf/utilities/")
+             (base32
+              "16kdxcyk60i1c8y3i3d0v2076kapg2vs2pd4pbb434w3vjf8jfm5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (propagated-inputs
      (list texlive-atveryend
            texlive-fp
@@ -9666,680 +20626,558 @@ striking out (line through words) and crossing out (/// over words).")
            texlive-ms
            texlive-pdftexcmds
            texlive-xcolor))
-    (home-page "https://ctan.org/graphics/pgf/base")
+    (home-page "https://ctan.org/pkg/pgf")
     (synopsis "Create PostScript and PDF graphics in TeX")
     (description
      "PGF is a macro package for creating graphics.  It is platform- and
 format-independent and works together with the most important TeX backend
-drivers, including pdfTeX and dvips.  It comes with a user-friendly syntax layer
-called TikZ.  Its usage is similar to pstricks and the standard picture
-environment.  PGF works with plain (pdf-)TeX, (pdf-)LaTeX, and ConTeXt.  Unlike
-pstricks, it can produce either PostScript or PDF output.")
+drivers, including pdfTeX and dvips.  It comes with a user-friendly syntax
+layer called TikZ.  Its usage is similar to @code{pstricks} and the standard
+@code{picture} environment.  PGF works with plain (pdf-)TeX, (pdf-)LaTeX, and
+ConTeXt.  Unlike @code{pstricks}, it can produce either PostScript or PDF
+output.")
     ;; The code of the package is dual-license: GPL-2 or LPPL-1.3c+.  The
     ;; documentation is also dual-license: LPPL-1.3c+ or GFDL-1.2.
     (license (list license:gpl2 license:lppl1.3c+ license:fdl1.2+))))
 
 (define-deprecated-package texlive-latex-pgf texlive-pgf)
 
-(define-public texlive-latex-koma-script
+(define-public texlive-piton
   (package
-    (name "texlive-latex-koma-script")
+    (name "texlive-piton")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/koma-script"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1m6i8162r6ka19q517llrf0lax80rrsq564qirwk1chv5dqsmnfi"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils)
-                      (ice-9 match))
-         (let ((root (string-append (assoc-ref %outputs "out")
-                                    "/share/texmf-dist/"))
-               (pkgs '(("source" . "tex/latex/koma-script"))))
-           (for-each (match-lambda
-                       ((pkg . dir)
-                        (let ((target (string-append root dir)))
-                          (mkdir-p target)
-                          (copy-recursively (assoc-ref %build-inputs pkg)
-                                            target))))
-                     pkgs)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/koma-script")
-    (synopsis "Bundle of versatile classes and packages")
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/piton/"
+                   "source/lualatex/piton/"
+                   "tex/lualatex/piton/")
+             (base32
+              "123ir1hnla5klkvb13qw1mkfnpbwk61lxli0851qf33g72c8qc4r")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/piton")
+    (synopsis "Typeset Python listings with LPEG")
     (description
-     "The KOMA-Script bundle provides replacements for the article, report, and
-book classes with emphasis on typography and versatility.  There is also a
-letter class.
-
-The bundle also offers:
+     "This package uses the Lua library LPEG to typeset and highlight Python
+listings.")
+    (license license:lppl1.3+)))
 
-@itemize
-@item a package for calculating type areas in the way laid down by the
-typographer Jan Tschichold,
-@item packages for easily changing and defining page styles,
-@item a package scrdate for getting not only the current date but also the name
-of the day, and
-@item a package scrtime for getting the current time.
-@end itemize
+(define-public texlive-placeat
+  (package
+    (name "texlive-placeat")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/placeat/" "scripts/placeat/"
+                   "source/lualatex/placeat/"
+                   "tex/lualatex/placeat/")
+             (base32
+              "0lwr71sxrs1idy2nqqn2xsi3pmgv0hyfkhhiyir53cix203n18aq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/placeat")
+    (synopsis "Absolute content positioning")
+    (description
+     "The package provides commands so that the user of LuaLaTeX may position
+arbitrary content at any position specified by absolute coordinates on the
+page.  The package draws a grid on each page of the document, to aid
+positioning (the grid may be disabled, for final copy using the command
+\\placeatsetup).")
+    (license license:lppl1.3+)))
 
-All these packages may be used not only with KOMA-Script classes but also with
-the standard classes.
+(define-public texlive-plantuml
+  (package
+    (name "texlive-plantuml")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/plantuml/"
+                   "tex/lualatex/plantuml/")
+             (base32
+              "00ram4dm1n7v9xd50xhvp1jxih4y431sq05snqaxj292ib0yh5b8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/plantuml")
+    (synopsis
+     "Support for rendering UML diagrams using syntax and tool of PlantUML")
+    (description
+     "The package provides support for rendering UML diagrams using the syntax
+and tools of PlantUML.  The PlantUML syntax is very short and thus enables
+quickly specifying UML diagrams.  Using @command{dot}, PlantUML layouts the
+diagrams.")
+    (license license:lppl1.3c)))
 
-Since every package has its own version number, the version number quoted only
-refers to the version of scrbook, scrreprt, scrartcl, scrlttr2 and
-typearea (which are the main parts of the bundle).")
+(define-public texlive-pyluatex
+  (package
+    (name "texlive-pyluatex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/pyluatex/"
+                   "tex/lualatex/pyluatex/")
+             (base32
+              "0dwqi0m3qf6s41wpavngq1c4wn8yjfas798r4a53wr20y3ajhqnn")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pyluatex")
+    (synopsis "Execute Python code on the fly in your LaTeX documents")
+    (description
+     "PyLuaTeX allows you to execute Python code and to include the resulting
+output in your LaTeX documents in a single compilation run.  LaTeX documents
+must be compiled with LuaLaTeX for this to work.  PyLuaTeX runs a Python
+InteractiveInterpreter (actually several if you use different sessions) in the
+background for on-the-fly code execution.  Python code from your LaTeX file is
+sent to the background interpreter through a TCP socket.  This approach allows
+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")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/koma-script/"
+                   "source/latex/koma-script/doc/"
+                   "tex/latex/koma-script/")
+             (base32
+              "192jlijzrqipdi2bxg1562259zxivpzm8clbnpr0fk1rr1nc2lz1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-footmisc))
+    (home-page "https://ctan.org/pkg/koma-script")
+    (synopsis "Bundle of versatile classes and packages")
+    (description
+     "The KOMA-Script bundle provides replacements for the article, report,
+and book classes with emphasis on typography and versatility.  There is also
+a letter class.  The bundle also offers: a package for calculating type areas
+in the way laid down by the typographer Jan Tschichold, packages for easily
+changing and defining page styles, a package @code{scrdate} for getting not
+only the current date but also the name of the day, and a package
+@code{scrtime} for getting the current time.  All these packages may be used
+not only with KOMA-Script classes but also with the standard classes.")
+    (license license:lppl1.3c+)))
+
+(define-deprecated-package texlive-latex-koma-script texlive-koma-script)
+
 (define-public texlive-atbegshi
-  (let ((template (simple-texlive-package
-                   "texlive-atbegshi"
-                   (list "doc/latex/atbegshi/"
-                         "source/latex/atbegshi/"
-                         "tex/generic/atbegshi/")
-                   (base32
-                    "0vd90wdjwj5w4g4xka4nms3rgixjw63iwf0hj0v1akcfflwvgn69"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/atbegshi")
-         ((#:build-targets _ '())
-          #~(list "atbegshi.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/atbegshi")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/atbegshi")
-      (synopsis "Execute commands at @code{\\shipout} time")
-      (description
-       "This package is a modern reimplementation of package @code{everyshi},
+  (package
+    (name "texlive-atbegshi")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/atbegshi/" "source/latex/atbegshi/"
+                   "tex/generic/atbegshi/")
+             (base32
+              "0vd90wdjwj5w4g4xka4nms3rgixjw63iwf0hj0v1akcfflwvgn69")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:texlive-latex-bin? #f))
+    (native-inputs (list texlive-docstrip texlive-pdftex))
+    (home-page "https://ctan.org/pkg/atbegshi")
+    (synopsis "Execute commands at @code{\\shipout} time")
+    (description
+     "This package is a modern reimplementation of package @code{everyshi},
 providing various commands to be executed before a @code{\\shipout} command.
 It makes use of e-TeX’s facilities if they are available.  The package may
 be used either with LaTeX or with plain TeX.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-generic-atbegshi texlive-atbegshi)
 
 (define-public texlive-bigintcalc
-  (let ((template (simple-texlive-package
-                   "texlive-bigintcalc"
-                   (list "doc/latex/bigintcalc/"
-                         "source/latex/bigintcalc/"
-                         "tex/generic/bigintcalc/")
-                   (base32
-                    "1cyv4mcvx83ab782l6h2f86a63ipm845r7hv1m6f1z2336vy7rc5"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/bigintcalc")
-         ((#:build-targets _ '())
-          #~(list "bigintcalc.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/bigintcalc")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (propagated-inputs
-       (list texlive-pdftexcmds))
-      (home-page "https://www.ctan.org/pkg/bigintcalc")
-      (synopsis "Integer calculations on very large numbers")
-      (description
-       "This package provides expandable arithmetic operations with big
-integers that can exceed TeX's number limits.")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-bigintcalc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/bigintcalc/"
+                   "source/latex/bigintcalc/"
+                   "tex/generic/bigintcalc/")
+             (base32
+              "1cyv4mcvx83ab782l6h2f86a63ipm845r7hv1m6f1z2336vy7rc5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bigintcalc")
+    (synopsis "Integer calculations on very large numbers")
+    (description
+     "This package provides expandable arithmetic operations with big integers
+that can exceed TeX's number limits.")
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-generic-bigintcalc texlive-bigintcalc)
 
 (define-public texlive-bitset
-  (let ((template (simple-texlive-package
-                   "texlive-bitset"
-                   (list "doc/latex/bitset/"
-                         "source/latex/bitset/"
-                         "tex/generic/bitset/")
-                   (base32
-                    "1q7vk5gr5a4vaa3l20j178cg2q7a99rxdiyxhzpx9a6lfqfkjddz"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/bitset")
-         ((#:build-targets _ '())
-          #~(list "bitset.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/bitset")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (propagated-inputs
-       (list texlive-bigintcalc texlive-infwarerr texlive-intcalc))
-      (home-page "https://www.ctan.org/pkg/bitset")
-      (synopsis "Handle bit-vector datatype")
-      (description
-       "This package defines and implements the data type bit set, a vector
-of bits.  The size of the vector may grow dynamically.  Individual bits
-can be manipulated.")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-bitset")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/bitset/" "source/latex/bitset/"
+                   "tex/generic/bitset/")
+             (base32
+              "1q7vk5gr5a4vaa3l20j178cg2q7a99rxdiyxhzpx9a6lfqfkjddz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-bigintcalc))
+    (home-page "https://ctan.org/pkg/bitset")
+    (synopsis "Handle bit-vector datatype")
+    (description
+     "This package defines and implements the data type bit set, a vector of
+bits.  The size of the vector may grow dynamically.  Individual bits can be
+manipulated.")
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-generic-bitset texlive-bitset)
 
 (define-public texlive-etexcmds
-  (let ((template (simple-texlive-package
-                   "texlive-etexcmds"
-                   (list "doc/latex/etexcmds/"
-                         "source/latex/etexcmds/"
-                         "tex/generic/etexcmds/")
-                   (base32
-                    "13cf1fs5x9d8749b2jgxmgnkrx0r4hwpl389r15kq3ldz9jfl627"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/etexcmds")
-         ((#:build-targets _ '())
-          #~(list "etexcmds.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/etexcmds")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (propagated-inputs
-       (list texlive-iftex texlive-infwarerr))
-      (home-page "https://www.ctan.org/pkg/etexcmds")
-      (synopsis "Avoid name clashes with e-TeX commands")
-      (description
-       "New primitive commands are introduced in e-TeX; sometimes the names
-collide with existing macros.  This package solves the name clashes by
-adding a prefix to e-TeX’s commands.  For example, ε-TeX’s
-@code{\\unexpanded} is provided as @code{\\etex@@unexpanded}.")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-etexcmds")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/etexcmds/" "source/latex/etexcmds/"
+                   "tex/generic/etexcmds/")
+             (base32
+              "13cf1fs5x9d8749b2jgxmgnkrx0r4hwpl389r15kq3ldz9jfl627")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/etexcmds")
+    (synopsis "Avoid name clashes with e-TeX commands")
+    (description
+     "New primitive commands are introduced in e-TeX; sometimes the names
+collide with existing macros.  This package solves the name clashes by adding
+a prefix to e-TeX’s commands.  For example, ε-TeX’s @code{\\unexpanded} is
+provided as @code{\\etex@@unexpanded}.")
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-generic-etexcmds texlive-etexcmds)
 
+(define-public texlive-etextools
+  (package
+    (name "texlive-etextools")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/etextools/"
+                   "source/latex/etextools/"
+                   "tex/latex/etextools/")
+             (base32
+              "0bfcc8g8q5v1nyqmrg8n17hv4k8yvhsplansvriccpmvyx0w9y9d")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/etextools")
+    (synopsis "e-TeX tools for LaTeX users and package writers")
+    (description
+     "The package provides many (purely expandable) tools for LaTeX: extensive
+list management; purely expandable loops; conversion; addition/deletion;
+expansion and group control; tests on tokens, characters and control
+sequences; tests on strings; purely expandable macros with options or
+modifiers; some purely expandable numerics.")
+    (license license:lppl)))
+
 (define-public texlive-gettitlestring
-  (let ((template (simple-texlive-package
-                   "texlive-gettitlestring"
-                   (list "doc/latex/gettitlestring/"
-                         "source/latex/gettitlestring/"
-                         "tex/generic/gettitlestring/")
-                   (base32
-                    "1vbvmwrpsvy37gbwdmsqbbsicjiww3i0bh1yqnb75jiya9an0sjb"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/gettitlestring")
-         ((#:build-targets _ '())
-          #~(list "gettitlestring.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/gettitlestring")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/gettitlestring")
-      (synopsis "Clean up title references")
-      (description
-       "This package provides commands for cleaning up the title string
+  (package
+    (name "texlive-gettitlestring")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/gettitlestring/"
+                   "source/latex/gettitlestring/"
+                   "tex/generic/gettitlestring/")
+             (base32
+              "1vbvmwrpsvy37gbwdmsqbbsicjiww3i0bh1yqnb75jiya9an0sjb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/gettitlestring")
+    (synopsis "Clean up title references")
+    (description
+     "This package provides commands for cleaning up the title string
 (such as removing @code{\\label} commands) for packages that typeset such
 strings.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-generic-gettitlestring texlive-gettitlestring)
 
 (define-public texlive-infwarerr
-  (let ((template (simple-texlive-package
-                   "texlive-infwarerr"
-                   (list "doc/latex/infwarerr/"
-                         "source/latex/infwarerr/"
-                         "tex/generic/infwarerr/")
-                   (base32
-                    "0lpcrpf3d6xfdp68ri22126x57mvmq5dpj9np68ph8p8lhvhqdjd"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/infwarerr")
-         ((#:build-targets _ '())
-          #~(list "infwarerr.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/infwarerr")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/infwarerr")
-      (synopsis "Information/warning/error macros")
-      (description
-       "This package provides a complete set of macros for information,
-warning and error messages.  Under LaTeX, the commands are wrappers for
-the corresponding LaTeX commands; under Plain TeX they are available as
-complete implementations.")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-infwarerr")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/infwarerr/"
+                   "source/latex/infwarerr/"
+                   "tex/generic/infwarerr/")
+             (base32
+              "0lpcrpf3d6xfdp68ri22126x57mvmq5dpj9np68ph8p8lhvhqdjd")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/infwarerr")
+    (synopsis "Complete set of information/warning/error message macros")
+    (description
+     "This package provides a complete set of macros for information, warning
+and error messages.  Under LaTeX, the commands are wrappers for the
+corresponding LaTeX commands; under Plain TeX they are available as complete
+implementations.")
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-generic-infwarerr texlive-infwarerr)
 
 (define-public texlive-intcalc
-  (let ((template (simple-texlive-package
-                   "texlive-intcalc"
-                   (list "doc/latex/intcalc/"
-                         "source/latex/intcalc/"
-                         "tex/generic/intcalc/")
-                   (base32
-                    "15alwp9cr8wasfajs3p201p7nqml37vly9mpg1j5l6xv95javk7x"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/intcalc")
-         ((#:build-targets _ '())
-          #~(list "intcalc.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/intcalc")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/intcalc")
-      (synopsis "Expandable arithmetic operations with integers")
-      (description
-       "This package provides expandable arithmetic operations with integers,
+  (package
+    (name "texlive-intcalc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/intcalc/" "source/latex/intcalc/"
+                   "tex/generic/intcalc/")
+             (base32
+              "15alwp9cr8wasfajs3p201p7nqml37vly9mpg1j5l6xv95javk7x")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/intcalc")
+    (synopsis "Expandable arithmetic operations with integers")
+    (description
+     "This package provides expandable arithmetic operations with integers,
 using the e-TeX extension @code{\\numexpr} if it is available.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-generic-intcalc texlive-intcalc)
 
 (define-public texlive-kvdefinekeys
-  (let ((template (simple-texlive-package
-                   "texlive-kvdefinekeys"
-                   (list "doc/latex/kvdefinekeys/"
-                         "source/latex/kvdefinekeys/"
-                         "tex/generic/kvdefinekeys/")
-                   (base32
-                    "1026h223ph3nzhs6jqbasa0bzsrdg3zgllfcwwcavfzb5i6p9jdf"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/kvdefinekeys")
-         ((#:build-targets _ '())
-          #~(list "kvdefinekeys.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/kvdefinekeys")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/kvdefinekeys")
-      (synopsis "Define keys for use in the @code{kvsetkeys} package")
-      (description
-       "This package provides the @code{\\kv@@define@@key} (analogous to
+  (package
+    (name "texlive-kvdefinekeys")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/kvdefinekeys/"
+                   "source/latex/kvdefinekeys/"
+                   "tex/generic/kvdefinekeys/")
+             (base32
+              "1026h223ph3nzhs6jqbasa0bzsrdg3zgllfcwwcavfzb5i6p9jdf")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/kvdefinekeys")
+    (synopsis "Define keys for use in the @code{kvsetkeys} package")
+    (description
+     "This package provides the @code{\\kv@@define@@key} (analogous to
 keyval’s @code{\\define@@key}, to define keys for use by @code{kvsetkeys}.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-generic-kvdefinekeys texlive-kvdefinekeys)
 
 (define-public texlive-kvsetkeys
-  (let ((template (simple-texlive-package
-                   "texlive-kvsetkeys"
-                   (list "doc/latex/kvsetkeys/"
-                         "source/latex/kvsetkeys/"
-                         "tex/generic/kvsetkeys/")
-                   (base32
-                    "0b2f2r49vi8x54qshm1h9sh8zhdmy0mc2y44yd05kcmmbiiq7hfz"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/kvsetkeys")
-         ((#:build-targets _ '())
-          #~(list "kvsetkeys.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/kvsetkeys")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/kvsetkeys")
-      (synopsis "Key value parser with default handler support")
-      (description
-       "This package provides @code{\\kvsetkeys}, a variant of @code{\\setkeys}
+  (package
+    (name "texlive-kvsetkeys")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/kvsetkeys/"
+                   "source/latex/kvsetkeys/"
+                   "tex/latex/kvsetkeys/")
+             (base32
+              "0c4f4sgb3xpxmvphrvzbyqa2vl7sp2j52hb99spmpbqwgj9j61qx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/kvsetkeys")
+    (synopsis "Key value parser with default handler support")
+    (description
+     "This package provides @code{\\kvsetkeys}, a variant of @code{\\setkeys}
 from the @code{keyval} package.  Users can specify a handler that deals with
 unknown options.  Active commas and equal signs may be used, and only one
 level of curly braces are removed from the values.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-generic-kvsetkeys texlive-kvsetkeys)
 
-(define-public texlive-generic-listofitems
+(define-public texlive-listofitems
   (package
-    (name "texlive-generic-listofitems")
+    (name "texlive-listofitems")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/generic/listofitems"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1wnbnfrhi6hgqa78jsw6hljzi03i5x99mlr5n2419hgws52hk67y"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/generic/listofitems")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/listofitems")
+    (source (texlive-origin
+             name version
+             (list "doc/generic/listofitems/"
+                   "tex/generic/listofitems/")
+             (base32
+              "0yy0hw3631shf9rrdiyywr7hs7dvrhvz2a2vkzbwalnyrqdwbyh5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/listofitems")
     (synopsis "Grab items in lists using user-specified separation character")
     (description
-     "This package allows one to capture all the items of a list, for which
-the parsing character has been selected by the user, and to access any of
-these items with a simple syntax.")
+     "This package is designed to read a list, for which the parsing character
+has been selected by the user, and to access any of these items with a simple
+interface.")
     (license license:lppl1.3c+)))
 
+(define-deprecated-package texlive-generic-listofitems texlive-listofitems)
+
 (define-public texlive-ltxcmds
-  (let ((template (simple-texlive-package
-                   "texlive-ltxcmds"
-                   (list "doc/generic/ltxcmds/"
-                         "source/generic/ltxcmds/"
-                         "tex/generic/ltxcmds/")
-                   (base32
-                    "1izcw9jl64iij541183hc156sjwamvxm7q9fkpfnz8sppyg31fkb"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/ltxcmds")
-         ((#:build-targets _ '())
-          #~(list "ltxcmds.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/generic/ltxcmds")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/ltxcmds")
-      (synopsis "LaTeX kernel commands extracted for general use")
-      (description
-       "This package exports some utility macros from the LaTeX kernel into
-a separate namespace and also makes them available for other formats such
-as plain TeX.")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-ltxcmds")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/ltxcmds/"
+                   "source/generic/ltxcmds/"
+                   "tex/generic/ltxcmds/")
+             (base32
+              "1izcw9jl64iij541183hc156sjwamvxm7q9fkpfnz8sppyg31fkb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ltxcmds")
+    (synopsis "Some LaTeX kernel commands for general use")
+    (description
+     "This package exports some utility macros from the LaTeX kernel into
+a separate namespace and also makes them available for other formats such as
+plain TeX.")
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-generic-ltxcmds texlive-ltxcmds)
 
+(define-public texlive-ltxmisc
+  (package
+    (name "texlive-ltxmisc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/latex/ltxmisc/")
+             (base32
+              "14llkpla8gpx7q6a53sd8a0a42wgk93fg4mbl6pc0v7v1kjblr5m")))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'delete-non-free-file
+                 ;; This file has a non-commercial license.
+                 (lambda _ (delete-file "tex/latex/ltxmisc/vrbexin.sty"))))))
+    (home-page "https://ctan.org/pkg/ltxmisc")
+    (synopsis "Miscellaneous LaTeX packages")
+    (description
+     "This package provides miscellaneous LaTeX packages and classes.")
+    (license (list license:public-domain ;beletter.cls
+                   license:gpl2+         ;bibcheck.sty
+                   license:lppl          ;iagproc.cls
+                   (license:fsf-free "file:/linsys.sty")
+                   license:lppl1.0+)))) ;topcapt.sty
+
 (define-public texlive-pdfescape
-  (let ((template (simple-texlive-package
-                   "texlive-pdfescape"
-                   (list "doc/latex/pdfescape/"
-                         "source/latex/pdfescape/"
-                         "tex/generic/pdfescape/")
-                   (base32
-                    "16a0rdmpa4wxh6gyf46qwfgyh399rwdind2wc89phqd50ky9b5m4"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/pdfescape")
-         ((#:build-targets _ '())
-          #~(list "pdfescape.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/pdfescape")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://www.ctan.org/pkg/pdfescape")
-      (synopsis "pdfTeX's escape features for plain TeX")
-      (description
-       "This package implements pdfTeX's escape features (@code{\\pdfescapehex},
+  (package
+    (name "texlive-pdfescape")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pdfescape/"
+                   "source/latex/pdfescape/"
+                   "tex/generic/pdfescape/")
+             (base32
+              "16a0rdmpa4wxh6gyf46qwfgyh399rwdind2wc89phqd50ky9b5m4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pdfescape")
+    (synopsis "Implements pdfTeX's escape features using TeX or e-TeX")
+    (description
+     "This package implements pdfTeX's escape features (@code{\\pdfescapehex},
 @code{\\pdfunescapehex}, @code{\\pdfescapename}, @code{\\pdfescapestring})
 using TeX or e-TeX.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-generic-pdfescape texlive-pdfescape)
 
 (define-public texlive-uniquecounter
-  (let ((template (simple-texlive-package
-                   "texlive-uniquecounter"
-                   (list "doc/latex/uniquecounter/"
-                         "source/latex/uniquecounter/"
-                         "tex/generic/uniquecounter/")
-                   (base32
-                    "1ll3iwk8x44l3qx1dhna399ngg66vbllivv8i3lwzriwkx22xbf3"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/uniquecounter")
-         ((#:build-targets _ '())
-          #~(list "uniquecounter.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/uniquecounter")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (propagated-inputs
-       (list texlive-bigintcalc texlive-infwarerr))
-      (home-page "https://www.ctan.org/pkg/uniquecounter")
-      (synopsis "Unlimited unique counter")
-      (description
-       "This package provides a kind of counter that provides unique number
-values.  Several counters can be created with different names.  The numeric
-values are not limited.")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-uniquecounter")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/uniquecounter/"
+                   "source/latex/uniquecounter/"
+                   "tex/generic/uniquecounter/")
+             (base32
+              "1ll3iwk8x44l3qx1dhna399ngg66vbllivv8i3lwzriwkx22xbf3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/uniquecounter")
+    (synopsis "Provides unlimited unique counter")
+    (description
+     "This package provides a kind of counter that provides unique number values.
+Several counters can be created with different names.  The numeric values are
+not limited.")
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-generic-uniquecounter texlive-uniquecounter)
 
-(define-public texlive-latex-readarray
+(define-public texlive-readarray
   (package
-    (name "texlive-latex-readarray")
+    (name "texlive-readarray")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/readarray"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0c53k180ivn1n7fz3ngvd2w1i5dw3kxml0n64vhki88xsylz7lxp"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/readarray")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (propagated-inputs
-     (list texlive-generic-listofitems))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/readarray/" "tex/latex/readarray/")
+             (base32
+              "0iy3m20761mp83g59qpx9l20bg3fvm28l64vq735rcha7yqbhf22")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://www.ctan.org/pkg/readarray")
     (synopsis "Read, store and recall array-formatted data")
     (description
-     "This package allows the user to input formatted data into elements of a
-2-D or 3-D array and to recall that data at will by individual cell number.
+     "This package allows the user to input formatted data into elements of
+a 2-D or 3-D array and to recall that data at will by individual cell number.
 The data can be but need not be numerical in nature.  It can be, for example,
 formatted text.")
     (license license:lppl1.3)))
 
-(define-public texlive-latex-verbatimbox
+(define-deprecated-package texlive-latex-readarray texlive-readarray)
+
+(define-public texlive-verbatimbox
   (package
-    (name "texlive-latex-verbatimbox")
+    (name "texlive-verbatimbox")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/verbatimbox"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0qh1cgvfs463zsi2pjg490gj0mkjfdpfc381j10cbb5la304psna"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/verbatimbox")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (propagated-inputs
-     (list texlive-latex-readarray))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/verbatimbox/"
+                   "tex/latex/verbatimbox/")
+             (base32
+              "00n3x075ya3s2qwmcz2vvn8x70pbbgj2cbwz0ifw89jrc4ljisgi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://www.ctan.org/pkg/verbatimbox")
     (synopsis "Deposit verbatim text in a box")
     (description
@@ -10351,98 +21189,88 @@ in places where the standard @code{verbatim} environment (which is based on a
 @code{trivlist}) may not appear.")
     (license license:lppl1.3+)))
 
-(define-public texlive-latex-examplep
+(define-deprecated-package texlive-latex-verbatimbox texlive-verbatimbox)
+
+(define-public texlive-examplep
   (package
-    (name "texlive-latex-examplep")
+    (name "texlive-examplep")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/examplep"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0fsvvmz68ij0zwfzrny6x13d92grxr4ap59lxgah4smbkccd6s27"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/examplep")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/examplep")
+    (source (texlive-origin
+             name version
+             (list "doc/latex/examplep/" "tex/latex/examplep/")
+             (base32
+              "0afbl77i57hxngc3l0czdzmmkhcgh2l4h2dpbg9ax9p9dv8c006n")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/examplep")
     (synopsis "Verbatim phrases and listings in LaTeX")
     (description
-     "Examplep provides sophisticated features for typesetting verbatim source
-code listings, including the display of the source code and its compiled LaTeX
-or METAPOST output side-by-side, with automatic width detection and enabled
-page breaks (in the source), without the need for specifying the source twice.
-Special care is taken that section, page and footnote numbers do not interfere
-with the main document.  For typesetting short verbatim phrases, a replacement
-for the @code{\\verb} command is also provided in the package, which can be
-used inside tables and moving arguments such as footnotes and section
-titles.")
+     "The @code{examplep} package provides sophisticated features for
+typesetting verbatim source code listings, including the display of the source
+code and its compiled LaTeX or Metapost output side-by-side, with automatic
+width detection and enabled page breaks (in the source), without the need for
+specifying the source twice.  Special care is taken that section, page and
+footnote numbers do not interfere with the main document.  For typesetting
+short verbatim phrases, a replacement for the @code{\\verb} command is also
+provided in the package, which can be used inside tables and moving arguments
+such as footnotes and section titles.")
     ;; No version of the GPL is specified.
     (license license:gpl3+)))
 
+(define-deprecated-package texlive-latex-examplep texlive-examplep)
+
 (define-public texlive-xunicode
   (package
-    (inherit
-     (simple-texlive-package "texlive-xunicode"
-                             (list "doc/xelatex/xunicode/"
-                                   "tex/xelatex/xunicode/")
-                             (base32
-                              "1d96i8kd2lhbykc3rxy2jjvws404f2vy1cvdcp5bdr6l9m72q1fa")
-                             #:trivial? #t))
+    (name "texlive-xunicode")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/xunicode/"
+                   "tex/xelatex/xunicode/")
+             (base32
+              "1d96i8kd2lhbykc3rxy2jjvws404f2vy1cvdcp5bdr6l9m72q1fa")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (propagated-inputs (list texlive-tipa))
-    (home-page "https://ctan.org/macros/xetex/latex/xunicode")
+    (home-page "https://ctan.org/pkg/xunicode")
     (synopsis "Generate Unicode characters from accented glyphs")
     (description
-     "The package supports XeTeX's (and other putative future similar engines')
-need for Unicode characters, in a similar way to what the fontenc does for
-8-bit (and the like) fonts: convert accent-glyph sequence to a single Unicode
-character for output.  The package also covers glyphs specified by
+     "The package supports XeTeX's (and other putative future similar
+engines') need for Unicode characters, in a similar way to what the fontenc
+does for 8-bit (and the like) fonts: convert accent-glyph sequence to a single
+Unicode character for output.  The package also covers glyphs specified by
 packages (such as @code{tipa}) which define many commands for single text
 glyphs.")
     (license license:lppl1.3+)))
 
 (define-public texlive-xypic
-  (let ((template (simple-texlive-package
-                   "texlive-xypic"
-                   (list "/doc/generic/xypic/"
-                         "/dvips/xypic/xy389dict.pro"
-                         "/fonts/enc/dvips/xypic/"
-                         "/fonts/map/dvips/xypic/xypic.map"
-
-                         "/fonts/source/public/xypic/"
-                         "/fonts/afm/public/xypic/"
-                         "/fonts/tfm/public/xypic/"
-                         "/fonts/type1/public/xypic/"
-                         "/tex/generic/xypic/")
-                   (base32
-                    "09b51bbm189xh7039h5n8nmab5nn2bybhh26qjn08763m80zdhjg")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (delete 'reset-gzip-timestamps)))))
-      (home-page "https://www.ctan.org/pkg/xypic")
-      (synopsis "Flexible diagramming macros")
-      (description "This is a package for typesetting a variety of graphs and
+  (package
+    (name "texlive-xypic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/xypic/"
+                   "dvips/xypic/"
+                   "fonts/afm/public/xypic/"
+                   "fonts/enc/dvips/xypic/"
+                   "fonts/map/dvips/xypic/"
+                   "fonts/source/public/xypic/"
+                   "fonts/tfm/public/xypic/"
+                   "fonts/type1/public/xypic/"
+                   "tex/generic/xypic/")
+             (base32
+              "09b51bbm189xh7039h5n8nmab5nn2bybhh26qjn08763m80zdhjg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-cm texlive-metafont))
+    (home-page "https://ctan.org/pkg/xypic")
+    (synopsis "Flexible diagramming macros")
+    (description
+     "This package provides a package for typesetting a variety of graphs and
 diagrams with TeX.  Xy-pic works with most formats (including LaTeX,
 AMS-LaTeX, AMS-TeX, and plain TeX).  The distribution includes Michael Barr's
 @code{diag} package, which was previously distributed stand-alone.")
-      (license license:gpl3+))))
+    (license license:gpl3+)))
 
 (define-deprecated-package texlive-fonts-xypic texlive-xypic)
 
@@ -10452,30 +21280,20 @@ AMS-LaTeX, AMS-TeX, and plain TeX).  The distribution includes Michael Barr's
   (package
     (name "texlive-bibtex")
     (version (number->string %texlive-revision))
-    (source
-     (origin
-       (method svn-fetch)
-       (uri (svn-reference
-             (url (string-append "svn://www.tug.org/texlive/tags/"
-                                 %texlive-tag "/Master/texmf-dist/"
-                                 "/bibtex"))
-             (revision %texlive-revision)))
-       (file-name (string-append name "-" version "-checkout"))
-       (sha256
-        (base32
-         "0fr0s3jhrvplddb42if570dxllz54fa0pf4d2am27h8m385nghbf"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/bibtex")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/bibtex")
+    (source (texlive-origin
+             name version
+             (list "bibtex/bib/base/"
+                   "bibtex/bst/base/"
+                   "doc/bibtex/base/"
+                   "doc/man/man1/bibtex.1"
+                   "doc/man/man1/bibtex.man1.pdf"
+                   "tex/generic/bibtex/")
+             (base32
+              "0iyaxab3wyhy3nw0id892aklpqf17z1cl85v4m3rjy5nmb8darn9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-kpathsea))
+    (home-page "https://ctan.org/pkg/bibtex")
     (synopsis "Process bibliographies for LaTeX")
     (description
      "BibTeX allows the user to store his citation data in generic form, while
@@ -10486,18 +21304,21 @@ package, such as @command{natbib} as well).")
 
 (define-public texlive-charter
   (package
-    (inherit (simple-texlive-package
-              "texlive-charter"
-              (list "/doc/fonts/charter/readme.charter"
-                    "/fonts/afm/bitstrea/charter/"
-                    "/fonts/tfm/bitstrea/charter/"
-                    "/fonts/type1/bitstrea/charter/"
-                    "/fonts/vf/bitstrea/charter/")
-              (base32
-               "09l5ymgz48s3hyn776l01g3isk3dnhrj1vdavdw4qq4kfxxpqdn9")
-              #:trivial? #t))
-    ;; This provides charter.map.
+    (name "texlive-charter")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/charter/"
+                   "fonts/afm/bitstrea/charter/"
+                   "fonts/tfm/bitstrea/charter/"
+                   "fonts/type1/bitstrea/charter/"
+                   "fonts/vf/bitstrea/charter/")
+             (base32
+              "09l5ymgz48s3hyn776l01g3isk3dnhrj1vdavdw4qq4kfxxpqdn9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (propagated-inputs
+     ;; This provides charter.map.
      (list texlive-psnfss))
     (home-page "https://www.ctan.org/pkg/charter")
     (synopsis "Charter fonts for TeX")
@@ -10510,119 +21331,940 @@ Support for use with LaTeX is available in @code{freenfss}, part of
 
 (define-deprecated-package texlive-fonts-charter texlive-charter)
 
+(define-public texlive-chngcntr
+  (package
+    (name "texlive-chngcntr")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/chngcntr/" "tex/latex/chngcntr/")
+             (base32
+              "0ag1hb1vkl0xdzslp6f0j59dijwr9k9kq7vaada148241q0hflbj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/chngcntr")
+    (synopsis "Change the resetting of counters")
+    (description
+     "This package defines commands @code{\\counterwithin} (which sets up
+a counter to be reset when another is incremented) and
+@code{\\counterwithout} (which unsets such a relationship).")
+    (license license:lppl)))
+
 (define-public texlive-context
   (package
-    (inherit (simple-texlive-package
-              "texlive-context"
-              (list "/doc/context/"
-                    "/doc/man/man1/context.1"
-                    "/doc/man/man1/luatools.1"
-                    "/doc/man/man1/mtx-babel.1"
-                    "/doc/man/man1/mtx-base.1"
-                    "/doc/man/man1/mtx-bibtex.1"
-                    "/doc/man/man1/mtx-cache.1"
-                    "/doc/man/man1/mtx-chars.1"
-                    "/doc/man/man1/mtx-check.1"
-                    "/doc/man/man1/mtx-colors.1"
-                    "/doc/man/man1/mtx-context.1"
-                    "/doc/man/man1/mtx-dvi.1"
-                    "/doc/man/man1/mtx-epub.1"
-                    "/doc/man/man1/mtx-evohome.1"
-                    "/doc/man/man1/mtx-fcd.1"
-                    "/doc/man/man1/mtx-flac.1"
-                    "/doc/man/man1/mtx-fonts.1"
-                    "/doc/man/man1/mtx-grep.1"
-                    "/doc/man/man1/mtx-interface.1"
-                    "/doc/man/man1/mtx-metapost.1"
-                    "/doc/man/man1/mtx-modules.1"
-                    "/doc/man/man1/mtx-package.1"
-                    "/doc/man/man1/mtx-pdf.1"
-                    "/doc/man/man1/mtx-plain.1"
-                    "/doc/man/man1/mtx-profile.1"
-                    "/doc/man/man1/mtx-rsync.1"
-                    "/doc/man/man1/mtx-scite.1"
-                    "/doc/man/man1/mtx-server.1"
-                    "/doc/man/man1/mtx-texworks.1"
-                    "/doc/man/man1/mtx-timing.1"
-                    "/doc/man/man1/mtx-tools.1"
-                    "/doc/man/man1/mtx-unicode.1"
-                    "/doc/man/man1/mtx-unzip.1"
-                    "/doc/man/man1/mtx-update.1"
-                    "/doc/man/man1/mtx-watch.1"
-                    "/doc/man/man1/mtx-youless.1"
-
-                    "/bibtex/bst/context/"
-                    "/context/"
-
-                    "/fonts/afm/hoekwater/context/contnav.afm"
-                    "/fonts/cid/fontforge/Adobe-CNS1-4.cidmap"
-                    "/fonts/cid/fontforge/Adobe-GB1-4.cidmap"
-                    "/fonts/cid/fontforge/Adobe-Identity-0.cidmap"
-                    "/fonts/cid/fontforge/Adobe-Japan1-5.cidmap"
-                    "/fonts/cid/fontforge/Adobe-Japan1-6.cidmap"
-                    "/fonts/cid/fontforge/Adobe-Japan2-0.cidmap"
-                    "/fonts/cid/fontforge/Adobe-Korea1-2.cidmap"
-                    "/fonts/enc/dvips/context/"
-                    "/fonts/map/dvips/context/"
-                    "/fonts/map/luatex/context/"
-                    "/fonts/map/pdftex/context/"
-                    "/fonts/misc/xetex/fontmapping/context/"
-                    "/fonts/tfm/hoekwater/context/"
-                    "/fonts/type1/hoekwater/context/"
-                    "/metapost/context/"
-                    "/scripts/context/"
-                    "/tex/context/base/"
-                    "/tex/context/bib/"
-                    "/tex/context/colors/"
-                    "/tex/context/fonts/"
-                    "/tex/context/interface/"
-                    "/tex/context/modules/"
-                    "/tex/context/patterns/"
-                    "/tex/context/sample/"
-                    "/tex/context/test/"
-                    "/tex/context/user/"
-                    "/tex/generic/context/"
-                    "/tex/latex/context/")
-              (base32
-               "1rsw760f52rj62i7ms89xgxdi0qw6hag5fs5hb667nclr4kdkam8")
-              #:trivial? #t))
-    ;; TODO: add these missing packages:
-    ;; xetex, luatex, lm-math, manfnt-font, and mptopdf
+    (name "texlive-context")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bst/context/mkii/"
+                   "context/data/scite/context/"
+                   "context/data/texworks/"
+                   "context/data/vscode/"
+                   "doc/context/documents/general/leaflets/"
+                   "doc/context/documents/general/magazines/"
+                   "doc/context/documents/general/manuals/"
+                   "doc/context/documents/general/qrcs/"
+                   "doc/context/examples/calculator/"
+                   "doc/context/examples/clock/"
+                   "doc/context/presentations/"
+                   "doc/context/scripts/mkii/"
+                   "doc/context/scripts/mkiv/"
+                   "doc/context/sources/general/leaflets/"
+                   "doc/context/sources/general/magazines/"
+                   "doc/context/sources/general/manuals/"
+                   "doc/man/man1/context.1"
+                   "doc/man/man1/context.man1.pdf"
+                   "doc/man/man1/luatools.1"
+                   "doc/man/man1/luatools.man1.pdf"
+                   "doc/man/man1/mtx-babel.1"
+                   "doc/man/man1/mtx-babel.man1.pdf"
+                   "doc/man/man1/mtx-base.1"
+                   "doc/man/man1/mtx-base.man1.pdf"
+                   "doc/man/man1/mtx-bibtex.1"
+                   "doc/man/man1/mtx-bibtex.man1.pdf"
+                   "doc/man/man1/mtx-cache.1"
+                   "doc/man/man1/mtx-cache.man1.pdf"
+                   "doc/man/man1/mtx-chars.1"
+                   "doc/man/man1/mtx-chars.man1.pdf"
+                   "doc/man/man1/mtx-check.1"
+                   "doc/man/man1/mtx-check.man1.pdf"
+                   "doc/man/man1/mtx-colors.1"
+                   "doc/man/man1/mtx-colors.man1.pdf"
+                   "doc/man/man1/mtx-context.1"
+                   "doc/man/man1/mtx-context.man1.pdf"
+                   "doc/man/man1/mtx-dvi.1"
+                   "doc/man/man1/mtx-dvi.man1.pdf"
+                   "doc/man/man1/mtx-epub.1"
+                   "doc/man/man1/mtx-epub.man1.pdf"
+                   "doc/man/man1/mtx-evohome.1"
+                   "doc/man/man1/mtx-evohome.man1.pdf"
+                   "doc/man/man1/mtx-fcd.1"
+                   "doc/man/man1/mtx-fcd.man1.pdf"
+                   "doc/man/man1/mtx-flac.1"
+                   "doc/man/man1/mtx-flac.man1.pdf"
+                   "doc/man/man1/mtx-fonts.1"
+                   "doc/man/man1/mtx-fonts.man1.pdf"
+                   "doc/man/man1/mtx-grep.1"
+                   "doc/man/man1/mtx-grep.man1.pdf"
+                   "doc/man/man1/mtx-interface.1"
+                   "doc/man/man1/mtx-interface.man1.pdf"
+                   "doc/man/man1/mtx-metapost.1"
+                   "doc/man/man1/mtx-metapost.man1.pdf"
+                   "doc/man/man1/mtx-modules.1"
+                   "doc/man/man1/mtx-modules.man1.pdf"
+                   "doc/man/man1/mtx-package.1"
+                   "doc/man/man1/mtx-package.man1.pdf"
+                   "doc/man/man1/mtx-patterns.1"
+                   "doc/man/man1/mtx-patterns.man1.pdf"
+                   "doc/man/man1/mtx-pdf.1"
+                   "doc/man/man1/mtx-pdf.man1.pdf"
+                   "doc/man/man1/mtx-plain.1"
+                   "doc/man/man1/mtx-plain.man1.pdf"
+                   "doc/man/man1/mtx-profile.1"
+                   "doc/man/man1/mtx-profile.man1.pdf"
+                   "doc/man/man1/mtx-rsync.1"
+                   "doc/man/man1/mtx-rsync.man1.pdf"
+                   "doc/man/man1/mtx-scite.1"
+                   "doc/man/man1/mtx-scite.man1.pdf"
+                   "doc/man/man1/mtx-server.1"
+                   "doc/man/man1/mtx-server.man1.pdf"
+                   "doc/man/man1/mtx-spell.1"
+                   "doc/man/man1/mtx-spell.man1.pdf"
+                   "doc/man/man1/mtx-texworks.1"
+                   "doc/man/man1/mtx-texworks.man1.pdf"
+                   "doc/man/man1/mtx-timing.1"
+                   "doc/man/man1/mtx-timing.man1.pdf"
+                   "doc/man/man1/mtx-tools.1"
+                   "doc/man/man1/mtx-tools.man1.pdf"
+                   "doc/man/man1/mtx-unicode.1"
+                   "doc/man/man1/mtx-unicode.man1.pdf"
+                   "doc/man/man1/mtx-unzip.1"
+                   "doc/man/man1/mtx-unzip.man1.pdf"
+                   "doc/man/man1/mtx-update.1"
+                   "doc/man/man1/mtx-update.man1.pdf"
+                   "doc/man/man1/mtx-vscode.1"
+                   "doc/man/man1/mtx-vscode.man1.pdf"
+                   "doc/man/man1/mtx-watch.1"
+                   "doc/man/man1/mtx-watch.man1.pdf"
+                   "doc/man/man1/mtx-youless.1"
+                   "doc/man/man1/mtx-youless.man1.pdf"
+                   "doc/man/man1/mtxrun.1"
+                   "doc/man/man1/mtxrun.man1.pdf"
+                   "fonts/afm/hoekwater/context/"
+                   "fonts/cid/fontforge/"
+                   "fonts/map/dvips/context/"
+                   "fonts/map/luatex/context/"
+                   "fonts/map/pdftex/context/"
+                   "fonts/misc/xetex/fontmapping/context/"
+                   "fonts/tfm/hoekwater/context/"
+                   "fonts/type1/hoekwater/context/"
+                   "metapost/context/base/common/"
+                   "metapost/context/base/mpiv/"
+                   "metapost/context/base/mpxl/"
+                   "metapost/context/fonts/mpiv/"
+                   "scripts/context/lua/context.lua"
+                   "scripts/context/lua/mtx-babel.lua"
+                   "scripts/context/lua/mtx-base.lua"
+                   "scripts/context/lua/mtx-bibtex.lua"
+                   "scripts/context/lua/mtx-cache.lua"
+                   "scripts/context/lua/mtx-chars.lua"
+                   "scripts/context/lua/mtx-check.lua"
+                   "scripts/context/lua/mtx-colors.lua"
+                   "scripts/context/lua/mtx-context.lua"
+                   "scripts/context/lua/mtx-context.xml"
+                   "scripts/context/lua/mtx-convert.lua"
+                   "scripts/context/lua/mtx-ctan.lua"
+                   "scripts/context/lua/mtx-dvi.lua"
+                   "scripts/context/lua/mtx-epub.lua"
+                   "scripts/context/lua/mtx-evohome.lua"
+                   "scripts/context/lua/mtx-fcd.lua"
+                   "scripts/context/lua/mtx-flac.lua"
+                   "scripts/context/lua/mtx-fonts.lua"
+                   "scripts/context/lua/mtx-grep.lua"
+                   "scripts/context/lua/mtx-install.lua"
+                   "scripts/context/lua/mtx-interface.lua"
+                   "scripts/context/lua/mtx-kpse.lua"
+                   "scripts/context/lua/mtx-metapost.lua"
+                   "scripts/context/lua/mtx-mk-help.lua"
+                   "scripts/context/lua/mtx-modules.lua"
+                   "scripts/context/lua/mtx-package.lua"
+                   "scripts/context/lua/mtx-patterns.lua"
+                   "scripts/context/lua/mtx-pdf.lua"
+                   "scripts/context/lua/mtx-plain.lua"
+                   "scripts/context/lua/mtx-profile.lua"
+                   "scripts/context/lua/mtx-rsync.lua"
+                   "scripts/context/lua/mtx-scite.lua"
+                   "scripts/context/lua/mtx-server-ctx-fonttest.lua"
+                   "scripts/context/lua/mtx-server-ctx-help.lua"
+                   "scripts/context/lua/mtx-server-ctx-startup.lua"
+                   "scripts/context/lua/mtx-server.lua"
+                   "scripts/context/lua/mtx-spell.lua"
+                   "scripts/context/lua/mtx-synctex.lua"
+                   "scripts/context/lua/mtx-texworks.lua"
+                   "scripts/context/lua/mtx-tools.lua"
+                   "scripts/context/lua/mtx-unicode.lua"
+                   "scripts/context/lua/mtx-unzip.lua"
+                   "scripts/context/lua/mtx-update.lua"
+                   "scripts/context/lua/mtx-vscode.lua"
+                   "scripts/context/lua/mtx-watch.lua"
+                   "scripts/context/lua/mtx-youless.lua"
+                   "scripts/context/lua/mtxlibs.lua"
+                   "scripts/context/lua/mtxrun.lua"
+                   "scripts/context/perl/makempy.pl"
+                   "scripts/context/perl/path_tre.pm"
+                   "scripts/context/perl/pdftrimwhite.pl"
+                   "scripts/context/perl/texfind.pl"
+                   "scripts/context/perl/texfont.pl"
+                   "tex/context/"
+                   "tex/generic/context/luatex/"
+                   "tex/latex/context/ppchtex/")
+             (base32
+              "0v452m4qi0963crr2fv211fi3a4c74l6b9p8brkcfg29fif7a846")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:link-scripts #~(list "context.lua" "mtxrun.lua")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'link-scripts 'add-symlinks
+            (lambda _
+              (with-directory-excursion (string-append #$output "/bin")
+                (symlink "../share/texmf-dist/scripts/context/lua/context.lua"
+                         "context.lua")
+                (symlink "../share/texmf-dist/scripts/context/lua/mtxrun.lua"
+                         "mtxrun.lua")
+                (symlink "mtxrun" "luametatex")))))))
     (propagated-inputs
      (list texlive-amsfonts
            texlive-lm
-           texlive-pdftex
-           texlive-metapost
-           texlive-stmaryrd
-           texlive-mflogo-font))
-    (home-page "https://www.ctan.org/pkg/context")
+           texlive-lm-math
+           texlive-luatex
+           texlive-manfnt-font
+           texlive-mflogo-font
+           texlive-stmaryrd))
+    (home-page "https://ctan.org/pkg/context")
     (synopsis "Full featured, parameter driven macro package for TeX")
     (description "ConTeXt is a full featured, parameter driven macro package,
 which fully supports advanced interactive documents.  See the ConTeXt garden
 for a wealth of support information.")
-    ;; The GPL applies to all code; alternatively, the LaTeX license may be used.
-    ;; The CC-BY-SA license applies to all documentation.
+    ;; The GPL applies to all code; alternatively, the LaTeX license may be
+    ;; used.  The CC-BY-SA license applies to all documentation.
     (license (list license:lppl1.3c+
                    license:gpl2+
                    license:cc-by-sa4.0))))
 
 (define-deprecated-package texlive-context-base texlive-context)
 
+(define-public texlive-context-account
+  (package
+    (name "texlive-context-account")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/account/"
+                   "tex/context/interface/third/"
+                   "tex/context/third/account/")
+             (base32
+              "0pcl7yiajm4q87f05kd6wyxhvdzvsy4hyvy24aihzlmhwrww0c9c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-account")
+    (synopsis "Simple accounting package")
+    (description
+     "The package deals with accounts of its own specification.")
+    (license license:public-domain)))
+
+(define-public texlive-context-algorithmic
+  (package
+    (name "texlive-context-algorithmic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/algorithmic/"
+                   "tex/context/third/algorithmic/")
+             (base32
+              "0l2k8a3g3yrirbiwp741h1fisbprhbl2kwzbmd71fij1a80sqfaw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-algorithmic")
+    (synopsis "Algorithm handling in ConTeXt")
+    (description
+     "This module provides support for typesetting algorithms.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-animation
+  (package
+    (name "texlive-context-animation")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/animation/"
+                   "tex/context/interface/third/"
+                   "tex/context/third/animation/")
+             (base32
+              "156zpxjb4c7qaibn7wjw13ysqyqg3m7pb8x3r3fzs6m83gp6r46c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-animation")
+    (synopsis "Generate fieldstack based animation with ConTeXt")
+    (description
+     "The package is a port, to Context (mkvi), of the corresponding LaTeX
+package.")
+    (license license:gpl3)))
+
+(define-public texlive-context-annotation
+  (package
+    (name "texlive-context-annotation")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/annotation/"
+                   "tex/context/interface/third/"
+                   "tex/context/third/annotation/")
+             (base32
+              "1b908rj51dbpicdiwwycb36wscxl1asmsmccrzcfbdji189kf6ck")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-annotation")
+    (synopsis "Annotate text blocks")
+    (description
+     "The @code{annotation} module lets you create your own commands and
+environments to mark text blocks.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-bnf
+  (package
+    (name "texlive-context-bnf")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/bnf/"
+                   "tex/context/third/bnf/")
+             (base32
+              "0m7144pgwk1707g7na96dx4apl6il73zzcvq7qd6lmhij3m96nv8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-bnf")
+    (synopsis "BNF module for ConTeXt")
+    (description
+     "The module provides a simple way to write good-looking BNF-style
+grammars in ConTeXt.  Grammars are written using the BNF syntax right in your
+ConTeXt documents, so there is a clear separation between content and layout.
+This allows the user to decide exactly how the grammar is to be displayed,
+while also allowing the gist of the grammar to be understood from simply
+looking at the source ConTeXt document.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-chromato
+  (package
+    (name "texlive-context-chromato")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/chromato/"
+                   "tex/context/third/chromato/")
+             (base32
+              "0p32iqgd6cbjx5y9ahs59f1q05js2s66nr84bjhzd37vzzl9acxs")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-chromato")
+    (synopsis "ConTeXt macros for chromatograms")
+    (description "The module provides macros for drawing chromatograms.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-cmscbf
+  (package
+    (name "texlive-context-cmscbf")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/cmscbf/"
+                   "tex/context/third/cmscbf/")
+             (base32
+              "0p0xgqr2pqxmhq7mzrzfyn8c37vr1xm273jz99lxzqpc7pxs37cp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-cmscbf")
+    (synopsis "Use Computer Modern bold Caps and Small-caps in ConTeXt")
+    (description
+     "The module makes provision for bold caps and small caps CM fonts,
+in ConTeXt.  Such a font may be found in the Computer Modern extra bold font
+set.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-cmttbf
+  (package
+    (name "texlive-context-cmttbf")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/cmttbf/"
+                   "tex/context/third/cmttbf/")
+             (base32
+              "0c88d2h6sn2l8s1lvy18h8vd6hc7im5gd85ilway4gq2nhvl4ahw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-cmttbf")
+    (synopsis "Use Computer Modern Typewriter bold font in ConTeXt")
+    (description
+     "The module makes provision for bold typewriter CM fonts, in ConTeXt.
+Such a font may be found in the Computer Modern extra bold font set.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-construction-plan
+  (package
+    (name "texlive-context-construction-plan")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/construction-plan/"
+                   "tex/context/third/construction-plan/")
+             (base32
+              "0nch7bwmal1lbsv4h5jwpavif5cx7096jr7m1g2pfjn4qy9slpgs")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-construction-plan")
+    (synopsis "Construction plans in ConTeXt")
+    (description
+     "This module generates a page with a figure at a well-defined scale.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-cyrillicnumbers
+  (package
+    (name "texlive-context-cyrillicnumbers")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/cyrillicnumbers/"
+                   "tex/context/interface/third/"
+                   "tex/context/third/cyrillicnumbers/")
+             (base32
+              "0vg3czh7vhwr9pg8iqmry4fd6kkmimpvsf0sdnvf73p7jkn5478y")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-cyrillicnumbers")
+    (synopsis "Write numbers as cyrillic glyphs")
+    (description
+     "The package extends ConTeXt's system of number conversion, by adding
+numeration using cyrillic letters.")
+    (license license:bsd-2)))
+
+(define-public texlive-context-degrade
+  (package
+    (name "texlive-context-degrade")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/degrade/"
+                   "tex/context/third/degrade/")
+             (base32
+              "10bny5ipa8sn6wk1k6238f5q7mazlyz9hgfi2d7hspghnfg3sm3g")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-degrade")
+    (synopsis "Degrading JPEG images in ConTeXt")
+    (description
+     "This module provides tools to degrade JPEG images in ConTeXt.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-fancybreak
+  (package
+    (name "texlive-context-fancybreak")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/fancybreak/"
+                   "tex/context/interface/third/"
+                   "tex/context/third/fancybreak/")
+             (base32
+              "0v29i2c77ycvl412mwmlyijss4s31c0sbxz7m7ln9vqy0xh3hv5i")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-fancybreak")
+    (synopsis "Overfull pages with ConTeXt")
+    (description
+     "The ConTeXt module allows insertion of thought breaks in texts.
+With parameters one can adjust the spacing around the content and set
+a default symbol.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-filter
+  (package
+    (name "texlive-context-filter")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/filter/"
+                   "tex/context/third/filter/")
+             (base32
+              "03nv2zd3aiv9lkq0bwq6awibn1acjprkc6b6jr5jslcyy4sw3k7w")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-filter")
+    (synopsis
+     "Run external programs on the contents of a start-stop environment")
+    (description
+     "The @code{filter} module provides a simple interface to run external
+programs on the contents of a start-stop environment.  Options are available
+to run the external program only if the content of the environment has
+changed, to specify how the program output should be read back, and to choose
+the name of the temporary files that are created.  The module is compatible
+with both MkII and MkIV.")
+    (license license:bsd-2)))
+
+(define-public texlive-context-french
+  (package
+    (name "texlive-context-french")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/french/"
+                   "tex/context/third/french/")
+             (base32
+              "06x7dfsc1vrb49zl9xlhlyfavijgpc53hc0yhj5yc6vph8zbq0df")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-french")
+    (synopsis "Support for writing French in ConTeXt")
+    (description
+     "This ConTeXt module deals with spacing around French punctuation.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-fullpage
+  (package
+    (name "texlive-context-fullpage")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/fullpage/"
+                   "tex/context/interface/third/"
+                   "tex/context/third/fullpage/")
+             (base32
+              "1phxzaayy8dpxhfg7xj66ms3xgrdfdc3hv18wy92havcky5gq9wc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-fullpage")
+    (synopsis "Overfull pages with ConTeXt")
+    (description
+     "This ConTeXt module copies the functionality of @code{fullpage}, and
+adds a styling parameter, given in the @code{\\usemodule} command.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-gantt
+  (package
+    (name "texlive-context-gantt")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/gantt/"
+                   "tex/context/third/gantt/")
+             (base32
+              "0r6gwxqg4pvrgz5z1bsdknahdqhjfjdkdnl148awsg49apqrrbwi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context texlive-hatching))
+    (home-page "https://ctan.org/pkg/context-gantt")
+    (synopsis "GANTT module for ConTeXt")
+    (description
+     "Gantt is a module for drawing Gantt charts via MetaPost or PGF/TikZ.")
+    (license license:public-domain)))
+
+(define-public texlive-context-gnuplot
+  (package
+    (name "texlive-context-gnuplot")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/gnuplot/"
+                   "metapost/context/third/gnuplot/"
+                   "tex/context/third/gnuplot/")
+             (base32
+              "0bmzww4sq8n37aipy6cvplcblxwlbmpl0by2sqysc3pdyxnixg41")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-gnuplot")
+    (synopsis "Inclusion of Gnuplot graphs in ConTeXt")
+    (description
+     "This ConTeXt module enables simple creation and inclusion of graphs with
+Gnuplot.  It writes a script into temporary file, runs Gnuplot and includes
+the resulting graphic directly into the document.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-handlecsv
+  (package
+    (name "texlive-context-handlecsv")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/handlecsv/"
+                   "tex/context/third/handlecsv/")
+             (base32
+              "0g5lxyj7v64mvfdhw96sqwjgxcka1nh6glbv040rrkx1p3j2r55x")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-handlecsv")
+    (synopsis "Data merging for automatic document creation")
+    (description
+     "The package handles CSV data merging for automatic document creation.")
+    (license license:gpl3)))
+
+(define-public texlive-context-layout
+  (package
+    (name "texlive-context-layout")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/layout/"
+                   "tex/context/third/layout/")
+             (base32
+              "1zl26r94yizzpxzilkwv90xbr61ddxm7fabwpgbkrci0idc9ksv0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-layout")
+    (synopsis "Show ConTeXt layouts")
+    (description
+     "This ConTeXt module draws a representation of the layout of the current
+page and displays the sizes of the widths and heights of the margins, header,
+footer and text body.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-letter
+  (package
+    (name "texlive-context-letter")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/letter/"
+                   "tex/context/interface/third/"
+                   "tex/context/third/letter/base/"
+                   "tex/context/third/letter/style/")
+             (base32
+              "1bygisva06mj7kqcwdyk9mp247dv8v0qxgh2g1a451q8sqnk52yl")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-letter")
+    (synopsis "ConTeXt package for writing letters")
+    (description
+     "This package provides a means of writing vanilla letters and memos is
+provided, with support covering ConTeXt Mkii and Mkiv.  The design of
+letters may be amended by a wide range of style specifications.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-lettrine
+  (package
+    (name "texlive-context-lettrine")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/lettrine/"
+                   "tex/context/interface/third/"
+                   "tex/context/third/lettrine/")
+             (base32
+              "0mhzvnn6ffysfq9qxdj1a6prplppzsh4pb7x2di2r87pnkxwa7f2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-lettrine")
+    (synopsis "ConTeXt implementation of lettrines")
+    (description
+     "This is a re-implementation of the LaTeX package @code{lettrine}.")
+    (license license:public-domain)))
+
+(define-public texlive-context-mathsets
+  (package
+    (name "texlive-context-mathsets")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/mathsets/"
+                   "tex/context/interface/third/"
+                   "tex/context/third/mathsets/")
+             (base32
+              "15azsj3fv57yz9q1rrdp0cmjpz9p83aq5mwxkanppiy9sw1dny3b")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-mathsets")
+    (synopsis "Set notation in ConTeXt")
+    (description
+     "Typeset good-looking set notation as well as similar things such as
+Dirac braket notation, conditional probabilities, etc.  The package is at
+least inspired by @code{braket}.")
+    (license license:bsd-2)))           ;from "t-mathsets.tex"
+
+(define-public texlive-context-rst
+  (package
+    (name "texlive-context-rst")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/rst/"
+                   "scripts/context/lua/third/rst/"
+                   "tex/context/interface/third/"
+                   "tex/context/third/rst/")
+             (base32
+              "0dfviz3pww0k9ffhiqw0dywj9fs3wkmqavb98z2cq1ldw09fbh01")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-rst")
+    (synopsis "Process reStructuredText with ConTeXt")
+    (description
+     "The package provides a converter and module for typesetting
+reStructuredText with ConTeXt.")
+    (license license:bsd-2)))           ;from "manual.pdf"
+
+(define-public texlive-context-ruby
+  (package
+    (name "texlive-context-ruby")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/ruby/"
+                   "tex/context/third/ruby/")
+             (base32
+              "0dgyvsxxfll5zayp0bfb7ixzh7df4bm3yz7z2w974yjlrd17acm0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-ruby")
+    (synopsis "Ruby annotations in ConTeXt")
+    (description
+     "Ruby markup (aka furigana in Japan) are inline annotations above or
+below a word to indicate the reading of ideographic characters.  The module
+implements the W3C specification for simple Ruby in ConTeXt.  The position and
+layout of the base text and the Ruby text can be controlled by parameters.")
+    (license license:public-domain)))
+
+(define-public texlive-context-simplefonts
+  (package
+    (name "texlive-context-simplefonts")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/simplefonts/"
+                   "tex/context/third/simplefonts/")
+             (base32
+              "1yxxgxnxhg006pq8incc6s6rj7jvvl1mkrdagpvc63lc709ih56s")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-simplefonts")
+    (synopsis "Simplified font usage for ConTeXt")
+    (description
+     "The package defines a set of commands for loading and using fonts in
+ConTeXt.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-simpleslides
+  (package
+    (name "texlive-context-simpleslides")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/simpleslides/"
+                   "scripts/context/lua/third/simpleslides/"
+                   "tex/context/interface/third/"
+                   "tex/context/third/simpleslides/")
+             (base32
+              "0vbh26ym42ayxwis6wbkmf07sy167g9kzg5ls889j2f2zn5rf4pr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-simpleslides")
+    (synopsis "Module for preparing presentations")
+    (description
+     "This ConTeXt module provides an easy-to-use interface for creating
+presentations for use with a digital projector.  The presentations are
+not interactive (no buttons, hyperlinks or navigational tools such as
+tables of contents).  Graphics may be mixed with the text of slides.
+The module provides several predefined styles, designed for academic
+presentation.  Most styles are configurable, and it is easy to design
+new styles.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-title
+  (package
+    (name "texlive-context-title")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/title/"
+                   "tex/context/interface/third/"
+                   "tex/context/third/title/")
+             (base32
+              "1ah7b5lgqq668s17d5glnl2bwyzh7idsdib4ijxarx7ahph06jx2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-title")
+    (synopsis "Place document titles")
+    (description
+     "The title module provides the @code{\\placetitle} command to put
+a title block into your document.  With the command
+@code{\\setuptitle} values can be set for @code{\\placetitle} and
+change the formatting of the content.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-transliterator
+  (package
+    (name "texlive-context-transliterator")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/transliterator/"
+                   "scripts/context/lua/third/transliterator/"
+                   "tex/context/interface/third/"
+                   "tex/context/third/transliterator/")
+             (base32
+              "0hrj6sjldi7chqdnf300bs1q9s92v9sl2mfx3h0644mzjgjxw7s1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-transliterator")
+    (synopsis "Transliterate text from other alphabets")
+    (description
+     "The package will read text in one alphabet, and provide a transliterated
+version in another; this is useful for readers who cannot read the original
+alphabet.  The package can make allowance for hyphenation.")
+    (license license:bsd-2)))           ;from "t-transliterator.mkiv"
+
+(define-public texlive-context-typearea
+  (package
+    (name "texlive-context-typearea")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/typearea/"
+                   "tex/context/third/typearea/")
+             (base32
+              "0np4yn0kjq1m7rrhcfxrai18qk19051188sfn9lrvphj604s7sna")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-typearea")
+    (synopsis "Something like Koma-Script typearea")
+    (description
+     "The module provides a command that calculates the page layout as the
+LaTeX package @code{typearea} does.")
+    (license license:gpl3+)))
+
+(define-public texlive-context-typescripts
+  (package
+    (name "texlive-context-typescripts")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/typescripts/"
+                   "tex/context/third/typescripts/")
+             (base32
+              "0kz3flqyzg2p7lvr7yy1h1nmk368glzxxhwirizn5g4xv5sdf27b")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-typescripts")
+    (synopsis "Small modules to load various fonts for use in ConTeXt")
+    (description
+     "The package provides files offering interfaces to 33 publicly available
+fonts (or collections of fonts from the same foundry); each is available in
+a @file{.mkii} and a @file{.mkiv} version.")
+    (license license:gpl2)))
+
+(define-public texlive-context-vim
+  (package
+    (name "texlive-context-vim")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/vim/"
+                   "tex/context/third/vim/")
+             (base32
+              "03cwdqkrx6bgcikmyxrwkyac3jmz7i50cavgb6r8b26zrsm522ca")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context texlive-context-filter))
+    (home-page "https://ctan.org/pkg/context-vim")
+    (synopsis "Generate ConTeXt syntax highlighting code from Vim")
+    (description
+     "ConTeXt has excellent pretty printing capabilities for many languages.
+The code for pretty printing is written in TeX, and due to catcode juggling,
+such verbatim typesetting is perhaps the trickiest part of TeX.  This makes it
+difficult for a normal user to define syntax highlighting rules for a new
+language.  This module takes the onus of defining syntax highlighting rules
+away from the user and uses Vim editor to generate the syntax highlighting.
+There is a helper @file{2context.vim} script to do the syntax parsing in
+Vim.")
+    (license license:bsd-2)))
+
+(define-public texlive-context-visualcounter
+  (package
+    (name "texlive-context-visualcounter")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/visualcounter/"
+                   "source/context/third/visualcounter/"
+                   "tex/context/third/visualcounter/")
+             (base32
+              "0rq2zqrvbidwngc4jyv4ay84y5l854z1shk08cjlvnlbsgrg7lmk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-context))
+    (home-page "https://ctan.org/pkg/context-visualcounter")
+    (synopsis "Visual display of ConTeXt counters")
+    (description
+     "This package provides a typical document usually contains many counters:
+page numbers, section numbers, itemizations, enumerations, theorems, and so
+on.  This module provides a visual display for such counters.")
+    (license license:bsd-2)))
+
 (define-public texlive-beamer
   (package
-    (inherit (simple-texlive-package
-              "texlive-beamer"
-              (list "/doc/latex/beamer/"
-                    "/tex/latex/beamer/")
-              (base32
-               "091n27n4l3iac911bvmpp735ffryyzaq46mkclgn3q9jsvc4ngiv")
-              #:trivial? #t))
+    (name "texlive-beamer")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/beamer/" "tex/latex/beamer/")
+             (base32
+              "0v5ix5dybf6j2mj9sp5598vdbm4bm1m50nmhj6qsk8faj78g562w")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (propagated-inputs
-     (list texlive-hyperref texlive-oberdiek texlive-etoolbox
-           texlive-pgf))
+     (list texlive-amscls
+           texlive-amsfonts
+           texlive-amsmath
+           texlive-atbegshi
+           texlive-etoolbox
+           texlive-geometry
+           texlive-hyperref
+           texlive-iftex
+           texlive-pgf
+           texlive-translator
+           texlive-xcolor))
     (home-page "https://www.ctan.org/pkg/beamer")
     (synopsis "LaTeX class for producing presentations and slides")
-    (description "The beamer LaTeX class can be used for producing slides.
+    (description
+     "The @code{beamer} LaTeX class can be used for producing slides.
 The class works in both PostScript and direct PDF output modes, using the
 @code{pgf} graphics system for visual effects.  Content is created in the
 @code{frame} environment, and each frame can be made up of a number of slides
@@ -10637,21 +22279,19 @@ effects, varying slide transitions and animations.")
 
 (define-deprecated-package texlive-latex-beamer texlive-beamer)
 
-(define-public texlive-latex-xmpincl
+(define-public texlive-xmpincl
   (package
-    (name "texlive-latex-xmpincl")
+    (name "texlive-xmpincl")
     (version (number->string %texlive-revision))
-    (source
-     (origin
-       (method svn-fetch)
-       (uri (texlive-ref "latex" "xmpincl"))
-       (file-name (string-append name "-" version "-checkout"))
-       (sha256
-        (base32
-         "0lq3dfb4fsw955gjwllnk7cg00ciq5mva64mlpbva6g2jz117734"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/xmpincl/" "source/latex/xmpincl/"
+                   "tex/latex/xmpincl/")
+             (base32
+              "1wc48qark5hd593jh3mx1yryxsdcq5hbaxyrhwcaxzgqivdli34p")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/xmpincl"))
-    (home-page "http://www.ctan.org/pkg/xmpincl")
+    (home-page "https://ctan.org/pkg/xmpincl")
     (synopsis "Include eXtensible Metadata Platform data in pdfLaTeX")
     (description
      "The XMP (eXtensible Metadata platform) is a framework to add metadata to
@@ -10660,296 +22300,241 @@ the metadata is stored in an XML file, and this XML stream is then embedded in
 the file to which it applies.")
     (license license:gpl3+)))
 
+(define-deprecated-package texlive-latex-xmpincl texlive-xmpincl)
+
 (define-public texlive-pdfx
-  (let ((template (simple-texlive-package
-                   "texlive-pdfx"
-                   (list "/doc/latex/pdfx/"
-                         "/source/latex/pdfx/"
-                         "/tex/latex/pdfx/")
-                   (base32
-                    "1z4j4d92k2fjmf8jfap4zn7ij97d9rz2jcs9aslcac07ag4x5bdp"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "latex/pdfx")
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'delete-generated-file
-               (lambda _
-                 ;; Generate this file from sources
-                 (delete-file "tex/latex/pdfx/pdfx.sty")
-                 #t))
-             (add-after 'delete-generated-file 'chdir
-               (lambda _ (chdir "source/latex/pdfx") #t))
-             (add-after 'chdir 'fix-encoding
-               (lambda _
-                 (substitute* "pdfx.dtx"
-                   (("    .+umaczy") "umaczy"))
-                 #t))))))
-      (propagated-inputs
-       (list texlive-pdftex))
-      (home-page "https://www.ctan.org/pkg/pdfx")
-      (synopsis "PDF/X and PDF/A support for pdfTeX, LuaTeX and XeTeX")
-      (description
-       "This package helps LaTeX users to create PDF/X, PDF/A and other
+  (package
+    (name "texlive-pdfx")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pdfx/" "source/latex/pdfx/"
+                   "tex/latex/pdfx/")
+             (base32
+              "1z4j4d92k2fjmf8jfap4zn7ij97d9rz2jcs9aslcac07ag4x5bdp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-encoding
+            (lambda _
+              (substitute* "source/latex/pdfx/pdfx.dtx"
+                (("    .+umaczy") "umaczy")))))))
+    (home-page "https://ctan.org/pkg/pdfx")
+    (synopsis "PDF/X and PDF/A support for pdfTeX, LuaTeX and XeTeX")
+    (description
+     "The package helps LaTeX users to create PDF/X, PFD/A and other
 standards-compliant PDF documents with pdfTeX, LuaTeX and XeTeX.")
-      (license license:lppl1.2+))))
+    (license license:lppl1.2+)))
 
 (define-deprecated-package texlive-latex-pdfx texlive-pdfx)
 
+(define-public texlive-yamlvars
+  (package
+    (name "texlive-yamlvars")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/yamlvars/"
+                   "tex/lualatex/yamlvars/")
+             (base32
+              "0r9xqjbag1kvyiz369nbz1w15ij5b3bw9msxrnz4864wn2b50cf0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/yamlvars")
+    (synopsis "YAML parser and tool for easy LaTeX definition creation")
+    (description
+     "This LuaLaTeX package provides a YAML parser and some functions to
+declare and define LaTeX definitions using YAML files.")
+    (license license:expat)))
+
+(define-public texlive-yax
+  (package
+    (name "texlive-yax")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/yax/" "tex/generic/yax/")
+             (base32
+              "01hv550qkmxw63m41v4qykfiracvzvjwxk49y6fc6abg89hfvsj6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/yax")
+    (synopsis "Yet Another Key System")
+    (description
+     "YaX is advertised as a key system, but it rather organizes attributes in
+parameters, which parameters can be executed, so that YaX is halfway between
+key management and macro definition (and actually hopes to provide a user's
+interface).  Values assigned to attributes can be retrieved and tested in
+various ways, with full expandability ensured as much as possible.  Finally,
+YaX's syntax is a quite peculiar (as few braces as possible), but may be
+customized.")
+    (license license:lppl)))
+
 (define-public texlive-ydoc
-  (let ((template (simple-texlive-package
-                   "texlive-ydoc"
-                   (list "/doc/latex/ydoc/"
-                         "/source/latex/ydoc/")
-                   (base32
-                    "0ckcpy1b8v1fk3qc8qkxgiag2wc0qzxm6bgksv000m4m1hsi2g8b")
-                   #:trivial? #f)))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "latex/ydoc")
-         ((#:build-targets _ #t)
-          ''("ydoc.dtx"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/ydoc") #t))
-             (add-after 'copy-files 'move-files
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (let ((source (assoc-ref inputs "source"))
-                       (doc (string-append (assoc-ref outputs "doc")
-                                           "/share/texmf-dist/doc")))
-                   (copy-recursively (string-append source "/doc")  doc))))))))
-      (home-page "http://www.ctan.org/pkg/ydoc")
-      (synopsis "Macros for documentation of LaTeX classes and packages")
-      (description "The package provides macros and environments to document
+  (package
+    (name "texlive-ydoc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ydoc/" "source/latex/ydoc/"
+                   "tex/generic/ydoc/" "tex/latex/ydoc/")
+             (base32
+              "00v7vlv7z2xy4sy2zd4arlndjqvgjsqar3i22vdnld4flb03jqb8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs
+     (list texlive-etoolbox
+           texlive-float
+           texlive-hyperref
+           texlive-listings
+           texlive-needspace
+           texlive-newverbs
+           texlive-showexpl
+           texlive-tools
+           texlive-url
+           texlive-xcolor))
+    (home-page "https://ctan.org/pkg/ydoc")
+    (synopsis "Macros for documentation of LaTeX classes and packages")
+    (description "The package provides macros and environments to document
 LaTeX packages and classes.  It is an (as yet unfinished) alternative to the
 @code{ltxdoc} class and the @code{doc} or @code{xdoc} packages.  The aim is to
 provide a different layout and more modern styles (using the @code{xcolor},
 @code{hyperref} packages, etc.)  This is an alpha release, and should probably
 not (yet) be used with other packages, since the implementation might
 change.")
-      (license license:lppl1.3+))))
+    (license license:lppl1.3+)))
 
 (define-public texlive-pstricks
-  (let ((template (simple-texlive-package
-                   "texlive-pstricks"
-                   (list "/doc/generic/pstricks/"
-                         "/dvips/pstricks/"
-                         "/tex/generic/pstricks/"
-                         "/tex/latex/pstricks/")
-                   (base32
-                    "15c9iqfq2y9c8c78cvqb6vzd5a5rm7qq5x7m05jq1hb8sgqrqb0j")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (delete 'reset-gzip-timestamps)))))
-      (home-page "http://www.ctan.org/pkg/pstricks")
-      (synopsis "PostScript macros for TeX")
-      (description "PSTricks offers an extensive collection of macros for
-generating PostScript that is usable with most TeX macro formats, including
-Plain TeX, LaTeX, AMS-TeX, and AMS-LaTeX.  Included are macros for colour,
-graphics, pie charts, rotation, trees and overlays.  It has many special
-features, including a wide variety of graphics (picture drawing) macros, with
-a flexible interface and with colour support.  There are macros for colouring
-or shading the cells of tables.")
-      (license license:lppl1.3+))))
+  (package
+    (name "texlive-pstricks")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/pstricks/" "dvips/pstricks/"
+                   "tex/generic/pstricks/" "tex/latex/pstricks/")
+             (base32
+              "0hyd8rx0a11mwd13fa10s3h3jq3xymff57p7ks6cnryy2860aizq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "http://www.ctan.org/pkg/pstricks-base")
+    (synopsis "PostScript macros for TeX")
+    (description
+     "PSTricks offers an extensive collection of macros for generating
+PostScript that is usable with most TeX macro formats, including Plain TeX,
+LaTeX, AMS-TeX, and AMS-LaTeX.  Included are macros for colour, graphics, pie
+charts, rotation, trees and overlays.  It has many special features, including
+a wide variety of graphics (picture drawing) macros, with a flexible interface
+and with colour support.  There are macros for colouring or shading the cells
+of tables.")
+    (license license:lppl1.3+)))
 
 (define-public texlive-pst-text
-  (let ((template (simple-texlive-package
-                   "texlive-pst-text"
-                   (list "/doc/generic/pst-text/"
-                         "/dvips/pst-text/pst-text.pro"
-                         "/tex/generic/pst-text/"
-                         "/tex/latex/pst-text/")
-                   (base32
-                    "146fpzd1xlqi94q5r48z8ni8qww713yh6nwkbr9pw27mjrqdadb9")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (propagated-inputs
-       (list texlive-pstricks))
-      (home-page "http://www.ctan.org/pkg/pst-text")
-      (synopsis "Text and character manipulation in PSTricks")
-      (description "Pst-text is a PSTricks based package for plotting text along
+  (package
+    (name "texlive-pst-text")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/pst-text/"
+                   "dvips/pst-text/"
+                   "tex/generic/pst-text/"
+                   "tex/latex/pst-text/")
+             (base32
+              "146fpzd1xlqi94q5r48z8ni8qww713yh6nwkbr9pw27mjrqdadb9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "http://www.ctan.org/pkg/pst-text")
+    (synopsis "Text and character manipulation in PSTricks")
+    (description "Pst-text is a PSTricks based package for plotting text along
 a different path and manipulating characters.  It includes the functionality
 of the old package @code{pst-char}.")
-      (license license:lppl))))
+    (license license:lppl)))
 
 (define-public texlive-marginnote
-  (let ((template (simple-texlive-package
-                   "texlive-marginnote"
-                   (list "/source/latex/marginnote/marginnote.dtx")
-                   (base32
-                    "152bwxhnssj40rr72r6cfirvqbnc0h7xnagfrbz58v2xck53qhg1"))))
-    (package
-      (inherit template)
-      (home-page "http://www.ctan.org/pkg/marginnote")
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/marginnote")
-         ((#:build-targets _ '())
-          ''("marginnote.dtx"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/marginnote") #t))))))
-      (synopsis "Notes in the margin")
-      (description "This package provides the command @code{\\marginnote} that
+  (package
+    (name "texlive-marginnote")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/marginnote/"
+                   "source/latex/marginnote/"
+                   "tex/latex/marginnote/")
+             (base32
+              "1drmscvd14akcv7n6wl3d3cnj18cwkd7z7rm2gg7z43b89s7kdqr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/marginnote")
+    (synopsis "Notes in the margin")
+    (description "This package provides the command @code{\\marginnote} that
 may be used instead of @code{\\marginpar} at almost every place where
 @code{\\marginpar} cannot be used, e.g., inside floats, footnotes, or in
 frames made with the @code{framed} package.")
-      (license license:lppl1.3c+))))
-
-(define-public texlive-iftex
-  (let ((template (simple-texlive-package
-                   "texlive-iftex"
-                   (list "/doc/generic/iftex/"
-                         "/tex/generic/iftex/")
-                   (base32
-                    "147xa5kl4kjs05nj8v3kd7dpr5xkz3xp3gdvjih32ccd7527f5vp")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (home-page "http://www.ctan.org/pkg/iftex")
-      (synopsis "Determine the currently used TeX engine")
-      (description "This package, which works both for Plain TeX and for
-LaTeX, defines the @code{\\ifPDFTeX}, @code{\\ifXeTeX}, and @code{\\ifLuaTeX}
-conditionals for testing which engine is being used for typesetting.  The
-package also provides the @code{\\RequirePDFTeX}, @code{\\RequireXeTeX}, and
-@code{\\RequireLuaTeX} commands which throw an error if pdfTeX, XeTeX or
-LuaTeX (respectively) is not the engine in use.")
-      (license license:lppl1.3+))))
-
-(define-deprecated-package texlive-generic-iftex texlive-iftex)
-
-(define-deprecated-package texlive-generic-ifxetex texlive-iftex)
+    (license license:lppl1.3c+)))
 
 (define-public texlive-tabu
-  (let ((template
-         (simple-texlive-package
-          "texlive-tabu"
-          (list "doc/latex/tabu/"
-                "source/latex/tabu/"
-                "tex/latex/tabu/")
-          (base32 "0mixyrqavipq4ni38z42x3579cdjbz54cp2qqb4q4yhfbl0a4pka"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/tabu")
-         ((#:build-targets _ '())
-          '(list "tabu.dtx"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/tabu")))
-             (replace 'copy-files
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (let ((origin (assoc-ref inputs "source"))
-                       (source (string-append (assoc-ref outputs "out")
-                                              "/share/texmf-dist/source"))
-                       (doc (string-append (assoc-ref outputs "doc")
-                                           "/share/texmf-dist/doc")))
-                   (copy-recursively (string-append origin "/source") source)
-                   (copy-recursively (string-append origin "/doc") doc))))))))
-      (propagated-inputs (list texlive-varwidth))
-      (home-page "https://ctan.org/macros/latex/contrib/tabu")
-      (synopsis "Flexible LaTeX tabulars")
-      (description
-       "The package provides an environment, tabu, which will make any sort of
-tabular, and an environment longtabu which provides the facilities of tabu in
-a modified longtable environment.  The package requires array, xcolor for
-coloured rules in tables, and colortbl for coloured cells.  The longtabu
-environment further requires that longtable be loaded.  The package itself
-does not load any of these packages for the user.  The tabu environment may be
-used in place of @code{tabular}, @code{tabular*} and @code{tabularx}
-environments, as well as the @code{array} environment in maths mode.")
-      (license license:lppl1.3+))))
+  (package
+    (name "texlive-tabu")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tabu/" "source/latex/tabu/"
+                   "tex/latex/tabu/")
+             (base32
+              "0mixyrqavipq4ni38z42x3579cdjbz54cp2qqb4q4yhfbl0a4pka")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-varwidth))
+    (home-page "https://ctan.org/macros/latex/contrib/tabu")
+    (synopsis "Flexible LaTeX tabulars")
+    (description
+     "The package provides an environment, @code{tabu}, which will make any
+sort of tabular, and an environment @code{longtabu} which provides the
+facilities of @code{tabu} in a modified @code{longtable} environment.")
+    (license license:lppl1.3+)))
 
-(define-public texlive-latex-xkeyval
+(define-public texlive-xkeyval
   (package
-    (name "texlive-latex-xkeyval")
+    (name "texlive-xkeyval")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "xkeyval"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0w4x82wmdvcmy8z3p55xvpz5q7jac1q1j591hi8mngfyqa8rda1c"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/xkeyval/" "source/latex/xkeyval/"
+                   "tex/generic/xkeyval/" "tex/latex/xkeyval/")
+             (base32
+              "0nclsazny3hnzsi2vcixh2g1gsj5lvwxls1v569rms8ykgd9v7z8")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (arguments
-     '(#:tex-directory "latex/xkeyval"
-       #:build-targets '("xkeyval.dtx")
-       #:tex-format "latex" ; won't build with luatex
-       #:phases
-       (modify-phases %standard-phases
-         ;; This package cannot be built out of tree as it expects to find
-         ;; built files in the working directory.
-         (add-before 'build 'fix-build
-           (lambda _
-             (setenv "TEXINPUTS"
-                     (string-append (getcwd) "/build:"))
-             (substitute* "xkeyval.dtx"
-               (("usepackage\\{xcolor\\}")
-                "usepackage[dvips]{xcolor}"))
-             #t))
-         ;; FIXME: We don't have a package for this font yet.
-         (add-after 'unpack 'remove-dependency-on-fourier
-           (lambda _
-             (substitute* "xkeyval.dtx"
-               (("\\\\usepackage\\{fourier\\}") ""))
-             #t))
-         (add-after 'install 'move-files
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (share (string-append out "/share/texmf-dist"))
-                    (source (string-append share "/tex/latex/xkeyval/"))
-                    (target (string-append share "/tex/generic/xkeyval/")))
-               (mkdir-p target)
-               (for-each (lambda (file)
-                           (rename-file (string-append source file)
-                                        (string-append target file)))
-                         '("keyval.tex"
-                           "pst-xkey.tex"
-                           "xkeyval.tex"
-                           "xkvex1.tex"
-                           "xkvex2.tex"
-                           "xkvex3.tex"
-                           "xkvex4.tex"
-                           "xkvtxhdr.tex"
-                           "xkvutils.tex"))
-               #t))))))
+     (list
+      #:build-targets #~(list "xkeyval.dtx")
+      #:tex-format "latex"              ;won't build with luatex
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; This package cannot be built out of tree as it expects to find
+          ;; built files in the working directory.
+          (add-before 'build 'fix-build
+            (lambda _
+              (setenv "TEXINPUTS" (string-append (getcwd) "/build:"))
+              (substitute* "source/latex/xkeyval/xkeyval.dtx"
+                (("usepackage\\{xcolor\\}")
+                 "usepackage[dvips]{xcolor}")))))))
     (native-inputs
-     (list texlive-latex-base
-           texlive-cm
-           texlive-lm
-           texlive-url
-           texlive-graphics-def
-           texlive-xcolor
-           texlive-latex-footmisc
-           texlive-iftex
-           texlive-listings
-           texlive-pstricks
-           texlive-pst-text
-           texlive-tools
-           texlive-pgf))
-    (home-page "http://www.ctan.org/pkg/xkeyval")
-    (synopsis "Extension of the keyval package")
+     (list (texlive-updmap.cfg
+            (list texlive-footmisc
+                  texlive-fourier
+                  texlive-hypdoc
+                  texlive-infwarerr
+                  texlive-kvoptions
+                  texlive-listings
+                  texlive-lm
+                  texlive-pgf
+                  texlive-pst-text
+                  texlive-pstricks
+                  texlive-xcolor))))
+    (home-page "https://ctan.org/pkg/xkeyval")
+    (synopsis "Extension of the @code{keyval} package")
     (description
      "This package is an extension of the keyval package and offers additional
 macros for setting keys and declaring and setting class or package options.
@@ -10959,57 +22544,204 @@ all help use in documents where several packages define their own sets of
 keys.")
     (license license:lppl1.3+)))
 
+(define-deprecated-package texlive-latex-xkeyval texlive-xkeyval)
+
+(define-public texlive-scikgtex
+  (package
+    (name "texlive-scikgtex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/scikgtex/"
+                   "tex/lualatex/scikgtex/")
+             (base32
+              "0p7y7qd5kmlhr4v72x8krxihzjm80fkb65wh28rr2r54rw8ag3hc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/scikgtex")
+    (synopsis
+     "Mark research contributions in scientific documents and embed them in PDF metadata")
+    (description
+     "Scientific Knowledge Graph TeX (SciKgTeX) is a LuaLaTeX package which
+makes it possible to annotate specific research contributions in scientific
+documents.  SciKGTeX will enrich the document by adding the marked
+contributions to PDF metadata in a structured XMP format which can be picked
+up by search engines and knowledge graphs.")
+    (license license:expat)))
+
+(define-public texlive-selnolig
+  (package
+    (name "texlive-selnolig")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/selnolig/"
+                   "tex/lualatex/selnolig/")
+             (base32
+              "0xx3agmd7ply84jjx1kcg4jpix7qg1y3wrd2kr7dv74jw5cffrfq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/selnolig")
+    (synopsis "Selectively disable typographic ligatures")
+    (description
+     "The package suppresses typographic ligatures selectively, i.e., based on
+predefined search patterns.  The search patterns focus on ligatures deemed
+inappropriate because they span morpheme boundaries.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-showhyphenation
+  (package
+    (name "texlive-showhyphenation")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/showhyphenation/"
+                   "tex/lualatex/showhyphenation/")
+             (base32
+              "0v8rjr828pzcn85zqbrw3fnrfyvn7cscqyg5mm08wyay990lkhny")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/showhyphenation")
+    (synopsis "Marking of hyphenation points")
+    (description
+     "The package shows the hyphenation points in the document by either
+inserting small triangles below the baseline or by typesetting explicit
+hyphens.  The markers are correctly placed even within ligatures and their
+size adjusts to the font size.  By option the markers can be placed behind or
+in front of the glyphs.  The package requires LuaLaTeX.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-showkerning
+  (package
+    (name "texlive-showkerning")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/showkerning/"
+                   "tex/lualatex/showkerning/")
+             (base32
+              "0kd20scd9mv7zmsfz9wy321j07fwkll94cbfpqllzn0jk80qgxgm")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/showkerning")
+    (synopsis "Showing kerns in a document")
+    (description
+     "The package displays all kerning values in the form of colored bars
+directly at the respective position in the document.  Positive values are
+displayed in green, negative values in red.  The width of the bars corresponds
+exactly to the respective kerning value.  By option the bars can be placed
+behind or in front of the glyphs.  The package requires LuaLaTeX.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-spacekern
+  (package
+    (name "texlive-spacekern")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/spacekern/"
+                   "tex/lualatex/spacekern/")
+             (base32
+              "0rmdg9daqp0fallznsqsr0475z7cw0djhxq6dwkyk5yg8ii9c6s9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/spacekern")
+    (synopsis "Kerning between words and against space")
+    (description
+     "This package provides two shorthands for typesetting breaking and
+non-breaking small spaces, where both hyphenation and kerning against space
+are correctly applied.  Additionally, interword kerning can be applied.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-spelling
+  (package
+    (name "texlive-spelling")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/spelling/" "scripts/spelling/"
+                   "tex/luatex/spelling/")
+             (base32
+              "1pg4jz1rxpjc9648b53zbnwrn59id9iv8b1jfwl6nqj58q285w7q")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/spelling")
+    (synopsis "Support for spell-checking of LuaTeX documents")
+    (description
+     "The package aids spell-checking of TeX documents compiled with the
+LuaTeX engine.  It can give visual feedback in PDF output similar to WYSIWYG
+word processors.  The package relies on an external spell-checker application
+to check spelling of a text file and to output a list of bad spellings.  The
+package should work with most spell-checkers, even dumb, TeX-unaware ones.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-standalone
   (package
     (name "texlive-standalone")
     (version (number->string %texlive-revision))
-    (source
-     (origin
-       (method svn-fetch)
-       (uri (texlive-ref "latex" "standalone"))
-       (file-name (string-append name "-" version "-checkout"))
-       (sha256
-        (base32
-         "192ydxcn8ir96q8qwvnppksmqf5i0p50i0wz6iqazbwmh3dqxpx4"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/standalone/"
+                   "source/latex/standalone/"
+                   "tex/latex/standalone/")
+             (base32
+              "055mz0r837ipb6f0v7lp2imwpy1zh0i45wkd5f1dbpjpb9gf7qny")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/standalone"))
+    (native-inputs (list texlive-ydoc))
     (propagated-inputs
-     (list texlive-latex-xkeyval))
-    (native-inputs
-     (list texlive-ydoc))
-    (home-page "http://www.ctan.org/pkg/standalone")
+     (list texlive-adjustbox
+           texlive-currfile
+           texlive-filemod
+           texlive-gincltex
+           texlive-xkeyval))
+    (home-page "https://ctan.org/pkg/standalone")
     (synopsis "Compile TeX pictures stand-alone or as part of a document")
-    (description "A class and package is provided which allows TeX pictures or
-other TeX code to be compiled standalone or as part of a main document.
-Special support for pictures with beamer overlays is also provided.  The
-package is used in the main document and skips extra preambles in sub-files.
-The class may be used to simplify the preamble in sub-files.  By default the
-@code{preview} package is used to display the typeset code without margins.
-The behaviour in standalone mode may adjusted using a configuration file
-@code{standalone.cfg} to redefine the standalone environment.")
+    (description
+     "This package provides a class and package is provided which allows TeX
+pictures or other TeX code to be compiled standalone or as part of a main
+document.  Special support for pictures with @code{beamer} overlays is also
+provided.  The package is used in the main document and skips extra preambles
+in sub-files.  The class may be used to simplify the preamble in sub-files.
+By default the @code{preview} package is used to display the typeset code
+without margins.")
     (license license:lppl1.3+)))
 
+(define-public texlive-stricttex
+  (package
+    (name "texlive-stricttex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/stricttex/"
+                   "tex/lualatex/stricttex/")
+             (base32
+              "1ddlcwj1bnj6zrkljkz3jywgri34f4g9gshbwd0lzz4nz03v82rv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/stricttex")
+    (synopsis "Strictly balanced brackets and numbers in command names")
+    (description
+     "This is a small, LuaLaTeX-only package providing you with three,
+sometimes useful features.  It allows you to make brackets @samp{[...]}
+strict, meaning that each @samp{[} must be balanced by a @samp{]}.  It also
+allows you to use numbers and primes in command names.")
+    (license license:lppl1.3c)))
+
 (define-public texlive-siunitx
   (package
     (name "texlive-siunitx")
     (version (number->string %texlive-revision))
     (source (texlive-origin
              name version
-             (list "/source/latex/siunitx/siunitx.dtx"
-                   "/doc/latex/siunitx/README.md")
+             (list "doc/latex/siunitx/" "source/latex/siunitx/"
+                   "tex/latex/siunitx/")
              (base32
-              "05kl7yid2npp2gbfshnv2xd08w81fkh5h2n5wd9xcpbhlqjzx9sj")))
+              "14rgn7lm5iy15jxcdwrkkp6rmi569x1x7qir82k89xl49k1rr2d1")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments
-     '(#:tex-directory "latex/siunitx"
-       #:build-targets '("siunitx.dtx")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'chdir
-           (lambda _ (chdir "source/latex/siunitx") #t)))))
-    (propagated-inputs
-     (list texlive-latex-l3kernel texlive-latex-l3packages))
-    (home-page "http://www.ctan.org/pkg/siunitx")
+    (propagated-inputs (list texlive-l3kernel texlive-l3packages))
+    (home-page "https://www.ctan.org/pkg/siunitx")
     (synopsis "Comprehensive SI units package")
     (description
      "Typesetting values with units requires care to ensure that the combined
@@ -11030,17 +22762,15 @@ package to handle all of the possible unit-related needs of LaTeX users.")
   (package
     (name "texlive-booktabs")
     (version (number->string %texlive-revision))
-    (source
-     (origin
-       (method svn-fetch)
-       (uri (texlive-ref "latex" "booktabs"))
-       (file-name (string-append name "-" version "-checkout"))
-       (sha256
-        (base32
-         "1mycxzl761p2zzmva8xsjbxbvrxx3vhi5p160mh9kiqwhrs5biz5"))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/booktabs/" "source/latex/booktabs/"
+                   "tex/latex/booktabs/")
+             (base32
+              "0pv2kv4hgayqfcij2sz1jmk6kbxqccyaksz8xlw5kvqrbag9vxm3")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/booktabs"))
-    (home-page "http://www.ctan.org/pkg/booktabs")
+    (home-page "https://ctan.org/pkg/booktabs")
     (synopsis "Publication quality tables in LaTeX")
     (description
      "This package enhances the quality of tables in LaTeX, providing extra
@@ -11050,297 +22780,493 @@ to what constitutes a good table in this context.  The package offers
     (license license:lppl1.3+)))
 
 (define-public texlive-csquotes
-  (let ((template (simple-texlive-package
-                   "texlive-csquotes"
-                   (list "/doc/latex/csquotes/"
-                         "/tex/latex/csquotes/")
-                   (base32
-                    "17y5mrmjmi7n0cgq4cnqr55f4bni6lx1pfdv5pzsmbrzha3mhbfg")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (propagated-inputs
-       (list texlive-etoolbox))
-      (home-page "https://www.ctan.org/pkg/csquotes")
-      (synopsis "Context sensitive quotation facilities")
-      (description "This package provides advanced facilities for inline and
-display quotations.  It is designed for a wide range of tasks ranging from the
-most simple applications to the more complex demands of formal quotations.
-The facilities include commands, environments, and user-definable 'smart
-quotes' which dynamically adjust to their context.  Quotation marks are
-switched automatically if quotations are nested and they can be adjusted to
-the current language if the babel package is available.  There are additional
-facilities designed to cope with the more specific demands of academic
-writing, especially in the humanities and the social sciences.  All quote
-styles as well as the optional active quotes are freely configurable.")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-csquotes")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/csquotes/" "tex/latex/csquotes/")
+             (base32
+              "0657rvaciq5h4qp2hg9d2w2i663p5cnxygi6dj9w61463m4nkpy6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-etoolbox))
+    (home-page "https://www.ctan.org/pkg/csquotes")
+    (synopsis "Context sensitive quotation facilities")
+    (description
+     "This package provides advanced facilities for inline and display
+quotations.  It is designed for a wide range of tasks ranging from the most
+simple applications to the more complex demands of formal quotations.  The
+facilities include commands, environments, and user-definable smart quotes
+which dynamically adjust to their context.  Quotation marks are switched
+automatically if quotations are nested and they can be adjusted to the current
+language if the babel package is available.  There are additional facilities
+designed to cope with the more specific demands of academic writing,
+especially in the humanities and the social sciences.  All quote styles as
+well as the optional active quotes are freely configurable.")
+    (license license:lppl1.3c+)))
 
 (define-public texlive-logreq
-  (let ((template (simple-texlive-package
-                   "texlive-logreq"
-                   (list "/doc/latex/logreq/"
-                         "/tex/latex/logreq/")
-                   (base32
-                    "13difccs3cxlkqlnhw286yb0c7mifrxfd402a2x5wwxv0m1kgfqd")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (propagated-inputs
-       (list texlive-etoolbox))
-      (home-page "https://www.ctan.org/pkg/logreq")
-      (synopsis "Support for automation of the LaTeX workflow")
-      (description "The package helps to automate a typical LaTeX
-workflow that involves running LaTeX several times and running tools
-such as BibTeX or makeindex.  It will log requests like \"please rerun
-LaTeX\" or \"please run BibTeX on file X\" to an external file in a
-machine-readable format.  Compiler scripts and integrated LaTeX
-editing environments may parse this file to determine the next steps
-in the workflow.  In sum, the package will do two things:
-
-@enumerate
-@item
-enable package authors to use LaTeX commands to issue requests, and
-
-@item
-collect all requests from all packages and write them to an external
-XML file.
-@end enumerate\n")
-      (license license:lppl1.3c))))
+  (package
+    (name "texlive-logreq")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/logreq/" "tex/latex/logreq/")
+             (base32
+              "13difccs3cxlkqlnhw286yb0c7mifrxfd402a2x5wwxv0m1kgfqd")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-etoolbox))
+    (home-page "https://ctan.org/pkg/logreq")
+    (synopsis "Support for automation of the LaTeX workflow")
+    (description
+     "The package helps to automate a typical LaTeX workflow that involves
+running LaTeX several times, running tools such as BibTeX or makeindex, and so
+on.  It will log requests like ``please rerun LaTeX'' or ``please run BibTeX
+on file X'' to an external XML file which lists all open tasks in
+a machine-readable format.  Compiler scripts and integrated LaTeX editing
+environments may parse this file to determine the next steps in the
+workflow. In sum, the package will do two things: enable package authors to
+use LaTeX commands to issue requests, collect all requests from all packages
+and write them to an external XML file at the end of the document.")
+    (license license:lppl1.3+)))
 
 (define-public texlive-biblatex
-  (let ((template (simple-texlive-package
-                   "texlive-biblatex"
-                   (list "/doc/latex/biblatex/"
-                         "/tex/latex/biblatex/")
-                   (base32
-                    "091cz2vrq22d1fr05wljd8vbllsz95q2hn2p8hhrwb2l2xrmxwn8")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (propagated-inputs
-       (list texlive-logreq texlive-url))
-      (home-page "https://www.ctan.org/pkg/biblatex")
-      (synopsis "Sophisticated bibliographies in LaTeX")
-      (description "BibLaTeX is a complete reimplementation of the
-bibliographic facilities provided by LaTeX.  Formatting of the
-bibliography is entirely controlled by LaTeX macros, facilitating the
-design of new bibliography and citation styles.  BibLaTeX uses its own
-data backend program \"biber\" to read and process the bibliographic
-data.  With biber, the range of features provided by biblatex
-includes:
-
-@enumerate
-@item
-full unicode support,
-
-@item
-customisable bibliography labels,
-
-@item
-multiple bibliographies in the same document, and
-
-@item
-subdivided bibliographies, such as bibliographies per chapter or
-section.
-@end enumerate\n")
-      (license license:lppl1.3c))))
+  (package
+    (name "texlive-biblatex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bib/biblatex/biblatex/"
+                   "bibtex/bst/biblatex/" "doc/latex/biblatex/"
+                   "tex/latex/biblatex/")
+             (base32
+              "08wvsdwcixj50kklv4zwjs9rpjmhwzxxd242hvyi6lzkd7r0fnq4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs
+     (list texlive-etoolbox
+           texlive-kvoptions
+           texlive-logreq
+           texlive-pdftexcmds
+           texlive-url))
+    (home-page "https://ctan.org/pkg/biblatex")
+    (synopsis "Sophisticated Bibliographies in LaTeX")
+    (description
+     "BibLaTeX is a complete reimplementation of the bibliographic facilities
+provided by LaTeX.  Formatting of the bibliography is entirely controlled by
+LaTeX macros, and a working knowledge of LaTeX should be sufficient to design
+new bibliography and citation styles.  BibLaTeX uses its own data backend
+program called @code{biber} to read and process the bibliographic data.  With
+@code{biber}, the range of features provided by BibLaTeX includes full Unicode
+support, customisable bibliography labels, multiple bibliographies in the same
+document, and subdivided bibliographies, such as bibliographies per chapter or
+section.")
+    (license license:lppl1.3+)))
 
 (define-public texlive-biblatex-apa
   (package
-    ;; Version 9.16 2022-06-22
-    (inherit (simple-texlive-package
-              "texlive-biblatex-apa"
-              (list "doc/latex/biblatex-apa/"
-                    "tex/latex/biblatex-apa/")
-              (base32
-               "0ivf7xbzj4xd57sqfbi87hbr73rraqifkzvx06yxgq0gmzz0x6wl")
-              #:trivial? #t))
-    (propagated-inputs
-     (list texlive-biblatex biber texlive-csquotes))
-    (home-page
-     "https://www.ctan.org/pkg/biblatex-apa")
+    (name "texlive-biblatex-apa")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/biblatex-apa/"
+                   "tex/latex/biblatex-apa/")
+             (base32
+              "1igzmgzfchn54zkb78fwsdk2lqs2pp0ydzzcmk1cydhmsfrjya4l")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/biblatex-apa")
     (synopsis "BibLaTeX citation and reference style for APA")
     (description
      "This is a fairly complete BibLaTeX style (citations and references) for
-@acronym{APA, American Psychological Association} publications.  It implements
-and automates most of the guidelines in the APA 7th edition style guide for
+APA (American Psychological Association) publications.  It implements and
+automates most of the guidelines in the APA 7th edition style guide for
 citations and references.")
     (license license:lppl1.3c)))
 
+(define-public texlive-truthtable
+  (package
+    (name "texlive-truthtable")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/truthtable/"
+                   "tex/lualatex/truthtable/")
+             (base32
+              "193326nni5xnjkz9hhc1pjzkv0qrbz73irz6vixd8igpbavi2dzv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/truthtable")
+    (synopsis
+     "Automatically generate truth tables for given variables and statements")
+    (description
+     "This LuaLaTeX package permits to automatically generate truth tables
+given a table header.  It supports a number of logical operations which can be
+combined as needed.")
+    (license license:lppl1.3c)))
+
 (define-public texlive-todonotes
-  (let ((template (simple-texlive-package
-                   "texlive-todonotes"
-                   (list "/doc/latex/todonotes/"
-                         "/tex/latex/todonotes/")
-                   (base32
-                    "1jqw8jy73488bdr971w0dnlggsvicagpnpx8ddqkma920ba8rabp")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (propagated-inputs
-       (list texlive-pgf texlive-latex-xkeyval))
-      (home-page "http://www.ctan.org/pkg/todonotes")
-      (synopsis "Marking things to do in a LaTeX document")
-      (description "The @code{todonotes} package lets the user mark
-things to do later, in a simple and visually appealing way.  The
-package takes several options to enable customization and finetuning
-of the visual appearance.")
-      (license license:lppl1.3+))))
+  (package
+    (name "texlive-todonotes")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/todonotes/"
+                   "source/latex/todonotes/"
+                   "tex/latex/todonotes/")
+             (base32
+              "0gw9ny0s048kq78m2njrv2m6y4z0rck58i9nc892vl93h7gi4p1v")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs
+     (list texlive-pgf texlive-tools texlive-xcolor texlive-xkeyval))
+    (home-page "https://ctan.org/pkg/todonotes")
+    (synopsis "Marking things to do in a LaTeX document")
+    (description
+     "The @code{todonotes} package lets the user mark things to do later, in
+a simple and visually appealing way.  The package takes several options to
+enable customization and finetuning of the visual appearance.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-tsvtemplate
+  (package
+    (name "texlive-tsvtemplate")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/tsvtemplate/"
+                   "tex/luatex/tsvtemplate/")
+             (base32
+              "05q1vfsy9w0pmc489dl995iqr9srdv107mj89nlc269m3wjnwn7a")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tsvtemplate")
+    (synopsis "Apply a template to a TSV file")
+    (description
+     "This is a simple TSV (tab-separated values) reader for LuaLaTeX and
+plain LuaTeX.  It also supports (non-quoted) comma-separated values, or indeed
+values separated by any character.")
+    (license license:eupl1.2)))
+
+(define-public texlive-typewriter
+  (package
+    (name "texlive-typewriter")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/typewriter/"
+                   "tex/lualatex/typewriter/")
+             (base32
+              "00c53vbm8fchjggi3h1w49y07ma4cmmliqx2bhkvis6qsqgddw5f")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/typewriter")
+    (synopsis "Typeset with a randomly variable monospace font")
+    (description
+     "The typewriter package uses the OpenType Computer Modern Unicode
+Typewriter font, together with a LuaTeX virtual font setup that introduces
+random variability in grey level and angle of each character.")
+    (license license:lppl)))
+
+(define-public texlive-uninormalize
+  (package
+    (name "texlive-uninormalize")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/uninormalize/"
+                   "tex/lualatex/uninormalize/")
+             (base32
+              "1c4pki1yw5599s9nyj1ir7j26mgbhf1iw7m44685d8la9vbzv8dm")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/uninormalize")
+    (synopsis "Unicode normalization support")
+    (description
+     "This package provides Unicode normalization (useful for composed
+characters) for LuaLaTeX.")
+    (license license:lppl1.3+)))
 
 (define-public texlive-units
-  (let ((template (simple-texlive-package
-                   "texlive-units"
-                   (list "/doc/latex/units/"
-                         "/tex/latex/units/")
-                   (base32
-                    "1ia1vzy8dp7pdvmawwnmh9lmkajmpnnh62dixrjpb6mnxq118bfd")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (home-page "http://www.ctan.org/pkg/units")
-      (synopsis "Typeset physical units and fractions")
-      (description "@code{units} is a package for typesetting physical
-units in a standard-looking way.  The package is based upon
-@code{nicefrac}, a package for typing fractions.  @code{nicefrac} is
-included in the @code{units} bundle.")
-      (license license:gpl3+))))
+  (package
+    (name "texlive-units")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/units/" "source/latex/units/"
+                   "tex/latex/units/")
+             (base32
+              "1mrdsg55f40cvarrx84gbhrnsk8mlv915nll17lnfzfapgmvjsbl")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/units")
+    (synopsis "Typeset physical units and fractions")
+    (description "@code{units} is a package for typesetting physical units in
+a standard-looking way.  The package is based upon @code{nicefrac}, a package
+for typing fractions.  @code{nicefrac} is included in the @code{units}
+bundle.")
+    (license license:gpl3+)))
 
 (define-public texlive-microtype
-  (let ((template (simple-texlive-package
-                   "texlive-microtype"
-                   (list "/doc/latex/microtype/"
-                         "/tex/latex/microtype/")
-                   (base32
-                    "07861ixrjzxm0l24z82ivhaj4v6xm4ijbaabp66jxsf8s8h7dq9n")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (home-page "http://www.ctan.org/pkg/microtype")
-      (synopsis "Subliminal refinements towards typographical perfection")
-      (description "@code{microtype} provides a LaTeX interface to the
-micro-typographic extensions that were introduced by pdfTeX and have
-since propagated to XeTeX and LuaTeX: most prominently character
-protrusion and font expansion, the adjustment of kerning and interword
-spacing, hyphenatable letterspacing and the possibility to disable all
-or selected ligatures.  These features may be applied to customisable
-sets of fonts.  All micro-typographic aspects of the fonts can be
-configured in a straight-forward and flexible way.  Settings for
-various fonts are provided.  An alternative package
-@code{letterspace}, which also works with plain TeX, is included in
-the bundle.")
-      (license license:lppl1.3c))))
+  (package
+    (name "texlive-microtype")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/microtype/"
+                   "source/latex/microtype/"
+                   "tex/latex/microtype/")
+             (base32
+              "039v1dw3n4lnd8ipazlkb7p5abqcrigjayx797ggh3ak8dcqwlli")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/microtype")
+    (synopsis "Subliminal refinements towards typographical perfection")
+    (description
+     "The package provides a LaTeX interface to the micro-typographic
+extensions that were introduced by pdfTeX and have since also propagated to
+XeTeX and LuaTeX: most prominently, character protrusion and font expansion,
+furthermore the adjustment of interword spacing and additional kerning, as
+well as hyphenatable letterspacing (tracking) and the possibility to disable
+all or selected ligatures.  These features may be applied to customisable sets
+of fonts, and all micro-typographic aspects of the fonts can be configured in
+a straight-forward and flexible way.  An alternative package
+@code{letterspace}, which also works with plain TeX, is included in the
+bundle.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-minitoc
+  (package
+    (name "texlive-minitoc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/minitoc/"
+                   "tex/latex/minitoc/")
+             (base32
+              "0yd1na5b9m7z1j87a5fjwjqddfpiblfbpzcv0vlvql6lwh38mii7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/minitoc")
+    (synopsis "Produce a table of contents for each chapter, part or section")
+    (description
+     "The @code{minitoc} package allows you to add
+mini-tables-of-contents (minitocs) at the beginning of every chapter, part or
+section.  There is also provision for mini-lists of figures and of tables.  At
+the part level, they are parttocs, partlofs and partlots.  If the type of
+document does not use chapters, the basic provision is section level secttocs,
+sectlofs and sectlots.  The package has provision for language-specific
+configuration of its own fixed names, using @file{.mld} files.")
+    (license license:lppl1.3+)))
 
 (define-public texlive-minted
-  (let ((template (simple-texlive-package
-                   "texlive-minted"
-                   (list "/doc/latex/minted/"
-                         "/source/latex/minted/"
-                         "/tex/latex/minted/")
-                   (base32
-                    "13cjsjb3b04n9arwp46ayk8fcicylxq5g1864cpxl1lxjxh1yi0l"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "latex/minted")))
-      (propagated-inputs (list python-pygments
-                               texlive-etoolbox
-                               texlive-fancyvrb
-                               texlive-fvextra
-                               texlive-latex-float
-                               texlive-latex-framed
-                               texlive-latex-ifplatform
-                               texlive-latex-newfloat
-                               texlive-lineno
-                               texlive-xstring))
-      (home-page "https://ctan.org/pkg/minted")
-      (synopsis "Highlight source code in LaTeX documents")
-      (description "This package facilitates expressive syntax highlighting in
-LaTeX using the Pygments library.  This package also provides options to
-customize the highlighted source code output using fancyvrb and fvextra.")
-      (license license:lppl1.3+))))
+  (package
+    (name "texlive-minted")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/minted/" "source/latex/minted/"
+                   "tex/latex/minted/")
+             (base32
+              "1z2vagia7sbfa134qj3dfdkppy0v4yjykaj594c6z9qy1z5jn5mc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs
+     (list python-pygments
+           texlive-catchfile
+           texlive-etoolbox
+           texlive-fancyvrb
+           texlive-float
+           texlive-framed
+           texlive-fvextra
+           texlive-graphics
+           texlive-ifplatform
+           texlive-kvoptions
+           texlive-lineno
+           texlive-pdftexcmds
+           texlive-tools
+           texlive-upquote
+           texlive-xcolor
+           texlive-xstring))
+    (home-page "https://ctan.org/pkg/minted")
+    (synopsis "Highlighted source code for LaTeX")
+    (description
+     "The package that facilitates expressive syntax highlighting in LaTeX
+using the powerful Pygments library.  The package also provides options to
+customize the highlighted source code output using @code{fancyvrb}.")
+    (license license:lppl1.3+)))
 
 (define-public texlive-caption
-  (let ((template (simple-texlive-package
-                   "texlive-caption"
-                   (list "/doc/latex/caption/"
-                         "/tex/latex/caption/")
-                   (base32
-                    "1isnn375d14xsx398j3m8rbb0pdk12kijw4xcgl82xici170klwq")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (home-page "http://www.ctan.org/pkg/caption")
-      (synopsis "Customising captions in floating environments")
-      (description "The @code{caption} package provides many ways to
-customise the captions in floating environments like figure and table.
-Facilities include rotating captions, sideways captions and continued
-captions (for tables or figures that come in several parts).  A list
-of compatibility notes, for other packages, is provided in the
-documentation.  The package also provides the \"caption outside
-float\" facility, in the same way that simpler packages like
-@code{capt-ofcapt-of} do.  The package supersedes @code{caption2}.
-Packages @code{bicaption}, @code{ltcaption} and @code{subcaption} are
-included in the bundle.")
-      (license license:lppl1.3+))))
+  (package
+    (name "texlive-caption")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/caption/" "source/latex/caption/"
+                   "tex/latex/caption/")
+             (base32
+              "1hgd52dxm35k63jb2vxrkghlaq41h89bwbqyihaim2h06kmnpb0r")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/caption")
+    (synopsis "Customising captions in floating environments")
+    (description
+     "The @code{caption} package provides many ways to customise the captions
+in floating environments like figure and table, and cooperates with many other
+packages.  Facilities include rotating captions, sideways captions, continued
+captions (for tables or figures that come in several parts).  A list of
+compatibility notes, for other packages, is provided in the documentation.
+The package also provides the caption outside float facility, in the same way
+that simpler packages like capt-of do.")
+    (license license:lppl1.3+)))
 
 (define-public texlive-symbol
   (package
-    (inherit (simple-texlive-package
-              "texlive-symbol"
-              (list "/dvips/symbol/"
-                    "/fonts/afm/adobe/symbol/"
-                    "/fonts/afm/urw/symbol/"
-                    "/fonts/tfm/adobe/symbol/"
-                    "/fonts/tfm/urw35vf/symbol/"
-                    "/fonts/type1/urw/symbol/"
-                    "/fonts/map/dvips/symbol/"
-                    "/tex/latex/symbol/")
-              (base32
-               "01xiygb88xwi7rfvh1zrlxzi5pqb5fvylws5zzszg379iz4pyzwj")
-              #:trivial? #t))
+    (name "texlive-symbol")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "dvips/symbol/"
+                   "fonts/afm/adobe/symbol/"
+                   "fonts/afm/urw/symbol/"
+                   "fonts/map/dvips/symbol/"
+                   "fonts/tfm/adobe/symbol/"
+                   "fonts/tfm/monotype/symbol/"
+                   "fonts/tfm/urw35vf/symbol/"
+                   "fonts/type1/urw/symbol/"
+                   "tex/latex/symbol/")
+             (base32
+              "1pdkpr86bhia5hcmf7q3nhvklnsga4mqqrrirgl8a7al7x6q3ivs")))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/urw-base35")
-    (synopsis "URW Base 35 font pack for LaTeX")
-    (description "This package provides a drop-in replacement for the
-Symbol font from Adobe's basic set.")
-    (license license:gpl2)))
+    (synopsis "Replacement for Adobe's Symbol font")
+    (description
+     "This package provides a drop-in replacement for the Symbol font from
+Adobe's basic set.")
+    (license license:gpl3+)))
 
 (define-public texlive-mathpazo
   (package
-    (inherit (simple-texlive-package
-              "texlive-mathpazo"
-              (list "/doc/latex/mathpazo/"
-                    "/fonts/afm/public/mathpazo/"
-                    "/fonts/tfm/public/mathpazo/"
-                    "/fonts/type1/public/mathpazo/"
-                    "/fonts/vf/public/mathpazo/")
-              (base32
-               "02in6hdnbnkz216mpy8g6fk3wmlls8nh5982vmg37vhbj77lk0rh")
-              #:trivial? #t))
-    (home-page "http://www.ctan.org/pkg/mathpazo")
+    (name "texlive-mathpazo")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/mathpazo/"
+                   "fonts/afm/public/mathpazo/"
+                   "fonts/tfm/public/mathpazo/"
+                   "fonts/type1/public/mathpazo/"
+                   "fonts/vf/public/mathpazo/"
+                   "source/latex/mathpazo/")
+             (base32
+              "0g10rjgg1kb78lgyxmwjrkgpy24yq3v0m47h6zhbc68rrmmawvwp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-fpl texlive-palatino))
+    (home-page "https://ctan.org/pkg/mathpazo")
     (synopsis "Fonts to typeset mathematics to match Palatino")
     (description "The Pazo Math fonts are a family of PostScript fonts
-suitable for typesetting mathematics in combination with the Palatino
-family of text fonts.  The Pazo Math family is made up of five fonts
-provided in Adobe Type 1 format.  These contain glyphs that are
-usually not available in Palatino and for which Computer Modern looks
-odd when combined with Palatino.  These glyphs include the uppercase
-Greek alphabet in upright and slanted shapes, the lowercase Greek
-alphabet in slanted shape, several mathematical glyphs and the
-uppercase letters commonly used to represent various number sets.
-LaTeX macro support is provided in package @code{psnfss}.")
+suitable for typesetting mathematics in combination with the Palatino family
+of text fonts.  The Pazo Math family is made up of five fonts provided in
+Adobe Type 1 format.  These contain glyphs that are usually not available in
+Palatino and for which Computer Modern looks odd when combined with Palatino.
+These glyphs include the uppercase Greek alphabet in upright and slanted
+shapes, the lowercase Greek alphabet in slanted shape, several mathematical
+glyphs and the uppercase letters commonly used to represent various number
+sets.  LaTeX macro support is provided in package @code{psnfss}.")
     (license license:gpl3+)))
 
+(define-public texlive-mathspec
+  (package
+    (name "texlive-mathspec")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/mathspec/"
+                   "tex/xelatex/mathspec/")
+             (base32
+              "0bfdzlim2kkvfzs8p7brwlc46qy41hvxb72xr53ijg2kplsqmkh8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mathspec")
+    (synopsis "Specify arbitrary fonts for mathematics in XeTeX")
+    (description
+     "The mathspec package provides an interface to typeset mathematics in
+XeLaTeX with arbitrary text fonts using @code{fontspec} as a backend.")
+    (license license:lppl)))
+
+(define-public texlive-mathtools
+  (package
+    (name "texlive-mathtools")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/mathtools/"
+                   "source/latex/mathtools/"
+                   "tex/latex/mathtools/")
+             (base32
+              "11rs5wd1m5f3y309gdlq47vj3xzs8m87qlbd7b6glhq8lx8wfbd6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mathtools")
+    (synopsis "Mathematical tools to use with @code{amsmath}")
+    (description
+     "Mathtools provides a series of packages designed to enhance the
+appearance of documents containing a lot of mathematics.  It is based on
+@code{amsmath} and fixes various deficiencies of it and standard LaTeX.  It
+provides:
+@itemize
+@item Extensible symbols, such as brackets, arrows, harpoons, etc.;
+@item Various symbols such as \\coloneqq (:=);
+@item Easy creation of new tag forms;
+@item Showing equation numbers only for referenced equations;
+@item Extensible arrows, harpoons and hookarrows;
+@item Starred versions of the @code{matrix} environments for specifying the
+column alignment;
+@item More building blocks: multlined, cases-like environments, new gathered
+environments;
+@item Maths versions of @code{\\makebox}, @code{\\llap}, @code{\\rlap} etc.;
+@item Cramped math styles; and more...
+@end itemize")
+    (license license:lppl1.3c)))
+
+(define-public texlive-memoir
+  (package
+    (name "texlive-memoir")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/memoir/" "makeindex/memoir/"
+                   "source/latex/memoir/" "tex/latex/memoir/")
+             (base32
+              "10jf0kiwvgrki8az04b57v0ffm6b3jj1rz3q6fgxhnrbsd68iphr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/memoir")
+    (synopsis "Typeset fiction, non-fiction and mathematical books")
+    (description
+     "The @code{memoir} class is for typesetting poetry, fiction,
+non-fiction, and mathematical works.  Permissible document base font sizes
+range from 9 to 60pt.  There is a range of page-styles and well over a dozen
+chapter-styles to choose from, as well as methods for specifying your own
+layouts and designs.  The class also provides the functionality of over thirty
+of the more popular packages, thus simplifying document sources.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-fp
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-fp"
-      (list "doc/latex/fp/" "tex/latex/fp/" "tex/plain/fp/")
-      (base32 "1q555fx71cf88sn3npzb0j2i10ak920k0qc9ccdygz99vqg10dad")
-      #:trivial? #t))
-    (home-page "https://ctan.org/macros/latex/contrib/fp")
+    (name "texlive-fp")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/fp/" "tex/latex/fp/"
+                   "tex/plain/fp/")
+             (base32
+              "1q555fx71cf88sn3npzb0j2i10ak920k0qc9ccdygz99vqg10dad")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fp")
     (synopsis "Fixed point arithmetic")
     (description
      "This package provides an extensive collection of arithmetic operations
@@ -11349,16 +23275,17 @@ for fixed point real numbers of high precision.")
 
 (define-public texlive-fpl
   (package
-    (inherit (simple-texlive-package
-              "texlive-fpl"
-              (list "/doc/fonts/fpl/"
-                    "/source/fonts/fpl/"
-                    "/fonts/afm/public/fpl/"
-                    "/fonts/type1/public/fpl/")
-              (base32
-               "02gkl516z9kn8xqs269pdkqn37sxm8ib0pcs43s4rs2rhyyl5z68")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/fpl")
+    (name "texlive-fpl")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/fpl/" "fonts/afm/public/fpl/"
+                   "fonts/type1/public/fpl/" "source/fonts/fpl/")
+             (base32
+              "02gkl516z9kn8xqs269pdkqn37sxm8ib0pcs43s4rs2rhyyl5z68")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fpl")
     (synopsis "SC and OsF fonts for URW Palladio L")
     (description "The FPL Fonts provide a set of SC/OsF fonts for URW
 Palladio L which are compatible with the Palatino SC/OsF fonts from
@@ -11367,171 +23294,282 @@ the @code{psnfss} distribution.")
     ;; Either LPPL version 1.0 or later, or GPL version 2
     (license (list license:lppl1.0+ license:gpl2))))
 
+(define-public texlive-arabxetex
+  (package
+    (name "texlive-arabxetex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/xelatex/arabxetex/"
+                   "fonts/misc/xetex/fontmapping/arabxetex/"
+                   "source/xelatex/arabxetex/"
+                   "tex/xelatex/arabxetex/")
+             (base32
+              "097lh7ksw9rg93f1c7a4fqglgfpydf1qp3sbgy9xfgszcdpknmrk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:tex-format "xelatex"
+      #:phases
+           #~(modify-phases %standard-phases
+               ;; Use dummy fonts to avoid pulling in needless dependencies.
+               ;; We're only interested in building the package, not the
+               ;; documentation.
+               (add-after 'unpack 'change-fonts
+                 (lambda _
+                   (substitute* "source/xelatex/arabxetex/arabxetex.dtx"
+                     (("(newfontfamily.*?\\{)[^}]+}" _ prefix)
+                      (string-append prefix "FreeSans}"))
+                     (("(set(main|mono|sans)font(\\[.*?])?\\{)[^}]+}" _ prefix)
+                      (string-append prefix "FreeSans}"))))))))
+    (native-inputs
+     (list fontconfig
+           font-gnu-freefont
+           texlive-amsmath
+           texlive-amsfonts
+           texlive-bidi
+           texlive-fancyvrb
+           texlive-fontspec
+           texlive-hologo
+           texlive-hypdoc
+           texlive-hyperref
+           texlive-infwarerr
+           texlive-kvdefinekeys
+           texlive-kvoptions
+           texlive-kvsetkeys
+           texlive-ltxcmds
+           texlive-paralist
+           texlive-pdftexcmds
+           texlive-supertabular
+           texlive-tools
+           texlive-xetex
+           texlive-xkeyval
+           texlive-zref))
+    (home-page "https://ctan.org/pkg/arabxetex")
+    (synopsis "ArabTeX-like interface for XeLaTeX")
+    (description
+     "ArabXeTeX provides a convenient ArabTeX-like user-interface for
+typesetting languages using the Arabic script in XeLaTeX, with flexible access
+to font features.  Input in ArabTeX notation can be set in three different
+vocalization modes or in roman transliteration.  Direct UTF-8 input is also
+supported.")
+    (license license:lppl1.3c)))
+
 (define-public texlive-arev
   (package
-    (inherit (simple-texlive-package
-              "texlive-arev"
-              (list "/doc/fonts/arev/"
-                    "/fonts/afm/public/arev/"
-                    "/fonts/enc/dvips/arev/"
-                    "/fonts/map/dvips/arev/"
-                    "/fonts/tfm/public/arev/"
-                    "/fonts/type1/public/arev/"
-                    "/fonts/vf/public/arev/"
-                    "/tex/latex/arev/")
-              (base32
-               "15wkgc48r52mjpymv6l7j9bl99kwxbvg3g1mi3qyq7nfm799dkxy")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/arev")
+    (name "texlive-arev")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/arev/"
+                   "fonts/afm/public/arev/"
+                   "fonts/enc/dvips/arev/"
+                   "fonts/map/dvips/arev/"
+                   "fonts/tfm/public/arev/"
+                   "fonts/type1/public/arev/"
+                   "fonts/vf/public/arev/"
+                   "source/fonts/arev/"
+                   "tex/latex/arev/")
+             (base32
+              "1a0zw9vc6z0shxvb4kdhfqdhwpzph5hm9v7klpchlisabvk421y1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/arev")
     (synopsis "Fonts and LaTeX support files for Arev Sans")
-    (description "The @code{arev} package provides type 1 fonts,
-virtual fonts and LaTeX packages for using Arev Sans in both text and
-mathematics.  Arev Sans is a derivative of Bitstream Vera Sans, adding
-support for Greek and Cyrillic characters and a few variant letters
-appropriate for mathematics.  The font is primarily used in LaTeX for
-presentations, particularly when using a computer projector.  Arev
-Sans has large x-height, \"open letters\", wide spacing and thick
-stems.  The style is very similar to the SliTeX font lcmss but
-heavier.  Arev is one of a very small number of sans-font mathematics
-support packages.  Others are cmbright, hvmath and kerkis.")
-    (license (list license:silofl1.1 ;for Arev Sans
-                   license:lppl1.3a  ;for TeX support files
-                   license:gpl2))))  ;for ams-mdbch.sty
+    (description
+     "The @code{arev} package provides type 1 fonts, virtual fonts and LaTeX
+packages for using Arev Sans in both text and mathematics.  Arev Sans is
+a derivative of Bitstream Vera Sans, adding support for Greek and Cyrillic
+characters and a few variant letters appropriate for mathematics.  The font is
+primarily used in LaTeX for presentations, particularly when using a computer
+projector.  Arev Sans has large x-height, open letters, wide spacing and thick
+stems.  The style is very similar to the SliTeX font @code{lcmss} but heavier.
+Arev is one of a very small number of sans-font mathematics support
+packages.")
+    (license (list license:silofl1.1    ;for Arev Sans
+                   license:lppl1.3a     ;for TeX support files
+                   license:gpl2))))     ;for ams-mdbch.sty
+
+(define-public texlive-awesomebox
+  (package
+    (name "texlive-awesomebox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/awesomebox/"
+                   "tex/latex/awesomebox/")
+             (base32
+              "0jmxhas12fs30x2csv1rbsjr71a60fv2r3i5q7xd5n9zmmrnh32f")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/awesomebox")
+    (synopsis "Draw admonition blocks in your documents")
+    (description
+     "Awesome Box is all about drawing admonition blocks around text to inform
+or alert readers about something particular.  The specific aim of this package
+is to use FontAwesome icons to ease the illustration of these blocks.")
+    (license license:wtfpl2)))
 
 (define-public texlive-mathdesign
   (package
-    (inherit (simple-texlive-package
-              "texlive-mathdesign"
-              (list "/doc/fonts/mathdesign/"
-                    "/dvips/mathdesign/"
-                    "/fonts/enc/dvips/mathdesign/"
-                    "/fonts/map/dvips/mathdesign/"
-                    "/fonts/tfm/public/mathdesign/"
-                    "/fonts/type1/public/mathdesign/"
-                    "/fonts/vf/public/mathdesign/"
-                    "/tex/latex/mathdesign/")
-              (base32
-               "0jcby2sd0l3ank2drxc0qcf5d1cwa8idzh4g91h4nxk8zrzxj8nr")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/mathdesign")
+    (name "texlive-mathdesign")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/mathdesign/"
+                   "dvips/mathdesign/"
+                   "fonts/enc/dvips/mathdesign/"
+                   "fonts/map/dvips/mathdesign/"
+                   "fonts/tfm/public/mathdesign/mdbch/"
+                   "fonts/tfm/public/mathdesign/mdgreek/"
+                   "fonts/tfm/public/mathdesign/mdici/"
+                   "fonts/tfm/public/mathdesign/mdpgd/"
+                   "fonts/tfm/public/mathdesign/mdpus/"
+                   "fonts/tfm/public/mathdesign/mdput/"
+                   "fonts/tfm/public/mathdesign/mdugm/"
+                   "fonts/type1/public/mathdesign/mdbch/"
+                   "fonts/type1/public/mathdesign/mdici/"
+                   "fonts/type1/public/mathdesign/mdpgd/"
+                   "fonts/type1/public/mathdesign/mdpus/"
+                   "fonts/type1/public/mathdesign/mdput/"
+                   "fonts/type1/public/mathdesign/mdugm/"
+                   "fonts/vf/public/mathdesign/mdbch/"
+                   "fonts/vf/public/mathdesign/mdgreek/"
+                   "fonts/vf/public/mathdesign/mdici/"
+                   "fonts/vf/public/mathdesign/mdpgd/"
+                   "fonts/vf/public/mathdesign/mdpus/"
+                   "fonts/vf/public/mathdesign/mdput/"
+                   "fonts/vf/public/mathdesign/mdugm/"
+                   "tex/latex/mathdesign/")
+             (base32
+              "0jcby2sd0l3ank2drxc0qcf5d1cwa8idzh4g91h4nxk8zrzxj8nr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mathdesign")
     (synopsis "Mathematical fonts to fit with particular text fonts")
-    (description "The Math Design project offers free mathematical
-fonts that match with existing text fonts.  To date, three free font
-families are available: Adobe Utopia, URW Garamond and Bitstream
-Charter.  Mathdesign covers the whole LaTeX glyph set including AMS
-symbols.  Both roman and bold versions of these symbols can be used.
-Moreover, there is a choice between three greek fonts (two of them
-created by the Greek Font Society).")
-    (license license:gpl2+)))
+    (description
+     "The Math Design project offers mathematical fonts that match with
+existing text fonts.  To date, three free font families are available: Adobe
+Utopia, URW Garamond and Bitstream Charter.  Mathdesign covers the whole LaTeX
+glyph set including AMS symbols.  Both roman and bold versions of these
+symbols can be used.  Moreover, there is a choice between three greek
+fonts (two of them created by the Greek Font Society).")
+    (license license:gpl3+)))
 
 (define-public texlive-bera
   (package
-    (inherit (simple-texlive-package
-              "texlive-bera"
-              (list "/doc/fonts/bera/"
-                    "/fonts/afm/public/bera/"
-                    "/fonts/map/dvips/bera/"
-                    "/fonts/tfm/public/bera/"
-                    "/fonts/type1/public/bera/"
-                    "/fonts/vf/public/bera/"
-                    "/tex/latex/bera/")
-              (base32
-               "1pkmhhr6ah44xhipjr7nianv03hr4w4bn45xcvp264yw6ymqzqwr")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/bera")
+    (name "texlive-bera")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/bera/"
+                   "fonts/afm/public/bera/"
+                   "fonts/map/dvips/bera/"
+                   "fonts/tfm/public/bera/"
+                   "fonts/type1/public/bera/"
+                   "fonts/vf/public/bera/"
+                   "tex/latex/bera/")
+             (base32
+              "1pkmhhr6ah44xhipjr7nianv03hr4w4bn45xcvp264yw6ymqzqwr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bera")
     (synopsis "Bera fonts")
-    (description "The @code{bera} package contains the Bera Type 1
-fonts and files to use the fonts with LaTeX.  Bera is a set of three
-font families: Bera Serif (a slab-serif Roman), Bera Sans (a Frutiger
-descendant) and Bera Mono (monospaced/typewriter).  The Bera family is
-a repackaging, for use with TeX, of the Bitstream Vera family.")
+    (description "The @code{bera} package contains the Bera Type 1 fonts and
+files to use the fonts with LaTeX.  Bera is a set of three font families: Bera
+Serif (a slab-serif Roman), Bera Sans (a Frutiger descendant) and Bera
+Mono (monospaced/typewriter).  The Bera family is a repackaging, for use with
+TeX, of the Bitstream Vera family.")
     (license license:silofl1.1)))
 
 (define-public texlive-fourier
   (package
-    (inherit (simple-texlive-package
-              "texlive-fourier"
-              (list "/doc/fonts/fourier/"
-                    "/fonts/afm/public/fourier/"
-                    "/fonts/map/dvips/fourier/"
-                    "/fonts/tfm/public/fourier/"
-                    "/fonts/type1/public/fourier/"
-                    "/fonts/vf/public/fourier/"
-                    "/tex/latex/fourier/")
-              (base32
-               "04d575nd4yvl58g9dfab9mrjxiv4792bdkz4bjvlkx6x257vlfzn")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/fourier")
-    (synopsis "Utopia fonts for LaTeX documents")
-    (description "Fourier-GUTenberg is a LaTeX typesetting system
-which uses Adobe Utopia as its standard base font.  Fourier-GUTenberg
-provides all complementary typefaces needed to allow Utopia based TeX
-typesetting including an extensive mathematics set and several other
-symbols.  The system is absolutely stand-alone; apart from Utopia and
-Fourier no other typefaces are required.  Utopia is a registered
-trademark of Adobe Systems Incorporated.")
+    (name "texlive-fourier")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/fourier/"
+                   "fonts/afm/public/fourier/"
+                   "fonts/map/dvips/fourier/"
+                   "fonts/opentype/public/fourier/"
+                   "fonts/tfm/public/fourier/"
+                   "fonts/type1/public/fourier/"
+                   "fonts/vf/public/fourier/"
+                   "tex/latex/fourier/")
+             (base32
+              "10nw0s3820mf4nv4b655cfvm8asjb1q71yd21cnm8zjxj0xpcrpx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fourier")
+    (synopsis "Using Utopia fonts for LaTeX documents")
+    (description
+     "Fourier-GUTenberg is a LaTeX typesetting system which uses Adobe Utopia
+as its standard base font.  Fourier-GUTenberg provides all complementary
+typefaces needed to allow Utopia based TeX typesetting, including an extensive
+mathematics set and several other symbols.  The system is absolutely
+stand-alone: apart from Utopia and Fourier, no other typefaces are required.
+Utopia is a registered trademark of Adobe Systems Incorporated")
     (license license:lppl)))
 
 (define-public texlive-utopia
   (package
-    (inherit (simple-texlive-package
-              "texlive-utopia"
-              (list "/doc/fonts/utopia/"
-                    "/fonts/afm/adobe/utopia/"
-                    "/fonts/tfm/adobe/utopia/"
-                    "/fonts/type1/adobe/utopia/"
-                    "/fonts/vf/adobe/utopia/")
-              (base32
-               "113wgkfz4z0ls2grxxfj17l42a1yv9r5ipcd0156xnfsrqvqzxfc")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/utopia")
+    (name "texlive-utopia")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/utopia/" "fonts/afm/adobe/utopia/"
+                   "fonts/tfm/adobe/utopia/"
+                   "fonts/type1/adobe/utopia/"
+                   "fonts/vf/adobe/utopia/")
+             (base32
+              "113wgkfz4z0ls2grxxfj17l42a1yv9r5ipcd0156xnfsrqvqzxfc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/utopia")
     (synopsis "Adobe Utopia fonts")
-    (description "The Adobe Standard Encoding set of the Utopia font
-family, as contributed to the X Consortium.  The set comprises upright
-and italic shapes in medium and bold weights.  Macro support and
-matching maths fonts are provided by the @code{fourier} and
-@code{mathdesign} font packages.")
+    (description
+     "The Adobe Standard Encoding set of the Utopia font family, as
+contributed by the X Consortium.  The set comprises upright and italic shapes
+in medium and bold weights.  Macro support and matching maths fonts are
+provided by the @code{fourier} and the @code{mathdesign} font packages.")
     (license (license:fsf-free
               "http://mirrors.ctan.org/fonts/utopia/README"))))
 
 (define-public texlive-fontaxes
   (package
     (name "texlive-fontaxes")
-    (version "1.0e")
-    (source
-     (origin
-       (method svn-fetch)
-       (uri (texlive-ref "latex" "fontaxes"))
-       (file-name (string-append name "-" version "-checkout"))
-       (sha256
-        (base32
-         "0j3w1y66pkf3bjl9dh5xy3lfg33rg08s4wx37a3jcndvcji20j3f"))))
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/fontaxes/" "source/latex/fontaxes/"
+                   "tex/latex/fontaxes/")
+             (base32
+              "1d9ji2qvjf1ky8l6rfqbag2hw61r0hyjxkzsp18s4pckyq4dqwdm")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/fontaxes"))
-    (home-page "http://www.ctan.org/pkg/fontaxes")
+    (home-page "https://ctan.org/pkg/fontaxes")
     (synopsis "Additional font axes for LaTeX")
-    (description "The @code{fontaxes} package adds several new font
-axes on top of LaTeX's New Font Selection Scheme (NFSS).  In
-particular, it splits the shape axis into a primary and a secondary
-shape axis and it adds three new axes to deal with the different
-figure versions offered by many professional fonts.")
+    (description "The @code{fontaxes} package adds several new font axes on
+top of LaTeX's New Font Selection Scheme (NFSS).  In particular, it splits the
+shape axis into a primary and a secondary shape axis and it adds three new
+axes to deal with the different figure versions offered by many professional
+fonts.")
     (license license:lppl1.3+)))
 
 (define-public texlive-preprint
   (package
     (name "texlive-preprint")
-    (version "1.0e")
-    (source
-     (origin
-       (method svn-fetch)
-       (uri (texlive-ref "latex" "preprint"))
-       (file-name (string-append name "-" version "-checkout"))
-       (sha256
-        (base32
-         "173ik9xad3zih6gcdwdkzyljarh06ky6c5d2x1yjs22qqi75py5a"))))
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/preprint/" "source/latex/preprint/"
+                   "tex/latex/preprint/")
+             (base32
+              "198xwg6mll3yndc1kf79l6zgnq3nsk7fsh3rlj28nipd26ysw6lq")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/preprint"))
-    (home-page "http://www.ctan.org/pkg/preprint")
+    (home-page "https://ctan.org/pkg/preprint")
     (synopsis "Bundle of modules for preprints")
     (description "The bundle comprises: @code{authblk}, which permits
 footnote style author/affiliation input in the @command{\\author} command,
@@ -11543,100 +23581,112 @@ footnote style author/affiliation input in the @command{\\author} command,
 
 (define-public texlive-mweights
   (package
-    (inherit (simple-texlive-package
-              "texlive-mweights"
-              (list "/doc/latex/mweights/"
-                    "/tex/latex/mweights/")
-              (base32
-               "12493g3yz06mhiybnphqbp49fjzy36clzw63b74mkfhsg1pq7h1b")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/mweights")
+    (name "texlive-mweights")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/mweights/" "tex/latex/mweights/")
+             (base32
+              "12493g3yz06mhiybnphqbp49fjzy36clzw63b74mkfhsg1pq7h1b")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/mweights")
     (synopsis "Support for multiple-weight font packages")
-    (description "Many font families available for use with LaTeX are
-available at multiple weights.  Many Type 1-oriented support packages
-for such fonts re-define the standard @code{\\mddefault} or
-@code{\\bfdefault} macros.  This can create difficulties if the weight
-desired for one font family is not available for another font family,
-or if it differs from the weight desired for another font family.  The
-@code{mweights} package provides a solution to these difficulties.")
+    (description
+     "Many font families available for use with LaTeX are available at
+multiple weights.  Many Type 1-oriented support packages for such fonts
+re-define the standard @code{\\mddefault} or @code{\\bfdefault} macros.  This
+can create difficulties if the weight desired for one font family isn't
+available for another font family, or if it differs from the weight desired
+for another font family.  The package provides a solution to these
+difficulties.")
     (license license:lppl)))
 
 (define-public texlive-cabin
   (package
-    (inherit (simple-texlive-package
-              "texlive-cabin"
-              (list "/doc/fonts/cabin/"
-                    "/fonts/enc/dvips/cabin/"
-                    "/fonts/map/dvips/cabin/"
-                    "/fonts/opentype/impallari/cabin/"
-                    "/fonts/tfm/impallari/cabin/"
-                    "/fonts/type1/impallari/cabin/"
-                    "/fonts/vf/impallari/cabin/"
-                    "/tex/latex/cabin/")
-              (base32
-               "1gqqqbj7i18fs1ss5n3axd821hzq5kbv1dl7dqxp4gba619f1rli")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/cabin")
+    (name "texlive-cabin")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/cabin/"
+                   "fonts/enc/dvips/cabin/"
+                   "fonts/map/dvips/cabin/"
+                   "fonts/opentype/impallari/cabin/"
+                   "fonts/tfm/impallari/cabin/"
+                   "fonts/type1/impallari/cabin/"
+                   "fonts/vf/impallari/cabin/"
+                   "tex/latex/cabin/")
+             (base32
+              "1l4s50l8rjmfrknffgy1c84dg8m9rg96817rs3b3cqk97c3l25zy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/cabin")
     (synopsis "Humanist Sans Serif font with LaTeX support")
-    (description "Cabin is a humanist sans with four weights, true
-italics and small capitals.  According to its designer, Pablo
-Impallari, Cabin was inspired by the typefaces of Edward Johnston and
-Eric Gill.  Cabin incorporates modern proportions, optical adjustments
-and some elements of the geometric sans.  @code{cabin.sty} supports
-use of the font under LaTeX, pdfLaTeX, XeLaTeX and LuaLaTeX.  It uses
-the @code{mweights} package to manage the user's view of all those
-font weights.  An @code{sfdefault} option is provided to enable Cabin
-as the default text font.  The @code{fontaxes} package is required for
-use with [pdf]LaTeX.")
-    (license (list license:silofl1.1 ;for Cabin
-                   license:lppl))))  ;for support files
+    (description
+     "Cabin is a humanist sans with four weights and true italics and small
+capitals.  According to the designer, Pablo Impallari, Cabin was inspired by
+Edward Johnston's and Eric Gill's typefaces, with a touch of modernism.  Cabin
+incorporates modern proportions, optical adjustments, and some elements of the
+geometric sans.  @file{cabin.sty} supports use of the font under LaTeX,
+pdfLaTeX, XeLaTeX and LuaLaTeX; it uses the @code{mweights}, to manage the
+user's view of all those font weights.  An option is provided to enable Cabin
+as the default text font.")
+    (license (list license:silofl1.1    ;for Cabin
+                   license:lppl))))     ;for support files
 
 (define-public texlive-newtx
   (package
-    (inherit (simple-texlive-package
-              "texlive-newtx"
-              (list "/doc/fonts/newtx/"
-                    "/fonts/afm/public/newtx/"
-                    "/fonts/enc/dvips/newtx/"
-                    "/fonts/map/dvips/newtx/"
-                    "/fonts/opentype/public/newtx/"
-                    "/fonts/tfm/public/newtx/"
-                    "/fonts/type1/public/newtx/"
-                    "/fonts/vf/public/newtx/"
-                    "/tex/latex/newtx/")
-              (base32
-               "0h0wm3cd0wxag5x7vy3vgr42jd8m6ffkl90pnkvqdxzbnfdjv3l6")
-              #:trivial? #t))
+    (name "texlive-newtx")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/newtx/"
+                   "fonts/afm/public/newtx/"
+                   "fonts/enc/dvips/newtx/"
+                   "fonts/map/dvips/newtx/"
+                   "fonts/opentype/public/newtx/"
+                   "fonts/tfm/public/newtx/"
+                   "fonts/type1/public/newtx/"
+                   "fonts/vf/public/newtx/"
+                   "tex/latex/newtx/")
+             (base32
+              "0lbkip5nwrc0sf1alhc8b4dh6ymvn48l5sv71qjzrc1qg2jnw29b")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-kastrup))
     (home-page "https://www.ctan.org/pkg/newtx")
     (synopsis "Repackaging of the TX fonts with improved metrics")
-    (description "The @code{newtx} bundle splits
-@code{txfonts.sty} (from the TX fonts distribution) into two
-independent packages, @code{newtxtext.sty} and @code{newtxmath.sty},
-each with fixes and enhancements.  @code{newtxmath}'s metrics have
-been re-evaluated to provide a less tight appearance and to provide a
-@code{libertine} option that substitutes Libertine italic and Greek
-letters for the existing math italic and Greek glyphs, making a
-mathematics package that matches Libertine text quite well.")
+    (description
+     "The @code{newtx} bundle splits @file{txfonts.sty} (from the TX fonts
+distribution) into two independent packages, @code{newtxtext.sty} and
+@code{newtxmath.sty}, each with fixes and enhancements.  @code{newtxmath}'s
+metrics have been re-evaluated to provide a less tight appearance and to
+provide a @code{libertine} option that substitutes Libertine italic and Greek
+letters for the existing math italic and Greek glyphs, making a mathematics
+package that matches Libertine text quite well.")
     (license license:lppl1.3)))
 
 (define-public texlive-xcharter
   (package
-    (inherit (simple-texlive-package
-              "texlive-xcharter"
-              (list "/doc/fonts/xcharter/"
-                    "/fonts/afm/public/xcharter/"
-                    "/fonts/enc/dvips/xcharter/"
-                    "/fonts/map/dvips/xcharter/"
-                    "/fonts/opentype/public/xcharter/"
-                    "/fonts/tfm/public/xcharter/"
-                    "/fonts/type1/public/xcharter/"
-                    "/fonts/vf/public/xcharter/"
-                    "/tex/latex/xcharter/")
-              (base32
-               "0d8rvcmvxrlxqqxpirxqbhmiijpsz5y4vvldh1jnc018aannjlhm")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/xcharter")
-    (synopsis "Extension of the Bitstream Charter fonts")
+    (name "texlive-xcharter")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/xcharter/"
+                   "fonts/afm/public/xcharter/"
+                   "fonts/enc/dvips/xcharter/"
+                   "fonts/map/dvips/xcharter/"
+                   "fonts/opentype/public/xcharter/"
+                   "fonts/tfm/public/xcharter/"
+                   "fonts/type1/public/xcharter/"
+                   "fonts/vf/public/xcharter/"
+                   "tex/latex/xcharter/")
+             (base32
+              "178mmdr9ji346cnmwas22vhbm38izb1sy5164a5h250kgm287v2c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xcharter")
+    (synopsis "Extension of Bitstream Charter fonts")
     (description "@code{xcharter} repackages Bitstream Charter with an
 extended set of features.  The extension provides small caps, oldstyle
 figures and superior figures in all four styles, accompanied by LaTeX
@@ -11648,252 +23698,242 @@ Type 1 and OTF formats, with supporting files as necessary.")
 
 (define-public texlive-ly1
   (package
-    (inherit (simple-texlive-package
-              "texlive-ly1"
-              (list "/doc/fonts/ly1/"
-                    "/fonts/enc/dvips/ly1/"
-                    "/fonts/map/dvips/ly1/"
-                    "/fonts/tfm/adobe/ly1/"
-                    "/fonts/vf/adobe/ly1/"
-                    "/tex/latex/ly1/")
-              (base32
-               "0wjyw0risgvrq97zfciglwy1f4msvfslln6pz0q8yzzx8wsv3zgq")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/ly1")
+    (name "texlive-ly1")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ly1/"
+                   "fonts/enc/dvips/ly1/"
+                   "fonts/map/dvips/ly1/"
+                   "fonts/tfm/adobe/ly1/"
+                   "fonts/vf/adobe/ly1/"
+                   "tex/latex/ly1/"
+                   "tex/plain/ly1/")
+             (base32
+              "0mwk8bfpvpzbwjw3jd6plw0w7kykpb499fv50a9bqxh0jqcyh0j5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ly1")
     (synopsis "Support for LY1 LaTeX encoding")
-    (description "The legacy @emph{texnansi} (TeX and ANSI) encoding
-is known in the LaTeX scheme of things as @emph{LY1} encoding.  The
-@code{ly1} bundle includes metrics and LaTeX macros to use the three
-basic Adobe Type 1 fonts (Times, Helvetica and Courier) in LaTeX using
-LY1 encoding.")
+    (description
+     "The legacy @code{texnansi} (TeX and ANSI) encoding is known in the LaTeX
+scheme of things as @emph{LY1} encoding.  The @code{ly1} bundle includes
+metrics and LaTeX macros to use the three basic Adobe Type 1 fonts (Times,
+Helvetica and Courier) in LaTeX using LY1 encoding.")
     (license license:lppl1.0+)))
 
+(define-public texlive-section
+  (package
+    (name "texlive-section")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/section/" "tex/latex/section/")
+             (base32
+              "0gjajhlwwgyqnmw9bzr0l7dsq12mdhgv8sdkm86m4zn107qab0p9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/section")
+    (synopsis "Modifying section commands in LaTeX")
+    (description
+     "The package implements a pretty extensive scheme to make more manageable
+the business of configuring LaTeX output.")
+    (license license:lppl)))
+
 (define-public texlive-sectsty
-  (let ((template (simple-texlive-package
-                   "texlive-sectsty"
-                   (list "/doc/latex/sectsty/"
-                         "/source/latex/sectsty/")
-                   (base32
-                    "08m90j7cg6w46vnwgsp10clpj4l6c9a6l8dad20q3mnd32l84hbl"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/sectsty")
-         ((#:build-targets _ '())
-          ''("sectsty.ins"))
-         ((#:tex-format _ "latex") "latex")
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/sectsty")))))))
-      (home-page "https://www.ctan.org/pkg/sectsty")
-      (synopsis "Control sectional headers")
-      (description "This is a LaTeX2ε package to help change the style of any or
-all of LaTeX's sectional headers in the article, book, or report classes.
-Examples include the addition of rules above or below a section title.")
-      (license license:lppl1.2+))))
+  (package
+    (name "texlive-sectsty")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/sectsty/" "source/latex/sectsty/"
+                   "tex/latex/sectsty/")
+             (base32
+              "1h7zi622s84vqjl6bi4g6iv639jz9m2imz4g7y1qpc0zdw1mlqv4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
+    (home-page "https://www.ctan.org/pkg/sectsty")
+    (synopsis "Control sectional headers")
+    (description
+     "This is a LaTeX2ε package to help change the style of any or all of
+LaTeX's sectional headers in the article, book, or report classes.  Examples
+include the addition of rules above or below a section title.")
+    (license license:lppl1.2+)))
 
 (define-public texlive-morefloats
-  (let ((template (simple-texlive-package
-                   "texlive-morefloats"
-                   (list "/doc/latex/morefloats/"
-                         "/source/latex/morefloats/")
-                   (base32
-                    "0n0405fjxyjlbjspzfvhl0wjkwiqicj3hk8fa0g7agw72wlxscpl"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/morefloats")
-         ((#:build-targets _ '())
-          ''("morefloats.ins"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/morefloats")))))))
-      (home-page "https://www.ctan.org/pkg/morefloats")
-      (synopsis "Increase the number of simultaneous LaTeX floats")
-      (description "LaTeX can, by default, only cope with 18 outstanding floats;
+  (package
+    (name "texlive-morefloats")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/morefloats/"
+                   "source/latex/morefloats/"
+                   "tex/latex/morefloats/")
+             (base32
+              "0y8rd3ys71ys9cab172wwhrmbs9b52wqrj6d3p0iy3075z93h51c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/morefloats")
+    (synopsis "Increase the number of simultaneous LaTeX floats")
+    (description "LaTeX can, by default, only cope with 18 outstanding floats;
 any more, and you get the error “too many unprocessed floats”.  This package
 releases the limit; TeX itself imposes limits (which are independent of the
 help offered by e-TeX).
 
 However, if your floats can’t be placed anywhere, extending the number of
 floats merely delays the arrival of the inevitable error message.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
 (define-public texlive-ifmtarg
-  (let ((template (simple-texlive-package
-                   "texlive-ifmtarg"
-                   (list "/doc/latex/ifmtarg/"
-                         "/source/latex/ifmtarg/")
-                   (base32
-                    "0cwjn4bhq9zyfxr1595hgyc1d7rcsf9lva55x98q81xy5xrrmrb2"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/ifmtarg")
-         ((#:build-targets _ '())
-          ''("ifmtarg.ins"))
-         ((#:tex-format _ "latex") "latex")
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/ifmtarg")))))))
-      (inputs
-       (list texlive-filecontents))
-      (home-page "https://www.ctan.org/pkg/ifmtarg")
-      (synopsis "If-then-else command for processing potentially empty arguments")
-      (description "This package provides a command for the LaTeX programmer for
-testing whether an argument is empty.")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-ifmtarg")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ifmtarg/" "source/latex/ifmtarg/"
+                   "tex/latex/ifmtarg/")
+             (base32
+              "19bfi12j5ra19k6vjd1q5fjsm68vipa7ida7pg9pf15l5pxwbgqz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
+    (native-inputs (list texlive-filecontents))
+    (home-page "https://ctan.org/pkg/ifmtarg")
+    (synopsis "If-then-else command for processing potentially empty arguments")
+    (description
+     "This package provides a command for the LaTeX programmer for testing
+whether an argument is empty.")
+    (license license:lppl1.3c+)))
 
 (define-public texlive-pagenote
-  (let ((template (simple-texlive-package
-                   "texlive-pagenote"
-                   (list "/doc/latex/pagenote/"
-                         "/source/latex/pagenote/")
-                   (base32
-                    "0cqfqrfvnzq7ldaf255hcvi8xsfx8h7iha3hs8p9gdi3cfzbcmjm"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/pagenote")
-         ((#:build-targets _ '())
-          ''("pagenote.ins"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/pagenote")))))))
-      (propagated-inputs
-       (list texlive-ifmtarg))
-      (home-page "https://www.ctan.org/pkg/pagenote")
-      (synopsis "Notes at end of document")
-      (description "The pagenote package provides tagged notes on a separate
-page (also known as ‘end notes’).")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-pagenote")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pagenote/" "source/latex/pagenote/"
+                   "tex/latex/pagenote/")
+             (base32
+              "1dffh7ac13w3gs94lvfxgw1i4k6cfkrpcyikj1sfrqaivrxpmqpi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pagenote")
+    (synopsis "Notes at end of document")
+    (description
+     "The @code{pagenote} package provides tagged notes on a separate
+page (also known as end notes).")
+    (license license:lppl1.3c+)))
+
+(define-public texlive-pagesel
+  (package
+    (name "texlive-pagesel")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pagesel/" "source/latex/pagesel/"
+                   "tex/latex/pagesel/")
+             (base32
+              "1x4nb53d5gm0vrhiinaqf6ai63bgjpbw0b5kk3c2f6j6gfvp0n53")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pagesel")
+    (synopsis "Select pages of a document for output")
+    (description
+     "This package selects single pages, ranges of pages, odd pages or even
+pages for output.  The package is part of the @code{oberdiek} bundle.")
+    (license license:lppl1.3c)))
 
 (define-public texlive-titling
-  (let ((template (simple-texlive-package
-                   "texlive-titling"
-                   (list "/doc/latex/titling/"
-                         "/source/latex/titling/")
-                   (base32
-                    "0pc3806kc9p2dizdghis0p0b00xs0gmlh2nmf94f5wasz5mkw6bk"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/titling")
-         ((#:build-targets _ '())
-          ''("titling.ins"))
-         ((#:tex-format _ "latex") "latex")
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/titling")))))))
-      (native-inputs
-       (list texlive-cm))
-      (home-page "https://www.ctan.org/pkg/titling")
-      (synopsis "Control typesetting of the \\maketitle command")
-      (description "The @code{titling} package provides control over the
-typesetting of the @code{\\maketitle} command and @code{\\thanks} commands,
-and makes the \title, @code{\\author} and @code{\\date} information
-permanently available.  Multiple titles are allowed in a single document.  New
-titling elements can be added and a @code{titlepage} title can be centered on
+  (package
+    (name "texlive-titling")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/titling/" "source/latex/titling/"
+                   "tex/latex/titling/")
+             (base32
+              "1wp5r6wwrz1nx3wrmc0hxjfapqppcb126l4wmmzh14sfb1py7mz4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
+    (home-page "https://ctan.org/pkg/titling")
+    (synopsis "Control typesetting of the @code{\\maketitle} command")
+    (description
+     "The @code{titling} package provides control over the typesetting of the
+@code{\\maketitle} command and @code{\\thanks} commands, and makes the
+@code{\\title}, @code{\\author} and @code{\\date} information permanently
+available.  Multiple titles are allowed in a single document.  New titling
+elements can be added and a @code{titlepage} title can be centered on
 a physical page.")
-      (license license:lppl))))
+    (license license:lppl)))
 
 (define-public texlive-ifoddpage
-  (let ((template (simple-texlive-package
-                   "texlive-ifoddpage"
-                   (list "/source/latex/ifoddpage/")
-                   (base32
-                    "14x0haj3xjsk9dn2djg117sl7x5nbwgbivhjj3ichnxlgrlf1bis"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/ifoddpage")
-         ((#:build-targets _ '())
-          ''("ifoddpage.ins"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/ifoddpage")))))))
-      (native-inputs
-       (list texlive-ydoc))
-      (home-page "https://www.ctan.org/pkg/ifoddpage")
-      (synopsis "Determine if the current page is odd or even")
-      (description "This package provides an @code{\\ifoddpage} conditional to
-determine if the current page is odd or even.  The macro @code{\\checkoddpage}
-must be used directly before to check the page number using a label.  Two
-compiler runs are therefore required to achieve correct results.  In addition,
-the conditional @code{\\ifoddpageoronside} is provided which is also true in
-@code{oneside} mode where all pages use the odd page layout.")
-      (license license:lppl1.3))))
+  (package
+    (name "texlive-ifoddpage")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ifoddpage/"
+                   "source/latex/ifoddpage/"
+                   "tex/latex/ifoddpage/")
+             (base32
+              "0mxi28lf97l4zg5kcv524b29n5r167yczrhgy132hql866vkdvyr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-ydoc))
+    (home-page "https://ctan.org/pkg/ifoddpage")
+    (synopsis "Determine if the current page is odd or even")
+    (description
+     "This package provides an @code{\\ifoddpage} conditional to determine if
+the current page is odd or even.  The macro @code{\\checkoddpage} must be used
+directly before to check the page number using a label.  Two compiler runs are
+therefore required to achieve correct results.  In addition, the conditional
+@code{\\ifoddpageoronside} is provided which is also true in @code{oneside}
+mode where all pages use the odd page layout.")
+    (license license:lppl1.3)))
 
 (define-public texlive-storebox
-  (let ((template (simple-texlive-package
-                   "texlive-storebox"
-                   (list "/source/latex/storebox/")
-                   (base32
-                    "1ybpjfrria57fwvr9kriiw6y76ivwvsyb6ayp0bi750smsv8k5n1"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/storebox")
-         ((#:build-targets _ '())
-          ''("storebox.ins"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/storebox")))))))
-      (native-inputs
-       (list texlive-ydoc))
-      (home-page "https://www.ctan.org/pkg/storebox")
-      (synopsis "Storing information for reuse")
-      (description "The package provides \"store boxes\" whose user interface
-matches that of normal LaTeX \"save boxes\", except that the content of a
-store box appears at most once in the output PDF file, however often it is
-used.  The present version of the package supports pdfLaTeX and LuaLaTeX; when
-DVI is output, store boxes behave the same as save boxes.")
-      (license license:lppl1.3))))
+  (package
+    (name "texlive-storebox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/storebox/" "source/latex/storebox/"
+                   "tex/latex/storebox/")
+             (base32
+              "1vbjq9aq2kbncq1dn4rk7jspfb6kcxk66h49z0xz1qix5yg94gmx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-ydoc))
+    (home-page "https://ctan.org/pkg/storebox")
+    (synopsis "Storing information for reuse")
+    (description
+     "The package provides store boxes whose user interface matches that of
+normal LaTeX save boxes, except that the content of a store box appears at
+most once in the output PDF file, however often it is used.  The present
+version of the package supports pdfLaTeX and LuaLaTeX; when DVI is output,
+store boxes behave the same as save boxes.")
+    (license license:lppl1.3+)))
 
 (define-public texlive-collectbox
-  (let ((template (simple-texlive-package
-                   "texlive-collectbox"
-                   (list "/source/latex/collectbox/")
-                   (base32
-                    "1k0bbphvr20k9hgpr3dv869h9ygxx3g8vjapkc63nq8i13crpsvz"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/collectbox")
-         ((#:build-targets _ '())
-          ''("collectbox.ins"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/collectbox")))))))
-      (native-inputs
-       (list texlive-ydoc))
-      (home-page "https://www.ctan.org/pkg/collectbox")
-      (synopsis "Collect and process macro arguments as boxes")
-      (description "The package provides macros to collect and process a macro
+  (package
+    (name "texlive-collectbox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/collectbox/"
+                   "source/latex/collectbox/"
+                   "tex/latex/collectbox/")
+             (base32
+              "0mn0hdzjhbmziqqh2k7knfz816lxbjil0zld0n30qi3ila5v3gk6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-ydoc))
+    (home-page "https://ctan.org/pkg/collectbox")
+    (synopsis "Collect and process macro arguments as boxes")
+    (description
+     "The package provides macros to collect and process a macro
 argument (i.e., something which looks like a macro argument) as a horizontal
 box rather than as a real macro argument.  The \"arguments\" are stored as if
 they had been saved by @code{\\savebox} or by the @code{lrbox} environment.
@@ -11902,81 +23942,1162 @@ the user to have the beginning and end of a group in different macro
 invocations, or to place them in the begin and end code of an environment.
 Arguments may contain verbatim material or other special use of characters.
 The macros were designed for use within other macros.")
-      (license license:lppl1.3))))
+    (license license:lppl1.3)))
+
+(define-public texlive-collection-basic
+  (package
+    (name "texlive-collection-basic")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+   (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list texlive-amsfonts
+           texlive-bibtex
+           texlive-bin                  ;set GUIX_TEXMF and engines
+           texlive-cm
+           texlive-colorprofiles
+           texlive-dvipdfmx
+           texlive-dvips
+           texlive-ec
+           texlive-enctex
+           texlive-etex
+           texlive-etex-pkg
+           texlive-glyphlist
+           texlive-graphics-def
+           texlive-hyphen-complete
+           texlive-hyphenex
+           texlive-ifplatform
+           texlive-iftex
+           texlive-knuth-lib
+           texlive-knuth-local
+           texlive-kpathsea
+           texlive-lua-alt-getopt
+           texlive-luahbtex
+           texlive-luatex
+           texlive-makeindex
+           texlive-metafont
+           texlive-mflogo
+           texlive-mfware
+           texlive-modes
+           texlive-pdftex
+           texlive-plain
+           texlive-tex
+           texlive-tex-ini-files
+           texlive-unicode-data
+           texlive-xdvi))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "Essential programs and files")
+    (description
+     "These files are regarded as basic for any TeX system, covering plain TeX
+macros, Computer Modern fonts, and configuration for common drivers; no
+LaTeX.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-public texlive-collection-binextra
+  (package
+    (name "texlive-collection-binextra")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list asymptote
+           texlive-a2ping
+           texlive-adhocfilelist
+           texlive-arara
+           texlive-bibtex8
+           texlive-bibtexu
+           texlive-bundledoc
+           texlive-checklistings
+           texlive-chklref
+           texlive-chktex
+           texlive-clojure-pamphlet
+           texlive-cluttex
+           texlive-collection-basic
+           texlive-ctan-o-mat
+           texlive-ctan-chk
+           texlive-ctanbib
+           texlive-ctanify
+           texlive-ctanupload
+           texlive-ctie
+           texlive-cweb
+           texlive-de-macro
+           texlive-detex
+           texlive-digestif
+           texlive-dtl
+           texlive-dtxgen
+           texlive-dvi2tty
+           texlive-dviasm
+           texlive-dvicopy
+           texlive-dvidvi
+           texlive-dviinfox
+           texlive-dviljk
+           texlive-dviout-util
+           texlive-dvipng
+           texlive-dvipos
+           texlive-dvisvgm
+           texlive-findhyph
+           texlive-fragmaster
+           texlive-git-latexdiff
+           texlive-gsftopk
+           texlive-hook-pre-commit-pkg
+           texlive-installfont
+           texlive-ketcindy
+           texlive-lacheck
+           texlive-latex-git-log
+           texlive-latex-papersize
+           texlive-latex2man
+           texlive-latex2nemeth
+           texlive-latexdiff
+           texlive-latexfileversion
+           texlive-latexindent
+           texlive-latexmk
+           texlive-latexpand
+           texlive-light-latex-make
+           texlive-listings-ext
+           texlive-ltxfileinfo
+           texlive-ltximg
+           texlive-luajittex
+           texlive-make4ht
+           texlive-match-parens
+           texlive-mflua
+           texlive-mkjobtexmf
+           texlive-optexcount
+           texlive-patgen
+           texlive-pdfbook2
+           texlive-pdfcrop
+           texlive-pdfjam
+           texlive-pdflatexpicscale
+           texlive-pdftex-quiet
+           texlive-pdftosrc
+           texlive-pdfxup
+           texlive-pfarrei
+           texlive-pkfix
+           texlive-pkfix-helper
+           texlive-purifyeps
+           texlive-pythontex
+           texlive-seetexk
+           texlive-spix
+           texlive-srcredact
+           texlive-sty2dtx
+           texlive-synctex
+           texlive-tex4ebook
+           texlive-texaccents
+           texlive-texcount
+           texlive-texdef
+           texlive-texdiff
+           texlive-texdirflatten
+           texlive-texdoc
+           texlive-texdoctk
+           texlive-texfot
+           texlive-texliveonfly
+           texlive-texloganalyser
+           texlive-texlogfilter
+           texlive-texlogsieve
+           texlive-texosquery
+           texlive-texplate
+           texlive-texware
+           texlive-tie
+           texlive-tlcockpit
+           texlive-tpic2pdftex
+           texlive-typeoutfileinfo
+           texlive-upmendex
+           texlive-web
+           texlive-xindex
+           texlive-xindy
+           texlive-xpdfopen))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "TeX auxiliary programs")
+    (description
+     "This package provides a myriad of additional TeX-related support
+programs.  It includes programs and macros for DVI file manipulation, literate
+programming, patgen, and plenty more.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-public texlive-collection-context
+  (package
+    (name "texlive-collection-context")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list texlive-collection-basic
+           texlive-context
+           texlive-context-account
+           texlive-context-algorithmic
+           texlive-context-animation
+           texlive-context-annotation
+           texlive-context-bnf
+           texlive-context-chromato
+           texlive-context-cmscbf
+           texlive-context-cmttbf
+           texlive-context-construction-plan
+           texlive-context-cyrillicnumbers
+           texlive-context-degrade
+           texlive-context-fancybreak
+           texlive-context-filter
+           texlive-context-french
+           texlive-context-fullpage
+           texlive-context-gantt
+           texlive-context-gnuplot
+           texlive-context-handlecsv
+           texlive-context-layout
+           texlive-context-letter
+           texlive-context-lettrine
+           texlive-context-mathsets
+           texlive-context-rst
+           texlive-context-ruby
+           texlive-context-simplefonts
+           texlive-context-simpleslides
+           texlive-context-title
+           texlive-context-transliterator
+           texlive-context-typearea
+           texlive-context-typescripts
+           texlive-context-vim
+           texlive-context-visualcounter
+           texlive-jmn))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "ConTeXt and packages")
+    (description
+     "This package provides Hans Hagen's powerful ConTeXt system, along with
+third-party ConTeXt packages.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-public texlive-collection-fontsrecommended
+  (package
+    (name "texlive-collection-fontsrecommended")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list texlive-avantgar
+           texlive-bookman
+           texlive-charter
+           texlive-cm-super
+           texlive-cmextra
+           texlive-collection-basic
+           texlive-courier
+           texlive-euro
+           texlive-euro-ce
+           texlive-eurosym
+           texlive-fpl
+           texlive-helvetic
+           texlive-lm
+           texlive-lm-math
+           texlive-manfnt-font
+           texlive-marvosym
+           texlive-mathpazo
+           texlive-mflogo-font
+           texlive-ncntrsbk
+           texlive-palatino
+           texlive-pxfonts
+           texlive-rsfs
+           texlive-symbol
+           texlive-tex-gyre
+           texlive-tex-gyre-math
+           texlive-times
+           texlive-tipa
+           texlive-txfonts
+           texlive-utopia
+           texlive-wasy
+           texlive-wasy-type1
+           texlive-wasysym
+           texlive-zapfchan
+           texlive-zapfding))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "Recommended fonts")
+    (description
+     "This collection provides recommended fonts, including the base 35
+PostScript fonts, Latin Modern, TeX Gyre, and T1 and other encoding support
+for Computer Modern, in outline form.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-public texlive-collection-fontutils
+  (package
+    (name "texlive-collection-fontutils")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list texlive-accfonts
+           texlive-afm2pl
+           texlive-albatross
+           texlive-collection-basic
+           texlive-dosepsbin
+           texlive-dvipsconfig
+           texlive-epstopdf
+           texlive-fontinst
+           texlive-fontools
+           texlive-fontware
+           texlive-lcdftypetools
+           texlive-luafindfont
+           texlive-metatype1
+           texlive-mf2pt1
+           texlive-ps2eps
+           texlive-ps2pk
+           texlive-psutils
+           texlive-t1utils
+           texlive-ttfutils))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "Graphics and font utilities")
+    (description
+     "This collection of packages provides programs for conversion between
+font formats, testing fonts, virtual fonts, @file{.gf} and @file{.pk}
+manipulation, mft, fontinst, etc.  Manipulating OpenType, TrueType, Type 1,and
+for manipulation of PostScript and other image formats.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-public texlive-collection-latex
+  (package
+    (name "texlive-collection-latex")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list texlive-ae
+           texlive-amscls
+           texlive-amsmath
+           texlive-atbegshi
+           texlive-atveryend
+           texlive-auxhook
+           texlive-babel
+           texlive-babel-english
+           texlive-babelbib
+           texlive-bigintcalc
+           texlive-bitset
+           texlive-bookmark
+           texlive-carlisle
+           texlive-collection-basic
+           texlive-colortbl
+           texlive-epstopdf-pkg
+           texlive-etexcmds
+           texlive-fancyhdr
+           texlive-firstaid
+           texlive-fix2col
+           texlive-geometry
+           texlive-gettitlestring
+           texlive-graphics
+           texlive-graphics-cfg
+           texlive-grfext
+           texlive-hopatch
+           texlive-hycolor
+           texlive-hyperref
+           texlive-intcalc
+           texlive-kvdefinekeys
+           texlive-kvoptions
+           texlive-kvsetkeys
+           texlive-l3backend
+           texlive-l3kernel
+           texlive-l3packages
+           texlive-latex
+           texlive-latex-bin
+           texlive-latex-fonts
+           texlive-latexconfig
+           texlive-letltxmacro
+           texlive-ltxcmds
+           texlive-ltxmisc
+           texlive-mfnfss
+           texlive-mptopdf
+           texlive-natbib
+           texlive-oberdiek
+           texlive-pagesel
+           texlive-pdfescape
+           texlive-pslatex
+           texlive-psnfss
+           texlive-pspicture
+           texlive-refcount
+           texlive-rerunfilecheck
+           texlive-stringenc
+           texlive-tools
+           texlive-uniquecounter
+           texlive-url))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "LaTeX fundamental packages")
+    (description
+     "These packages are either mandated by the core LaTeX team, or very widely
+used and strongly recommended in practice.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-public texlive-collection-latexrecommended
+  (package
+    (name "texlive-collection-latexrecommended")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list texlive-anysize
+           texlive-attachfile2
+           texlive-beamer
+           texlive-booktabs
+           texlive-breqn
+           texlive-caption
+           texlive-cite
+           texlive-cmap
+           texlive-collection-latex
+           texlive-crop
+           texlive-ctable
+           texlive-eso-pic
+           texlive-etoolbox
+           texlive-euenc
+           texlive-euler
+           texlive-everysel
+           texlive-everyshi
+           texlive-extsizes
+           texlive-fancybox
+           texlive-fancyref
+           texlive-fancyvrb
+           texlive-filehook
+           texlive-float
+           texlive-fontspec
+           texlive-footnotehyper
+           texlive-fp
+           texlive-grffile
+           texlive-hologo
+           texlive-index
+           texlive-infwarerr
+           texlive-jknapltx
+           texlive-koma-script
+           texlive-l3experimental
+           texlive-latexbug
+           texlive-lineno
+           texlive-listings
+           texlive-lwarp
+           texlive-mathspec
+           texlive-mathtools
+           texlive-mdwtools
+           texlive-memoir
+           texlive-metalogo
+           texlive-microtype
+           texlive-ms
+           texlive-newfloat
+           texlive-ntgclass
+           texlive-parskip
+           texlive-pdfcolfoot
+           texlive-pdflscape
+           texlive-pdfmanagement-testphase
+           texlive-pdfpages
+           texlive-pdftexcmds
+           texlive-polyglossia
+           texlive-psfrag
+           texlive-ragged2e
+           texlive-rcs
+           texlive-sansmath
+           texlive-section
+           texlive-seminar
+           texlive-sepnum
+           texlive-setspace
+           texlive-subfig
+           texlive-textcase
+           texlive-thumbpdf
+           texlive-translator
+           texlive-typehtml
+           texlive-ucharcat
+           texlive-underscore
+           texlive-unicode-math
+           texlive-xcolor
+           texlive-xkeyval
+           texlive-xltxtra
+           texlive-xunicode))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "LaTeX recommended packages")
+    (description
+     "This package provides a collection of recommended add-on packages for
+LaTeX which have widespread use.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-public texlive-collection-luatex
+  (package
+    (name "texlive-collection-luatex")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list texlive-addliga
+           texlive-auto-pst-pdf-lua
+           texlive-barracuda
+           texlive-bezierplot
+           texlive-blopentype
+           texlive-checkcites
+           texlive-chickenize
+           texlive-chinese-jfm
+           texlive-cloze
+           texlive-collection-basic
+           texlive-combofont
+           texlive-cstypo
+           texlive-ctablestack
+           texlive-ekdosis
+           texlive-emoji
+           texlive-emojicite
+           texlive-enigma
+           texlive-innerscript
+           texlive-interpreter
+           texlive-kanaparser
+           texlive-ligtype
+           texlive-linebreaker
+           texlive-lparse
+           texlive-lt3luabridge
+           texlive-lua-typo
+           texlive-lua-uca
+           texlive-lua-ul
+           texlive-lua-uni-algos
+           texlive-lua-visual-debug
+           texlive-lua-widow-control
+           texlive-luaaddplot
+           texlive-luacas
+           texlive-luacensor
+           texlive-luacode
+           texlive-luacolor
+           texlive-luacomplex
+           texlive-luagcd
+           texlive-luahyphenrules
+           texlive-luaimageembed
+           texlive-luaindex
+           texlive-luainputenc
+           texlive-luaintro
+           texlive-luakeys
+           texlive-lualatex-doc
+           texlive-lualatex-math
+           texlive-lualatex-truncate
+           texlive-lualibs
+           texlive-lualinalg
+           texlive-luamathalign
+           texlive-luamaths
+           texlive-luamodulartables
+           texlive-luamplib
+           texlive-luaoptions
+           texlive-luaotfload
+           texlive-luapackageloader
+           texlive-luaprogtable
+           texlive-luaquotes
+           texlive-luarandom
+           texlive-luaset
+           texlive-luatex85
+           texlive-luatexbase
+           texlive-luatexko
+           texlive-luatextra
+           texlive-luatruthtable
+           texlive-luavlna
+           texlive-luaxml
+           texlive-lutabulartools
+           texlive-minim
+           texlive-minim-math
+           texlive-minim-mp
+           texlive-minim-pdf
+           texlive-minim-xmp
+           texlive-newpax
+           texlive-nodetree
+           texlive-odsfile
+           texlive-optex
+           texlive-pdfarticle
+           texlive-pdfextra
+           texlive-penlight
+           texlive-piton
+           texlive-placeat
+           texlive-plantuml
+           texlive-pyluatex
+           texlive-scikgtex
+           texlive-selnolig
+           texlive-showhyphenation
+           texlive-showkerning
+           texlive-spacekern
+           texlive-spelling
+           texlive-stricttex
+           texlive-truthtable
+           texlive-tsvtemplate
+           texlive-typewriter
+           texlive-uninormalize
+           texlive-yamlvars))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "LuaTeX packages")
+    (description
+     "This is a collection of packages for LuaTeX, a TeX engine using Lua as
+an embedded scripting and extension language, with native support for Unicode,
+OpenType/TrueType fonts, and both PDF and DVI output.  The LuaTeX engine
+itself, and plain formats, are in @code{collection-basic}.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-public texlive-collection-metapost
+  (package
+    (name "texlive-collection-metapost")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list texlive-automata
+           texlive-bbcard
+           texlive-blockdraw-mp
+           texlive-bpolynomial
+           texlive-cmarrows
+           texlive-collection-basic
+           texlive-drv
+           texlive-dviincl
+           texlive-emp
+           texlive-epsincl
+           texlive-expressg
+           texlive-exteps
+           texlive-featpost
+           texlive-feynmf
+           texlive-feynmp-auto
+           texlive-fiziko
+           texlive-garrigues
+           texlive-gmp
+           texlive-hatching
+           texlive-hershey-mp
+           texlive-latexmp
+           texlive-mcf2graph
+           texlive-metago
+           texlive-metaobj
+           texlive-metaplot
+           texlive-metapost
+           texlive-metapost-colorbrewer
+           texlive-metauml
+           texlive-mfpic
+           texlive-mfpic4ode
+           texlive-minim-hatching
+           texlive-mp3d
+           texlive-mparrows
+           texlive-mpattern
+           texlive-mpcolornames
+           texlive-mpgraphics
+           texlive-mptrees
+           texlive-piechartmp
+           texlive-repere
+           texlive-roex
+           texlive-roundrect
+           texlive-shapes
+           texlive-slideshow
+           texlive-splines
+           texlive-suanpan
+           texlive-textpath
+           texlive-threeddice))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "MetaPost and Metafont packages")
+    (description
+     "This collection includes all MetaPost and Metafont packages, along
+with packages in @code{collection-basic}.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-public texlive-collection-pictures
+  (package
+    (name "texlive-collection-pictures")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list texlive-adigraph
+           texlive-aobs-tikz
+           texlive-askmaps
+           texlive-asyfig
+           texlive-asypictureb
+           texlive-autoarea
+           texlive-bardiag
+           texlive-beamerswitch
+           texlive-binarytree
+           texlive-blochsphere
+           texlive-bloques
+           texlive-blox
+           texlive-bodegraph
+           texlive-bondgraph
+           texlive-bondgraphs
+           texlive-braids
+           texlive-bxeepic
+           texlive-byo-twemojis
+           texlive-byrne
+           texlive-cachepic
+           texlive-callouts
+           texlive-celtic
+           texlive-chemfig
+           texlive-circuit-macros
+           texlive-circuitikz
+           texlive-coffeestains
+           texlive-collection-basic
+           texlive-combinedgraphics
+           texlive-curve
+           texlive-curve2e
+           texlive-curves
+           texlive-dcpic
+           texlive-diagmac2
+           texlive-ditaa
+           texlive-doc-pictex
+           texlive-dot2texi
+           texlive-dottex
+           texlive-dpcircling
+           texlive-dratex
+           texlive-drs
+           texlive-duotenzor
+           texlive-dynkin-diagrams
+           texlive-ecgdraw
+           texlive-eepic
+           texlive-ellipse
+           texlive-endofproofwd
+           texlive-epspdf
+           texlive-epspdfconversion
+           texlive-esk
+           texlive-euflag
+           texlive-fast-diagram
+           texlive-fig4latex
+           texlive-figchild
+           texlive-figput
+           texlive-fitbox
+           texlive-flowchart
+           texlive-forest
+           texlive-genealogytree
+           texlive-getmap
+           texlive-gincltex
+           texlive-gnuplottex
+           texlive-gradientframe
+           texlive-grafcet
+           texlive-graph35
+           texlive-graphicxpsd
+           texlive-graphviz
+           texlive-gtrlib-largetrees
+           texlive-harveyballs
+           texlive-here
+           texlive-hf-tikz
+           texlive-hobby
+           texlive-hvfloat
+           texlive-istgame
+           texlive-kblocks
+           texlive-kinematikz
+           texlive-knitting
+           texlive-knittingpattern
+           texlive-ladder
+           texlive-lapdf
+           texlive-latex-make
+           texlive-liftarm
+           texlive-lpic
+           texlive-lroundrect
+           texlive-luamesh
+           texlive-luasseq
+           texlive-maker
+           texlive-makeshape
+           texlive-mathspic
+           texlive-mercatormap
+           texlive-milsymb
+           texlive-miniplot
+           texlive-mkpic
+           texlive-modiagram
+           texlive-neuralnetwork
+           texlive-nl-interval
+           texlive-nndraw
+           texlive-numericplots
+           texlive-outilsgeomtikz
+           texlive-pb-diagram
+           texlive-penrose
+           texlive-petri-nets
+           texlive-pgf
+           texlive-pgf-blur
+           texlive-pgf-interference
+           texlive-pgf-periodictable
+           texlive-pgf-pie
+           texlive-pgf-soroban
+           texlive-pgf-spectra
+           texlive-pgf-umlcd
+           texlive-pgf-umlsd
+           texlive-pgfgantt
+           texlive-pgfkeyx
+           texlive-pgfmolbio
+           texlive-pgfmorepages
+           texlive-pgfopts
+           texlive-pgfornament
+           texlive-pgfplots
+           texlive-picinpar
+           texlive-pict2e
+           texlive-pictex
+           texlive-pictex2
+           texlive-pinlabel
+           texlive-pixelart
+           texlive-pixelarttikz
+           texlive-pmgraph
+           texlive-postage
+           texlive-prerex
+           texlive-productbox
+           texlive-ptolemaicastronomy
+           texlive-puyotikz
+           texlive-pxpgfmark
+           texlive-pxpic
+           texlive-qcircuit
+           texlive-qrcode
+           texlive-quantikz
+           texlive-randbild
+           texlive-randomwalk
+           texlive-realhats
+           texlive-reotex
+           texlive-robotarm
+           texlive-rviewport
+           texlive-sa-tikz
+           texlive-sacsymb
+           texlive-schemabloc
+           texlive-scratch
+           texlive-scratch3
+           texlive-scsnowman
+           texlive-setdeck
+           texlive-signchart
+           texlive-simplenodes
+           texlive-simpleoptics
+           texlive-smartdiagram
+           texlive-spath3
+           texlive-spectralsequences
+           texlive-strands
+           texlive-swimgraf
+           texlive-syntaxdi
+           texlive-table-fct
+           texlive-texdraw
+           texlive-ticollege
+           texlive-tikz-3dplot
+           texlive-tikz-among-us
+           texlive-tikz-bagua
+           texlive-tikz-bayesnet
+           texlive-tikz-bbox
+           texlive-tikz-cd
+           texlive-tikz-dependency
+           texlive-tikz-dimline
+           texlive-tikz-ext
+           texlive-tikz-feynhand
+           texlive-tikz-feynman
+           texlive-tikz-imagelabels
+           texlive-tikz-inet
+           texlive-tikz-kalender
+           texlive-tikz-karnaugh
+           texlive-tikz-ladder
+           texlive-tikz-lake-fig
+           texlive-tikz-layers
+           texlive-tikz-mirror-lens
+           texlive-tikz-nef
+           texlive-tikz-network
+           texlive-tikz-opm
+           texlive-tikz-optics
+           texlive-tikz-page
+           texlive-tikz-palattice
+           texlive-tikz-planets
+           texlive-tikz-qtree
+           texlive-tikz-relay
+           texlive-tikz-sfc
+           texlive-tikz-swigs
+           texlive-tikz-timing
+           texlive-tikz-trackschematic
+           texlive-tikz-truchet
+           texlive-tikzbricks
+           texlive-tikzcodeblocks
+           texlive-tikzducks
+           texlive-tikzfill
+           texlive-tikzinclude
+           texlive-tikzlings
+           texlive-tikzmark
+           texlive-tikzmarmots
+           texlive-tikzorbital
+           texlive-tikzpackets
+           texlive-tikzpagenodes
+           texlive-tikzpeople
+           texlive-tikzpfeile
+           texlive-tikzpingus
+           texlive-tikzposter
+           texlive-tikzscale
+           texlive-tikzsymbols
+           texlive-tikztosvg
+           texlive-tikzviolinplots
+           texlive-tile-graphic
+           texlive-timing-diagrams
+           texlive-tipfr
+           texlive-tkz-base
+           texlive-tkz-berge
+           texlive-tkz-doc
+           texlive-tkz-euclide
+           texlive-tkz-fct
+           texlive-tkz-graph
+           texlive-tkz-orm
+           texlive-tkz-tab
+           texlive-tkzexample
+           texlive-tonevalue
+           texlive-tqft
+           texlive-tsemlines
+           texlive-tufte-latex
+           texlive-twemojis
+           texlive-tzplot
+           texlive-utfsym
+           texlive-venndiagram
+           texlive-visualpstricks
+           texlive-wheelchart
+           texlive-worldflags
+           texlive-xistercian
+           texlive-xpicture
+           texlive-xypic))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "Graphics, pictures, diagrams")
+    (description
+     "This collection provides packages related to graphics, pictures, and
+diagrams.  It includes TikZ, @code{pict}, etc.  However, MetaPost and
+PStricks are separate.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-public texlive-collection-plaingeneric
+  (package
+    (name "texlive-collection-plaingeneric")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list texlive-abbr
+           texlive-abstyles
+           texlive-apnum
+           texlive-autoaligne
+           texlive-barr
+           texlive-bitelist
+           texlive-borceux
+           texlive-c-pascal
+           texlive-catcodes
+           texlive-chronosys
+           texlive-collection-basic
+           texlive-colorsep
+           texlive-compare
+           texlive-crossrefenum
+           texlive-cweb-old
+           texlive-dinat
+           texlive-dirtree
+           texlive-docbytex
+           texlive-dowith
+           texlive-eijkhout
+           texlive-encxvlna
+           texlive-epigram
+           texlive-epsf
+           texlive-epsf-dvipdfmx
+           texlive-expex-acro
+           texlive-expkv-bundle
+           texlive-fenixpar
+           texlive-figflow
+           texlive-fixpdfmag
+           texlive-fltpoint
+           texlive-fntproof
+           texlive-font-change
+           texlive-fontch
+           texlive-fontname
+           texlive-gates
+           texlive-getoptk
+           texlive-gfnotation
+           texlive-gobble
+           texlive-graphics-pln
+           texlive-gtl
+           texlive-hlist
+           texlive-hyplain
+           texlive-inputnormalization
+           texlive-insbox
+           texlive-js-misc
+           texlive-kastrup
+           texlive-lambda-lists
+           texlive-langcode
+           texlive-lecturer
+           texlive-letterspacing
+           texlive-librarian
+           texlive-listofitems
+           texlive-localloc
+           texlive-mathdots
+           texlive-metatex
+           texlive-midnight
+           texlive-mkpattern
+           texlive-modulus
+           texlive-multido
+           texlive-namedef
+           texlive-navigator
+           texlive-newsletr
+           texlive-nth
+           texlive-ofs
+           texlive-olsak-misc
+           texlive-outerhbox
+           texlive-path
+           texlive-pdf-trans
+           texlive-pdfmsym
+           texlive-pitex
+           texlive-placeins-plain
+           texlive-plainpkg
+           texlive-plipsum
+           texlive-plnfss
+           texlive-plstmary
+           texlive-poormanlog
+           texlive-present
+           texlive-pwebmac
+           texlive-random
+           texlive-randomlist
+           texlive-resumemac
+           texlive-ruler
+           texlive-schemata
+           texlive-shade
+           texlive-simplekv
+           texlive-soul
+           texlive-swrule
+           texlive-systeme
+           texlive-tabto-generic
+           texlive-termmenu
+           texlive-tex-ps
+           texlive-tex4ht
+           texlive-texapi
+           texlive-texdate
+           texlive-texdimens
+           texlive-texinfo
+           texlive-timetable
+           texlive-tracklang
+           texlive-transparent-io
+           texlive-treetex
+           texlive-trigonometry
+           texlive-ulem
+           texlive-upca
+           texlive-varisize
+           texlive-xii
+           texlive-xii-lat
+           texlive-xintsession
+           texlive-xlop
+           texlive-yax
+           texlive-zztex))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "Plain (La)TeX packages")
+    (description
+     "This consist of add-on packages and macros that work with plain TeX,
+often LaTeX, and occasionally other formats.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
+
+(define-public texlive-collection-xetex
+  (package
+    (name "texlive-collection-xetex")
+    (version (number->string %texlive-revision))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments (list #:builder #~(mkdir #$output)))
+    (propagated-inputs
+     (list texlive-arabxetex
+           texlive-awesomebox
+           texlive-bidi-atbegshi
+           texlive-bidicontour
+           texlive-bidipagegrid
+           texlive-bidipresentation
+           texlive-bidishadowtext
+           texlive-businesscard-qrcode
+           texlive-collection-basic
+           texlive-cqubeamer
+           texlive-fixlatvian
+           texlive-font-change-xetex
+           texlive-fontbook
+           texlive-fontwrap
+           texlive-interchar
+           texlive-na-position
+           texlive-philokalia
+           texlive-ptext
+           texlive-realscripts
+           texlive-simple-resume-cv
+           texlive-simple-thesis-dissertation
+           texlive-tetragonos
+           texlive-ucharclasses
+           texlive-unicode-bidi
+           texlive-unimath-plain-xetex
+           texlive-unisugar
+           texlive-xebaposter
+           texlive-xechangebar
+           texlive-xecolor
+           texlive-xecyr
+           texlive-xeindex
+           texlive-xesearch
+           texlive-xespotcolor
+           texlive-xetex
+           texlive-xetex-itrans
+           texlive-xetex-pstricks
+           texlive-xetex-tibetan
+           texlive-xetexconfig
+           texlive-xetexfontinfo
+           texlive-xetexko
+           texlive-xevlna
+           texlive-zbmath-review-template))
+    (home-page "https://www.tug.org/texlive/")
+    (synopsis "XeTeX and packages")
+    (description
+     "This collection includes packages for XeTeX, the Unicode and
+OpenType-enabled TeX by Jonathan Kew.")
+    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))))
 
 (define-public texlive-grfext
-  (let ((template (simple-texlive-package
-                   "texlive-grfext"
-                   (list "doc/latex/grfext/"
-                         "source/latex/grfext/"
-                         "tex/latex/grfext/")
-                   (base32
-                    "1x35r10mkjg8dzx7aj99y4dwyf69jgs41qwapdx523lbglywmgxp"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "latex/grfext")
-         ((#:build-targets _ #t)
-          #~(list "grfext.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _
-                  (chdir "source/latex/grfext")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))
-              (add-after 'copy-files 'remove-generated-file
-                (lambda* (#:key outputs #:allow-other-keys)
-                  (with-directory-excursion #$output
-                    (for-each delete-file
-                              (find-files "." "\\.(drv|ins)$")))))))))
-      (home-page "https://github.com/ho-tex/grfext")
-      (synopsis "Manipulate the graphics package's list of extensions")
-      (description "This package provides macros for adding to, and reordering
-the list of graphics file extensions recognised by package graphics.")
-      (license license:lppl1.3c+))))
+  (package
+    (name "texlive-grfext")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/grfext/" "source/latex/grfext/"
+                   "tex/latex/grfext/")
+             (base32
+              "1x35r10mkjg8dzx7aj99y4dwyf69jgs41qwapdx523lbglywmgxp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/grfext")
+    (synopsis "Manipulate the @code{graphics} package's list of extensions")
+    (description
+     "This package provides macros for adding to, and reordering the list of
+graphics file extensions recognised by package @code{graphics}.")
+    (license license:lppl1.3c+)))
+
+(define-public texlive-addliga
+  (package
+    (name "texlive-addliga")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/addliga/"
+                   "tex/lualatex/addliga/")
+             (base32
+              "1gbdbwskba1rf3bmvwms3i3crj3dcqqg69wdzfdyy1a6ml05qpc7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/addliga")
+    (synopsis "Access basic ligatures in legacy TrueType fonts")
+    (description
+     "This small and simple package allows LuaLaTeX users to access basic
+ligatures (ff, fi, ffi, fl, ffl) in legacy TrueType fonts (those
+lacking a liga table) accessed via @code{fontspec}.")
+    (license license:public-domain)))
+
+(define-public texlive-adigraph
+  (package
+    (name "texlive-adigraph")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/adigraph/" "tex/latex/adigraph/")
+             (base32
+              "0qzljcd1g0a9mwj0nrqc2xbka9si27a5d9hg3y7kk73n50zsxv5x")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/adigraph")
+    (synopsis "Augmenting directed graphs")
+    (description
+     "This LaTeX package provides the means to easily draw augmenting oriented
+graphs, as well as cuts on them, to demonstrate steps of algorithms for
+solving max-flow min-cut problems.")
+    (license license:expat)))
 
 (define-public texlive-adjustbox
-  (let ((template (simple-texlive-package
-                   "texlive-adjustbox"
-                   (list "/doc/latex/adjustbox/"
-                         "/source/latex/adjustbox/")
-                   (base32
-                    "074nxbnl184b6iwhis5n85pilq3b2pld3bbrq0wc30hw462m898k"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/adjustbox")
-         ((#:build-targets _ '())
-          ''("adjustbox.ins"))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "source/latex/adjustbox")))))))
-      (native-inputs
-       (list texlive-ydoc))
-      (propagated-inputs
-       (list texlive-latex-varwidth
-             texlive-latex-xkeyval
-             texlive-collectbox
-             texlive-ifoddpage
-             texlive-storebox
-             texlive-pgf))
-      (home-page "https://www.ctan.org/pkg/adjustbox")
-      (synopsis "Graphics package-alike macros for “general” boxes")
-      (description "The package provides several macros to adjust boxed
+  (package
+    (name "texlive-adjustbox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/adjustbox/"
+                   "source/latex/adjustbox/"
+                   "tex/latex/adjustbox/")
+             (base32
+              "02iqc3i3n3d16xx8hgfy5s28h26fhnqf1f4kcxap6rssr165jj3h")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-ydoc))
+    (propagated-inputs
+     (list texlive-collectbox texlive-graphics texlive-xkeyval))
+    (home-page "https://ctan.org/pkg/adjustbox")
+    (synopsis "Graphics package-alike macros for general boxes")
+    (description "The package provides several macros to adjust boxed
 content.  One purpose is to supplement the standard @code{graphics} package,
 which defines the macros @code{\\resizebox}, @code{\\scalebox} and
 @code{\\rotatebox} , with the macros @code{\\trimbox} and @code{\\clipbox}.
@@ -11985,105 +25106,1795 @@ The main feature is the general @code{\\adjustbox} macro which extends the
 @code{graphics} package and applies it to general text content.  Additional
 provided box macros are @code{\\lapbox}, @code{\\marginbox},
 @code{\\minsizebox}, @code{\\maxsizebox} and @code{\\phantombox}.")
-      (license license:lppl1.3))))
+    (license license:lppl1.3+)))
 
-(define-public texlive-qrcode
+(define-public texlive-aobs-tikz
   (package
-    (inherit (simple-texlive-package
-              "texlive-qrcode"
-              (list "doc/latex/qrcode/README"
-                    "source/latex/qrcode/qrcode.dtx"
-                    "source/latex/qrcode/qrcode.ins")
-              (base32
-               "1xfv0imrrbxjqwjapcf2silg19rwz2jinawy1x65c1krg919vn02")))
+    (name "texlive-aobs-tikz")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/aobs-tikz/"
+                   "source/latex/aobs-tikz/"
+                   "tex/latex/aobs-tikz/")
+             (base32
+              "04p3ghywqb3nr91vh6l39f8z9gbb3r6ca6yvq3nrcsqarxypfqny")))
     (outputs '("out" "doc"))
-    (arguments
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/aobs-tikz")
+    (synopsis "TikZ styles for creating overlaid pictures in beamer")
+    (description
+     "The package defines auxiliary TikZ styles useful for overlaying pictures
+elements in Beamer.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-askmaps
+  (package
+    (name "texlive-askmaps")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/askmaps/" "tex/latex/askmaps/")
+             (base32
+              "0l61gq2i1di9zn6s2nf5sn0pdp3z78rij17sgjywy0xka43znhlk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/askmaps")
+    (synopsis "Typeset American style Karnaugh maps")
+    (description
+     "The package provides 1, 2, 3, 4 and 5 variable Karnaugh maps, in the
+style used in numerous American textbooks on digital design.  The package
+draws K-maps where the most significant input variables are placed on top of
+the columns and the least significant variables are placed left of the rows.")
+    (license license:lppl)))
+
+(define-public texlive-asyfig
+  (package
+    (name "texlive-asyfig")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/asyfig/" "source/latex/asyfig/"
+                   "tex/latex/asyfig/")
+             (base32
+              "0116a920z8hq3v50gmgh3f8diq7307wx0zsh2pmznw7gkvn6rn4k")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
+    (native-inputs (list texlive-filecontents))
+    (home-page "https://ctan.org/pkg/asyfig")
+    (synopsis "Commands for using Asymptote figures")
+    (description
+     "The package provides a means of reading Asymptote figures from separate
+files, rather than within the document, as is standard in the @code{asymptote}
+package, which is provided as part of the Asymptote bundle.  The Asymptote way
+can prove cumbersome in a large document; the present package allows the user
+to process one picture at a time, in simple test documents, and then to
+migrate (with no fuss) to their use in the target document.")
+    (license license:lppl)))
+
+(define-public texlive-asypictureb
+  (package
+    (name "texlive-asypictureb")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/asypictureb/"
+                   "source/latex/asypictureb/"
+                   "tex/latex/asypictureb/")
+             (base32
+              "1djlphr3iz0l0x2pf8abd251q78rml6435f6ng7fa553anwgwya9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/asypictureb")
+    (synopsis "User-friendly integration of Asymptote into LaTeX")
+    (description
+     "The package is an unofficial alternative to the package provided with
+the Asymptote distribution, for including pictures within a LaTeX source file.
+While it does not duplicate all the features of the official package, this
+package is more user-friendly in several ways.  Most notably, Asymptote errors
+are repackaged as LaTeX errors, making debugging less of a pain.  It also has
+a more robust mechanism for identifying unchanged pictures that need not be
+recompiled.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-auto-pst-pdf-lua
+  (package
+    (name "texlive-auto-pst-pdf-lua")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/auto-pst-pdf-lua/"
+                   "tex/latex/auto-pst-pdf-lua/")
+             (base32
+              "1wkhdg47qjpc0yv47z1jmrmpnq8zic6bqfmay3ry6lvv47f775z1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-iftex))
+    (home-page "https://ctan.org/pkg/auto-pst-pdf-lua")
+    (synopsis "Using LuaLaTeX together with PostScript code")
+    (description
+     "This package is a slightly modified version of @code{auto-pst-pdf} by
+Will Robertson, which itself is a wrapper for @code{pst-pdf} by Rolf
+Niepraschk.  The package allows the use of LuaLaTeX together with PostScript
+related code, e.g., PSTricks.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-autoarea
+  (package
+    (name "texlive-autoarea")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/autoarea/" "tex/latex/autoarea/")
+             (base32
+              "09a9wiihb397ljasnkxrqygsi34bd9a5spq8h3njf6awra2x2m6c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pictex-autoarea")
+    (synopsis "Automatic computation of bounding boxes with PiCTeX")
+    (description
+     "This package makes PiCTeX recognize lines and arcs in determining the
+bounding box of a picture.  The bounding box is essential for proper placement
+of a picture between running text and margins and for keeping the running text
+away.")
+    (license license:lppl)))
+
+(define-public texlive-bardiag
+  (package
+    (name "texlive-bardiag")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/bardiag/" "tex/latex/bardiag/")
+             (base32
+              "1iy0cr24ki93jlnmzr1fgqa7jqg0zhxds422cz322zwr19936zz9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bardiag")
+    (synopsis "LaTeX package for drawing bar diagrams")
+    (description
+     "The main purpose of the package is to make the drawing of bar diagrams
+possible and easy in LaTeX.  The BarDiag package is inspired by and based on
+PSTricks.")
+    (license license:lppl)))
+
+(define-public texlive-barracuda
+  (package
+    (name "texlive-barracuda")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/barracuda/" "scripts/barracuda/"
+                   "tex/luatex/barracuda/")
+             (base32
+              "1v318nbbbp2klp0rykzb3skqqw4hhj1hbliigmp3qh34iiq3wqh0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/barracuda")
+    (synopsis "Draw barcodes with Lua")
+    (description
+     "The Barracuda library is a modular Lua package for drawing barcode
+symbols.  It provides modules for writing barcodes from a LuaTeX document.  It
+is also possible to use Barracuda with a standalone Lua interpreter to draw
+barcodes in different graphic formats like SVG.")
+    (license license:gpl2)))
+
+(define-public texlive-beamerswitch
+  (package
+    (name "texlive-beamerswitch")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/beamerswitch/"
+                   "source/latex/beamerswitch/"
+                   "tex/latex/beamerswitch/")
+             (base32
+              "1kz257kv9fdy9fvphd8sx1k0swsynrl6kxqidnh8lp70k8f24ggj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/beamerswitch")
+    (synopsis "Convenient mode selection in Beamer documents")
+    (description
+     "This class is a wrapper around the beamer class to make it easier to use
+the same document to generate the different forms of the presentation: the
+slides themselves, an abbreviated slide set for transparencies or online
+reference, an n-up handout version (various layouts are provided), and
+a transcript or set of notes using the article class.  The class provides
+a variety of handout layouts, and allows the mode to be chosen from the
+command line (without changing the document itself).")
+    (license license:lppl1.3c)))
+
+(define-public texlive-bezierplot
+  (package
+    (name "texlive-bezierplot")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/bezierplot/"
+                   "tex/lualatex/bezierplot/")
+             (base32
+              "125gdb9d160g729v3fbsrsrw5abk34jwa4x43yil0mzjls2aq550")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bezierplot")
+    (synopsis "Approximate smooth function graphs with cubic Bezier splines")
+    (description
+     "This package consists of a Lua program as well as a (Lua)LaTeX
+@file{.sty} file.  Given a smooth function, @code{bezierplot} returns a smooth
+Bezier path written in TikZ notation, which also matches MetaPost, that
+approximates the graph of the function.  For polynomial functions of degree
+lesser or equal to 3 and their inverses the approximation is exact (up to
+numeric precision).  @code{bezierplot} also finds special points such as
+extreme points and inflection points and reduces the number of used points.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-binarytree
+  (package
+    (name "texlive-binarytree")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/binarytree/"
+                   "source/latex/binarytree/"
+                   "tex/latex/binarytree/")
+             (base32
+              "1lip6npfggc6p14hhpwn1g52xmyyb5rp34znb437frks4n1bk66s")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/binarytree")
+    (synopsis "Drawing binary trees using TikZ")
+    (description
+     "This package provides an easy but flexible way to draw binary trees
+using TikZ.  A path specification and the setting of various options determine
+the style for each edge of the tree.  There is support for the external
+library of TikZ which does not affect externalization of the rest of the TikZ
+figures in the document.  There is an option to use automatic file naming:
+useful if the trees are often moved around.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-blochsphere
+  (package
+    (name "texlive-blochsphere")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/blochsphere/"
+                   "source/latex/blochsphere/"
+                   "tex/latex/blochsphere/")
+             (base32
+              "03gl19r0cc1ajychh6f31bdjqpmmlk0cxg1akxg3h47yrf2np245")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/blochsphere")
+    (synopsis "Draw pseudo-3D diagrams of Bloch spheres")
+    (description
+     "This package is used to draw pseudo-3D Blochsphere diagrams.  It
+supports various annotations, such as great and small circles, axes, rotation
+markings and state vectors.  It can be used in a standalone fashion, or nested
+within a @code{tikzpicture} environment by setting the environment option
+@code{nested} to @code{true}.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-bloques
+  (package
+    (name "texlive-bloques")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/bloques/" "tex/latex/bloques/")
+             (base32
+              "10mxqjfljcphg4nifg8xy3s6k49vxvxhs5s805640npc8jgmbf64")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bloques")
+    (synopsis "Generate control diagrams")
+    (description
+     "The package uses TikZ to provide commands for generating control
+diagrams (specially in power electronics).")
+    (license license:lppl1.3+)))
+
+(define-public texlive-blox
+  (package
+    (name "texlive-blox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/blox/" "source/latex/blox/"
+                   "tex/latex/blox/")
+             (base32
+              "0xkv6rvkbchkwgfam5kiymng0xnc4vja5xb3b5d89rngdr041xwk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
+    (native-inputs
+     (list (texlive-updmap.cfg
+            (list texlive-fancyvrb
+                  texlive-hypdoc
+                  texlive-hyperref
+                  texlive-infwarerr
+                  texlive-kvoptions
+                  texlive-pgf
+                  texlive-tools))))
+    (home-page "https://ctan.org/pkg/blox")
+    (synopsis "Draw block diagrams, using TikZ")
+    (description
+     "This package, along with TikZ, will typeset block diagrams for use with
+programming and control theory.  It is an English translation of the
+@code{schemabloc} package.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-bodegraph
+  (package
+    (name "texlive-bodegraph")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/bodegraph/"
+                   "tex/latex/bodegraph/")
+             (base32
+              "0r89cnn42yyxpvbxfasalwfdmcq0aksdm3cmqy9wfv4qnc48wmcd")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bodegraph")
+    (synopsis "Draw Bode, Nyquist and Black plots with gnuplot and TikZ")
+    (description
+     "The package provides facilities to draw Bode, Nyquist and Black plots
+using Gnuplot and Tikz.  Elementary Transfer Functions and basic correctors
+are preprogrammed for use.")
+    (license license:lppl)))
+
+(define-public texlive-bondgraph
+  (package
+    (name "texlive-bondgraph")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/bondgraph/"
+                   "tex/latex/bondgraph/")
+             (base32
+              "165fgkcybazd2jqgcfqc8hh8askl1hdv86d8bz5b1s4aff95hv24")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bondgraph")
+    (synopsis "Create bond graph figures in LaTeX documents")
+    (description "The package draws bond graphs using PGF and TikZ.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-bondgraphs
+  (package
+    (name "texlive-bondgraphs")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/bondgraphs/"
+                   "source/latex/bondgraphs/"
+                   "tex/latex/bondgraphs/")
+             (base32
+              "1gisr9f2n3mwf2qaqdj9sjmxscrpa9zrb9jm7v5l96ba8kqqw6hx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bondgraphs")
+    (synopsis "Draws bond graphs in LaTeX, using PGF/TikZ")
+    (description
+     "The package is used to draw bond graphs in LaTeX.  Compared to the
+@code{bondgraph} package this package relies more on TikZ styles and less on
+macros, to generate the drawings.  As such it can be more flexible than his,
+but requires more TikZ knowledge of the user.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-braids
+  (package
+    (name "texlive-braids")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/braids/" "source/latex/braids/"
+                   "tex/latex/braids/")
+             (base32
+              "1ld7kzr96bh7gdjllxn888j92p7j1l4b1krlp8dmhy6fq3a2qn22")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/braids")
+    (synopsis "Draw Braid diagrams with PGF/TikZ")
+    (description
+     "The package enables drawing of Braid diagrams with PGF/TikZ using
+a simple syntax.  The Braid itself is specified by giving a word in the Braid
+group, and there are many options for styling the strands and for drawing
+floors.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-bxeepic
+  (package
+    (name "texlive-bxeepic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/bxeepic/" "tex/latex/bxeepic/")
+             (base32
+              "1zxmysbnv4s47qx0yajr9h62x8azjh660811yd4qcv0ih9mcdyy7")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bxeepic")
+    (synopsis "Eepic facilities using @code{pict2e}")
+    (description
+     "The package provides an Eepic driver to use @code{pict2e} facilities.")
+    (license license:expat)))
+
+(define-public texlive-byo-twemojis
+  (package
+    (name "texlive-byo-twemojis")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/byo-twemojis/"
+                   "source/latex/byo-twemojis/"
+                   "tex/latex/byo-twemojis/")
+             (base32
+              "0wnl6jcwrkxvzfsq04kabxanraa8zi08fjg4a1b7cqpawiphf8jp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/byo-twemojis")
+    (synopsis "Build Your Own Twemojis with TikZ")
+    (description
+     "This package provides the means to create your own emojis (the simple,
+round, and mostly yellow ones) from elements of existing emojis.  The provided
+command creates a TikZ picture from the stated elements with multiple
+possibilities to modify the result in color and position.")
+    (license (list license:cc-by4.0 license:lppl1.3+))))
+
+(define-public texlive-byrne
+  (package
+    (name "texlive-byrne")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/metapost/byrne/" "metapost/byrne/"
+                   "tex/latex/byrne/")
+             (base32
+              "1h4543pimjsv30phinbhs8070ymqaf43vd2wx1yhjmwsqj4fcjmc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/byrne")
+    (synopsis
+     "Typeset geometric proofs in the style of Euclid's @emph{Elements}")
+    (description
+     "This package is a LaTeX adaptation of a set of tools developed for
+ConTeXt reproduction of Oliver Byrne's 1847 edition of the first six books of
+Euclid's @emph{Elements}; see
+@url{https://github.com/jemmybutton/byrne-euclid}.  It consists of a MetaPost
+library, responsible for all the drawing and a set of LaTeX macros to
+conveniently use them.")
+    (license license:gpl3+)))
+
+(define-public texlive-cachepic
+  (package
+    (name "texlive-cachepic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/cachepic/" "scripts/cachepic/"
+                   "tex/latex/cachepic/")
+             (base32
+              "0kc713pig67igi0h294k692lmm12mx611z3v73awsf5xv14ms3yx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:link-scripts #~(list "cachepic.tlu")))
+    (home-page "https://ctan.org/pkg/cachepic")
+    (synopsis "Convert document fragments into graphics")
+    (description
+     "The bundle simplifies and automates conversion of document fragments
+into external EPS or PDF files.  The bundle consists of two parts: a LaTeX
+package that implements a document level interface, and a command line tool
+that generates the external graphics.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-callouts
+  (package
+    (name "texlive-callouts")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/callouts/" "tex/latex/callouts/")
+             (base32
+              "1yb2vc1wiffap0dbq0jw40ax9kmk6np269ayij67vcmg0iqnmb11")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/callouts")
+    (synopsis "Put simple annotations and notes inside a picture")
+    (description
+     "The package defines the @code{annotation} environment in which callouts,
+notes, arrows, and the like can be placed to describe certain parts of
+a picture.")
+    (license license:lppl)))
+
+(define-public texlive-celtic
+  (package
+    (name "texlive-celtic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/celtic/" "source/latex/celtic/"
+                   "tex/latex/celtic/")
+             (base32
+              "0zqz87y0wx5v50qnzvz6gqsz1z81ikcj4ma8mwgclrfyazpll9d0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/celtic")
+    (synopsis "TikZ library for drawing celtic knots")
+    (description
+     "The package provides a TikZ library for drawing celtic knots.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-chemfig
+  (package
+    (name "texlive-chemfig")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/chemfig/"
+                   "tex/generic/chemfig/")
+             (base32
+              "01mai7drwm3y4i3yj4fkwqjyzwlr4dvq467lwdzsbj3dl5fxwgpg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/chemfig")
+    (synopsis "Draw molecules with easy syntax")
+    (description
+     "The package provides the command @code{\\chemfig}, which draws molecules
+using the TikZ package.  While the diagrams produced are essentially
+2-dimensional, the package supports many of the conventional notations for
+illustrating the 3-dimensional layout of a molecule.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-circuit-macros
+  (package
+    (name "texlive-circuit-macros")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/circuit-macros/"
+                   "tex/latex/circuit-macros/")
+             (base32
+              "0f1k951bm18m0y2b6hjmz5x8gsl7sdqa2ky4sdnv4fkwwmh1icw5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/circuit-macros")
+    (synopsis "M4 macros for electric circuit diagrams")
+    (description
+     "This package provides a set of m4 macros for drawing high-quality
+electric circuits containing fundamental elements, amplifiers, transistors,
+and basic logic gates to include in TeX, LaTeX, or similar documents.  Some
+tools and examples for other types of diagrams are also included.  The macros
+can be evaluated to drawing commands in the @code{pic} language, which
+contains elements of a simple programming language, and is well-suited to line
+drawings requiring parametric or conditional components, fine tuning,
+significant geometric calculations or repetition, or that are naturally block
+structured or tree structured.  Alternative output macros can create TeX
+output to be read by PSTricks, TikZ commands for use by the PGF bundle, or
+SVG.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-circuitikz
+  (package
+    (name "texlive-circuitikz")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/context/third/circuitikz/"
+                   "doc/generic/circuitikz/"
+                   "doc/latex/circuitikz/"
+                   "tex/context/third/circuitikz/"
+                   "tex/generic/circuitikz/"
+                   "tex/latex/circuitikz/")
+             (base32
+              "1vgsrr94wqab264vkqwdm29k1a18x03rb30jff0p7zgm3gn54z17")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/circuitikz")
+    (synopsis "Draw electrical networks with TikZ")
+    (description
+     "The package provides a set of macros for naturally typesetting
+electrical and electronic networks.  It is designed as a tool that is native
+to LaTeX, and directly supporting PDF output format.  It has therefore been
+based on the PGF/TikZ package.")
+    (license (list license:lppl license:gpl3+))))
+
+(define-public texlive-coffeestains
+  (package
+    (name "texlive-coffeestains")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/coffeestains/"
+                   "tex/latex/coffeestains/")
+             (base32
+              "0nc2nmxg378gg16q6gxj68w94fl3nd5lcgk2fq9hp17mg6q27gsc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/coffeestains")
+    (synopsis "Add coffee stains to documents")
+    (description
+     "This package provides an essential feature that LaTeX has been missing
+for too long: It adds coffee stains to your documents.  A lot of time can be
+saved by printing stains directly on the page rather than adding them
+manually.")
+    (license license:public-domain)))
+
+(define-public texlive-combinedgraphics
+  (package
+    (name "texlive-combinedgraphics")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/combinedgraphics/"
+                   "source/latex/combinedgraphics/"
+                   "tex/latex/combinedgraphics/")
+             (base32
+              "1jb0bc5s8kn5aplgmry94laj92c2h16xv77km6fz0pcd4wvpng6i")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/combinedgraphics")
+    (synopsis "Include graphic (EPS or PDF)/LaTeX combinations")
+    (description
+     "This package provides the @code{\\includecombinedgraphics} macro for the
+inclusion of combined EPS/LaTeX and PDF/LaTeX graphics.  Instead of including
+the graphics with a simple @code{\\input}, the
+@code{\\includecombinedgraphics} macro has some comforts: changing the font
+and color of the text of the LaTeX part; rescaling the graphics without
+affecting the font of the LaTeX part; automatic inclusion of the vector
+graphics part, as far as LaTeX part does not do it; and rescaling and rotating
+of complete graphics.")
+    (license license:gpl3+)))
+
+(define-public texlive-curve
+  (package
+    (name "texlive-curve")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/curve/" "source/latex/curve/"
+                   "tex/latex/curve/")
+             (base32
+              "0780i6zr24v30ixn6zcalqr2pdp5jkxk8ksfw090aaq03wpxmggg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
+    (home-page "https://ctan.org/pkg/curve")
+    (synopsis "Class for making curriculum vitae")
+    (description
+     "CurVe is a class for writing a CV, with configuration for the language
+in which you write.  The class provides a set of commands to create rubrics,
+entries in these rubrics etc.  CurVe then format the CV (possibly splitting it
+onto multiple pages, repeating the titles etc), which is usually the most
+painful part of CV writing.  Another nice feature of CurVe is its ability to
+manage different CV flavours simultaneously.  It is often the case that you
+want to maintain slightly divergent versions of your CV at the same time, in
+order to emphasize on different aspects of your background.  CurVe also comes
+with support for use with AUC-TeX.")
+    (license license:lppl)))
+
+(define-public texlive-curve2e
+  (package
+    (name "texlive-curve2e")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/curve2e/" "source/latex/curve2e/"
+                   "tex/latex/curve2e/")
+             (base32
+              "0fa2xp3yh1bv8ivxf48ywiwi9wjgq0bnvnyc2rcy73wczwilsyk4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/curve2e")
+    (synopsis "Extensions for package @code{pict2e}")
+    (description
+     "The package extends the drawing capacities of the @code{pict2e} package
+that serves as a LaTeX2e replacement for @code{picture} mode.  In particular,
+@code{curve2e} introduces new macros for lines and vectors, new specifications
+for line terminations and joins, arcs with any angular aperture, arcs with
+arrows at one or both ends, generic curves specified with their nodes and the
+tangent direction at these nodes.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-curves
+  (package
+    (name "texlive-curves")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/curves/" "source/latex/curves/"
+                   "tex/latex/curves/")
+             (base32
+              "1diwxq6maizcnmwr6shnl044cvhnd7c2f55avgsyap6ds5wv86wn")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/curves")
+    (synopsis "Curves for LaTeX picture environment")
+    (description
+     "This package draws curves in the standard LaTeX picture environment
+using parabolas between data points with continuous slope at joins; for
+circles and arcs, it uses up to 16 parabolas.  The package can also draw
+symbols or dash patterns along curves.  It provides facilities equivalent to
+technical pens with compasses and French curves.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-dcpic
+  (package
+    (name "texlive-dcpic")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/dcpic/" "tex/generic/dcpic/")
+             (base32
+              "1s4292g12r2vrnsdj4qsa9jgj9ndgdg7h27n2ig3mf305h5h5hfr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dcpic")
+    (synopsis "Commutative diagrams in a LaTeX and TeX documents")
+    (description
+     "DCpic is a package for typesetting commutative diagrams within a LaTeX
+and TeX documents.  Its distinguishing features are: a powerful graphical
+engine, the PiCTeX package; an easy specification syntax in which
+a commutative diagram is described in terms of its objects and its
+arrows (morphism), positioned in a Cartesian coordinate system.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-diagmac2
+  (package
+    (name "texlive-diagmac2")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/diagmac2/" "tex/latex/diagmac2/")
+             (base32
+              "002p9qmrbbkqc72iippnjhxmb7yybx06xr6bs76hg04pzvh5a49f")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/diagmac2")
+    (synopsis "Diagram macros, using @code{pict2e}")
+    (description
+     "This is a development of the long-established @code{diagmac} package,
+using @code{pict2e} so that the restrictions on line direction are removed.")
+    (license license:lppl)))
+
+(define-public texlive-ditaa
+  (package
+    (name "texlive-ditaa")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ditaa/" "tex/latex/ditaa/")
+             (base32
+              "1dk915p169hnpy9888kpslawhkmlipbkdrsnk1pajypcl7jyrniw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ditaa")
+    (synopsis "Use ditaa diagrams within LaTeX documents")
+    (description
+     "With this package, @acronym{DITAA, DIagrams Through Ascii Art} diagrams
+can be embedded directly into LaTeX files.")
+    (license license:lppl)))
+
+(define-public texlive-doc-pictex
+  (package
+    (name "texlive-doc-pictex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/doc-pictex/")
+             (base32
+              "0fdvqhkgi5j33rx0r4fifj69f4smn5w0n99vx90a3fw15qzxsg5y")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/doc-pictex")
+    (synopsis "Summary list of PicTeX documentation")
+    (description
+     "This package provides a summary of available resources providing
+documentation of PicTeX.")
+    (license
      (list
-      #:tex-directory "latex/qrcode"
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-before 'build 'chdir
-            (lambda _
-              (setenv "ROOT_DIR" (getcwd))
-              (chdir "source/latex/qrcode")))
-          (add-after 'build 'build-doc
-            (lambda _
-              (copy-file "qrcode.dtx" "build/qrcode.dtx")
-              (chdir "build")
-              (invoke "xelatex" "qrcode.dtx")
-              (invoke "xelatex" "qrcode.dtx"))) ;generate qrcode.pdf
-          (replace 'install
-            (lambda* (#:key tex-directory #:allow-other-keys)
-              (let ((doc (string-append #$output:doc "/share/doc/"
-                                        tex-directory))
-                    (out (string-append #$output "/share/texmf-dist/tex/"
-                                        tex-directory)))
-                (install-file "qrcode.pdf" doc)
-                (install-file (car (find-files (getenv "ROOT_DIR") "README"))
-                              doc)
-                (install-file "qrcode.sty" out)))))))
+      (license:fsf-free "share/texmf-dist/doc/generic/doc-pictex/Doc-PiCTeX.txt")))))
+
+(define-public texlive-dot2texi
+  (package
+    (name "texlive-dot2texi")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/dot2texi/" "tex/latex/dot2texi/")
+             (base32
+              "1m8774ds3hsky4nk0krj4a582fyznrxdfbfma5z8hp083nrlm469")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dot2texi")
+    (synopsis "Create graphs within LaTeX using the @code{dot2tex} tool")
+    (description
+     "The @code{dot2texi} package allows you to embed graphs in the DOT graph
+description language in your LaTeX documents.  The @code{dot2tex} tool is used
+to invoke Graphviz for graph layout, and to transform the output from Graphviz
+to LaTeX code.  The generated code relies on the TikZ and PGF package or the
+PSTricks package.")
+    (license license:gpl3+)))
+
+(define-public texlive-dottex
+  (package
+    (name "texlive-dottex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/dottex/" "source/latex/dottex/"
+                   "tex/latex/dottex/")
+             (base32
+              "0lk3ylbbgq2glni6qp6spmn8mr2qv4q1b06raadsb7hh75p1r218")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dottex")
+    (synopsis "Use DOT code in LaTeX")
+    (description
+     "The @code{dottex} package allows you to encapsulate DOT and Neato files
+in your document (DOT and Neato are both part of @code{graphviz}; DOT creates
+directed graphs, Neato undirected graphs).")
+    (license license:gpl3+)))
+
+(define-public texlive-dpcircling
+  (package
+    (name "texlive-dpcircling")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/dpcircling/"
+                   "tex/latex/dpcircling/")
+             (base32
+              "0wpskh9rixgjvn4h5kand9ggiqa2mqca5fc0l565pxq8a9sq2bm0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dpcircling")
+    (synopsis "Decorated text boxes using TikZ")
+    (description
+     "This simple package provides four types of text decorations using TikZ.
+You can frame your text with circles, rectangles, jagged rectangles, and
+fan-shapes.  The baseline will be adjusted properly according to the
+surroundings.  You can use these decorations both in text mode and in math
+mode.  You can specify line color, line width, width, and height using option
+keys.")
+    (license license:expat)))
+
+(define-public texlive-dratex
+  (package
+    (name "texlive-dratex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/dratex/" "tex/generic/dratex/")
+             (base32
+              "02qpchj2ws1d9d80284k7akzafbgdm358qxd41ms21rszyzdj11c")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dratex")
+    (synopsis "General drawing macros")
+    (description
+     "This package provides a low level (@file{DraTex.sty}) and
+a high-level (@file{AlDraTex.sty}) drawing package written entirely in TeX.")
+    (license license:lppl)))
+
+(define-public texlive-drs
+  (package
+    (name "texlive-drs")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/drs/" "tex/latex/drs/")
+             (base32
+              "0vvwbn1qxxh42v1jjvk3nra79zv0lz0fyrj5c6q8yjppn2rj10h0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/drs")
+    (synopsis "Typeset Discourse Representation Structures (DRS)")
+    (description
+     "The package draws Discourse Representation Structures (DRSs).  It can
+draw embedded DRSs, if-then conditions and quantificational duplex
+conditions (with a properly scaled connecting diamond).  Formatting parameters
+allow the user to control the appearance and placement of DRSs, and of DRS
+variables and conditions.  The package is based on DRS macros in the
+@code{covington} package.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-duotenzor
+  (package
+    (name "texlive-duotenzor")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/duotenzor/"
+                   "tex/latex/duotenzor/")
+             (base32
+              "1l99ah5p2cp1qikk3jrbn1xrs6fz23c9h7wqc228jnrkmni7kn98")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/duotenzor")
+    (synopsis "Drawing package for circuit and duotensor diagrams")
+    (description
+     "This is a drawing package for circuit and duotensor diagrams within
+LaTeX documents.  It consists of about eighty commands, calling on TikZ for
+support.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-dynkin-diagrams
+  (package
+    (name "texlive-dynkin-diagrams")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/dynkin-diagrams/"
+                   "tex/latex/dynkin-diagrams/")
+             (base32
+              "0s2bf8l51ngpf9bg8vx8s4xa0dmdxj02h0hcyf23kh58xpxvmylh")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/dynkin-diagrams")
+    (synopsis "Draw Dynkin, Coxeter, and Satake diagrams using TikZ")
+    (description
+     "This is a drawing package for Dynkin, Coxeter, and Satake diagrams in
+LaTeX documents, using the TikZ package.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-ecgdraw
+  (package
+    (name "texlive-ecgdraw")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ecgdraw/" "source/latex/ecgdraw/"
+                   "tex/latex/ecgdraw/")
+             (base32
+              "16kbmf9fckms0vhi41h2p6k8znv6plzwn4f2j374zmpqphq1m3il")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
+    (native-inputs
+     (list (texlive-updmap.cfg
+            (list texlive-hypdoc
+                  texlive-layaureo
+                  texlive-listings
+                  texlive-pgf
+                  texlive-tools))))
+    (home-page "https://ctan.org/pkg/ecgdraw")
+    (synopsis "Draws electrocardiograms (ECG)")
+    (description
+     "This package provides the @code{\\ECG} command, which draws
+electrocardiograms (ECG).  It can generate different types of wave.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-ellipse
+  (package
+    (name "texlive-ellipse")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ellipse/" "source/latex/ellipse/"
+                   "tex/latex/ellipse/")
+             (base32
+              "0biya15r55hr41vnqsviqqsqlb7p47i2n814dahfs0r65vlfnz23")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ellipse")
+    (synopsis
+     "Draw ellipses and elliptical arcs using @code{picture} environment")
+    (description
+     "This package provides commands to draw ellipses and elliptical arcs
+using the standard LaTeX2e @code{picture} environment.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-elocalloc
+  (package
+    (name "texlive-elocalloc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/elocalloc/"
+                   "source/latex/elocalloc/"
+                   "tex/latex/elocalloc/")
+             (base32
+              "121hpnka88y6laayjbhgiphbqn8qv42024bjda21qcc076s4b632")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/elocalloc")
+    (synopsis "Local allocation macros for LaTeX 2015")
+    (description
+     "This package provides local allocation macros, with names taken from
+@file{etex.sty} but with implementation based on the LaTeX 2015 allocation
+macros.")
+    (license license:lppl)))
+
+(define-public texlive-endofproofwd
+  (package
+    (name "texlive-endofproofwd")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/endofproofwd/"
+                   "tex/latex/endofproofwd/common/")
+             (base32
+              "0lgygqfzklf3l0pijas4g1489p3k5hwb0nwijz7fmva6c7sn124i")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/endofproofwd")
+    (synopsis "End of proof sign")
+    (description
+     "This package provides an additional end of proof sign.  The command's
+name is @code{\\wasserdicht}.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-epspdfconversion
+  (package
+    (name "texlive-epspdfconversion")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/epspdfconversion/"
+                   "tex/latex/epspdfconversion/")
+             (base32
+              "1czh9ppkgk9lxw4imagnwm4b88vylr4vwhzb1k63ik749h047kg2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/epspdfconversion")
+    (synopsis "On-the-fly conversion of EPS to PDF")
+    (description
+     "The package calls the @code{epstopdf} package to convert EPS graphics to
+PDF, on the fly.  It serves as a vehicle for passing conversion options (such
+as grayscale, prepress or pdfversion) to the @code{epspdf} converter.")
+    (license license:lppl)))
+
+(define-public texlive-esk
+  (package
+    (name "texlive-esk")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/esk/" "source/latex/esk/"
+                   "tex/latex/esk/")
+             (base32
+              "0hx58ajinbfc6axd4xbj395vyhr7mj247fvlzfjx71hcg9jnwkp4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/esk")
+    (synopsis "Package to encapsulate Sketch files in LaTeX sources")
+    (description
+     "The ESK package allows to encapsulate Sketch files in LaTeX sources.
+This is very useful for keeping illustrations synchronized with the text.  It
+also frees the user from inventing descriptive names for new files that fit
+into the confines of file system conventions.  Sketch is a 3D scene
+description language by Eugene K. Ressler and can generate TikZ and PSTricks
+code.  ESK behaves in a similar fashion to EMP (which encapsulates MetaPost
+files), and was in fact developed from it.")
+    (license license:gpl3+)))
+
+(define-public texlive-euflag
+  (package
+    (name "texlive-euflag")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/euflag/" "source/latex/euflag/"
+                   "tex/latex/euflag/")
+             (base32
+              "0dhbz79grhdls4cl7idk0hvr6vddniwgn1h21f5bvxqcv1xj0d8v")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/euflag")
+    (synopsis "Command to reproduce the flag of the European Union")
+    (description
+     "This LaTeX package implements a command to reproduce the official flag
+of the European Union (EU).  The flag is reproduced at 1em high based on the
+current font size, so it can be scaled arbitrarily by changing the font
+size.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-fast-diagram
+  (package
+    (name "texlive-fast-diagram")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/fast-diagram/"
+                   "tex/latex/fast-diagram/")
+             (base32
+              "03ygmgh6gnlkn7dwnwyifv946ja6yswm3gdgv7ad39h5s0ay99hy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fast-diagram")
+    (synopsis "Easy generation of FAST diagrams")
+    (description
+     "The package provides simple means of producing FAST diagrams, using
+TikZ/PGF tools.  FAST diagrams are useful for functional analysis techniques
+in design methods.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-fig4latex
+  (package
+    (name "texlive-fig4latex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/fig4latex/"
+                   "scripts/fig4latex/")
+             (base32
+              "0z4dnd369q1ynpb3xd4pwyhmysn78zx8izq7va1s5kpwdr2hdj99")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:link-scripts #~(list "fig4latex")))
+    (inputs (list perl))
+    (home-page "https://ctan.org/pkg/fig4latex")
+    (synopsis "Management of figures for large LaTeX documents")
+    (description
+     "Fig4LaTeX simplifies management of the figures in a large LaTeX document.
+Fig4LaTeX is appropriate for projects that include figures with graphics
+created by XFig --- in particular, graphics which use the combined
+PS/LaTeX (or PDF/LaTeX) export method.")
+    (license license:gpl3)))
+
+(define-public texlive-figchild
+  (package
+    (name "texlive-figchild")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/figchild/" "tex/latex/figchild/")
+             (base32
+              "1q02q8cpkjwjqlykjq64vm65shqm6bn281j2jsv7qnay19lqmd3n")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/figchild")
+    (synopsis "Pictures for creating children's activities")
+    (description
+     "This package was created with the aim of facilitating the work of
+Elementary School teachers who need to create colorful and attractive
+activities for their students.  It is a product of the Computational
+Mathematics discipline offered at the Federal University of Vicosa --- Campus
+UFV --- Florestal by professor Fernando de Souza Bastos.  It makes use of the
+TikZ and @code{xcolor} packages.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-figput
+  (package
+    (name "texlive-figput")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/figput/" "tex/latex/figput/")
+             (base32
+              "0ckwbrsl5075902pmmjp1r3n31pdpbqvydh69vq6mkfwk3ipp4gj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/figput")
+    (synopsis "Create interactive figures in LaTeX")
+    (description
+     "FigPut allows figures to be specified using JavaScript.  The resulting
+document can be viewed as a static PDF, as usual, or the document can be
+viewed in a web-browser, in which case the figures are interactive.  A variety
+of interactive widgets are included.")
+    (license license:cc-by-sa4.0)))
+
+(define-public texlive-fitbox
+  (package
+    (name "texlive-fitbox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/fitbox/" "source/latex/fitbox/"
+                   "tex/latex/fitbox/")
+             (base32
+              "0li1nvwv8ifw1dkfsqgnhapkagndibs75lp03byxnwrmc99r7a2y")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fitbox")
+    (synopsis "Fit graphics on a page")
+    (description
+     "The package allows a box (usually an @code{\\includegraphics} box) to
+fit on the page.  It scales the box to the maximal allowed size within the
+user-set limits.  If there is not enough space on the page, the box is moved
+to the next one.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-flowchart
+  (package
+    (name "texlive-flowchart")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/flowchart/"
+                   "source/latex/flowchart/"
+                   "tex/latex/flowchart/")
+             (base32
+              "1r0n7wr7ljhlvyhmm7f85h1c5imj9iqy7afv4mjy1ychcaws233w")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/flowchart")
+    (synopsis "Shapes for drawing flowcharts, using TikZ")
+    (description
+     "The package provides a set of traditional flowchart element shapes; the
+documentation shows how to build a flowchart from these elements, using
+PGF/TikZ.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-forest
+  (package
+    (name "texlive-forest")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/forest/" "makeindex/forest/"
+                   "source/latex/forest/" "tex/latex/forest/")
+             (base32
+              "00zyxfi59kglnby7l24l1bz08afv7r9qc1wifcxrb6s5xygj42zs")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (propagated-inputs
-     (list texlive-lm
-           texlive-latex-xkeyval
-           texlive-xcolor))
+     (list texlive-elocalloc
+           texlive-environ
+           texlive-etoolbox
+           texlive-inlinedef
+           texlive-l3packages
+           texlive-pgf
+           texlive-pgfopts))
+    (home-page "https://ctan.org/pkg/forest")
+    (synopsis "Drawing (linguistic) trees")
+    (description
+     "The package provides a PGF/TikZ-based mechanism for drawing
+linguistic (and other kinds of) trees.  Its main features are: a packing
+algorithm which can produce very compact trees; a user-friendly interface
+consisting of the familiar bracket encoding of trees plus the key-value
+interface to option-setting; many tree-formatting options, with control over
+option values of individual nodes and mechanisms for their manipulation; the
+possibility to decorate the tree using the full power of PGF/TikZ; and an
+externalization mechanism sensitive to code-changes.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-gates
+  (package
+    (name "texlive-gates")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/gates/" "tex/generic/gates/")
+             (base32
+              "0brcms8qbnsyiqnnqxyzqp12z1xpvfzb5hgh6kqm28904lr84i4g")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/gates")
+    (synopsis "Support for writing modular and customisable code")
+    (description
+     "The package provides the means of writing code in a modular fashion: big
+macros or functions are divided into small chunks (called gates) with names,
+which can be externally controlled (e.g., they can be disabled, subjected to
+conditionals, loops...) and/or augmented with new chunks.  Thus complex code
+may easily be customised without having to rewrite it, or even understand its
+implementation: the behavior of existing gates can be modified, and new ones
+can be added, without endangering the whole design.  This allows code to be
+hacked in ways the original authors might have never envisioned.  The
+@code{gates} package is implemented independently for both TeX and Lua.  The
+TeX implementation, running in any current environment, requires the
+@code{texapi} package, whereas the Lua version can be run with any Lua
+interpreter, not just LuaTeX.")
+    (license license:lppl)))
+
+(define-public texlive-genealogytree
+  (package
+    (name "texlive-genealogytree")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/genealogytree/"
+                   "tex/latex/genealogytree/")
+             (base32
+              "10h12qgjrh37ax1grpkyas5blf3s4g6bfp6g5d9x7y1ddfpxjmix")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/genealogytree")
+    (synopsis "Pedigree and genealogical tree diagrams")
+    (description
+     "Pedigree and genealogical tree diagrams are proven tools to visualize
+genetic and relational connections between individuals.  The package provides
+a set of tools to typeset genealogical trees, i.e., to typeset a set of
+special graphs for the description of family-like structures.  The package
+uses an autolayout algorithm which can be customized, e.g., to prioritize
+certain paths.")
+    (license license:lppl1.3+)))
+
+
+(define-public texlive-getmap
+  (package
+    (name "texlive-getmap")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/getmap/" "scripts/getmap/"
+                   "tex/latex/getmap/")
+             (base32
+              "12pip7a1pibjlbllkrbz0fss0i5zdd8x1pbvzzbwn6rb3ragqwl9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:link-scripts #~(list "getmapdl.lua")))
+    (home-page "https://ctan.org/pkg/getmap")
+    (synopsis "Download OpenStreetMap maps for use in documents")
+    (description
+     "The package provides a simple interface to OpenStreetMap, and to Google
+Maps, map images.  In the simplest case, it is sufficient to specify the
+address you need.  The package loads the map image using an external Lua
+script (LaTeX must be running with @samp{\\write 18} enabled).  The Lua script
+may be used from the command line; a Bash version is provided.")
+    (license license:lppl)))
+
+(define-public texlive-gnuplottex
+  (package
+    (name "texlive-gnuplottex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/gnuplottex/"
+                   "source/latex/gnuplottex/"
+                   "tex/latex/gnuplottex/")
+             (base32
+              "1c99xc24bqp0j1xy31ayna4xmdsyshs9fjarb8cmn4m3ffwvlrmw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/gnuplottex")
+    (synopsis "Embed Gnuplot commands in LaTeX documents")
+    (description
+     "This package allows you to include Gnuplot graphs in your LaTeX
+documents.  The Gnuplot code is extracted from the document and written to
+@file{.gnuplot} files.  Then, if shell escape is used, the graph files are
+automatically processed to graphics or LaTeX code files which will then be
+included in the document.  If shell escape isn't used, the user will have to
+manually convert the files by running Gnuplot on the extracted @file{.gnuplot}
+files.")
+    (license license:gpl2)))
+
+(define-public texlive-gradientframe
+  (package
+    (name "texlive-gradientframe")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/gradientframe/"
+                   "source/latex/gradientframe/"
+                   "tex/latex/gradientframe/")
+             (base32
+              "0qy3ri6fdgzdslaaa7gakswvpc299xyarm8ng4cs8w64q14675r1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
     (native-inputs
-     (list (texlive-updmap.cfg (list texlive-lm texlive-zapfding))
-           texlive-hyperref
-           texlive-latex-xkeyval
-           texlive-stringenc
-           texlive-xcolor))
-    (home-page "https://www.ctan.org/pkg/qrcode")
+     (list (texlive-updmap.cfg
+            (list texlive-charter
+                  texlive-emp
+                  texlive-hypdoc
+                  texlive-listings
+                  texlive-tools))))
+    (home-page "https://ctan.org/pkg/gradientframe")
+    (synopsis "Simple gradient frames around objects")
+    (description
+     "The package provides a means of drawing graded frames around objects.
+The gradients of the frames are drawn using the @code{color} package.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-grafcet
+  (package
+    (name "texlive-grafcet")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/grafcet/" "tex/latex/grafcet/")
+             (base32
+              "1swrap90i4l3a6azvy40b991zkqvyfw2z3mk6cq727yplmr1hkwk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/grafcet")
+    (synopsis "Draw Grafcet/SFC with TikZ")
+    (description
+     "The package provides a library (GRAFCET) that can draw Grafcet
+Sequential Function Chart (SFC) diagrams, in accordance with EN 60848, using
+PGF/TikZ.")
+    (license license:lppl1.0+)))
+
+(define-public texlive-graph35
+  (package
+    (name "texlive-graph35")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/graph35/" "source/latex/graph35/"
+                   "tex/latex/graph35/")
+             (base32
+              "0012mfpl8cxqm0grmgazixqbgicfgzr4z891zgjw60xy6df8qhwb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/graph35")
+    (synopsis "Draw keys and screen items of several Casio calculators")
+    (description
+     "This package defines commands to draw the Casio Graph 35 / Fx-9750GII
+calculator (and other models).  It can draw the whole calculator, or parts of
+it.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-graphicxpsd
+  (package
+    (name "texlive-graphicxpsd")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/graphicxpsd/"
+                   "tex/latex/graphicxpsd/")
+             (base32
+              "04fll1h90rl75bqbkhjp2yp8bragfkv5rj2kwrbbi6p7zq9nfrpn")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/graphicxpsd")
+    (synopsis
+     "Adobe Photoshop Data format (PSD) support for @code{graphicx} package")
+    (description
+     "This package provides Adobe Photoshop Data format (PSD) support for the
+@code{graphicx} package with the @command{convert} command from ImageMagick.")
+    (license license:expat)))
+
+(define-public texlive-graphviz
+  (package
+    (name "texlive-graphviz")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/graphviz/"
+                   "source/latex/graphviz/"
+                   "tex/latex/graphviz/")
+             (base32
+              "0abg1cmzr449gd5pbg3ppgf35xixjyszy3jxnrg37kqly7c26l6s")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/graphviz")
+    (synopsis "Write Graphviz inline in LaTeX documents")
+    (description
+     "The package allows inline use of Graphviz code, in a LaTeX document.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-gtrlib-largetrees
+  (package
+    (name "texlive-gtrlib-largetrees")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/gtrlib-largetrees/"
+                   "source/latex/gtrlib-largetrees/"
+                   "tex/latex/gtrlib-largetrees/")
+             (base32
+              "0yfc18v919brdj6psah8q9hsjpqs8zalnz3ridrhgir98x0l8wq9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/gtrlib-largetrees")
+    (synopsis "Library for genealogytree aiming at large trees")
+    (description
+     "The main goal of this package is to offer additional database fields and
+formats for the @code{genealogytree} package, particularly for typesetting
+large trees.")
+    (license license:lppl1.2+)))
+
+(define-public texlive-harveyballs
+  (package
+    (name "texlive-harveyballs")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/harveyballs/"
+                   "tex/latex/harveyballs/")
+             (base32
+              "15zng922zyc0jiq8yrdgl3gwj1gvdqk71zc1bcc8gl08j4y0cxgi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/harveyballs")
+    (synopsis "Create Harvey Balls using TikZ")
+    (description
+     "The package provides five commands to create Harvey Balls in
+a document.")
+    (license license:gpl3+)))
+
+(define-public texlive-here
+  (package
+    (name "texlive-here")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/here/" "tex/latex/here/")
+             (base32
+              "0pmjh9xvwmv6cf775lzfagf9wziwrgx6fri4jjhl4mzkxmxhsnpp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/here")
+    (synopsis "Emulation of obsolete package for @code{here} floats")
+    (description
+     "This package provides the @samp{H} option for floats in LaTeX to signify
+that the environment is not really a float, and should therefore be placed
+@emph{here} and not float at all.  The package emulates an older package of
+the same name, which has long been suppressed by its author.  The job is done
+by nothing more than loading the @code{float} package, which has long provided
+the option in an acceptable framework.")
+    (license license:public-domain)))
+
+(define-public texlive-hf-tikz
+  (package
+    (name "texlive-hf-tikz")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/hf-tikz/" "source/latex/hf-tikz/"
+                   "tex/latex/hf-tikz/")
+             (base32
+              "02zkax3k50rb080yn5bwy12680y0mdzddv9an3wgsycl9ycxrmi8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/hf-tikz")
+    (synopsis "Highlight formulas and formula parts")
+    (description
+     "The package provides a way to highlight formulas and formula parts in
+both documents and presentations, us TikZ.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-hobby
+  (package
+    (name "texlive-hobby")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/hobby/" "source/latex/hobby/"
+                   "tex/latex/hobby/")
+             (base32
+              "1y0np4xpra136y2rqlwsifas33avfrv1psr8nxa92m7vmpd7l7fg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/hobby")
+    (synopsis "Implementation of Hobby's algorithm for PGF/TikZ")
+    (description
+     "This package defines a path generation function for PGF/TikZ which
+implements Hobby's algorithm for a path built out of Bezier curves which
+passes through a given set of points.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-hvfloat
+  (package
+    (name "texlive-hvfloat")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/hvfloat/" "tex/latex/hvfloat/")
+             (base32
+              "0qfmgxn77vzb9jv3njfpzbqrs2c31z6kl89nwmr3la4kphb7y91w")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/hvfloat")
+    (synopsis "Controlling captions, fullpage and doublepage floats")
+    (description
+     "This package defines a macro to place objects (tables and figures) and
+their captions in different positions with different rotating angles within
+a float.  All objects and captions can be framed.")
+    (license license:lppl)))
+
+(define-public texlive-inlinedef
+  (package
+    (name "texlive-inlinedef")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/inlinedef/"
+                   "source/latex/inlinedef/"
+                   "tex/latex/inlinedef/")
+             (base32
+              "0ys2pb8dmgg41nwh9r9qhmxlfw5wxrfwryvdx1ppab4ndi138baw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/inlinedef")
+    (synopsis "Inline expansions within definitions")
+    (description
+     "The package provides a macro @code{\\Inline} that precedes
+a @code{\\def} or @code{\\gdef}.  Within the definition text of an inlined
+definition, keywords such as @code{\\Expand} may be used to selectively inline
+certain expansions at definition-time.  This eases the process of redefining
+macros in terms of the original definition, as well as definitions in which
+the token that must be expanded is deep within, where @code{\\expandafter}
+would be difficult and @code{\\edef} is not suitable.  Another application is
+as an easier version of @code{\\aftergroup}, by defining a macro in terms of
+expanded local variables, then ending the group with
+@code{\\expandafter\\endgroup\\macro}.")
+    (license license:lppl)))
+
+(define-public texlive-istgame
+  (package
+    (name "texlive-istgame")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/istgame/" "tex/latex/istgame/")
+             (base32
+              "00hpr45s31bhvhhzmgm49knjb8jb3v53gd0w87rlx9ghll38lg0m")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/istgame")
+    (synopsis "Draw game trees with TikZ")
+    (description
+     "This LaTeX package provides macros based on TikZ to draw a game tree.
+The main idea underlying its core macros is the completion of a whole tree by
+using a sequence of simple parent-child tree structures, with no longer nested
+relations involved (like the use of grandchildren or great-grandchildren).
+Using this package you can draw a game tree as easily as drawing a game tree
+with pen and paper.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-kblocks
+  (package
+    (name "texlive-kblocks")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/kblocks/" "tex/latex/kblocks/")
+             (base32
+              "0x85k295bxn4b3i083qmfvjvz2nqrh1r4r6njn491lgsfymyc0pq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/kblocks")
+    (synopsis "Easily typeset control block diagrams and signal flow graphs")
+    (description
+     "Kblocks defines a number of commands to make drawing control block
+diagrams using TikZ/PGF more structured and easier.  It reduces the learning
+curve for TikZ/PGF and serves as a frontend, by focusing on the block or flow
+diagrams only.")
+    (license license:expat)))
+
+(define-public texlive-kinematikz
+  (package
+    (name "texlive-kinematikz")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/kinematikz/"
+                   "tex/latex/kinematikz/")
+             (base32
+              "0cg1s59xq8dkfzhnf9mh2lgyrwnlwgpqf1wjwqqnscvds85s52l2")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/kinematikz")
+    (synopsis "Design kinematic chains and mechanisms")
+    (description
+     "This package provides functionalities to draw kinematic diagrams for
+mechanisms using dedicate symbols (some from the ISO standard and others).
+The intention is not to represent CAD mechanical drawings of mechanisms and
+robots, but only to represent 2D and 3D kinematic chains.  The package
+provides links, joints and other symbols, mostly in the form of TikZ pic
+objects.  These pictures can be placed in the canvas either by a central point
+for joints, and start and end points for some links.")
+    (license (list license:lppl1.3+ license:gpl3+))))
+
+(define-public texlive-knitting
+  (package
+    (name "texlive-knitting")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/knitting/"
+                   "fonts/afm/public/knitting/"
+                   "fonts/map/dvips/knitting/"
+                   "fonts/source/public/knitting/"
+                   "fonts/tfm/public/knitting/"
+                   "fonts/type1/public/knitting/"
+                   "tex/latex/knitting/"
+                   "tex/plain/knitting/")
+             (base32
+              "106p9wx4zdkz609kxsyk4zjdb0zvhnwihlnrqd1wh2p5ij7mv7vx")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-metafont))
+    (home-page "https://ctan.org/pkg/knitting")
+    (synopsis "Produce knitting charts, in Plain TeX or LaTeX")
+    (description
+     "The package provides symbol fonts and commands to write charted
+instructions for cable and lace knitting patterns, using either plain TeX or
+LaTeX.  The fonts are available both as Metafont source and in Adobe Type
+1 format.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-knittingpattern
+  (package
+    (name "texlive-knittingpattern")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/knittingpattern/"
+                   "tex/latex/knittingpattern/")
+             (base32
+              "0q52213yj08bhhgwr622ss3gwhx3l1yvgv0a2g3arhp3a8iq2g9a")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/knittingpattern")
+    (synopsis "Create knitting patterns")
+    (description
+     "The class provides a simple, effective method for knitters to produce
+high-quality, attractive patterns using LaTeX.  It does this by providing
+commands to handle as much of the layout of the document as possible, leaving
+the author free to concentrate on the pattern.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-ladder
+  (package
+    (name "texlive-ladder")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ladder/" "tex/latex/ladder/")
+             (base32
+              "0wm0c75g6k8pb9kqdbw7rmbhs9sjdq8pn01nsaxfv2zqxnbc1znz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ladder")
+    (synopsis "Draw simple ladder diagrams using TikZ")
+    (description
+     "This package permits the creation of simple ladder diagrams within LaTeX
+documents.")
+    (license license:expat)))
+
+(define-public texlive-qrcode
+  (package
+    (name "texlive-qrcode")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/qrcode/" "source/latex/qrcode/"
+                   "tex/latex/qrcode/")
+             (base32
+              "197v18lsvb90i07gxvc6mrmn1z63q8v0wvcnbk8dnn3hhabpn16y")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/qrcode")
     (synopsis "QR codes without external tools")
-    (description "This package creates @acronym{QR,Quick Response} codes for
-LaTeX documents without depending on external graphics packages.  It supports
-generating codes of different sizes and with different error correction
-levels.  All functionality is provided by the single @code{\\qrcode} command.")
+    (description
+     "The package generates QR (Quick Response) codes in LaTeX, without the
+need for PSTricks or any other graphical package.")
     (license license:lppl1.3c+)))
 
 (define-public texlive-tcolorbox
-  (let ((template (simple-texlive-package
-                   "texlive-tcolorbox"
-                   (list "/doc/latex/tcolorbox/"
-                         "/tex/latex/tcolorbox/")
-                   (base32
-                    "1qnsbblkadzdn1fx2k21xnlwcb35pg9xya24chkm66jmidi22qp0")
-                   #:trivial? #true)))
-    (package
-      (inherit template)
-      (propagated-inputs
-       (list texlive-etoolbox texlive-latex-environ texlive-pgf texlive-tools))
-      (home-page "https://www.ctan.org/pkg/tcolorbox")
-      (synopsis "Colored boxes, for LaTeX examples and theorems, etc")
-      (description "This package provides an environment for colored and
-framed text boxes with a heading line.  Optionally, such a box may be split in
-an upper and a lower part; thus the package may be used for the setting of
-LaTeX examples where one part of the box displays the source code and the
-other part shows the output.  Another common use case is the setting of
-theorems.  The package supports saving and reuse of source code and text
-parts.")
-      (license license:lppl1.3c+))))
-
-(define-public texlive-latex-ebproof
-  (package
-    (name "texlive-latex-ebproof")
-    (version "2.1.1")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://framagit.org/manu/ebproof")
-             (commit version)))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32
-         "1zkrfaf343js0yc1x7m3d8hzbh5izn0lb01jrmdpjm51kdbh30xq"))))
+  (package
+    (name "texlive-tcolorbox")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tcolorbox/" "tex/latex/tcolorbox/")
+             (base32
+              "1vygwa4y9mc7qgwf5awi0aa5c5kakbdcsl5kry0ldr1lkaxs1j8w")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/ebproof"))
-    (propagated-inputs
-     (list texlive-latex-l3kernel))
-    (home-page "http://www.ctan.org/pkg/ebproof")
-    (synopsis
-     "Formal proofs in the style of sequent calculus")
+    (home-page "https://ctan.org/pkg/tcolorbox")
+    (synopsis "Coloured boxes, for LaTeX examples and theorems, etc")
+    (description
+     "This package provides an environment for coloured and framed text boxes
+with a heading line.  Optionally, such a box may be split in an upper and
+a lower part; thus the package may be used for the setting of LaTeX examples
+where one part of the box displays the source code and the other part shows
+the output.  Another common use case is the setting of theorems.  The package
+supports saving and reuse of source code and text parts.")
+    (license license:lppl1.3c+)))
+
+(define-public texlive-ebproof
+  (package
+    (name "texlive-ebproof")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ebproof/" "source/latex/ebproof/"
+                   "tex/latex/ebproof/")
+             (base32
+              "1a3203jgxsgihfgb6wwm0gfpaxbf1lg5axcakan9rj316xrrj4lc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ebproof")
+    (synopsis "Formal proofs in the style of sequent calculus")
     (description
      "This package provides commands to typeset proof trees in the style of
 sequent calculus and related systems.  The commands allow for writing
@@ -12092,94 +26903,185 @@ an arbitrary point.  Various options allow complete control over spacing,
 styles of inference rules, placement of labels, etc.")
     (license license:lppl1.3+)))
 
-(define-public texlive-latex-bussproofs
-  (let ((template (simple-texlive-package
-                   "texlive-latex-bussproofs"
-                   (list "/doc/latex/bussproofs/"
-                         "/tex/latex/bussproofs/")
-                   (base32
-                    "1gb8y9g89fqw1kix4d2vb7mj440vlb8hnpsa3jqpk9yicndwcyk6"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "latex/bussproofs")
-         ((#:build-targets _ '())
-          ''()) ; "bussproofs.sty"
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _ (chdir "tex/latex/bussproofs")))))))
-      (home-page "https://www.math.ucsd.edu/~sbuss/ResearchWeb/bussproofs/index.html")
-      (synopsis "Formal proofs in the style of sequent calculus")
-      (description
-       "This package provides commands to typeset proof trees in the style of
+(define-deprecated-package texlive-latex-ebproof texlive-ebproof)
+
+(define-public texlive-bussproofs
+  (package
+    (name "texlive-bussproofs")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/bussproofs/"
+                   "tex/latex/bussproofs/")
+             (base32
+              "1gb8y9g89fqw1kix4d2vb7mj440vlb8hnpsa3jqpk9yicndwcyk6")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/bussproofs")
+    (synopsis "Proof trees in the style of the sequent calculus")
+    (description
+     "This package provides commands to typeset proof trees in the style of
 sequent calculus and related systems.")
-      (license license:lppl1.3+))))
+    (license license:lppl1.3+)))
+
+(define-deprecated-package texlive-latex-bussproofs texlive-bussproofs)
+
+(define-public texlive-euenc
+  (package
+    (name "texlive-euenc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/euenc/" "source/latex/euenc/"
+                   "tex/latex/euenc/")
+             (base32
+              "0vhqxhj1v68rhi08xivps8icxmlcq9mv8slqmsmf2qhvzj6x6qx3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     ;; Sole ".dtx" file bundled only generates documentation.
+     (list #:build-targets #~(list)))
+    (home-page "https://ctan.org/pkg/euenc")
+    (synopsis "Unicode font encoding definitions for XeTeX")
+    (description
+     "The package provides font encoding definitions for unicode fonts loaded
+by LaTeX in XeTeX or LuaTeX.  The package provides two encodings: EU1,
+designed for use with XeTeX, which the fontspec uses for unicode fonts which
+require no macro-level processing for accents, and EU2, which provides the
+same facilities for use with LuaTeX.  Neither encoding places any restriction
+on the glyphs provided by a font; use of EU2 causes the package
+@code{euxunicode} to be loaded (the package is part of this distribution).
+The package includes font definition files for use with the Latin Modern
+OpenType fonts.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-euro
+  (package
+    (name "texlive-euro")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/euro/" "source/latex/euro/"
+                   "tex/latex/euro/")
+             (base32
+              "1bmswsw4clzrrgxmk473ghsdbnw6zwa2rgbjs32i1i5c37026yfi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/euro")
+    (synopsis "Provide Euro values for national currency amounts")
+    (description
+     "This package converts arbitrary national currency amounts using the Euro
+as base unit, and typesets monetary amounts in almost any desired way.
+Conversion rates for the initial Euro-zone countries are already built-in.
+Further rates can be added easily.")
+    (license license:lppl)))
+
+(define-public texlive-euro-ce
+  (package
+    (name "texlive-euro-ce")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/euro-ce/"
+                   "fonts/source/public/euro-ce/"
+                   "fonts/tfm/public/euro-ce/")
+             (base32
+              "0vyh6ln2wdn42g5r1rg0gqf6q39ny7ldv2b6ikw8b029bdg5079p")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-metafont))
+    (home-page "https://ctan.org/pkg/euro-ce")
+    (synopsis "Euro and CE sign font")
+    (description
+     "This package provides Metafont source for the Euro and CE symbols in
+several variants, designed to fit with the Computer Modern-set text.")
+    (license license:bsd-3)))           ;from "euro-ce.doc"
 
 (define-public texlive-eurosym
-  (let ((template (simple-texlive-package
-                   "texlive-eurosym"
-                   (list "/doc/fonts/eurosym/"
-                         "/fonts/map/dvips/eurosym/"
-                         "/fonts/source/public/eurosym/"
-                         "/fonts/tfm/public/eurosym/"
-                         "/fonts/type1/public/eurosym/"
-                         "/tex/latex/eurosym/eurosym.sty")
-                   (base32
-                    "0ml24rxbl1yir4s3fjjxm0z7axklc3p33syg41b76zc7hck9mk8s")
-                   #:trivial? #true)))
-    (package
-      (inherit template)
-      (home-page "https://www.ctan.org/pkg/eurosym")
-      (synopsis "METAFONT and macros for Euro sign")
-      (description "This package provides the European currency symbol for the
-Euro implemented in METAFONT, using the official European Commission
-dimensions, and providing several shapes (normal, slanted, bold, outline).
-The package also includes a LaTeX package which defines the macro,
-pre-compiled font files, and documentation.")
-      (license (license:non-copyleft "file:///doc/fonts/eurosym/COPYING")))))
+  (package
+    (name "texlive-eurosym")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/eurosym/"
+                   "fonts/map/dvips/eurosym/"
+                   "fonts/source/public/eurosym/"
+                   "fonts/tfm/public/eurosym/"
+                   "fonts/type1/public/eurosym/"
+                   "tex/latex/eurosym/")
+             (base32
+              "0ml24rxbl1yir4s3fjjxm0z7axklc3p33syg41b76zc7hck9mk8s")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (native-inputs (list texlive-cm texlive-metafont))
+    (home-page "https://ctan.org/pkg/eurosym")
+    (synopsis "Metafont and macros for Euro sign")
+    (description
+     "The European currency symbol for the Euro implemented in Metafont, using
+the official European Commission dimensions, and providing several
+shapes (normal, slanted, bold, outline).  The package also includes a LaTeX
+package which defines the macro, pre-compiled @file{tfm} files, and
+documentation.")
+    (license (license:non-copyleft "file:///doc/fonts/eurosym/COPYING"))))
+
+(define-public texlive-kanaparser
+  (package
+    (name "texlive-kanaparser")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/kanaparser/"
+                   "tex/luatex/kanaparser/")
+             (base32
+              "0bcvxkdb2y60w7c0swi3f8yncli0yswalrdzxjv7h0xp21c202hp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/kanaparser")
+    (synopsis "Kana parser for LuaTeX")
+    (description
+     "The package provides a kana parser for LuaTeX.  It is a set of four
+macros that handle transliteration of text: from hiragana and katakana to
+Latin from Latin and katakana to hiragana from Latin and hiragana to katakana
+It can be used to write kana directly using only the ASCII character set or
+for education purposes.  The package has support for obsolete and rarely used
+syllables, some only accessible via the provided toggle macro.")
+    ;; License is BSD.  Assuming original BSD-4.
+    (license license:bsd-4)))
 
 (define-public texlive-kastrup
   (package
     (name "texlive-kastrup")
     (version (number->string %texlive-revision))
-    (source
-     (origin
-       (method svn-fetch)
-       (uri (texlive-ref "generic" "kastrup"))
-       (file-name (string-append name "-" version "-checkout"))
-       (sha256
-        (base32
-         "1kkshc48brkq2nx3rlbv78a2130izykbf33ri1q2shqr8pjfmmq8"))))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/kastrup/"
+                   "source/generic/kastrup/"
+                   "tex/generic/kastrup/")
+             (base32
+              "0sbf4xw1jsh9pbjhqw3f0bg067f0rhf936wfnqpzj9kp2167n41j")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments
-     '(#:tex-directory "generic/kastrup"
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'remove-generated-file
-           (lambda _
-             (delete-file "binhex.drv")
-             #t)))))
-    (home-page "http://www.ctan.org/pkg/binhex")
+    (home-page "https://ctan.org/pkg/binhex")
     (synopsis "Convert numbers into binary, octal and hexadecimal")
-    (description "The @code{kastrup} package provides the
-@emph{binhex.tex} file.  This file provides expandable macros for both
-fixed-width and minimum-width numbers to bases 2, 4, 8 and 16.  All
-constructs TeX accepts as arguments to its @code{\\number} primitive
-are valid as arguments for the macros.  The package may be used under
-LaTeX and plain TeX.")
+    (description
+     "The @code{kastrup} package provides the @emph{binhex.tex} file.  This
+file provides expandable macros for both fixed-width and minimum-width numbers
+to bases 2, 4, 8 and 16.  All constructs TeX accepts as arguments to its
+@code{\\number} primitive are valid as arguments for the macros.  The package
+may be used under LaTeX and plain TeX.")
     (license (license:fsf-free "file:/binhex.dtx"))))
 
-(define-public texlive-latex-translations
+(define-public texlive-translations
   (package
-    (inherit (simple-texlive-package
-              "texlive-latex-translations"
-              (list "doc/latex/translations/"
-                    "tex/latex/translations/")
-              (base32 "0vl7ckpbkjvz3a5snzppb96ncwgmhpwb2p6cg30grfyn421kap3v")
-              #:trivial? #t))
+    (name "texlive-translations")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/translations/"
+                   "tex/latex/translations/")
+             (base32
+              "16jcpb6afjqcqb8hn47dip2w7l9hg7q1vspg791sp1r1dsn81yf4")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/translations")
     (synopsis "Internationalisation of LaTeX2e packages")
@@ -12195,110 +27097,122 @@ Danish and Portuguese from babel or polyglossia if either is in use in the
 document.")
     (license license:lppl1.3c+)))
 
+(define-deprecated-package texlive-latex-translations texlive-translations)
+
 (define-public texlive-translator
   (package
-    (inherit (simple-texlive-package
-              "texlive-translator"
-              (list "doc/latex/translator/"
-                    "tex/latex/translator/")
-              (base32 "13rxdqhvgwc5lz2wsw4jwsb92614wlxsa90rmzxyrc6xjz1jypnk")
-              #:trivial? #t))
+    (name "texlive-translator")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/translator/"
+                   "tex/latex/translator/")
+             (base32
+              "0vmg4w5spl98y9r4h6p89xa43xxfqmv5qlc3sf7kjkyp58px8axs")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (home-page "https://ctan.org/macros/latex/contrib/translator")
+    (home-page "https://ctan.org/pkg/translator")
     (synopsis "Easy translation of strings in LaTeX")
     (description
      "This LaTeX package provides a flexible mechanism for translating
-individual words into different languages.  For example, it can be used to
-translate a word like \"figure\" into, say, the German word \"Abbildung\".
-Such a translation mechanism is useful when the author of some package would
-like to localize the package such that texts are correctly translated into the
-language preferred by the user.  This package is not intended to be used to
-automatically translate more than a few words.")
+individual words into different languages.  Such a translation mechanism is
+useful when the author of some package would like to localize the package such
+that texts are correctly translated into the language preferred by the user.
+This package is not intended to be used to automatically translate more than
+a few words.")
     (license (list license:lppl license:gpl1+))))
 
-(define-public texlive-latex-textpos
+(define-public texlive-texapi
+  (package
+    (name "texlive-texapi")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/texapi/" "tex/generic/texapi/")
+             (base32
+              "0ivg2a2pgl6bmb2242cjjcz7n9cs514dp1r8c89mva2zlm9l323j")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/texapi")
+    (synopsis "Macros to write format-independent packages")
+    (description
+     "Texapi provides utility macros to write format-independent (and -aware)
+packages.  It is similar in spirit to the etoolbox, except that it isn't tied
+to LaTeX.  The tools include engine and format detection, expansion control,
+command definition and manipulation, various testing macros, string
+operations, and highly customizable while and for loops.")
+    (license license:lppl)))
+
+(define-public texlive-textpos
   (package
-    (inherit (simple-texlive-package
-              "texlive-latex-textpos"
-              (list "doc/latex/textpos/"
-                    "tex/latex/textpos/")
-              (base32 "0sqm3pr9jyf9sf432qawscbf50glj58acwcfzyk58ijic2g01hzl")
-              #:trivial? #t))
+    (name "texlive-textpos")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/textpos/" "source/latex/textpos/"
+                   "tex/latex/textpos/")
+             (base32
+              "0spxbk9w69kcmgib33nq2x7ls8566fg214rcmkb126yyn7jqg567")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/textpos")
-    (synopsis "Absolute positioning of text on the LaTeX page")
+    (synopsis "Place boxes at arbitrary positions on the LaTeX page")
     (description
-     "This package facilitates placing boxes at absolute positions on the
-LaTeX page.  There are several reasons why this might be useful, but the main
-one (or at least my motivating one) is to help produce a large-format
-conference poster.
+     "This package provides a package to facilitate placement of boxes at
+absolute positions on the LaTeX page.  There are several reasons why this
+might be useful, an important one being to help the creation of large-format
+conference posters.")
+    (license license:lppl1.3+)))
 
-This package provides a single environment, plus a starred variant, which
-contains the text (or graphics, or table, or whatever) which is to be placed
-on the page, and which specifies where it is to be placed.  The environment is
-accompanied by various configuration commands.")
-    (license license:lppl)))
+(define-deprecated-package texlive-latex-textpos texlive-textpos)
 
 (define-public texlive-unicode-math
   (package
-    (inherit (simple-texlive-package
-              "texlive-unicode-math"
-              (list "source/latex/unicode-math/"
-                    "doc/latex/unicode-math/"
-                    "tex/latex/unicode-math/unicode-math-table.tex")
-              (base32 "1j3041dcm7wqj0x26rxm9bb7q4xa1rqsqynqdb6cbjk3jmfvskxn")))
+    (name "texlive-unicode-math")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/unicode-math/"
+                   "source/latex/unicode-math/"
+                   "tex/latex/unicode-math/")
+             (base32
+              "0w5gp11ccc486lckzag63arg97g1r0zkf29bdnnk13pz4r5m2lgx")))
     (outputs '("out" "doc"))
-    (arguments
-     (list
-      #:tex-directory "latex/unicode-math"
-      #:tex-format "xelatex"
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'copy-files
-            ;; The documentation isn't built.
-            (lambda* (#:key outputs tex-directory #:allow-other-keys)
-              (let ((doc (assoc-ref outputs "doc"))
-                    (tex (string-append #$output "/share/texmf-dist/tex/"
-                                        tex-directory)))
-                ;; Install documentation.
-                (mkdir-p (string-append doc "/share/texmf-dist/doc" ))
-                (copy-recursively "doc" doc)
-                ;; Install unicode-math-table.tex, which is not
-                ;; built.
-                (install-file "tex/latex/unicode-math/unicode-math-table.tex"
-                              tex))))
-          (add-after 'copy-files 'chdir
-            (lambda* (#:key tex-directory #:allow-other-keys)
-              (chdir (string-append "source/" tex-directory)))))))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "xelatex"))
+    (native-inputs (list texlive-xetex))
+    (propagated-inputs (list texlive-fontspec texlive-lm-math))
     (home-page "https://ctan.org/pkg/unicode-math")
     (synopsis "Unicode mathematics support for XeTeX and LuaTeX")
-    (description "This package will provide a complete implementation of
-Unicode maths for XeLaTeX and LuaLaTeX.  Unicode maths is currently supported
-by the following fonts:
+    (description
+     "This package will provide a complete implementation of unicode maths for
+XeLaTeX and LuaLaTeX.  Unicode maths is currently supported by the following
+fonts:
 @itemize
-@item Latin Modern Math
-@item TeX Gyre Bonum Math
-@item TeX Gyre Pagella Math
-@item TeX Gyre Schola Math
-@item TeX Gyre Termes Math
-@item DejaVu Math TeX Gyre
-@item Asana-Math
-@item STIX
-@item XITS Math
-@item Libertinus Math
-@item Fira Math
+@item Latin Modern Math,
+@item TeX Gyre Bonum Math,
+@item TeX Gyre Pagella Math,
+@item TeX Gyre Schola Math,
+@item TeX Gyre Termes Math,
+@item DejaVu Math TeX Gyre,
+@item Asana-Math fonts,
+@item STIX,
+@item XITS Math,
+@item Libertinus Math,
+@item Fira Math.
 @end itemize")
     (license license:lppl1.3c+)))
 
 (define-public texlive-xifthen
   (package
-    (inherit (simple-texlive-package
-              "texlive-xifthen"
-              (list "doc/latex/xifthen/"
-                    "tex/latex/xifthen/")
-              (base32
-               "0b33mlmnxsj5mi06v2w2zgamk51mgv1lxdr1cax8nkpn9g7n9axw")
-              #:trivial? #t))
+    (name "texlive-xifthen")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/xifthen/" "tex/latex/xifthen/")
+             (base32
+              "0b33mlmnxsj5mi06v2w2zgamk51mgv1lxdr1cax8nkpn9g7n9axw")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/xifthen")
     (synopsis "Extended conditional commands")
@@ -12313,61 +27227,118 @@ handle complex tests.")
 
 (define-public texlive-xindy
   (package
+    ;; Texmf tree in TeX Live is incomplete, as it doesn't include
+    ;; "xindy.mem", so it is not possible to use `texlive-origin'.  This file
+    ;; isn't build by default by `texlive-bin' either.  Build it specially
+    ;; from `texlive-bin' source instead.
+    (inherit texlive-libkpathsea)
     (name "texlive-xindy")
-    (version "2.5.1")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://ctan/indexing/xindy/base/xindy-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "0hxsx4zw19kmixkmrln17sxgg1ln4pfp4lpfn5v5fyr1nwfyk3ic"))))
+    (version (number->string %texlive-revision))
+    (outputs '("out" "doc"))
     (build-system gnu-build-system)
     (arguments
-     (list
-      #:configure-flags #~(list "--enable-docs")
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'patch-clisp
-            (lambda* (#:key inputs #:allow-other-keys)
-              ;; The xindy.in file is encoded in ISO-8859-1 (or iso-latin-1).
-              (with-fluids ((%default-port-encoding "ISO-8859-1"))
-                (substitute* "user-commands/xindy.in"
-                  (("(our \\$clisp = ).*" _ head)
-                   (format #f "our $clisp = ~s;~%"
-                           (search-input-file inputs "bin/clisp"))))))))))
-    (native-inputs (list clisp
-                         glibc-locales
-                         perl
-                         texlive-bin
-                         texlive-greek-fontenc
-                         texlive-hyperref
-                         texlive-latex-base
-                         texlive-latex-cyrillic
-                         texlive-latex-geometry
-                         (texlive-updmap.cfg ;fonts
-                          (list texlive-cbfonts
-                                texlive-lh
-                                texlive-jknappen))))
-    (inputs (list clisp perl))          ;used at run time
-    (home-page "https://www.ctan.org/pkg/xindy")
+     (substitute-keyword-arguments (package-arguments texlive-libkpathsea)
+       ((#:out-of-source? _ #t) #t)
+       ((#:configure-flags flags)
+        #~(cons "--enable-xindy" (delete "--enable-kpathsea" #$flags)))
+       ((#:phases _)
+        #~(modify-phases %standard-phases
+            (replace 'install
+              (lambda _
+                (with-directory-excursion "utils/xindy/"
+                  (invoke "make")
+                  (mkdir-p (string-append #$output "/bin"))
+                  (invoke "make" "install")
+                  (let ((out (string-append #$output "/share"))
+                        (doc (string-append #$output:doc "/share/texmf-dist")))
+                    (mkdir-p doc)
+                    (with-directory-excursion doc
+                      (rename-file (string-append out "/texmf-dist/doc") "doc")
+                      (rename-file (string-append out "/man") "doc/man"))))))
+            (add-after 'install 'patch-clisp-location
+              (lambda* (#:key inputs #:allow-other-keys)
+                ;; The scripts are encoded in ISO-8859-1 (or iso-latin-1).
+                (with-fluids ((%default-port-encoding "ISO-8859-1"))
+                  (substitute* (find-files #$output "xindy\\.pl$")
+                    (("our \\$clisp = .*")
+                     (format #f "our $clisp = ~s;~%"
+                             (search-input-file inputs "/bin/clisp")))))))))))
+    (native-inputs
+     (list clisp
+           (texlive-updmap.cfg
+            (list texlive-cbfonts-fd
+                  texlive-cyrillic
+                  texlive-greek-fontenc
+                  texlive-lh))))
+    (inputs (list clisp perl))
+    (native-search-paths '())
+    (home-page "https://ctan.org/pkg/xindy")
     (synopsis "General-purpose index processor")
-    (description "Xindy was developed after an impasse had been encountered in
-the attempt to complete internationalisation of @command{makeindex}.  Xindy
-can be used to process indexes for documents marked up using (La)TeX, Nroff
-family and SGML-based languages.  Xindy is highly configurable, both in markup
-terms and in terms of the collating order of the text being processed.")
+    (description
+     "Xindy was developed after an impasse had been encountered in the attempt
+to complete internationalisation of @command{makeindex}.  Xindy can be used to
+process indexes for documents marked up using (La)TeX, Nroff family and
+SGML-based languages.  Xindy is highly configurable, both in markup terms and
+in terms of the collating order of the text being processed.")
     (license license:gpl2+)))
 
+(define-public texlive-xits
+  (package
+    (name "texlive-xits")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/xits/"
+                   "fonts/opentype/public/xits/")
+             (base32
+              "1359zgi8r4mwjv273zmc5jghyy4i54amkrmkq80z67x4kx092724")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xits")
+    (synopsis "Scientific Times-like font")
+    (description
+     "XITS is a Times-like font for scientific typesetting with proper
+mathematical support for modern, Unicode and OpenType capable TeX engines,
+namely LuaTeX and XeTeX. For use with LuaLaTeX or XeLaTeX, support is
+available from the @code{fontspec} and @code{unicode-math} packages.")
+    (license license:silofl1.1)))
+
+(define-public texlive-ntgclass
+  (package
+    (name "texlive-ntgclass")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ntgclass/"
+                   "source/latex/ntgclass/"
+                   "tex/latex/ntgclass/")
+             (base32
+              "04rvr1gldp87nqplmnqkwi3l9jclsjaawj5rym72gy6sw9snpmck")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ntgclass")
+    (synopsis "European versions of standard classes")
+    (description
+     "The bundle offers versions of the standard LaTeX @code{article} and
+@code{report} classes, rewritten to reflect a more European design, and the
+@code{a4} package, which is better tuned to the shape of a4 paper than is the
+@code{a4paper} class option of the standard classes.  The classes include
+several for @code{article} and @code{report} requirements, and a @code{letter}
+class.  The elements of the bundle were designed by members of the Dutch TeX
+Users Group NTG.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-nth
   (package
-    (inherit (simple-texlive-package
-              "texlive-nth"
-              (list "tex/generic/nth/")
-              (base32
-               "0716sd99xjdkplm7jdmg4lx8lpfnnx6mxjp1l1sp2bfqcg73p4hm")
-              #:trivial? #t))
-    (home-page "https://ctan.org/macros/generic/misc/nth.sty")
+    (name "texlive-nth")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/generic/nth/")
+             (base32
+              "0716sd99xjdkplm7jdmg4lx8lpfnnx6mxjp1l1sp2bfqcg73p4hm")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/nth")
     (synopsis "Generate English ordinal numbers")
     (description
      "The command @code{\\nth{<number>}} generates English ordinal numbers of
@@ -12377,98 +27348,120 @@ TeX users have no access to package options, so need to redefine macros for
 these changes.")
     (license license:public-domain)))
 
+(define-public texlive-ntheorem
+  (package
+    (name "texlive-ntheorem")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ntheorem/" "source/latex/ntheorem/"
+                   "tex/latex/ntheorem/")
+             (base32
+              "16xain8s0azcnhwj5xwh3m365sb9bhdvxanh19kvmnc52dggjc1y")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ntheorem")
+    (synopsis "Enhanced theorem environment")
+    (description
+     "The package offers enhancements for theorem-like environments: easier
+control of layout; proper placement of endmarks even when the environment ends
+with @code{\\end@{enumerate@}} or @code{\\end@{displaymath@}} (including
+support for @code{amsmath} displayed-equation environments); and support for
+making a list of theorems, analagous to @code{\\listoffigures}.")
+    (license license:lppl)))
+
 (define-public texlive-fmtcount
   (package
-    (inherit (simple-texlive-package
-              "texlive-fmtcount"
-              (list "doc/latex/fmtcount/"
-                    "scripts/fmtcount/"
-                    "source/latex/fmtcount/"
-                    "tex/latex/fmtcount/")
-              (base32
-               "1biw0g6s2arq6kq52c1yfkl0vzafja2az65c3d0syq0vgjzj9763")
-              #:trivial? #t))
-    (home-page "https://ctan.org/macros/latex/contrib/fmtcount")
+    (name "texlive-fmtcount")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/fmtcount/" "scripts/fmtcount/"
+                   "source/latex/fmtcount/" "tex/latex/fmtcount/")
+             (base32
+              "1biw0g6s2arq6kq52c1yfkl0vzafja2az65c3d0syq0vgjzj9763")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fmtcount")
     (synopsis "Display the value of a LaTeX counter in a variety of formats")
     (description
-     "The package provides commands that display the value of a LaTeX counter in a
-variety of formats (ordinal, text, hexadecimal, decimal, octal, binary etc).
-The package offers some multilingual support; configurations for use in English
-(both British and American usage), French (including Belgian and Swiss
-variants), German, Italian, Portuguese and Spanish documents are provided.  This
-package was originally provided as part of the author's datetime package, but is
-now distributed separately.")
+     "The package provides commands that display the value of a LaTeX counter
+in a variety of formats (ordinal, text, hexadecimal, decimal, octal, binary
+etc).  The package offers some multilingual support; configurations for use in
+English (both British and American usage), French (including Belgian and Swiss
+variants), German, Italian, Portuguese and Spanish documents are provided.")
     (license license:lppl1.3+)))
 
 (define-public texlive-inriafonts
   (package
-    (inherit (simple-texlive-package
-              "texlive-inriafonts"
-              (list "doc/fonts/inriafonts/"
-                    "fonts/enc/dvips/inriafonts/"
-                    "fonts/map/dvips/inriafonts/"
-                    "fonts/opentype/public/inriafonts/"
-                    "fonts/tfm/public/inriafonts/"
-                    "fonts/truetype/public/inriafonts/"
-                    "fonts/type1/public/inriafonts/"
-                    "fonts/vf/public/inriafonts/"
-                    "tex/latex/inriafonts/")
-              (base32
-               "0ngbpr4pl7r82jmdhiksp32qvbvggf2nawwqq0pkb7cffp95ya49")
-              #:trivial? #t))
-    (propagated-inputs (list texlive-ly1))        ;requires LY1 font encoding
-    (home-page "https://ctan.org/fonts/inriafonts")
+    (name "texlive-inriafonts")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/inriafonts/"
+                   "fonts/enc/dvips/inriafonts/"
+                   "fonts/map/dvips/inriafonts/"
+                   "fonts/opentype/public/inriafonts/"
+                   "fonts/tfm/public/inriafonts/"
+                   "fonts/truetype/public/inriafonts/"
+                   "fonts/type1/public/inriafonts/"
+                   "fonts/vf/public/inriafonts/"
+                   "tex/latex/inriafonts/")
+             (base32
+              "0ngbpr4pl7r82jmdhiksp32qvbvggf2nawwqq0pkb7cffp95ya49")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/inriafonts")
     (synopsis "Inria fonts with LaTeX support")
     (description
-     "Inria is a free font designed by Black[Foundry] for Inria, a French research
-institute.  It comes as Serif and Sans Serif, each with three weights and
-matching italics.  Using these fonts with XeLaTeX and LuaLaTeX is easy using
-the fontspec package; we refer to the documentation of fontspec for more
-information.  The present package provides a way of using them with LaTeX and
-pdfLaTeX: it provides two style files, @file{InriaSerif.sty} and
-@file{InriaSans.sty}, together with the PostScript version of the fonts and
-their associated files.  These were created using autoinst.")
+     "Inria is a free font designed by Black[Foundry] for Inria, a French
+research institute.  It comes as Serif and Sans Serif, each with three weights
+and matching italics.  Using these fonts with XeLaTeX and LuaLaTeX is easy
+using the @code{fontspec} package.  The present package provides a way of
+using them with LaTeX and pdfLaTeX: it provides two style files,
+@file{InriaSerif.sty} and @file{InriaSans.sty}, together with the PostScript
+version of the fonts and their associated files.")
     (license (list license:lppl license:silofl1.1))))
 
 (define-public texlive-floatflt
   (package
-    (inherit (simple-texlive-package
-              "texlive-floatflt"
-              (list "doc/latex/floatflt/"
-                    "source/latex/floatflt/"
-                    "tex/latex/floatflt/")
-              (base32
-               "1piy8ajbbcadsjwp0mhlgxm2ggggnb5sn75arfs5fxiaqrwd572j")
-              #:trivial? #t))
-    (home-page "https://ctan.org/macros/latex/contrib/floatflt")
+    (name "texlive-floatflt")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/floatflt/" "source/latex/floatflt/"
+                   "tex/latex/floatflt/")
+             (base32
+              "1piy8ajbbcadsjwp0mhlgxm2ggggnb5sn75arfs5fxiaqrwd572j")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
+    (home-page "https://ctan.org/pkg/floatflt")
     (synopsis "Wrap text around floats")
     (description
-     "The package can float text around figures and tables which do not
-span the full width of a page; it improves upon floatfig, and allows
-tables and figures to be set left/right or alternating on even/odd pages.")
+     "The package can float text around figures and tables which do not span
+the full width of a page; it improves upon floatfig, and allows tables/figures
+to be set left/right or alternating on even/odd pages.")
     (license license:lppl1.3+)))
 
 (define-public texlive-fvextra
-  (let ((template (simple-texlive-package
-                   "texlive-fvextra"
-                   (list "/doc/latex/fvextra/"
-                         "/source/latex/fvextra/"
-                         "/tex/latex/fvextra/")
-                   (base32
-                    "0nawx1fh55yhqspy5jgss2qmwpqmikfrg7628smk931rph9nq0aa"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t)
-          "latex/fvextra")))
-      (home-page "https://ctan.org/macros/latex/contrib/fvextra")
-      (synopsis "Extensions and patches for fancyvrb")
-      (description
-       "This package provides several extensions to fancyvrb, including
-automatic line breaking and improved math mode.  It also patches some fancyvrb
-internals.")
-      (license license:lppl1.3+))))
+  (package
+    (name "texlive-fvextra")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/fvextra/" "source/latex/fvextra/"
+                   "tex/latex/fvextra/")
+             (base32
+              "18r3722sf859yn5j1q084ix9gp8sp4znvdlwi2vnrrn36djyvkzj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/fvextra")
+    (synopsis "Extensions and patches for @code{fancyvrb}")
+    (description
+     "This package provides several extensions to fancyvrb, including
+automatic line breaking and improved math mode.")
+    (license license:lppl1.3+)))
 
 (define-public bibtool
   (package
@@ -12502,322 +27495,1296 @@ and selecting references used in a publication.")
 
 (define-public texlive-apa6
   (package
-    (inherit (simple-texlive-package
-              "texlive-apa6"
-              (list "doc/latex/apa6/"
-                    "source/latex/apa6/"
-                    "tex/latex/apa6/")
-              (base32
-               "08jn8piyaad4zln33c0gikyhdkcsk2s3ms9l992riq2hbpbm9lcf")
-              #:trivial? #t))
-    (propagated-inputs (list texlive-apacite
-                             texlive-babel
-                             texlive-booktabs
-                             texlive-endnotes
-                             texlive-etoolbox
-                             texlive-fancyhdr
-                             texlive-xstring
-                             texlive-graphics
-                             texlive-latex-draftwatermark
-                             texlive-latex-float
-                             texlive-lm
-                             texlive-substr
-                             texlive-times
-                             texlive-tools))
-    (home-page "https://www.ctan.org/pkg/apa6")
+    (name "texlive-apa6")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/apa6/" "source/latex/apa6/"
+                   "tex/latex/apa6/")
+             (base32
+              "08jn8piyaad4zln33c0gikyhdkcsk2s3ms9l992riq2hbpbm9lcf")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-build
+            ;; Build process wants to generate files in the wrong directory.
+            (lambda _
+              (substitute* "source/latex/apa6/apa6.ins"
+                (("file\\{\\./.*?/") "file{")))))))
+    (home-page "https://ctan.org/pkg/apa6")
     (synopsis "Format documents in APA style (6th edition)")
-    (description "The class formats documents in APA style (6th
-Edition).  It provides a full set of facilities in three different
-output modes (journal-like appearance, double-spaced manuscript,
-LaTeX-like document), in contrast to the earlier apa6e, which only formats
-double-spaced manuscripts in APA style.  The class can mask author identity
-for copies for use in masked peer review.
-
-The class is a development of the apa class (which is no longer
-maintained).")
+    (description
+     "The class formats documents in APA style (6th Edition).  It provides
+a full set of facilities in three different output modes (journal-like
+appearance, double-spaced manuscript, LaTeX-like document).  The class can
+mask author identity for copies for use in masked peer review.")
     (license license:lppl1.3c+)))
 
 (define-public texlive-apacite
   (package
-    (inherit (simple-texlive-package
-              "texlive-apacite"
-              (list "tex/latex/apacite/")
-              (base32
-               "0bcfpcmflhvxwzmdj8dgf43mzaywx2asahp52nqn3wwvq64bqym6")
-              #:trivial? #t))
-    (propagated-inputs (list texlive-latex-natbib
-                             texlive-tools))
-    (home-page "https://www.ctan.org/pkg/apacite")
+    (name "texlive-apacite")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bst/apacite/" "doc/bibtex/apacite/"
+                   "source/bibtex/apacite/" "tex/latex/apacite/")
+             (base32
+              "0nc86zngk71xpbinrfm8p0413xphc0v86ddhcw94gi2sl00hsmzq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/apacite")
     (synopsis "Citation style following the rules of the APA")
-    (description "Apacite provides a BibTeX style and a LaTeX package which
-are designed to match the requirements of the American Psychological
-Association’s style for citations.  The package follows the 6th edition
-of the APA manual, and is designed to work with the apa6 class.  A test
-document is provided.  The package is compatible with chapterbib and
-(to some extent) with hyperref (for limits of compatibility, see the
-documentation).  The package also includes a means of generating an author
-index for a document.")
-    (license license:lppl1.3+)))
+    (description
+     "Apacite provides a BibTeX style and a LaTeX package which are designed
+to match the requirements of the American Psychological Association's style
+for citations.  The package follows the 6th edition of the APA manual, and is
+designed to work with the @code{apa6} class.")
+    (license license:lppl)))
 
 (define-public texlive-endfloat
   (package
-    (inherit (simple-texlive-package
-              "texlive-endfloat"
-              (list "doc/latex/endfloat/"
-                    "source/latex/endfloat/"
-                    "tex/latex/endfloat/")
-              (base32
-               "1zslmc5g28z6adfyd8bdlbw03jawxmgafq0mgwy811hrbcppb2kg")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/endfloat")
+    (name "texlive-endfloat")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/endfloat/" "source/latex/endfloat/"
+                   "tex/latex/endfloat/")
+             (base32
+              "1zslmc5g28z6adfyd8bdlbw03jawxmgafq0mgwy811hrbcppb2kg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/endfloat")
     (synopsis "Move floats to the end, leaving markers where they belong")
-    (description "Place all floats on pages by themselves at the end of
-the document, optionally leaving markers like “[Figure 3 about here]”
-in the text near to where the figure (or table) would normally have
-occurred.  Float types figure and table are recognised by the package,
-unmodified.  Since several packages define other types of float, it is
-possible to register these float types with endfloat.")
-    (license license:gpl2+)))
+    (description
+     "The @code{endfloat} package places all floats on pages by themselves at
+the end of the document, optionally leaving markers in the text near to where
+the figure (or table) would normally have occurred.")
+    (license license:gpl3+)))
 
 (define-public texlive-was
   (package
-    (inherit (simple-texlive-package
-              "texlive-was"
-              (list "doc/latex/was/"
-                    "source/latex/was/"
-                    "tex/latex/was/")
-              (base32
-               "1fp0l9sn9yrhf8hz175dzc2x28byk1ygfirn23am5ak72csmi0cp")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/was")
+    (name "texlive-was")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/was/" "source/latex/was/"
+                   "tex/latex/was/")
+             (base32
+              "1c2kmfrm898c69bizw0650w82bjabp3jf57hmqfcb9y625pq0s05")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/was")
     (synopsis "Collection of small packages by Walter Schmidt")
-    (description "A bundle of packages that arise in the author’s area of interest:
-
-@itemize
-@item compliance of maths typesetting with ISO standards;
-@item symbols that work in both maths and text modes
-@item commas for both decimal separator and maths; and
-@item upright Greek letters in maths
-@end itemize")
+    (description
+     "This package provides a bundle of packages that arise in the author's
+area of interest: compliance of maths typesetting with ISO standards; symbols
+that work in both maths and text modes commas for both decimal separator and
+maths; and upright Greek letters in maths.")
     (license license:lppl1.2+)))
 
 (define-public texlive-xpatch
   (package
-    (inherit (simple-texlive-package
-              "texlive-xpatch"
-              (list "doc/latex/xpatch/"
-                    "source/latex/xpatch/"
-                    "tex/latex/xpatch/")
-              (base32
-               "0r08hadnwx9vyppzmbn1bj69b12i5fw1mhk49piw2rqbk01722zk")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/xpatch")
-    (synopsis "Extending etoolbox patching commands")
-    (description "The package generalises the macro patching commands
-provided by Philipp Lehmann’s etoolbox.")
+    (name "texlive-xpatch")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/xpatch/" "source/latex/xpatch/"
+                   "tex/latex/xpatch/")
+             (base32
+              "0r08hadnwx9vyppzmbn1bj69b12i5fw1mhk49piw2rqbk01722zk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xpatch")
+    (synopsis "Extending @code{etoolbox} patching commands")
+    (description
+     "The package generalises the macro patching commands provided by Philipp
+Lehmann's @code{etoolbox}.")
     (license license:lppl1.3c+)))
 
 (define-public texlive-threeparttablex
   (package
-    (inherit (simple-texlive-package
-              "texlive-threeparttablex"
-              (list "doc/latex/threeparttablex/"
-                    "tex/latex/threeparttablex/")
-              (base32
-               "19pvw2ifswxcf8dxw0mzjmqhl592477w5hcfh97f4wpya0dv2m9p")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/threeparttablex")
-    (synopsis "Notes in longtables")
-    (description "The package provides the functionality of the
-threeparttable package to tables created using the longtable package.")
+    (name "texlive-threeparttablex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/threeparttablex/"
+                   "tex/latex/threeparttablex/")
+             (base32
+              "19pvw2ifswxcf8dxw0mzjmqhl592477w5hcfh97f4wpya0dv2m9p")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/threeparttablex")
+    (synopsis "Notes in @code{longtables}")
+    (description
+     "The package provides the functionality of the @code{threeparttable}
+package to tables created using the @code{longtable} package.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-ligtype
+  (package
+    (name "texlive-ligtype")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/ligtype/"
+                   "tex/lualatex/ligtype/")
+             (base32
+              "18m4j01zhp3kj2ixd53b9z0k5f6idbpr6jv45gw149j5niax1dxg")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/ligtype")
+    (synopsis "Comprehensive ligature suppression functionalities")
+    (description
+     "This package suppresses inappropriate ligatures following specified
+rules.  Both font and user kerning are applied correctly, and f-glyphs are
+automatically replaced with their short-arm variant (if available).  Also
+there is an emphasis on speed.  By default the package applies German language
+ligature suppression rules.  With the help of options and macros it can be
+used for other languages as well.  The package requires LuaLaTeX.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-linebreaker
+  (package
+    (name "texlive-linebreaker")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/linebreaker/"
+                   "tex/lualatex/linebreaker/")
+             (base32
+              "1rppq2dlj7g5djq5f0hhgk9sgk0ip1ha4vqhx6ajfpzdchg7b1cw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/linebreaker")
+    (synopsis "Prevent overflow boxes with LuaLaTeX")
+    (description
+     "This package tries to prevent overflow lines in paragraphs or boxes.  It
+changes LuaTeX's @code{\\linebreak} callback and re-typesets the paragraph
+with increased values of @code{\\tolerance} and @code{\\emergencystretch}
+until the overflow no longer happens.  If that doesn't help, it chooses the
+solution with the lowest badness.")
     (license license:lppl1.3+)))
 
 (define-public texlive-lineno
   (package
-    (inherit (simple-texlive-package
-              "texlive-lineno"
-              (list "doc/latex/lineno/"
-                    "source/latex/lineno/"
-                    "tex/latex/lineno/")
-              (base32
-               "1xf8ljgcj411yqmng89wc49rqfz19j95yqqpnb35dj3qc1chvm2a")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/lineno")
+    (name "texlive-lineno")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/lineno/" "tex/latex/lineno/")
+             (base32
+              "1naqdd62gld0hx6ss0d7sllnbqslzxjcgzj7cnycs303lb03h738")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lineno")
     (synopsis "Line numbers on paragraphs")
-    (description "Adds line numbers to selected paragraphs with reference
-possible through the LaTeX @code{\\ref} and @code{\\pageref} cross reference
-mechanism.  Line numbering may be extended to footnote lines, using the
-fnlineno package.")
+    (description
+     "The @code{lineno} package adds line numbers to selected paragraphs with
+reference possible through the LaTeX @code{\\ref} and @code{\\pageref} cross
+reference mechanism.  Line numbering may be extended to footnote lines, using
+the @code{fnlineno} package.")
     (license license:lppl1.3a+)))
 
+(define-public texlive-lparse
+  (package
+    (name "texlive-lparse")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/lparse/" "tex/luatex/lparse/")
+             (base32
+              "1m75w69qm67j82ja0lp38yckdsbn465aipzdbi2kg4y2xz34hli1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lparse")
+    (synopsis "Lua module for parsing key-value options")
+    (description
+     "@code{lparse} is derived from @code{xparse}, but only works with LuaTeX.
+Just as with xparse, it is possible to use a special syntax consisting of
+single letters to express the arguments of a macro.  However, @code{lparse} is
+able to read arguments regardless of the macro systemd used -- whether LaTeX,
+or ConTeXt, or even plain TeX.  Of course, LuaTeX must always be used as the
+engine.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-lt3luabridge
+  (package
+    (name "texlive-lt3luabridge")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/lt3luabridge/"
+                   "source/generic/lt3luabridge/"
+                   "tex/generic/lt3luabridge/")
+             (base32
+              "00nfi3c545kmm6d9hxwl0m3pawg8322g36gm8sfa3y2p8kah6p8d")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lt3luabridge")
+    (synopsis "Execute Lua code in any TeX engine that exposes the shell")
+    (description
+     "This is an expl3(-generic) package for plain TeX, LaTeX, and ConTeXt
+that allows you to execute Lua code in LuaTeX or any other TeX engine that
+exposes the shell.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-lua-typo
+  (package
+    (name "texlive-lua-typo")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/lua-typo/"
+                   "source/lualatex/lua-typo/"
+                   "tex/lualatex/lua-typo/")
+             (base32
+              "0lhjgs7jxdwk2cn9zb99mk2c56awi249zk839waqxnzfr18ky63k")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lua-typo")
+    (synopsis "Highlighting typographical flaws with LuaLaTeX")
+    (description
+     "This package tracks common typographic flaws in LuaLaTeX documents,
+especially widows, orphans, hyphenated words split over two pages, consecutive
+lines ending with hyphens, paragraphs ending on too short lines, etc.
+Customisable colours are used to highlight these flaws, and the list of pages
+on which typographical flaws were found is printed.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-lua-uca
+  (package
+    (name "texlive-lua-uca")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/support/lua-uca/" "scripts/lua-uca/"
+                   "source/support/lua-uca/")
+             (base32
+              "03wpdaz0z3zqfjs43ar65lx521qyf0c2q62b5p53kdx17xfr09jz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lua-uca")
+    (synopsis "Unicode Collation Algorithm library for Lua")
+    (description
+     "The Lua-UCA library provides basic support for Unicode Collation
+Algorithm in Lua.  It can be used to sort arrays of strings according to rules
+of particular languages.  It can be used in other Lua projects that need to
+sort text in a language dependent way, like indexing processors, bibliographic
+generators, etc.")
+    (license license:expat)))
+
+(define-public texlive-lua-ul
+  (package
+    (name "texlive-lua-ul")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/lua-ul/"
+                   "source/lualatex/lua-ul/"
+                   "tex/lualatex/lua-ul/")
+             (base32
+              "0xpa41hkjzqcws7yjj6s8ys93qyhnv6zfv7479qbv58h5mgfxzhh")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lua-ul")
+    (synopsis "Underlining for LuaLaTeX")
+    (description
+     "This package provides underlining, strikethough, and highlighting using
+features in LuaLaTeX which avoid the restrictions imposed by other methods.
+In particular, kerning is not affected, the underlined text can use arbitrary
+commands, hyphenation works etc.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-lua-visual-debug
+  (package
+    (name "texlive-lua-visual-debug")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/lua-visual-debug/"
+                   "tex/luatex/lua-visual-debug/")
+             (base32
+              "1g4n4xfqbgcja2x3b7yi59nn76jq695yndv90610pakask2k560l")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lua-visual-debug")
+    (synopsis "Visual debugging with LuaLaTeX")
+    (description
+     "The package uses Lua code to provide visible indications of boxes,
+glues, kerns and penalties in the PDF output.  The package is known to work in
+LaTeX and Plain TeX documents.")
+    (license license:expat)))
+
+(define-public texlive-lua-widow-control
+  (package
+    (name "texlive-lua-widow-control")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/lua-widow-control/"
+                   "source/luatex/lua-widow-control/"
+                   "tex/context/third/lua-widow-control/"
+                   "tex/lualatex/lua-widow-control/"
+                   "tex/luatex/lua-widow-control/"
+                   "tex/optex/lua-widow-control/")
+             (base32
+              "1c2n0hmf4kgvdfqday9pk673nxmpddg2wr91wkgalvrn7jw82js4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lua-widow-control")
+    (synopsis "Automatically remove widows and orphans from any document")
+    (description
+     "Unmodified TeX has very few ways of preventing widows and orphans.  In
+documents with figures, section headings, and equations, TeX can stretch the
+vertical glue between items in order to prevent widows and orphans, but many
+documents have no figures or headings.  TeX can also shorten the page by
+1 line, but this will give each page a different length which can make
+a document look uneven.  The typical solution is to strategically insert
+@samp{\\looseness=1}, but this requires manual editing every time that the
+document is edited.  Lua-widow-control is essentially an automation of the
+@code{\\looseness} method: it uses Lua callbacks to find stretchy paragraphs,
+then it lengthens them to remove widows and orphans.  Lua-widow-control is
+compatible with all LuaTeX and LuaMetaTeX-based formats.")
+    ;; Use either license.
+    (license (list license:mpl2.0 license:cc-by-sa4.0))))
+
+(define-public texlive-luaaddplot
+  (package
+    (name "texlive-luaaddplot")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/luaaddplot/"
+                   "source/luatex/luaaddplot/"
+                   "tex/luatex/luaaddplot/")
+             (base32
+              "0r7n2s8isw3rm0g2l0zljh86ysh1zyfbmypci3kgciad5smjzx15")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luaaddplot")
+    (synopsis "Extension to @code{pgfplots}' @code{\\addplot} macro")
+    (description
+     "This package is an extension to @code{pgfplots}.  It extends the
+@code{\\addplot} macro by a facility which allows modification of data files
+while they are read.  With @code{luaaddplot} it is no longer necessary to
+pre-process data files generated by measuring devices with external scripts.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-luacas
+  (package
+    (name "texlive-luacas")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luacas/" "tex/lualatex/luacas/")
+             (base32
+              "0zwfvrlxl5r2180w622h3dbsdskiyr2hxri3qf9v9b7nn7m33r26")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luacas")
+    (synopsis "Computer algebra system for users of LuaLaTeX")
+    (description
+     "This package provides a portable computer algebra system capable of
+symbolic computation, written entirely in Lua, designed for use in LuaLaTeX.
+Its features are: arbitrary-precision integer and rational arithmetic,
+factoring of univariate polynomials over the rationals and finite fields,
+number theoretic algorithms, symbolic differentiation and integration, and
+more.  The target audience for this package are mathematics students,
+instructors, and professionals who would like some ability to perform basic
+symbolic computations within LaTeX without the need for laborious and
+technical setup.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-luacensor
+  (package
+    (name "texlive-luacensor")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luacensor/"
+                   "tex/lualatex/luacensor/")
+             (base32
+              "0nw83zzpb9y4vnm4rjz786nz9fxv1vzlz3dv8fjwxqpxngqws4g8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luacensor")
+    (synopsis "Securely redact sensitive information using Lua")
+    (description
+     "This package provides simple tools for creating redacted contents.  Its
+tools are useful for lawyers, workers in sensitive industries, and others who
+need to easily produce both unrestricted versions of documents (for limited,
+secure release) and restricted versions of documents (for general release).
+Redaction is done both by hiding all characters and by slightly varying the
+length of strings to prevent jigsaw identification.  It also is friendly to
+screen readers by adding alt-text indicating redacted content.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-luacolor
+  (package
+    (name "texlive-luacolor")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/luacolor/"
+                   "source/latex/luacolor/"
+                   "tex/latex/luacolor/")
+             (base32
+              "0c91m5iq095f04wiy3dfnhyh458d9scww51np88x8islz1l3psbp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luacolor")
+    (synopsis "Color support based on LuaTeX's node attributes")
+    (description
+     "This package implements color support based on LuaTeX's node
+attributes.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-luacomplex
+  (package
+    (name "texlive-luacomplex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luacomplex/"
+                   "tex/lualatex/luacomplex/")
+             (base32
+              "0fb75jzvl0gqqyfl6vrfwdpsxjfq7dyhmfbfibg9w6rqxzcd013p")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luacomplex")
+    (synopsis "Operations on complex numbers inside LaTeX documents using Lua")
+    (description
+     "The @code{luacomplex} package is developed to define complex numbers and
+perform basic arithmetic on complex numbers in LaTeX.  It also loads the
+@code{luamathspackage}.  It provides an easy way to define complex numbers and
+perform operations on complex numbers.  There is no particular environment for
+performing operations on complex numbers.  The package commands can be used in
+any environment (including the mathematics environment).")
+    (license license:lppl1.3c)))
+
+(define-public texlive-luagcd
+  (package
+    (name "texlive-luagcd")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luagcd/"
+                   "tex/lualatex/luagcd/")
+             (base32
+              "17d1am1c4gmbc0z1fllk6kf6b8fmihw4bv8bl0vvwvnk2acj4zj9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luagcd")
+    (synopsis "Computation of gcd of integers inside LaTeX using Lua")
+    (description
+     "Using Lua, the @code{luagcd} package is developed to find the greatest
+common divisor (gcd) of integers in LaTeX.  The package provides commands to
+obtain step-by-step computation of gcd of two integers by using the Euclidean
+algorithm.  In addition, the package has the command to express gcd of two
+integers as a linear combination.  The Bezout's Identity can be verified for
+any two integers using commands in the package.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-luahyphenrules
+  (package
+    (name "texlive-luahyphenrules")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luahyphenrules/"
+                   "tex/lualatex/luahyphenrules/")
+             (base32
+              "1a23bp4a7nix4lhi4dl6kwxp1bs6dvldxxrx143i1ps95l3clasj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luahyphenrules")
+    (synopsis "Loading patterns in LuaLaTeX with @file{language.dat}")
+    (description
+     "Preloading hyphenation patterns (or hyphen rules) into any format based
+upon LuaTeX is not required in LuaTeX and recent releases of Babel don't do it
+anyway.  This package is addressed to those who just want to select the
+languages and load their patterns by means of @file{language.dat} without
+loading @code{babel}.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-luaimageembed
+  (package
+    (name "texlive-luaimageembed")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luaimageembed/"
+                   "tex/lualatex/luaimageembed/")
+             (base32
+              "0nn4vw7hjyjr8an04dd8xmaskf9qn3zjv29dj37pias3pjq7nqi5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luaimageembed")
+    (synopsis "Embed images as base64-encoded strings")
+    (description
+     "This package allows to embed images directly as base64-encoded strings
+into a LuaLaTeX document.  This can be useful, e.g., to package a document
+with images into a single TeX file, or with automatically generated
+graphics.")
+    (license license:expat)))
+
+(define-public texlive-luaindex
+  (package
+    (name "texlive-luaindex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luaindex/" "scripts/luaindex/"
+                   "source/lualatex/luaindex/"
+                   "tex/lualatex/luaindex/")
+             (base32
+              "0a2xfzrc663jmd2s5vi5p38pwd16mbm5602pxc3kszza8whqlfdn")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:tex-format "lualatex"
+           #:phases
+           #~(modify-phases %standard-phases
+               ;; FIXME: Building documentation requires shell-escape to be
+               ;; allowed.  I couldn't find a way to generate the package
+               ;; only.
+               (delete 'build))))
+    (home-page "https://ctan.org/pkg/luaindex")
+    (synopsis "Create index using LuaLaTeX")
+    (description
+     "Luaindex provides (yet another) index processor, written in Lua.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-luainputenc
+  (package
+    (name "texlive-luainputenc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luainputenc/"
+                   "source/lualatex/luainputenc/"
+                   "tex/lualatex/luainputenc/")
+             (base32
+              "17xglqil5mbv47kjzklp22vvsn29vajf6q0v45af4pd6yk9kcc6w")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luainputenc")
+    (synopsis "Replacing @code{inputenc} for use in LuaTeX")
+    (description
+     "LuaTeX operates by default in UTF-8 input; thus LaTeX documents that
+need 8-bit character-sets need special treatment.  The package, therefore,
+replaces the LaTeX standard @code{inputenc} for use under LuaTeX.  With
+a current LuaTeX,the package has the same behaviour with LuaTeX as
+@code{inputenc} has under pdfTeX.")
+    (license license:public-domain)))
+
+(define-public texlive-luaintro
+  (package
+    (name "texlive-luaintro")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/luaintro/")
+             (base32
+              "0xab7yymknvhsh4c30xnhrlvk798mbnl9fbf7njqx8mbmnv869bi")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luaintro")
+    (synopsis "Examples from the book ``Einfuhrung in LuaTeX und LuaLaTeX''")
+    (description
+     "The bundle provides source of all the examples published in the German
+book ``Einfuhrung in LuaTeX und LuaLaTeX'', published by Lehmans Media and
+DANTE, Berlin.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-luakeys
+  (package
+    (name "texlive-luakeys")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/luakeys/" "tex/luatex/luakeys/")
+             (base32
+              "0nsd9d2rfwbjadnfykhi0c4wj39cscpx496acjcixg1irlxii7z8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luakeys")
+    (synopsis "Lua module for parsing key-value options")
+    (description
+     "This package provides a Lua module that can parse key-value options like
+the TeX packages @code{keyval}, @code{kvsetkeys}, @code{kvoptions},
+@code{xkeyval}, @code{pgfkeys}, etc.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-lualatex-doc
+  (package
+    (name "texlive-lualatex-doc")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/lualatex-doc/"
+                   "source/lualatex/lualatex-doc/")
+             (base32
+              "1nbanlp3qfk0hylih64qnkh5cd1mjd3j99jk36rnbjhd3f840d9q")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lualatex-doc")
+    (synopsis "Guide to use of LaTeX with LuaTeX")
+    (description
+     "The document is a guide to the world of LuaLaTeX.  Coverage supports
+both new users and package developers.  Apart from the introductory material,
+the document gathers information from several sources, and offers links to
+others.")
+    (license license:fdl1.3+)))
+
+(define-public texlive-lualatex-truncate
+  (package
+    (name "texlive-lualatex-truncate")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/lualatex-truncate/"
+                   "source/lualatex/lualatex-truncate/"
+                   "tex/lualatex/lualatex-truncate/")
+             (base32
+              "1ash4zy97qr9vl3j0gpf16srhi8ymfz3h9khlp59kyq9c921rcla")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lualatex-truncate")
+    (synopsis "Wrapper for using the @code{truncate} package with LuaLaTeX")
+    (description
+     "This package provides a wrapper for the @code{truncate} package, thus
+fixing issues related to LuaTeX's hyphenation algorithm.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-lualinalg
+  (package
+    (name "texlive-lualinalg")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/lualinalg/"
+                   "tex/lualatex/lualinalg/")
+             (base32
+              "0f29ymc5adcg8mh8lhgir6cj6f0kni0i53r6g35yqnd1jw9qr24q")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lualinalg")
+    (synopsis "Linear algebra package for LaTeX")
+    (description
+     "The @code{lualinalg} package is developed to perform operations on
+vectors and matrices defined over the field of real or complex numbers inside
+LaTeX documents.  It provides flexible ways for defining and displaying
+vectors and matrices.  No particular environment of LaTeX is required to use
+commands in the package.  The package is written in Lua, and @file{.tex} file
+is to be compiled with the LuaLaTeX engine.  It may also save users efforts to
+copy vectors and matrices from other software (which may not be in
+LaTeX-compatible format) and to use them in a TeX file.  The vectors and
+matrices of reasonable size can be handled with ease.  The package can be
+modified or extended by writing custom Lua programs.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-luamathalign
+  (package
+    (name "texlive-luamathalign")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luamathalign/"
+                   "source/lualatex/luamathalign/"
+                   "tex/lualatex/luamathalign/")
+             (base32
+              "0lj5lc6s30l9k83xrwfjva0v7c9ajv22ybsaz07hadgj17fxqbdn")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luamathalign")
+    (synopsis "More flexible alignment in @code{amsmath} environments")
+    (description
+     "This package allows aligning mathematical expressions on points where
+directly using @samp{&} is not possible, especially in nested macros or
+environments.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-luamaths
+  (package
+    (name "texlive-luamaths")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin name version
+                            (list "doc/lualatex/luamaths/"
+                                  "tex/lualatex/luamaths/")
+                            (base32
+                             "1dswh6jjkl7jbs3f5pvwh30874x4xycvw7n9cbfd5m9wfcv97rw9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luamaths")
+    (synopsis
+     "Provide standard mathematical operations inside LaTeX documents using Lua")
+    (description
+     "The @code{luamaths} package is developed to perform standard
+mathematical operations inside LaTeX documents using Lua.  It provides an easy
+way to perform standard mathematical operations.  There is no particular
+environment in the package for performing mathematical operations.  The
+package commands can be used in any environment (including the mathematics
+environment).")
+    (license license:lppl1.3c)))
+
+(define-public texlive-luamodulartables
+  (package
+    (name "texlive-luamodulartables")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luamodulartables/"
+                   "tex/lualatex/luamodulartables/")
+             (base32
+              "18yc3fincdvfk1zj5m2gah35mzlvg6rbby8m71clnjk9knmzjcxy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luamodulartables")
+    (synopsis "Generate modular addition and multiplication tables")
+    (description
+     "This package is developed to generate modular addition and
+multiplication tables for positive integers.  It provides an easy way to
+generate modular addition and modular multiplication tables for positive
+integers in LaTeX documents.  The commands in the package have optional
+arguments for the formatting of tables.  These commands can be used in an
+environment similar to a tabular or array environment.  The commands can also
+be used with the @code{booktabs} package, which provides nice formatting of
+tables in LaTeX.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-luamplib
+  (package
+    (name "texlive-luamplib")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/luamplib/"
+                   "source/luatex/luamplib/"
+                   "tex/luatex/luamplib/")
+             (base32
+              "1f2r93daddjwmj7fcy5rds2yz0c8qmww7yw93vgwffmm49d9ims5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luamplib")
+    (synopsis "Use LuaTeX's built-in MetaPost interpreter")
+    (description
+     "The package enables the user to specify MetaPost diagrams (which may
+include colour specifications from the color or xcolor packages) into
+a document, using LuaTeX's built-in MetaPost library.  The facility is only
+available in PDF mode.")
+    (license license:gpl2)))
+
+(define-public texlive-luaoptions
+  (package
+    (name "texlive-luaoptions")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luaoptions/"
+                   "tex/lualatex/luaoptions/")
+             (base32
+              "143cjll4dkjb3bp9755c5wsq447mvw8k043mqyi01qskz5wq45yf")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luaoptions")
+    (synopsis "Option handling for LuaLaTeX packages")
+    (description
+     "This LuaLaTeX package provides extensive support for handling options,
+on package level and locally.  It allows the declaration of sets of options,
+along with defaults, allowed values and limited type checking.  These options
+can be enforced as package options, changed at any point during a document, or
+overwritten locally by optional macro arguments.  It is also possible to
+instantiate an Options object as an independent Lua object, without linking it
+to a package.  Luaoptions can be used to enforce and prepopulate options, or
+it can be used to simply handle the parsing of optional @samp{key=value}
+arguments into proper Lua tables.")
+    (license license:expat)))
+
+(define-public texlive-luapackageloader
+  (package
+    (name "texlive-luapackageloader")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/luapackageloader/"
+                   "tex/luatex/luapackageloader/")
+             (base32
+              "0cf2p4zhfvf7f10pbpp332chj46ajknqgb7a8i16v63ivvmgb8m3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs (list texlive-iftex))
+    (home-page "https://ctan.org/pkg/luapackageloader")
+    (synopsis "Allow LuaTeX to load external Lua packages")
+    (description
+     "This package allows LuaTeX to load packages from the default
+@code{package.path} and @code{package.cpath} locations.  This could be useful
+to load external Lua modules, including modules installed via LuaRocks.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-luaprogtable
+  (package
+    (name "texlive-luaprogtable")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luaprogtable/"
+                   "tex/lualatex/luaprogtable/")
+             (base32
+              "0vx4vsqa777hv4bdw8m7x8hrjg5p9h8d68z0l2ji60h67bziy161")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luaprogtable")
+    (synopsis "Programmable table interface for LuaLaTeX")
+    (description
+     "This package allows you to modify a cell based on the contents of other
+cells using LaTeX macros.")
+    (license license:expat)))
+
+(define-public texlive-luaquotes
+  (package
+    (name "texlive-luaquotes")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luaquotes/"
+                   "tex/lualatex/luaquotes/")
+             (base32
+              "0lla3bd5prh5ld1p88f8c3mfck6c6jn241fq1fzz0a9vdhfsbpv0")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luaquotes")
+    (synopsis "Smart setting of quotation marks")
+    (description
+     "This package automatically generates quotation marks and punctuation
+depending on the selected language.")
+    (license (list license:lppl1.3c license:cc-by-sa3.0))))
+
+(define-public texlive-luarandom
+  (package
+    (name "texlive-luarandom")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luarandom/"
+                   "tex/lualatex/luarandom/")
+             (base32
+              "1hzq29prnwgvp400d26fdjhh812gwwgmlwb22xhj29s9f0k2g1qy")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luarandom")
+    (synopsis "Create lists of random numbers")
+    (description
+     "This package can create lists of random numbers for any given interval.
+It is possible to get lists with or without multiple numbers.  The random
+generator will be initialized by the system time.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-luaset
+  (package
+    (name "texlive-luaset")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luaset/"
+                   "tex/lualatex/luaset/")
+             (base32
+              "1xbr7m1fb71xnlc3p4lb2gz10i6bz6f4bbzyfcclggriq7bkv1iq")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luaset")
+    (synopsis "Set Operations inside LaTeX documents using Lua")
+    (description
+     "The @code{luaset} package is developed to define finite sets and perform
+operations on them inside LaTeX documents.  There is no particular environment
+in the package for performing set operations.  The package commands can be
+used in any environment (including the mathematics environment).  It is
+written in Lua, and the @file{.tex} file is to be compiled with the LuaLaTeX
+engine.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-luatexko
+  (package
+    (name "texlive-luatexko")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/luatexko/"
+                   "tex/luatex/luatexko/")
+             (base32
+              "0pbpi8g2bdakrl3lpb4vmsbvccjzcb4d6y2ivnv0pncn0k5zfmfv")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luatexko")
+    (synopsis "Typeset Korean with Lua(La)TeX")
+    (description
+     "This is a Lua(La)TeX macro package that supports typesetting Korean
+documents including Old Hangul texts.  As LuaTeX has opened up access to
+almost all the hidden routines of TeX engine, users can obtain more beautiful
+outcome using this package rather than other Hangul macros operating on other
+engines.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-luatextra
+  (package
+    (name "texlive-luatextra")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luatextra/"
+                   "source/lualatex/luatextra/"
+                   "tex/lualatex/luatextra/")
+             (base32
+              "1i82x51rcdll5r6x63j5qqahb277a1xdrzpck30xlggwwlns0jdc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luatextra")
+    (synopsis "Additional macros for Plain TeX and LaTeX in LuaTeX")
+    (description
+     "The package provides a coherent extended programming environment for use
+with LuaTeX.  It loads packages @code{fontspec}, @code{luatexbase} and
+@code{lualibs}, and provides additional user-level features and goodies.")
+    (license license:public-domain)))
+
+(define-public texlive-luatruthtable
+  (package
+    (name "texlive-luatruthtable")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/lualatex/luatruthtable/"
+                   "tex/lualatex/luatruthtable/")
+             (base32
+              "18k0zk9zxfprcjxzkmfb2j1lk4ldk5hxi0ch1sy0n29f06qcl740")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luatruthtable")
+    (synopsis "Generate truth tables of boolean values in LuaLaTeX")
+    (description
+     "This package provides an easy way for generating truth tables of boolean
+values in LuaLaTeX. The time required for operations is no issue while
+compiling with LuaLaTeX. The package supports nesting of commands for multiple
+operations.  It can be modified or extended by writing custom lua programs.
+There is no need to install lua on users system as TeX distributions (TeX Live
+or MikTeX) come bundled with LuaLaTeX.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-luavlna
+  (package
+    (name "texlive-luavlna")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/luavlna/" "tex/luatex/luavlna/")
+             (base32
+              "1daa8gdkava15vvvfgr63mrq85l2ni0ydh9l17i9hyhw40mgz4bb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luavlna")
+    (synopsis
+     "Prevent line breaks after single letter words, units, or academic titles")
+    (description
+     "In some languages, like Czech or Polish, there should be no single
+letter words at the end of a line, according to typographical norms.  This
+package handles such situations using LuaTeX's callback mechanism.  In doing
+this, the package can detect languages used in the text and insert spaces only
+in parts of the document where languages requiring this feature are used.
+Another feature of this package is the inclusion of non-breakable space after
+initials (like in personal names), after or before academic degrees, and
+between numbers and units.  The package supports both plain LuaTeX and
+LuaLaTeX.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-luaxml
+  (package
+    (name "texlive-luaxml")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/luaxml/" "tex/luatex/luaxml/")
+             (base32
+              "0j0d9n87rigawqq3xlxk0zi5ry31zqg3p19jmfablvnb9lan3nrc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/luaxml")
+    (synopsis "Lua library for reading and serialising XML files")
+    (description
+     "LuaXML is a pure Lua library for reading and serializing XML files.  The
+current release is aimed mainly at support for the @code{odsfile} package.")
+    ;; It uses explicitly the same license as Lua.
+    (license license:x11)))
+
+(define-public texlive-lutabulartools
+  (package
+    (name "texlive-lutabulartools")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/lutabulartools/"
+                   "tex/luatex/lutabulartools/")
+             (base32
+              "1p7b1gv86xa09g1big3s88w0c8jiyj2bk2r8wq4n3pqqqr7zm79z")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lutabulartools")
+    (synopsis "Some useful LuaLaTeX-based tabular tools")
+    (description
+     "This package provides some useful commands for tabular matter.  It uses
+LuaLaTeX and offers the ability to combine the facilities of multirow and
+makecell with an easy to use syntax.  It also adds some enhanced rules for the
+@code{booktabs} package.")
+    (license license:expat)))
+
+(define-public texlive-minim
+  (package
+    (name "texlive-minim")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/minim/" "tex/luatex/minim/")
+             (base32
+              "056jp5rx9rhwshhzif58kx832jv1f1xw7zj1gh17g7zbyqzbc003")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/minim")
+    (synopsis "Modern plain format for the LuaTeX engine")
+    (description
+     "This is a modern plain format for the LuaTeX engine, adding improved
+low-level support for many LuaTeX extensions and newer PDF features.  While it
+can be used as drop-in replacement for plain TeX, it probably is most useful
+as a basis for your own formats.  Most features included in the format are
+provided by separate packages that can be used on their own; this package
+contains only their shared lowest-level programming interface, along with
+their combined format.")
+    (license license:eupl1.2)))
+
+(define-public texlive-minim-math
+  (package
+    (name "texlive-minim-math")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/minim-math/"
+                   "tex/luatex/minim-math/")
+             (base32
+              "0793np84dx47c6wsmqrh3vj2y9w6p0l55nc4xl9b21xvgzzb0b5j")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/minim-math")
+    (synopsis "Extensive maths for LuaTeX")
+    (description
+     "This package provides a simple and highly configurable way to use
+Unicode and OpenType mathematics with simple LuaTeX, taking advantage of most
+of the engine's new capabilities in mathematical typesetting.  Also included
+are the proper settings and definitions for almost all Unicode mathematical
+characters.")
+    (license license:eupl1.2)))
+
+(define-public texlive-minim-mp
+  (package
+    (name "texlive-minim-mp")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/minim-mp/" "metapost/minim-mp/"
+                   "tex/luatex/minim-mp/")
+             (base32
+              "084k1ywvaq1mbz00kmbxd5kzp1da7a397dy3y25pbf7chrlxwsrk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/minim-mp")
+    (synopsis "Low-level mplib integration for LuaTeX")
+    (description
+     "This package offers low-level mplib integration for plain LuaTeX and is
+designed with the purpose of being easy to extend.  The use of multiple
+simultaneous MetaPost instances is supported, as well as running TeX or lua
+code from within MetaPost.  With the included @code{minim-mp} format file, you
+can even use LuaTeX as a stand-alone MetaPost compiler.")
+    (license license:eupl1.2)))
+
+(define-public texlive-minim-pdf
+  (package
+    (name "texlive-minim-pdf")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/minim-pdf/"
+                   "tex/luatex/minim-pdf/")
+             (base32
+              "10ls1i1141lh2f69r63wmvk2dg7j6g9gl0d0qk1m73byrg4zvbcp")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/minim-pdf")
+    (synopsis "Low-level PDF integration for LuaTeX")
+    (description
+     "This package adds low-level support to plain LuaTeX for marking up the
+structure of a PDF document.  The implementation is rather basic, but should
+allow you to make your PDFs fully PDF/A-compliant.")
+    (license license:eupl1.2)))
+
+(define-public texlive-minim-xmp
+  (package
+    (name "texlive-minim-xmp")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/luatex/minim-xmp/"
+                   "tex/luatex/minim-xmp/")
+             (base32
+              "1g50pal1vxcyl0xvdkbrk26z70kn8s38sqy5c848jdbl0fx29vla")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/minim-xmp")
+    (synopsis "Embed XMP metadata in PDF with LuaTeX")
+    (description
+     "This package enables the inclusion of XMP (eXtensible Metadata Platform)
+data in the pdf output generated by (plain) LuaTeX.  The use of XMP is
+required by PDF standards such as PDF/A.")
+    (license license:eupl1.2)))
+
 (define-public texlive-babel-czech
-  (let ((template (simple-texlive-package
-                   "texlive-babel-czech"
-                   (list "/source/generic/babel-czech/")
-                   (base32
-                    "1274pzgdya7gkvxjmdm3v5rb7hc0sj6mqn9pd8y9418yx5449spg"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/babel-czech")
-         ((#:build-targets _ '())
-          ''("czech.ins")) ; TODO: use dtx and build documentation
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _
-                 (chdir "source/generic/babel-czech")))))))
-      (home-page "https://www.ctan.org/pkg/babel-czech")
-      (synopsis "Babel support for Czech")
-      (description
-       "This package provides the language definition file for support of
-Czech in @code{babel}.  Some shortcuts are defined, as well as translations to
-Czech of standard ``LaTeX names''.")
-      (license license:lppl1.3+))))
+  (package
+    (name "texlive-babel-czech")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/babel-czech/"
+                   "source/generic/babel-czech/"
+                   "tex/generic/babel-czech/")
+             (base32
+              "036817g9dv7m0m1576igwv4mjk8b41klkih44zzwjigdgdjpwbn9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/babel-czech")
+    (synopsis "Babel support for Czech")
+    (description
+     "This package provides the language definition file for support of Czech
+in @code{babel}.  Some shortcuts are defined, as well as translations to Czech
+of standard LaTeX names.")
+    (license license:lppl1.3+)))
 
 (define-public texlive-babel-dutch
-  (let ((template (simple-texlive-package
-                   "texlive-babel-dutch"
-                   (list "/source/generic/babel-dutch/")
-                   (base32
-                    "1a40rz6rznawgarnhk0wh751sln2x9js4420i0758y2clf4rlhg9"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/babel-dutch")
-         ((#:build-targets _ '())
-          ''("dutch.ins")) ; TODO: use dtx and build documentation
-         ((#:phases phases) `(modify-phases ,phases
-                               (add-after 'unpack 'chdir
-                                 (lambda _
-                                   (chdir "source/generic/babel-dutch")))))))
-      (home-page "https://www.ctan.org/pkg/babel-dutch")
-      (synopsis "Babel support for Dutch")
-      (description
-       "This package provides the language definition file for support of Dutch
+  (package
+    (name "texlive-babel-dutch")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/babel-dutch/"
+                   "source/generic/babel-dutch/"
+                   "tex/generic/babel-dutch/")
+             (base32
+              "1iqlhs2zh60n50r69yicxlklxx8msrb8k552j0ffmqf5kh64fpqh")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/babel-dutch")
+    (synopsis "Babel contributed support for Dutch")
+    (description
+     "This package provides the language definition file for support of Dutch
 in @code{babel}.  It provides all the necessary macros, definitions and
 settings to typeset Dutch documents.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
 (define-public texlive-babel-finnish
-  (let ((template (simple-texlive-package
-                   "texlive-babel-finnish"
-                   (list "/source/generic/babel-finnish/")
-                   (base32
-                    "1930zxk4l6k5q4wcbvpvijv4s0gxp2mkxvblczn4gcbar10vfd4x"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/babel-finnish")
-         ((#:build-targets _ '())
-          ''("finnish.ins")) ; TODO: use dtx and build documentation
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _
-                 (chdir "source/generic/babel-finnish")))))))
-      (home-page "https://www.ctan.org/pkg/babel-finnish")
-      (synopsis "Babel support for Finnish")
-      (description
-       "This package provides the language definition file for support of
+  (package
+    (name "texlive-babel-finnish")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/babel-finnish/"
+                   "source/generic/babel-finnish/"
+                   "tex/generic/babel-finnish/")
+             (base32
+              "1zwrbcqjwhy31mks31vlc4kxci67d5cfm53jaikaabkd8q6grq6i")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/babel-finnish")
+    (synopsis "Babel support for Finnish")
+    (description
+     "This package provides the language definition file for support of
 Finnish in @code{babel}.  It provides all the necessary macros, definitions and
 settings to typeset Finnish documents.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
-(define-public texlive-generic-babel-norsk
+(define-public texlive-babel-norsk
   (package
-    (name "texlive-generic-babel-norsk")
+    (name "texlive-babel-norsk")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "generic" "babel-norsk"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1yf538l2isxgmab8jslxxx5fbdk4njf147n4raf5vyw3l4slxm6m"))))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/babel-norsk/"
+                   "source/generic/babel-norsk/"
+                   "tex/generic/babel-norsk/")
+             (base32
+              "1zsssgcdllhjk7r58k4rv8bh59nmj091syqj45chvp1i667ndryp")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "generic/babel-norsk"))
-    (home-page "https://www.ctan.org/pkg/babel-norsk")
+    (home-page "https://ctan.org/pkg/babel-norsk")
     (synopsis "Babel support for Norwegian")
     (description
-       "The package provides the language definition file for support of
-Norwegian in @code{babel}.  Some shortcuts are defined, as well as translations
-to Norsk of standard “LaTeX names”.")
+     "The package provides the language definition file for support of
+Norwegian in Babel.  Some shortcuts are defined, as well as translations to
+Norsk of standard LaTeX names.")
     (license license:lppl1.3+)))
 
+(define-deprecated-package texlive-generic-babel-norsk texlive-babel-norsk)
+
 (define-public texlive-babel-danish
-  (let ((template (simple-texlive-package
-                   "texlive-babel-danish"
-                   (list "/source/generic/babel-danish/")
-                   (base32
-                    "00dryb078fqckqjnxa2riq478j6d5i28j5cclv4bw7dn5naa3lz7"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/babel-danish")
-         ((#:build-targets _ '())
-          ''("danish.ins")) ; TODO: use dtx and build documentation
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _
-                 (chdir "source/generic/babel-danish")))))))
-      (home-page "https://www.ctan.org/pkg/babel-danish")
-      (synopsis "Babel support for Danish")
-      (description
+  (package
+    (name "texlive-babel-danish")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/babel-danish/"
+                   "source/generic/babel-danish/"
+                   "tex/generic/babel-danish/")
+             (base32
+              "11fhmj850gahjm3l3rg5pg4l8j9x6mma59vgfpmnd4fkxj5acb0r")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/babel-danish")
+    (synopsis "Babel contributed support for Danish")
+    (description
        "This package provides the language definition file for support of
 Danish in @code{babel}.  It provides all the necessary macros, definitions and
 settings to typeset Danish documents.")
-      (license license:lppl1.3c+))))
+      (license license:lppl1.3c+)))
 
 (define-public texlive-babel-polish
-  (let ((template (simple-texlive-package
-                   "texlive-babel-polish"
-                   (list "/source/generic/babel-polish/")
-                   (base32
-                    "1jymxl98mwxmq0yq90mhrr7bq7c613rh1rnhl7l3bih36af55rwr"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ '())
-          "generic/babel-polish")
-         ((#:build-targets _ '())
-          ''("polish.ins")) ; TODO: use dtx and build documentation
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'chdir
-               (lambda _
-                 (chdir "source/generic/babel-polish")))))))
-      (home-page "https://www.ctan.org/pkg/babel-polish")
-      (synopsis "Babel support for Polish")
-      (description
-       "This package provides the language definition file for support of
-Polish in @code{babel}.  Some shortcuts are defined, as well as translations to
-Polish of standard ``LaTeX names''.")
-      (license license:lppl1.3+))))
+  (package
+    (name "texlive-babel-polish")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/babel-polish/"
+                   "source/generic/babel-polish/"
+                   "tex/generic/babel-polish/")
+             (base32
+              "0j86l23y1rq1raq2n5azza07l7xjkpgw9nhm77pzy8xmifp3nzhb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/babel-polish")
+    (synopsis "Babel support for Polish")
+    (description
+     "This package provides the language definition file for support of Polish
+in @code{babel}.  Some shortcuts are defined, as well as translations to
+Polish of standard LaTeX names.")
+    (license license:lppl1.3+)))
 
 (define-public texlive-mdframed
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-mdframed"
-      (list
-       "doc/latex/mdframed/"
-       "source/latex/mdframed/"
-       "tex/latex/mdframed/")
-      (base32 "1i5rm946wg43rjckxlfhx79zfx5cgd3bxk71206hd1dqkrgpdpa8")
-      #:trivial? #t))
-    (propagated-inputs (list texlive-latex-needspace
-                             texlive-zref))
+    (name "texlive-mdframed")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/mdframed/" "source/latex/mdframed/"
+                   "tex/latex/mdframed/")
+             (base32
+              "1i5rm946wg43rjckxlfhx79zfx5cgd3bxk71206hd1dqkrgpdpa8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/mdframed")
     (synopsis "Framed environments that can split at page boundaries")
     (description
@@ -12829,36 +28796,40 @@ TikZ.")
 
 (define-public texlive-setspace
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-setspace"
-      (list "doc/latex/setspace/" "tex/latex/setspace/")
-      (base32 "00ik8qgkw3ivh3z827zjf7gbwkbsmdcmv22c6ap543mpgaqqjcfm")
-      #:trivial? #t))
+    (name "texlive-setspace")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/setspace/" "tex/latex/setspace/")
+             (base32
+              "0bvspbka1jhpysyhh3sd1vkkm6xjj2ahj0mzv2inzqbrrbydr9gr")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/setspace")
     (synopsis "Set space between lines")
     (description
-     "The @code{setspace} package provides support for setting the spacing between
-lines in a document.  Package options include @code{singlespacing},
+     "The @code{setspace} package provides support for setting the spacing
+between lines in a document.  Package options include @code{singlespacing},
 @code{onehalfspacing}, and @code{doublespacing}.  Alternatively the spacing
 can be changed as required with the @code{\\singlespacing},
 @code{\\onehalfspacing}, and @code{\\doublespacing} commands.  Other size
 spacings also available.")
-    (license license:lppl)))
+    (license license:lppl1.3+)))
 
 (define-public texlive-pgfgantt
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-pgfgantt"
-      (list
-       "doc/latex/pgfgantt/"
-       "source/latex/pgfgantt/"
-       "tex/latex/pgfgantt/")
-      (base32 "0bm034iizk4sd7p5x7vkj7v57dc0bf2lswpsb32s4qlg4s7h6jqz")
-      #:trivial? #t))
+    (name "texlive-pgfgantt")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pgfgantt/" "source/latex/pgfgantt/"
+                   "tex/latex/pgfgantt/")
+             (base32
+              "0bm034iizk4sd7p5x7vkj7v57dc0bf2lswpsb32s4qlg4s7h6jqz")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (propagated-inputs (list texlive-pgf))
-    (home-page "https://ctan.org/graphics/pgf/contrib/pgfgantt")
+    (home-page "https://ctan.org/pkg/pgfgantt")
     (synopsis "Draw Gantt charts with TikZ")
     (description
      "The @code{pgfgantt} package provides an environment for drawing Gantt charts
@@ -12866,16 +28837,58 @@ that contain various elements (titles, bars, milestones, groups and links).
 Several keys customize the appearance of the chart elements.")
     (license license:lppl1.3+)))
 
+(define-public texlive-pdfcol
+  (package
+    (name "texlive-pdfcol")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pdfcol/" "source/latex/pdfcol/"
+                   "tex/latex/pdfcol/")
+             (base32
+              "0mr09kyan59xlnxl4a97w2avp1p09w5yyv6v3p498xpjbq3dbwih")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pdfcol")
+    (synopsis "Macros for maintaining colour stacks under pdfTeX")
+    (description
+     "This package is intended for package writers.  It defines macros for
+setting and maintaining new colour stacks.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-pdfcolfoot
+  (package
+    (name "texlive-pdfcolfoot")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pdfcolfoot/"
+                   "source/latex/pdfcolfoot/"
+                   "tex/latex/pdfcolfoot/")
+             (base32
+              "0k3fwfyj56zb18fr4yay4bp66nbx3a0nb87i8mh8yxkm7qmnx95l")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pdfcolfoot")
+    (synopsis "Separate color stack for footnotes with pdfTeX")
+    (description
+     "Since version 1.40 pdfTeX supports several colour stacks.  This package
+uses a separate colour stack for footnotes that can break across pages.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-pdflscape
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-pdflscape"
-      (list "doc/latex/pdflscape/"
-            "source/latex/pdflscape/"
-            "tex/latex/pdflscape/")
-      (base32 "05vvmwd8vlzs2x2rm6pfzlvrrihqf924d7krlrkvc6giiwyfsic4")
-      #:trivial? #t))
+    (name "texlive-pdflscape")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pdflscape/"
+                   "source/latex/pdflscape/"
+                   "tex/latex/pdflscape/")
+             (base32
+              "0l1m97ai3w8lfdfndmcbwyd8sdwpw4wp7zn6c4iqkf8bqwrmqyk8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/pdflscape")
     (synopsis "Make landscape pages display as landscape")
     (description
@@ -12885,103 +28898,244 @@ attribute.  Pages with this attribute will be displayed in landscape
 orientation by conforming PDF viewers.")
     (license license:lppl1.3+)))
 
+(define-public texlive-pdfmanagement-testphase
+  (package
+    (name "texlive-pdfmanagement-testphase")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pdfmanagement-testphase/"
+                   "source/latex/pdfmanagement-testphase/"
+                   "tex/latex/pdfmanagement-testphase/")
+             (base32
+              "0lxnr7xzis376fmkcyk7ghyj1x7m9yvlg98fvvy6vc4b26hf2kyk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pdfmanagement-testphase")
+    (synopsis "LaTeX PDF management testphase bundle")
+    (description
+     "This is a temporary package, which is used during a test phase to load
+the new PDF management code of LaTeX.  The new PDF management code offers
+backend-independent interfaces to central PDF dictionaries, tools to create
+annotations, form Xobjects, to embed files, and to handle PDF standards.  The
+code is provided, during a testphase, as an independent package to allow users
+and package authors to safely test the code.  At a later stage it will be
+integrated into the LaTeX kernel (or in parts into permanent support
+packages), and the current testphase bundle will be removed.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-pslatex
+  (package
+    (name "texlive-pslatex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "fonts/map/dvips/pslatex/"
+                   "fonts/tfm/public/pslatex/"
+                   "fonts/vf/public/pslatex/"
+                   "source/latex/pslatex/fontinst/"
+                   "source/latex/pslatex/shell/"
+                   "tex/latex/pslatex/")
+             (base32
+              "1jazd3wl614c7nxl89aj7bhdahhq3h6rrs3p5cyzwqmw3b8h2zrl")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pslatex")
+    (synopsis "Use PostScript fonts by default")
+    (description
+     "This package provides a small package that makes LaTeX default to
+standard PostScript fonts.  It is basically a merger of the @code{times} and
+the (obsolete) @code{mathptm} packages from the @code{psnfss} suite.  You must
+have installed standard LaTeX and the @code{psnfss} PostScript fonts to use
+this package.  The main novel feature is that the @code{pslatex} package tries
+to compensate for the visual differences between the Adobe fonts by scaling
+Helvetica by 90%, and condensing Courier (i.e.  scaling horizontally) by 85%.
+The package is supplied with a (unix) shell file for a @command{pslatex}
+command that allows standard LaTeX documents to be processed, without needing
+to edit the file.  Note that current @code{psnfss} uses a different technique
+for scaling Helvetica, and treats Courier as a lost cause (there are better
+free fixed-width available now, than there were when @code{pslatex} was
+designed).  As a result, @code{pslatex} is widely considered obsolete.")
+    (license license:lppl)))
+
+(define-public texlive-pspicture
+  (package
+    (name "texlive-pspicture")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/pspicture/" "dvips/pspicture/"
+                   "source/latex/pspicture/"
+                   "tex/latex/pspicture/")
+             (base32
+              "06wlnwyn45873zghnbw16lzmfj98r9il218z84p1ixw6jwkwlkh8")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/pspicture")
+    (synopsis "PostScript picture support")
+    (description
+     "This package provides a replacement for LaTeX's picture macros, that
+uses PostScript @code{\\special} commands.  The package is now largely
+superseded by @code{pict2e}.")
+    (license license:lppl)))
+
 (define-public texlive-datetime2
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-datetime2"
-      (list "doc/latex/datetime2/"
-            "source/latex/datetime2/"
-            "tex/latex/datetime2/")
-      (base32 "0yjkpfic1ni4j2g61rrjj5hjyd43shc9c0sg1aivbbsmqh30dn33")
-      #:trivial? #t))
+    (name "texlive-datetime2")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/datetime2/"
+                   "source/latex/datetime2/"
+                   "tex/latex/datetime2/")
+             (base32
+              "0yjkpfic1ni4j2g61rrjj5hjyd43shc9c0sg1aivbbsmqh30dn33")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (propagated-inputs
-     (list texlive-etoolbox
-           texlive-latex-xkeyval
-           texlive-tracklang))
+     (list texlive-etoolbox texlive-tracklang texlive-xkeyval))
     (home-page "https://ctan.org/pkg/datetime2")
     (synopsis "Formats for dates, times and time zones")
     (description
-     "The @code{datetime2} package provides commands for formatting dates, times
-and time zones and redefines @code{\\today} to use the same formatting style.
-In addition to @code{\\today}, you can also use
+     "The @code{datetime2} package provides commands for formatting dates,
+times and time zones and redefines @code{\\today} to use the same formatting
+style.  In addition to @code{\\today}, you can also use
 @code{\\DTMcurrenttime} (current time) or @code{\\DTMnow} (current date and
 time).  Dates and times can be saved for later use.  The accompanying
 @code{datetime2-calc} package can be used to convert date-times to UTC+00:00.
 Language and regional support is provided by independently maintained and
 installed modules.  The @code{datetime2-calc} package uses the
 @code{pgfcalendar} package (part of the PGF/TikZ bundle).  This package
-replaces @code{datetime.sty} which is now obsolete.")
+replaces @code{datetime.sty}, which is now obsolete.")
     (license license:lppl1.3+)))
 
 (define-public texlive-tracklang
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-tracklang"
-      (list "doc/generic/tracklang/"
-            "source/latex/tracklang/"
-            "tex/generic/tracklang/"
-            "tex/latex/tracklang/")
-      (base32 "1386sg25y6zb4ixvrbdv6n1gp54h18mjd984bnwwqda6jafxx4zr")
-      #:trivial? #t))
-    (home-page "https://ctan.org/macros/generic/tracklang")
+    (name "texlive-tracklang")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/tracklang/"
+                   "source/latex/tracklang/"
+                   "tex/generic/tracklang/"
+                   "tex/latex/tracklang/")
+             (base32
+              "0y8kdr5v033dp79fqfdc1jpp1x3lv0yjz5fjd6yk2xxw30lps1s9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/tracklang")
     (synopsis "Language and dialect tracker")
     (description
-     "The @code{tracklang} package is provided for package developers who want a
-simple interface to find out which languages the user has requested through
+     "The @code{tracklang} package is provided for package developers who want
+a simple interface to find out which languages the user has requested through
 packages such as @code{babel} or @code{polyglossia}.  This package does not
 provide any translations!  Its purpose is simply to track which languages have
-been requested by the user.  Generic TeX code is in @code{tracklang.tex} for
+been requested by the user.  Generic TeX code is in @file{tracklang.tex} for
 non-LaTeX users.")
     (license license:lppl1.3+)))
 
 (define-public texlive-ltablex
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-ltablex"
-      (list "doc/latex/ltablex/" "tex/latex/ltablex/")
-      (base32 "14lmgj820j6zwj1xnd6ad38kzb9w132kp7sp55cv5bk9vhx3621w")
-      #:trivial? #t))
+    (name "texlive-ltablex")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ltablex/" "tex/latex/ltablex/")
+             (base32
+              "14lmgj820j6zwj1xnd6ad38kzb9w132kp7sp55cv5bk9vhx3621w")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/ltablex")
     (synopsis "Table package extensions")
     (description
      "The @code{ltablex} package modifies the @code{tabularx} environment to
-combine the features of the @code{tabularx} package (auto-sized columns in a
-fixed-width table) with those of the @code{longtable} package (multi-page
+combine the features of the @code{tabularx} package (auto-sized columns in
+a fixed-width table) with those of the @code{longtable} package (multi-page
 tables).")
     (license license:lppl)))
 
 (define-public texlive-ragged2e
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-ragged2e"
-      (list "doc/latex/ragged2e/"
-            "source/latex/ragged2e/"
-            "tex/latex/ragged2e/")
-      (base32 "1cxj5jdgvr3xk1inrb3yzpm3l386jjawgpqiwsz53k6yshb6yfml")
-      #:trivial? #t))
+    (name "texlive-ragged2e")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/ragged2e/" "source/latex/ragged2e/"
+                   "tex/latex/ragged2e/")
+             (base32
+              "06wr2x7mgd40wdq3dnjg3rp5p41fqk6lsj28652i6g71rhnga3sc")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
     (home-page "https://ctan.org/pkg/ragged2e")
-    (synopsis "Alternative versions of \"ragged\"-type commands")
+    (synopsis "Alternative versions of ragged-type commands")
     (description
-     "The @code{ragged2e} package defines new commands @code{\\Centering}, @code{\\RaggedLeft},
-and @code{\\RaggedRight} and new environments @code{Center}, @code{FlushLeft},
-and @code{FlushRight}, which set ragged text and are easily configurable to
-allow hyphenation (the corresponding commands in LaTeX, all of whose names are
-lower-case, prevent hyphenation altogether).")
+     "The @code{ragged2e} package defines new commands @code{\\Centering},
+@code{\\RaggedLeft}, and @code{\\RaggedRight} and new environments
+@code{Center}, @code{FlushLeft}, and @code{FlushRight}, which set ragged text
+and are easily configurable to allow hyphenation (the corresponding commands
+in LaTeX, all of whose names are lower-case, prevent hyphenation
+altogether).")
     (license license:lppl1.3c)))
 
+(define-public texlive-rcs
+  (package
+    (name "texlive-rcs")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/rcs/" "source/latex/rcs/"
+                   "tex/latex/rcs/")
+             (base32
+              "0lhb5njyk5y60lgbbggy804qqc0szcybbhndmwblpxhhyxiqvmi5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/rcs")
+    (synopsis "Use RCS (revision control system) tags in LaTeX documents")
+    (description
+     "The @code{rcs} package utilizes the inclusion of RCS supplied data in
+LaTeX documents.  In particular, you can easily access values of every RCS
+field in your document put the checkin date on the titlepage or put RCS fields
+in a footline.  You can also typeset revision logs.  You can also configure
+the @code{rcs} package easily to do special things for any keyword.")
+    (license license:gpl3+)))
+
+(define-public texlive-refstyle
+  (package
+    (name "texlive-refstyle")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/refstyle/" "source/latex/refstyle/"
+                   "tex/latex/refstyle/")
+             (base32
+              "0ckfm04kfi67babpn3m99nqj4b9r1fs0ivq5m7yz90mz4lqykhbs")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/refstyle")
+    (synopsis "Advanced formatting of cross references")
+    (description
+     "The package provides a consistent way of producing references throughout
+a project.  Enough flexibility is provided to make local changes to a single
+reference.  The user can configure their own setup.  The package offers
+a direct interface to varioref (for use, for example, in large projects such
+as a series of books, or a multivolume thesis written as a series of
+documents), and name references from the nameref package may be incorporated
+with ease.  For large projects such as a series of books or a multi volume
+thesis, written as freestanding documents, a facility is provided to interface
+to the @code{xr} package for external document references.")
+    (license license:lppl)))
+
 (define-public texlive-relsize
   (package
-    (inherit (simple-texlive-package
-              "texlive-relsize"
-              (list "doc/latex/relsize/"
-                    "tex/latex/relsize/")
-              (base32
-               "07g9wqxsh3a9rmfbppaqhyic82a1i1habizaf4hpdi3246w6nnby")
-              #:trivial? #t))
+    (name "texlive-relsize")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/relsize/" "tex/latex/relsize/")
+             (base32
+              "07g9wqxsh3a9rmfbppaqhyic82a1i1habizaf4hpdi3246w6nnby")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/relsize")
     (synopsis "Set the font size relative to the current font size")
     (description
@@ -12990,38 +29144,96 @@ a number of @code{\\magsteps} to change size; from this are defined commands
 @code{\\larger}, @code{\\smaller}, @code{\\textlarger}, etc.")
     (license license:public-domain)))
 
+(define-public texlive-everypage
+  (package
+    (name "texlive-everypage")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/everypage/"
+                   "source/latex/everypage/"
+                   "tex/latex/everypage/")
+             (base32
+              "1kw7n7az823sc8gjrd4gjkkak1780yn76zswlnwapxmvl62pv9xk")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/everypage")
+    (synopsis "Provide hooks to be run on every page of a document")
+    (description
+     "The package provides hooks to perform actions on every page, or on the
+current page.  Specifically, actions are performed after the page is composed,
+but before it is shipped, so they can be used to prepare the output page in
+tasks like putting watermarks in the background, or in setting the next page
+layout, etc.")
+    (license license:lppl1.3c)))
+
 (define-public texlive-everysel
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-everysel"
-      (list "doc/latex/everysel/"
-            "source/latex/everysel/"
-            "tex/latex/everysel/")
-      (base32 "0skzm2qsk5vpjxgslclp4pvbbcrrnm1w3df8xfvfq252dyd7w8s5")
-      #:trivial? #t))
+    (name "texlive-everysel")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/everysel/" "source/latex/everysel/"
+                   "tex/latex/everysel/")
+             (base32
+              "0skzm2qsk5vpjxgslclp4pvbbcrrnm1w3df8xfvfq252dyd7w8s5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
     (home-page "https://ctan.org/pkg/everysel")
     (synopsis "Provides hooks into @code{\\selectfont}")
     (description
-     "The @code{everysel} package provided hooks whose arguments are executed just
-after LaTeX has loaded a new font by means of @code{\\selectfont}.  It has
-become obsolete with LaTeX versions 2021/01/05 or newer, since LaTeX now
+     "The @code{everysel} package provided hooks whose arguments are executed
+just after LaTeX has loaded a new font by means of @code{\\selectfont}.  It
+has become obsolete with LaTeX versions 2021/01/05 or newer, since LaTeX now
 provides its own hooks to fulfill this task.  For newer versions of LaTeX
 @code{everysel} only provides macros using LaTeX's hook management due to
-compatibility reasons.  See @code{lthooks-doc.pdf} for instructions how to use
-@code{lthooks} instead of @code{everysel}.")
+compatibility reasons.")
     (license license:lppl1.3c)))
 
 (define-public texlive-everyshi
   (package
-    (inherit
-     (simple-texlive-package
-      "texlive-everyshi"
-      (list "doc/latex/everyshi/"
-            "source/latex/everyshi/"
-            "tex/latex/everyshi/")
-      (base32 "11y6xazv1nk0m2hzsainjr8ijn5cff04xfccm6a65hzg7ipggraj")
-      #:trivial? #t))
+    (name "texlive-everyshi")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/everyshi/" "source/latex/everyshi/"
+                   "tex/latex/everyshi/")
+             (base32
+              "11y6xazv1nk0m2hzsainjr8ijn5cff04xfccm6a65hzg7ipggraj")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    ;; Building `texlive-everyshi' requires "latex" format, provided by
+    ;; `texlive-latex-bin'.  However, `texlive-everyshi' is also a propagated
+    ;; inputs from `texlive-latex-bin'.  To work around this cycle, build
+    ;; a temporary "latex.fmt" format file, and use it to build the package.
+    ;; At the end of the process, remove that temporary format file.
+    (arguments
+     (list
+      #:texlive-latex-bin? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'create-latex-format
+            (lambda* (#:key inputs #:allow-other-keys)
+              (apply (assoc-ref %standard-phases 'create-formats)
+                     (list #:inputs inputs #:create-formats '("latex")))))
+          (replace 'build
+            (lambda* (#:key inputs build-targets tex-engine #:allow-other-keys)
+              (apply (assoc-ref %standard-phases 'build)
+                     (list #:inputs inputs
+                           #:build-targets build-targets
+                           #:tex-engine tex-engine
+                           #:tex-format (string-append (getcwd)
+                                                       "/web2c/pdftex/latex")))))
+          (add-after 'build 'remove-latex-format
+            (lambda _
+              (delete-file-recursively "web2c"))))))
+    (native-inputs
+     (list texlive-l3kernel
+           texlive-l3packages
+           texlive-latex
+           texlive-latexconfig
+           texlive-tex-ini-files))
     (home-page "https://ctan.org/pkg/everyshi")
     (synopsis "Take action at every @code{\\shipout}")
     (description
@@ -13036,92 +29248,81 @@ loading @code{everyshi-2001-05-15}.")
     (license license:lppl1.3c)))
 
 (define-public texlive-abstract
-  (let ((template (simple-texlive-package
-                   "texlive-abstract"
-                   '("doc/latex/abstract/"
-                     "source/latex/abstract/"
-                     "tex/latex/abstract/")
-                   (base32
-                    "1axm78qgrpml09pkh252g1hsjx9c2w7mbdrm9rdl4yqh5ppwq4y9"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #f)
-          "latex/abstract")
-         ((#:build-targets _ #t)
-          #~(list "abstract.ins"))
-         ((#:phases std-phases)
-          #~(modify-phases #$std-phases
-              (add-after 'unpack 'chdir
-                (lambda args
-                  (chdir "source/latex/abstract")))
-              (add-before 'copy-files 'unchdir
-                (lambda args
-                  (chdir "../../..")))
-              (add-after 'copy-files 'remove-extra-files
-                (lambda args
-                  (delete-file-recursively
-                   (string-append #$output
-                                  "/share/texmf-dist"
-                                  "/source/latex/abstract/build"))))))))
-      (home-page "https://ctan.org/pkg/abstract")
-      (synopsis "Control the typesetting of the abstract environment")
-      (description "The abstract package gives you control over the typesetting
-of the abstract environment, and in particular provides for a one column
+  (package
+    (name "texlive-abstract")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/abstract/" "source/latex/abstract/"
+                   "tex/latex/abstract/")
+             (base32
+              "1axm78qgrpml09pkh252g1hsjx9c2w7mbdrm9rdl4yqh5ppwq4y9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/abstract")
+    (synopsis "Control the typesetting of the @code{abstract} environment")
+    (description
+     "The @code{abstract} package gives you control over the typesetting of
+the @code{abstract} environment, and in particular provides for a one column
 abstract in a two column paper.")
-      (license license:lppl))))
+    (license license:lppl)))
 
 (define-public texlive-breqn
-  (let ((template (simple-texlive-package
-                   "texlive-breqn"
-                   '("/doc/latex/breqn/"
-                     "/source/latex/breqn/")
-                   (base32
-                    "186cypxiyf30fq6dxvvlbwn5yx7c8d4cd243wvvb3243n5l4rpl3"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #f)
-          "latex/breqn")
-         ((#:build-targets _ #t)
-          #~(list "breqnbundle.ins"))
-         ((#:phases std-phases)
-          #~(modify-phases #$std-phases
-              (add-after 'unpack 'chdir
-                (lambda args
-                  (chdir "source/latex/breqn")))
-              (add-before 'copy-files 'unchdir
-                (lambda args
-                  (chdir "../../..")))
-              (add-after 'copy-files 'remove-extra-files
-                (lambda args
-                  (delete-file-recursively
-                   (string-append #$output
-                                  "/share/texmf-dist"
-                                  "/source/latex/breqn/build"))))))))
-      (home-page "https://wspr.io/breqn/")
-      (synopsis "Automatic line breaking of displayed equations")
-      (description "This package provides solutions to a number of common
-difficulties in writing displayed equations and getting high-quality output.
-The single most ambitious goal of the package is to support automatic
-linebreaking of displayed equations.  Such linebreaking cannot be done without
-substantial changes under the hood in the way formulae are processed; the code
-must be watched carefully, keeping an eye on possible glitches.  The bundle
-also contains the @code{flexisym} and @code{mathstyle} packages, which are
-both designated as support for @code{breqn}.")
-      (license license:lppl1.3+))))
+  (package
+    (name "texlive-breqn")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/breqn/" "source/latex/breqn/"
+                   "tex/latex/breqn/")
+             (base32
+              "03iyxwcr94f2y7ar7qin5nzjcvmamhblv5lxb97dg6r79mk4wr75")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/breqn")
+    (synopsis "Automatic line breaking of displayed equations")
+    (description
+     "This package provides solutions to a number of common difficulties in
+writing displayed equations and getting high-quality output.  The single most
+ambitious goal of the package is to support automatic linebreaking of
+displayed equations.  The bundle also contains the @code{flexisym} and
+@code{mathstyle} packages, which are both designated as support for
+@code{breqn}.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-breakurl
+  (package
+    (name "texlive-breakurl")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/breakurl/" "source/latex/breakurl/"
+                   "tex/latex/breakurl/")
+             (base32
+              "1lihfrihf1i300sddz09rsn6gj30g299warn88gli9hbrfy6nvw5")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/breakurl")
+    (synopsis "Line-breakable links in @code{hyperref} for dvips/ps2pdf")
+    (description
+     "This package provides a command much like @code{hyperref}'s @code{\\url}
+that typesets a URL using a typewriter-like font.  However, if the dvips
+driver is being used, the original @code{\\url} doesn't allow line breaks in
+the middle of the created link: the link comes in one atomic piece.  This
+package allows such line breaks in the generated links.")
+    (license license:lppl)))
 
 (define-public texlive-comment
   (package
-    (inherit (simple-texlive-package
-              "texlive-comment"
-              '("/doc/latex/comment/"
-                "/tex/latex/comment/")
-              (base32
-               "1c1mqziwxyf1bqzpw6ji65n7ypygm3lyknblxmf0c70w0ivw76pa")
-              #:trivial? #t))
+    (name "texlive-comment")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/comment/" "tex/latex/comment/")
+             (base32
+              "1c1mqziwxyf1bqzpw6ji65n7ypygm3lyknblxmf0c70w0ivw76pa")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/comment")
     (synopsis "Selectively include/exclude portions of text")
     (description "This package provides environments for selectively including
@@ -13130,127 +29331,126 @@ controlled comment versions.")
     (license license:gpl2+)))
 
 (define-public texlive-datatool
-  (let ((template (simple-texlive-package
-                   "texlive-datatool"
-                   '("/bibtex/bst/datatool/"
-                     "/doc/latex/datatool/"
-                     "/source/latex/datatool/")
-                   (base32
-                    "0hh2623zlwgq8zb2lv4d8yfaqwzrz54dqhc1xk0jd1k4fp281kl5"))))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #f)
-          "latex/datatool")
-         ((#:build-targets _ #t)
-          #~(list "datatool.ins"))
-         ((#:phases std-phases)
-          #~(modify-phases #$std-phases
-              (add-after 'unpack 'chdir
-                (lambda args
-                  (chdir "source/latex/datatool")))
-              (add-before 'copy-files 'unchdir
-                (lambda args
-                  (chdir "../../..")))
-              (add-after 'copy-files 'remove-extra-files
-                (lambda args
-                  (delete-file-recursively
-                   (string-append #$output
-                                  "/share/texmf-dist"
-                                  "/source/latex/datatool/build"))))))))
-      (home-page "https://ctan.org/pkg/datatool")
-      (synopsis "Tools to load and manipulate data")
-      (description "This package provides tools to create databases using LaTeX
-commands or by importing external files.  Databases may be sorted, filtered,
-and visualized using several kinds of configurable plots.  Particular support
-is provided for mail merging, indexing, creating glossaries, manipulating
+  (package
+    (name "texlive-datatool")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "bibtex/bst/datatool/" "doc/latex/datatool/"
+                   "source/latex/datatool/" "tex/latex/datatool/")
+             (base32
+              "13v6g3i9pch63159ibpn1r8dwl6ip4hm4cv4z0jx6nn3x8kds5ks")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (propagated-inputs
+     (list texlive-fp texlive-substr texlive-xfor texlive-xkeyval))
+    (home-page "https://ctan.org/pkg/datatool")
+    (synopsis "Tools to load and manipulate data")
+    (description
+     "This package provides tools to create databases using LaTeX commands
+or by importing external files.  Databases may be sorted, filtered, and
+visualized using several kinds of configurable plots.  Particular support is
+provided for mail merging, indexing, creating glossaries, manipulating
 bibliographies, and displaying personal pronouns.")
-      (license license:lppl1.3+))))
+    (license license:lppl1.3+)))
 
 (define-public texlive-physics
   (package
-    (inherit (simple-texlive-package
-              "texlive-physics"
-              '("/doc/latex/physics/"
-                "/tex/latex/physics/")
-              (base32
-               "1wy58wwcv1pv18xs1n71abnm73dqnxqijxvhfxk0rcmvbc6wvwrb")
-              #:trivial? #t))
+    (name "texlive-physics")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/physics/" "tex/latex/physics/")
+             (base32
+              "1wy58wwcv1pv18xs1n71abnm73dqnxqijxvhfxk0rcmvbc6wvwrb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/physics")
     (synopsis "Macros supporting the Mathematics of Physics")
-    (description "The package defines simple and flexible macros for
-typesetting equations in the languages of vector calculus and linear
-algebra, using Dirac notation.")
+    (description
+     "The package defines simple and flexible macros for typesetting equations
+in the languages of vector calculus and linear algebra, using Dirac
+notation.")
     (license license:lppl)))
 
 (define-public texlive-sourcesanspro
   (package
-    (inherit (simple-texlive-package
-              "texlive-sourcesanspro"
-              '("/doc/latex/sourcesanspro/"
-                "/fonts/enc/dvips/sourcesanspro/"
-                "/fonts/map/dvips/sourcesanspro/"
-                "/fonts/opentype/adobe/sourcesanspro/"
-                ;; ^ It would be tempting to use our
-                ;; font-adobe-source-sans-pro for these, but the version in
-                ;; texlive could differ from our version: probably the
-                ;; difference would be small, but debugging would not be fun.
-                ;; If the files are really identical, Guix will hard-link them
-                ;; anyway.
-                "/fonts/tfm/adobe/sourcesanspro/"
-                "/fonts/type1/adobe/sourcesanspro/"
-                "/fonts/vf/adobe/sourcesanspro/"
-                "/tex/latex/sourcesanspro/")
-              (base32
-               "18z7ln8dyh0sp6v0vdvc6qqxnpg3h3ix0f5magjcjbpay54kl0i3")
-              #:trivial? #t))
+    (name "texlive-sourcesanspro")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/sourcesanspro/"
+                   "fonts/enc/dvips/sourcesanspro/"
+                   "fonts/map/dvips/sourcesanspro/"
+                   "fonts/opentype/adobe/sourcesanspro/"
+                   ;; ^ It would be tempting to use our
+                   ;; font-adobe-source-sans-pro for these, but the version in
+                   ;; texlive could differ from our version: probably the
+                   ;; difference would be small, but debugging would not be
+                   ;; fun.  If the files are really identical, Guix will
+                   ;; hard-link them anyway.
+                   "fonts/tfm/adobe/sourcesanspro/"
+                   "fonts/type1/adobe/sourcesanspro/"
+                   "fonts/vf/adobe/sourcesanspro/"
+                   "tex/latex/sourcesanspro/")
+             (base32
+              "18z7ln8dyh0sp6v0vdvc6qqxnpg3h3ix0f5magjcjbpay54kl0i3")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/sourcesanspro")
     (synopsis "Use Source Sans Pro with TeX(-alike) systems")
-    (description "This package provides the Source Sans Pro font family from
-Adobe in both Adobe Type 1 and OpenType formats, plus macros supporting the
-use of the fonts in LaTeX (Type 1) and XeLaTeX/LuaLaTeX (OTF).")
+    (description
+     "This package provides the Source Sans Pro font family from Adobe in both
+Adobe Type 1 and OpenType formats, plus macros supporting the use of the fonts
+in LaTeX (Type 1) and XeLaTeX/LuaLaTeX (OTF).")
     (license (list license:lppl1.3+ license:silofl1.1))))
 
 (define-public texlive-sourceserifpro
   (package
-    (inherit (simple-texlive-package
-              "texlive-sourceserifpro"
-              '("/doc/latex/sourceserifpro/"
-                "/fonts/enc/dvips/sourceserifpro/"
-                "/fonts/map/dvips/sourceserifpro/"
-                "/fonts/opentype/adobe/sourceserifpro/"
-                ;; ^ see comment on texlive-sourcesanspro
-                "/fonts/tfm/adobe/sourceserifpro/"
-                "/fonts/type1/adobe/sourceserifpro/"
-                "/fonts/vf/adobe/sourceserifpro/"
-                "/tex/latex/sourceserifpro/")
-              (base32
-               "18xxncg8ybv86r46zq5mvgkrfnvlhx93n55fy8nkk8vdmminrh8w")
-              #:trivial? #t))
+    (name "texlive-sourceserifpro")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/sourceserifpro/"
+                   "fonts/enc/dvips/sourceserifpro/"
+                   "fonts/map/dvips/sourceserifpro/"
+                   "fonts/opentype/adobe/sourceserifpro/"
+                   ;; ^ See comment in `texlive-sourcesanspro'.
+                   "fonts/tfm/adobe/sourceserifpro/"
+                   "fonts/type1/adobe/sourceserifpro/"
+                   "fonts/vf/adobe/sourceserifpro/"
+                   "tex/latex/sourceserifpro/")
+             (base32
+              "18xxncg8ybv86r46zq5mvgkrfnvlhx93n55fy8nkk8vdmminrh8w")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/sourceserifpro")
     (synopsis "Use Source Serif Pro with TeX(-alike) systems")
-    (description "This package provides the Source Serif Pro font family from
-Adobe in both Adobe Type 1 and OpenType formats, plus macros supporting the
-use of the fonts in LaTeX (Type 1) and XeLaTeX/LuaLaTeX (OTF).")
+    (description
+     "This package provides the Source Serif Pro font family from Adobe in
+both Adobe Type 1 and OpenType formats, plus macros supporting the use of the
+fonts in LaTeX (Type 1) and XeLaTeX/LuaLaTeX (OTF).")
     (license (list license:lppl1.3+ license:silofl1.1))))
 
 (define-public texlive-sourcecodepro
   (package
-    (inherit (simple-texlive-package
-              "texlive-sourcecodepro"
-              '("/doc/latex/sourcecodepro/"
-                "/fonts/enc/dvips/sourcecodepro/"
-                "/fonts/map/dvips/sourcecodepro/"
-                "/fonts/opentype/adobe/sourcecodepro/"
-                ;; ^ see comment on texlive-sourcesanspro
-                "/fonts/tfm/adobe/sourcecodepro/"
-                "/fonts/type1/adobe/sourcecodepro/"
-                "/fonts/vf/adobe/sourcecodepro/"
-                "/tex/latex/sourcecodepro/")
-              (base32
-               "009v9y7d3vsljgq9nw5yx4kzyqavxbwrlvwhfjj83s6rmb9xcrmh")
-              #:trivial? #t))
+    (name "texlive-sourcecodepro")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/sourcecodepro/"
+                   "fonts/enc/dvips/sourcecodepro/"
+                   "fonts/map/dvips/sourcecodepro/"
+                   "fonts/opentype/adobe/sourcecodepro/"
+                   ;; ^ See comment in `texlive-sourcesanspro'.
+                   "fonts/tfm/adobe/sourcecodepro/"
+                   "fonts/type1/adobe/sourcecodepro/"
+                   "fonts/vf/adobe/sourcecodepro/"
+                   "tex/latex/sourcecodepro/")
+             (base32
+              "009v9y7d3vsljgq9nw5yx4kzyqavxbwrlvwhfjj83s6rmb9xcrmh")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/sourcecodepro")
     (synopsis "Use Source Code Pro with TeX(-alike) systems")
     (description "This package provides the Source Code Pro font family from
@@ -13258,324 +29458,277 @@ Adobe in both Adobe Type 1 and OpenType formats, plus macros supporting the
 use of the fonts in LaTeX (Type 1) and XeLaTeX/LuaLaTeX (OTF).")
     (license (list license:lppl1.3+ license:silofl1.1))))
 
-(define-public texlive-latex-hyphenat
+(define-public texlive-hyphenat
   (package
-    (inherit (simple-texlive-package
-              "texlive-latex-hyphenat"
-              (list "doc/latex/hyphenat/"
-                    "tex/latex/hyphenat/")
-              (base32 "0b3jx2yvryx95am0ll9h6yc99niw2lwgsbq7r89j84z2qyp2llsq")
-              #:trivial? #t))
+    (name "texlive-hyphenat")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/hyphenat/" "source/latex/hyphenat/"
+                   "tex/latex/hyphenat/")
+             (base32
+              "0gm7s7bidp9b4sfgylvwydban8jylfcskmqrf0sxlwxsqxqq5fy5")))
+    (outputs '("out" "doc"))
     (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/hyphenat")
-    (synopsis "Disable/enable hyphenation")
+    (synopsis "Disable/enable hypenation")
     (description
      "This package can disable all hyphenation or enable hyphenation of
 non-alphabetics or monospaced fonts.  The package can also enable hyphenation
-within ‘words’ that contain non-alphabetic characters (e.g., that include
-underscores), and hyphenation of text typeset in monospaced (e.g., cmtt)
-fonts.")
-    (license license:lppl1.3c+)))
+within words that contain non-alphabetic characters (e.g., that include
+underscores), and hyphenation of text typeset in monospaced (e.g.,
+@code{cmtt}) fonts.")
+    (license license:lppl1.3+)))
+
+(define-deprecated-package texlive-latex-hyphenat texlive-hyphenat)
 
 (define-public texlive-lastpage
-  (let ((template  (simple-texlive-package
-                    "texlive-lastpage"
-                    (list "doc/latex/lastpage/"
-                          "source/latex/lastpage/"
-                          "tex/latex/lastpage/")
-                    (base32
-                     "1cmzl0jkid4w60bjlyxrc5bynbc3lwq5nr77rsip0q9hprxykxks"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t) "latex/lastpage")
-         ((#:build-targets _ '()) '(list "lastpage.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _ (chdir "source/latex/lastpage/")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "https://ctan.org/pkg/lastpage")
-      (synopsis "Reference last page for Page N of M type footers")
-      (description
-       "This package enables referencing the number of pages in a LaTeX
-document through the introduction of a new label which can be referenced like
+  (package
+    (name "texlive-lastpage")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/lastpage/" "source/latex/lastpage/"
+                   "tex/latex/lastpage/")
+             (base32
+              "0rb8kmslmxxr41g9nxmk60m0w0f3428kci42xys21lq4jrdsdz0m")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/lastpage")
+    (synopsis "Reference last page for Page N of M type footers")
+    (description
+     "This package enables referencing the number of pages in a LaTeX document
+through the introduction of a new label which can be referenced like
 @code{\\pageref{LastPage}} to give a reference to the last page of a document.
 It is particularly useful in the page footer that says: @samp{Page N of M}.")
-      (license license:lppl1.3+))))
+    (license license:lppl1.3+)))
 
 (define-deprecated-package texlive-latex-lastpage texlive-lastpage)
 
-(define-public texlive-latex-tabto-ltx
+(define-public texlive-layaureo
   (package
-    (name "texlive-latex-tabto-ltx")
+    (name "texlive-layaureo")
     (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference (url (string-append
-                                        "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/tabto-ltx"))
-                                  (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1vq9s3n0mdgx2w84bjdsqxp3vcasfb824agjy56713902li1g8vm"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder (begin
-                   (use-modules (guix build utils))
-                   (let ((target (string-append (assoc-ref %outputs "out")
-                                  "/share/texmf-dist/tex/latex/tabto")))
-                     (mkdir-p target)
-                     (copy-recursively (assoc-ref %build-inputs "source")
-                                       target) #t))))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/layaureo/" "source/latex/layaureo/"
+                   "tex/latex/layaureo/")
+             (base32
+              "021dcqv8flqv665falbiq7ga56zpihzrdi6kc59nbk0l4jmxf1w9")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/layaureo")
+    (synopsis "Improve the A4 page layout")
+    (description
+     "This package produces a wide page layout for documents that use A4 paper
+size.  Moreover, LayAureo provides both a simple hook for leaving an empty
+space, which is required if pages are bundled by a press binding, and an
+option called @code{big} that forces typearea to become maximum.")
+    (license license:lppl)))
+
+(define-public texlive-tabto-ltx
+  (package
+    (name "texlive-tabto-ltx")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/tabto-ltx/" "tex/latex/tabto-ltx/")
+             (base32
+              "0q0v1pc4hvj71nayfpkj6gfwcbi18s5c526r1k7j4p9m5fcqmbgm")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
     (home-page "https://ctan.org/pkg/tabto-ltx")
-    (synopsis "``Tab'' to a measured position in the line")
+    (synopsis "Tab to a measured position in the line")
     (description
      "This package provides @code{\\tabto{<length>}}, which moves the
 typesetting position to @code{<length>} from the left margin of the paragraph.
-If the typesetting position is already further along, @code{\\tabto} starts a
-new line; the command @code{\\tabto*} will move position backwards if
+If the typesetting position is already further along, @code{\\tabto} starts
+a new line; the command @code{\\tabto*} will move position backwards if
 necessary, so that previous text may be overwritten.  In addition, the command
 @code{\\TabPositions} may be used to define a set of tabbing positions, after
 which the command @code{\\tab} advances typesetting position to the next
-defined ``tab stop''.")
+defined tab stop.")
     (license license:lppl1.3+)))
 
+(define-deprecated-package texlive-latex-tabto-ltx texlive-tabto-ltx)
+
 (define-public texlive-soul
-  (let ((template (simple-texlive-package
-                   "texlive-soul"
-                   (list "doc/generic/soul/"
-                         "source/generic/soul/"
-                         "tex/generic/soul/")
-                   (base32
-                    "0ikipdswzsafi4rr6q9xh3hkxk2n2683ym1879qcax41xs6cizdl"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t) "generic/soul")
-         ((#:build-targets _ '()) '(list "soul.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _ (chdir "source/generic/soul/")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (home-page "http://www.ctan.org/pkg/soul")
-      (synopsis "Hyphenation for letterspacing, underlining, and more")
-      (description
-       "@code{soul} enables hyphenatable spacing out (letterspacing),
+  (package
+    (name "texlive-soul")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/soul/" "source/generic/soul/"
+                   "tex/generic/soul/")
+             (base32
+              "1q6qd5fcqs9n49jxa77ildvdcdcqpw914m2xn9wggkp4d2kvxzh1")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/soul")
+    (synopsis "Hyphenation for letterspacing, underlining, and more")
+    (description
+     "The @code{soul} package enables hyphenatable spacing out (letterspacing),
 underlining, striking out, etc., using the TeX hyphenation algorithm to find
 the proper hyphens automatically.  The package also provides a mechanism that
 can be used to implement similar tasks, that have to treat text syllable by
-syllable.  The package itself does not support UTF-8 input in ordinary
-(PDF)LaTeX; some UTF-8 support is offered by package @code{soulutf8}.")
-      (license license:lppl))))
+syllable.  This version is a merge of the original @code{soul} package and the
+@code{soulutf8} package and supports also UTF-8.")
+    (license license:lppl)))
 
 (define-deprecated-package texlive-generic-soul texlive-soul)
-
-(define-public texlive-soulutf8
-  (let ((template (simple-texlive-package
-                   "texlive-soulutf8"
-                   (list "doc/latex/soulutf8/"
-                         "source/latex/soulutf8/"
-                         "tex/generic/soulutf8/")
-                   (base32
-                    "0d9lv3xsads8ms642ys3pghxnsa2hlzafkcx66d2hbq224bz1phc"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t) "generic/soulutf8")
-         ((#:build-targets _ '()) '(list "soulutf8.dtx"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _ (chdir "source/latex/soulutf8/")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (propagated-inputs
-       (list texlive-etexcmds
-             texlive-infwarerr
-             texlive-soul))
-      (home-page "https://ctan.org/pkg/soulutf8")
-      (synopsis "Permit use of UTF-8 characters in @code{soul}")
-      (description
-       "This package extends package @code{soul} and adds some support for
-UTF-8.  Namely the input encodings in @file{utf8.def} from package
-@code{inputenc} and @file{utf8x.def} from package @code{ucs} are supported.")
-      (license license:lppl1.3+))))
+(define-deprecated-package texlive-soulutf8 texlive-soul)
 
 (define-public texlive-xstring
-  (let ((template (simple-texlive-package
-                   "texlive-xstring"
-                   (list "/doc/generic/xstring/"
-                         "/tex/generic/xstring/")
-                   (base32
-                    "1azpq855kq1l4686bjp8haxim5c8wycz1b6lcg5q7x8kb4g9sppn")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (home-page "http://www.ctan.org/pkg/xstring")
-      (synopsis "String manipulation for (La)TeX")
-      (description
-       "@code{xstring} package provides macros for manipulating strings --
+  (package
+    (name "texlive-xstring")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/generic/xstring/" "tex/generic/xstring/")
+             (base32
+              "1sm84z6nlxipv10ydaww5yl4l2c31hznx3vzzqzaw1gi2yi2d6bb")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xstring")
+    (synopsis "String manipulation for (La)TeX")
+    (description
+     "The @code{xstring} package provides macros for manipulating strings, i.e.,
 testing a string's contents, extracting substrings, substitution of substrings
 and providing numbers such as string length, position of, or number of
-recurrences of, a substring.  The package works equally in Plain TeX and LaTeX
-(though e-TeX is always required).  The strings to be processed may contain
-(expandable) macros.")
-      (license license:lppl1.3c))))
+recurrences of, a substring.  The package works equally in Plain TeX and
+LaTeX (though e-TeX is always required).  The strings to be processed may
+contain (expandable) macros.")
+    (license license:lppl1.3c)))
 
 (define-deprecated texlive-generic-xstring texlive-xstring)
 
 (define-public texlive-substr
   (package
-    (inherit (simple-texlive-package
-              "texlive-substr"
-              (list "doc/latex/substr/"
-                    "tex/latex/substr/")
-              (base32
-               "0kfd4kq5yrg65f2mpric1cs1xr416wgj9bdixpibgjsdg5fb73sw")
-              #:trivial? #t))
-    (home-page "https://www.ctan.org/pkg/substr")
+    (name "texlive-substr")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/substr/" "tex/latex/substr/")
+             (base32
+              "0kfd4kq5yrg65f2mpric1cs1xr416wgj9bdixpibgjsdg5fb73sw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/substr")
     (synopsis "Deal with substrings in strings")
     (description
-     "The package provides commands to deal with substrings of strings.  Macros
-are provided to:
-
-@itemize
-@item determine if one string is a substring of another,
-@item return the parts of a string before or after a substring, and
-@item count the number of occurrences of a substring.
-@end itemize")
+     "The package provides commands to deal with substrings of strings.
+Macros are provided to determine if one string is a substring of another,
+return the parts of a string before or after a substring, and count the number
+of occurrences of a substring.")
     (license license:lppl1.0+)))
 
 (define-public texlive-totcount
-  (let ((template (simple-texlive-package
-                   "texlive-totcount"
-                   (list "doc/latex/totcount/"
-                         "source/latex/totcount/"
-                         "tex/latex/totcount/")
-                   (base32
-                    "1rj9ncip5h2cbdljjqwxqsg14pb4mimzhz290q872n32w7rxkp28"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (build-system texlive-build-system)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t) "latex/totcount")
-         ((#:tex-format _ #t) "latex")
-         ((#:build-targets _ '()) '(list "totcount.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _ (chdir "source/latex/totcount/")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (propagated-inputs
-       (list texlive-graphics))
-      (home-page "https://ctan.org/pkg/totcount")
-      (synopsis "Find the last value of a counter")
-      (description
-       "This package records the value that was last set, for any counter of
+  (package
+    (name "texlive-totcount")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/totcount/" "source/latex/totcount/"
+                   "tex/latex/totcount/")
+             (base32
+              "1rj9ncip5h2cbdljjqwxqsg14pb4mimzhz290q872n32w7rxkp28")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
+    (home-page "https://ctan.org/pkg/totcount")
+    (synopsis "Find the last value of a counter")
+    (description
+     "This package records the value that was last set, for any counter of
 interest.  Since most such counters are simply incremented when they are
 changed, the recorded value will usually be the maximum value.")
-      (license license:lppl1.3c+))))
+    (license license:lppl1.3c+)))
 
 (define-deprecated-package texlive-latex-totcount texlive-totcount)
 
 (define-public texlive-totpages
-  (let ((template (simple-texlive-package
-                   "texlive-totpages"
-                   (list "doc/latex/totpages/"
-                         "source/latex/totpages/"
-                         "tex/latex/totpages/")
-                   (base32
-                    "1mmya2fqdskyavw3hvdiygfyp9cll7bl4lpi7pl2jf9s7ds49j5a"))))
-    (package
-      (inherit template)
-      (outputs '("out" "doc"))
-      (build-system texlive-build-system)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:tex-directory _ #t) "latex/totpages")
-         ((#:tex-format _ #t) "latex")
-         ((#:build-targets _ '()) '(list "totpages.ins"))
-         ((#:phases phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'chdir
-                (lambda _ (chdir "source/latex/totpages/")))
-              (replace 'copy-files
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((origin (assoc-ref inputs "source"))
-                        (source (string-append #$output
-                                               "/share/texmf-dist/source"))
-                        (doc (string-append #$output:doc
-                                            "/share/texmf-dist/doc")))
-                    (copy-recursively (string-append origin "/source") source)
-                    (copy-recursively (string-append origin "/doc") doc))))))))
-      (native-inputs
-       (list (texlive-updmap.cfg)))
-      (propagated-inputs
-       (list texlive-everyshi texlive-graphics))
-      (home-page "https://ctan.org/pkg/totpages")
-      (synopsis "Count pages in a document, and report last page number")
-      (description
-       "The package counts the actual pages in the document (as opposed to
+  (package
+    (name "texlive-totpages")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/totpages/" "source/latex/totpages/"
+                   "tex/latex/totpages/")
+             (base32
+              "1mmya2fqdskyavw3hvdiygfyp9cll7bl4lpi7pl2jf9s7ds49j5a")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments (list #:tex-format "latex"))
+    (home-page "https://ctan.org/pkg/totpages")
+    (synopsis "Count pages in a document, and report last page number")
+    (description
+     "The package counts the actual pages in the document (as opposed to
 reporting the number of the last page, as does @code{lastpage}).  The counter
 itself may be shipped out to the DVI file.")
-      (license license:lppl))))
+    (license license:lppl)))
+
+(define-public texlive-xdvi
+  (package
+    (name "texlive-xdvi")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/man/man1/xdvi.1"
+                   "doc/man/man1/xdvi.man1.pdf" "dvips/xdvi/"
+                   "xdvi/")
+             (base32
+              "1iidl3876vyi9k2dyfwd73q5kb53kwckivfyvvxh953n4axbqmi4")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xdvi")
+    (synopsis "DVI previewer for the X Window System")
+    (description
+     "Xdvi is the canonical DVI previewer for use on Unix and other X-windows
+based systems.  The distribution has been integrated with that of Xdvik, so
+that it will build with web2c out of the box.")
+    ;; Xdvi is under MIT terms, whereas Xdvik extensions use BS2-2.
+    (license (list license:expat license:bsd-2))))
+
+(define-public texlive-xetexconfig
+  (package
+    (name "texlive-xetexconfig")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "tex/xelatex/xetexconfig/")
+             (base32
+              "1253njshiwdayzq0xir9cmbi8syhjb3sc4pyrw9p6kzyqvckkcxm")))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xetexconfig")
+    (synopsis "@file{crop.cfg} for XeLaTeX")
+    (description "The @file{crop.cfg} file attempts to persuade
+@file{crop.sty} to work with XeTeX.")
+    (license license:public-domain)))
 
 (define-public texlive-xetex
   (package
-    (inherit (simple-texlive-package
-              "texlive-xetex"
-              (list "/doc/man/man1/xetex.1"
-                    "/doc/man/man1/xelatex.1"
-                    "/doc/xetex/base/"
-                    "/fonts/misc/xetex/fontmapping/base/"
-                    "/tex/xelatex/xetexconfig/")
+    (name "texlive-xetex")
+    (version (number->string %texlive-revision))
+    (source  (texlive-origin
+              name version
+              (list "doc/man/man1/xelatex-unsafe.1"
+                    "doc/man/man1/xelatex-unsafe.man1.pdf"
+                    "doc/man/man1/xelatex.1"
+                    "doc/man/man1/xelatex.man1.pdf"
+                    "doc/man/man1/xetex-unsafe.1"
+                    "doc/man/man1/xetex-unsafe.man1.pdf"
+                    "doc/man/man1/xetex.1"
+                    "doc/man/man1/xetex.man1.pdf"
+                    "doc/xetex/base/"
+                    "fonts/misc/xetex/fontmapping/base/"
+                    "scripts/texlive-extra/xelatex-unsafe.sh"
+                    "scripts/texlive-extra/xetex-unsafe.sh")
               (base32
-               "0j396anlhk5pqrnwxr8bpq55sp3qfyb6n9g08x4nmaa6p9b9y8ab")
-              #:trivial? #t))
+               "1fc1b3pmzg6g80jnl7ixqbk79wd6frf477nvgxs1sf56vf9r3vjw")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list #:link-scripts #~(list "xelatex-unsafe.sh" "xetex-unsafe.sh")
+           #:create-formats #~(list "xelatex" "xetex")))
     (propagated-inputs
      (list texlive-atbegshi
            texlive-atveryend
@@ -13586,16 +29739,17 @@ itself may be shipped out to the DVI file.")
            texlive-everyshi
            texlive-firstaid
            texlive-hyphen-base
-           texlive-latex-base
-           texlive-fonts-latex
-           texlive-latex-l3backend
-           texlive-latex-l3kernel
-           texlive-latex-l3packages
+           texlive-l3backend
+           texlive-l3kernel
+           texlive-l3packages
+           texlive-latex
+           texlive-latex-fonts
            texlive-lm
+           texlive-plain
            texlive-tex-ini-files
-           texlive-tex-plain
-           texlive-unicode-data))
-    (home-page "https://www.tug.org/texlive/")
+           texlive-unicode-data
+           texlive-xetexconfig))
+    (home-page "https://ctan.org/pkg/xetex")
     (synopsis "Extended variant of TeX for use with Unicode sources")
     (description
      "XeTeX is a TeX typesetting engine using Unicode and supporting modern font
@@ -13608,6 +29762,29 @@ computers).  XeTeX's immediate output is an extended variant of DVI format,
 which is ordinarily processed by a tightly bound processor (called
 @code{xdvipdfmx}), that produces PDF.")
     (license license:x11)))
+
+(define-public texlive-xfor
+  (package
+    (name "texlive-xfor")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/latex/xfor/"
+                   "source/latex/xfor/"
+                   "tex/latex/xfor/")
+             (base32
+              "1j241j8sixqkaj2xmcvmrfwm1sdw6xdssnzml1bjs54rqzyh768a")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (home-page "https://ctan.org/pkg/xfor")
+    (synopsis "Reimplementation of the LaTeX @code{for-loop} macro")
+    (description
+     "The package redefines the LaTeX internal @code{\\@@for} macro so that
+the loop may be prematurely terminated.  The action is akin to the C/Java
+break statement, except that the loop does not terminate until the end of the
+current iteration.")
+    (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