gnu: r-maldiquant: Move to (gnu packages cran).
[jackhill/guix/guix.git] / gnu / packages / tex.scm
index 2f324ba..63b144c 100644 (file)
@@ -3,15 +3,17 @@
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2016, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
-;;; Copyright © 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Danny Milosavljevic <dannym+a@scratchpost.org>
-;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2018, 2020 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2020 Paul Garlick <pgarlick@tourbillion-technology.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
+  #:use-module (guix build-system python)
+  #:use-module (guix build-system qt)
   #:use-module (guix build-system trivial)
   #:use-module (guix build-system texlive)
   #:use-module (guix utils)
   #:use-module (gnu packages ruby)
   #:use-module (gnu packages shells)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages gawk)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xdisorg)
-  #:autoload   (gnu packages texinfo) (texinfo)
+  #:use-module (gnu packages texinfo)
   #:use-module (ice-9 ftw)
   #:use-module (ice-9 match)
   #:use-module ((srfi srfi-1) #:hide (zip)))
@@ -142,19 +146,17 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used."
                               "-checkout"))
     (sha256
      (base32
-      "1ix8h637hwhz4vrdhilf84kzzdza0wi8fp26nh7iws0bq08sl517"))))
+      "0lk7shx768sxvgr85y8bnmmnj8x4bbkgpxrz3z8jp8avi33prw83"))))
 
 (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)
-         ((#:modules _ '())
-          '((guix build gnu-build-system)
-            (guix build utils)
-            (ice-9 match)))
          ((#:phases phases)
           `(modify-phases ,phases
              (replace 'build
@@ -167,12 +169,8 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used."
                          (string-append root "/tex/generic/hyph-utf8/loadhyph"))
                         (ptex
                          (string-append root "/tex/generic/hyph-utf8/patterns/ptex"))
-                        (filter-expression
-                         (match ',code
-                           ((? string?)
-                            (format #f "\nlanguages.select!{|l| l.code == \"~a\"}\n" ',code))
-                           ((a b ...)
-                            (format #f "\nlanguages.select!{|l| [~{\"~a\",~}].include? l.code }\n" ',code)))))
+                        (quote
+                         (string-append root "/tex/generic/hyph-utf8/patterns/quote")))
                    (mkdir "scripts")
                    (copy-recursively
                     (assoc-ref inputs "hyph-utf8-scripts") "scripts")
@@ -181,74 +179,69 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used."
                    (mkdir-p patterns)
                    (mkdir-p loaders)
                    (mkdir-p ptex)
+                   (mkdir-p quote)
 
                    ;; Generate plain patterns
                    (with-directory-excursion "scripts"
-                     (substitute* "languages.rb"
-                       (("../../../tex/generic/") "../tex/generic/"))
+                     (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'") "")
-                       (("Unicode.upcase\\(ch\\)") "ch.upcase")
                        ;; Write directly to the output directory
-                       (("\\$path_root=File.*")
-                        (string-append "$path_root=\"" out "/share/texmf-dist/\"\n"))
-                       ;; Create quote directory when needed
-                       (("f = File.open\\(\"#\\{\\$path_quote\\}" m)
-                        (string-append "require 'fileutils'; FileUtils.mkdir_p $path_quote;" m))
-                       ;; Only generate patterns for this language.
-                       (("languages =.*" m)
-                        (string-append m filter-expression)))
+                       (("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"
-                       (("\\$path_tex_generic=File.*")
-                        (string-append "$path_tex_generic=\"" root "/tex/generic\"\n"))
-                       ;; Only generate loader for this language.
-                       (("languages =.*" m)
-                        (string-append m filter-expression)))
+                       (("File\\.join\\(PATH::LOADER")
+                        (string-append "File.join(\"" loaders "\"")))
+
                      (invoke "ruby" "generate-pattern-loaders.rb")
 
                      ;; Build ptex patterns
                      (substitute* "generate-ptex-patterns.rb"
-                       (("\\$path_root=File.*")
-                        (string-append "$path_root=\"" root "\"\n"))
-                       ;; Only generate ptex patterns for this language.
-                       (("languages =.*" m)
-                        (string-append m filter-expression)))
+                       (("File\\.join\\(PATH::PTEX")
+                        (string-append "File.join(\"" ptex "\"")))
                      (invoke "ruby" "generate-ptex-patterns.rb")))))))))
       (native-inputs
        `(("ruby" ,ruby)
+         ("ruby-hydra" ,ruby-hydra)
          ("hyph-utf8-scripts" ,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/2018/texlive-20180414-extra.tar.xz")
+    (uri "ftp://tug.org/historic/systems/texlive/2019/texlive-20190410-extra.tar.xz")
     (sha256 (base32
-             "0a83kymxc8zmlxjb0y1gf6mx7qnf0hxffwkivwh5yh138y2rfhsv"))))
+             "13ncf2an4nlqv18lki6y2p6pcsgs1i54zqkhfwprax5j53bk70j8"))))
 
 (define texlive-texmf-src
   (origin
     (method url-fetch)
-    (uri "ftp://tug.org/historic/systems/texlive/2018/texlive-20180414-texmf.tar.xz")
+    (uri "ftp://tug.org/historic/systems/texlive/2019/texlive-20190410-texmf.tar.xz")
     (sha256 (base32
-             "1b8zigzg8raxkhhzphcmynf84rbdbj2ym2qkz24v8n0qx82zmqms"))))
+             "00n4qh9fj8v9zzy3y488hpfq1g3dnnh72y4yjsaikfcqpi59gv62"))))
 
 (define-public texlive-bin
   (package
    (name "texlive-bin")
-   (version "20180414")
+   (version "20190410")
    (source
     (origin
       (method url-fetch)
-      (uri (string-append "ftp://tug.org/historic/systems/texlive/2018/"
+      (uri (string-append "ftp://tug.org/historic/systems/texlive/2019/"
                           "texlive-" version "-source.tar.xz"))
       (sha256
        (base32
-        "0khyi6h015r2zfqgg0a44a2j7vmr1cy42knw7jbss237yvakc07y"))
+        "1dfps39q6bdr1zsbp9p74mvalmy3bycihv19sb9c6kg30kprz8nj"))
       (patches
        (let ((arch-patch
               (lambda (name revision hash)
@@ -259,17 +252,46 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used."
                                       "&id=" revision))
                   (file-name (string-append "texlive-bin-" name))
                   (sha256 (base32 hash)))))
-             (arch-revision "e1975bce0b9d270d7c9773c5beb7e87d61ee8f57"))
-         (append (search-patches  "texlive-bin-CVE-2018-17407.patch"
-                                  "texlive-bin-luatex-poppler-compat.patch")
-                 (list
-                  (arch-patch "pdftex-poppler0.72.patch" arch-revision
-                              "0p46b6xxxg2s3hx67r0wpz16g3qygx65hpc581xs3jz5pvsiq3y7")
-                  (arch-patch "xetex-poppler-fixes.patch" arch-revision
-                              "1jj1p5zkjljb7id9pjv29cw0cf8mwrgrh4ackgzz9c200vaqpsvx")))))))
+             (arch-revision "49d7fe25e5ea63f136ebc20270c1d8fc9b00041c"))
+         (list
+          (arch-patch "pdftex-poppler0.76.patch" arch-revision
+                      "03vc88dz37mjjyaspzv0fik2fp5gp8qv82114869akd1dhszbaax")
+          (search-patch "texlive-bin-poppler-0.83.patch")
+          (arch-patch "texlive-poppler-0.84.patch" arch-revision
+                      "1ia6cr99krk4ipx4hdi2qdb98bh2h26mckjlpxdzrjnfhlnghksa")
+          (search-patch "texlive-bin-poppler-0.86.patch"))))
+      (modules '((guix build utils)
+                 (ice-9 ftw)))
+      (snippet
+       '(begin
+          (with-directory-excursion "libs"
+            (let ((preserved-directories '("." ".." "lua53" "luajit")))
+              ;; Delete bundled software, except Lua which cannot easily be
+              ;; used as an external dependency.
+              (for-each delete-file-recursively
+                        (scandir "."
+                                 (lambda (file)
+                                   (and (not (member file preserved-directories))
+                                        (eq? 'directory (stat:type (stat file)))))))))
+          ;; TODO: Unbundle stuff in texk/dvisvgm/dvisvgm-src/libs too.
+          #t))))
    (build-system gnu-build-system)
    (inputs
     `(("texlive-extra-src" ,texlive-extra-src)
+      ("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
+            "1cj04svl8bpfwjr4gqfcc04rmklz3aggrxvgj7q5bxrh7c7g18xh"))))
       ("cairo" ,cairo)
       ("fontconfig" ,fontconfig)
       ("fontforge" ,fontforge)
@@ -300,10 +322,8 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used."
    (arguments
     `(#:out-of-source? #t
       #:configure-flags
-       `("--disable-native-texlive-build"
-         ;; XXX: This is needed because recent Poppler requires C++11 or later.
-         ;; Remove after switch to GCC >= 6.
-         "CXXFLAGS=-std=gnu++11"
+       '("--disable-static"
+         "--disable-native-texlive-build"
          "--with-system-cairo"
          "--with-system-freetype2"
          "--with-system-gd"
@@ -345,11 +365,19 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used."
             #t))
         (add-after 'unpack 'use-code-for-new-poppler
           (lambda _
-            (copy-file "texk/web2c/pdftexdir/pdftoepdf-poppler0.72.0.cc"
+            (copy-file "texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc"
                        "texk/web2c/pdftexdir/pdftoepdf.cc")
-            (copy-file "texk/web2c/pdftexdir/pdftosrc-poppler0.72.0.cc"
+            (copy-file "texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc"
                        "texk/web2c/pdftexdir/pdftosrc.cc")
             #t))
+        (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")))
+            #t))
         (add-after 'unpack 'disable-failing-test
           (lambda _
             ;; FIXME: This test fails on 32-bit architectures since Glibc 2.28:
@@ -385,6 +413,13 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used."
                 (apply unpack (list #:source texlive-extra))
                 (apply patch-source-shebangs (list #:source texlive-extra))
                 (invoke "mv" "tlpkg" share))
+              (let ((scripts (string-append share "/texmf-dist/scripts/texlive/")))
+                (mkdir-p scripts)
+                (copy-recursively (assoc-ref inputs "texlive-scripts") scripts)
+                ;; Make sure that fmtutil can find its Perl modules.
+                (substitute* (string-append scripts "fmtutil.pl")
+                  (("\\$TEXMFROOT/") (string-append share "/"))))
+
               ;; texlua shebangs are not patched by the patch-source-shebangs
               ;; phase because the texlua executable does not exist at that
               ;; time.
@@ -412,6 +447,20 @@ This package contains the binaries.")
    (home-page "https://www.tug.org/texlive/")))
 
 \f
+(define texlive-docstrip
+  (package
+    (inherit (simple-texlive-package
+              "texlive-docstrip"
+              (list "/tex/latex/base/docstrip.tex")
+              (base32
+               "1f9sx1lp7v34zwm186msf03q2h28rrg0lh65z59zc0cvqffs6dvb")
+              #:trivial? #t))
+    (home-page "https://www.ctan.org/texlive")
+    (synopsis "Utility to strip documentation from TeX files.")
+    (description "This package provides the docstrip utility to strip
+documentation from TeX files.  It is part of the LaTeX base.")
+    (license license:lppl1.3+)))
+
 (define-public texlive-unicode-data
   (package
     (inherit (simple-texlive-package
@@ -419,7 +468,7 @@ This package contains the binaries.")
               (list "/tex/generic/unicode-data/"
                     "/doc/generic/unicode-data/")
               (base32
-               "1j63kz29arfiydb8r1a53q1r4zyk1yjbcq0w9i93zddczgqzgbfb")
+               "0zy4v9y667cka5fi4dnc6x500907812y7pcaf63s5qxi8l7khxxy")
               #:trivial? #t))
     (home-page "https://www.ctan.org/pkg/unicode-data")
     (synopsis "Unicode data and loaders for TeX")
@@ -452,7 +501,7 @@ out to date by @code{unicode-letters.tex}. ")
                     "/tex/generic/hyphen/hypht1.tex"
                     "/tex/generic/hyphen/zerohyph.tex")
               (base32
-               "002g5zhzbj3ikgg8zidagdp605ac9f4qmfl148mp0mbpz1svk0ni")
+               "0f19nml4hdx9lh7accqdk1b9ismwfm2523l5zsc4kb4arysgcakz")
               #:trivial? #t))
     (home-page "https://tug.org/texlive/")
     (synopsis "Core hyphenation support files")
@@ -462,26 +511,24 @@ the autogenerated files @file{language.dat} and @file{language.def} (and
 default versions of those), etc.")
     (license license:knuth)))
 
-;; TODO: This package should not exist.  There should not be a single package
-;; containing all of /dvips.  These really belong to different packages.
 (define-public texlive-dvips
   (package
     (inherit (simple-texlive-package
               "texlive-dvips"
-              (list "/fonts/map/dvips/"
+              (list "/doc/man/man1/afm2tfm.1"
+                    "/doc/man/man1/dvips.1"
+                    "/dvips/base/"
+                    "/dvips/config/"
                     "/fonts/enc/dvips/base/"
-                    "/dvips/")
+                    "/tex/generic/dvips/")
               (base32
-               "1di07wx8wjczddmagq5z082l2has3inzk5jwkqh4i6wv1qdfqpp6")
+               "1qr7h0ahycmz5wmpv54glfss9jqdmmyymj6kim626d1c8v9bmg86")
               #:trivial? #t))
     (home-page "https://www.ctan.org/pkg/dvips")
     (synopsis "DVI to PostScript drivers")
     (description "This package provides files needed for converting DVI files
 to PostScript.")
-    ;; Various free software licenses apply to individual files.
-    (license (list license:lppl1.3c+
-                   license:expat
-                   license:lgpl3+))))
+    (license license:lppl)))
 
 (define-public texlive-tex-ini-files
   (package
@@ -555,68 +602,108 @@ to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
 build fonts using the Metafont system.")
     (license license:knuth)))
 
-(define-public texlive-tex-fontinst-base
-  (package
-    (name "texlive-tex-fontinst-base")
-    (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/fontinst/base"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "12gnb8hc45p47pqn31msvi4mpr3wxbbbf2k4xhmshjqykwzlx508"))))
-    (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/fontinst/base")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (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
+(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/"
+
+                         "/scripts/texlive/fontinst.sh")
+                   (base32
+                    "0lprwib7n2ygfxvrw675vhif7ghyip2x6k70kqs9syp8lqxiizf8")
+                   #: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
+       `(("texlive-bin" ,texlive-bin)
+         ("texlive-docstrip" ,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+)))
+      (license license:lppl1.1+))))
+
+(define-public texlive-tex-fontinst-base
+  (deprecated-package "texlive-tex-fontinst-base" texlive-fontinst))
 
 (define-public texlive-fontname
   (package
-    (name "texlive-fontname")
-    (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/map/fontname"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "05rbn7z30xawd3n6w7c3ijp2yc67ga220jgqmkla9pd9wx185rzq"))))
-    (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/fonts/map/fontname")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
+    (inherit (simple-texlive-package
+              "texlive-fontname"
+              (list "/doc/fonts/fontname/fontname.texi"
+                    "/fonts/map/fontname/")
+              (base32
+               "0h5im5rnhycrrkd6z10f17m2caa8lv594wf482b68qjmnxfrqnxj")
+              #:trivial? #t))
     (home-page "https://www.ctan.org/pkg/fontname")
     (synopsis "Scheme for naming fonts in TeX")
     (description "This is Fontname, a naming scheme for (the base part of)
@@ -625,231 +712,134 @@ from (almost) arbitrarily complex font names, thus helping portability of TeX
 documents.")
     (license license:public-domain)))
 
-(define-public texlive-fonts-cm
-  (package
-    (inherit (simple-texlive-package
-              "texlive-fonts-cm"
-              (list "/fonts/source/public/cm/"
-                    "/fonts/map/dvips/cm/cmtext-bsr-interpolated.map"
-                    "/doc/fonts/cm/README"
-                    "/doc/fonts/cm/README-cmps.txt")
-              (base32
-               "1h0q71paqmg1xjg6k35ni2i6m93kmlq9rdwm913xg9n4qngywl18")))
-    (outputs '("out" "doc"))
-    (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-base")))
-               ;; 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))
-         (replace 'install
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out    (assoc-ref outputs "out"))
-                    (doc    (assoc-ref outputs "doc"))
-                    (source (assoc-ref inputs "source"))
-                    (fonts  (string-append out "/share/texmf-dist/fonts/"))
-                    (pk     (string-append fonts "pk"))
-                    (tfm    (string-append fonts "tfm/public/cm"))
-                    (mf     (string-append fonts "source/public/cm")))
-               (for-each (cut install-file <> tfm)
-                         (find-files "build" "\\.*"))
-               (for-each (cut install-file <> mf)
-                         (find-files "." "\\.mf"))
-               (copy-recursively "pk" pk)
-               (copy-recursively
-                (string-append source "/doc")
-                (string-append doc "/doc"))
-               (install-file
-                (string-append source "/fonts/map/dvips/cm/cmtext-bsr-interpolated.map")
-                (string-append fonts "/map/dvips/cm/cmtext-bsr-interpolated.map"))
-               #t))))))
-    (native-inputs
-     `(("texlive-bin" ,texlive-bin)
-       ("texlive-metafont-base" ,texlive-metafont-base)))
-    (home-page "https://www.ctan.org/pkg/cm")
-    (synopsis "Computer Modern fonts for TeX")
-    (description "This package provides the Computer Modern fonts by Donald
+(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
+                    "09mvl94qrwlb9b4pkigi151l256v3djhwl4m5lgvk6yhn5y75zrp")
+                   #: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-base")))
+                   ;; 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
+       `(("texlive-bin" ,texlive-bin)
+         ("texlive-metafont-base" ,texlive-metafont-base)))
+      (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)))
+      (license license:knuth))))
 
-(define-public texlive-fonts-cm-super
-  (package
-    (name "texlive-fonts-cm-super")
-    (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/cm-super"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0ybb4gi2rblzpb6wfzm2wk7dj3y2jnmkzsla7mz7g3zc12y4r2b9"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils)
-                  (ice-9 match))
-       #: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/cm-super")
-                       ("cm-super-afm"   . "fonts/afm/public/cm-super")
-                       ("cm-super-type1" . "fonts/type1/public/cm-super")
-                       ("cm-super-enc"   . "fonts/enc/dvips/cm-super")
-                       ("cm-super-map"   . "fonts/map/dvips/cm-super")
-                       ("cm-super-vtex"  . "fonts/map/vtex/cm-super"))))
-           (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))))
-    (native-inputs
-     `(("cm-super-vtex"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/map/vtex/cm-super"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-map-vtex-" version "-checkout"))
-           (sha256
-            (base32
-             "14c9allsgfv6za9wznz4cxqxwz5nsmj8rnwvxams8fhs5rvglxqi"))))
-       ("cm-super-afm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/afm/public/cm-super"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-afm-" version "-checkout"))
-           (sha256
-            (base32
-             "048ih65f2nghdabdar2p957c4s2spgllmy2gxdscddwqpnmd26yn"))))
-       ("cm-super-type1"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/type1/public/cm-super"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-type1-" version "-checkout"))
-           (sha256
-            (base32
-             "1140swk3w2ka0y4zdsq6pdifrdanb281q71p5gngbbjxdxjxf4qx"))))
-       ("cm-super-map"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/map/dvips/cm-super"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-map-" version "-checkout"))
-           (sha256
-            (base32
-             "10r6xqbwf9wk3ylg7givwyrw1952zydc6p7fw29zjf8ijl0lndim"))))
-       ("cm-super-enc"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/enc/dvips/cm-super"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-enc-" version "-checkout"))
-           (sha256
-            (base32
-             "1pgksy96gfgyjxfhs2k04bgg7nr7i128y01kjcahr7n38080h4ij"))))))
-    (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
+(define-public texlive-fonts-cm
+  (deprecated-package "texlive-fonts-cm" texlive-cm))
+
+(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,
 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-public texlive-fonts-lm
+(define-public texlive-fonts-cm-super
+  (deprecated-package "texlive-fonts-cm-super" texlive-cm-super))
+
+(define-public texlive-lm
   (package
-    (name "texlive-fonts-lm")
-    (version "2.004")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "http://www.gust.org.pl/projects/e-foundry/"
-                                  "latin-modern/download/lm" version "bas.zip"))
-              (sha256
-               (base32
-                "0z2s253y751m2ci5aw8nq0sf2kyg9hpimv2gyixkch9d07m2b9wp"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((root (string-append (assoc-ref %outputs "out")
-                                    "/share/texmf-dist/")))
-           (mkdir-p root)
-           (with-directory-excursion root
-             (invoke (string-append (assoc-ref %build-inputs "unzip")
-                                    "/bin/unzip")
-                     (assoc-ref %build-inputs "source")))
-           #t))))
-    (native-inputs
-     `(("unzip" ,unzip)))
+    (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
+               "0i1hwr8rp0jqyvs4qyplrirscd4w7lsgwsncyv3yzy80bsa56jq5")
+              #:trivial? #t))
     (home-page "http://www.gust.org.pl/projects/e-foundry/latin-modern/")
     (synopsis "Latin Modern family of fonts")
     (description "The Latin Modern fonts are derived from the famous Computer
@@ -860,6 +850,9 @@ Computers & Typesetting series.")
     ;; additional but not legally binding clause.
     (license license:lppl1.3c+)))
 
+(define-public texlive-fonts-lm
+  (deprecated-package "texlive-fonts-lm" texlive-lm))
+
 (define-public texlive-fonts-knuth-lib
   (package
     (name "texlive-fonts-knuth-lib")
@@ -962,7 +955,7 @@ fonts.")
                (setenv "MFINPUTS"
                        (string-append (getcwd) ":"
                                       mf "/share/texmf-dist/metafont/base:"
-                                      (assoc-ref inputs "texlive-fonts-cm")
+                                      (assoc-ref inputs "texlive-cm")
                                       "/share/texmf-dist/fonts/source/public/cm")))
              (mkdir "build")
              (for-each (lambda (font)
@@ -995,7 +988,7 @@ fonts.")
     (native-inputs
      `(("texlive-bin" ,texlive-bin)
        ("texlive-metafont-base" ,texlive-metafont-base)
-       ("texlive-fonts-cm" ,texlive-fonts-cm)))
+       ("texlive-cm" ,texlive-cm)))
     (home-page "https://www.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
@@ -1012,6 +1005,7 @@ symbol fonts.")
      (origin
        (method svn-fetch)
        (uri (texlive-ref "latex" "mflogo"))
+       (file-name (string-append name "-" version "-checkout"))
        (sha256
         (base32
          "15i2ib6nvhf31g1b92c6njf7n0g29znlq7hbfp9ii7qabhcwwvrj"))))
@@ -1025,67 +1019,17 @@ Knuthian mflogo fonts described in The Metafontbook and to typeset Metafont
 logos in LaTeX documents.")
     (license license:lppl)))
 
-(define-public texlive-fonts-mflogo-font
+(define-public texlive-mflogo-font
   (package
-    (name "texlive-fonts-mflogo-font")
-    (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/type1/hoekwater/mflogo-font"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "09fsxfpiyxjljkrb52b197728bjnkcnv3bdwm4hl6hf23mbmqadf"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils)
-                  (ice-9 match))
-       #:builder
-       (begin
-         (use-modules (guix build utils)
-                      (ice-9 match))
-         (let ((root (string-append (assoc-ref %outputs "out")
-                                    "/share/texmf-dist/"))
-               (pkgs '(("source"    . "fonts/type1/hoekwater/mflogo-font")
-                       ("afm"       . "fonts/afm/hoekwater/mflogo-font")
-                       ("fonts-map" . "fonts/map/dvips/mflogo-font"))))
-           (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))))
-    (native-inputs
-     `(("afm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/afm/hoekwater/mflogo-font"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-afm-" version "-checkout"))
-           (sha256
-            (base32
-             "0bx1mfhhzsk9gj1pha36q2rk0jd0y285qm62zgvdvzzzlfnk8sdb"))))
-       ("fonts-map"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/map/dvips/mflogo-font/"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-fonts-map-" version "-checkout"))
-           (sha256
-            (base32
-             "044xrrpl8hnvj55cx2ql1ib1bcyr33nzanx5nkwxpai7fb7pg4y6"))))))
+    (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
@@ -1096,198 +1040,144 @@ source; they have since been autotraced and reissued in Adobe Type 1 format by
 Taco Hoekwater.")
     (license license:knuth)))
 
-(define-public texlive-fonts-amsfonts
-  (package
-    (name "texlive-fonts-amsfonts")
-    (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/amsfonts"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "07h20rvpbdb4k72hzmjkyb29426zr9wxsfp6yd4ajbbpd3vx8grb"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (ice-9 match)
-                  (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-union"))
-                   (cwd (getcwd)))
-               ;; Make METAFONT reproducible
-               (setenv "SOURCE_DATE_EPOCH" "1")
-               ;; 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 cwd ":"
-                                      cwd "/cmextra:"
-                                      cwd "/cyrillic:"
-                                      cwd "/dummy:"
-                                      cwd "/symbols:"
-                                      mf "/share/texmf-dist/metafont/base:"
-                                      (assoc-ref inputs "texlive-fonts-cm")
-                                      "/share/texmf-dist/fonts/source/public/cm")))
-             (mkdir "build")
-             (for-each (lambda (font)
-                         (format #t "building font ~a\n" (basename font ".mf"))
-                         (with-directory-excursion (dirname font)
-                           (invoke "mf" "-progname=mf"
-                                   "-output-directory=../build"
-                                   (string-append "\\"
-                                                  "mode:=ljfour; "
-                                                  "mag:=1; "
-                                                  "nonstopmode; "
-                                                  "input "
-                                                  (getcwd) "/"
-                                                  (basename font ".mf")))))
-                       (find-files "." "[0-9]+\\.mf$"))
-
-             ;; There are no metafont sources for the Euler fonts, so we
-             ;; convert the afm files instead.
-             (mkdir "build/euler")
-             (for-each (lambda (font)
-                         (format #t "converting afm font ~a\n" (basename font ".afm"))
-                         (invoke "afm2tfm" font
-                                 (string-append "build/euler/"
-                                                (basename font ".tfm"))))
-                       (find-files (assoc-ref inputs "amsfonts-afm")
-                                   "\\.afm$"))
-
-             ;; Frustratingly, not all fonts can be created this way.  To
-             ;; generate eufm8.tfm, for example, we first scale down
-             ;; eufm10.afm to eufm8.pl, and then generate the tfm file from
-             ;; the pl file.
-             (with-directory-excursion "build/euler"
-               (setenv "TEXINPUTS"
-                       (string-append (getcwd) "//:"
-                                      (assoc-ref inputs "amsfonts-afm") "//:"
-                                      (assoc-ref inputs "texlive-union") "//"))
-               (for-each (match-lambda
-                           (((target-base target-size)
-                             (source-base source-size))
-                            (let ((factor (number->string
-                                           (truncate/ (* 1000 target-size)
-                                                      source-size))))
-                              (invoke "tex"
-                                      "-interaction=scrollmode"
-                                      (string-append "\\input fontinst.sty "
-                                                     "\\transformfont{" target-base "}"
-                                                     "{\\scalefont{" factor "}"
-                                                     "{\\fromafm{" source-base "}}} "
-                                                     "\\bye")))
-                            (invoke "pltotf"
-                                    (string-append target-base ".pl")
-                                    (string-append target-base ".tfm"))
-                            (delete-file (string-append target-base ".pl"))))
-
-                         '((("eufm8" 8) ("eufm10" 10))
-
-                           (("eufb6" 6) ("eufb7" 7))
-                           (("eufb8" 8) ("eufb10" 10))
-                           (("eufb9" 9) ("eufb10" 10))
-
-                           (("eufm6" 6) ("eufb7" 7))
-                           (("eufm9" 9) ("eufb10" 10))
-
-                           (("eurb6" 6) ("eurb7" 7))
-                           (("eurb8" 8) ("eurb10" 10))
-                           (("eurb9" 9) ("eurb10" 10))
-
-                           (("eurm6" 6) ("eurm7" 7))
-                           (("eurm8" 8) ("eurm10" 10))
-                           (("eurm9" 9) ("eurm10" 10)))))
-             #t))
-         (replace 'install
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out  (assoc-ref outputs "out"))
-                    (root (string-append out "/share/texmf-dist/fonts/"))
-                    (pkgs '(("amsfonts-afm"   . "afm/public/amsfonts")
-                            ("amsfonts-type1" . "type1/public/amsfonts")
-                            ("amsfonts-map"   . "map/dvips/amsfonts"))))
-               (for-each (match-lambda
-                           ((pkg . dir)
-                            (let ((target (string-append root dir)))
-                              (mkdir-p target)
-                              (copy-recursively (assoc-ref inputs pkg)
-                                                target))))
-                         pkgs)
-               (copy-recursively (assoc-ref inputs "amsfonts-plain")
-                                 (string-append out "/share/texmf-dist/tex/plain/amsfonts"))
-               (let* ((tfm (string-append root "tfm/public/amsfonts"))
-                      (mf  (string-append root "source/public/amsfonts")))
-                 (copy-recursively "build" tfm)
-                 (for-each (cut install-file <> mf)
-                           (find-files "." "\\.mf"))
-                 #t)))))))
-    (native-inputs
-     `(("texlive-union" ,(texlive-union (list texlive-tex-fontinst-base
-                                              texlive-fonts-cm
-                                              texlive-metafont-base)))
-       ("amsfonts-plain"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/tex/plain/amsfonts"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-plain-" version "-checkout"))
-           (sha256
-            (base32
-             "1hi8c9rkfb6395sxf7fhkr91xygfg8am1hqij9g3h2c7qx3714qp"))))
-       ("amsfonts-map"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/map/dvips/amsfonts"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-map-" version "-checkout"))
-           (sha256
-            (base32
-             "1lrj3bd9ybj4aawzlygc6qvakbrwc5s0mc5n9rpic331frv3axfs"))))
-       ("amsfonts-type1"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/type1/public/amsfonts"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-type1-" version "-checkout"))
-           (sha256
-            (base32
-             "1zfz33vn6gm19njy74n8wmn7sljrimfhwns5z8qqhxqfh1g4qip2"))))
-       ("amsfonts-afm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/afm/public/amsfonts"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-afm-" version "-checkout"))
-           (sha256
-            (base32
-             "1fifzkaihmjgchnk7dmw0c23k0cz999dxnc78ivmqvgi1dhx0iv8"))))))
-    (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,
+(define-public texlive-fonts-mflogo-font
+  (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/map/dvips/amsfonts/"
+                         "/tex/plain/amsfonts/"
+                         "/doc/fonts/amsfonts/")
+                   (base32
+                    "15q70nkjf8wqzbd5ivcdx3i2sdgqxjb38q0qn9a2qw9i0qcnx6zw"))))
+    (package
+      (inherit template)
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:build-targets _ #t)
+          '(list "amsfonts.ins"))
+         ((#:tex-directory _ #t)
+          "latex/amsfonts")
+         ((#:modules modules '())
+          `((guix build texlive-build-system)
+            (guix build utils)
+            (ice-9 match)
+            (srfi srfi-1)
+            (srfi srfi-26)))
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (add-before 'build 'build-fonts
+               (lambda* (#:key inputs #:allow-other-keys)
+                 (let ((mf  (assoc-ref inputs "texlive-union"))
+                       (src (string-append (getcwd) "/fonts/source/public/amsfonts/")))
+                   ;; Make METAFONT reproducible
+                   (setenv "SOURCE_DATE_EPOCH" "1")
+                   ;; 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 src ":"
+                                          src "/cmextra:"
+                                          src "/cyrillic:"
+                                          src "/dummy:"
+                                          src "/symbols:"
+                                          mf "/share/texmf-dist/metafont/base:"
+                                          (assoc-ref inputs "texlive-cm")
+                                          "/share/texmf-dist/fonts/source/public/cm")))
+                 (let ((build (string-append (getcwd) "/build-fonts")))
+                   (mkdir-p build)
+                   (with-directory-excursion "fonts/source/public/amsfonts"
+                     (for-each (lambda (font)
+                                 (format #t "building font ~a\n" (basename font ".mf"))
+                                 (with-directory-excursion (dirname font)
+                                   (invoke "mf" "-progname=mf"
+                                           (string-append "-output-directory=" build)
+                                           (string-append "\\"
+                                                          "mode:=ljfour; "
+                                                          "mag:=1; "
+                                                          "nonstopmode; "
+                                                          "input "
+                                                          (getcwd) "/"
+                                                          (basename font ".mf")))))
+                               (find-files "." "[0-9]+\\.mf$"))))
+
+                 ;; There are no metafont sources for the Euler fonts, so we
+                 ;; convert the afm files instead.
+                 (let ((build (string-append (getcwd) "/build-fonts/euler")))
+                   (mkdir build)
+                   (with-directory-excursion "fonts/afm/public/amsfonts/"
+                     (for-each (lambda (font)
+                                 (format #t "converting afm font ~a\n" (basename font ".afm"))
+                                 (invoke "afm2tfm" font
+                                         (string-append build "/"
+                                                        (basename font ".tfm"))))
+                               (find-files "." "\\.afm$")))
+
+                   ;; Frustratingly, not all fonts can be created this way.  To
+                   ;; generate eufm8.tfm, for example, we first scale down
+                   ;; eufm10.afm to eufm8.pl, and then generate the tfm file from
+                   ;; the pl file.
+                   (setenv "TEXINPUTS"
+                           (string-append build "//:"
+                                          (getcwd) "/fonts/afm/public/amsfonts//:"
+                                          (getcwd) "/source/latex/amsfonts//:"
+                                          (assoc-ref inputs "texlive-union") "//"))
+                   (with-directory-excursion build
+                     (for-each (match-lambda
+                                 (((target-base target-size)
+                                   (source-base source-size))
+                                  (let ((factor (number->string
+                                                 (truncate/ (* 1000 target-size)
+                                                            source-size))))
+                                    (invoke "tex"
+                                            "-interaction=scrollmode"
+                                            (string-append "\\input fontinst.sty "
+                                                           "\\transformfont{" target-base "}"
+                                                           "{\\scalefont{" factor "}"
+                                                           "{\\fromafm{" source-base "}}} "
+                                                           "\\bye")))
+                                  (invoke "pltotf"
+                                          (string-append target-base ".pl")
+                                          (string-append target-base ".tfm"))
+                                  (delete-file (string-append target-base ".pl"))))
+
+                               '((("eufm8" 8) ("eufm10" 10))
+
+                                 (("eufb6" 6) ("eufb7" 7))
+                                 (("eufb8" 8) ("eufb10" 10))
+                                 (("eufb9" 9) ("eufb10" 10))
+
+                                 (("eufm6" 6) ("eufb7" 7))
+                                 (("eufm9" 9) ("eufb10" 10))
+
+                                 (("eurb6" 6) ("eurb7" 7))
+                                 (("eurb8" 8) ("eurb10" 10))
+                                 (("eurb9" 9) ("eurb10" 10))
+
+                                 (("eurm6" 6) ("eurm7" 7))
+                                 (("eurm8" 8) ("eurm10" 10))
+                                 (("eurm9" 9) ("eurm10" 10))))))
+                 #t))
+             (add-after 'install 'install-generated-fonts
+               (lambda* (#:key inputs outputs #:allow-other-keys)
+                 (copy-recursively "build-fonts"
+                                   (string-append
+                                    (assoc-ref outputs "out")
+                                    "/share/texmf-dist/fonts/tfm/public/amsfonts"))
+                 #t))))))
+      (native-inputs
+       `(("texlive-union" ,(texlive-union (list texlive-tex-fontinst-base
+                                                texlive-cm
+                                                texlive-metafont-base)))))
+      (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
@@ -1297,31 +1187,13 @@ 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)))
+      (license license:silofl1.1))))
+
+(define-public texlive-fonts-amsfonts
+  (deprecated-package "texlive-fonts-amsfonts" texlive-amsfonts))
 
 (define-public texlive-latex-amsfonts
-  (package
-    (name "texlive-latex-amsfonts")
-    (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "amsfonts"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0slzfv5h2m03b2xvm2sasznz4azh6rgi069z161dja3l8rln79hm"))))
-    (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/amsfonts"))
-    (native-inputs
-     `(("texlive-fonts-cm" ,texlive-fonts-cm)
-       ("texlive-metafont-base" ,texlive-metafont-base)))
-    (home-page "https://www.ctan.org/pkg/amsfonts")
-    (synopsis "TeX fonts from the American Mathematical Society")
-    (description
-     "This package provides basic LaTeX support for the symbol fonts provides
-by the amsfonts package.  It provides @code{amsfonts.sty}, with names of
-individual symbols defined in @code{amssymb.sty}.")
-    (license license:silofl1.1)))
+  (deprecated-package "texlive-latex-amsfonts" texlive-amsfonts))
 
 (define-public texlive-mkpattern
   (package
@@ -1345,38 +1217,78 @@ output encodings, and features generation of clean UTF-8 patterns.")
 
 ;; 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-base")))
+                   ;; 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
+       `(("texlive-bin" ,texlive-bin)
+         ("texlive-metafont-base" ,texlive-metafont-base)
+         ("texlive-cm" ,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-tex-plain
   (package
-    (name "texlive-tex-plain")
-    (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/plain"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1xknlb3gcw6jjqh97bhghxi594bzpj1zfzzfsrr9pvr9s1bx7dnf"))))
-    (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/plain")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
+    (inherit (simple-texlive-package
+              "texlive-tex-plain"
+              (list "/tex/plain/")
+              (base32
+               "1m4qpaszwfv7j8a85rlwl7rs4iv5nlj67c1vvn6ysly72h9gjydb")
+              #:trivial? #t))
     (home-page "https://www.ctan.org/pkg/plain")
     (synopsis "Plain TeX format and supporting files")
     (description
-     "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).")
+     "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-public texlive-hyphen-afrikaans
@@ -1385,7 +1297,7 @@ book).")
               "texlive-hyphen-afrikaans" "af"
               (list "/tex/generic/hyph-utf8/patterns/tex/hyph-af.tex")
               (base32
-               "1vb3jccqnn1pm0680yqx52kvz595fmxnwa0cbf8qman6zglsssiw")))
+               "1k9k27a27bbrb0gz36191w32l2v6d3zbdh8zhrp4l3ild2pj3n4l")))
     (synopsis "Hyphenation patterns for Afrikaans")
     (description "The package provides hyphenation patterns for the Afrikaans
 language.")
@@ -1399,7 +1311,7 @@ language.")
                     "/tex/generic/hyphen/grahyph5.tex"
                     "/tex/generic/hyphen/ibyhyph.tex")
               (base32
-               "0kwrqsz7wdr1d9kylzwp60ka3wfbj8iad029k5h6y94nb86mf7zv")))
+               "01326lb6z0s8krcfgs8i1pnjfrm4gr33rc53gy80f63qbv4ssxrw")))
     (synopsis "Hyphenation patterns for ancient Greek")
     (description "The package provides hyphenation patterns for ancient
 Greek.")
@@ -1408,33 +1320,11 @@ Greek.")
 (define-public texlive-hyphen-armenian
   (let ((template (texlive-hyphen-package
                    "texlive-hyphen-armenian" "hy"
-                   (list "/source/generic/hyph-utf8/languages/hy/generate_patterns_hy.rb")
+                   (list "/tex/generic/hyph-utf8/patterns/tex/hyph-hy.tex")
                    (base32
-                    "0z666y580w1kpxssdanz67ykq257lf11a1mnp1jrn08zijvfrw9c"))))
+                    "0hzny0npynsb07syxrpbfa5pkpj8r0j51pj64yxyfl1c0bak1fwp"))))
     (package
       (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-before 'build 'build-patterns
-               (lambda _
-                 (let ((target (string-append (getcwd)
-                                              "/tex/generic/hyph-utf8/patterns/tex")))
-                   (mkdir-p target)
-                   (with-directory-excursion "source/generic/hyph-utf8/languages/hy/"
-                     (substitute* "generate_patterns_hy.rb"
-                       (("\\$file = File.new.*")
-                        (string-append "$file = File.new(\"" target
-                                       "/hyph-hy.tex\",\"w\")\n")))
-                     (invoke "ruby" "generate_patterns_hy.rb"))
-                   #t)))
-             (add-after 'install 'install-hyph-hy.tex
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (let* ((out (assoc-ref outputs "out"))
-                        (target (string-append out "/share/texmf-dist/tex")))
-                   (copy-recursively "tex" target)
-                   #t)))))))
       (synopsis "Hyphenation patterns for Armenian")
       (description "The package provides hyphenation patterns for the Armenian
 language.")
@@ -1444,39 +1334,17 @@ language.")
 (define-public texlive-hyphen-basque
   (let ((template (texlive-hyphen-package
                     "texlive-hyphen-basque" "eu"
-                    (list "/source/generic/hyph-utf8/languages/eu/generate_patterns_eu.rb")
+                    (list "/tex/generic/hyph-utf8/patterns/tex/hyph-eu.tex")
                     (base32
-                     "1yhsbzf1g9dm70jfixsz51hsfvn26cwfkfxvhg7xv2piynr4v51l"))))
+                     "15w969g1jqzn68l2b2lzf7iv7g3kil02aba3if6cag3qcnq92ra9"))))
     (package
       (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-before 'build 'build-patterns
-               (lambda _
-                 (let ((target (string-append (getcwd)
-                                              "/tex/generic/hyph-utf8/patterns/tex")))
-                   (mkdir-p target)
-                   (with-directory-excursion "source/generic/hyph-utf8/languages/eu/"
-                     (substitute* "generate_patterns_eu.rb"
-                       (("\\$file = File.new.*")
-                        (string-append "$file = File.new(\"" target
-                                       "/hyph-eu.tex\",\"w\")\n")))
-                     (invoke "ruby" "generate_patterns_eu.rb"))
-                   #t)))
-             (add-after 'install 'install-hyph-eu.tex
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (let* ((out (assoc-ref outputs "out"))
-                        (target (string-append out "/share/texmf-dist/tex")))
-                   (copy-recursively "tex" target)
-                   #t)))))))
       (synopsis "Hyphenation patterns for Basque")
       (description "The package provides hyphenation patterns for the Basque
 language.")
-      ;; "Free for any purpose".
+      ;; Similar to Unicode license.
       (license (license:fsf-free
-                "/source/generic/hyph-utf8/languages/eu/generate_patterns_eu.rb")))))
+                "/tex/generic/hyph-utf8/patterns/tex/hyph-eu.tex")))))
 
 (define-public texlive-hyphen-belarusian
   (package
@@ -1484,7 +1352,7 @@ language.")
               "texlive-hyphen-belarusian" "be"
               (list "/tex/generic/hyph-utf8/patterns/tex/hyph-be.tex")
               (base32
-               "1xvffph824rg43gi2xs3ny9gzlp708fyxj9zfhckmg8pzh9vv3n6")))
+               "0ppm12wndaxv9da62dwkbnk7w9nijikn6jkc97m76xis338g2h02")))
     (synopsis "Hyphenation patterns for Belarusian")
     (description "The package provides hyphenation patterns for the Belarusian
 language.")
@@ -1498,7 +1366,7 @@ language.")
                     "/doc/generic/hyph-utf8/bg/azbukaExtended.tex"
                     "/tex/generic/hyph-utf8/patterns/tex/hyph-bg.tex")
               (base32
-               "06dxkk9azsggbri04i6g62lswygzadsx3rpqvbyzvbxc5wxz1dj1")))
+               "0ngrgw2rmipxss76rgfk62x9nnsgwmaxxna2jqxxhybai3q39mx5")))
     (synopsis "Hyphenation patterns for Bulgarian")
     (description "The package provides hyphenation patterns for the Bulgarian
 language in T2A and UTF-8 encodings.")
@@ -1512,7 +1380,7 @@ language in T2A and UTF-8 encodings.")
               "texlive-hyphen-catalan" "ca"
               (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ca.tex")
               (base32
-               "0cisx76jpw8kpd3an37m9h8ppiysnizgfzl48y9d9n3fvx8jyykb")))
+               "10zzlfz5v8d9csg85ibpp2vfvmpqa56vbl85qy5gws099vygpayg")))
     (synopsis "Hyphenation patterns for Catalan")
     (description "The package provides hyphenation patterns for Catalan in
 T1/EC and UTF-8 encodings.")
@@ -1524,7 +1392,7 @@ T1/EC and UTF-8 encodings.")
               "texlive-hyphen-chinese" "zh-latn-pinyin"
               (list "/tex/generic/hyph-utf8/patterns/tex/hyph-zh-latn-pinyin.tex")
               (base32
-               "07gbrn5fcl5d3hyg1zpai3zp1ggl73cmvpalwvh7ah313f57gjkk")))
+               "1j68mry2zy91m1kbzwhin5q2jajf6xh48npdds8wvp1sqmzih2a3")))
     (synopsis "Hyphenation patterns for unaccented Chinese pinyin")
     (description "The package provides hyphenation patterns for unaccented
 Chinese pinyin T1/EC and UTF-8 encodings.")
@@ -1536,7 +1404,7 @@ Chinese pinyin T1/EC and UTF-8 encodings.")
               "texlive-hyphen-churchslavonic" "cu"
               (list "/tex/generic/hyph-utf8/patterns/tex/hyph-cu.tex")
               (base32
-               "0xkqlz3ixyl4fxsnzrbxqrb82p0n67rhgpddbiyv3qwfnbr2b5a4")))
+               "0fhbwaapq2213msbhgr0d1lw06ihmrqirxj092mn73d8ynl13qlh")))
     (synopsis "Hyphenation patterns for Church Slavonic")
     (description "The package provides hyphenation patterns for Church
 Slavonic in UTF-8 encoding.")
@@ -1549,7 +1417,7 @@ Slavonic in UTF-8 encoding.")
               (list "/tex/generic/hyph-utf8/patterns/tex-8bit/copthyph.tex"
                     "/tex/generic/hyph-utf8/patterns/tex/hyph-cop.tex")
               (base32
-               "07i03jpdfy4ip7zbg4gnk4hk8zwj8rlni9dgrb1p8mfw2w19d80c")))
+               "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.")
@@ -1562,7 +1430,7 @@ UTF-8 encoding as well as in ASCII-based encoding for 8-bit engines.")
               "texlive-hyphen-croatian" "hr"
               (list "/tex/generic/hyph-utf8/patterns/tex/hyph-hr.tex")
               (base32
-               "129nz2nqilyq2477n2clx20xfbxh1qxm69zg4n2f6c4d4a8711nc")))
+               "12n9r2winai15jc622sqdwclgcs1s68r6vcf7ic8vvq0x9qhwc5v")))
     (synopsis "Hyphenation patterns for Croatian")
     (description "The package provides hyphenation patterns for Croatian in
 T1/EC and UTF-8 encodings.")
@@ -1574,7 +1442,7 @@ T1/EC and UTF-8 encodings.")
               "texlive-hyphen-czech" "cs"
               (list "/tex/generic/hyph-utf8/patterns/tex/hyph-cs.tex")
               (base32
-               "1k5516gbfp1d5p97j247byag9sdgds5zwc11bwxfk58i6zq1v0m6")))
+               "1q37s6p8yfyi3rp1azbz421lg4lr4aiki8m631i4x9rmps89m8iq")))
     (synopsis "Hyphenation patterns for Czech")
     (description "The package provides hyphenation patterns for Czech in T1/EC
 and UTF-8 encodings.")
@@ -1586,7 +1454,7 @@ and UTF-8 encodings.")
               "texlive-hyphen-danish" "da"
               (list "/tex/generic/hyph-utf8/patterns/tex/hyph-da.tex")
               (base32
-               "0zxzs1b1723mav76i0wiyq4w82x8715cykvwa2bc60ldc2amv0vs")))
+               "1vj8nip64rzcrcg3skm4vqad1ggqwgan74znrdns610wjcm1z9qd")))
     (synopsis "Hyphenation patterns for Danish")
     (description "The package provides hyphenation patterns for Danish in
 T1/EC and UTF-8 encodings.")
@@ -1599,7 +1467,7 @@ T1/EC and UTF-8 encodings.")
               "texlive-hyphen-dutch" "nl"
               (list "/tex/generic/hyph-utf8/patterns/tex/hyph-nl.tex")
               (base32
-               "0cq46cmgjc4y2x0xs9b0a5zca3jmszv4rkzmrhgjb5z2nm3xkrpi")))
+               "1bg9g790ksq5cn8qihai6pacmkp9vpf35h4771z361nvwa40l8yk")))
     (synopsis "Hyphenation patterns for Dutch")
     (description "The package provides hyphenation patterns for Dutch in T1/EC
 and UTF-8 encodings.")
@@ -1612,7 +1480,7 @@ and UTF-8 encodings.")
               (list "/tex/generic/hyph-utf8/patterns/tex/hyph-en-gb.tex"
                     "/tex/generic/hyph-utf8/patterns/tex/hyph-en-us.tex")
               (base32
-               "08hyih8hn2w2q12gc4zygz0ckbz00mkzzn9898z2bicky02zg3kc")))
+               "08b3jihjaamcl1pvffi0s47nwavkm66l9mrrmby3l32dfpkprrc5")))
     (synopsis "Hyphenation patterns for American and British English")
     (description "The package provides additional hyphenation patterns for
 American and British English in ASCII encoding.")
@@ -1620,73 +1488,674 @@ American and British English in ASCII encoding.")
               "file:///tex/generic/hyph-utf8/patterns/tex/hyph-en-us.tex"
               "FSF all permissive license"))))
 
-(define-public texlive-hyph-utf8
+(define-public texlive-hyphen-esperanto
   (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"
+    (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+)))
 
-                    ;; 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")
+(define-public texlive-hyphen-estonian
+  (package
+    (inherit (texlive-hyphen-package
+              "texlive-hyphen-estonian" "et"
+              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-et.tex")
               (base32
-               "10y8svgk68sivmgzrv8gv137r7kv49cs256cq2wja9ms437pxvbj")))
-    (outputs '("out" "doc"))
-    (build-system gnu-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/"))
+               "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))))
 
-             ;; 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"))
+(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))))
 
-             ;; Find required fonts for building tex.fmt
-             (setenv "TFMFONTS"
-                     (string-append (assoc-ref inputs "texlive-fonts-cm")
-                                    "/share/texmf-dist/fonts/tfm/public/cm:"
-                                    (assoc-ref inputs "texlive-fonts-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)
-                       "//:")))
+(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
+               "1f72b4ydb4zddvw2i004948khmwzigxkdkwfym5v1kkq0183sfpj")))
+    (synopsis "Hyphenation patterns for Finnish")
+    (description "The package provides hyphenation patterns for Finnish in
+T1/EC and UTF-8 encodings.")
+    (license license:public-domain)))
+
+(define-public texlive-hyphen-french
+  (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.")
+    (license license:expat)))
+
+(define-public texlive-hyphen-friulan
+  (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))))
+
+(define-public texlive-hyphen-georgian
+  (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
+               "0wp5by5kkf4ac6li5mbppqzw11500wa7f22p5vpz3m1kwd15zavw")))
+    (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.")
+    (license license:lppl)))
+
+(define-public texlive-hyphen-hungarian
+  (package
+    (inherit (texlive-hyphen-package
+              "texlive-hyphen-hungarian" "hu"
+              (list "/doc/generic/huhyphen/"
+                    "/doc/generic/hyph-utf8/hu/"
+                    "/tex/generic/hyph-utf8/patterns/tex/hyph-hu.tex")
+              (base32
+               "1j1b8kksg9r8nmjyjvvz8fr3hgcrjj6jlybf9p06nwrrwm2r8j8f")))
+    (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+)))
+
+(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.")
+    (license license:expat)))
+
+(define-public texlive-hyphen-indonesian
+  (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)))
+
+(define-public texlive-hyphen-interlingua
+  (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.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-hyphen-irish
+  (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).")
+    (license license:lppl1.3+)))
+
+(define-public texlive-hyphen-kurmanji
+  (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)))
+
+(define-public texlive-hyphen-latin
+  (package
+    (inherit (texlive-hyphen-package
+              "texlive-hyphen-latin" '("la-x-classic" "la-x-liturgic" "la")
+              (list "/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")
+              (base32
+               "0rxg8a4s5cpj8vlkz5a74a036axda5jqgvr3f9aj2cc2x9f2f3w9")))
+    (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.
+    (license license:lppl)))
+
+(define-public texlive-hyphen-mongolian
+  (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"))))
+
+(define-public texlive-hyphen-occitan
+  (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.")
+    (license license:lppl1.0+)))
+
+(define-public texlive-hyphen-pali
+  (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.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-hyphen-polish
+  (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.
+    (license license:lppl)))
+
+(define-public texlive-hyphen-portuguese
+  (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)))
+
+(define-public texlive-hyphen-romanian
+  (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.
+    (license license:lppl)))
+
+(define-public texlive-hyphen-romansh
+  (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).")
+    (license license:lppl1.3+)))
+
+(define-public texlive-hyphen-russian
+  (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.")
+    (license license:lppl1.2+)))
+
+(define-public texlive-hyphen-sanskrit
+  (package
+    (inherit (texlive-hyphen-package
+              "texlive-hyphen-sanskrit" "sa"
+              (list "/doc/generic/hyph-utf8/sa/hyphenmin.txt"
+                    "/tex/generic/hyph-utf8/patterns/tex/hyph-sa.tex")
+              (base32
+               "0gi2qk0wf388h9n25gzhv0cdz67ph83wal8h3iz2sqnpdjsw8kpc")))
+    (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"))))
+
+(define-public texlive-hyphen-serbian
+  (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.
+    (license license:gpl3+)))
+
+(define-public texlive-hyphen-slovak
+  (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.")
+    (license license:gpl2+)))
+
+(define-public texlive-hyphen-slovenian
+  (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
+               "1h3yg9vcq0lf7hxv0ahkqmyg269dxjs8m2mz8sgz5l1fxmvahvaj")))
+    (synopsis "Hyphenation patterns for Spanish")
+    (description "The package provides hyphenation patterns for Spanish in
+T1/EC and UTF-8 encodings.")
+    (license license:expat)))
+
+(define-public texlive-hyphen-swedish
+  (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+)))
+
+(define-public texlive-hyphen-thai
+  (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))))
+
+(define-public texlive-hyphen-ukrainian
+  (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
+    (license license:lppl)))
+
+(define-public texlive-hyphen-uppersorbian
+  (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+)))
+
+(define-public texlive-hyphen-welsh
+  (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
+               "1bar5mc808ch20anhqrdxcwiych359qsvr7mggxpg2l2kq5xdyq0")))
+    (outputs '("out" "doc"))
+    (build-system gnu-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-fonts-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"))
@@ -1731,7 +2200,7 @@ American and British English in ASCII encoding.")
        ;; The following packages are needed for build "tex.fmt", which we need
        ;; for a working "tex".
        ("texlive-tex-plain" ,texlive-tex-plain)
-       ("texlive-fonts-cm" ,texlive-fonts-cm)
+       ("texlive-cm" ,texlive-cm)
        ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib)
        ("texlive-hyphen-base" ,texlive-hyphen-base)))
     (home-page "https://ctan.org/pkg/hyph-utf8")
@@ -1775,7 +2244,7 @@ converters, will completely supplant the older patterns.")
               (list "/tex/generic/dehyph-exptl/"
                     "/doc/generic/dehyph-exptl/")
               (base32
-               "1w2danvvy2f52hcb4acvjks53kcanwxr9s990fap6mj279hpgmh2")
+               "1fnqc63gz8gvdyfz45bx8dxn1r1rwrypahs3bqd2vlc8ff76xp86")
               #:trivial? #t))
     (propagated-inputs
      `(("texlive-hyphen-base" ,texlive-hyphen-base)
@@ -1790,182 +2259,329 @@ bundle.")
     ;; under LPPL.
     (license (list license:expat license:lppl))))
 
-(define-public texlive-generic-dehyph-exptl
-  (deprecated-package "texlive-generic-dehyph-exptl" texlive-dehyph-exptl))
+(define-public texlive-generic-dehyph-exptl
+  (deprecated-package "texlive-generic-dehyph-exptl" texlive-dehyph-exptl))
+
+(define-public texlive-ukrhyph
+  (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
+       `(("coreutils" ,coreutils)
+         ("gawk" ,gawk)
+         ("sed" ,sed)
+         ("grep" ,grep)
+         ("perl" ,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))))
+
+(define-public texlive-kpathsea
+  (package
+    (inherit (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
+               "191i8n3g46p53bb9dkx2ggwpzy7skgg0pbklsrpx8x4ayd86wcaf")
+              #:trivial? #t))
+    (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+)))
+
+(define-public texlive-latexconfig
+  (package
+    (inherit (simple-texlive-package
+              "texlive-latexconfig"
+              (list "/tex/latex/latexconfig/")
+              (base32
+               "1wa7yhdpnz1nyidwgli68fyr33jn951bnniqrih5lj98k09rqc3h")
+              #:trivial? #t))
+    (home-page "https://www.tug.org/")
+    (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 ((texlive-dir
-         (lambda (dir hash)
-           (origin
-             (method svn-fetch)
-             (uri (svn-reference
-                   (url (string-append "svn://www.tug.org/texlive/tags/"
-                                       %texlive-tag "/Master/texmf-dist/"
-                                       dir))
-                   (revision %texlive-revision)))
-             (file-name (string-append "texlive-generic-"
-                                       (last (string-split
-                                               (string-drop-right dir 1) #\/))
-                                       "-" (number->string %texlive-revision)
-                                       "-checkout"))
-             (sha256 (base32 hash))))))
+  (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
+                    "0m0gjb4hbsf2iqkkx3px4f28r2scjvsjv4zb2whkbnb44apyw1f0")
+                   #:trivial? #t)))
     (package
-      (name "texlive-latex-base")
-      (version (number->string %texlive-revision))
-      (source (origin
-                (method svn-fetch)
-                (uri (texlive-ref "latex" "base"))
-                (file-name (string-append name "-" version "-checkout"))
-                (sha256
-                 (base32
-                  "17bqrzzjz16k52sc7ydl4vw7ddy2z3g0p1xsk2c35h1ynq9h3wwm"))))
-      (build-system gnu-build-system)
+      (inherit template)
       (arguments
-       `(#:modules ((guix build gnu-build-system)
-                    (guix build utils)
-                    (ice-9 match)
-                    (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)
-               ;; Find required fonts
-               (setenv "TFMFONTS"
-                       (string-append (assoc-ref inputs "texlive-fonts-cm")
-                                      "/share/texmf-dist/fonts/tfm/public/cm:"
-                                      (assoc-ref inputs "texlive-fonts-latex")
-                                      "/share/texmf-dist/fonts/tfm/public/latex-fonts:"
-                                      (assoc-ref inputs "texlive-fonts-knuth-lib")
-                                      "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
-               (setenv "TEXINPUTS"
-                       (string-append
-                        (getcwd) ":"
-                        (getcwd) "/build:"
-                        (string-join
-                         (map (match-lambda ((_ . dir) dir)) inputs)
-                         "//:")))
-
-               ;; Create an empty texsys.cfg, because latex.ltx wants to include
-               ;; it.  This file must exist and it's fine if it's empty.
-               (with-output-to-file "texsys.cfg"
-                 (lambda _ (format #t "%")))
-
-               (mkdir "build")
-               (mkdir "web2c")
-               (invoke "luatex" "-ini" "-interaction=batchmode"
-                       "-output-directory=build" "unpack.ins")
-               (invoke "tex" "-ini" "-interaction=batchmode"
-                       "-output-directory=web2c" "tex.ini")
-               ;; LaTeX, pdfetex/pdftex, and XeTeX require e-TeX, which
-               ;; is enabled only in extended mode (activated with a
-               ;; leading asterisk).  We should not use luatex here,
-               ;; because that would make the generated format files
-               ;; incompatible with any other TeX engine.
-               (for-each (lambda (format)
-                           (invoke "latex" "-ini" "-interaction=batchmode"
-                                   "-output-directory=web2c"
-                                   "-translate-file=cp227.tcx"
-                                   (string-append "*" format ".ini")))
-                         '("latex"
-                           "pdflatex"
-                           "pdfetex"))
-               (for-each (lambda (format)
-                           (invoke format "-ini" "-interaction=batchmode"
-                                   "-output-directory=web2c"
-                                   (string-append "*" format ".ini")))
-                         '("xetex"
-                           "xelatex"))
-               (for-each (lambda (format)
-                           (invoke "luatex" "-ini" "-interaction=batchmode"
-                                   "-output-directory=web2c"
-                                   (string-append format ".ini")))
-                         '("dviluatex" "dvilualatex" "luatex" "lualatex"))
-               #t))
-           (replace 'install
-             (lambda* (#:key inputs outputs #:allow-other-keys)
-               (let* ((out (assoc-ref outputs "out"))
-                      (target (string-append
-                               out "/share/texmf-dist/tex/latex/base"))
-                      (web2c (string-append
-                              out "/share/texmf-dist/web2c"))
-                      (support-files (assoc-ref inputs "texlive-latex-base-support-files")))
-                 (mkdir-p target)
-                 (mkdir-p web2c)
-                 (for-each delete-file (find-files "." "\\.(log|aux)$"))
-                 (for-each (cut install-file <> target)
-                           (find-files "build" ".*"))
-                 (for-each (cut install-file <> web2c)
-                           (find-files "web2c" ".*"))
-                 ;; pdftex is really just the same as pdfetex, but since it
-                 ;; doesn't have its own format file, we need to copy it.
-                 (copy-file "web2c/pdfetex.fmt"
-                            (string-append web2c "/pdftex.fmt"))
-                 ;; "source" is missing the support files as per doc/latex/base/manifest.txt.
-                 ;; FIXME: We are probably not packaging this right.
-                 (for-each (lambda (file)
-                             (install-file
-                              (string-append support-files "/" file)
-                              target))
-                           '("ltxguide.cls" "ltnews.cls" "minimal.cls" "idx.tex"
-                             "lablst.tex" "testpage.tex" "ltxcheck.tex"))
-                 ;; Install configurations
-                 (copy-recursively
-                  (assoc-ref inputs "texlive-latex-latexconfig")
-                  (string-append out "/share/texmf-dist/tex/latex/latexconfig"))
-                 (copy-recursively
-                  (assoc-ref inputs "texlive-generic-config")
-                  (string-append out "/share/texmf-dist/tex/generic/config"))
-                 (copy-recursively
-                  (assoc-ref inputs "texlive-generic-hyphen")
-                  (string-append out "/share/texmf-dist/tex/generic/hyphen"))
-                 (copy-recursively
-                  (assoc-ref inputs "texlive-generic-ruhyphen")
-                  (string-append out "/share/texmf-dist/tex/generic/ruhyphen"))
-                 (copy-recursively
-                  (assoc-ref inputs "texlive-generic-ukrhyph")
-                  (string-append out "/share/texmf-dist/tex/generic/ukrhyph"))
-                 #t))))))
+       (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"
+                   ((" ") "  "))
+                 #t))
+             (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-fonts-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)
+                             "//:"))))
+
+                 ;; 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"
+                          "csplain pdftex" "mf mf-nowin" "mex pdftex" "pdfmex pdftex"
+                          "luacsplain luatex"
+                          "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))))
+                 (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")
+                 #t))
+             (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" ".*"))
+                   #t)))))))
       (native-inputs
        `(("texlive-bin" ,texlive-bin)
-         ("texlive-generic-unicode-data" ,texlive-generic-unicode-data)
-         ("texlive-generic-dehyph-exptl" ,texlive-generic-dehyph-exptl)
-         ("texlive-generic-tex-ini-files" ,texlive-generic-tex-ini-files)
-         ("texlive-latex-latexconfig"
-          ,(texlive-dir "tex/latex/latexconfig/"
-                        "1zb3j49cj8p75yph6c8iysjp7qbdvghwf0mn9j0l7qq3qkbz2xaf"))
-         ("texlive-generic-hyphen"
-          ,(texlive-dir "tex/generic/hyphen/"
-                        "0xim36wybw2625yd0zwlp9m2c2xrcybw58gl4rih9nkph0wqwwhd"))
-         ("texlive-generic-ruhyphen"
-          ,(texlive-dir "tex/generic/ruhyphen/"
-                        "14rjkpl4zkjqs13rcf9kcd24mn2kx7i1jbdwxq8ds94bi66ylzsd"))
-         ("texlive-generic-ukrhyph"
-          ,(texlive-dir "tex/generic/ukrhyph/"
-                        "1cfwdg2rhbayl3w0x1xqd36d45zbc96f029myp13s7cb6kbmbppv"))
-         ("texlive-generic-config"
-          ,(texlive-dir "tex/generic/config/"
-                        "1v90iihy112q93zdpblpdk8zv8rf99fgslsg06s1sxm27zjm9nap"))
-         ("texlive-latex-base-support-files"
-          ,(origin
-             (method svn-fetch)
-             (uri (svn-reference
-                   (url (string-append "svn://www.tug.org/texlive/tags/"
-                                       %texlive-tag "/Master/texmf-dist/"
-                                       "/tex/latex/base"))
-                   (revision %texlive-revision)))
-             (file-name (string-append name "-" version "-checkout"))
-             (sha256
-              (base32
-               "18wy8dlcw8adl6jzqwbg54pdwlhs8hilnfvqbw6ikj6y3zhqkj7q"))))
+         ("texlive-tex-ini-files" ,texlive-tex-ini-files)
          ("texlive-tex-plain" ,texlive-tex-plain)
-         ("texlive-fonts-cm" ,texlive-fonts-cm)
+         ("texlive-kpathsea" ,texlive-kpathsea)
+         ("texlive-cm" ,texlive-cm)
          ("texlive-fonts-latex" ,texlive-fonts-latex)
-         ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib)))
+         ("texlive-fonts-knuth-lib" ,texlive-fonts-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
+             "1gi87wy12r8w8fhx9ajcid382dmqzf6b9070b5nndvbbjrvhwf23")))))
       (propagated-inputs
-       `(("texlive-generic-hyph-utf8" ,texlive-generic-hyph-utf8)))
+       `(("texlive-dehyph-exptl" ,texlive-dehyph-exptl)
+         ("texlive-etex" ,texlive-etex)
+         ("texlive-hyph-utf8" ,texlive-hyph-utf8)
+         ("texlive-hyphen-base" ,texlive-hyphen-base)
+         ("texlive-hyphen-afrikaans" ,texlive-hyphen-afrikaans)
+         ("texlive-hyphen-ancientgreek" ,texlive-hyphen-ancientgreek)
+         ("texlive-hyphen-armenian" ,texlive-hyphen-armenian)
+         ("texlive-hyphen-basque" ,texlive-hyphen-basque)
+         ("texlive-hyphen-belarusian" ,texlive-hyphen-belarusian)
+         ("texlive-hyphen-bulgarian" ,texlive-hyphen-bulgarian)
+         ("texlive-hyphen-catalan" ,texlive-hyphen-catalan)
+         ("texlive-hyphen-chinese" ,texlive-hyphen-chinese)
+         ("texlive-hyphen-churchslavonic" ,texlive-hyphen-churchslavonic)
+         ("texlive-hyphen-coptic" ,texlive-hyphen-coptic)
+         ("texlive-hyphen-croatian" ,texlive-hyphen-croatian)
+         ("texlive-hyphen-czech" ,texlive-hyphen-czech)
+         ("texlive-hyphen-danish" ,texlive-hyphen-danish)
+         ("texlive-hyphen-dutch" ,texlive-hyphen-dutch)
+         ("texlive-hyphen-english" ,texlive-hyphen-english)
+         ("texlive-hyphen-esperanto" ,texlive-hyphen-esperanto)
+         ("texlive-hyphen-estonian" ,texlive-hyphen-estonian)
+         ("texlive-hyphen-ethiopic" ,texlive-hyphen-ethiopic)
+         ("texlive-hyphen-finnish" ,texlive-hyphen-finnish)
+         ("texlive-hyphen-french" ,texlive-hyphen-french)
+         ("texlive-hyphen-friulan" ,texlive-hyphen-friulan)
+         ("texlive-hyphen-galician" ,texlive-hyphen-galician)
+         ("texlive-hyphen-georgian" ,texlive-hyphen-georgian)
+         ("texlive-hyphen-german" ,texlive-hyphen-german)
+         ("texlive-hyphen-greek" ,texlive-hyphen-greek)
+         ("texlive-hyphen-hungarian" ,texlive-hyphen-hungarian)
+         ("texlive-hyphen-icelandic" ,texlive-hyphen-icelandic)
+         ("texlive-hyphen-indic" ,texlive-hyphen-indic)
+         ("texlive-hyphen-indonesian" ,texlive-hyphen-indonesian)
+         ("texlive-hyphen-interlingua" ,texlive-hyphen-interlingua)
+         ("texlive-hyphen-irish" ,texlive-hyphen-irish)
+         ("texlive-hyphen-italian" ,texlive-hyphen-italian)
+         ("texlive-hyphen-kurmanji" ,texlive-hyphen-kurmanji)
+         ("texlive-hyphen-latin" ,texlive-hyphen-latin)
+         ("texlive-hyphen-latvian" ,texlive-hyphen-latvian)
+         ("texlive-hyphen-lithuanian" ,texlive-hyphen-lithuanian)
+         ("texlive-hyphen-mongolian" ,texlive-hyphen-mongolian)
+         ("texlive-hyphen-norwegian" ,texlive-hyphen-norwegian)
+         ("texlive-hyphen-occitan" ,texlive-hyphen-occitan)
+         ("texlive-hyphen-pali" ,texlive-hyphen-pali)
+         ("texlive-hyphen-piedmontese" ,texlive-hyphen-piedmontese)
+         ("texlive-hyphen-polish" ,texlive-hyphen-polish)
+         ("texlive-hyphen-portuguese" ,texlive-hyphen-portuguese)
+         ("texlive-hyphen-romanian" ,texlive-hyphen-romanian)
+         ("texlive-hyphen-romansh" ,texlive-hyphen-romansh)
+         ("texlive-hyphen-russian" ,texlive-hyphen-russian)
+         ("texlive-hyphen-sanskrit" ,texlive-hyphen-sanskrit)
+         ("texlive-hyphen-serbian" ,texlive-hyphen-serbian)
+         ("texlive-hyphen-slovak" ,texlive-hyphen-slovak)
+         ("texlive-hyphen-slovenian" ,texlive-hyphen-slovenian)
+         ("texlive-hyphen-spanish" ,texlive-hyphen-spanish)
+         ("texlive-hyphen-swedish" ,texlive-hyphen-swedish)
+         ("texlive-hyphen-thai" ,texlive-hyphen-thai)
+         ("texlive-hyphen-turkish" ,texlive-hyphen-turkish)
+         ("texlive-hyphen-turkmen" ,texlive-hyphen-turkmen)
+         ("texlive-hyphen-ukrainian" ,texlive-hyphen-ukrainian)
+         ("texlive-hyphen-uppersorbian" ,texlive-hyphen-uppersorbian)
+         ("texlive-hyphen-welsh" ,texlive-hyphen-welsh)
+         ("texlive-unicode-data" ,texlive-unicode-data)
+         ("texlive-ukrhyph" ,texlive-ukrhyph)
+         ("texlive-ruhyphen" ,texlive-ruhyphen)
+         ("texlive-latexconfig" ,texlive-latexconfig)))
       (home-page "https://www.ctan.org/pkg/latex-base")
       (synopsis "Base sources of LaTeX")
       (description
@@ -1985,7 +2601,7 @@ contain.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0swkbxv8vg0yizadfnvrwjb4cj0pn34v9wm6v7wqq903fdav7k7q"))))
+                "1h78zw0vhldx478zs4v86ajg7vpkysd1kg3npc480qqls3q6ba40"))))
     (build-system texlive-build-system)
     (arguments '(#:tex-directory "latex/filecontents"))
     (home-page "https://www.ctan.org/pkg/filecontents")
@@ -2025,32 +2641,15 @@ so that other code can determine that it is running under XeTeX.  The package
 requires the e-TeX extensions to the TeX primitive set.")
     (license license:lppl1.3c+)))
 
-(define-public texlive-generic-epsf
+(define-public texlive-epsf
   (package
-    (name "texlive-generic-epsf")
-    (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/epsf"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "14w3j81ympyvg8hkk9i1xgr8a0gfnfsb2ki8qqsk5pa051za1xcy"))))
-    (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/epfs")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
+    (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")
     (synopsis "Simple macros for EPS inclusion")
     (description
@@ -2062,21 +2661,18 @@ bundle of packages.  (The latex-graphics bundle is also available to Plain TeX
 users, via its Plain TeX version.)")
     (license license:public-domain)))
 
+(define-public texlive-generic-epsf
+  (deprecated-package "texlive-generic-epsf" texlive-epsf))
+
 (define-public texlive-latex-fancyvrb
   (package
-    (name "texlive-latex-fancyvrb")
-    (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "fancyvrb"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "03l7140y031rr14h02i4z9zqsfvrbn7wzwxbjsrjcgrk6sdr71wv"))))
-    (build-system texlive-build-system)
-    (arguments
-     '(#:tex-directory "latex/fancyvrb"
-       #:tex-format "latex"))
+    (inherit (simple-texlive-package
+              "texlive-latex-fancyvrb"
+              (list "/doc/latex/fancyvrb/README"
+                    "/tex/latex/fancyvrb/")
+              (base32
+               "1dwkcradz9nwpjwmv1sjzn77lvw25ypr0rrgmf1kd8pd2mw7dxcn")
+              #:trivial? #t))
     (home-page "https://www.ctan.org/pkg/fancyvrb")
     (synopsis "Sophisticated verbatim text")
     (description
@@ -2088,6 +2684,40 @@ verbatim mode; build \"example\" environments (showing both result and
 verbatim source).")
     (license license:lppl1.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
+               "0zrbn9cwfnnrrl3b2zsd74ldksp9jwpvjh7z93ild1m75crpb39a")
+              #:trivial? #t))
+    (home-page "https://www.ctan.org/pkg/latex-graphics")
+    (synopsis "Color 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},
+and @file{dvisvgm.def} driver option files for the LaTeX graphics and color
+packages.")
+    (license license:lppl1.3c+)))
+
+(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")
+    (synopsis "Sample configuration files for LaTeX color and graphics")
+    (description
+     "This bundle includes @file{color.cfg} and @file{graphics.cfg} files that
+set default \"driver\" options for the color and graphics packages.")
+    (license license:public-domain)))
+
 (define-public texlive-latex-graphics
   (package
     (name "texlive-latex-graphics")
@@ -2100,54 +2730,10 @@ verbatim source).")
                (base32
                 "0nlfhn55ax89rcvpkrl9570671b62kcr4c9l5ch3w5zw9vmi00dz"))))
     (build-system texlive-build-system)
-    (arguments
-     '(#:tex-directory "latex/graphics"
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'install 'install-config
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((cfg (assoc-ref inputs "graphics-cfg"))
-                   (target (string-append (assoc-ref outputs "out")
-                                          "/share/texmf-dist/tex/latex/graphics-cfg")))
-               (mkdir-p target)
-               (install-file (string-append cfg "/graphics.cfg") target)
-               (install-file (string-append cfg "/color.cfg")    target)
-               #t)))
-         (add-after 'install 'install-defs
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((def (assoc-ref inputs "graphics-def"))
-                   (target (string-append (assoc-ref outputs "out")
-                                          "/share/texmf-dist/tex/latex/graphics-def")))
-               (mkdir-p target)
-               (copy-recursively def target)
-               #t))))))
-    (native-inputs
-     `(("graphics-cfg"
-        ,(origin
-           (method git-fetch)
-           (uri (git-reference
-                 (url "https://github.com/latex3/graphics-cfg.git")
-                 (commit "19d1238af17df376cd46333b229579b0f7f3a41f")))
-           (file-name (string-append "graphics-cfg-"
-                                     (number->string %texlive-revision)
-                                     "-checkout"))
-           (sha256
-            (base32
-             "12kbgbm52gmmgn8zajb74s8n5rvnxcfdvs3iyj8vcw5vrsw5i6mh"))))
-       ("graphics-def"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/tex/latex/graphics-def"))
-                 (revision %texlive-revision)))
-           (file-name (string-append "graphics-def-"
-                                     (number->string %texlive-revision)
-                                     "-checkout"))
-           (sha256
-            (base32
-             "17zpcgrfsr29g1dkz9np1qi63kjv7gb12rg979c6dai6qksbr3vq"))))))
+    (arguments '(#:tex-directory "latex/graphics"))
+    (propagated-inputs
+     `(("texlive-graphics-cfg" ,texlive-graphics-cfg)
+       ("texlive-graphics-def" ,texlive-graphics-def)))
     (home-page "https://www.ctan.org/pkg/latex-graphics")
     (synopsis "LaTeX standard graphics bundle")
     (description
@@ -2155,34 +2741,47 @@ verbatim source).")
 graphics (e.g. PostScript) files, and rotation and scaling of text in LaTeX
 documents.  It comprises the packages color, graphics, graphicx, trig, epsfig,
 keyval, and lscape.")
-    ;; The configuration files are released under CC0.
-    (license (list license:lppl1.3c+
-                   license:cc0))))
+    (license license:lppl1.3c+)))
 
-(define-public texlive-latex-xcolor
-  (package
-    (name "texlive-latex-xcolor")
-    (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (texlive-ref "latex" "xcolor"))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "01n613s7bcrd2n4jfawm0k4nn2ny3aaifp2jjfif3lz4sbv31494"))))
-    (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/xcolor"))
-    (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,
+(define-public texlive-xcolor
+  (let ((template (simple-texlive-package
+                   "texlive-xcolor"
+                   (list "/doc/latex/xcolor/"
+                         "/source/latex/xcolor/")
+                   (base32
+                    "12q6spmpxg30alhvarjmxzigmz7lazapbrb0mc4vhbn6n1sdz7pp"))))
+    (package
+      (inherit template)
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ #t)
+          "latex/xcolor")
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (add-after 'unpack 'chdir
+               (lambda _ (chdir "source/latex/xcolor") #t))
+             (add-after 'install 'move-files
+               (lambda* (#:key outputs #:allow-other-keys)
+                 (let ((share (string-append (assoc-ref outputs "out")
+                                             "/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"))
+                   #t)))))))
+      (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,
 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
 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-public texlive-latex-xcolor
+  (deprecated-package "texlive-latex-xcolor" texlive-xcolor))
 
 (define-public texlive-latex-hyperref
   (package
@@ -2226,7 +2825,7 @@ pdf and HTML backends.  The package is distributed with the @code{backref} and
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "1m9fg8ddhpsl1212igr9a9fmj012lv780aghjn6fpidg2wqrffmn"))))
+                "0pi2d6gsddcs9wprdbar46s91kdc5fxl1m79g7xrbccsx8s9xbml"))))
     (build-system texlive-build-system)
     (arguments
      '(#:tex-directory "latex/oberdiek"
@@ -2259,7 +2858,7 @@ arrows; record information about document class(es) used; and many more.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0vj7h1fgf1396h4qjdc2m07y08i54gbbfrxl8y327cn3r1n093s6"))))
+                "1wqvn4z0s92h5iqzrvxw7hinzp95avjk9v8lnqbqr4kz6nv4xb9l"))))
     (build-system texlive-build-system)
     (arguments
      '(#:tex-directory "latex/tools"
@@ -2275,32 +2874,15 @@ rawfonts, showkeys, somedefs, tabularx, theorem, trace, varioref, verbatim,
 xr, and xspace.")
     (license license:lppl1.3+)))
 
-(define-public texlive-latex-url
+(define-public texlive-url
   (package
-    (name "texlive-latex-url")
-    (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/url"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "184s2543cwia5l7iibhlkl1ffbncfhjpv5p56zq0c15by5sghlac"))))
-    (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/url")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
+    (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")
     (synopsis "Verbatim with URL-sensitive line breaks")
     (description "The command @code{\\url} is a form of verbatim command that
@@ -2315,6 +2897,26 @@ of file names.")
     ;; the latest version is 1.3c.
     (license license:lppl1.3c+)))
 
+(define-public texlive-latex-url
+  (deprecated-package "texlive-latex-url" texlive-url))
+
+(define-public texlive-tetex
+  (package
+    (inherit (simple-texlive-package
+              "texlive-tetex"
+              (list "/dvips/tetex/"
+                    "/fonts/enc/dvips/tetex/"
+                    "/fonts/map/dvips/tetex/")
+              (base32
+               "1si3as8mwi8837965djlw6jhwwzsp3r1hkflvdxv2avx9vb45hjb")
+              #: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)))
+
 (define-public texlive-latex-l3kernel
   (package
     (name "texlive-latex-l3kernel")
@@ -2325,7 +2927,7 @@ of file names.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0p3fsxap1ilwjz356aq4s5ygwvdscis8bh93g8klf8mhrd8cr2jy"))))
+                "0s77z2cbv841l45qrpf0s8qhzfa4wi689lg7zkw88qg18nzvy0ly"))))
     (build-system texlive-build-system)
     (arguments
      '(#:tex-directory "latex/l3kernel"))
@@ -2349,7 +2951,7 @@ that the LaTeX3 conventions can be used with regular LaTeX 2e packages.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0pyx0hffiyss363vv7fkrcdiaf7p099xnq0mngzqc7v8v9q849hs"))))
+                "1cv4fk9pabh7mkxhfsdmh4k8xpmzg1psgcsvd11c869m7n3a629h"))))
     (build-system texlive-build-system)
     (arguments
      '(#:tex-directory "latex/l3packages"
@@ -2404,7 +3006,7 @@ programming tools and kernel sup­port.  Packages provided in this release are:
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "1p0mkn6iywl0k4m9cx3hnhylpi499inisff3f72pcf349baqsnvq"))))
+                "1223cw029n6zff7pqpwbsq1x8v3w63smczkmnybqxkw5h2za8gbz"))))
     (build-system texlive-build-system)
     (arguments
      '(#:tex-directory "latex/fontspec"
@@ -2493,7 +3095,7 @@ this bundle for use independent of ConTeXt.")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                    (url "https://github.com/lualatex/luaotfload.git")
+                    (url "https://github.com/lualatex/luaotfload")
                     (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
@@ -2587,7 +3189,7 @@ loading fonts by their proper names instead of file names.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0arvk7gn32mshnfdad5qkgf3i1arxq77k3vq7wnpm4nwnrzclxal"))))
+                "0qgk2332dacsxn1z95qzp35gbs7wrzl1ipjdhnmk1r897msm4sf5"))))
     (build-system texlive-build-system)
     (arguments '(#:tex-directory "latex/amsmath"))
     (home-page "https://www.ctan.org/pkg/amsmath")
@@ -2640,7 +3242,7 @@ distribution.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0yhlfiz3fjc8jd46f1zrjj4jig48l8rrzh8cmd8ammml8z9a01z6"))))
+                "1rwqq841i1rxywymzwkw0cw2yhgvxwjx5mgygfasvypwrwll6f6s"))))
     (build-system texlive-build-system)
     (arguments
      '(#:tex-directory "generic/babel"
@@ -2697,7 +3299,7 @@ for Canadian and USA text.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0h47s67gnhdaxfgbf8pirp5vw4z6rrhxl8zav803yjxka0096i3y"))))
+                "129f9w41cb6yyrr6kpv3zz9ml6334hyq1wcz7j9jn47p0hlxqfk8"))))
     (build-system texlive-build-system)
     (arguments '(#:tex-directory "generic/babel-german"))
     (home-page "https://www.ctan.org/pkg/babel-german")
@@ -2764,7 +3366,7 @@ packages.")
           (list texlive-bin
                 texlive-dvips
                 texlive-fontname
-                texlive-fonts-cm
+                texlive-cm
                 texlive-fonts-latex
                 texlive-metafont-base
                 texlive-latex-base
@@ -2776,7 +3378,8 @@ packages.")
                 texlive-latex-cyrillic
                 texlive-latex-graphics
                 texlive-latex-psnfss
-                texlive-latex-tools)))
+                texlive-latex-tools
+                texlive-tetex)))
     (package
       (name "texlive-base")
       (version (number->string %texlive-revision))
@@ -2833,7 +3436,10 @@ standard LaTeX packages."
                ;; the updmap.cfg file)
                (match (filter (match-lambda
                                 ((name . _)
-                                 (not (member name '("bash" "updmap.cfg")))))
+                                 (not (member name '("bash"
+                                                     "coreutils"
+                                                     "sed"
+                                                     "updmap.cfg")))))
                               %build-inputs)
                  (((names . directories) ...)
                   (union-build (assoc-ref %outputs "out")
@@ -2853,6 +3459,7 @@ standard LaTeX packages."
                (setenv "PATH" (string-append
                                (assoc-ref %build-inputs "bash") "/bin:"
                                (assoc-ref %build-inputs "coreutils") "/bin:"
+                               (assoc-ref %build-inputs "sed") "/bin:"
                                (string-append out "/bin")))
                (for-each
                 (cut wrap-program <>
@@ -2861,16 +3468,32 @@ standard LaTeX packages."
                 (find-files (string-append out "/bin") ".*"))
 
                ;; Remove invalid maps from config file.
-               (let ((port (open-pipe* OPEN_WRITE "updmap-sys"
-                                       "--syncwithtrees"
-                                       "--nohash"
-                                       (assoc-ref %build-inputs "updmap.cfg"))))
-                 (display "Y\n" port)
-                 (when (not (zero? (status:exit-val (close-pipe port))))
-                   (error "failed to filter updmap.cfg")))
-               ;; Generate maps.
-               (invoke "updmap-sys" "--force"
-                       (string-append out "/share/texmf-config/web2c/updmap.cfg"))
+               (let ((web2c (string-append out "/share/texmf-config/web2c/"))
+                     (maproot (string-append out "/share/texmf-dist/fonts/map/")))
+                 (mkdir-p web2c)
+                 (copy-file
+                  (assoc-ref %build-inputs "updmap.cfg")
+                  (string-append web2c "updmap.cfg"))
+                 (make-file-writable (string-append web2c "updmap.cfg"))
+
+                 (let* ((port (open-pipe* OPEN_WRITE "updmap-sys"
+                                          "--syncwithtrees"
+                                          "--nohash"
+                                          (string-append "--cnffile=" web2c "updmap.cfg"))))
+                   (display "Y\n" port)
+                   (when (not (zero? (status:exit-val (close-pipe port))))
+                     (error "failed to filter updmap.cfg")))
+                 ;; Generate maps.
+                 (invoke "updmap-sys"
+                         (string-append "--cnffile=" web2c "updmap.cfg")
+                         (string-append "--dvipdfmxoutputdir="
+                                        maproot "dvipdfmx/updmap/")
+                         (string-append "--dvipsoutputdir="
+                                        maproot "dvips/updmap/")
+                         (string-append "--pdftexoutputdir="
+                                        maproot "pdftex/updmap/"))
+                 ;; Having this file breaks all file lookups later.
+                 (delete-file (string-append out "/share/texmf-dist/ls-R")))
                #t))))
         (inputs
          `(("bash" ,bash)
@@ -2890,7 +3513,7 @@ standard LaTeX packages."
                                          (number->string %texlive-revision)))
                (sha256
                 (base32
-                 "06mwpy5i218g5k3sf4gba0fmxgas82hkzx9fhwn67z5ik37d8apq"))))))
+                 "0faqknqxs80qp9ywk0by5k85s0yalg97c4lja4q56lsyblrr4j7i"))))))
         (home-page (package-home-page texlive-bin))
         (synopsis "Union of TeX Live packages")
         (description "This package provides a subset of the TeX Live
@@ -3139,32 +3762,16 @@ without affecting the structure of the list (this works for @code{itemize} and
 @code{enumerate} lists, and numbered lists remain in sequence).")
     (license license:lppl)))
 
-(define-public texlive-latex-filemod
+(define-public texlive-filemod
   (package
-    (name "texlive-latex-filemod")
-    (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/filemod"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0vpxilfw69xv78f03g0j0zw0bw4qcn36whqp8phcq48qk1ax2kr2"))))
-    (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/filemod")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
+    (inherit (simple-texlive-package
+              "texlive-filemod"
+              (list "/doc/latex/filemod/"
+                    "/tex/latex/filemod/"
+                    "/tex/generic/filemod/")
+              (base32
+               "1snsj7kblkj1ig3x3845lsypz7ab04lf0dcpdh946xakgjnz4fb5")
+              #:trivial? #t))
     (home-page "https://www.ctan.org/pkg/filemod")
     (synopsis "Provide file modification times, and compare them")
     (description
@@ -3178,6 +3785,9 @@ mode.  The functionality is provided by purely expandable macros or by faster
 but non-expandable ones.")
     (license license:lppl1.3+)))
 
+(define-public texlive-latex-filemod
+  (deprecated-package "texlive-latex-filemod" texlive-filemod))
+
 (define-public texlive-latex-ifplatform
   (package
     (name "texlive-latex-ifplatform")
@@ -3252,57 +3862,15 @@ with a user specified LaTeX construction, properly aligned, scaled, and/or
 rotated.")
     (license (license:fsf-free "file://psfrag.dtx"))))
 
-(define-public texlive-latex-xkeyval
-  (package
-    (name "texlive-latex-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
-                "0wancavix39j240pd8m9cgmwsijwx6jd6n54v8wg0x2rk5m44myp"))))
-    (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/xkeyval"))
-    (home-page "https://www.ctan.org/pkg/xkeyval")
-    (synopsis "Macros for defining and setting keys")
-    (description
-     "This package is an extension of the @code{keyval} package and offers
-more flexible macros for defining and setting keys.  The package provides a
-pointer and a preset system.  Furthermore, it supplies macros to allow class
-and package options to contain options of the @code{key=value} form.  A LaTeX
-kernel patch is provided to avoid premature expansions of macros in class or
-package options.  A specialized system for setting @code{PSTricks} keys is
-provided by the @code{pst-xkey} package.")
-    (license license:lppl1.3+)))
-
-(define-public texlive-latex-pstool
+(define-public texlive-pstool
   (package
-    (name "texlive-latex-pstool")
-    (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/pstool"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1h816jain8c9nky75kk8pmmwj5b4yf9dpqvdvi2l6jhfj5iqkzr8"))))
-    (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/pstool")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
+    (inherit (simple-texlive-package
+              "texlive-pstool"
+              (list "/doc/latex/pstool/"
+                    "/tex/latex/pstool/")
+              (base32
+               "12clzcw2cl7g2chr2phgmmiwxw4859cln1gbx1wgp8bl9iw590nc")
+              #:trivial? #t))
     (propagated-inputs
      `(("texlive-latex-bigfoot" ,texlive-latex-bigfoot) ; for suffix
        ("texlive-latex-filemod" ,texlive-latex-filemod)
@@ -3323,32 +3891,18 @@ drastically speeding up compilation time when only a single figure needs
 re-processing.")
     (license license:lppl)))
 
-(define-public texlive-latex-seminar
+(define-public texlive-latex-pstool
+  (deprecated-package "texlive-latex-pstool" texlive-pstool))
+
+(define-public texlive-seminar
   (package
-    (name "texlive-latex-seminar")
-    (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/seminar"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0y4i651b75y6006n03x8n86bsqvjsailvvz9bhzy51dzsznqidq0"))))
-    (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/seminar")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
+    (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")
     (synopsis "Make overhead slides")
     ;; TODO: This package may need fancybox and xcomment at runtime.
@@ -3360,6 +3914,9 @@ recent classes such as powerdot or beamer, both of which are tuned to
 21st-century presentation styles.")
     (license license:lppl1.2+)))
 
+(define-public texlive-latex-seminar
+  (deprecated-package "texlive-latex-seminar" texlive-seminar))
+
 (define-public texlive-latex-trimspaces
   (package
     (name "texlive-latex-trimspaces")
@@ -3427,32 +3984,15 @@ space-stripped macros.")
 to something that's not a float.")
     (license license:lppl)))
 
-(define-public texlive-latex-doi
+(define-public texlive-doi
   (package
-    (name "texlive-latex-doi")
-    (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/doi"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0378rdmrgr2lzbfi4qqy4dfpj5im20diyd8z8b9m4mlg05r7wgnb"))))
-    (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/doi")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
+    (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")
     (synopsis "Create correct hyperlinks for DOI numbers")
     (description
@@ -3465,32 +4005,18 @@ hyperlink to the target of the DOI.")
     ;; Any version of the LPPL.
     (license license:lppl1.3+)))
 
-(define-public texlive-latex-etoolbox
+(define-public texlive-latex-doi
+  (deprecated-package "texlive-latex-doi" texlive-doi))
+
+(define-public texlive-etoolbox
   (package
-    (name "texlive-latex-etoolbox")
-    (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/etoolbox"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1agmq6bf8wzcd77n20ng8bl4kh69cg5f6sjniii7bcw4llhd3nc8"))))
-    (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/etoolbox")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
+    (inherit (simple-texlive-package
+              "texlive-etoolbox"
+              (list "/doc/latex/etoolbox/"
+                    "/tex/latex/etoolbox/")
+              (base32
+               "1cc1vw1ach55g4ff4x30by8k1mg01w199ccxvn72f5khlnnxial0")
+              #:trivial? #t))
     (home-page "https://www.ctan.org/pkg/etoolbox")
     (synopsis "e-TeX tools for LaTeX")
     (description
@@ -3503,6 +4029,9 @@ some LaTeX kernel commands; nevertheless, the package will not modify any part
 of the LaTeX kernel.")
     (license license:lppl1.3+)))
 
+(define-public texlive-latex-etoolbox
+  (deprecated-package "texlive-latex-etoolbox" texlive-etoolbox))
+
 (define-public texlive-latex-fncychap
   (package
     (name "texlive-latex-fncychap")
@@ -3588,7 +4117,7 @@ course of the framed/shaded matter.  There is also a command
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0sikazkg0dpkcpzlbqw8qzxr81paf2f443vsrh14jnw7s4gswvc5"))))
+                "1br4kv9y17cvngp83ykpvy7gy3jqfan5plk7sggcgbdfhndi5dsr"))))
     (build-system texlive-build-system)
     (arguments
      '(#:tex-directory "latex/g-brief"
@@ -3661,7 +4190,7 @@ BibLaTeX, and is considered experimental.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0yw6bjfgsli3s1dldsgb7mkr7lnk329cgdjbgs8z2xn59pmmdsn4"))))
+                "0a8f38c2ds1flxcr0apdpyaaz3k6fyalz6dkbrmcv9srjc40mh3n"))))
     (build-system texlive-build-system)
     (arguments '(#:tex-directory "latex/geometry"))
     (propagated-inputs
@@ -3712,251 +4241,53 @@ array environments; verbatim handling; and syntax diagrams.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "03ma58z3ypsbp7zgkzb1ylpn2ygr27cxzkf042ns0rif4g8s491f"))))
+                "0na7v4hsyx5s67cpjj2dbnq8j67k8lln6b19hmj631gfs27slss1"))))
     (build-system texlive-build-system)
     (arguments '(#:tex-directory "latex/polyglossia"))
     (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 of LuaLaTeX
-and XeLaTeX; it relies on the @code{fontspec} package, version 2.0 at least.")
-    (license license:lppl1.3+)))
-
-(define-public texlive-latex-supertabular
-  (package
-    (name "texlive-latex-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
-                "14b2bc7cqz4ckxxycim9sw6jkrr1pahivm1rdbpz5k6hl967w1s3"))))
-    (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.")
-    (license license:lppl1.3+)))
-
-(define-public texlive-tex-texinfo
-  (package
-    (name "texlive-tex-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
-                "06cf821y1j7jdg93pb41ayigrfwgn0y49d7w1025zlijjxi6bvjp"))))
-    (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")
-    (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
-source.  The Texinfo macros may be used to produce printable output using TeX;
-other programs in the distribution offer online interactive use (with
-hypertext linkages in some cases).")
-    (license license:gpl3+)))
-
-(define-public texlive-latex-upquote
-  (package
-    (name "texlive-latex-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"))))
-    (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/upquote"))
-    (home-page "https://www.ctan.org/pkg/upquote")
-    (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
-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
-in the expected way.  It does this regardless of other fonts or encodings in
-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
-  (package
-    (name "texlive-latex-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")
-    (synopsis "Simple package to set up document margins")
-    (description
-     "This is a simple package to set up document margins.  This package is
-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
-  (package
-    (name "texlive-latex-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
-                "0rxfpr8vq3brwx5rc7qn91ixlp9zva4zrms8a579fqa1g5yva7vg"))))
-    (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/appendix"))
-    (home-page "https://www.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)))
-
-(define-public texlive-latex-changebar
-  (package
-    (name "texlive-latex-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"))))
-    (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
-drivers, and VTeX and pdfTeX.")
-    (license license:lppl)))
-
-(define-public texlive-latex-cmap
-  (package
-    (name "texlive-latex-cmap")
-    (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
-                "1s1rv6zgw105w2j6ffhnk914qrix87y1ndzri1q72g2kbr91zlbg"))))
-    (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")
-    (description
-     "This package embeds CMap tables into PDF files to make search and
-copy-and-paste functions work properly.")
-    (license license:lppl)))
+and XeLaTeX; it relies on the @code{fontspec} package, version 2.0 at least.")
+    (license license:lppl1.3+)))
 
-(define-public texlive-latex-colortbl
+(define-public texlive-latex-supertabular
   (package
-    (name "texlive-latex-colortbl")
+    (name "texlive-latex-supertabular")
     (version (number->string %texlive-revision))
     (source (origin
               (method svn-fetch)
-              (uri (texlive-ref "latex" "colortbl"))
+              (uri (texlive-ref "latex" "supertabular"))
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "190pmq8la2rq07xry8bn8z8yywzxv6fqyqaj7yjfj5rgw6x0mas8"))))
+                "14b2bc7cqz4ckxxycim9sw6jkrr1pahivm1rdbpz5k6hl967w1s3"))))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/colortbl"))
-    (home-page "https://www.ctan.org/pkg/colortbl")
-    (synopsis "Add colour to LaTeX tables")
+    (arguments '(#:tex-directory "latex/supertabular"))
+    (home-page "https://www.ctan.org/pkg/supertabular")
+    (synopsis "Multi-page tables package")
     (description
-     "This package allows rows, columns, and even individual cells in LaTeX
-tables to be coloured.")
-    (license license:lppl)))
+     "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.")
+    (license license:lppl1.3+)))
 
-(define-public texlive-latex-fancybox
+(define-public texlive-tex-texinfo
   (package
-    (name "texlive-latex-fancybox")
+    (name "texlive-tex-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/latex/fancybox"))
+                                        "/tex/texinfo"))
                     (revision %texlive-revision)))
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0smmnaad2q8qwicay1frri990lv65l0k8cwzsvdsyp3jk8kp042w"))))
+                "16jy02m089m7n6v9vbfi4xjgngc1fnvsmmppk8axfwzbhdky3c9c"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -3964,34 +4295,63 @@ tables to be coloured.")
        (begin
          (use-modules (guix build utils))
          (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/fancybox")))
+                                      "/share/texmf-dist/tex/texinfo")))
            (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")
+    (home-page "https://www.ctan.org/pkg/texinfo")
+    (synopsis "TeX macros to handle Texinfo files")
     (description
-     "This package provides variants of @code{\\fbox}: @code{\\shadowbox},
-@code{\\doublebox}, @code{\\ovalbox}, @code{\\Ovalbox}, with helpful tools for
-using box macros and flexible verbatim macros.  You can box mathematics,
-floats, center, flushleft, and flushright, lists, and pages.")
+     "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
+source.  The Texinfo macros may be used to produce printable output using TeX;
+other programs in the distribution offer online interactive use (with
+hypertext linkages in some cases).")
+    (license license:gpl3+)))
+
+(define-public texlive-latex-upquote
+  (package
+    (name "texlive-latex-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"))))
+    (build-system texlive-build-system)
+    (arguments '(#:tex-directory "latex/upquote"))
+    (home-page "https://www.ctan.org/pkg/upquote")
+    (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
+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
+in the expected way.  It does this regardless of other fonts or encodings in
+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-fancyhdr
+(define-public texlive-latex-anysize
   (package
-    (name "texlive-latex-fancyhdr")
+    (name "texlive-latex-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/fancyhdr"))
+                                        "/tex/latex/anysize"))
                     (revision %texlive-revision)))
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "1xsnzx7vgdfh9zh2m7bjz6bgdpxsgb1kyc19p50vhs34x5nbgsnr"))))
+                "19khwqjlvznc955sijhww3c4zbb0053rvzwv9nz738qknq7y18vb"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -3999,105 +4359,79 @@ floats, center, flushleft, and flushright, lists, and pages.")
        (begin
          (use-modules (guix build utils))
          (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/fancyhdr")))
+                                      "/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/fancyhdr")
-    (synopsis "Extensive control of page headers and footers in LaTeX2e")
+    (home-page "https://www.ctan.org/pkg/anysize")
+    (synopsis "Simple package to set up document margins")
     (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:lppl)))
+     "This is a simple package to set up document margins.  This package is
+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-float
+(define-public texlive-latex-appendix
   (package
-    (name "texlive-latex-float")
+    (name "texlive-latex-appendix")
     (version (number->string %texlive-revision))
     (source (origin
               (method svn-fetch)
-              (uri (texlive-ref "latex" "float"))
+              (uri (texlive-ref "latex" "appendix"))
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0nbl7wylkv22fcdv4p8byhhj575fli6jnqjpkhrkbv8dzwah84nq"))))
+                "0rxfpr8vq3brwx5rc7qn91ixlp9zva4zrms8a579fqa1g5yva7vg"))))
     (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/float"))
-    (home-page "https://www.ctan.org/pkg/float")
-    (synopsis "Improved interface for floating objects")
+    (arguments '(#:tex-directory "latex/appendix"))
+    (home-page "https://www.ctan.org/pkg/appendix")
+    (synopsis "Extra control of appendices")
     (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 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)))
 
-(define-public texlive-latex-footmisc
-  (package
-    (name "texlive-latex-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"))))
-    (build-system texlive-build-system)
-    (arguments '(#:tex-directory "latex/footmisc"))
-    (home-page "https://www.ctan.org/pkg/footmisc")
-    (synopsis "Range of footnote options")
-    (description
-     "This is a collection of ways to change the typesetting of footnotes.
-The package provides means of changing the layout of the footnotes themselves,
-a way to number footnotes per page, to make footnotes disappear in a
-\"moving\" argument, and to deal with multiple references to footnotes from
-the same place.  The package also has a range of techniques for labelling
-footnotes with symbols rather than numbers.")
-    (license license:lppl1.3+)))
-
-(define-public texlive-latex-listings
+(define-public texlive-latex-changebar
   (package
-    (name "texlive-latex-listings")
+    (name "texlive-latex-changebar")
     (version (number->string %texlive-revision))
     (source (origin
               (method svn-fetch)
-              (uri (texlive-ref "latex" "listings"))
+              (uri (texlive-ref "latex" "changebar"))
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "1nsn9wp3wl12b36c0sqrim33lf33cr5wky0h4ncnw8lvqgm7h8wf"))))
+                "05x15ilynqrl448h8l6qiraygamdldlngz89a2bw7kg74fym14ch"))))
     (build-system texlive-build-system)
-    (arguments
-     '(#:tex-directory "latex/listings"
-       #:build-targets '("listings.ins")))
-    (home-page "https://www.ctan.org/pkg/listings")
-    (synopsis "Typeset source code listings using LaTeX")
+    (arguments '(#:tex-directory "latex/changebar"))
+    (home-page "https://www.ctan.org/pkg/changebar")
+    (synopsis "Generate changebars in LaTeX documents")
     (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+)))
+     "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
+drivers, and VTeX and pdfTeX.")
+    (license license:lppl)))
 
-(define-public texlive-latex-jknapltx
+(define-public texlive-latex-cmap
   (package
-    (name "texlive-latex-jknapltx")
+    (name "texlive-latex-cmap")
     (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"))
+                                        "/tex/latex/cmap"))
                     (revision %texlive-revision)))
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0m034x72f2g07icr50gacyxfb9g1lz2rmqh4kqr1qjb421x2kds9"))))
+                "1s1rv6zgw105w2j6ffhnk914qrix87y1ndzri1q72g2kbr91zlbg"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -4105,559 +4439,424 @@ styles.  Support for @code{hyperref} is provided.")
        (begin
          (use-modules (guix build utils))
          (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/jknapltx")))
+                                      "/share/texmf-dist/tex/latex/cmap")))
            (mkdir-p target)
            (copy-recursively (assoc-ref %build-inputs "source") target)
            #t))))
-    (home-page "https://www.ctan.org/pkg/jknappen")
-    (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;
-@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)))
-
-(define-public texlive-fonts-ec
-  (package
-    (name "texlive-fonts-ec")
-    (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-base")))
-               ;; 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-fonts-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
-     `(("texlive-bin" ,texlive-bin)
-       ("texlive-metafont-base" ,texlive-metafont-base)
-       ("texlive-fonts-cm" ,texlive-fonts-cm)))
-    (home-page "https://www.ctan.org/pkg/ec")
-    (synopsis "Computer modern fonts in T1 and TS1 encodings")
+    (home-page "https://www.tug.org/svn/texlive/tags/texlive-2017.1/\
+Master/texmf-dist/tex/latex/cmap/")
+    (synopsis "CMap support for PDF files")
     (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-2017.1/Master/texmf-dist/doc/fonts/ec/copyrite.txt"))))
+     "This package embeds CMap tables into PDF files to make search and
+copy-and-paste functions work properly.")
+    (license license:lppl)))
 
-(define-public texlive-fonts-adobe-times
+(define-public texlive-latex-colortbl
+  (package
+    (name "texlive-latex-colortbl")
+    (version (number->string %texlive-revision))
+    (source (origin
+              (method svn-fetch)
+              (uri (texlive-ref "latex" "colortbl"))
+              (file-name (string-append name "-" version "-checkout"))
+              (sha256
+               (base32
+                "16vd99p01a0y30xr5yf1z2j5da9x8gy21vb30wk08jh31zffbaqj"))))
+    (build-system texlive-build-system)
+    (arguments '(#:tex-directory "latex/colortbl"))
+    (home-page "https://www.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.")
+    (license license:lppl)))
+
+(define-public texlive-latex-fancybox
   (package
-    (name "texlive-fonts-adobe-times")
+    (name "texlive-latex-fancybox")
     (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/type1/urw/times/"))
+                                        "/tex/latex/fancybox"))
                     (revision %texlive-revision)))
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "15vzyr7favkv1mj00qxr03s89kw78nd066fh69by93272g8p5sgd"))))
+                "0smmnaad2q8qwicay1frri990lv65l0k8cwzsvdsyp3jk8kp042w"))))
     (build-system trivial-build-system)
     (arguments
-     `(#:modules ((guix build utils)
-                  (ice-9 match))
+     `(#: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"        . "fonts/type1/urw/times")
-
-                       ("times-afm"     . "fonts/afm/adobe/times")
-                       ("times-tfm"     . "fonts/tfm/adobe/times")
-                       ("times-vf"      . "fonts/vf/adobe/times")
-
-                       ("urw-afm"       . "fonts/afm/urw/times")
-                       ("urw35vf-tfm"   . "fonts/tfm/urw35vf/times")
-                       ("urw35vf-vf"    . "fonts/vf/urw35vf/times")
-
-                       ("times-tex"     . "tex/latex/times")
-                       ("dvips"         . "dvips/times")
-                       ("fonts-map"     . "fonts/map/dvips/times"))))
-           (for-each (match-lambda
-                       ((pkg . dir)
-                        (let ((target (string-append root dir)))
-                          (mkdir-p target)
-                          (copy-recursively (assoc-ref %build-inputs pkg)
-                                            target))))
-                     pkgs)
+         (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))))
-    (native-inputs
-     `(("times-afm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/afm/adobe/times"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-afm-" version "-checkout"))
-           (sha256
-            (base32
-             "1k7h6vihfc6ri2lq9ggnq2g4zq3qcgq1vd0hr486g9cqrdpys6cy"))))
-       ("times-tfm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/tfm/adobe/times"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-tfm-" version "-checkout"))
-           (sha256
-            (base32
-             "1hbgkjnf5xyganbznwpwszvr3iyk4bzb0ys4hd8ybawp60paadrr"))))
-       ("times-vf"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/vf/adobe/times"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-vf-" version "-checkout"))
-           (sha256
-            (base32
-             "18rfspnwdw9r81dy18lb4w96d09b6c4g7y80azwylalkhwdf2lfp"))))
-       ("urw-afm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/afm/urw/times"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-urw-afm-" version "-checkout"))
-           (sha256
-            (base32
-             "0g0xpsyn6634g0b4rpd420v7i4gkz3zr12vcy2b8csbcscjvwri5"))))
-       ("urw35vf-tfm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/tfm/urw35vf/times"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-urw35vf-tfm-" version "-checkout"))
-           (sha256
-            (base32
-             "0a4idlvpaqd0ypqgy1xw0rpx8q23bvssg8xq757zzn3zikj0w7pr"))))
-       ("urw35vf-vf"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/vf/urw35vf/times"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-urw35vf-vf-" version "-checkout"))
-           (sha256
-            (base32
-             "05mppwxd4c5x0yw50gca726f0ylc1rk8jf0jjkrriixq6rnw03di"))))
-       ("times-tex"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/tex/latex/times"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-tex-" version "-checkout"))
-           (sha256
-            (base32
-             "1gmd0x7c3vkvfzgmrsp4866rcdbyimfk3bjr91zaadc41r1i8xrp"))))
-       ("dvips"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/dvips/times/"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-dvips-" version "-checkout"))
-           (sha256
-            (base32
-             "1fvqpgqi7bp2q76nf5kmlhsdijxw65arqfy3ax3djwih3yg12mp0"))))
-       ("fonts-map"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/map/dvips/times/"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-fonts-map-" version "-checkout"))
-           (sha256
-            (base32
-             "12f00gzs2zgllkm59qdhw2xxj7lvg3p256232f1l275z3pldfqqi"))))))
-    (home-page "https://ctan.org/pkg/urw-base35")
-    (synopsis "URW Base 35 font pack for LaTeX")
+    (home-page "https://www.ctan.org/pkg/fancybox")
+    (synopsis "Variants of \\fbox and other games with boxes")
     (description
-     "This package provides a drop-in replacements for the Times font from
-Adobe's basic set.")
-    ;; No license version specified.
-    (license license:gpl3+)))
+     "This package provides variants of @code{\\fbox}: @code{\\shadowbox},
+@code{\\doublebox}, @code{\\ovalbox}, @code{\\Ovalbox}, with helpful tools for
+using box macros and flexible verbatim macros.  You can box mathematics,
+floats, center, flushleft, and flushright, lists, and pages.")
+    (license license:lppl1.2+)))
 
-(define-public texlive-fonts-adobe-palatino
+(define-public texlive-latex-fancyhdr
   (package
-    (name "texlive-fonts-adobe-palatino")
+    (name "texlive-latex-fancyhdr")
     (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/type1/urw/palatino/"))
+                                        "/tex/latex/fancyhdr"))
                     (revision %texlive-revision)))
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "18dw5260c6fy7acxaqwrg3hw04kg63ijq4lkn56q5pa2g6nyylrp"))))
+                "0hrwspqkqfahxyzzsnjyrxlgxj06zw1f3636gx76pvl4xhvdj1cj"))))
     (build-system trivial-build-system)
     (arguments
-     `(#:modules ((guix build utils)
-                  (ice-9 match))
+     `(#: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"        . "fonts/type1/urw/palatino")
-
-                       ("palatino-afm"  . "fonts/afm/adobe/palatino")
-                       ("palatino-tfm"  . "fonts/tfm/adobe/palatino")
-                       ("palatino-vf"   . "fonts/vf/adobe/palatino")
-
-                       ("urw-afm"       . "fonts/afm/urw/palatino")
-                       ("urw35vf-tfm"   . "fonts/tfm/urw35vf/palatino")
-                       ("urw35vf-vf"    . "fonts/vf/urw35vf/palatino")
-
-                       ("palatino-tex"  . "tex/latex/palatino")
-                       ("dvips"         . "dvips/palatino")
-                       ("fonts-map"     . "fonts/map/dvips/palatino"))))
-           (for-each (match-lambda
-                       ((pkg . dir)
-                        (let ((target (string-append root dir)))
-                          (mkdir-p target)
-                          (copy-recursively (assoc-ref %build-inputs pkg)
-                                            target))))
-                     pkgs)
+         (use-modules (guix build utils))
+         (let ((target (string-append (assoc-ref %outputs "out")
+                                      "/share/texmf-dist/tex/latex/fancyhdr")))
+           (mkdir-p target)
+           (copy-recursively (assoc-ref %build-inputs "source") target)
            #t))))
-    (native-inputs
-     `(("palatino-afm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/afm/adobe/palatino"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-afm-" version "-checkout"))
-           (sha256
-            (base32
-             "0pxizay730cx7rb9y5bqq9dn1zxx3arc33rmdsn7l29pc51flmmi"))))
-       ("palatino-tfm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/tfm/adobe/palatino"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-tfm-" version "-checkout"))
-           (sha256
-            (base32
-             "1w1vm0sk9kpsy14yhyf1v1q3c6b97cgbba74g578bcwjlh810mg0"))))
-       ("palatino-vf"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/vf/adobe/palatino"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-vf-" version "-checkout"))
-           (sha256
-            (base32
-             "1maqfis8hpybcn9lmm8r2b1g56620lfpsncg0742c3kkjd6dh97h"))))
-       ("urw-afm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/afm/urw/palatino"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-urw-afm-" version "-checkout"))
-           (sha256
-            (base32
-             "0gk0xwy1fs2si5kb1j3dzgm52c8sagv32gd9dmw88m7sgh5qkd87"))))
-       ("urw35vf-tfm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/tfm/urw35vf/palatino"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-urw35vf-tfm-" version "-checkout"))
-           (sha256
-            (base32
-             "19aq3xwfg7vkf1qzjdxgcvcdqwpvpavq3l25y64xni72qx0kmppz"))))
-       ("urw35vf-vf"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/vf/urw35vf/palatino"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-urw35vf-vf-" version "-checkout"))
-           (sha256
-            (base32
-             "1lkn4p6zimrs0ah6mxsang4bicp8j7xzl016529a3f168an7mdmj"))))
-       ("palatino-tex"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/tex/latex/palatino"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-tex-" version "-checkout"))
-           (sha256
-            (base32
-             "0ng9w7i0p1nb51amla32jj86vx6p84m6qc7asam3g4x8w5jf7s27"))))
-       ("dvips"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/dvips/palatino/"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-dvips-" version "-checkout"))
-           (sha256
-            (base32
-             "1pdbkfmhx4kk3brh5lg6fyl9ad2kbjmkrhgcx84klnlhq01mfdhb"))))
-       ("fonts-map"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/map/dvips/palatino/"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-fonts-map-" version "-checkout"))
-           (sha256
-            (base32
-             "0rg13hyp652hp3gnrj5pbyb84zkqmyi1qnm8c6spcyaq8pm06l0d"))))))
-    (home-page "https://ctan.org/pkg/urw-base35")
-    (synopsis "URW Base 35 font pack for LaTeX")
+    (home-page "https://www.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:lppl)))
+
+(define-public texlive-latex-float
+  (package
+    (name "texlive-latex-float")
+    (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"))))
+    (build-system texlive-build-system)
+    (arguments '(#:tex-directory "latex/float"))
+    (home-page "https://www.ctan.org/pkg/float")
+    (synopsis "Improved interface for floating objects")
     (description
-     "This package provides a drop-in replacements for the Palatino font from
-Adobe's basic set.")
-    ;; No license version specified.
-    (license license:gpl3+)))
+     "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}}.")
+    (license license:lppl)))
 
-(define-public texlive-fonts-adobe-zapfding
+(define-public texlive-latex-footmisc
+  (package
+    (name "texlive-latex-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"))))
+    (build-system texlive-build-system)
+    (arguments '(#:tex-directory "latex/footmisc"))
+    (home-page "https://www.ctan.org/pkg/footmisc")
+    (synopsis "Range of footnote options")
+    (description
+     "This is a collection of ways to change the typesetting of footnotes.
+The package provides means of changing the layout of the footnotes themselves,
+a way to number footnotes per page, to make footnotes disappear in a
+\"moving\" argument, and to deal with multiple references to footnotes from
+the same place.  The package also has a range of techniques for labelling
+footnotes with symbols rather than numbers.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-latex-listings
+  (package
+    (name "texlive-latex-listings")
+    (version (number->string %texlive-revision))
+    (source (origin
+              (method svn-fetch)
+              (uri (texlive-ref "latex" "listings"))
+              (file-name (string-append name "-" version "-checkout"))
+              (sha256
+               (base32
+                "1fbrhqj22vzakn30j71fc41l8nliqbv1dmxm0zlwi2qjjbq6fwav"))))
+    (build-system texlive-build-system)
+    (arguments
+     '(#:tex-directory "latex/listings"
+       #:build-targets '("listings.ins")))
+    (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)
+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+)))
+
+(define-public texlive-latex-jknapltx
   (package
-    (name "texlive-fonts-adobe-zapfding")
+    (name "texlive-latex-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/"
-                                        "/fonts/type1/urw/zapfding/"))
+                                        "/tex/latex/jknapltx"))
                     (revision %texlive-revision)))
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "1sp3jblg3khp0yj121blvhph6ib09919kyrsk5x2lg258yypqyis"))))
+                "0m034x72f2g07icr50gacyxfb9g1lz2rmqh4kqr1qjb421x2kds9"))))
     (build-system trivial-build-system)
     (arguments
-     `(#:modules ((guix build utils)
-                  (ice-9 match))
+     `(#: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"      . "fonts/type1/urw/zapfding")
-                       ("zapf-afm"    . "fonts/afm/adobe/zapfding")
-                       ("zapf-tfm"    . "fonts/tfm/adobe/zapfding")
-                       ("urw-afm"     . "fonts/afm/urw/zapfding")
-                       ("urw35vf-tfm" . "fonts/tfm/urw35vf/zapfding")
-
-                       ("zapf-tex"    . "tex/latex/zapfding")
-                       ("dvips"       . "dvips/zapfding")
-                       ("fonts-map"   . "fonts/map/dvips/zapfding"))))
-           (for-each (match-lambda
-                       ((pkg . dir)
-                        (let ((target (string-append root dir)))
-                          (mkdir-p target)
-                          (copy-recursively (assoc-ref %build-inputs pkg)
-                                            target))))
-                     pkgs)
+         (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")
+    (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;
+@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)))
+
+(define-public texlive-fonts-ec
+  (package
+    (name "texlive-fonts-ec")
+    (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-base")))
+               ;; 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
-     `(("zapf-afm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/afm/adobe/zapfding"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-afm-" version "-checkout"))
-           (sha256
-            (base32
-             "0qvl4w1bfcpiakkd8rvkism46qnvzj9w7x4r8z9m0y7mspbkblyr"))))
-       ("zapf-tfm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/tfm/adobe/zapfding"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-tfm-" version "-checkout"))
-           (sha256
-            (base32
-             "1i8mh9xsl8l4cgsg3nl4ha9q6m55j122riclaxsvkc5ka83432qm"))))
-       ("urw-afm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/afm/urw/zapfding"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-urw-afm-" version "-checkout"))
-           (sha256
-            (base32
-             "0m4qndqh7ji723ff82c5c1q8ziqvblbaip7vx05vnl15fqbsnfx1"))))
-       ("urw35vf-tfm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/tfm/urw35vf/zapfding"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-urw35vf-tfm-" version "-checkout"))
-           (sha256
-            (base32
-             "167g2x6mpjfqh0w1fhjbw14qcx6ridrj2zm1bd8bi0l2d7phj28m"))))
-       ("zapf-tex"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/tex/latex/zapfding"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-tex-" version "-checkout"))
-           (sha256
-            (base32
-             "0hp7i8f6nbrg7irrwc8fd7n1hrzjysa84d6iyivwlc65v9p7lmd0"))))
-       ("dvips"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/dvips/zapfding/"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-dvips-" version "-checkout"))
-           (sha256
-            (base32
-             "1f18sc4qwxykd786zhn6szcrycqvpvfhlcim71aamxmwghakd7fa"))))
-       ("fonts-map"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/map/dvips/zapfding/"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-fonts-map-" version "-checkout"))
-           (sha256
-            (base32
-             "17kwxmdrgz2fb072hx57a3pidcrhbgayphx11zyld2hv9149pkyl"))))))
+     `(("texlive-bin" ,texlive-bin)
+       ("texlive-metafont-base" ,texlive-metafont-base)
+       ("texlive-cm" ,texlive-cm)))
+    (home-page "https://www.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.  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"))))
+
+;; 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")
+    (synopsis "Virtual fonts for T1 encoded CMR-fonts")
+    (description
+     "This package provides a set of virtual fonts which emulates T1 coded
+fonts using the standard CM fonts.  The package name, AE fonts, supposedly
+stands for \"Almost European\".  The main use of the package was to produce
+PDF files using Adobe Type 1 versions of the CM fonts instead of bitmapped EC
+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-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
+               "1a77w26m4c4j0202s1qkikz7ha6cxlv8zxhzi9s3l0x1l2pl7cr2")
+              #:trivial? #t))
+    (home-page "https://www.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
+contains the font (in both Adobe Type 1 and OpenType formats) in regular and
+bold weights, with additional glyphs and options to control slashed zero,
+upright quotes and a shapelier lower-case L, plus metric files for use with
+TeX, and LaTeX font definition and other relevant files.")
+    (license (list license:lppl1.3+
+                   license:silofl1.1
+                   license:asl2.0))))
+
+(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))
+    (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 Times font from
+Adobe's basic set.")
+    ;; No license version specified.
+    (license license:gpl3+)))
+
+(define-public texlive-fonts-adobe-times
+  (deprecated-package "texlive-fonts-adobe-times" texlive-times))
+
+(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))
+    (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 Palatino font from
+Adobe's basic set.")
+    ;; No license version specified.
+    (license license:gpl3+)))
+
+(define-public texlive-fonts-adobe-palatino
+  (deprecated-package "texlive-fonts-adobe-palatino" texlive-palatino))
+
+(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))
     (home-page "https://ctan.org/pkg/urw-base35")
     (synopsis "URW Base 35 font pack for LaTeX")
     (description
@@ -4666,6 +4865,9 @@ Adobe's basic set.")
     ;; No license version specified.
     (license license:gpl3+)))
 
+(define-public texlive-fonts-adobe-zapfding
+  (deprecated-package "texlive-fonts-adobe-zapfding" texlive-zapfding))
+
 (define-public texlive-fonts-rsfs
   (package
     (name "texlive-fonts-rsfs")
@@ -4700,7 +4902,7 @@ Adobe's basic set.")
                (setenv "MFINPUTS"
                        (string-append (getcwd) ":"
                                       mf "/share/texmf-dist/metafont/base:"
-                                      (assoc-ref inputs "texlive-fonts-cm")
+                                      (assoc-ref inputs "texlive-cm")
                                       "/share/texmf-dist/fonts/source/public/cm")))
              (mkdir "build")
              (for-each (lambda (font)
@@ -4729,7 +4931,7 @@ Adobe's basic set.")
     (native-inputs
      `(("texlive-bin" ,texlive-bin)
        ("texlive-metafont-base" ,texlive-metafont-base)
-       ("texlive-fonts-cm" ,texlive-fonts-cm)))
+       ("texlive-cm" ,texlive-cm)))
     (home-page "https://www.ctan.org/pkg/rsfs")
     (synopsis "Ralph Smith's Formal Script font")
     (description
@@ -4751,7 +4953,7 @@ one of the packages @code{calrsfs} and @code{mathrsfs}.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "1xvmms28mvvfpks9x7lfya2xhh5k8jy3qnlih1mzcnf156xnb89z"))))
+                "0y2y08kr3w6asm9lblj9yywqmhaal36fq71zzcbfsc7cvwf641q7"))))
     (build-system texlive-build-system)
     (arguments '(#:tex-directory "latex/eso-pic"))
     (home-page "https://www.ctan.org/pkg/eso-pic")
@@ -4813,7 +5015,7 @@ splines, and filled circles and ellipses.  The package uses @code{tpic}
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0q24b1bkdi9l6bw787bpggww83jh2vj8955aw2m5yccqbx4vgr5r"))))
+                "1vm9xp67hzif0pqab4r3ialf0cyhi0fa4p8kxgp1ymcf85pqip14"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -4845,7 +5047,7 @@ in the form @code{key=value} are available, for example:
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0qlxy47f1f8plgch3jqfsnrdgpyz20sz46yp33i2jwvf9hvfczf0"))))
+                "07vbcp6avdwldr870cwf65av2s9lfyzcpp8gpld53yw6lcxgaipj"))))
     (build-system texlive-build-system)
     (arguments '(#:tex-directory "latex/multirow"))
     (home-page "https://www.ctan.org/pkg/multirow")
@@ -4870,7 +5072,7 @@ entry at the \"natural\" width of its text.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "1rpx4ibjncj5416rg19v0xjbj3z9avhfdfn2gzp8r8sz9vz25c6g"))))
+                "1pr6ym3ad7x14ng7gmhsmywh3685d2cnm5qgyrqbigng2r6fcc1k"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -4906,7 +5108,7 @@ positions; a grid for orientation is available.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "14r6h9hqb0qgccxj5l1208694fx8sb8avmgzps36lsbbpszl7i7m"))))
+                "0j1fhm1m9k6rz80lmch3x44g20y9nm4abaaf8czb0q8hzwlx5aq5"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -5071,120 +5273,24 @@ 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-fonts-txfonts
+(define-public texlive-txfonts
   (package
-    (name "texlive-fonts-txfonts")
-    (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/txfonts"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0jl921qdphg8i7bkfprackn3xd4gmvxckc526nmzqsmahqkavgg2"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils)
-                  (ice-9 match))
-       #: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/txfonts")
-                       ("txfonts-vf"    . "fonts/tfm/public/txfonts")
-                       ("txfonts-afm"   . "fonts/afm/public/txfonts")
-                       ("txfonts-tfm"   . "fonts/tfm/public/txfonts")
-                       ("txfonts-type1" . "fonts/type1/public/txfonts")
-                       ("txfonts-enc"   . "fonts/enc/dvips/txfonts")
-                       ("txfonts-map"   . "fonts/map/dvips/txfonts"))))
-           (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))))
-    (native-inputs
-     `(("txfonts-tfm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/tfm/public/txfonts"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-tfm-" version "-checkout"))
-           (sha256
-            (base32
-             "12ffmbrp48ap35qa3b4mi6ckif9q2vf7972jxh5dc1yzykhla2xv"))))
-       ("txfonts-vf"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/vf/public/txfonts"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-vf-" version "-checkout"))
-           (sha256
-            (base32
-             "04acyfdwvxpfx4l2xh2bpzdmpvwdf2pzbs7a236b0xckz2jvc1ci"))))
-       ("txfonts-afm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/afm/public/txfonts"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-afm-" version "-checkout"))
-           (sha256
-            (base32
-             "1705klz51pnqzcs89s3521b84b6c89wlczflsh0vci66nl155yis"))))
-       ("txfonts-type1"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/type1/public/txfonts"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-type1-" version "-checkout"))
-           (sha256
-            (base32
-             "0ajwr7zb6ch3gxd0g8p2i4llhy2wr9a9saz6jq6hm6fxf4pgl5h3"))))
-       ("txfonts-map"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/map/dvips/txfonts"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-map-" version "-checkout"))
-           (sha256
-            (base32
-             "0kamr8a9x24jakas3v09dgv7kkpybj3i7qv4vz1iyypqr6kk1raj"))))
-       ("txfonts-enc"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/enc/dvips/txfonts"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-enc-" version "-checkout"))
-           (sha256
-            (base32
-             "1bal5fhw0xlhl37ayv8vlnqnsn1y82kadzfjhbgr223blspp4zsj"))))))
-    (home-page "https://www.ctan.org/pkg/threeparttable")
+    (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/"
+
+                    "/fonts/map/dvips/txfonts/"
+                    "/fonts/enc/dvips/txfonts/"
+                    "/tex/latex/txfonts/")
+              (base32
+               "017zjas5y1zlyq0iy4x6mv1qbz23xcy3y5xs0crj6zdnfvnccqgp")
+              #:trivial? #t))
+    (home-page "https://www.ctan.org/pkg/txfonts")
     (synopsis "Times-like fonts in support of mathematics")
     (description
      "Txfonts supplies virtual text roman fonts using Adobe Times (or URW
@@ -5202,6 +5308,9 @@ TeX metrics (VF and TFM files) and macros for use with LaTeX.")
     ;; Any version of the GPL with font exception.
     (license license:gpl3+)))
 
+(define-public texlive-fonts-txfonts
+  (deprecated-package "texlive-fonts-txfonts" texlive-txfonts))
+
 (define-public texlive-fonts-iwona
   (package
     (name "texlive-fonts-iwona")
@@ -5239,7 +5348,7 @@ TeX metrics (VF and TFM files) and macros for use with LaTeX.")
 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
-typesetting of newspapers and similar periodicals. The Iwona fonts are an
+typesetting of newspapers and similar periodicals.  The Iwona fonts are an
 alternative version of the Kurier fonts.  The difference lies in the absence
 of ink traps which typify the Kurier font.")
     (license license:gfl1.0)))
@@ -5350,7 +5459,7 @@ OT2 encoded fonts, CM bright shaped fonts and Concrete shaped fonts.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0sf18pc6chgy26p9bxxn44xcqhzjrfb53jxjr2y7l3jb6xllhblq"))))
+                "1xyd57c8z1xi0kbqpbad61flcazz68i9ssxrag0gjvci3irxi8xh"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -5379,7 +5488,7 @@ than the bitmaps Metafont creates.")
               (uri (texlive-ref "latex" "acmart"))
               (sha256
                (base32
-                "0n62cs8dhcbn29y9ij1nnyigzr76yhk36kyahhqkkmvbafbys9s7"))
+                "18rl67p2zhngskisnhv78mksv8q8q658l6igkswzswldixmkpphq"))
               (file-name (string-append name "-" version "-checkout"))))
     (build-system texlive-build-system)
     (arguments '(#:tex-directory "latex/acmart"))
@@ -5617,7 +5726,7 @@ e-TeX.")
            (file-name (string-append name "-map-" version "-checkout"))
            (sha256
             (base32
-             "18jvcm0vwpg6wwzijvnb92xx78la45kkh71k6l44425krp2vnwm0"))))))
+             "03rfif2631pgd8g1ar4xblcdh078kky7fvw3kfsj5a47rxxgicp2"))))))
     (home-page "https://www.ctan.org/pkg/pdftex")
     (synopsis "TeX extension for direct creation of PDF")
     (description
@@ -5628,7 +5737,7 @@ directly generate PDF documents instead of DVI.")
 (define texlive-texmf
   (package
    (name "texlive-texmf")
-   (version "20180414")
+   (version "20190410")
    (source texlive-texmf-src)
    (build-system gnu-build-system)
    (inputs
@@ -5705,7 +5814,7 @@ This package contains the complete tree of texmf-dist data.")
 (define-public texlive
   (package
    (name "texlive")
-   (version "20180414")
+   (version "20190410")
    (source #f)
    (build-system trivial-build-system)
    (inputs `(("bash" ,bash) ; for wrap-program
@@ -5809,6 +5918,9 @@ values (strings, macros, or numbers) pasted together.")
 
 (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.12")
     (source (origin
@@ -5819,7 +5931,8 @@ values (strings, macros, or numbers) pasted together.")
               (file-name (git-file-name name version))
               ;; TODO: Patch awaiting inclusion upstream (see:
               ;; https://github.com/plk/biber/issues/239).
-              (patches (search-patches "biber-fix-encoding-write.patch"))
+              (patches (search-patches "biber-fix-encoding-write.patch"
+                                       "biber-sortinithash.patch"))
               (sha256
                (base32
                 "1g1hi6zvf2hmrjly1sidjaxy5440gfqm4p7p3n7kayshnjsmlskx"))))
@@ -5894,22 +6007,30 @@ other things it comes with full Unicode support.")
 (define-public rubber
   (package
     (name "rubber")
-    (version "1.1")
+    (version "1.5.1")
     (source (origin
-             (method url-fetch)
-             (uri (list (string-append "https://launchpad.net/rubber/trunk/"
-                                       version "/+download/rubber-"
-                                       version ".tar.gz")
-                        (string-append "http://ebeffara.free.fr/pub/rubber-"
-                                       version ".tar.gz")))
-             (sha256
-              (base32
-               "1xbkv8ll889933gyi2a5hj7hhh216k04gn8fwz5lfv5iz8s34gbq"))))
-    (build-system gnu-build-system)
-    (arguments '(#:tests? #f))                    ; no `check' target
-    (inputs `(("texinfo" ,texinfo)
-              ("python" ,python-2) ; incompatible with Python 3 (print syntax)
-              ("which" ,which)))
+              (method url-fetch)
+              (uri (list (string-append "https://launchpad.net/rubber/trunk/"
+                                        version "/+download/rubber-"
+                                        version ".tar.gz")
+                         (string-append "http://ebeffara.free.fr/pub/rubber-"
+                                        version ".tar.gz")))
+              (sha256
+               (base32
+                "178dmrp0mza5gqjiqgk6dqs0c10s0c517pk6k9pjbam86vf47a1p"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:tests? #f ; no `check' target
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'build)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; texlive is required to build the PDF documentation; do not
+             ;; build it.
+             (invoke "python" "setup.py" "build" "--pdf=False" "install"
+                     (string-append "--prefix=" (assoc-ref outputs "out"))))))))
+    (native-inputs `(("texinfo" ,texinfo)))
     (home-page "https://launchpad.net/rubber")
     (synopsis "Wrapper for LaTeX and friends")
     (description
@@ -5988,8 +6109,7 @@ develop documents with LaTeX, in a single application.")
              (delete-file "book.pdf")
              #t)))))
     (native-inputs
-     `(("texlive" ,(texlive-union (list texlive-latex-amsfonts
-                                        texlive-fonts-amsfonts
+     `(("texlive" ,(texlive-union (list texlive-amsfonts
                                         texlive-fonts-adobe-palatino
                                         texlive-fonts-adobe-zapfding
                                         texlive-fonts-knuth-lib
@@ -6006,93 +6126,63 @@ and Karl Berry.")
 (define-public lyx
   (package
     (name "lyx")
-    (version "2.3.2-2")
+    (version "2.3.5.1")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://ftp.lyx.org/pub/lyx/stable/"
+              (uri (string-append "https://ftp.lyx.org/pub/lyx/stable/"
                                   (version-major+minor version) ".x/"
-                                  name "-" version ".tar.gz"))
+                                  "lyx-" version ".tar.xz"))
               (sha256
                (base32
-                "0vr0qwis6rhind6azfa270hqxci7rj8qb1kk5x6lm80mc34nvrqi"))
+                "0mv32s26igm0pd8vs7d2mk1240dpr83y0a2wyh3xz6b67ph0w157"))
               (modules '((guix build utils)))
               (snippet
                '(begin
                   (delete-file-recursively "3rdparty")
                   #t))))
-    (build-system cmake-build-system)
+    (build-system qt-build-system)
     (arguments
      `(#:configure-flags `("-DLYX_USE_QT=QT5"
                            "-DLYX_EXTERNAL_BOOST=1"
                            "-DLYX_INSTALL=1"
                            "-DLYX_RELEASE=1"
+                           "-DLYX_PROGRAM_SUFFIX=OFF"
                            ,(string-append "-DLYX_INSTALL_PREFIX="
-                                           (assoc-ref %outputs "out")
-                                           ;; Exact name and level is necessary.
-                                           "/lyx" ,(version-major+minor version)))
+                                           (assoc-ref %outputs "out")))
        #:phases
        (modify-phases %standard-phases
-         ;; See ;; https://www.lyx.org/trac/changeset/3a123b90af838b08680471d87170c38e56787df9/lyxgit
-         (add-after 'unpack 'fix-compilation-with-boost-1.69
-           (lambda _
-             (substitute* "src/support/FileName.cpp"
-               (("^template struct boost::detail::crc_table_t.*") ""))
-             #t))
          (add-after 'unpack 'patch-python
            (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* '("src/support/os.cpp")
+             (substitute* '("lib/configure.py"
+                            "src/support/ForkedCalls.cpp"
+                            "src/support/Systemcall.cpp"
+                            "src/support/os.cpp"
+                            "src/support/filetools.cpp")
                (("\"python ")
                 (string-append "\""
                                (assoc-ref inputs "python")
-                               "/bin/python ")))
+                               "/bin/python3 ")))
              #t))
-         (add-after 'patch-python 'patch-desktop-file
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "lib/lyx.desktop.in"
-               (("Exec=")
-                (string-append "Exec="
-                               (assoc-ref outputs "out")
-                               "/")))
-             #t))
-         (add-before 'check 'setenv-check
+         (add-after 'unpack 'add-missing-test-file
            (lambda _
              ;; Create missing file that would cause tests to fail.
-             (with-output-to-file (string-append "../lyx-"
-                                                 ,version
-                                                 "/src/tests/check_layout.cmake")
+             (with-output-to-file "src/tests/check_layout.cmake"
                (const #t))
-             (setenv (string-append "LYX_DIR_"
-                                    (string-join
-                                      (string-split
-                                        ,(version-major+minor version) #\-)) "x")
-                     (string-append (getcwd) "/../lyx-" ,version "/lib"))
-             #t))
-         (add-after 'install 'install-symlinks
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (mkdir-p (string-append out "/bin"))
-               (symlink (string-append "../lyx" ,(version-major+minor version)
-                                       "/bin/lyx" ,(version-major+minor version))
-                        (string-append out "/bin/lyx" ,(version-major+minor version)))
-               #t))))))
+             #t)))))
     (inputs
      `(("boost" ,boost)
        ("hunspell" ,hunspell)           ; Note: Could also use aspell instead.
        ("libx11" ,libx11)
        ("mythes" ,mythes)
-       ("python" ,python-2)
+       ("python" ,python)
        ("qtbase" ,qtbase)
        ("qtsvg" ,qtsvg)
        ("zlib" ,zlib)))
     (propagated-inputs
      `(("texlive" ,(texlive-union (list texlive-fonts-ec)))))
-    ;; FIXME: Python 3.7.0 cannot be used because the test infrastructure
-    ;; "requires a bytes-like object, not 'str'".  This may be fixed with
-    ;; upgrades to Python.
     (native-inputs
-     `(("python" ,python-2)
-       ("pkg-config" ,pkg-config)
-       ("bc" ,bc)))
+     `(("python" ,python)
+       ("pkg-config" ,pkg-config)))
     (home-page "https://www.lyx.org/")
     (synopsis "Document preparation system with GUI")
     (description "LyX is a document preparation system.  It excels at letting
@@ -6116,7 +6206,7 @@ required: automatic sectioning and pagination, spell checking and so forth.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0lhb2h5hxjq9alpk4r3gvg21pwyifs4ah6hqzp92k55mkp1xv73j"))))
+                "0s86v2b6b1vky1svmmn8pn0l2gz3v280mvjbr2d9l2sjyarlgz9w"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -6156,7 +6246,7 @@ specification.  It replaces the now obsolete @code{movie15} package.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0zp00jg058djx8xp0xqwas92y3j97clkyd8z6pqr890yqy06myqb"))))
+                "1yhp51w8yr10c10pc9196q7hlw80brzqinnqbjw81d0sf2p0llc5"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -6250,6 +6340,7 @@ page, a new page will be started.")
      (origin
        (method svn-fetch)
        (uri (texlive-ref "latex" "changepage"))
+       (file-name (string-append name "-" version "-checkout"))
        (sha256
         (base32
          "1rpw8xg5p4jsyh236jma9dz3l29wjx4062f154b3wak5yjcxyxyb"))))
@@ -6356,7 +6447,7 @@ striking out (line through words) and crossing out (/// over words).")
        (file-name (string-append name "-" version "-checkout"))
        (sha256
         (base32
-         "1dq8p10pz8wn0vx412m7d7d5gj1syxly3yqdqvf7lv2xl8zndn5h"))))
+         "1dscrgwyr71vgx35mzb316xl669arzagfgq50fdv3nxga63959b3"))))
     (build-system trivial-build-system)
     (native-inputs
      `(("texlive-latex-pgf-generic"
@@ -6370,7 +6461,7 @@ striking out (line through words) and crossing out (/// over words).")
            (file-name (string-append "texlive-latex-pgf-generic" version "-checkout"))
            (sha256
             (base32
-             "0xkxw26sjzr5npjpzpr28yygwdbhzpdd0hsk80gjpidhcxmz393i"))))))
+             "0hk5x2j15n4pps279cmkbjl1dvhasq3mbhna5xdvp2qgh635ahks"))))))
     (propagated-inputs
      `(("texlive-latex-xcolor" ,texlive-latex-xcolor)))
     (arguments
@@ -6414,7 +6505,7 @@ produce either PostScript or PDF output.")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0nqwf0sr4mf3v9gqa6apv6ml2xhcdwax0vgyf12a672g7rpdyvgm"))))
+                "1vz9zg7s5w52xr323zgglzprfrvba2zvyzf6b8vrdf4wdghlpv4z"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils)
@@ -6474,7 +6565,7 @@ typearea (which are the main parts of the bundle).")
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0hs28fc0v2l92ad9las9b8xcckyrdrwmyhcx1yzmbr6s7s6nvsx8"))))
+                "1x4wnpca97rnbvvg6wjmbkxxvnfva274q9ahzx746b435q93z3i1"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -6584,147 +6675,70 @@ in places where the standard @code{verbatim} environment (which is based on a
               (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")
-    (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.")
-    ;; No version of the GPL is specified.
-    (license license:gpl3+)))
-
-(define-public texlive-generic-xypic
-  (package
-    (name "texlive-generic-xypic")
-    (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/xypic"))
-             (revision %texlive-revision)))
-       (file-name (string-append name "-" version "-checkout"))
-       (sha256
-        (base32
-         "1g5cyxwdfznq4lk9zl6fkjkapmhmwd2cm4m5aibxj20qgwnaggfz"))))
-    (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/xypic")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/xypic")
-    (synopsis "Flexible diagramming macros for TeX")
-    (description
-     "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).")
-    (license license:gpl3+)))
-
-(define-public texlive-fonts-xypic
-  (package
-    (name "texlive-fonts-xypic")
-    (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/xypic"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0p20v1257kwsqnrk98cdhhiz2viv8l3ly4xay4by0an3j37m9xs3"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils)
-                  (ice-9 match))
-       #:builder
-       (begin
-         (use-modules (guix build utils)
-                      (ice-9 match))
-         (let ((root (string-append (assoc-ref %outputs "out")
-                                    "/share/texmf-dist/"))
-               (pkgs '(("source" . "fonts/source/public/xypic")
-                       ("xypic-afm" . "fonts/afm/public/xypic")
-                       ("xypic-type1" . "fonts/type1/public/xypic")
-                       ("xypic-enc" . "fonts/enc/dvips/xypic"))))
-           (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))))
-    (native-inputs
-     `(("xypic-afm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/afm/public/xypic"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-afm-" version "-checkout"))
-           (sha256
-            (base32
-             "149xdijxp8lw3s0qv2aqxxxyyn748z57dpr596rjvkqdffpnsddh"))))
-       ("xypic-type1"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/type1/public/xypic"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-type1-" version "-checkout"))
-           (sha256
-            (base32
-             "1bln89wib7g3hcv2jny3qi6jb73k9d2vbgx3wnnjwp3ryg0846if"))))
-       ("xypic-enc"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/enc/dvips/xypic"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-enc-" version "-checkout"))
-           (sha256
-            (base32
-             "0yi8vms3203l3p5slnhrrlzzp0f0jw77fkcvcaicrz2vmw9z99x7"))))))
-    (home-page "https://www.ctan.org/pkg/xypic")
-    (synopsis "Fonts for XY-pic")
-    (description "This package provides the XY-pic fonts.")
+                "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")
+    (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.")
+    ;; No version of the GPL is specified.
     (license license:gpl3+)))
 
+(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
+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+))))
+
+(define-public texlive-fonts-xypic
+  (deprecated-package "texlive-fonts-xypic" texlive-xypic))
+
+(define-public texlive-generic-xypic
+  (deprecated-package "texblive-generic-xypic" texlive-xypic))
+
 (define-public texlive-bibtex
   (package
     (name "texlive-bibtex")
@@ -6740,7 +6754,7 @@ TeX).")
        (file-name (string-append name "-" version "-checkout"))
        (sha256
         (base32
-         "0hnbs0s1znbn32hfcsyijl39z81sdb00jf092a4blqz421qs2mbv"))))
+         "1wijqq605cbhn2bdaryby3xpkwmnk9ixcrjn5zwlfrxbgfblzfmz"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -6761,74 +6775,29 @@ be specified in the document itself (one often needs a LaTeX citation-style
 package, such as @command{natbib} as well).")
     (license license:knuth)))
 
-(define-public texlive-fonts-charter
+(define-public texlive-charter
   (package
-    (name "texlive-fonts-charter")
-    (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/type1/bitstrea/charter"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0yvib45xxff3jm5270zij4q888pivbc18cqs7lz4pqfhn1am4wnv"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils)
-                  (ice-9 match))
-       #:builder
-       (begin
-         (use-modules (guix build utils)
-                      (ice-9 match))
-         (let ((root (string-append (assoc-ref %outputs "out")
-                                    "/share/texmf-dist/"))
-               (pkgs '(("source" . "fonts/type1/bitstrea/charter")
-                       ("charter-afm" . "fonts/afm/bitstrea/charter")
-                       ("charter-tfm" . "fonts/tfm/bitstrea/charter"))))
-           (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))))
-    (native-inputs
-     `(("charter-afm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/afm/bitstrea/charter"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-afm-" version "-checkout"))
-           (sha256
-            (base32
-             "02nbkqrlr3vypnzslmr7dxg1353mmc0rl4ynx0s6qbvf313fq76a"))))
-       ("charter-tfm"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/fonts/tfm/bitstrea/charter"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-tfm-" version "-checkout"))
-           (sha256
-            (base32
-             "0j7ci9vprivbhac70aq0z7m23hqcpx1g0i3wp1k0h8ilhimj80xk"))))))
+    (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))
     (home-page "https://www.ctan.org/pkg/charter")
     (synopsis "Charter fonts for TeX")
-    (description "A commercial text font donated for the common good.  Support
-for use with LaTeX is available in @code{freenfss}, part of
+    (description "This package provides a copy of the Charter Type-1 fonts
+which Bitstream contributed to the X consortium, renamed for use with TeX.
+Support for use with LaTeX is available in @code{freenfss}, part of
 @command{psnfss}. ")
-    (license (license:non-copyleft (string-append "http://mirrors.ctan.org/"
-                                                  "fonts/charter/readme.charter")))))
+    (license (license:non-copyleft
+              "http://mirrors.ctan.org/fonts/charter/readme.charter"))))
+
+(define-public texlive-fonts-charter
+  (deprecated-package "texlive-fonts-charter" texlive-charter))
 
 (define-public texlive-context-base
   (package
@@ -6844,7 +6813,7 @@ for use with LaTeX is available in @code{freenfss}, part of
               (file-name (string-append name "-" version "-checkout"))
               (sha256
                (base32
-                "0rlx4qqijms1n64gjx475kvip8l322fh7v17zkmwp1l1g0w3vlyz"))))
+                "0d7d74giz5knvj4rj6mbzd6c05mwg9jrxab86jxdqbc3jy7cl4kz"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -6863,56 +6832,20 @@ supports advanced interactive documents.  See the ConTeXt garden for a wealth
 of support information.")
     (license license:gpl2+)))
 
-(define-public texlive-latex-beamer
+(define-public texlive-beamer
   (package
-    (name "texlive-latex-beamer")
-    (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/beamer"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "09y3qwbj0nckshvg9afgwcv9v3zdif1d7bnpzrggsa1fbr80mgk2"))))
-    (build-system trivial-build-system)
-    (outputs '("out" "doc"))
-    (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/beamer"))
-               (docs   (string-append (assoc-ref %outputs "doc")
-                                      "/share/texmf-dist/doc/latex/beamer/")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-
-           (mkdir-p docs)
-           (copy-recursively (assoc-ref %build-inputs "docs") docs)
-           #t))))
+    (inherit (simple-texlive-package
+              "texlive-beamer"
+              (list "/doc/latex/beamer/"
+                    "/tex/latex/beamer/")
+              (base32
+               "1fqzbkmw2kfxihab8j4dadc3v68xap6v2ghpp2064fna47xlwy1c")
+              #:trivial? #t))
     (propagated-inputs
      `(("texlive-latex-hyperref" ,texlive-latex-hyperref)
        ("texlive-latex-oberdiek" ,texlive-latex-oberdiek)
        ("texlive-latex-etoolbox" ,texlive-latex-etoolbox)
        ("texlive-latex-pgf" ,texlive-latex-pgf)))
-    (native-inputs
-     `(("docs"
-        ,(origin
-           (method svn-fetch)
-           (uri (svn-reference
-                 (url (string-append "svn://www.tug.org/texlive/tags/"
-                                     %texlive-tag "/Master/texmf-dist/"
-                                     "/doc/latex/beamer"))
-                 (revision %texlive-revision)))
-           (file-name (string-append name "-" version "-checkout"))
-           (sha256
-            (base32
-             "102b18b9nw9dicqqgjwx0srh1mav8vh9wdvwayn741niza9hac23"))))))
     (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.
@@ -6928,6 +6861,9 @@ effects, varying slide transitions and animations.")
     ;; dual-licensed under either FDLv1.3+ or LPPL1.3c+.
     (license (list license:lppl1.3c+ license:gpl2+ license:fdl1.3+))))
 
+(define-public texlive-latex-beamer
+  (deprecated-package "texlive-latex-beamer" texlive-beamer))
+
 (define-public texlive-latex-xmpincl
   (package
     (name "texlive-latex-xmpincl")
@@ -6936,6 +6872,7 @@ effects, varying slide transitions and animations.")
      (origin
        (method svn-fetch)
        (uri (texlive-ref "latex" "xmpincl"))
+       (file-name (string-append name "-" version "-checkout"))
        (sha256
         (base32
          "0lq3dfb4fsw955gjwllnk7cg00ciq5mva64mlpbva6g2jz117734"))))
@@ -6958,9 +6895,10 @@ the file to which it applies.")
      (origin
        (method svn-fetch)
        (uri (texlive-ref "latex" "pdfx"))
+       (file-name (string-append name "-" version "-checkout"))
        (sha256
         (base32
-         "0ikxg8yzq78hy5b9x13d4nah46d0yvmwlqmdri06pygbx116dcac"))))
+         "18294h0cr05fs424m3x6aq24z5hf5zmiflalkj4kvpmsyyqqsj74"))))
     (build-system texlive-build-system)
     (arguments
      '(#:tex-directory "latex/pdfx"
@@ -6994,10 +6932,451 @@ the file to which it applies.")
            (file-name (string-append "texlive-tex-latex-pdfx-" version "-checkout"))
            (sha256
             (base32
-             "14j1zsvqc59ims3sk34v6km8db6cimks28y5fcxcr5mi2ykvj4vf"))))))
+             "171ffvpkj2fab4ljcxv3l6l5c8ga8zavdhmhfq07id8zyyr619ip"))))))
     (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, PFD/A and other
+     "This package helps LaTeX users to create PDF/X, PDF/A and other
 standards-compliant PDF documents with pdfTeX, LuaTeX and XeTeX.")
     (license license:lppl1.2+)))
+
+(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 outputs #:allow-other-keys)
+                 (let* ((share (string-append (assoc-ref outputs "out")
+                                              "/share/texmf-dist"))
+                        (target (string-append share "/tex/generic/ydoc"))
+                        (doc (string-append (assoc-ref outputs "doc")
+                                            "/share/texmf-dist/doc") ))
+                   (mkdir-p target)
+                   (for-each
+                    (lambda (file)
+                      (rename-file (string-append share "/tex/latex/ydoc/" file)
+                                   (string-append target "/" file)))
+                    '("ydocincl.tex" "ydocstrip.tex"))
+                   (mkdir-p doc)
+                   (rename-file (string-append share "/doc") doc)
+                   #t)))))))
+      (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
+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+))))
+
+(define-public texlive-pstricks
+  (let ((template (simple-texlive-package
+                   "texlive-pstricks"
+                   (list "/doc/generic/pstricks/"
+                         "/dvips/pstricks/"
+                         "/tex/generic/pstricks/"
+                         "/tex/latex/pstricks/")
+                   (base32
+                    "0sdxdd0qi4sccw9il7d4s7jivs24pq99cdzfnrf0gkqjb1y8s7cl")
+                   #: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+))))
+
+(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
+       `(("texlive-pstricks" ,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
+a different path and manipulating characters.  It includes the functionality
+of the old package @code{pst-char}.")
+      (license license:lppl))))
+
+(define-public texlive-marginnote
+  (let ((template (simple-texlive-package
+                   "texlive-marginnote"
+                   (list "/source/latex/marginnote/marginnote.dtx")
+                   (base32
+                    "1vj1k8xm11gjdfj60as42d8lsv3dbzrm5dlgqcfk89d9dzm3k39j"))))
+    (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
+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/iftex.sty")
+                   (base32
+                    "089zvw31gby150n1k0zdk2c0q97pgbqs46phxydaqil64b55nnl7")
+                   #: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-public texlive-tools
+  (let ((template (simple-texlive-package
+                   "texlive-tools"
+                   (list "/doc/latex/tools/"
+                         "/source/latex/tools/")
+                   (base32
+                    "1ivhij7171wvrgcjn4wah84wxwpd21d0chh3zxab4pj067c8d0mh"))))
+    (package
+      (inherit template)
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/tools")
+         ((#:build-targets _ '())
+          ''("tools.ins"))
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (add-after 'unpack 'chdir
+               (lambda _ (chdir "source/latex/tools") #t))))))
+      (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
+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},
+@code{ftnright}, @code{hhline}, @code{indentfirst}, @code{layout},
+@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+))))
+
+(define-public texlive-latex-xkeyval
+  (package
+    (name "texlive-latex-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
+                "0wancavix39j240pd8m9cgmwsijwx6jd6n54v8wg0x2rk5m44myp"))))
+    (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))))))
+    (native-inputs
+     `(("texlive-latex-base" ,texlive-latex-base)
+       ("texlive-cm" ,texlive-cm)
+       ("texlive-lm" ,texlive-lm)
+       ("texlive-url" ,texlive-url)
+       ("texlive-graphics-def" ,texlive-graphics-def)
+       ("texlive-xcolor" ,texlive-xcolor)
+       ("texlive-latex-footmisc" ,texlive-latex-footmisc)
+       ("texlive-latex-listings" ,texlive-latex-listings)
+       ("texlive-iftex" ,texlive-iftex)
+       ("texlive-pstricks" ,texlive-pstricks)
+       ("texlive-pst-text" ,texlive-pst-text)
+       ("texlive-tools" ,texlive-tools)
+       ("texlive-latex-pgf" ,texlive-latex-pgf)))
+    (home-page "http://www.ctan.org/pkg/xkeyval")
+    (synopsis "Extension of the 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.
+The package allows the programmer to specify a prefix to the name of the
+macros it defines for keys, and to define families of key definitions; these
+all help use in documents where several packages define their own sets of
+keys.")
+    (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"))))
+    (build-system texlive-build-system)
+    (arguments '(#:tex-directory "latex/standalone"))
+    (propagated-inputs
+     `(("texlive-latex-xkeyval" ,texlive-latex-xkeyval)))
+    (native-inputs
+     `(("texlive-ydoc" ,texlive-ydoc)))
+    (home-page "http://www.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.")
+    (license license:lppl1.3+)))
+
+(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")
+             (base32
+              "11kf6znkgw7y5qmw75qk6px6pqf57bwr53q0673zaiyq20lif96c")))
+    (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
+     `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel)
+       ("texlive-latex-l3packages" ,texlive-latex-l3packages)))
+    (home-page "http://www.ctan.org/pkg/siunitx")
+    (synopsis "Comprehensive SI units package")
+    (description
+     "Typesetting values with units requires care to ensure that the combined
+mathematical meaning of the value plus unit combination is clear.  In
+particular, the SI units system lays down a consistent set of units with rules
+on how they are to be used.  However, different countries and publishers have
+differing conventions on the exact appearance of numbers (and units).  A
+number of LaTeX packages have been developed to provide consistent application
+of the various rules.  The @code{siunitx} package takes the best from the
+existing packages, and adds new features and a consistent interface.  A number
+of new ideas have been incorporated, to fill gaps in the existing provision.
+The package also provides backward-compatibility with @code{SIunits},
+@code{sistyle}, @code{unitsdef} and @code{units}.  The aim is to have one
+package to handle all of the possible unit-related needs of LaTeX users.")
+    (license license:lppl1.3c)))
+
+(define-public texlive-booktabs
+  (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
+         "1dqid48vgh25wmw8xzmx6x3pfgz1y9f0r8aza1yxq2mjny5yf68x"))))
+    (build-system texlive-build-system)
+    (arguments '(#:tex-directory "latex/booktabs"))
+    (home-page "http://www.ctan.org/pkg/booktabs")
+    (synopsis "Publication quality tables in LaTeX")
+    (description
+     "This package enhances the quality of tables in LaTeX, providing extra
+commands as well as behind-the-scenes optimisation.  Guidelines are given as
+to what constitutes a good table in this context.  The package offers
+@code{longtable} compatibility.")
+    (license license:lppl1.3+)))
+
+(define-public texlive-csquotes
+  (let ((template (simple-texlive-package
+                   "texlive-csquotes"
+                   (list "/doc/latex/csquotes/"
+                         "/tex/latex/csquotes/")
+                   (base32
+                    "088gvi60d7sdl6fgg68fbz30fnpqc3yrpkx80sfw7vwgar3wm3av")
+                   #:trivial? #t)))
+    (package
+      (inherit template)
+      (propagated-inputs
+       `(("texlive-etoolbox" ,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
+       `(("texlive-etoolbox" ,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))))
+
+(define-public texlive-biblatex
+  (let ((template (simple-texlive-package
+                   "texlive-biblatex"
+                   (list "/doc/latex/biblatex/"
+                         "/tex/latex/biblatex/")
+                   (base32
+                    "11kzvny50iklzkamr0rqd5x532q8rxny1xhmf96jl8mzj1d2zmay")
+                   #:trivial? #t)))
+    (package
+      (inherit template)
+      (propagated-inputs
+       `(("texlive-logreq" ,texlive-logreq)
+         ("texlive-url" ,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))))