gnu: texlive-dvips: Implement with simple-texlive-package.
[jackhill/guix/guix.git] / gnu / packages / tex.scm
CommitLineData
eb0119ef 1;;; GNU Guix --- Functional package management for GNU
4a6635f3 2;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
42e1394b 3;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
d2e84281 4;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
4791876c 5;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
e5a03489 6;;; Copyright © 2016, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
2d634d9b 7;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
bd917486 8;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
d68c8017 9;;; Copyright © 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
149f6688 10;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
594156ec 11;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
585be42f 12;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
ec40a050 13;;; Copyright © 2018 Danny Milosavljevic <dannym+a@scratchpost.org>
a9fda571 14;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
eb0119ef
AE
15;;;
16;;; This file is part of GNU Guix.
17;;;
18;;; GNU Guix is free software; you can redistribute it and/or modify it
19;;; under the terms of the GNU General Public License as published by
20;;; the Free Software Foundation; either version 3 of the License, or (at
21;;; your option) any later version.
22;;;
23;;; GNU Guix is distributed in the hope that it will be useful, but
24;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26;;; GNU General Public License for more details.
27;;;
28;;; You should have received a copy of the GNU General Public License
29;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30
8f9ac901 31(define-module (gnu packages tex)
b5b73a82 32 #:use-module ((guix licenses) #:prefix license:)
eb0119ef
AE
33 #:use-module (guix packages)
34 #:use-module (guix download)
ec40a050 35 #:use-module (guix build-system cmake)
eb0119ef 36 #:use-module (guix build-system gnu)
ebcf74da 37 #:use-module (guix build-system perl)
0aa34e82 38 #:use-module (guix build-system trivial)
205794c8 39 #:use-module (guix build-system texlive)
6b5eb840 40 #:use-module (guix utils)
83457fe0 41 #:use-module (guix git-download)
9d913b25 42 #:use-module (guix svn-download)
eb0119ef 43 #:use-module (gnu packages)
ec40a050 44 #:use-module (gnu packages algebra)
83457fe0 45 #:use-module (gnu packages autotools)
0aa34e82 46 #:use-module (gnu packages bash)
ec40a050 47 #:use-module (gnu packages boost)
eb0119ef 48 #:use-module (gnu packages compression)
a86177d6 49 #:use-module (gnu packages fontutils)
fd89b36b 50 #:use-module (gnu packages gd)
eb0119ef 51 #:use-module (gnu packages ghostscript)
769bb5e5 52 #:use-module (gnu packages graphviz)
fd89b36b 53 #:use-module (gnu packages gtk)
eb0119ef 54 #:use-module (gnu packages icu4c)
e55354b8 55 #:use-module (gnu packages image)
ec40a050 56 #:use-module (gnu packages libreoffice)
0aa34e82 57 #:use-module (gnu packages lua)
0256c746 58 #:use-module (gnu packages multiprecision)
eb0119ef
AE
59 #:use-module (gnu packages pdf)
60 #:use-module (gnu packages perl)
5ccde207 61 #:use-module (gnu packages perl-check)
eb0119ef
AE
62 #:use-module (gnu packages pkg-config)
63 #:use-module (gnu packages python)
5327e912 64 #:use-module (gnu packages python-xyz)
4791876c 65 #:use-module (gnu packages qt)
b32c8549 66 #:use-module (gnu packages ruby)
b7194849 67 #:use-module (gnu packages shells)
ce0614dd 68 #:use-module (gnu packages base)
d4000680
RW
69 #:use-module (gnu packages web)
70 #:use-module (gnu packages xml)
c0589f75 71 #:use-module (gnu packages xorg)
ece9b417 72 #:use-module (gnu packages xdisorg)
6b5eb840
AE
73 #:autoload (gnu packages texinfo) (texinfo)
74 #:use-module (ice-9 ftw)
cb7bc20a 75 #:use-module (ice-9 match)
e93f472d 76 #:use-module ((srfi srfi-1) #:hide (zip)))
eb0119ef 77
8ab600f8
RW
78(define* (simple-texlive-package name locations hash
79 #:key trivial?)
80 "Return a template for a simple TeX Live package with the given NAME,
81downloading from a list of LOCATIONS in the TeX Live repository, and expecting
82the provided output HASH. If TRIVIAL? is provided, all files will simply be
83copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used."
84 (define with-documentation?
85 (and trivial?
86 (any (lambda (location)
87 (string-prefix? "/doc" location))
88 locations)))
89 (package
90 (name name)
91 (version (number->string %texlive-revision))
92 (source (texlive-origin name version
93 locations hash))
94 (outputs (if with-documentation?
95 '("out" "doc")
96 '("out")))
97 (build-system (if trivial?
98 gnu-build-system
99 texlive-build-system))
100 (arguments
101 (let ((copy-files
102 `(lambda* (#:key outputs inputs #:allow-other-keys)
103 (let (,@(if with-documentation?
104 `((doc (string-append (assoc-ref outputs "doc")
105 "/share/texmf-dist/")))
106 '())
107 (out (string-append (assoc-ref outputs "out")
108 "/share/texmf-dist/")))
109 ,@(if with-documentation?
110 '((mkdir-p doc)
111 (copy-recursively
112 (string-append (assoc-ref inputs "source") "/doc")
113 (string-append doc "/doc")))
114 '())
115 (mkdir-p out)
116 (copy-recursively (assoc-ref inputs "source") out)
117 ,@(if with-documentation?
118 '((delete-file-recursively (string-append out "/doc")))
119 '())
120 #t))))
121 (if trivial?
122 `(#:tests? #f
123 #:phases
124 (modify-phases %standard-phases
125 (delete 'configure)
126 (replace 'build (const #t))
127 (replace 'install ,copy-files)))
128 `(#:phases
129 (modify-phases %standard-phases
130 (add-after 'install 'copy-files ,copy-files))))))
131 (home-page #f)
132 (synopsis #f)
133 (description #f)
134 (license #f)))
135
28e521e9
RW
136(define hyph-utf8-scripts
137 (origin
138 (method svn-fetch)
139 (uri (texlive-ref "generic" "hyph-utf8"))
140 (file-name (string-append "hyph-utf8-scripts-"
141 (number->string %texlive-revision)
142 "-checkout"))
143 (sha256
144 (base32
145 "1ix8h637hwhz4vrdhilf84kzzdza0wi8fp26nh7iws0bq08sl517"))))
146
cf4c07b9
RW
147(define (texlive-hyphen-package name code locations hash)
148 (let ((parent (simple-texlive-package
149 name locations hash #:trivial? #t)))
150 (package
151 (inherit parent)
152 (arguments
153 (substitute-keyword-arguments (package-arguments parent)
154 ((#:modules _ '())
155 '((guix build gnu-build-system)
156 (guix build utils)
157 (ice-9 match)))
158 ((#:phases phases)
159 `(modify-phases ,phases
160 (replace 'build
161 (lambda* (#:key inputs outputs #:allow-other-keys)
162 (let* ((out (assoc-ref outputs "out"))
163 (root (string-append out "/share/texmf-dist"))
164 (patterns
165 (string-append root "/tex/generic/hyph-utf8/patterns/txt/"))
166 (loaders
167 (string-append root "/tex/generic/hyph-utf8/loadhyph"))
168 (ptex
169 (string-append root "/tex/generic/hyph-utf8/patterns/ptex"))
170 (filter-expression
171 (match ',code
172 ((? string?)
173 (format #f "\nlanguages.select!{|l| l.code == \"~a\"}\n" ',code))
174 ((a b ...)
175 (format #f "\nlanguages.select!{|l| [~{\"~a\",~}].include? l.code }\n" ',code)))))
176 (mkdir "scripts")
177 (copy-recursively
178 (assoc-ref inputs "hyph-utf8-scripts") "scripts")
179
180 ;; Prepare target directories
181 (mkdir-p patterns)
182 (mkdir-p loaders)
183 (mkdir-p ptex)
184
185 ;; Generate plain patterns
186 (with-directory-excursion "scripts"
187 (substitute* "languages.rb"
188 (("../../../tex/generic/") "../tex/generic/"))
189 (substitute* "generate-plain-patterns.rb"
190 ;; Ruby 2 does not need this.
191 (("require 'unicode'") "")
192 (("Unicode.upcase\\(ch\\)") "ch.upcase")
193 ;; Write directly to the output directory
194 (("\\$path_root=File.*")
195 (string-append "$path_root=\"" out "/share/texmf-dist/\"\n"))
196 ;; Create quote directory when needed
197 (("f = File.open\\(\"#\\{\\$path_quote\\}" m)
198 (string-append "require 'fileutils'; FileUtils.mkdir_p $path_quote;" m))
199 ;; Only generate patterns for this language.
200 (("languages =.*" m)
201 (string-append m filter-expression)))
202 (invoke "ruby" "generate-plain-patterns.rb")
203
204 ;; Build pattern loaders
205 (substitute* "generate-pattern-loaders.rb"
206 (("\\$path_tex_generic=File.*")
207 (string-append "$path_tex_generic=\"" root "/tex/generic\"\n"))
208 ;; Only generate loader for this language.
209 (("languages =.*" m)
210 (string-append m filter-expression)))
211 (invoke "ruby" "generate-pattern-loaders.rb")
212
213 ;; Build ptex patterns
214 (substitute* "generate-ptex-patterns.rb"
215 (("\\$path_root=File.*")
216 (string-append "$path_root=\"" root "\"\n"))
217 ;; Only generate ptex patterns for this language.
218 (("languages =.*" m)
219 (string-append m filter-expression)))
220 (invoke "ruby" "generate-ptex-patterns.rb")))))))))
221 (native-inputs
222 `(("ruby" ,ruby)
223 ("hyph-utf8-scripts" ,hyph-utf8-scripts)))
224 (home-page "https://ctan.org/pkg/hyph-utf8"))))
225
eb0119ef
AE
226(define texlive-extra-src
227 (origin
228 (method url-fetch)
3e1ebaab 229 (uri "ftp://tug.org/historic/systems/texlive/2018/texlive-20180414-extra.tar.xz")
eb0119ef 230 (sha256 (base32
3e1ebaab 231 "0a83kymxc8zmlxjb0y1gf6mx7qnf0hxffwkivwh5yh138y2rfhsv"))))
eb0119ef
AE
232
233(define texlive-texmf-src
234 (origin
235 (method url-fetch)
3e1ebaab 236 (uri "ftp://tug.org/historic/systems/texlive/2018/texlive-20180414-texmf.tar.xz")
eb0119ef 237 (sha256 (base32
3e1ebaab 238 "1b8zigzg8raxkhhzphcmynf84rbdbj2ym2qkz24v8n0qx82zmqms"))))
eb0119ef 239
3abe72bd 240(define-public texlive-bin
eb0119ef 241 (package
0aa34e82 242 (name "texlive-bin")
3e1ebaab 243 (version "20180414")
0aa34e82
AE
244 (source
245 (origin
3e1ebaab
RW
246 (method url-fetch)
247 (uri (string-append "ftp://tug.org/historic/systems/texlive/2018/"
149f6688 248 "texlive-" version "-source.tar.xz"))
3e1ebaab
RW
249 (sha256
250 (base32
251 "0khyi6h015r2zfqgg0a44a2j7vmr1cy42knw7jbss237yvakc07y"))
594156ec 252 (patches
0fa50555
MB
253 (let ((arch-patch
254 (lambda (name revision hash)
255 (origin
256 (method url-fetch)
257 (uri (string-append "https://git.archlinux.org/svntogit/packages.git"
258 "/plain/trunk/" name "?h=packages/texlive-bin"
259 "&id=" revision))
260 (file-name (string-append "texlive-bin-" name))
261 (sha256 (base32 hash)))))
262 (arch-revision "e1975bce0b9d270d7c9773c5beb7e87d61ee8f57"))
263 (append (search-patches "texlive-bin-CVE-2018-17407.patch"
264 "texlive-bin-luatex-poppler-compat.patch")
265 (list
266 (arch-patch "pdftex-poppler0.72.patch" arch-revision
267 "0p46b6xxxg2s3hx67r0wpz16g3qygx65hpc581xs3jz5pvsiq3y7")
268 (arch-patch "xetex-poppler-fixes.patch" arch-revision
269 "1jj1p5zkjljb7id9pjv29cw0cf8mwrgrh4ackgzz9c200vaqpsvx")))))))
eb0119ef 270 (build-system gnu-build-system)
0aa34e82
AE
271 (inputs
272 `(("texlive-extra-src" ,texlive-extra-src)
273 ("cairo" ,cairo)
274 ("fontconfig" ,fontconfig)
275 ("fontforge" ,fontforge)
276 ("freetype" ,freetype)
277 ("gd" ,gd)
0256c746 278 ("gmp" ,gmp)
0aa34e82
AE
279 ("ghostscript" ,ghostscript)
280 ("graphite2" ,graphite2)
281 ("harfbuzz" ,harfbuzz)
282 ("icu4c" ,icu4c)
283 ("libpaper" ,libpaper)
284 ("libpng" ,libpng)
285 ("libxaw" ,libxaw)
286 ("libxt" ,libxt)
0256c746 287 ("mpfr" ,mpfr)
0aa34e82
AE
288 ("perl" ,perl)
289 ("pixman" ,pixman)
290 ("poppler" ,poppler)
291 ("potrace" ,potrace)
292 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
293 ("ruby" ,ruby)
294 ("tcsh" ,tcsh)
295 ("teckit" ,teckit)
296 ("zlib" ,zlib)
297 ("zziplib" ,zziplib)))
c4c4cc05 298 (native-inputs
e9a6d225 299 `(("pkg-config" ,pkg-config)))
eb0119ef
AE
300 (arguments
301 `(#:out-of-source? #t
302 #:configure-flags
303 `("--disable-native-texlive-build"
594156ec
MB
304 ;; XXX: This is needed because recent Poppler requires C++11 or later.
305 ;; Remove after switch to GCC >= 6.
306 "CXXFLAGS=-std=gnu++11"
fd89b36b 307 "--with-system-cairo"
eb0119ef 308 "--with-system-freetype2"
fd89b36b 309 "--with-system-gd"
0256c746 310 "--with-system-gmp"
be2c88ca 311 "--with-system-graphite2"
c70cf7eb 312 "--with-system-harfbuzz"
eb0119ef
AE
313 "--with-system-icu"
314 "--with-system-libgs"
609578a7 315 "--with-system-libpaper"
eb0119ef 316 "--with-system-libpng"
0256c746 317 "--with-system-mpfr"
fd89b36b 318 "--with-system-pixman"
eb0119ef 319 "--with-system-poppler"
75916982 320 "--with-system-potrace"
eb0119ef
AE
321 "--with-system-teckit"
322 "--with-system-xpdf"
323 "--with-system-zlib"
324 "--with-system-zziplib")
2f4640e3 325
7683bf11
EB
326 ;; Disable tests on mips64/aarch64 to cope with a failure of luajiterr.test.
327 ;; XXX FIXME fix luajit properly on mips64 and aarch64.
328 #:tests? ,(let ((s (or (%current-target-system)
329 (%current-system))))
330 (not (or (string-prefix? "aarch64" s)
331 (string-prefix? "mips64" s))))
eb0119ef 332 #:phases
3e1ebaab 333 (modify-phases %standard-phases
f1728d43 334 (add-after 'unpack 'configure-ghostscript-executable
3e1ebaab
RW
335 ;; ps2eps.pl uses the "gswin32c" ghostscript executable on Windows,
336 ;; and the "gs" ghostscript executable on Unix. It detects Unix by
337 ;; checking for the existence of the /usr/bin directory. Since
59e80445 338 ;; Guix System does not have /usr/bin, it is also detected as Windows.
f1728d43 339 (lambda* (#:key inputs #:allow-other-keys)
3e1ebaab
RW
340 (substitute* "utils/ps2eps/ps2eps-src/bin/ps2eps.pl"
341 (("gswin32c") "gs"))
f1728d43
RW
342 (substitute* "texk/texlive/linked_scripts/epstopdf/epstopdf.pl"
343 (("\"gs\"")
344 (string-append "\"" (assoc-ref inputs "ghostscript") "/bin/gs\"")))
345 #t))
346 (add-after 'unpack 'use-code-for-new-poppler
347 (lambda _
0fa50555 348 (copy-file "texk/web2c/pdftexdir/pdftoepdf-poppler0.72.0.cc"
f1728d43 349 "texk/web2c/pdftexdir/pdftoepdf.cc")
0fa50555 350 (copy-file "texk/web2c/pdftexdir/pdftosrc-poppler0.72.0.cc"
f1728d43 351 "texk/web2c/pdftexdir/pdftosrc.cc")
3e1ebaab 352 #t))
be200ef3
MB
353 (add-after 'unpack 'disable-failing-test
354 (lambda _
355 ;; FIXME: This test fails on 32-bit architectures since Glibc 2.28:
356 ;; <https://bugzilla.redhat.com/show_bug.cgi?id=1631847>.
357 (substitute* "texk/web2c/omegafonts/check.test"
21f7d88e 358 (("^\\./omfonts -ofm2opl \\$srcdir/tests/check tests/xcheck \\|\\| exit 1")
be200ef3
MB
359 "./omfonts -ofm2opl $srcdir/tests/check tests/xcheck || exit 77"))
360 #t))
3e1ebaab
RW
361 (add-after 'install 'postint
362 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
363 (let* ((out (assoc-ref outputs "out"))
364 (share (string-append out "/share"))
365 (texlive-extra (assoc-ref inputs "texlive-extra-src"))
366 (unpack (assoc-ref %standard-phases 'unpack))
367 (patch-source-shebangs
368 (assoc-ref %standard-phases 'patch-source-shebangs)))
1574932d
RW
369 (substitute* (string-append share "/texmf-dist/web2c/texmf.cnf")
370 ;; Don't truncate lines.
371 (("^error_line = .*$") "error_line = 254\n")
372 (("^half_error_line = .*$") "half_error_line = 238\n")
373 (("^max_print_line = .*$") "max_print_line = 1000\n"))
3e1ebaab
RW
374 ;; Create symbolic links for the latex variants and their
375 ;; man pages.
376 (with-directory-excursion (string-append out "/bin/")
377 (for-each symlink
378 '("pdftex" "pdftex" "xetex" "luatex")
379 '("latex" "pdflatex" "xelatex" "lualatex")))
380 (with-directory-excursion (string-append share "/man/man1/")
381 (symlink "luatex.1" "lualatex.1"))
382 ;; Unpack texlive-extra and install tlpkg.
383 (mkdir "texlive-extra")
384 (with-directory-excursion "texlive-extra"
385 (apply unpack (list #:source texlive-extra))
386 (apply patch-source-shebangs (list #:source texlive-extra))
387 (invoke "mv" "tlpkg" share))
388 ;; texlua shebangs are not patched by the patch-source-shebangs
389 ;; phase because the texlua executable does not exist at that
390 ;; time.
391 (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))
392 (with-directory-excursion out
393 (patch-source-shebangs))))))))
a1b4d62c
RW
394 (native-search-paths
395 (list (search-path-specification
396 (variable "TEXMF")
397 (files '("share/texmf-dist"))
398 (separator #f))
399 (search-path-specification
400 (variable "TEXMFCNF")
401 (files '("share/texmf-dist/web2c"))
402 (separator #f))))
0aa34e82
AE
403 (synopsis "TeX Live, a package of the TeX typesetting system")
404 (description
405 "TeX Live provides a comprehensive TeX document production system.
406It includes all the major TeX-related programs, macro packages, and fonts
407that are free software, including support for many languages around the
408world.
409
410This package contains the binaries.")
132e14b4
EF
411 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
412 (home-page "https://www.tug.org/texlive/")))
0aa34e82 413
2cece695
RW
414\f
415(define-public texlive-unicode-data
416 (package
417 (inherit (simple-texlive-package
418 "texlive-unicode-data"
419 (list "/tex/generic/unicode-data/"
420 "/doc/generic/unicode-data/")
421 (base32
422 "1j63kz29arfiydb8r1a53q1r4zyk1yjbcq0w9i93zddczgqzgbfb")
423 #:trivial? #t))
424 (home-page "https://www.ctan.org/pkg/unicode-data")
425 (synopsis "Unicode data and loaders for TeX")
426 (description "This bundle provides generic access to Unicode Consortium
427data for TeX use. It contains a set of text files provided by the Unicode
428Consortium which are currently all from Unicode 8.0.0, with the exception of
429@code{MathClass.txt} which is not currently part of the Unicode Character
430Database. Accompanying these source data are generic TeX loader files
431allowing this data to be used as part of TeX runs, in particular in building
432format files. Currently there are two loader files: one for general character
433set up and one for initializing XeTeX character classes as has been carried
434out to date by @code{unicode-letters.tex}. ")
435 (license license:lppl1.3c+)))
436
437(define-public texlive-generic-unicode-data
438 (deprecated-package "texlive-generic-unicode-data" texlive-unicode-data))
439
92b4a48c
RW
440(define-public texlive-hyphen-base
441 (package
442 (inherit (simple-texlive-package
443 "texlive-hyphen-base"
444 (list "/tex/generic/config/language.dat"
445 "/tex/generic/config/language.dat.lua"
446 "/tex/generic/config/language.def"
447 "/tex/generic/config/language.us"
448 "/tex/generic/config/language.us.def"
449 "/tex/generic/config/language.us.lua"
450 "/tex/generic/hyphen/dumyhyph.tex"
451 "/tex/generic/hyphen/hyphen.tex"
452 "/tex/generic/hyphen/hypht1.tex"
453 "/tex/generic/hyphen/zerohyph.tex")
454 (base32
455 "002g5zhzbj3ikgg8zidagdp605ac9f4qmfl148mp0mbpz1svk0ni")
456 #:trivial? #t))
457 (home-page "https://tug.org/texlive/")
458 (synopsis "Core hyphenation support files")
459 (description "This package includes Knuth's original @file{hyphen.tex},
460@file{zerohyph.tex} to disable hyphenation, @file{language.us} which starts
461the autogenerated files @file{language.dat} and @file{language.def} (and
462default versions of those), etc.")
463 (license license:knuth)))
464
659fda6c
RW
465;; TODO: This package should not exist. There should not be a single package
466;; containing all of /dvips. These really belong to different packages.
9d913b25
RW
467(define-public texlive-dvips
468 (package
659fda6c
RW
469 (inherit (simple-texlive-package
470 "texlive-dvips"
471 (list "/fonts/map/dvips/"
472 "/fonts/enc/dvips/base/"
473 "/dvips/")
474 (base32
475 "1di07wx8wjczddmagq5z082l2has3inzk5jwkqh4i6wv1qdfqpp6")
476 #:trivial? #t))
b8d8806b 477 (home-page "https://www.ctan.org/pkg/dvips")
9d913b25
RW
478 (synopsis "DVI to PostScript drivers")
479 (description "This package provides files needed for converting DVI files
480to PostScript.")
481 ;; Various free software licenses apply to individual files.
482 (license (list license:lppl1.3c+
483 license:expat
484 license:lgpl3+))))
485
453aae66
RW
486(define-public texlive-generic-tex-ini-files
487 (package
488 (name "texlive-generic-tex-ini-files")
489 (version (number->string %texlive-revision))
490 (source (origin
491 (method svn-fetch)
492 (uri (svn-reference
493 (url (string-append "svn://www.tug.org/texlive/tags/"
494 %texlive-tag "/Master/texmf-dist/"
495 "/tex/generic/tex-ini-files"))
496 (revision %texlive-revision)))
ac0529dd 497 (file-name (string-append name "-" version "-checkout"))
453aae66
RW
498 (sha256
499 (base32
500 "1wh42n1lmzcvi3g6mm31nm3yd5ha5bl260xqc444jg1m9fdp3wz5"))))
501 (build-system trivial-build-system)
502 (arguments
503 `(#:modules ((guix build utils))
504 #:builder
505 (begin
506 (use-modules (guix build utils))
507 (let ((target (string-append (assoc-ref %outputs "out")
508 "/share/texmf-dist/tex/generic/tex-ini-files")))
509 (mkdir-p target)
510 (copy-recursively (assoc-ref %build-inputs "source") target)
511 #t))))
b8d8806b 512 (home-page "https://www.ctan.org/pkg/tex-ini-files")
453aae66
RW
513 (synopsis "Files for creating TeX formats")
514 (description "This bundle provides a collection of model \".ini\" files
515for creating TeX formats. These files are commonly used to introduced
516distribution-dependent variations in formats. They are also used to
517allow existing format source files to be used with newer engines, for example
518to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
519 (license license:public-domain)))
520
8ada0f0b
RW
521(define-public texlive-metafont-base
522 (package
523 (name "texlive-metafont-base")
524 (version (number->string %texlive-revision))
525 (source (origin
526 (method svn-fetch)
527 (uri (svn-reference
528 (url (string-append "svn://www.tug.org/texlive/tags/"
529 %texlive-tag "/Master/texmf-dist/"
530 "/metafont"))
531 (revision %texlive-revision)))
1dec413a 532 (file-name (string-append name "-" version "-checkout"))
8ada0f0b
RW
533 (sha256
534 (base32
535 "1yl4n8cn5xqk2nc22zgzq6ymd7bhm6xx1mz3azip7i3ki4bhb5q5"))))
536 (build-system gnu-build-system)
537 (arguments
538 `(#:tests? #f ; no test target
539 #:phases
540 (modify-phases %standard-phases
541 (delete 'configure)
542 (replace 'build
543 (lambda* (#:key inputs #:allow-other-keys)
544 (let ((cwd (getcwd)))
545 (setenv "MFINPUTS"
546 (string-append cwd "/base:"
547 cwd "/misc:"
548 cwd "/roex:"
549 cwd "/feynmf:"
550 cwd "/mfpic:"
551 cwd "/config")))
552 (mkdir "build")
553 (with-directory-excursion "build"
3730a107 554 (invoke "inimf" "mf.mf"))))
8ada0f0b
RW
555 (replace 'install
556 (lambda* (#:key outputs #:allow-other-keys)
557 (let* ((out (assoc-ref outputs "out"))
558 (base (string-append out "/share/texmf-dist/web2c"))
559 (mf (string-append out "/share/texmf-dist/metafont/base")))
560 (mkdir-p base)
561 (mkdir-p mf)
562 (install-file "build/mf.base" base)
563 (copy-recursively "base" mf)
564 #t))))))
565 (native-inputs
566 `(("texlive-bin" ,texlive-bin)))
b8d8806b 567 (home-page "https://www.ctan.org/pkg/metafont")
8ada0f0b
RW
568 (synopsis "Metafont base files")
569 (description "This package provides the Metafont base files needed to
570build fonts using the Metafont system.")
571 (license license:knuth)))
572
513fff4c
RW
573(define-public texlive-tex-fontinst-base
574 (package
575 (name "texlive-tex-fontinst-base")
576 (version (number->string %texlive-revision))
577 (source (origin
578 (method svn-fetch)
579 (uri (svn-reference
580 (url (string-append "svn://www.tug.org/texlive/tags/"
581 %texlive-tag "/Master/texmf-dist/"
582 "/tex/fontinst/base"))
583 (revision %texlive-revision)))
584 (file-name (string-append name "-" version "-checkout"))
585 (sha256
586 (base32
587 "12gnb8hc45p47pqn31msvi4mpr3wxbbbf2k4xhmshjqykwzlx508"))))
588 (build-system trivial-build-system)
589 (arguments
590 `(#:modules ((guix build utils))
591 #:builder
592 (begin
593 (use-modules (guix build utils))
594 (let ((target (string-append (assoc-ref %outputs "out")
595 "/share/texmf-dist/tex/fontinst/base")))
596 (mkdir-p target)
597 (copy-recursively (assoc-ref %build-inputs "source") target)
598 #t))))
599 (home-page "https://www.ctan.org/pkg/fontinst")
600 (synopsis "Tools for converting and installing fonts for TeX and LaTeX")
601 (description "This package provides TeX macros for converting Adobe Font
602Metric files to TeX metric and virtual font format. Fontinst helps mainly
603with the number crunching and shovelling parts of font installation. This
604means in practice that it creates a number of files which give the TeX
605metrics (and related information) for a font family that TeX needs to do any
606typesetting in these fonts.")
607 (license license:lppl1.1+)))
608
dea67d8a
RW
609(define-public texlive-fontname
610 (package
611 (name "texlive-fontname")
612 (version (number->string %texlive-revision))
613 (source (origin
614 (method svn-fetch)
615 (uri (svn-reference
616 (url (string-append "svn://www.tug.org/texlive/tags/"
617 %texlive-tag "/Master/texmf-dist/"
618 "/fonts/map/fontname"))
619 (revision %texlive-revision)))
b8e213cb 620 (file-name (string-append name "-" version "-checkout"))
dea67d8a
RW
621 (sha256
622 (base32
d4d9a1ec 623 "05rbn7z30xawd3n6w7c3ijp2yc67ga220jgqmkla9pd9wx185rzq"))))
dea67d8a
RW
624 (build-system trivial-build-system)
625 (arguments
626 `(#:modules ((guix build utils))
627 #:builder
628 (begin
629 (use-modules (guix build utils))
630 (let ((target (string-append (assoc-ref %outputs "out")
631 "/share/texmf-dist/fonts/map/fontname")))
632 (mkdir-p target)
633 (copy-recursively (assoc-ref %build-inputs "source") target)
634 #t))))
635 (home-page "https://www.ctan.org/pkg/fontname")
636 (synopsis "Scheme for naming fonts in TeX")
637 (description "This is Fontname, a naming scheme for (the base part of)
638external TeX font filenames. This makes at most eight-character names
639from (almost) arbitrarily complex font names, thus helping portability of TeX
640documents.")
641 (license license:public-domain)))
642
3c4f1ec7
RW
643(define-public texlive-fonts-cm
644 (package
645 (name "texlive-fonts-cm")
646 (version (number->string %texlive-revision))
647 (source (origin
648 (method svn-fetch)
649 (uri (svn-reference
650 (url (string-append "svn://www.tug.org/texlive/tags/"
651 %texlive-tag "/Master/texmf-dist/"
652 "/fonts/source/public/cm"))
653 (revision %texlive-revision)))
a4015c20 654 (file-name (string-append name "-" version "-checkout"))
3c4f1ec7
RW
655 (sha256
656 (base32
d4d9a1ec 657 "0vfjhidr9pha613h8mfhnpcpvld6ahdfb449918fpsfs93cppkyj"))))
3c4f1ec7
RW
658 (build-system gnu-build-system)
659 (arguments
660 `(#:modules ((guix build gnu-build-system)
661 (guix build utils)
662 (srfi srfi-1)
663 (srfi srfi-26))
664 #:tests? #f ; no tests
665 #:phases
666 (modify-phases %standard-phases
667 (delete 'configure)
668 (replace 'build
669 (lambda* (#:key inputs #:allow-other-keys)
670 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
671 ;; Tell mf where to find mf.base
672 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
673 ;; Tell mf where to look for source files
674 (setenv "MFINPUTS"
675 (string-append (getcwd) ":"
676 mf "/share/texmf-dist/metafont/base")))
677 (mkdir "build")
26a05061 678 (mkdir-p "pk/ljfour/public/cm/dpi600")
ff440d62
MW
679 (for-each (lambda (font)
680 (format #t "building font ~a\n" font)
681 (invoke "mf" "-progname=mf"
682 "-output-directory=build"
683 (string-append "\\"
684 "mode:=ljfour; "
26a05061 685 "mag:=1+0/600; "
ff440d62
MW
686 "batchmode; "
687 "input "
26a05061
RW
688 (basename font ".mf")))
689 (invoke "gftopk"
690 (string-append "build/"
691 (basename font ".mf") ".600gf")
692 (string-append "pk/ljfour/public/cm/dpi600/"
693 (basename font ".mf") ".pk")))
ff440d62
MW
694 (find-files "." "cm(.*[0-9]+.*|inch)\\.mf$"))
695 #t))
3c4f1ec7 696 (replace 'install
6534e885 697 (lambda* (#:key inputs outputs #:allow-other-keys)
26a05061
RW
698 (let* ((out (assoc-ref outputs "out"))
699 (fonts (string-append out "/share/texmf-dist/fonts/"))
700 (pk (string-append fonts "pk"))
701 (tfm (string-append fonts "tfm/public/cm"))
702 (mf (string-append fonts "source/public/cm"))
703 (type1 (string-append fonts "type1/public/amsfonts/cm")))
3c4f1ec7
RW
704 (for-each (cut install-file <> tfm)
705 (find-files "build" "\\.*"))
706 (for-each (cut install-file <> mf)
707 (find-files "." "\\.mf"))
26a05061 708 (copy-recursively "pk" pk)
6534e885
PN
709 (mkdir-p type1)
710 (copy-recursively (assoc-ref inputs "cm-type1") type1)
3c4f1ec7
RW
711 #t))))))
712 (native-inputs
713 `(("texlive-bin" ,texlive-bin)
6534e885
PN
714 ("texlive-metafont-base" ,texlive-metafont-base)
715 ("cm-type1"
716 ,(origin
717 (method svn-fetch)
718 (uri (svn-reference
719 (url (string-append "svn://www.tug.org/texlive/tags/"
720 %texlive-tag "/Master/texmf-dist/"
721 "/fonts/type1/public/amsfonts/cm"))
722 (revision %texlive-revision)))
723 (file-name (string-append name "-type1-" version "-checkout"))
724 (sha256
725 (base32
726 "12jyl9jp3hidifa4l5pmi47p71d5mb5kj5rknxkygilix8yz2iy6"))))))
b8d8806b 727 (home-page "https://www.ctan.org/pkg/cm")
3c4f1ec7
RW
728 (synopsis "Computer Modern fonts for TeX")
729 (description "This package provides the Computer Modern fonts by Donald
730Knuth. The Computer Modern font family is a large collection of text,
731display, and mathematical fonts in a range of styles, based on Monotype Modern
7328A.")
733 (license license:knuth)))
734
4e9242aa
RW
735(define-public texlive-fonts-cm-super
736 (package
737 (name "texlive-fonts-cm-super")
738 (version (number->string %texlive-revision))
739 (source (origin
740 (method svn-fetch)
741 (uri (svn-reference
742 (url (string-append "svn://www.tug.org/texlive/tags/"
743 %texlive-tag "/Master/texmf-dist/"
744 "/tex/latex/cm-super"))
745 (revision %texlive-revision)))
746 (file-name (string-append name "-" version "-checkout"))
747 (sha256
748 (base32
749 "0ybb4gi2rblzpb6wfzm2wk7dj3y2jnmkzsla7mz7g3zc12y4r2b9"))))
750 (build-system trivial-build-system)
751 (arguments
752 `(#:modules ((guix build utils)
753 (ice-9 match))
754 #:builder
755 (begin
756 (use-modules (guix build utils)
757 (ice-9 match))
758 (let ((root (string-append (assoc-ref %outputs "out")
759 "/share/texmf-dist/"))
760 (pkgs '(("source" . "tex/latex/cm-super")
761 ("cm-super-afm" . "fonts/afm/public/cm-super")
762 ("cm-super-type1" . "fonts/type1/public/cm-super")
763 ("cm-super-enc" . "fonts/enc/dvips/cm-super")
764 ("cm-super-map" . "fonts/map/dvips/cm-super")
765 ("cm-super-vtex" . "fonts/map/vtex/cm-super"))))
766 (for-each (match-lambda
767 ((pkg . dir)
768 (let ((target (string-append root dir)))
769 (mkdir-p target)
770 (copy-recursively (assoc-ref %build-inputs pkg)
771 target))))
772 pkgs)
773 #t))))
774 (native-inputs
775 `(("cm-super-vtex"
776 ,(origin
777 (method svn-fetch)
778 (uri (svn-reference
779 (url (string-append "svn://www.tug.org/texlive/tags/"
780 %texlive-tag "/Master/texmf-dist/"
781 "/fonts/map/vtex/cm-super"))
782 (revision %texlive-revision)))
783 (file-name (string-append name "-map-vtex-" version "-checkout"))
784 (sha256
785 (base32
786 "14c9allsgfv6za9wznz4cxqxwz5nsmj8rnwvxams8fhs5rvglxqi"))))
787 ("cm-super-afm"
788 ,(origin
789 (method svn-fetch)
790 (uri (svn-reference
791 (url (string-append "svn://www.tug.org/texlive/tags/"
792 %texlive-tag "/Master/texmf-dist/"
793 "/fonts/afm/public/cm-super"))
794 (revision %texlive-revision)))
795 (file-name (string-append name "-afm-" version "-checkout"))
796 (sha256
797 (base32
798 "048ih65f2nghdabdar2p957c4s2spgllmy2gxdscddwqpnmd26yn"))))
799 ("cm-super-type1"
800 ,(origin
801 (method svn-fetch)
802 (uri (svn-reference
803 (url (string-append "svn://www.tug.org/texlive/tags/"
804 %texlive-tag "/Master/texmf-dist/"
805 "/fonts/type1/public/cm-super"))
806 (revision %texlive-revision)))
807 (file-name (string-append name "-type1-" version "-checkout"))
808 (sha256
809 (base32
810 "1140swk3w2ka0y4zdsq6pdifrdanb281q71p5gngbbjxdxjxf4qx"))))
811 ("cm-super-map"
812 ,(origin
813 (method svn-fetch)
814 (uri (svn-reference
815 (url (string-append "svn://www.tug.org/texlive/tags/"
816 %texlive-tag "/Master/texmf-dist/"
817 "/fonts/map/dvips/cm-super"))
818 (revision %texlive-revision)))
819 (file-name (string-append name "-map-" version "-checkout"))
820 (sha256
821 (base32
822 "10r6xqbwf9wk3ylg7givwyrw1952zydc6p7fw29zjf8ijl0lndim"))))
823 ("cm-super-enc"
824 ,(origin
825 (method svn-fetch)
826 (uri (svn-reference
827 (url (string-append "svn://www.tug.org/texlive/tags/"
828 %texlive-tag "/Master/texmf-dist/"
829 "/fonts/enc/dvips/cm-super"))
830 (revision %texlive-revision)))
831 (file-name (string-append name "-enc-" version "-checkout"))
832 (sha256
833 (base32
834 "1pgksy96gfgyjxfhs2k04bgg7nr7i128y01kjcahr7n38080h4ij"))))))
835 (home-page "https://www.ctan.org/pkg/cm-super")
836 (synopsis "Computer Modern Super family of fonts")
837 (description "The CM-Super family provides Adobe Type 1 fonts that replace
838the T1/TS1-encoded Computer Modern (EC/TC), T1/TS1-encoded Concrete,
839T1/TS1-encoded CM bright and LH Cyrillic fonts (thus supporting all European
840languages except Greek), and bringing many ameliorations in typesetting
841quality. The fonts exhibit the same metrics as the METAFONT-encoded
842originals.")
843 ;; With font exception
844 (license license:gpl2+)))
845
c2a1fe4a
RW
846(define-public texlive-fonts-lm
847 (package
848 (name "texlive-fonts-lm")
849 (version "2.004")
850 (source (origin
851 (method url-fetch)
852 (uri (string-append "http://www.gust.org.pl/projects/e-foundry/"
853 "latin-modern/download/lm" version "bas.zip"))
854 (sha256
855 (base32
856 "0z2s253y751m2ci5aw8nq0sf2kyg9hpimv2gyixkch9d07m2b9wp"))))
857 (build-system trivial-build-system)
858 (arguments
859 `(#:modules ((guix build utils))
860 #:builder
861 (begin
862 (use-modules (guix build utils))
863 (let ((root (string-append (assoc-ref %outputs "out")
864 "/share/texmf-dist/")))
865 (mkdir-p root)
866 (with-directory-excursion root
867 (invoke (string-append (assoc-ref %build-inputs "unzip")
868 "/bin/unzip")
869 (assoc-ref %build-inputs "source")))
870 #t))))
871 (native-inputs
872 `(("unzip" ,unzip)))
873 (home-page "http://www.gust.org.pl/projects/e-foundry/latin-modern/")
874 (synopsis "Latin Modern family of fonts")
875 (description "The Latin Modern fonts are derived from the famous Computer
876Modern fonts designed by Donald E. Knuth and described in Volume E of his
877Computers & Typesetting series.")
878 ;; The GUST font license (GFL) is legally identical to the LaTeX Project
879 ;; Public License (LPPL), version 1.3c or later, but comes with an
880 ;; additional but not legally binding clause.
881 (license license:lppl1.3c+)))
882
5ebba61a
RW
883(define-public texlive-fonts-knuth-lib
884 (package
885 (name "texlive-fonts-knuth-lib")
886 (version (number->string %texlive-revision))
887 (source (origin
888 (method svn-fetch)
889 (uri (svn-reference
890 (url (string-append "svn://www.tug.org/texlive/tags/"
891 %texlive-tag "/Master/texmf-dist/"
892 "/fonts/source/public/knuth-lib"))
893 (revision %texlive-revision)))
6b286e42 894 (file-name (string-append name "-" version "-checkout"))
5ebba61a
RW
895 (sha256
896 (base32
897 "0in9aqyi8jkyf9d16z0li50z5fpwj1iwgwm83gmvwqcf7chfs04y"))))
898 (build-system gnu-build-system)
899 (arguments
900 `(#:modules ((guix build gnu-build-system)
901 (guix build utils)
902 (srfi srfi-26))
903 #:tests? #f ; no tests
904 #:phases
905 (modify-phases %standard-phases
906 (delete 'configure)
907 (replace 'build
908 (lambda* (#:key inputs #:allow-other-keys)
909 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
910 ;; Tell mf where to find mf.base
911 (setenv "MFBASES"
912 (string-append mf "/share/texmf-dist/web2c"))
913 ;; Tell mf where to look for source files
914 (setenv "MFINPUTS"
915 (string-append (getcwd) ":"
916 mf "/share/texmf-dist/metafont/base")))
917 (mkdir "build")
96f5377d
RW
918 (for-each (lambda (font)
919 (format #t "building font ~a\n" font)
920 (invoke "mf" "-progname=mf"
921 "-output-directory=build"
922 (string-append "\\"
923 "mode:=ljfour; "
924 "mag:=1; "
925 "batchmode; "
926 "input " font)))
927 (find-files "." "(manfnt|logo.+)\\.mf$"))
928 #t))
5ebba61a
RW
929 (replace 'install
930 (lambda* (#:key outputs #:allow-other-keys)
931 (let* ((out (assoc-ref outputs "out"))
932 (tfm (string-append
933 out "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
934 (mf (string-append
935 out "/share/texmf-dist/fonts/source/public/knuth-lib")))
936 (for-each (cut install-file <> tfm)
937 (find-files "build" "\\.*"))
938 (for-each (cut install-file <> mf)
939 (find-files "." "\\.mf"))
940 #t))))))
941 (native-inputs
942 `(("texlive-bin" ,texlive-bin)
943 ("texlive-metafont-base" ,texlive-metafont-base)))
944 (home-page "https://www.ctan.org/pkg/knuth-lib")
945 (synopsis "Small library of METAFONT sources")
946 (description "This is a collection of core TeX and METAFONT macro files
947from Donald Knuth, including the plain format, plain base, and the MF logo
948fonts.")
949 (license license:knuth)))
950
a00d5933
RW
951(define-public texlive-fonts-latex
952 (package
953 (name "texlive-fonts-latex")
954 (version (number->string %texlive-revision))
955 (source (origin
956 (method svn-fetch)
957 (uri (svn-reference
958 (url (string-append "svn://www.tug.org/texlive/tags/"
959 %texlive-tag "/Master/texmf-dist/"
960 "/fonts/source/public/latex-fonts"))
961 (revision %texlive-revision)))
a4550e7d 962 (file-name (string-append name "-" version "-checkout"))
a00d5933
RW
963 (sha256
964 (base32
965 "0ypsm4xv9cw0jckk2qc7gi9hcmhf31mrg56pz3llyx3yd9vq2lps"))))
966 (build-system gnu-build-system)
967 (arguments
968 `(#:modules ((guix build gnu-build-system)
969 (guix build utils)
970 (srfi srfi-1)
971 (srfi srfi-26))
972 #:tests? #f ; no tests
973 #:phases
974 (modify-phases %standard-phases
975 (delete 'configure)
976 (replace 'build
977 (lambda* (#:key inputs #:allow-other-keys)
978 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
979 ;; Tell mf where to find mf.base
980 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
981 ;; Tell mf where to look for source files
982 (setenv "MFINPUTS"
983 (string-append (getcwd) ":"
984 mf "/share/texmf-dist/metafont/base:"
985 (assoc-ref inputs "texlive-fonts-cm")
986 "/share/texmf-dist/fonts/source/public/cm")))
987 (mkdir "build")
806faaab
MW
988 (for-each (lambda (font)
989 (format #t "building font ~a\n" font)
990 (invoke "mf" "-progname=mf"
991 "-output-directory=build"
992 (string-append "\\"
993 "mode:=ljfour; "
994 "mag:=1; "
995 "batchmode; "
996 "input " font)))
997 '("icmcsc10" "icmex10" "icmmi8" "icmsy8" "icmtt8"
998 "ilasy8" "ilcmss8" "ilcmssb8" "ilcmssi8"
999 "lasy5" "lasy6" "lasy7" "lasy8" "lasy9" "lasy10" "lasyb10"
1000 "lcircle10" "lcirclew10" "lcmss8" "lcmssb8" "lcmssi8"
1001 "line10" "linew10"))
1002 #t))
a00d5933
RW
1003 (replace 'install
1004 (lambda* (#:key outputs #:allow-other-keys)
1005 (let* ((out (assoc-ref outputs "out"))
1006 (tfm (string-append
1007 out "/share/texmf-dist/fonts/tfm/public/latex-fonts"))
1008 (mf (string-append
1009 out "/share/texmf-dist/fonts/source/public/latex-fonts")))
1010 (for-each (cut install-file <> tfm)
1011 (find-files "build" "\\.*"))
1012 (for-each (cut install-file <> mf)
1013 (find-files "." "\\.mf"))
1014 #t))))))
1015 (native-inputs
1016 `(("texlive-bin" ,texlive-bin)
1017 ("texlive-metafont-base" ,texlive-metafont-base)
1018 ("texlive-fonts-cm" ,texlive-fonts-cm)))
b8d8806b 1019 (home-page "https://www.ctan.org/pkg/latex-fonts")
a00d5933
RW
1020 (synopsis "Collection of fonts used in LaTeX distributions")
1021 (description "This is a collection of fonts for use with standard LaTeX
1022packages and classes. It includes invisible fonts (for use with the slides
1023class), line and circle fonts (for use in the picture environment) and LaTeX
1024symbol fonts.")
1025 (license license:lppl1.2+)))
1026
6072f82a
RW
1027(define-public texlive-latex-mflogo
1028 (package
1029 (name "texlive-latex-mflogo")
1030 (version (number->string %texlive-revision))
1031 (source
1032 (origin
1033 (method svn-fetch)
1034 (uri (texlive-ref "latex" "mflogo"))
1035 (sha256
1036 (base32
1037 "15i2ib6nvhf31g1b92c6njf7n0g29znlq7hbfp9ii7qabhcwwvrj"))))
1038 (build-system texlive-build-system)
1039 (arguments '(#:tex-directory "latex/mflogo"))
1040 (home-page "http://www.ctan.org/pkg/mflogo")
1041 (synopsis "LaTeX support for Metafont logo fonts")
1042 (description
1043 "This package provides LaTeX and font definition files to access the
1044Knuthian mflogo fonts described in The Metafontbook and to typeset Metafont
1045logos in LaTeX documents.")
1046 (license license:lppl)))
1047
01cf8c89
RW
1048(define-public texlive-fonts-mflogo-font
1049 (package
1050 (name "texlive-fonts-mflogo-font")
1051 (version (number->string %texlive-revision))
1052 (source (origin
1053 (method svn-fetch)
1054 (uri (svn-reference
1055 (url (string-append "svn://www.tug.org/texlive/tags/"
1056 %texlive-tag "/Master/texmf-dist/"
1057 "/fonts/type1/hoekwater/mflogo-font"))
1058 (revision %texlive-revision)))
1059 (file-name (string-append name "-" version "-checkout"))
1060 (sha256
1061 (base32
1062 "09fsxfpiyxjljkrb52b197728bjnkcnv3bdwm4hl6hf23mbmqadf"))))
1063 (build-system trivial-build-system)
1064 (arguments
1065 `(#:modules ((guix build utils)
1066 (ice-9 match))
1067 #:builder
1068 (begin
1069 (use-modules (guix build utils)
1070 (ice-9 match))
1071 (let ((root (string-append (assoc-ref %outputs "out")
1072 "/share/texmf-dist/"))
1073 (pkgs '(("source" . "fonts/type1/hoekwater/mflogo-font")
1074 ("afm" . "fonts/afm/hoekwater/mflogo-font")
1075 ("fonts-map" . "fonts/map/dvips/mflogo-font"))))
1076 (for-each (match-lambda
1077 ((pkg . dir)
1078 (let ((target (string-append root dir)))
1079 (mkdir-p target)
1080 (copy-recursively (assoc-ref %build-inputs pkg)
1081 target))))
1082 pkgs)
1083 #t))))
1084 (native-inputs
1085 `(("afm"
1086 ,(origin
1087 (method svn-fetch)
1088 (uri (svn-reference
1089 (url (string-append "svn://www.tug.org/texlive/tags/"
1090 %texlive-tag "/Master/texmf-dist/"
1091 "/fonts/afm/hoekwater/mflogo-font"))
1092 (revision %texlive-revision)))
1093 (file-name (string-append name "-afm-" version "-checkout"))
1094 (sha256
1095 (base32
1096 "0bx1mfhhzsk9gj1pha36q2rk0jd0y285qm62zgvdvzzzlfnk8sdb"))))
1097 ("fonts-map"
1098 ,(origin
1099 (method svn-fetch)
1100 (uri (svn-reference
1101 (url (string-append "svn://www.tug.org/texlive/tags/"
1102 %texlive-tag "/Master/texmf-dist/"
1103 "/fonts/map/dvips/mflogo-font/"))
1104 (revision %texlive-revision)))
1105 (file-name (string-append name "-fonts-map-" version "-checkout"))
1106 (sha256
1107 (base32
1108 "044xrrpl8hnvj55cx2ql1ib1bcyr33nzanx5nkwxpai7fb7pg4y6"))))))
1109 (home-page "https://www.ctan.org/pkg/mflogo-font")
1110 (synopsis "Metafont logo font")
1111 (description
1112 "These fonts were created in METAFONT by Knuth, for his own publications.
1113At some stage, the letters P and S were added, so that the METAPOST logo could
1114also be expressed. The fonts were originally issued (of course) as METAFONT
1115source; they have since been autotraced and reissued in Adobe Type 1 format by
1116Taco Hoekwater.")
1117 (license license:knuth)))
1118
98b4aca1
RW
1119(define-public texlive-fonts-amsfonts
1120 (package
1121 (name "texlive-fonts-amsfonts")
1122 (version (number->string %texlive-revision))
1123 (source (origin
1124 (method svn-fetch)
1125 (uri (svn-reference
1126 (url (string-append "svn://www.tug.org/texlive/tags/"
1127 %texlive-tag "/Master/texmf-dist/"
1128 "/fonts/source/public/amsfonts"))
1129 (revision %texlive-revision)))
5fe9233e 1130 (file-name (string-append name "-" version "-checkout"))
98b4aca1
RW
1131 (sha256
1132 (base32
1133 "07h20rvpbdb4k72hzmjkyb29426zr9wxsfp6yd4ajbbpd3vx8grb"))))
1134 (build-system gnu-build-system)
1135 (arguments
1136 `(#:modules ((guix build gnu-build-system)
1137 (guix build utils)
fe2bfabe 1138 (ice-9 match)
98b4aca1
RW
1139 (srfi srfi-1)
1140 (srfi srfi-26))
1141 #:tests? #f ; no tests
1142 #:phases
1143 (modify-phases %standard-phases
1144 (delete 'configure)
1145 (replace 'build
1146 (lambda* (#:key inputs #:allow-other-keys)
fe2bfabe 1147 (let ((mf (assoc-ref inputs "texlive-union"))
98b4aca1 1148 (cwd (getcwd)))
db6609bd
DM
1149 ;; Make METAFONT reproducible
1150 (setenv "SOURCE_DATE_EPOCH" "1")
98b4aca1
RW
1151 ;; Tell mf where to find mf.base
1152 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
1153 ;; Tell mf where to look for source files
1154 (setenv "MFINPUTS"
1155 (string-append cwd ":"
1156 cwd "/cmextra:"
1157 cwd "/cyrillic:"
1158 cwd "/dummy:"
1159 cwd "/symbols:"
1160 mf "/share/texmf-dist/metafont/base:"
1161 (assoc-ref inputs "texlive-fonts-cm")
1162 "/share/texmf-dist/fonts/source/public/cm")))
1163 (mkdir "build")
2762023a
MW
1164 (for-each (lambda (font)
1165 (format #t "building font ~a\n" (basename font ".mf"))
1166 (with-directory-excursion (dirname font)
1167 (invoke "mf" "-progname=mf"
1168 "-output-directory=../build"
1169 (string-append "\\"
1170 "mode:=ljfour; "
1171 "mag:=1; "
1172 "nonstopmode; "
1173 "input "
1174 (getcwd) "/"
1175 (basename font ".mf")))))
1176 (find-files "." "[0-9]+\\.mf$"))
fe2bfabe
RW
1177
1178 ;; There are no metafont sources for the Euler fonts, so we
1179 ;; convert the afm files instead.
1180 (mkdir "build/euler")
1181 (for-each (lambda (font)
1182 (format #t "converting afm font ~a\n" (basename font ".afm"))
1183 (invoke "afm2tfm" font
1184 (string-append "build/euler/"
1185 (basename font ".tfm"))))
1186 (find-files (assoc-ref inputs "amsfonts-afm")
1187 "\\.afm$"))
1188
1189 ;; Frustratingly, not all fonts can be created this way. To
1190 ;; generate eufm8.tfm, for example, we first scale down
1191 ;; eufm10.afm to eufm8.pl, and then generate the tfm file from
1192 ;; the pl file.
1193 (with-directory-excursion "build/euler"
1194 (setenv "TEXINPUTS"
1195 (string-append (getcwd) "//:"
1196 (assoc-ref inputs "amsfonts-afm") "//:"
1197 (assoc-ref inputs "texlive-union") "//"))
1198 (for-each (match-lambda
1199 (((target-base target-size)
1200 (source-base source-size))
1201 (let ((factor (number->string
1202 (truncate/ (* 1000 target-size)
1203 source-size))))
1204 (invoke "tex"
1205 "-interaction=scrollmode"
1206 (string-append "\\input fontinst.sty "
1207 "\\transformfont{" target-base "}"
1208 "{\\scalefont{" factor "}"
1209 "{\\fromafm{" source-base "}}} "
1210 "\\bye")))
1211 (invoke "pltotf"
1212 (string-append target-base ".pl")
1213 (string-append target-base ".tfm"))
1214 (delete-file (string-append target-base ".pl"))))
1215
1216 '((("eufm8" 8) ("eufm10" 10))
1217
1218 (("eufb6" 6) ("eufb7" 7))
1219 (("eufb8" 8) ("eufb10" 10))
1220 (("eufb9" 9) ("eufb10" 10))
1221
1222 (("eufm6" 6) ("eufb7" 7))
1223 (("eufm9" 9) ("eufb10" 10))
1224
1225 (("eurb6" 6) ("eurb7" 7))
1226 (("eurb8" 8) ("eurb10" 10))
1227 (("eurb9" 9) ("eurb10" 10))
1228
1229 (("eurm6" 6) ("eurm7" 7))
1230 (("eurm8" 8) ("eurm10" 10))
1231 (("eurm9" 9) ("eurm10" 10)))))
2762023a 1232 #t))
98b4aca1 1233 (replace 'install
24d0c4d0 1234 (lambda* (#:key inputs outputs #:allow-other-keys)
fe2bfabe
RW
1235 (let* ((out (assoc-ref outputs "out"))
1236 (root (string-append out "/share/texmf-dist/fonts/"))
1237 (pkgs '(("amsfonts-afm" . "afm/public/amsfonts")
1238 ("amsfonts-type1" . "type1/public/amsfonts")
1239 ("amsfonts-map" . "map/dvips/amsfonts"))))
1240 (for-each (match-lambda
1241 ((pkg . dir)
1242 (let ((target (string-append root dir)))
1243 (mkdir-p target)
1244 (copy-recursively (assoc-ref inputs pkg)
1245 target))))
1246 pkgs)
1247 (copy-recursively (assoc-ref inputs "amsfonts-plain")
1248 (string-append out "/share/texmf-dist/tex/plain/amsfonts"))
1249 (let* ((tfm (string-append root "tfm/public/amsfonts"))
1250 (mf (string-append root "source/public/amsfonts")))
1251 (copy-recursively "build" tfm)
1252 (for-each (cut install-file <> mf)
1253 (find-files "." "\\.mf"))
1254 #t)))))))
98b4aca1 1255 (native-inputs
fe2bfabe
RW
1256 `(("texlive-union" ,(texlive-union (list texlive-tex-fontinst-base
1257 texlive-fonts-cm
1258 texlive-metafont-base)))
1259 ("amsfonts-plain"
1260 ,(origin
1261 (method svn-fetch)
1262 (uri (svn-reference
1263 (url (string-append "svn://www.tug.org/texlive/tags/"
1264 %texlive-tag "/Master/texmf-dist/"
1265 "/tex/plain/amsfonts"))
1266 (revision %texlive-revision)))
1267 (file-name (string-append name "-plain-" version "-checkout"))
1268 (sha256
1269 (base32
1270 "1hi8c9rkfb6395sxf7fhkr91xygfg8am1hqij9g3h2c7qx3714qp"))))
1271 ("amsfonts-map"
1272 ,(origin
1273 (method svn-fetch)
1274 (uri (svn-reference
1275 (url (string-append "svn://www.tug.org/texlive/tags/"
1276 %texlive-tag "/Master/texmf-dist/"
1277 "/fonts/map/dvips/amsfonts"))
1278 (revision %texlive-revision)))
1279 (file-name (string-append name "-map-" version "-checkout"))
1280 (sha256
1281 (base32
1282 "1lrj3bd9ybj4aawzlygc6qvakbrwc5s0mc5n9rpic331frv3axfs"))))
24d0c4d0
RW
1283 ("amsfonts-type1"
1284 ,(origin
1285 (method svn-fetch)
1286 (uri (svn-reference
1287 (url (string-append "svn://www.tug.org/texlive/tags/"
1288 %texlive-tag "/Master/texmf-dist/"
1289 "/fonts/type1/public/amsfonts"))
1290 (revision %texlive-revision)))
1291 (file-name (string-append name "-type1-" version "-checkout"))
1292 (sha256
1293 (base32
fe2bfabe
RW
1294 "1zfz33vn6gm19njy74n8wmn7sljrimfhwns5z8qqhxqfh1g4qip2"))))
1295 ("amsfonts-afm"
1296 ,(origin
1297 (method svn-fetch)
1298 (uri (svn-reference
1299 (url (string-append "svn://www.tug.org/texlive/tags/"
1300 %texlive-tag "/Master/texmf-dist/"
1301 "/fonts/afm/public/amsfonts"))
1302 (revision %texlive-revision)))
1303 (file-name (string-append name "-afm-" version "-checkout"))
1304 (sha256
1305 (base32
1306 "1fifzkaihmjgchnk7dmw0c23k0cz999dxnc78ivmqvgi1dhx0iv8"))))))
b8d8806b 1307 (home-page "https://www.ctan.org/pkg/amsfonts")
98b4aca1
RW
1308 (synopsis "TeX fonts from the American Mathematical Society")
1309 (description
1310 "This package provides an extended set of fonts for use in mathematics,
1311including: extra mathematical symbols; blackboard bold letters (uppercase
1312only); fraktur letters; subscript sizes of bold math italic and bold Greek
1313letters; subscript sizes of large symbols such as sum and product; added sizes
1314of the Computer Modern small caps font; cyrillic fonts (from the University of
1315Washington); Euler mathematical fonts. All fonts are provided as Adobe Type 1
1316files, and all except the Euler fonts are provided as Metafont source. The
1317distribution also includes the canonical Type 1 versions of the Computer
1318Modern family of fonts. The Euler fonts are supported by separate packages;
1319details can be found in the documentation.")
1320 (license license:silofl1.1)))
1321
137f9cbc
RW
1322(define-public texlive-latex-amsfonts
1323 (package
1324 (name "texlive-latex-amsfonts")
1325 (version (number->string %texlive-revision))
1326 (source (origin
1327 (method svn-fetch)
1328 (uri (texlive-ref "latex" "amsfonts"))
9700a0d0 1329 (file-name (string-append name "-" version "-checkout"))
137f9cbc
RW
1330 (sha256
1331 (base32
1332 "0slzfv5h2m03b2xvm2sasznz4azh6rgi069z161dja3l8rln79hm"))))
1333 (build-system texlive-build-system)
1334 (arguments '(#:tex-directory "latex/amsfonts"))
1335 (native-inputs
1336 `(("texlive-fonts-cm" ,texlive-fonts-cm)
1337 ("texlive-metafont-base" ,texlive-metafont-base)))
b8d8806b 1338 (home-page "https://www.ctan.org/pkg/amsfonts")
137f9cbc
RW
1339 (synopsis "TeX fonts from the American Mathematical Society")
1340 (description
1341 "This package provides basic LaTeX support for the symbol fonts provides
1342by the amsfonts package. It provides @code{amsfonts.sty}, with names of
1343individual symbols defined in @code{amssymb.sty}.")
1344 (license license:silofl1.1)))
1345
566e95f7
RW
1346;; This provides etex.src which is needed to build various formats, including
1347;; luatex.fmt and pdflatex.fmt
1348(define-public texlive-tex-plain
1349 (package
1350 (name "texlive-tex-plain")
1351 (version (number->string %texlive-revision))
1352 (source (origin
1353 (method svn-fetch)
1354 (uri (svn-reference
1355 (url (string-append "svn://www.tug.org/texlive/tags/"
1356 %texlive-tag "/Master/texmf-dist/"
1357 "/tex/plain"))
1358 (revision %texlive-revision)))
b63aefe5 1359 (file-name (string-append name "-" version "-checkout"))
566e95f7
RW
1360 (sha256
1361 (base32
d4d9a1ec 1362 "1xknlb3gcw6jjqh97bhghxi594bzpj1zfzzfsrr9pvr9s1bx7dnf"))))
566e95f7
RW
1363 (build-system trivial-build-system)
1364 (arguments
1365 `(#:modules ((guix build utils))
1366 #:builder
1367 (begin
1368 (use-modules (guix build utils))
1369 (let ((target (string-append (assoc-ref %outputs "out")
1370 "/share/texmf-dist/tex/plain")))
1371 (mkdir-p target)
1372 (copy-recursively (assoc-ref %build-inputs "source") target)
1373 #t))))
1374 (home-page "https://www.ctan.org/pkg/plain")
1375 (synopsis "Plain TeX format and supporting files")
1376 (description
1377 "Contains files used to build the Plain TeX format, as described in the
1378TeXbook, together with various supporting files (some also discussed in the
1379book).")
1380 (license license:knuth)))
1381
5153431c
RW
1382(define-public texlive-hyph-utf8
1383 (package
1384 (inherit (simple-texlive-package
1385 "texlive-hyph-utf8"
1386 (list "/source/generic/hyph-utf8/"
1387 "/source/luatex/hyph-utf8/"
1388 "/doc/luatex/hyph-utf8/"
1389 "/tex/luatex/hyph-utf8/etex.src"
1390 ;; Used to extract luatex-hyphen.lua
1391 "/tex/latex/base/docstrip.tex"
1392
1393 ;; Documentation; we can't use the whole directory because
1394 ;; it includes files from other packages.
1395 "/doc/generic/hyph-utf8/CHANGES"
1396 "/doc/generic/hyph-utf8/HISTORY"
1397 "/doc/generic/hyph-utf8/hyph-utf8.pdf"
1398 "/doc/generic/hyph-utf8/hyph-utf8.tex"
1399 "/doc/generic/hyph-utf8/hyphenation-distribution.pdf"
1400 "/doc/generic/hyph-utf8/hyphenation-distribution.tex"
1401 "/doc/generic/hyph-utf8/img/miktex-languages.png"
1402 "/doc/generic/hyph-utf8/img/texlive-collection.png")
1403 (base32
1404 "10y8svgk68sivmgzrv8gv137r7kv49cs256cq2wja9ms437pxvbj")))
1405 (outputs '("out" "doc"))
1406 (build-system gnu-build-system)
1407 (arguments
1408 `(#:tests? #f ; there are none
1409 #:modules ((guix build gnu-build-system)
1410 (guix build utils)
1411 (ice-9 match))
1412 #:make-flags
1413 (list "-C" "source/luatex/hyph-utf8/"
1414 (string-append "DO_TEX = tex --interaction=nonstopmode '&tex' $<")
1415 (string-append "RUNDIR =" (assoc-ref %outputs "out") "/share/texmf-dist/tex/luatex/hyph-utf8/")
1416 (string-append "DOCDIR =" (assoc-ref %outputs "doc") "/share/texmf-dist/doc/luatex/hyph-utf8/")
1417 ;; hyphen.cfg is neither included nor generated, so let's only build the lua file.
1418 (string-append "UNPACKED = $(NAME).lua"))
1419 #:phases
1420 (modify-phases %standard-phases
1421 ;; TeX isn't usable at this point, so we first need to generate the
1422 ;; tex.fmt.
1423 (replace 'configure
1424 (lambda* (#:key inputs outputs #:allow-other-keys)
1425 ;; Target directories must exist.
1426 (mkdir-p (string-append (assoc-ref %outputs "out")
1427 "/share/texmf-dist/tex/luatex/hyph-utf8/"))
1428 (mkdir-p (string-append (assoc-ref %outputs "doc")
1429 "/share/texmf-dist/doc/luatex/hyph-utf8/"))
1430
1431 ;; We cannot build the documentation because that requires a
1432 ;; fully functional pdflatex, which depends on this package.
1433 (substitute* "source/luatex/hyph-utf8/Makefile"
1434 (("all: .*") "all: $(RUNFILES)\n"))
1435
1436 ;; Find required fonts for building tex.fmt
1437 (setenv "TFMFONTS"
1438 (string-append (assoc-ref inputs "texlive-fonts-cm")
1439 "/share/texmf-dist/fonts/tfm/public/cm:"
1440 (assoc-ref inputs "texlive-fonts-knuth-lib")
1441 "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
1442 ;; ...and find all tex files in this environment.
1443 (setenv "TEXINPUTS"
1444 (string-append
1445 (getcwd) ":"
1446 (string-join
1447 (map (match-lambda ((_ . dir) dir)) inputs)
1448 "//:")))
1449
1450 ;; Generate tex.fmt.
1451 (let ((where "source/luatex/hyph-utf8"))
1452 (mkdir-p where)
1453 (with-directory-excursion where
1454 (invoke "tex" "-ini"
1455 (string-append (assoc-ref inputs "texlive-tex-plain")
1456 "/share/texmf-dist/tex/plain/config/tex.ini"))))))
1457 (add-before 'build 'build-loaders-and-converters
1458 (lambda* (#:key outputs #:allow-other-keys)
1459 (let* ((root (string-append (assoc-ref outputs "out")
1460 "/share/texmf-dist"))
1461 (conv
1462 (string-append root
1463 "/tex/generic/hyph-utf8/conversions")))
1464
1465 ;; Build converters
1466 (mkdir-p conv)
1467 (with-directory-excursion "source/generic/hyph-utf8"
1468 (substitute* "generate-converters.rb"
1469 (("\\$path_root=File.*")
1470 (string-append "$path_root=\"" root "\"\n"))
1471 ;; Avoid error with newer Ruby.
1472 (("#1\\{%") "#1{%%"))
1473 (invoke "ruby" "generate-converters.rb"))
1474 #t)))
1475 (replace 'install
1476 (lambda* (#:key source outputs #:allow-other-keys)
1477 (let ((doc (assoc-ref outputs "doc"))
1478 (out (assoc-ref outputs "out")))
1479 (mkdir-p doc)
1480 (copy-recursively
1481 (string-append source "/doc")
1482 (string-append doc "/doc"))
1483 (install-file
1484 (string-append source "/tex/luatex/hyph-utf8/etex.src")
1485 (string-append out "/share/texmf-dist/tex/luatex/hyph-utf8/")))
1486 #t)))))
1487 (native-inputs
1488 `(("ruby" ,ruby)
1489 ("texlive-bin" ,texlive-bin)
1490 ;; The following packages are needed for build "tex.fmt", which we need
1491 ;; for a working "tex".
1492 ("texlive-tex-plain" ,texlive-tex-plain)
1493 ("texlive-fonts-cm" ,texlive-fonts-cm)
1494 ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib)
1495 ("texlive-hyphen-base" ,texlive-hyphen-base)))
1496 (home-page "https://ctan.org/pkg/hyph-utf8")
1497 (synopsis "Hyphenation patterns expressed in UTF-8")
1498 (description "Modern native UTF-8 engines such as XeTeX and LuaTeX need
1499hyphenation patterns in UTF-8 format, whereas older systems require
1500hyphenation patterns in the 8-bit encoding of the font in use (such encodings
1501are codified in the LaTeX scheme with names like OT1, T2A, TS1, OML, LY1,
1502etc). The present package offers a collection of conversions of existing
1503patterns to UTF-8 format, together with converters for use with 8-bit fonts in
1504older systems. Since hyphenation patterns for Knuthian-style TeX systems are
1505only read at iniTeX time, it is hoped that the UTF-8 patterns, with their
1506converters, will completely supplant the older patterns.")
1507 ;; Individual files each have their own license. Most of these files are
1508 ;; independent hyphenation patterns.
1509 (license (list license:lppl1.0+
1510 license:lppl1.2+
1511 license:lppl1.3
1512 license:lppl1.3+
1513 license:lppl1.3a+
1514 license:lgpl2.1
1515 license:lgpl2.1+
1516 license:lgpl3+
1517 license:gpl2+
1518 license:gpl3+
1519 license:mpl1.1
1520 license:asl2.0
1521 license:expat
1522 license:bsd-3
1523 license:cc0
1524 license:public-domain
1525 license:wtfpl2))))
1526
1527(define-public texlive-generic-hyph-utf8
1528 (deprecated-package "texlive-generic-hyph-utf8" texlive-hyph-utf8))
1529
e68c7091
RW
1530(define-public texlive-dehyph-exptl
1531 (package
1532 (inherit (simple-texlive-package
1533 "texlive-dehyph-exptl"
1534 (list "/tex/generic/dehyph-exptl/"
1535 "/doc/generic/dehyph-exptl/")
1536 (base32
1537 "1w2danvvy2f52hcb4acvjks53kcanwxr9s990fap6mj279hpgmh2")
1538 #:trivial? #t))
1539 (propagated-inputs
1540 `(("texlive-hyphen-base" ,texlive-hyphen-base)
1541 ("texlive-hyph-utf8" ,texlive-hyph-utf8)))
1542 (home-page "http://projekte.dante.de/Trennmuster/WebHome")
1543 (synopsis "Hyphenation patterns for German")
1544 (description "The package provides experimental hyphenation patterns for
1545the German language, covering both traditional and reformed orthography. The
1546patterns can be used with packages Babel and hyphsubst from the Oberdiek
1547bundle.")
1548 ;; Hyphenation patterns are under the Expat license; documentation is
1549 ;; under LPPL.
1550 (license (list license:expat license:lppl))))
1551
1552(define-public texlive-generic-dehyph-exptl
1553 (deprecated-package "texlive-generic-dehyph-exptl" texlive-dehyph-exptl))
1554
010f476f
RW
1555(define-public texlive-latex-base
1556 (let ((texlive-dir
1557 (lambda (dir hash)
1558 (origin
1559 (method svn-fetch)
1560 (uri (svn-reference
1561 (url (string-append "svn://www.tug.org/texlive/tags/"
1562 %texlive-tag "/Master/texmf-dist/"
1563 dir))
1564 (revision %texlive-revision)))
8d514ae7
EF
1565 (file-name (string-append "texlive-generic-"
1566 (last (string-split
1567 (string-drop-right dir 1) #\/))
1568 "-" (number->string %texlive-revision)
1569 "-checkout"))
010f476f
RW
1570 (sha256 (base32 hash))))))
1571 (package
1572 (name "texlive-latex-base")
1573 (version (number->string %texlive-revision))
1574 (source (origin
1575 (method svn-fetch)
1576 (uri (texlive-ref "latex" "base"))
8d514ae7 1577 (file-name (string-append name "-" version "-checkout"))
010f476f
RW
1578 (sha256
1579 (base32
d4d9a1ec 1580 "17bqrzzjz16k52sc7ydl4vw7ddy2z3g0p1xsk2c35h1ynq9h3wwm"))))
010f476f
RW
1581 (build-system gnu-build-system)
1582 (arguments
1583 `(#:modules ((guix build gnu-build-system)
1584 (guix build utils)
1585 (ice-9 match)
1586 (srfi srfi-1)
1587 (srfi srfi-26))
1588 #:tests? #f ; no tests
1589 #:phases
1590 (modify-phases %standard-phases
1591 (delete 'configure)
1592 (replace 'build
1593 (lambda* (#:key inputs #:allow-other-keys)
1594 ;; Find required fonts
1595 (setenv "TFMFONTS"
1596 (string-append (assoc-ref inputs "texlive-fonts-cm")
1597 "/share/texmf-dist/fonts/tfm/public/cm:"
1598 (assoc-ref inputs "texlive-fonts-latex")
1599 "/share/texmf-dist/fonts/tfm/public/latex-fonts:"
1600 (assoc-ref inputs "texlive-fonts-knuth-lib")
1601 "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
1602 (setenv "TEXINPUTS"
1603 (string-append
1604 (getcwd) ":"
1605 (getcwd) "/build:"
1606 (string-join
6858ade2
RW
1607 (map (match-lambda ((_ . dir) dir)) inputs)
1608 "//:")))
010f476f
RW
1609
1610 ;; Create an empty texsys.cfg, because latex.ltx wants to include
1611 ;; it. This file must exist and it's fine if it's empty.
1612 (with-output-to-file "texsys.cfg"
1613 (lambda _ (format #t "%")))
1614
1615 (mkdir "build")
1616 (mkdir "web2c")
4f2f53f9
MW
1617 (invoke "luatex" "-ini" "-interaction=batchmode"
1618 "-output-directory=build" "unpack.ins")
1619 (invoke "tex" "-ini" "-interaction=batchmode"
1620 "-output-directory=web2c" "tex.ini")
1621 ;; LaTeX, pdfetex/pdftex, and XeTeX require e-TeX, which
1622 ;; is enabled only in extended mode (activated with a
1623 ;; leading asterisk). We should not use luatex here,
1624 ;; because that would make the generated format files
1625 ;; incompatible with any other TeX engine.
1626 (for-each (lambda (format)
1627 (invoke "latex" "-ini" "-interaction=batchmode"
1628 "-output-directory=web2c"
1629 "-translate-file=cp227.tcx"
1630 (string-append "*" format ".ini")))
1631 '("latex"
1632 "pdflatex"
1633 "pdfetex"))
1634 (for-each (lambda (format)
1635 (invoke format "-ini" "-interaction=batchmode"
1636 "-output-directory=web2c"
1637 (string-append "*" format ".ini")))
1638 '("xetex"
1639 "xelatex"))
1640 (for-each (lambda (format)
1641 (invoke "luatex" "-ini" "-interaction=batchmode"
1642 "-output-directory=web2c"
1643 (string-append format ".ini")))
1644 '("dviluatex" "dvilualatex" "luatex" "lualatex"))
1645 #t))
010f476f 1646 (replace 'install
756fc3e1 1647 (lambda* (#:key inputs outputs #:allow-other-keys)
010f476f
RW
1648 (let* ((out (assoc-ref outputs "out"))
1649 (target (string-append
1650 out "/share/texmf-dist/tex/latex/base"))
1651 (web2c (string-append
756fc3e1
PN
1652 out "/share/texmf-dist/web2c"))
1653 (support-files (assoc-ref inputs "texlive-latex-base-support-files")))
010f476f
RW
1654 (mkdir-p target)
1655 (mkdir-p web2c)
1656 (for-each delete-file (find-files "." "\\.(log|aux)$"))
1657 (for-each (cut install-file <> target)
1658 (find-files "build" ".*"))
1659 (for-each (cut install-file <> web2c)
1660 (find-files "web2c" ".*"))
bd6e2385
RW
1661 ;; pdftex is really just the same as pdfetex, but since it
1662 ;; doesn't have its own format file, we need to copy it.
1663 (copy-file "web2c/pdfetex.fmt"
1664 (string-append web2c "/pdftex.fmt"))
756fc3e1
PN
1665 ;; "source" is missing the support files as per doc/latex/base/manifest.txt.
1666 ;; FIXME: We are probably not packaging this right.
1667 (for-each (lambda (file)
1668 (install-file
1669 (string-append support-files "/" file)
1670 target))
1671 '("ltxguide.cls" "ltnews.cls" "minimal.cls" "idx.tex"
1672 "lablst.tex" "testpage.tex" "ltxcheck.tex"))
d68c8017
RW
1673 ;; Install configurations
1674 (copy-recursively
1675 (assoc-ref inputs "texlive-latex-latexconfig")
1676 (string-append out "/share/texmf-dist/tex/latex/latexconfig"))
1677 (copy-recursively
1678 (assoc-ref inputs "texlive-generic-config")
1679 (string-append out "/share/texmf-dist/tex/generic/config"))
1680 (copy-recursively
1681 (assoc-ref inputs "texlive-generic-hyphen")
1682 (string-append out "/share/texmf-dist/tex/generic/hyphen"))
1683 (copy-recursively
1684 (assoc-ref inputs "texlive-generic-ruhyphen")
1685 (string-append out "/share/texmf-dist/tex/generic/ruhyphen"))
1686 (copy-recursively
1687 (assoc-ref inputs "texlive-generic-ukrhyph")
1688 (string-append out "/share/texmf-dist/tex/generic/ukrhyph"))
010f476f
RW
1689 #t))))))
1690 (native-inputs
1691 `(("texlive-bin" ,texlive-bin)
1692 ("texlive-generic-unicode-data" ,texlive-generic-unicode-data)
1693 ("texlive-generic-dehyph-exptl" ,texlive-generic-dehyph-exptl)
1694 ("texlive-generic-tex-ini-files" ,texlive-generic-tex-ini-files)
1695 ("texlive-latex-latexconfig"
1696 ,(texlive-dir "tex/latex/latexconfig/"
1697 "1zb3j49cj8p75yph6c8iysjp7qbdvghwf0mn9j0l7qq3qkbz2xaf"))
010f476f
RW
1698 ("texlive-generic-hyphen"
1699 ,(texlive-dir "tex/generic/hyphen/"
1700 "0xim36wybw2625yd0zwlp9m2c2xrcybw58gl4rih9nkph0wqwwhd"))
1701 ("texlive-generic-ruhyphen"
1702 ,(texlive-dir "tex/generic/ruhyphen/"
1703 "14rjkpl4zkjqs13rcf9kcd24mn2kx7i1jbdwxq8ds94bi66ylzsd"))
1704 ("texlive-generic-ukrhyph"
1705 ,(texlive-dir "tex/generic/ukrhyph/"
1706 "1cfwdg2rhbayl3w0x1xqd36d45zbc96f029myp13s7cb6kbmbppv"))
1707 ("texlive-generic-config"
1708 ,(texlive-dir "tex/generic/config/"
d4d9a1ec 1709 "1v90iihy112q93zdpblpdk8zv8rf99fgslsg06s1sxm27zjm9nap"))
756fc3e1
PN
1710 ("texlive-latex-base-support-files"
1711 ,(origin
1712 (method svn-fetch)
1713 (uri (svn-reference
1714 (url (string-append "svn://www.tug.org/texlive/tags/"
1715 %texlive-tag "/Master/texmf-dist/"
1716 "/tex/latex/base"))
1717 (revision %texlive-revision)))
1718 (file-name (string-append name "-" version "-checkout"))
1719 (sha256
1720 (base32
d4d9a1ec 1721 "18wy8dlcw8adl6jzqwbg54pdwlhs8hilnfvqbw6ikj6y3zhqkj7q"))))
010f476f
RW
1722 ("texlive-tex-plain" ,texlive-tex-plain)
1723 ("texlive-fonts-cm" ,texlive-fonts-cm)
1724 ("texlive-fonts-latex" ,texlive-fonts-latex)
1725 ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib)))
d68c8017
RW
1726 (propagated-inputs
1727 `(("texlive-generic-hyph-utf8" ,texlive-generic-hyph-utf8)))
b8d8806b 1728 (home-page "https://www.ctan.org/pkg/latex-base")
010f476f
RW
1729 (synopsis "Base sources of LaTeX")
1730 (description
1731 "This bundle comprises the source of LaTeX itself, together with several
1732packages which are considered \"part of the kernel\". This bundle, together
1733with the required packages, constitutes what every LaTeX distribution should
1734contain.")
1735 (license license:lppl1.3c+))))
1736
3e485ed2
RW
1737(define-public texlive-latex-filecontents
1738 (package
1739 (name "texlive-latex-filecontents")
1740 (version (number->string %texlive-revision))
1741 (source (origin
1742 (method svn-fetch)
1743 (uri (texlive-ref "latex" "filecontents"))
7e353a77 1744 (file-name (string-append name "-" version "-checkout"))
3e485ed2
RW
1745 (sha256
1746 (base32
1747 "0swkbxv8vg0yizadfnvrwjb4cj0pn34v9wm6v7wqq903fdav7k7q"))))
1748 (build-system texlive-build-system)
1749 (arguments '(#:tex-directory "latex/filecontents"))
b8d8806b 1750 (home-page "https://www.ctan.org/pkg/filecontents")
3e485ed2
RW
1751 (synopsis "Extended filecontents and filecontents* environments")
1752 (description
1753 "LaTeX2e's @code{filecontents} and @code{filecontents*} environments
1754enable a LaTeX source file to generate external files as it runs through
1755LaTeX. However, there are two limitations of these environments: they refuse
1756to overwrite existing files, and they can only be used in the preamble of a
1757document. The filecontents package removes these limitations, letting you
1758overwrite existing files and letting you use @code{filecontents} /
1759@code{filecontents*} anywhere.")
1760 (license license:lppl1.3c+)))
1761
1193aa89
RW
1762(define-public texlive-generic-ifxetex
1763 (package
1764 (name "texlive-generic-ifxetex")
fea8eef3 1765 (version (number->string %texlive-revision))
1193aa89
RW
1766 (source (origin
1767 (method svn-fetch)
1768 (uri (texlive-ref "generic" "ifxetex"))
24dbc602 1769 (file-name (string-append name "-" version "-checkout"))
1193aa89
RW
1770 (sha256
1771 (base32
1772 "0w2xj7n0szavj329kds09q626szkc378p3w0sk022q0ln4ksz86d"))))
1773 (build-system texlive-build-system)
1774 (arguments
1775 '(#:tex-directory "generic/ifxetex"
1776 #:tex-format "xelatex"))
1777 (inputs
1778 `(("texlive-latex-filecontents" ,texlive-latex-filecontents)))
b8d8806b 1779 (home-page "https://www.ctan.org/pkg/ifxetex")
1193aa89
RW
1780 (synopsis "Am I running under XeTeX?")
1781 (description
1782 "This is a simple package which provides an @code{\\ifxetex} conditional,
1783so that other code can determine that it is running under XeTeX. The package
beb476ed 1784requires the e-TeX extensions to the TeX primitive set.")
1193aa89
RW
1785 (license license:lppl1.3c+)))
1786
9186c156
RW
1787(define-public texlive-generic-epsf
1788 (package
1789 (name "texlive-generic-epsf")
1790 (version (number->string %texlive-revision))
1791 (source (origin
1792 (method svn-fetch)
1793 (uri (svn-reference
1794 (url (string-append "svn://www.tug.org/texlive/tags/"
1795 %texlive-tag "/Master/texmf-dist/"
1796 "/tex/generic/epsf"))
1797 (revision %texlive-revision)))
ca61c6b3 1798 (file-name (string-append name "-" version "-checkout"))
9186c156
RW
1799 (sha256
1800 (base32
1801 "14w3j81ympyvg8hkk9i1xgr8a0gfnfsb2ki8qqsk5pa051za1xcy"))))
1802 (build-system trivial-build-system)
1803 (arguments
1804 `(#:modules ((guix build utils))
1805 #:builder
1806 (begin
1807 (use-modules (guix build utils))
1808 (let ((target (string-append (assoc-ref %outputs "out")
1809 "/share/texmf-dist/tex/generic/epfs")))
1810 (mkdir-p target)
1811 (copy-recursively (assoc-ref %build-inputs "source") target)
1812 #t))))
b8d8806b 1813 (home-page "https://www.ctan.org/pkg/epsf")
9186c156
RW
1814 (synopsis "Simple macros for EPS inclusion")
1815 (description
1816 "This package provides the original (and now obsolescent) graphics
1817inclusion macros for use with dvips, still widely used by Plain TeX users (in
1818particular). For LaTeX users, the package is nowadays (rather strongly)
1819deprecated in favour of the more sophisticated standard LaTeX latex-graphics
1820bundle of packages. (The latex-graphics bundle is also available to Plain TeX
1821users, via its Plain TeX version.)")
1822 (license license:public-domain)))
1823
437822a1
RW
1824(define-public texlive-latex-fancyvrb
1825 (package
1826 (name "texlive-latex-fancyvrb")
1827 (version (number->string %texlive-revision))
1828 (source (origin
1829 (method svn-fetch)
1830 (uri (texlive-ref "latex" "fancyvrb"))
88e11022 1831 (file-name (string-append name "-" version "-checkout"))
437822a1
RW
1832 (sha256
1833 (base32
1834 "03l7140y031rr14h02i4z9zqsfvrbn7wzwxbjsrjcgrk6sdr71wv"))))
1835 (build-system texlive-build-system)
1836 (arguments
1837 '(#:tex-directory "latex/fancyvrb"
bae65dc4 1838 #:tex-format "latex"))
b8d8806b 1839 (home-page "https://www.ctan.org/pkg/fancyvrb")
437822a1
RW
1840 (synopsis "Sophisticated verbatim text")
1841 (description
1842 "This package provides tools for the flexible handling of verbatim text
1843including: verbatim commands in footnotes; a variety of verbatim environments
1844with many parameters; ability to define new customized verbatim environments;
1845save and restore verbatim text and environments; write and read files in
1846verbatim mode; build \"example\" environments (showing both result and
1847verbatim source).")
1848 (license license:lppl1.0+)))
1849
4eebd2cd
RW
1850(define-public texlive-latex-graphics
1851 (package
1852 (name "texlive-latex-graphics")
1853 (version (number->string %texlive-revision))
1854 (source (origin
1855 (method svn-fetch)
1856 (uri (texlive-ref "latex" "graphics"))
f7302073 1857 (file-name (string-append name "-" version "-checkout"))
4eebd2cd
RW
1858 (sha256
1859 (base32
d4d9a1ec 1860 "0nlfhn55ax89rcvpkrl9570671b62kcr4c9l5ch3w5zw9vmi00dz"))))
4eebd2cd
RW
1861 (build-system texlive-build-system)
1862 (arguments
1863 '(#:tex-directory "latex/graphics"
1864 #:phases
1865 (modify-phases %standard-phases
1866 (add-after 'install 'install-config
1867 (lambda* (#:key inputs outputs #:allow-other-keys)
1868 (let ((cfg (assoc-ref inputs "graphics-cfg"))
1869 (target (string-append (assoc-ref outputs "out")
1870 "/share/texmf-dist/tex/latex/graphics-cfg")))
1871 (mkdir-p target)
1872 (install-file (string-append cfg "/graphics.cfg") target)
1873 (install-file (string-append cfg "/color.cfg") target)
1874 #t)))
1875 (add-after 'install 'install-defs
1876 (lambda* (#:key inputs outputs #:allow-other-keys)
1877 (let ((def (assoc-ref inputs "graphics-def"))
1878 (target (string-append (assoc-ref outputs "out")
1879 "/share/texmf-dist/tex/latex/graphics-def")))
1880 (mkdir-p target)
1881 (copy-recursively def target)
1882 #t))))))
1883 (native-inputs
1884 `(("graphics-cfg"
1885 ,(origin
1886 (method git-fetch)
1887 (uri (git-reference
1888 (url "https://github.com/latex3/graphics-cfg.git")
1889 (commit "19d1238af17df376cd46333b229579b0f7f3a41f")))
f7302073
EF
1890 (file-name (string-append "graphics-cfg-"
1891 (number->string %texlive-revision)
1892 "-checkout"))
4eebd2cd
RW
1893 (sha256
1894 (base32
1895 "12kbgbm52gmmgn8zajb74s8n5rvnxcfdvs3iyj8vcw5vrsw5i6mh"))))
1896 ("graphics-def"
1897 ,(origin
1898 (method svn-fetch)
1899 (uri (svn-reference
1900 (url (string-append "svn://www.tug.org/texlive/tags/"
1901 %texlive-tag "/Master/texmf-dist/"
1902 "/tex/latex/graphics-def"))
1903 (revision %texlive-revision)))
f7302073
EF
1904 (file-name (string-append "graphics-def-"
1905 (number->string %texlive-revision)
1906 "-checkout"))
4eebd2cd
RW
1907 (sha256
1908 (base32
d4d9a1ec 1909 "17zpcgrfsr29g1dkz9np1qi63kjv7gb12rg979c6dai6qksbr3vq"))))))
b8d8806b 1910 (home-page "https://www.ctan.org/pkg/latex-graphics")
4eebd2cd
RW
1911 (synopsis "LaTeX standard graphics bundle")
1912 (description
1913 "This is a collection of LaTeX packages for producing color, including
1914graphics (e.g. PostScript) files, and rotation and scaling of text in LaTeX
1915documents. It comprises the packages color, graphics, graphicx, trig, epsfig,
1916keyval, and lscape.")
1917 ;; The configuration files are released under CC0.
1918 (license (list license:lppl1.3c+
1919 license:cc0))))
1920
f5a6af42
RW
1921(define-public texlive-latex-xcolor
1922 (package
1923 (name "texlive-latex-xcolor")
1924 (version (number->string %texlive-revision))
1925 (source (origin
1926 (method svn-fetch)
1927 (uri (texlive-ref "latex" "xcolor"))
19389bcd 1928 (file-name (string-append name "-" version "-checkout"))
f5a6af42
RW
1929 (sha256
1930 (base32
1931 "01n613s7bcrd2n4jfawm0k4nn2ny3aaifp2jjfif3lz4sbv31494"))))
1932 (build-system texlive-build-system)
1933 (arguments '(#:tex-directory "latex/xcolor"))
b8d8806b 1934 (home-page "https://www.ctan.org/pkg/xcolor")
f5a6af42
RW
1935 (synopsis "Driver-independent color extensions for LaTeX and pdfLaTeX")
1936 (description
1937 "The package starts from the basic facilities of the colorcolor package,
1938and provides easy driver-independent access to several kinds of color tints,
1939shades, tones, and mixes of arbitrary colors. It allows a user to select a
1940document-wide target color model and offers complete tools for conversion
1941between eight color models. Additionally, there is a command for alternating
1942row colors plus repeated non-aligned material (like horizontal lines) in
1943tables.")
1944 (license license:lppl1.2+)))
1945
4d660fdf
RW
1946(define-public texlive-latex-hyperref
1947 (package
1948 (name "texlive-latex-hyperref")
1949 (version "6.84a2")
1950 ;; The sources in the TeX Live SVN repository do not contain hluatex.dtx,
1951 ;; so we fetch the release from GitHub.
1952 (source (origin
1953 (method url-fetch)
1954 (uri (string-append "https://github.com/ho-tex/hyperref/"
1955 "archive/release-" version ".tar.gz"))
1956 (file-name (string-append name "-" version ".tar.gz"))
1957 (sha256
1958 (base32
1959 "1d3rmjgzh0025a1dza55zb6nzzlgd1y9snwx45wq1c1vf42m79h2"))))
1960 (build-system texlive-build-system)
1961 (arguments '(#:tex-directory "latex/hyperref"))
2a0bcbf4
RW
1962 (propagated-inputs
1963 `(("texlive-latex-oberdiek" ,texlive-latex-oberdiek) ; for ltxcmds.sty
1964 ("texlive-latex-url" ,texlive-latex-url)))
b8d8806b 1965 (home-page "https://www.ctan.org/pkg/hyperref")
4d660fdf
RW
1966 (synopsis "Extensive support for hypertext in LaTeX")
1967 (description
c5a8ecb6
RW
1968 "The @code{hyperref} package is used to handle cross-referencing commands
1969in LaTeX to produce hypertext links in the document. The package provides
1970backends for the @code{\\special} set defined for HyperTeX DVI processors; for
1971embedded @code{pdfmark} commands for processing by Acrobat
1972Distiller (@code{dvips} and Y&Y's @code{dvipsone}); for Y&Y's @code{dviwindo};
1973for PDF control within pdfTeX and @code{dvipdfm}; for TeX4ht; and for VTeX's
1974pdf and HTML backends. The package is distributed with the @code{backref} and
1975@code{nameref} packages, which make use of the facilities of @code{hyperref}.")
4d660fdf
RW
1976 (license license:lppl1.3+)))
1977
c3455b7d
RW
1978(define-public texlive-latex-oberdiek
1979 (package
1980 (name "texlive-latex-oberdiek")
1981 (version (number->string %texlive-revision))
1982 (source (origin
1983 (method svn-fetch)
1984 (uri (texlive-ref "latex" "oberdiek"))
7dea3119 1985 (file-name (string-append name "-" version "-checkout"))
c3455b7d
RW
1986 (sha256
1987 (base32
d4d9a1ec 1988 "1m9fg8ddhpsl1212igr9a9fmj012lv780aghjn6fpidg2wqrffmn"))))
c3455b7d
RW
1989 (build-system texlive-build-system)
1990 (arguments
1991 '(#:tex-directory "latex/oberdiek"
05d28068 1992 #:build-targets '("oberdiek.ins")
c3455b7d
RW
1993 #:phases
1994 (modify-phases %standard-phases
05d28068 1995 ;; "ifpdf.ins" is not generated, so we need to process the dtx file.
c3455b7d
RW
1996 (add-after 'unpack 'do-not-process-ifpdf.ins
1997 (lambda _
1998 (substitute* "oberdiek.ins"
05d28068 1999 (("ifpdf.ins") "ifpdf.dtx"))
c3455b7d 2000 #t)))))
a9cd7b03
RW
2001 (propagated-inputs
2002 `(("texlive-generic-ifxetex" ,texlive-generic-ifxetex)))
b8d8806b 2003 (home-page "https://www.ctan.org/pkg/oberdiek")
c3455b7d
RW
2004 (synopsis "Bundle of packages submitted by Heiko Oberdiek")
2005 (description
2006 "The bundle comprises various LaTeX packages, providing among others:
2007better accessibility support for PDF files; extensible chemists reaction
2008arrows; record information about document class(es) used; and many more.")
2009 (license license:lppl1.3+)))
2010
f2536af2
RW
2011(define-public texlive-latex-tools
2012 (package
2013 (name "texlive-latex-tools")
2014 (version (number->string %texlive-revision))
2015 (source (origin
2016 (method svn-fetch)
2017 (uri (texlive-ref "latex" "tools"))
f8340ab1 2018 (file-name (string-append name "-" version "-checkout"))
f2536af2
RW
2019 (sha256
2020 (base32
d4d9a1ec 2021 "0vj7h1fgf1396h4qjdc2m07y08i54gbbfrxl8y327cn3r1n093s6"))))
f2536af2
RW
2022 (build-system texlive-build-system)
2023 (arguments
2024 '(#:tex-directory "latex/tools"
2025 #:build-targets '("tools.ins")))
b8d8806b 2026 (home-page "https://www.ctan.org/pkg/latex-tools")
f2536af2
RW
2027 (synopsis "LaTeX standard tools bundle")
2028 (description
2029 "This package is a collection of (variously) simple tools provided as
2030part of the LaTeX required tools distribution, comprising the following
2031packages: afterpage, array, bm, calc, dcolumn, delarray, enumerate, fileerr,
2032fontsmpl, ftnright, hhline, indentfirst, layout, longtable, multicol,
2033rawfonts, showkeys, somedefs, tabularx, theorem, trace, varioref, verbatim,
2034xr, and xspace.")
2035 (license license:lppl1.3+)))
2036
35adcc3a
RW
2037(define-public texlive-latex-url
2038 (package
2039 (name "texlive-latex-url")
2040 (version (number->string %texlive-revision))
2041 (source (origin
2042 (method svn-fetch)
2043 (uri (svn-reference
2044 (url (string-append "svn://www.tug.org/texlive/tags/"
2045 %texlive-tag "/Master/texmf-dist/"
2046 "/tex/latex/url"))
2047 (revision %texlive-revision)))
a26207f8 2048 (file-name (string-append name "-" version "-checkout"))
35adcc3a
RW
2049 (sha256
2050 (base32
2051 "184s2543cwia5l7iibhlkl1ffbncfhjpv5p56zq0c15by5sghlac"))))
2052 (build-system trivial-build-system)
2053 (arguments
2054 `(#:modules ((guix build utils))
2055 #:builder
2056 (begin
2057 (use-modules (guix build utils))
2058 (let ((target (string-append (assoc-ref %outputs "out")
2059 "/share/texmf-dist/tex/latex/url")))
2060 (mkdir-p target)
2061 (copy-recursively (assoc-ref %build-inputs "source") target)
2062 #t))))
2063 (home-page "https://www.ctan.org/pkg/url")
2064 (synopsis "Verbatim with URL-sensitive line breaks")
2065 (description "The command @code{\\url} is a form of verbatim command that
2066allows linebreaks at certain characters or combinations of characters, accepts
2067reconfiguration, and can usually be used in the argument to another command.
2068The command is intended for email addresses, hypertext links,
2069directories/paths, etc., which normally have no spaces, so by default the
2070package ignores spaces in its argument. However, a package option allows
2071spaces, which is useful for operating systems where spaces are a common part
2072of file names.")
2073 ;; The license header states that it is under LPPL version 2 or later, but
2074 ;; the latest version is 1.3c.
2075 (license license:lppl1.3c+)))
2076
a5b1ef84
RW
2077(define-public texlive-latex-l3kernel
2078 (package
2079 (name "texlive-latex-l3kernel")
2080 (version (number->string %texlive-revision))
2081 (source (origin
2082 (method svn-fetch)
2083 (uri (texlive-ref "latex" "l3kernel"))
f4a39a5b 2084 (file-name (string-append name "-" version "-checkout"))
a5b1ef84
RW
2085 (sha256
2086 (base32
d4d9a1ec 2087 "0p3fsxap1ilwjz356aq4s5ygwvdscis8bh93g8klf8mhrd8cr2jy"))))
a5b1ef84
RW
2088 (build-system texlive-build-system)
2089 (arguments
2090 '(#:tex-directory "latex/l3kernel"))
b8d8806b 2091 (home-page "https://www.ctan.org/pkg/l3kernel")
a5b1ef84
RW
2092 (synopsis "LaTeX3 programmers’ interface")
2093 (description
2094 "The l3kernel bundle provides an implementation of the LaTeX3
2095programmers’ interface, as a set of packages that run under LaTeX 2e. The
2096interface provides the foundation on which the LaTeX3 kernel and other future
2097code are built: it is an API for TeX programmers. The packages are set up so
2098that the LaTeX3 conventions can be used with regular LaTeX 2e packages.")
2099 (license license:lppl1.3c+)))
2100
cc09d48b
RW
2101(define-public texlive-latex-l3packages
2102 (package
2103 (name "texlive-latex-l3packages")
2104 (version (number->string %texlive-revision))
2105 (source (origin
2106 (method svn-fetch)
2107 (uri (texlive-ref "latex" "l3packages"))
b749aa98 2108 (file-name (string-append name "-" version "-checkout"))
cc09d48b
RW
2109 (sha256
2110 (base32
d4d9a1ec 2111 "0pyx0hffiyss363vv7fkrcdiaf7p099xnq0mngzqc7v8v9q849hs"))))
cc09d48b
RW
2112 (build-system texlive-build-system)
2113 (arguments
2114 '(#:tex-directory "latex/l3packages"
3d4908a7
PN
2115 ;; build-targets must be specified manually since they are in
2116 ;; sub-directories.
2117 #:build-targets '("l3keys2e.ins" "xparse.ins" "xfrac.ins" "xfp.ins" "xtemplate.ins")
cc09d48b
RW
2118 #:phases
2119 (modify-phases %standard-phases
2120 ;; All package sources are in sub-directories, so we need to add them
2121 ;; to TEXINPUTS.
2122 (add-after 'unpack 'set-TEXINPUTS
2123 (lambda _
2124 (let ((cwd (getcwd)))
2125 (setenv "TEXINPUTS"
2126 (string-append cwd "/l3keys2e:"
2127 cwd "/xparse:"
2128 cwd "/xfrac:"
2129 cwd "/xfp:"
3d4908a7
PN
2130 cwd "/xtemplate"
2131 ;; The terminating ":" is required to include the
2132 ;; l3kernel input as well.
2133 ":")))
2134 #t)))
2135 ))
2fea7041 2136 (propagated-inputs
cc09d48b 2137 `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel)))
b8d8806b 2138 (home-page "https://www.ctan.org/pkg/l3packages")
cc09d48b
RW
2139 (synopsis "High-level LaTeX3 concepts")
2140 (description
2141 "This bundle holds prototype implementations of concepts for a LaTeX
2142designer interface, to be used with the experimental LaTeX kernel as
2143programming tools and kernel sup­port. Packages provided in this release are:
2144
2145@enumerate
2146@item l3keys2e, which makes the facilities of the kernel module l3keys
2147 available for use by LaTeX 2e packages;
2148@item xfrac, which provides flexible splitlevel fractions;
2149@item xparse, which provides a high-level interface for declaring document
2150 commands; and
2151@item xtemplate, which provides a means of defining generic functions using a
2152 key-value syntax.
2153@end enumerate\n")
2154 (license license:lppl1.3c+)))
2155
58308491
RW
2156(define-public texlive-latex-fontspec
2157 (package
2158 (name "texlive-latex-fontspec")
2159 (version (number->string %texlive-revision))
2160 (source (origin
2161 (method svn-fetch)
2162 (uri (texlive-ref "latex" "fontspec"))
634a4a7f 2163 (file-name (string-append name "-" version "-checkout"))
58308491
RW
2164 (sha256
2165 (base32
d4d9a1ec 2166 "1p0mkn6iywl0k4m9cx3hnhylpi499inisff3f72pcf349baqsnvq"))))
58308491
RW
2167 (build-system texlive-build-system)
2168 (arguments
9c45beb4
RW
2169 '(#:tex-directory "latex/fontspec"
2170 #:phases
2171 (modify-phases %standard-phases
2172 (add-after 'install 'install-default-fontspec.cfg
2173 (lambda* (#:key outputs #:allow-other-keys)
2174 (with-output-to-file
2175 (string-append (assoc-ref outputs "out")
2176 "/share/texmf-dist/tex/latex/fontspec/fontspec.cfg")
2177 (lambda _
2178 (display "\
2179%%% FONTSPEC.CFG %%%
2180%
2181% This configuration file sets up TeX Ligatures by default for all fonts loaded
2182% with `\\setmainfont` and `\\setsansfont`.
2183%
2184% In addition, `\\setmonofont` has default features to enforce \"monospace\"
2185% settings with regard to space stretchability and shrinkability.
2186
2187\\defaultfontfeatures
2188 [\\rmfamily,\\sffamily]
2189 {Ligatures=TeX}
2190
2191\\defaultfontfeatures
2192 [\\ttfamily]
2193 {WordSpace={1,0,0},
2194 HyphenChar=None,
2195 PunctuationSpace=WordSpace}
2196")))
2197 #t)))))
b80ecc5a
RW
2198 (propagated-inputs
2199 `(("texlive-latex-l3packages" ,texlive-latex-l3packages)))
b8d8806b 2200 (home-page "https://www.ctan.org/pkg/fontspec")
58308491
RW
2201 (synopsis "Advanced font selection in XeLaTeX and LuaLaTeX")
2202 (description
2203 "Fontspec is a package for XeLaTeX and LuaLaTeX. It provides an
2204automatic and unified interface to feature-rich AAT and OpenType fonts through
2205the NFSS in LaTeX running on XeTeX or LuaTeX engines. The package requires
2206the l3kernel and xparse bundles from the LaTeX 3 development team.")
2207 (license license:lppl1.3+)))
2208
e93f472d
RW
2209;; The SVN directory contains little more than a dtx file that generates three
2210;; of the many lua files that should be installed as part of this package.
2211;; This is why we take the release from GitHub instead.
2212(define-public texlive-luatex-lualibs
2213 (package
2214 (name "texlive-luatex-lualibs")
2215 (version "2.5")
2216 (source (origin
2217 (method url-fetch)
2218 (uri (string-append "https://github.com/lualatex/lualibs/"
2219 "releases/download/v"
2220 version "/lualibs.zip"))
01d79c30 2221 (file-name (string-append name "-" version ".zip"))
e93f472d
RW
2222 (sha256
2223 (base32
2224 "1xx9blvrmx9hyhrl345lpai9m6xxnw997261a1ahn1bm5r2j5fqy"))))
2225 (build-system gnu-build-system)
2226 (arguments
2227 `(#:make-flags
2228 (list (string-append "DESTDIR="
2229 (assoc-ref %outputs "out")
2230 "/share/texmf-dist"))
2231 #:phases
2232 (modify-phases %standard-phases
2233 (delete 'configure))))
2234 (native-inputs
2235 `(("texlive-bin" ,texlive-bin)
2236 ("unzip" ,unzip)
2237 ("zip" ,zip)))
2238 (home-page "https://github.com/lualatex/lualibs")
2239 (synopsis "Lua modules for general programming (in the (La)TeX world)")
2240 (description
2241 "Lualibs is a collection of Lua modules useful for general programming.
2242The bundle is based on Lua modules shipped with ConTeXt, and made available in
2243this bundle for use independent of ConTeXt.")
2244 ;; GPL version 2 only
2245 (license license:gpl2)))
2246
769bb5e5
RW
2247(define-public texlive-luatex-luaotfload
2248 (package
2249 (name "texlive-luatex-luaotfload")
2250 (version "2.8-fix-2")
2251 ;; The release tarball does not contain all source files.
2252 (source (origin
2253 (method git-fetch)
2254 (uri (git-reference
2255 (url "https://github.com/lualatex/luaotfload.git")
2256 (commit (string-append "v" version))))
2257 (file-name (git-file-name name version))
2258 (sha256
2259 (base32
2260 "0l5l7iq3dxcxl65qaghcpjg27yd9iw1sxa8pnd7xlvlm09dhfdnf"))))
2261 (build-system gnu-build-system)
2262 (arguments
2263 `(#:make-flags
2264 (list (string-append "DESTDIR="
2265 (assoc-ref %outputs "out")
2266 "/share/texmf-dist")
2267 "all")
2268 #:parallel-build? #f ; not supported
2269 #:phases
2270 (modify-phases %standard-phases
2271 (replace 'configure
2272 (lambda* (#:key inputs #:allow-other-keys)
2273 (substitute* "doc/Makefile"
2274 (("rst2man") "rst2man.py")
2275 ;; Don't build the PDF. This requires more of LaTeX.
2276 (("\\$\\(DOCPDF\\)") ""))
2277
2278 (substitute* "Makefile"
2279 ;; We don't build the PDF, so don't attempt to install it.
2280 (("cp \\$\\(RESOURCES\\) \\$\\(DOCPDF\\)")
2281 "cp $(RESOURCES)")
2282 (("= \\$\\(DOCPDF\\)") "= ")
2283 ;; Fix name of fontloader file
2284 (("^LOADER.*= \\$\\(BUILDDIR\\)/fontloader-\\$\\(shell date \\+%F\\).lua")
2285 "LOADER = $(BUILDDIR)/fontloader.lua"))
2286
2287 (mkdir "build")
2288
2289 ;; Don't download this file.
2290 (copy-file (assoc-ref inputs "glyphlist")
2291 "build/glyphlist.txt")
2292
2293 ;; Don't use git
2294 (let ((notes
2295 `((committer . "Philipp Gesang <phg@phi-gamma.net>")
2296 (description . ,version)
2297 (loader . "fontloader.lua")
2298 (revision . "ad480924393fffa2896156e1a32c22f5c61120dd")
2299 (timestamp . "2019-01-01 00:00:00 +0000"))))
2300 (substitute* "scripts/mkstatus"
2301 (("local notes.*=.*")
2302 (string-append "local notes = {"
2303 (string-join
2304 (map (lambda (entry)
2305 (format "[\"~a\"]=\"~a\","
2306 (symbol->string (car entry))
2307 (cdr entry)))
2308 notes))
2309 "}"))))
2310 #t)))))
2311 (native-inputs
2312 `(("zip" ,zip)
2313 ("unzip" ,unzip)
2314 ("graphviz" ,graphviz)
2315 ("lualatex" ,(texlive-union (list texlive-luatex-lualibs
2316 texlive-context-base)))
2317 ("python-docutils" ,python-docutils)
2318 ("glyphlist"
2319 ,(origin
2320 (method url-fetch)
2321 (uri (string-append "https://raw.githubusercontent.com/adobe-type-tools/"
2322 "agl-aglfn/b2a04cb906f9257cc06a2fe0ad4b3d663bc02136/"
2323 "glyphlist.txt"))
2324 (sha256
2325 (base32 "1s6svfw23rqzdvflv8frgd4xrwvrmsj8szwzqgcd39dp9rpjafjp"))))))
2326 (propagated-inputs
2327 `(("texlive-luatex-lualibs" ,texlive-luatex-lualibs)))
2328 (home-page "https://github.com/lualatex/luaotfload")
2329 (synopsis "OpenType font loader for LuaTeX")
2330 (description
2331 "Luaotfload is an adaptation of the ConTeXt font loading system for the
2332Plain and LaTeX formats. It allows OpenType fonts to be loaded with font
2333features accessible using an extended font request syntax while providing
2334compatibilitywith XeTeX. By indexing metadata in a database it facilitates
2335loading fonts by their proper names instead of file names.")
2336 ;; GPL version 2 only
2337 (license license:gpl2)))
2338
2573163a
RW
2339(define-public texlive-latex-amsmath
2340 (package
2341 (name "texlive-latex-amsmath")
2342 (version (number->string %texlive-revision))
2343 (source (origin
2344 (method svn-fetch)
2345 (uri (texlive-ref "latex" "amsmath"))
320c771a 2346 (file-name (string-append name "-" version "-checkout"))
2573163a
RW
2347 (sha256
2348 (base32
d4d9a1ec 2349 "0arvk7gn32mshnfdad5qkgf3i1arxq77k3vq7wnpm4nwnrzclxal"))))
2573163a
RW
2350 (build-system texlive-build-system)
2351 (arguments '(#:tex-directory "latex/amsmath"))
b8d8806b 2352 (home-page "https://www.ctan.org/pkg/amsmath")
2573163a
RW
2353 (synopsis "AMS mathematical facilities for LaTeX")
2354 (description
2355 "This is the principal package in the AMS-LaTeX distribution. It adapts
2356for use in LaTeX most of the mathematical features found in AMS-TeX; it is
2357highly recommended as an adjunct to serious mathematical typesetting in LaTeX.
2358When amsmath is loaded, AMS-LaTeX packages @code{amsbsyamsbsy} (for bold
2359symbols), @code{amsopnamsopn} (for operator names) and
2360@code{amstextamstext} (for text embedded in mathematics) are also loaded.
2361This package is part of the LaTeX required distribution; however, several
2362contributed packages add still further to its appeal; examples are
2363@code{empheqempheq}, which provides functions for decorating and highlighting
2364mathematics, and @code{ntheoremntheorem}, for specifying theorem (and similar)
2365definitions.")
2366 (license license:lppl1.3c+)))
2367
18e366e8
RW
2368(define-public texlive-latex-amscls
2369 (package
2370 (name "texlive-latex-amscls")
2371 (version (number->string %texlive-revision))
2372 (source (origin
2373 (method svn-fetch)
2374 (uri (texlive-ref "latex" "amscls"))
43059ed0 2375 (file-name (string-append name "-" version "-checkout"))
18e366e8
RW
2376 (sha256
2377 (base32
d4d9a1ec 2378 "0c2j9xh4qpi0x1vvcxdjxq6say0zhyr569fryi5cmhp8bclh4kca"))))
18e366e8
RW
2379 (build-system texlive-build-system)
2380 (arguments
2381 `(#:tex-directory "latex/amscls"))
b8d8806b 2382 (home-page "https://www.ctan.org/pkg/amscls")
18e366e8
RW
2383 (synopsis "AMS document classes for LaTeX")
2384 (description
2385 "This bundle contains three AMS classes: @code{amsartamsart} (for writing
2386articles for the AMS), @code{amsbookamsbook} (for books) and
2387@code{amsprocamsproc} (for proceedings), together with some supporting
2388material. The material is made available as part of the AMS-LaTeX
2389distribution.")
2390 (license license:lppl1.3c+)))
2391
f84d5a09
RW
2392(define-public texlive-latex-babel
2393 (package
2394 (name "texlive-latex-babel")
2395 (version (number->string %texlive-revision))
2396 (source (origin
2397 (method svn-fetch)
2398 (uri (texlive-ref "latex" "babel"))
8732493e 2399 (file-name (string-append name "-" version "-checkout"))
f84d5a09
RW
2400 (sha256
2401 (base32
d4d9a1ec 2402 "0yhlfiz3fjc8jd46f1zrjj4jig48l8rrzh8cmd8ammml8z9a01z6"))))
f84d5a09
RW
2403 (build-system texlive-build-system)
2404 (arguments
dcc8af4a 2405 '(#:tex-directory "generic/babel"
f84d5a09
RW
2406 #:phases
2407 (modify-phases %standard-phases
2408 ;; This package tries to produce babel.aux twice but refuses to
2409 ;; overwrite the first one.
2410 (add-before 'build 'fix-ins
2411 (lambda _
2412 (substitute* "babel.ins"
2413 (("askonceonly") "askforoverwritefalse"))
2414 #t)))))
b8d8806b 2415 (home-page "https://www.ctan.org/pkg/babel")
f84d5a09
RW
2416 (synopsis "Multilingual support for Plain TeX or LaTeX")
2417 (description
2418 "The package manages culturally-determined typographical (and other)
2419rules, and hyphenation patterns for a wide range of languages. A document may
2420select a single language to be supported, or it may select several, in which
2421case the document may switch from one language to another in a variety of
2422ways. Babel uses contributed configuration files that provide the detail of
2423what has to be done for each language. Users of XeTeX are advised to use the
2424polyglossia package rather than Babel.")
2425 (license license:lppl1.3+)))
2426
876a1980
RW
2427(define-public texlive-generic-babel-english
2428 (package
2429 (name "texlive-generic-babel-english")
2430 (version (number->string %texlive-revision))
2431 (source (origin
2432 (method svn-fetch)
2433 (uri (texlive-ref "generic" "babel-english"))
2434 (file-name (string-append name "-" version "-checkout"))
2435 (sha256
2436 (base32
2437 "1s404wbx91z5w65hm024kyl4h56zsa096irx18vsx8jvlmwsr5wc"))))
2438 (build-system texlive-build-system)
2439 (arguments '(#:tex-directory "generic/babel-english"))
b8d8806b 2440 (home-page "https://www.ctan.org/pkg/babel-english")
876a1980
RW
2441 (synopsis "Babel support for English")
2442 (description
2443 "This package provides the language definition file for support of
2444English in @code{babel}. Care is taken to select British hyphenation patterns
2445for British English and Australian text, and default (\"american\") patterns
2446for Canadian and USA text.")
2447 (license license:lppl1.3+)))
2448
6309d215
RW
2449(define-public texlive-generic-babel-german
2450 (package
2451 (name "texlive-generic-babel-german")
2452 (version (number->string %texlive-revision))
2453 (source (origin
2454 (method svn-fetch)
2455 (uri (texlive-ref "generic" "babel-german"))
2456 (file-name (string-append name "-" version "-checkout"))
2457 (sha256
2458 (base32
2459 "0h47s67gnhdaxfgbf8pirp5vw4z6rrhxl8zav803yjxka0096i3y"))))
2460 (build-system texlive-build-system)
2461 (arguments '(#:tex-directory "generic/babel-german"))
2462 (home-page "https://www.ctan.org/pkg/babel-german")
2463 (synopsis "Babel support for German")
2464 (description
2465 "This package provides the language definition file for support of German
2466in @code{babel}. It provides all the necessary macros, definitions and
2467settings to typeset German documents. The bundle includes support for the
2468traditional and reformed German orthography as well as for the Austrian and
2469Swiss varieties of German.")
2470 (license license:lppl1.3+)))
2471
93286d38
RW
2472(define-public texlive-latex-cyrillic
2473 (package
2474 (name "texlive-latex-cyrillic")
2475 (version (number->string %texlive-revision))
2476 (source (origin
2477 (method svn-fetch)
2478 (uri (texlive-ref "latex" "cyrillic"))
51bffe79 2479 (file-name (string-append name "-" version "-checkout"))
93286d38
RW
2480 (sha256
2481 (base32
d4d9a1ec 2482 "083xbwg7hrnlv47fkwvz8yjb830bhxx7y0mq7z7nz2f96y2ldr6b"))))
93286d38
RW
2483 (build-system texlive-build-system)
2484 (arguments
2485 '(#:tex-directory "latex/cyrillic"))
b8d8806b 2486 (home-page "https://www.ctan.org/pkg/latex-cyrillic")
93286d38
RW
2487 (synopsis "Support for Cyrillic fonts in LaTeX")
2488 (description
2489 "This bundle of macros files provides macro support (including font
2490encoding macros) for the use of Cyrillic characters in fonts encoded under the
2491T2* and X2 encodings. These encodings cover (between them) pretty much every
2492language that is written in a Cyrillic alphabet.")
2493 (license license:lppl1.3c+)))
2494
83fe6231
RW
2495(define-public texlive-latex-psnfss
2496 (package
2497 (name "texlive-latex-psnfss")
2498 (version (number->string %texlive-revision))
2499 (source (origin
2500 (method svn-fetch)
2501 (uri (texlive-ref "latex" "psnfss"))
b5b10f3b 2502 (file-name (string-append name "-" version "-checkout"))
83fe6231
RW
2503 (sha256
2504 (base32
2505 "1920dcq8613yzprasbg80fh4fcjcidvvl54wkx438nimyxcri7qz"))))
2506 (build-system texlive-build-system)
2507 (arguments '(#:tex-directory "latex/psnfss"))
b8d8806b 2508 (home-page "https://www.ctan.org/pkg/psnfss")
83fe6231
RW
2509 (synopsis "Font support for common PostScript fonts")
2510 (description
2511 "The PSNFSS collection includes a set of files that provide a complete
2512working setup of the LaTeX font selection scheme (NFSS2) for use with common
2513PostScript fonts. It covers the so-called \"Base\" fonts (which are built
2514into any Level 2 PostScript printing device and the Ghostscript interpreter)
2515and a number of free fonts. It provides font definition files, macros and
2516font metrics. The bundle as a whole is part of the LaTeX required set of
2517packages.")
2518 (license license:lppl1.2+)))
2519
bfcb9d4d
RW
2520;; For user profiles
2521(define-public texlive-base
2522 (let ((default-packages
2523 (list texlive-bin
2524 texlive-dvips
2525 texlive-fontname
2526 texlive-fonts-cm
2527 texlive-fonts-latex
2528 texlive-metafont-base
2529 texlive-latex-base
2530 ;; LaTeX packages from the "required" set.
2531 texlive-latex-amsmath
2532 texlive-latex-amscls
2533 texlive-latex-babel
2534 texlive-generic-babel-english
2535 texlive-latex-cyrillic
2536 texlive-latex-graphics
2537 texlive-latex-psnfss
2538 texlive-latex-tools)))
2539 (package
2540 (name "texlive-base")
2541 (version (number->string %texlive-revision))
2542 (source #f)
2543 (build-system trivial-build-system)
2544 (arguments
2545 '(#:builder
2546 (begin (mkdir (assoc-ref %outputs "out")))))
2547 (propagated-inputs
2548 (map (lambda (package)
2549 (list (package-name package) package))
2550 default-packages))
2551 (home-page (package-home-page texlive-bin))
2552 (synopsis "TeX Live base packages")
2553 (description "This is a very limited subset of the TeX Live distribution.
2554It includes little more than the required set of LaTeX packages.")
2555 (license (fold (lambda (package result)
2556 (match (package-license package)
2557 ((lst ...)
2558 (append lst result))
2559 ((? license:license? license)
2560 (cons license result))))
2561 '()
2562 default-packages)))))
2563
d7da2372 2564;; For use in package definitions only
cb7bc20a
RW
2565(define-public texlive-union
2566 (lambda* (#:optional (packages '()))
2567 "Return 'texlive-union' package which is a union of PACKAGES and the
2568standard LaTeX packages."
d7da2372
RW
2569 (let ((default-packages (match (package-propagated-inputs texlive-base)
2570 (((labels packages) ...) packages))))
2571 (package (inherit texlive-base)
cb7bc20a 2572 (name "texlive-union")
cb7bc20a
RW
2573 (build-system trivial-build-system)
2574 (arguments
2575 '(#:modules ((guix build union)
2576 (guix build utils)
2577 (guix build texlive-build-system)
2578 (guix build gnu-build-system)
2579 (guix build gremlin)
2580 (guix elf))
2581 #:builder
2582 (begin
2583 (use-modules (ice-9 match)
1a64a7b3 2584 (ice-9 popen)
cb7bc20a
RW
2585 (srfi srfi-26)
2586 (guix build union)
2587 (guix build utils)
2588 (guix build texlive-build-system))
2589 (let* ((out (assoc-ref %outputs "out"))
2590 (texmf.cnf (string-append out "/share/texmf-dist/web2c/texmf.cnf")))
1a64a7b3
RW
2591 ;; Build a modifiable union of all inputs (but exclude bash and
2592 ;; the updmap.cfg file)
cb7bc20a
RW
2593 (match (filter (match-lambda
2594 ((name . _)
1a64a7b3 2595 (not (member name '("bash" "updmap.cfg")))))
cb7bc20a
RW
2596 %build-inputs)
2597 (((names . directories) ...)
2598 (union-build (assoc-ref %outputs "out")
2599 directories
c58d1b5f
RW
2600 #:create-all-directories? #t
2601 #:log-port (%make-void-port "w"))))
cb7bc20a
RW
2602
2603 ;; The configuration file "texmf.cnf" is provided by the
2604 ;; "texlive-bin" package. We take it and override only the
2605 ;; setting for TEXMFROOT and TEXMF. This file won't be consulted
2606 ;; by default, though, so we still need to set TEXMFCNF.
2607 (substitute* texmf.cnf
2608 (("^TEXMFROOT = .*")
2609 (string-append "TEXMFROOT = " out "/share\n"))
2610 (("^TEXMF = .*")
2611 "TEXMF = $TEXMFROOT/share/texmf-dist\n"))
1a64a7b3
RW
2612 (setenv "PATH" (string-append
2613 (assoc-ref %build-inputs "bash") "/bin:"
2614 (assoc-ref %build-inputs "coreutils") "/bin:"
2615 (string-append out "/bin")))
cb7bc20a
RW
2616 (for-each
2617 (cut wrap-program <>
476f7fce
RW
2618 `("TEXMFCNF" ":" suffix (,(dirname texmf.cnf)))
2619 `("TEXMF" ":" suffix (,(string-append out "/share/texmf-dist"))))
cb7bc20a 2620 (find-files (string-append out "/bin") ".*"))
1a64a7b3
RW
2621
2622 ;; Remove invalid maps from config file.
2623 (let ((port (open-pipe* OPEN_WRITE "updmap-sys"
2624 "--syncwithtrees"
2625 "--nohash"
2626 (assoc-ref %build-inputs "updmap.cfg"))))
2627 (display "Y\n" port)
2628 (when (not (zero? (status:exit-val (close-pipe port))))
2629 (error "failed to filter updmap.cfg")))
2630 ;; Generate maps.
2631 (invoke "updmap-sys" "--force"
2632 (string-append out "/share/texmf-config/web2c/updmap.cfg"))
cb7bc20a
RW
2633 #t))))
2634 (inputs
2635 `(("bash" ,bash)
2636 ,@(map (lambda (package)
2637 (list (package-name package) package))
2638 (append default-packages packages))))
1a64a7b3
RW
2639 (native-inputs
2640 `(("coreutils" ,coreutils)
2641 ("sed" ,sed)
2642 ("updmap.cfg"
2643 ,(origin
2644 (method url-fetch)
2645 (uri (string-append "https://tug.org/svn/texlive/tags/"
2646 %texlive-tag "/Master/texmf-dist/web2c/updmap.cfg"
2647 "?revision=" (number->string %texlive-revision)))
2648 (file-name (string-append "updmap.cfg-"
2649 (number->string %texlive-revision)))
2650 (sha256
2651 (base32
2652 "06mwpy5i218g5k3sf4gba0fmxgas82hkzx9fhwn67z5ik37d8apq"))))))
cb7bc20a
RW
2653 (home-page (package-home-page texlive-bin))
2654 (synopsis "Union of TeX Live packages")
2655 (description "This package provides a subset of the TeX Live
2656distribution.")
2657 (license (fold (lambda (package result)
2658 (match (package-license package)
2659 ((lst ...)
2660 (append lst result))
2661 ((? license:license? license)
2662 (cons license result))))
2663 '()
2664 (append default-packages packages)))))))
2665
d7da2372 2666;; For use in package definitions only
9d4f8dc2
RW
2667(define-public texlive-tiny
2668 (package
2669 (inherit (texlive-union))
2670 (name "texlive-tiny")
2671 (description "This is a very limited subset of the TeX Live distribution.
2672It includes little more than the required set of LaTeX packages.")))
2673
60b5e228
RW
2674(define-public texlive-latex-amsrefs
2675 (package
2676 (name "texlive-latex-amsrefs")
2677 (version (number->string %texlive-revision))
2678 (source (origin
2679 (method svn-fetch)
2680 (uri (texlive-ref "latex" "amsrefs"))
2681 (file-name (string-append name "-" version "-checkout"))
2682 (sha256
2683 (base32
2684 "15i4k479dwrpr0kspmm70g1yn4p3dkh0whyzmr93hph9bggnh1i1"))))
2685 (build-system texlive-build-system)
2686 (arguments '(#:tex-directory "latex/amsrefs"))
b8d8806b 2687 (home-page "https://www.ctan.org/pkg/amsrefs")
60b5e228
RW
2688 (synopsis "LaTeX-based replacement for BibTeX")
2689 (description
2690 "Amsrefs is a LaTeX package for bibliographies that provides an archival
2691data format similar to the format of BibTeX database files, but adapted to
2692make direct processing by LaTeX easier. The package can be used either in
2693conjunction with BibTeX or as a replacement for BibTeX.")
2694 (license license:lppl1.3+)))
2695
3236599f
RW
2696(define-public texlive-latex-bigfoot
2697 (package
2698 (name "texlive-latex-bigfoot")
2699 (version (number->string %texlive-revision))
2700 (source (origin
2701 (method svn-fetch)
2702 (uri (texlive-ref "latex" "bigfoot"))
2703 (file-name (string-append name "-" version "-checkout"))
2704 (sha256
2705 (base32
2706 "092g8alnsdwlgl1isdnqrr32l161994295kadr1n05d81xgj5wnv"))))
2707 (build-system texlive-build-system)
2708 (arguments
2709 '(#:tex-directory "latex/bigfoot"
2710 #:phases
2711 (modify-phases %standard-phases
2712 (add-after 'unpack 'remove-generated-file
2713 (lambda _
2714 (for-each delete-file (find-files "." "\\.drv$"))
2715 #t)))))
b8d8806b 2716 (home-page "https://www.ctan.org/pkg/bigfoot")
3236599f
RW
2717 (synopsis "Footnotes for critical editions")
2718 (description
2719 "This package aims to provide a one-stop solution to requirements for
2720footnotes. It offers: Multiple footnote apparatus superior to that of
2721@code{manyfoot}. Footnotes can be formatted in separate paragraphs, or be run
2722into a single paragraph (this choice may be selected per footnote series);
2723Things you might have expected (such as @code{\\verb}-like material in
2724footnotes, and color selections over page breaks) now work. Note that the
2725majority of the bigfoot package's interface is identical to that of
2726@code{manyfoot}; users should seek information from that package's
2727documentation. The bigfoot bundle also provides the @code{perpage} and
2728@code{suffix} packages.")
2729 (license license:gpl2+)))
2730
8e732b49
RW
2731(define-public texlive-latex-blindtext
2732 (package
2733 (name "texlive-latex-blindtext")
2734 (version (number->string %texlive-revision))
2735 (source (origin
2736 (method svn-fetch)
2737 (uri (texlive-ref "latex" "blindtext"))
2738 (file-name (string-append name "-" version "-checkout"))
2739 (sha256
2740 (base32
2741 "1jrja9b1pzdh9zgv1jh807w4xijqja58n2mqny6dkwicv8qfgbfg"))))
2742 (build-system texlive-build-system)
2743 (arguments '(#:tex-directory "latex/blindtext"))
b8d8806b 2744 (home-page "https://www.ctan.org/pkg/blindtext")
8e732b49
RW
2745 (synopsis "Producing 'blind' text for testing")
2746 (description
2747 "The package provides the commands @code{\\blindtext} and
2748@code{\\Blindtext} for creating \"blind\" text useful in testing new classes
2749and packages, and @code{\\blinddocument}, @code{\\Blinddocument} for creating
2750an entire random document with sections, lists, mathematics, etc. The package
2751supports three languages, @code{english}, @code{(n)german} and @code{latin};
2752the @code{latin} option provides a short \"lorem ipsum\" (for a fuller \"lorem
2753ipsum\" text, see the @code{lipsum} package).")
2754 (license license:lppl)))
2755
7cda03bd
RW
2756(define-public texlive-latex-dinbrief
2757 (package
2758 (name "texlive-latex-dinbrief")
2759 (version (number->string %texlive-revision))
2760 (source (origin
2761 (method svn-fetch)
2762 (uri (texlive-ref "latex" "dinbrief"))
2763 (file-name (string-append name "-" version "-checkout"))
2764 (sha256
2765 (base32
2766 "0lb0kiy8fxzl6cnhcw1sggy6jrjvcd6kj1kkw3k9lkimm388yjz6"))))
2767 (build-system texlive-build-system)
2768 (arguments
2769 '(#:tex-directory "latex/dinbrief"
2770 #:phases
2771 (modify-phases %standard-phases
2772 (add-after 'unpack 'remove-generated-file
2773 (lambda _
2774 (delete-file "dinbrief.drv")
d4d9a1ec
RW
2775 #t))
2776 (add-after 'unpack 'fix-encoding-error
2777 (lambda _
2778 (with-fluids ((%default-port-encoding "ISO-8859-1"))
2779 (substitute* "dinbrief.dtx"
2780 (("zur Verf.+ung. In der Pr\"aambel")
2781 "zur Verf\"ung. In der Pr\"aambel")))
7cda03bd 2782 #t)))))
b8d8806b 2783 (home-page "https://www.ctan.org/pkg/dinbrief")
7cda03bd
RW
2784 (synopsis "German letter DIN style")
2785 (description
2786 "This package implements a document layout for writing letters according
2787to the rules of DIN (Deutsches Institut für Normung, German standardisation
2788institute). A style file for LaTeX 2.09 (with limited support of the
2789features) is part of the package. Since the letter layout is based on a
2790German standard, the user guide is written in German, but most macros have
2791English names from which the user can recognize what they are used for. In
2792addition there are example files showing how letters may be created with the
2793package.")
2794 (license license:lppl)))
2795
de224adb
RW
2796(define-public texlive-latex-draftwatermark
2797 (package
2798 (name "texlive-latex-draftwatermark")
2799 (version (number->string %texlive-revision))
2800 (source (origin
2801 (method svn-fetch)
2802 (uri (texlive-ref "latex" "draftwatermark"))
2803 (file-name (string-append name "-" version "-checkout"))
2804 (sha256
2805 (base32
2806 "1zyl2pcz2x529gzj5m93a1s4ipymdabf7qdjl3l1673pizd4hfyv"))))
2807 (build-system texlive-build-system)
2808 (arguments '(#:tex-directory "latex/draftwatermark"))
b8d8806b 2809 (home-page "https://www.ctan.org/pkg/draftwatermark")
de224adb
RW
2810 (synopsis "Put a grey textual watermark on document pages")
2811 (description
2812 "This package provides a means to add a textual, light grey watermark on
2813every page or on the first page of a document. Typical usage may consist in
2814writing words such as DRAFT or CONFIDENTIAL across document pages. The
2815package performs a similar function to that of @code{draftcopy}, but its
2816implementation is output device independent, and made very simple by relying
2817on everypage.")
2818 (license license:lppl1.3+)))
2819
74e9c9a4
RW
2820(define-public texlive-latex-environ
2821 (package
2822 (name "texlive-latex-environ")
2823 (version (number->string %texlive-revision))
2824 (source (origin
2825 (method svn-fetch)
2826 (uri (texlive-ref "latex" "environ"))
2827 (file-name (string-append name "-" version "-checkout"))
2828 (sha256
2829 (base32
2830 "06h28b26dyjkj9shksphgqfv4130jfkwhbw737hxn7d3yvdfffyd"))))
2831 (build-system texlive-build-system)
2832 (arguments '(#:tex-directory "latex/environ"))
b8d8806b 2833 (home-page "https://www.ctan.org/pkg/environ")
74e9c9a4
RW
2834 (synopsis "New interface for environments in LaTeX")
2835 (description
09acbb02
RW
2836 "This package provides the @code{\\collect@@body} command (as in
2837@code{amsmath}), as well as a @code{\\long} version @code{\\Collect@@Body},
2838for collecting the body text of an environment. These commands are used to
2839define a new author interface to creating new environments.")
74e9c9a4
RW
2840 (license license:lppl)))
2841
adfa7a2a
RW
2842(define-public texlive-latex-eqparbox
2843 (package
2844 (name "texlive-latex-eqparbox")
2845 (version (number->string %texlive-revision))
2846 (source (origin
2847 (method svn-fetch)
2848 (uri (texlive-ref "latex" "eqparbox"))
2849 (file-name (string-append name "-" version "-checkout"))
2850 (sha256
2851 (base32
d4d9a1ec 2852 "1ib5xdwcj5wk23wgk41m2hdcjr1dzrs4l3wwnpink9mlapz12wjs"))))
adfa7a2a
RW
2853 (build-system texlive-build-system)
2854 (arguments '(#:tex-directory "latex/eqparbox"))
b8d8806b 2855 (home-page "https://www.ctan.org/pkg/eqparbox")
adfa7a2a
RW
2856 (synopsis "Create equal-widthed parboxes")
2857 (description
2858 "LaTeX users sometimes need to ensure that two or more blocks of text
2859occupy the same amount of horizontal space on the page. To that end, the
2860@code{eqparbox} package defines a new command, @code{\\eqparbox}, which works
2861just like @code{\\parbox}, except that instead of specifying a width, one
2862specifies a tag. All @code{eqparbox}es with the same tag---regardless of
2863where they are in the document---will stretch to fit the widest
2864@code{eqparbox} with that tag. This simple, equal-width mechanism can be used
2865for a variety of alignment purposes, as is evidenced by the examples in
2866@code{eqparbox}'s documentation. Various derivatives of @code{\\eqparbox} are
2867also provided.")
2868 (license license:lppl1.3+)))
2869
32e623d0
RW
2870(define-public texlive-latex-expdlist
2871 (package
2872 (name "texlive-latex-expdlist")
2873 (version (number->string %texlive-revision))
2874 (source (origin
2875 (method svn-fetch)
2876 (uri (texlive-ref "latex" "expdlist"))
2877 (file-name (string-append name "-" version "-checkout"))
2878 (sha256
2879 (base32
2880 "1x7byk6x10njir3y9rm56glhdzrxwqag7gsnw2sqn1czlq525w7r"))))
2881 (build-system texlive-build-system)
2882 (arguments
2883 '(#:tex-directory "latex/expdlist"
2884 #:phases
2885 (modify-phases %standard-phases
2886 (add-after 'unpack 'remove-generated-file
2887 (lambda _
2888 (for-each delete-file
2889 (find-files "." "\\.drv$"))
2890 #t)))))
b8d8806b 2891 (home-page "https://www.ctan.org/pkg/expdlist")
32e623d0
RW
2892 (synopsis "Expanded description environments")
2893 (description
2894 "The package provides additional features for the LaTeX
2895@code{description} environment, including adjustable left margin. The package
2896also allows the user to \"break\" a list (for example, to interpose a comment)
2897without affecting the structure of the list (this works for @code{itemize} and
2898@code{enumerate} lists, and numbered lists remain in sequence).")
2899 (license license:lppl)))
2900
893e3fc1
RW
2901(define-public texlive-latex-filemod
2902 (package
2903 (name "texlive-latex-filemod")
2904 (version (number->string %texlive-revision))
2905 (source (origin
2906 (method svn-fetch)
2907 (uri (svn-reference
2908 (url (string-append "svn://www.tug.org/texlive/tags/"
2909 %texlive-tag "/Master/texmf-dist/"
2910 "/tex/latex/filemod"))
2911 (revision %texlive-revision)))
681b579d 2912 (file-name (string-append name "-" version "-checkout"))
893e3fc1
RW
2913 (sha256
2914 (base32
2915 "0vpxilfw69xv78f03g0j0zw0bw4qcn36whqp8phcq48qk1ax2kr2"))))
2916 (build-system trivial-build-system)
2917 (arguments
2918 `(#:modules ((guix build utils))
2919 #:builder
2920 (begin
2921 (use-modules (guix build utils))
2922 (let ((target (string-append (assoc-ref %outputs "out")
2923 "/share/texmf-dist/tex/latex/filemod")))
2924 (mkdir-p target)
2925 (copy-recursively (assoc-ref %build-inputs "source") target)
2926 #t))))
b8d8806b 2927 (home-page "https://www.ctan.org/pkg/filemod")
893e3fc1
RW
2928 (synopsis "Provide file modification times, and compare them")
2929 (description
2930 "This package provides macros to read and compare the modification dates
2931of files. The files may be @code{.tex} files, images or other files (as long
2932as they can be found by LaTeX). It uses the @code{\\pdffilemoddate} primitive
2933of pdfLaTeX to find the file modification date as PDF date string, parses the
2934string and returns the value to the user. The package will also work for DVI
2935output with recent versions of the LaTeX compiler which uses pdfLaTeX in DVI
2936mode. The functionality is provided by purely expandable macros or by faster
2937but non-expandable ones.")
2938 (license license:lppl1.3+)))
2939
8c23f238
RW
2940(define-public texlive-latex-ifplatform
2941 (package
2942 (name "texlive-latex-ifplatform")
2943 (version (number->string %texlive-revision))
2944 (source (origin
2945 (method svn-fetch)
2946 (uri (texlive-ref "latex" "ifplatform"))
2947 (file-name (string-append name "-" version "-checkout"))
2948 (sha256
2949 (base32
d4d9a1ec 2950 "157pplavvm2z97b3jl4x41w11k6q9wgy074mfg0dwmsx5lm328jy"))))
8c23f238
RW
2951 (build-system texlive-build-system)
2952 (arguments '(#:tex-directory "latex/ifplatform"))
b8d8806b 2953 (home-page "https://www.ctan.org/pkg/ifplatform")
8c23f238
RW
2954 (synopsis "Conditionals to test which platform is being used")
2955 (description
2956 "This package uses the (La)TeX extension @code{-shell-escape} to
2957establish whether the document is being processed on a Windows or on a
2958Unix-like system, or on Cygwin (Unix environment over a Windows system).
2959Booleans provided are: @code{\\ifwindows}, @code{\\iflinux}, @code{\\ifmacosx}
2960and @code{\\ifcygwin}. The package also preserves the output of @code{uname}
2961on a Unix-like system, which may be used to distinguish between various
2962classes of systems.")
2963 (license license:lppl)))
2964
9b416042
RW
2965(define-public texlive-latex-natbib
2966 (package
2967 (name "texlive-latex-natbib")
2968 (version (number->string %texlive-revision))
2969 (source (origin
2970 (method svn-fetch)
2971 (uri (texlive-ref "latex" "natbib"))
23ae6e65 2972 (file-name (string-append name "-" version "-checkout"))
9b416042
RW
2973 (sha256
2974 (base32
2975 "0aqliq0nwblxyrzhwhv77pnmk7qh2y3prgq7z7qhwcbgz5kisld7"))))
2976 (build-system texlive-build-system)
2977 (arguments '(#:tex-directory "latex/natbib"))
b8d8806b 2978 (home-page "https://www.ctan.org/pkg/natbib")
9b416042
RW
2979 (synopsis "Flexible bibliography support")
2980 (description
2981 "This bundle provides a package that implements both author-year and
2982numbered references, as well as much detailed of support for other
2983bibliography use. Also provided are versions of the standard BibTeX styles
2984that are compatible with @code{natbib}: @code{plainnat}, @code{unsrtnat},
2985@code{abbrnat}. The bibliography styles produced by @code{custom-bib} are
2986designed from the start to be compatible with @code{natbib}.")
2987 (license license:lppl)))
2988
d770d07f
RW
2989(define-public texlive-latex-psfrag
2990 (package
2991 (name "texlive-latex-psfrag")
2992 (version (number->string %texlive-revision))
2993 (source (origin
2994 (method svn-fetch)
2995 (uri (texlive-ref "latex" "psfrag"))
2996 (file-name (string-append name "-" version "-checkout"))
2997 (sha256
2998 (base32
2999 "1dxbl5il7wbbsp0v45vk884xi1192wxw03849pb1g5q4x808n352"))))
3000 (build-system texlive-build-system)
3001 (arguments '(#:tex-directory "latex/psfrag"))
b8d8806b 3002 (home-page "https://www.ctan.org/pkg/psfrag")
d770d07f
RW
3003 (synopsis "Replace strings in encapsulated PostScript figures")
3004 (description
3005 "This package allows LaTeX constructions (equations, picture
3006environments, etc.) to be precisely superimposed over Encapsulated PostScript
3007figures, using your own favorite drawing tool to create an EPS figure and
3008placing simple text \"tags\" where each replacement is to be placed, with
3009PSfrag automatically removing these tags from the figure and replacing them
3010with a user specified LaTeX construction, properly aligned, scaled, and/or
3011rotated.")
3012 (license (license:fsf-free "file://psfrag.dtx"))))
3013
d4d9a1ec
RW
3014(define-public texlive-latex-xkeyval
3015 (package
3016 (name "texlive-latex-xkeyval")
3017 (version (number->string %texlive-revision))
3018 (source (origin
3019 (method svn-fetch)
3020 (uri (texlive-ref "latex" "xkeyval"))
3021 (file-name (string-append name "-" version "-checkout"))
3022 (sha256
3023 (base32
3024 "0wancavix39j240pd8m9cgmwsijwx6jd6n54v8wg0x2rk5m44myp"))))
3025 (build-system texlive-build-system)
3026 (arguments '(#:tex-directory "latex/xkeyval"))
3027 (home-page "https://www.ctan.org/pkg/xkeyval")
3028 (synopsis "Macros for defining and setting keys")
3029 (description
3030 "This package is an extension of the @code{keyval} package and offers
3031more flexible macros for defining and setting keys. The package provides a
3032pointer and a preset system. Furthermore, it supplies macros to allow class
3033and package options to contain options of the @code{key=value} form. A LaTeX
3034kernel patch is provided to avoid premature expansions of macros in class or
3035package options. A specialized system for setting @code{PSTricks} keys is
3036provided by the @code{pst-xkey} package.")
3037 (license license:lppl1.3+)))
3038
5a1ee7d8
RW
3039(define-public texlive-latex-pstool
3040 (package
3041 (name "texlive-latex-pstool")
3042 (version (number->string %texlive-revision))
3043 (source (origin
3044 (method svn-fetch)
d4d9a1ec
RW
3045 (uri (svn-reference
3046 (url (string-append "svn://www.tug.org/texlive/tags/"
3047 %texlive-tag "/Master/texmf-dist/"
3048 "/tex/latex/pstool"))
3049 (revision %texlive-revision)))
5a1ee7d8
RW
3050 (file-name (string-append name "-" version "-checkout"))
3051 (sha256
3052 (base32
d4d9a1ec
RW
3053 "1h816jain8c9nky75kk8pmmwj5b4yf9dpqvdvi2l6jhfj5iqkzr8"))))
3054 (build-system trivial-build-system)
5a1ee7d8 3055 (arguments
d4d9a1ec
RW
3056 `(#:modules ((guix build utils))
3057 #:builder
3058 (begin
3059 (use-modules (guix build utils))
3060 (let ((target (string-append (assoc-ref %outputs "out")
3061 "/share/texmf-dist/tex/latex/pstool")))
3062 (mkdir-p target)
3063 (copy-recursively (assoc-ref %build-inputs "source") target)
3064 #t))))
5a1ee7d8 3065 (propagated-inputs
d4d9a1ec 3066 `(("texlive-latex-bigfoot" ,texlive-latex-bigfoot) ; for suffix
5a1ee7d8
RW
3067 ("texlive-latex-filemod" ,texlive-latex-filemod)
3068 ("texlive-latex-graphics" ,texlive-latex-graphics)
3069 ("texlive-latex-ifplatform" ,texlive-latex-ifplatform)
d4d9a1ec 3070 ("texlive-latex-l3kernel" ,texlive-latex-l3kernel) ; for expl3
5a1ee7d8
RW
3071 ("texlive-latex-oberdiek" ,texlive-latex-oberdiek)
3072 ("texlive-latex-psfrag" ,texlive-latex-psfrag)
d4d9a1ec
RW
3073 ("texlive-latex-tools" ,texlive-latex-tools) ; for shellesc
3074 ("texlive-latex-trimspaces" ,texlive-latex-trimspaces)
3075 ("texlive-latex-xkeyval" ,texlive-latex-xkeyval)))
b8d8806b 3076 (home-page "https://www.ctan.org/pkg/pstool")
d4d9a1ec 3077 (synopsis "Process PostScript graphics within pdfLaTeX documents")
5a1ee7d8
RW
3078 (description
3079 "This is a package for processing PostScript graphics with @code{psfrag}
3080labels within pdfLaTeX documents. Every graphic is compiled individually,
3081drastically speeding up compilation time when only a single figure needs
3082re-processing.")
3083 (license license:lppl)))
3084
171160d5
RW
3085(define-public texlive-latex-seminar
3086 (package
3087 (name "texlive-latex-seminar")
3088 (version (number->string %texlive-revision))
3089 (source (origin
3090 (method svn-fetch)
3091 (uri (svn-reference
3092 (url (string-append "svn://www.tug.org/texlive/tags/"
3093 %texlive-tag "/Master/texmf-dist/"
3094 "/tex/latex/seminar"))
3095 (revision %texlive-revision)))
a74ac06b 3096 (file-name (string-append name "-" version "-checkout"))
171160d5
RW
3097 (sha256
3098 (base32
3099 "0y4i651b75y6006n03x8n86bsqvjsailvvz9bhzy51dzsznqidq0"))))
1d4c2dab
RW
3100 (build-system trivial-build-system)
3101 (arguments
3102 `(#:modules ((guix build utils))
3103 #:builder
3104 (begin
3105 (use-modules (guix build utils))
3106 (let ((target (string-append (assoc-ref %outputs "out")
3107 "/share/texmf-dist/tex/latex/seminar")))
3108 (mkdir-p target)
3109 (copy-recursively (assoc-ref %build-inputs "source") target)
3110 #t))))
b8d8806b 3111 (home-page "https://www.ctan.org/pkg/seminar")
171160d5
RW
3112 (synopsis "Make overhead slides")
3113 ;; TODO: This package may need fancybox and xcomment at runtime.
3114 (description
3115 "This package provides a class that produces overhead
3116slides (transparencies), with many facilities. Seminar is not nowadays
3117reckoned a good basis for a presentation — users are advised to use more
3118recent classes such as powerdot or beamer, both of which are tuned to
311921st-century presentation styles.")
3120 (license license:lppl1.2+)))
3121
f3540dbd
RW
3122(define-public texlive-latex-trimspaces
3123 (package
3124 (name "texlive-latex-trimspaces")
3125 (version (number->string %texlive-revision))
3126 (source (origin
3127 (method svn-fetch)
3128 (uri (texlive-ref "latex" "trimspaces"))
70a71d19 3129 (file-name (string-append name "-" version "-checkout"))
f3540dbd
RW
3130 (sha256
3131 (base32
3132 "0da00lb32am4g63mn96625wg48p3pj3spx79lajrk17d549apwqa"))))
3133 (build-system texlive-build-system)
3134 (arguments
3135 '(#:tex-directory "latex/trimspaces"
3136 #:tex-format "latex"
3137 #:phases
3138 (modify-phases %standard-phases
3139 (add-after 'unpack 'fix-bug
3140 (lambda _
3141 ;; The "ins" file refers to the wrong source file.
3142 (substitute* "trimspaces.ins"
3143 (("pstool.tex") "trimspaces.tex"))
3144 #t)))))
3145 (inputs
3146 `(("texlive-latex-filecontents" ,texlive-latex-filecontents)))
b8d8806b 3147 (home-page "https://www.ctan.org/pkg/trimspaces")
f3540dbd
RW
3148 (synopsis "Trim spaces around an argument or within a macro")
3149 (description
3150 "This very short package allows you to expandably remove spaces around a
3151token list (commands are provided to remove spaces before, spaces after, or
3152both); or to remove surrounding spaces within a macro definition, or to define
3153space-stripped macros.")
3154 (license license:lppl)))
3155
7709d4d8
RW
3156(define-public texlive-latex-capt-of
3157 (package
3158 (name "texlive-latex-capt-of")
3159 (version (number->string %texlive-revision))
3160 (source (origin
3161 (method svn-fetch)
3162 (uri (svn-reference
3163 (url (string-append "svn://www.tug.org/texlive/tags/"
3164 %texlive-tag "/Master/texmf-dist/"
3165 "/tex/latex/capt-of"))
3166 (revision %texlive-revision)))
3167 (file-name (string-append name "-" version "-checkout"))
3168 (sha256
3169 (base32
3170 "1y2s50f6lz0jx2748lj3iy56hrpcczgnbzmvphxv7aqndyyamd4x"))))
3171 (build-system trivial-build-system)
3172 (arguments
3173 `(#:modules ((guix build utils))
3174 #:builder
3175 (begin
3176 (use-modules (guix build utils))
3177 (let ((target (string-append (assoc-ref %outputs "out")
3178 "/share/texmf-dist/tex/latex/capt-of")))
3179 (mkdir-p target)
3180 (copy-recursively (assoc-ref %build-inputs "source") target)
3181 #t))))
b8d8806b 3182 (home-page "https://www.ctan.org/pkg/capt-of")
7709d4d8
RW
3183 (synopsis "Captions on more than floats")
3184 (description
3185 "This package defines a command @code{\\captionof} for putting a caption
3186to something that's not a float.")
3187 (license license:lppl)))
3188
49b2e86a
RW
3189(define-public texlive-latex-doi
3190 (package
3191 (name "texlive-latex-doi")
3192 (version (number->string %texlive-revision))
3193 (source (origin
3194 (method svn-fetch)
3195 (uri (svn-reference
3196 (url (string-append "svn://www.tug.org/texlive/tags/"
3197 %texlive-tag "/Master/texmf-dist/"
3198 "/tex/latex/doi"))
3199 (revision %texlive-revision)))
3200 (file-name (string-append name "-" version "-checkout"))
3201 (sha256
3202 (base32
3203 "0378rdmrgr2lzbfi4qqy4dfpj5im20diyd8z8b9m4mlg05r7wgnb"))))
3204 (build-system trivial-build-system)
3205 (arguments
3206 `(#:modules ((guix build utils))
3207 #:builder
3208 (begin
3209 (use-modules (guix build utils))
3210 (let ((target (string-append (assoc-ref %outputs "out")
3211 "/share/texmf-dist/tex/latex/doi")))
3212 (mkdir-p target)
3213 (copy-recursively (assoc-ref %build-inputs "source") target)
3214 #t))))
3215 (home-page "https://www.ctan.org/pkg/doi")
3216 (synopsis "Create correct hyperlinks for DOI numbers")
3217 (description
3218 "You can hyperlink DOI numbers to doi.org. However, some publishers have
3219elected to use nasty characters in their DOI numbering scheme (@code{<},
3220@code{>}, @code{_} and @code{;} have all been spotted). This will either
3221upset LaTeX, or your PDF reader. This package contains a single user-level
3222command @code{\\doi{}}, which takes a DOI number, and creates a correct
3223hyperlink to the target of the DOI.")
3224 ;; Any version of the LPPL.
3225 (license license:lppl1.3+)))
3226
a8ac7c0b
RW
3227(define-public texlive-latex-etoolbox
3228 (package
3229 (name "texlive-latex-etoolbox")
3230 (version (number->string %texlive-revision))
3231 (source (origin
3232 (method svn-fetch)
3233 (uri (svn-reference
3234 (url (string-append "svn://www.tug.org/texlive/tags/"
3235 %texlive-tag "/Master/texmf-dist/"
3236 "/tex/latex/etoolbox"))
3237 (revision %texlive-revision)))
3238 (file-name (string-append name "-" version "-checkout"))
3239 (sha256
3240 (base32
d4d9a1ec 3241 "1agmq6bf8wzcd77n20ng8bl4kh69cg5f6sjniii7bcw4llhd3nc8"))))
a8ac7c0b
RW
3242 (build-system trivial-build-system)
3243 (arguments
3244 `(#:modules ((guix build utils))
3245 #:builder
3246 (begin
3247 (use-modules (guix build utils))
3248 (let ((target (string-append (assoc-ref %outputs "out")
3249 "/share/texmf-dist/tex/latex/etoolbox")))
3250 (mkdir-p target)
3251 (copy-recursively (assoc-ref %build-inputs "source") target)
3252 #t))))
b8d8806b 3253 (home-page "https://www.ctan.org/pkg/etoolbox")
a8ac7c0b
RW
3254 (synopsis "e-TeX tools for LaTeX")
3255 (description
3256 "This package is a toolbox of programming facilities geared primarily
3257towards LaTeX class and package authors. It provides LaTeX frontends to some
3258of the new primitives provided by e-TeX as well as some generic tools which
3259are not strictly related to e-TeX but match the profile of this package. The
3260package provides functions that seem to offer alternative ways of implementing
3261some LaTeX kernel commands; nevertheless, the package will not modify any part
3262of the LaTeX kernel.")
3263 (license license:lppl1.3+)))
3264
17dce7e5
RW
3265(define-public texlive-latex-fncychap
3266 (package
3267 (name "texlive-latex-fncychap")
3268 (version (number->string %texlive-revision))
3269 (source (origin
3270 (method svn-fetch)
3271 (uri (svn-reference
3272 (url (string-append "svn://www.tug.org/texlive/tags/"
3273 %texlive-tag "/Master/texmf-dist/"
3274 "/tex/latex/fncychap"))
3275 (revision %texlive-revision)))
3276 (file-name (string-append name "-" version "-checkout"))
3277 (sha256
3278 (base32
3279 "0fdk84dbicfjfprkz6vk15x36mvlhaw9isjmgkc56jp2khwjswwq"))))
3280 (build-system trivial-build-system)
3281 (arguments
3282 `(#:modules ((guix build utils))
3283 #:builder
3284 (begin
3285 (use-modules (guix build utils))
3286 (let ((target (string-append (assoc-ref %outputs "out")
3287 "/share/texmf-dist/tex/latex/fncychap")))
3288 (mkdir-p target)
3289 (copy-recursively (assoc-ref %build-inputs "source") target)
3290 #t))))
b8d8806b 3291 (home-page "https://www.ctan.org/pkg/fncychap")
17dce7e5
RW
3292 (synopsis "Seven predefined chapter heading styles")
3293 (description
3294 "This package provides seven predefined chapter heading styles. Each
3295style can be modified using a set of simple commands. Optionally one can
3296modify the formatting routines in order to create additional chapter
3297headings.")
3298 (license license:lppl1.3+)))
3299
ef1e2ef0
RW
3300(define-public texlive-latex-framed
3301 (package
3302 (name "texlive-latex-framed")
3303 (version (number->string %texlive-revision))
3304 (source (origin
3305 (method svn-fetch)
3306 (uri (svn-reference
3307 (url (string-append "svn://www.tug.org/texlive/tags/"
3308 %texlive-tag "/Master/texmf-dist/"
3309 "/tex/latex/framed"))
3310 (revision %texlive-revision)))
3311 (file-name (string-append name "-" version "-checkout"))
3312 (sha256
3313 (base32
3314 "14a4ydqsvp3vcfavl21jrv0ybiqypaaqzg2q2cs3rzkandg7w98x"))))
3315 (build-system trivial-build-system)
3316 (arguments
3317 `(#:modules ((guix build utils))
3318 #:builder
3319 (begin
3320 (use-modules (guix build utils))
3321 (let ((target (string-append (assoc-ref %outputs "out")
3322 "/share/texmf-dist/tex/latex/framed")))
3323 (mkdir-p target)
3324 (copy-recursively (assoc-ref %build-inputs "source") target)
3325 #t))))
b8d8806b 3326 (home-page "https://www.ctan.org/pkg/framed")
ef1e2ef0
RW
3327 (synopsis "Framed or shaded regions that can break across pages")
3328 (description
3329 "The package creates three environments: @code{framed}, which puts an
3330ordinary frame box around the region, @code{shaded}, which shades the region,
3331and @code{leftbar}, which places a line at the left side. The environments
3332allow a break at their start (the @code{\\FrameCommand} enables creation of a
3333title that is “attached” to the environment); breaks are also allowed in the
3334course of the framed/shaded matter. There is also a command
3335@code{\\MakeFramed} to make your own framed-style environments.")
3336 ;; The header states: "These macros may be freely transmitted, reproduced,
3337 ;; or modified for any purpose provided that this notice is left intact."
3338 (license (license:fsf-free "file://framed.sty"))))
3339
588b5e96
RW
3340(define-public texlive-latex-g-brief
3341 (package
3342 (name "texlive-latex-g-brief")
3343 (version (number->string %texlive-revision))
3344 (source (origin
3345 (method svn-fetch)
3346 (uri (texlive-ref "latex" "g-brief"))
3347 (file-name (string-append name "-" version "-checkout"))
3348 (sha256
3349 (base32
3350 "0sikazkg0dpkcpzlbqw8qzxr81paf2f443vsrh14jnw7s4gswvc5"))))
3351 (build-system texlive-build-system)
3352 (arguments
3353 '(#:tex-directory "latex/g-brief"
3354 #:phases
3355 (modify-phases %standard-phases
3356 (add-after 'unpack 'remove-generated-file
3357 (lambda _
3358 (delete-file "g-brief.drv")
3359 #t)))))
b8d8806b 3360 (home-page "https://www.ctan.org/pkg/g-brief")
588b5e96
RW
3361 (synopsis "Letter document class")
3362 (description
3363 "This package is designed for formatting formless letters in German; it
3364can also be used for English (by those who can read the documentation). There
3365are LaTeX 2.09 @code{documentstyle} and LaTeX 2e class files for both an
3366\"old\" and a \"new\" version of g-brief.")
3367 (license license:lppl)))
3368
9b4d5c09
RW
3369(define-public texlive-latex-galois
3370 (package
3371 (name "texlive-latex-galois")
3372 (version (number->string %texlive-revision))
3373 (source (origin
3374 (method svn-fetch)
3375 (uri (texlive-ref "latex" "galois"))
3376 (file-name (string-append name "-" version "-checkout"))
3377 (sha256
3378 (base32
3379 "0d4l0msk8j5pi95xnmm9wygv1vbpkwkv5amx9l0km86cs79jpp1h"))))
3380 (build-system texlive-build-system)
3381 (arguments '(#:tex-directory "latex/galois"))
b8d8806b 3382 (home-page "https://www.ctan.org/pkg/galois")
9b4d5c09
RW
3383 (synopsis "Typeset Galois connections")
3384 (description
3385 "The package deals with connections in two-dimensional style, optionally
3386in colour.")
3387 (license license:lppl)))
3388
5f691e2e
RW
3389(define-public texlive-latex-gcite
3390 (package
3391 (name "texlive-latex-gcite")
3392 (version (number->string %texlive-revision))
3393 (source (origin
3394 (method svn-fetch)
3395 (uri (texlive-ref "latex" "gcite"))
3396 (file-name (string-append name "-" version "-checkout"))
3397 (sha256
3398 (base32
3399 "03g9by54yrypn599y98r1xh7qw0bbbmpzq0bfwpj6j5q5rkl1mfa"))))
3400 (build-system texlive-build-system)
3401 (arguments '(#:tex-directory "latex/gcite"))
b8d8806b 3402 (home-page "https://www.ctan.org/pkg/gcite")
5f691e2e
RW
3403 (synopsis "Citations in a reader-friendly style")
3404 (description
3405 "The package allows citations in the German style, which is considered by
3406many to be particularly reader-friendly. The citation provides a small amount
3407of bibliographic information in a footnote on the page where each citation is
3408made. It combines a desire to eliminate unnecessary page-turning with the
3409look-up efficiency afforded by numeric citations. The package makes use of
3410BibLaTeX, and is considered experimental.")
3411 (license license:lppl1.3+)))
3412
f47d1a52
RW
3413(define-public texlive-latex-geometry
3414 (package
3415 (name "texlive-latex-geometry")
3416 (version (number->string %texlive-revision))
3417 (source (origin
3418 (method svn-fetch)
3419 (uri (texlive-ref "latex" "geometry"))
3420 (file-name (string-append name "-" version "-checkout"))
3421 (sha256
3422 (base32
d4d9a1ec 3423 "0yw6bjfgsli3s1dldsgb7mkr7lnk329cgdjbgs8z2xn59pmmdsn4"))))
f47d1a52
RW
3424 (build-system texlive-build-system)
3425 (arguments '(#:tex-directory "latex/geometry"))
00a7af0e
RW
3426 (propagated-inputs
3427 `(("texlive-latex-oberdiek" ,texlive-latex-oberdiek))) ;for ifpdf
b8d8806b 3428 (home-page "https://www.ctan.org/pkg/geometry")
f47d1a52
RW
3429 (synopsis "Flexible and complete interface to document dimensions")
3430 (description
3431 "This package provides an easy and flexible user interface to customize
3432page layout, implementing auto-centering and auto-balancing mechanisms so that
3433the users have only to give the least description for the page layout. The
3434package knows about all the standard paper sizes, so that the user need not
3435know what the nominal \"real\" dimensions of the paper are, just its standard
3436name (such as a4, letter, etc.). An important feature is the package's
3437ability to communicate the paper size it's set up to the output.")
3438 (license license:lppl)))
3439
d48091be
RW
3440(define-public texlive-latex-mdwtools
3441 (package
3442 (name "texlive-latex-mdwtools")
3443 (version (number->string %texlive-revision))
3444 (source (origin
3445 (method svn-fetch)
3446 (uri (texlive-ref "latex" "mdwtools"))
3447 (file-name (string-append name "-" version "-checkout"))
3448 (sha256
3449 (base32
3450 "0caxs74hla28hc67csf5i5ahadx97w8vxh3mdmsprxbpd1mr7ssg"))))
3451 (build-system texlive-build-system)
3452 (arguments '(#:tex-directory "latex/mdwtools"))
b8d8806b 3453 (home-page "https://www.ctan.org/pkg/mdwtools")
d48091be
RW
3454 (synopsis "Miscellaneous tools by Mark Wooding")
3455 (description
3456 "This collection of tools includes: @code{atsupport} for short commands
fb5dfa86
RW
3457starting with @code{@@}, macros to sanitize the OT1 encoding of the
3458@code{cmtt} fonts; a @code{doafter} command; improved @code{footnote} support;
d48091be
RW
3459@code{mathenv} for various alignment in maths; list handling; @code{mdwmath}
3460which adds some minor changes to LaTeX maths; a rewrite of LaTeX's tabular and
3461array environments; verbatim handling; and syntax diagrams.")
3462 (license license:gpl3+)))
3463
80bf1f21
RW
3464(define-public texlive-latex-polyglossia
3465 (package
3466 (name "texlive-latex-polyglossia")
3467 (version (number->string %texlive-revision))
3468 (source (origin
3469 (method svn-fetch)
3470 (uri (texlive-ref "latex" "polyglossia"))
3471 (file-name (string-append name "-" version "-checkout"))
3472 (sha256
3473 (base32
d4d9a1ec 3474 "03ma58z3ypsbp7zgkzb1ylpn2ygr27cxzkf042ns0rif4g8s491f"))))
80bf1f21
RW
3475 (build-system texlive-build-system)
3476 (arguments '(#:tex-directory "latex/polyglossia"))
b8d8806b 3477 (home-page "https://www.ctan.org/pkg/polyglossia")
80bf1f21
RW
3478 (synopsis "Alternative to babel for XeLaTeX and LuaLaTeX")
3479 (description
3480 "This package provides a complete Babel replacement for users of LuaLaTeX
3481and XeLaTeX; it relies on the @code{fontspec} package, version 2.0 at least.")
3482 (license license:lppl1.3+)))
3483
84f8035a
RW
3484(define-public texlive-latex-supertabular
3485 (package
3486 (name "texlive-latex-supertabular")
3487 (version (number->string %texlive-revision))
3488 (source (origin
3489 (method svn-fetch)
3490 (uri (texlive-ref "latex" "supertabular"))
3491 (file-name (string-append name "-" version "-checkout"))
3492 (sha256
3493 (base32
3494 "14b2bc7cqz4ckxxycim9sw6jkrr1pahivm1rdbpz5k6hl967w1s3"))))
3495 (build-system texlive-build-system)
3496 (arguments '(#:tex-directory "latex/supertabular"))
b8d8806b 3497 (home-page "https://www.ctan.org/pkg/supertabular")
84f8035a
RW
3498 (synopsis "Multi-page tables package")
3499 (description
3500 "This package was a predecessor of @code{longtable}; the newer
3501package (designed on quite different principles) is easier to use and more
3502flexible, in many cases, but supertabular retains its usefulness in a few
3503situations where longtable has problems.")
3504 (license license:lppl1.3+)))
3505
a0aa6b59
RW
3506(define-public texlive-tex-texinfo
3507 (package
3508 (name "texlive-tex-texinfo")
3509 (version (number->string %texlive-revision))
3510 (source (origin
3511 (method svn-fetch)
3512 (uri (svn-reference
3513 (url (string-append "svn://www.tug.org/texlive/tags/"
3514 %texlive-tag "/Master/texmf-dist/"
3515 "/tex/texinfo"))
3516 (revision %texlive-revision)))
88ae1921 3517 (file-name (string-append name "-" version "-checkout"))
a0aa6b59
RW
3518 (sha256
3519 (base32
d4d9a1ec 3520 "06cf821y1j7jdg93pb41ayigrfwgn0y49d7w1025zlijjxi6bvjp"))))
a0aa6b59
RW
3521 (build-system trivial-build-system)
3522 (arguments
3523 `(#:modules ((guix build utils))
3524 #:builder
3525 (begin
3526 (use-modules (guix build utils))
3527 (let ((target (string-append (assoc-ref %outputs "out")
3528 "/share/texmf-dist/tex/texinfo")))
3529 (mkdir-p target)
3530 (copy-recursively (assoc-ref %build-inputs "source") target)
3531 #t))))
b8d8806b 3532 (home-page "https://www.ctan.org/pkg/texinfo")
a0aa6b59
RW
3533 (synopsis "TeX macros to handle Texinfo files")
3534 (description
3535 "Texinfo is the preferred format for documentation in the GNU project;
3536the format may be used to produce online or printed output from a single
3537source. The Texinfo macros may be used to produce printable output using TeX;
3538other programs in the distribution offer online interactive use (with
3539hypertext linkages in some cases).")
3540 (license license:gpl3+)))
3541
0de81b09
RW
3542(define-public texlive-latex-upquote
3543 (package
3544 (name "texlive-latex-upquote")
3545 (version (number->string %texlive-revision))
3546 (source (origin
3547 (method svn-fetch)
3548 (uri (texlive-ref "latex" "upquote"))
3549 (file-name (string-append name "-" version "-checkout"))
3550 (sha256
3551 (base32
3552 "0d1050i973wnxigy0xpky5l7vn4ff7ldhkjpdqsw5s653gagwixp"))))
3553 (build-system texlive-build-system)
3554 (arguments '(#:tex-directory "latex/upquote"))
b8d8806b 3555 (home-page "https://www.ctan.org/pkg/upquote")
0de81b09
RW
3556 (synopsis "Show \"realistic\" quotes in verbatim")
3557 (description
3558 "Typewriter-style fonts are best for program listings, but Computer
3559Modern Typewriter prints @code{`} and @code{'} as bent opening and closing
3560single quotes. Other fonts, and most programming languages, print @code{`} as
3561a grave accent and @code{'} upright; @code{'} is used both to open and to
3562close quoted strings. The package switches the typewriter font to Computer
3563Modern Typewriter in OT1 encoding, and modifies the behaviour of
3564@code{verbatim}, @code{verbatim*}, @code{\\verb}, and @code{\\verb*} to print
3565in the expected way. It does this regardless of other fonts or encodings in
3566use, so long as the package is loaded after the other fonts were. The package
3567does not affect @code{\\tt}, @code{\\texttt}, etc.")
3568 (license license:lppl1.2+)))
3569
bda61541
RW
3570(define-public texlive-latex-anysize
3571 (package
3572 (name "texlive-latex-anysize")
3573 (version (number->string %texlive-revision))
3574 (source (origin
3575 (method svn-fetch)
3576 (uri (svn-reference
3577 (url (string-append "svn://www.tug.org/texlive/tags/"
3578 %texlive-tag "/Master/texmf-dist/"
3579 "/tex/latex/anysize"))
3580 (revision %texlive-revision)))
de4eb4d1 3581 (file-name (string-append name "-" version "-checkout"))
bda61541
RW
3582 (sha256
3583 (base32
3584 "19khwqjlvznc955sijhww3c4zbb0053rvzwv9nz738qknq7y18vb"))))
3585 (build-system trivial-build-system)
3586 (arguments
3587 `(#:modules ((guix build utils))
3588 #:builder
3589 (begin
3590 (use-modules (guix build utils))
3591 (let ((target (string-append (assoc-ref %outputs "out")
3592 "/share/texmf-dist/tex/latex/anysize")))
3593 (mkdir-p target)
3594 (copy-recursively (assoc-ref %build-inputs "source") target)
3595 #t))))
b8d8806b 3596 (home-page "https://www.ctan.org/pkg/anysize")
bda61541
RW
3597 (synopsis "Simple package to set up document margins")
3598 (description
3599 "This is a simple package to set up document margins. This package is
3600considered obsolete; alternatives are the @code{typearea} package from the
3601@code{koma-script} bundle, or the @code{geometry} package.")
3602 (license license:public-domain)))
3603
1d3be84e
RW
3604(define-public texlive-latex-appendix
3605 (package
3606 (name "texlive-latex-appendix")
3607 (version (number->string %texlive-revision))
3608 (source (origin
3609 (method svn-fetch)
3610 (uri (texlive-ref "latex" "appendix"))
72d5adf4 3611 (file-name (string-append name "-" version "-checkout"))
1d3be84e
RW
3612 (sha256
3613 (base32
3614 "0rxfpr8vq3brwx5rc7qn91ixlp9zva4zrms8a579fqa1g5yva7vg"))))
3615 (build-system texlive-build-system)
3616 (arguments '(#:tex-directory "latex/appendix"))
b8d8806b 3617 (home-page "https://www.ctan.org/pkg/appendix")
1d3be84e
RW
3618 (synopsis "Extra control of appendices")
3619 (description
3620 "The appendix package provides various ways of formatting the titles of
3621appendices. Also (sub)appendices environments are provided that can be used,
3622for example, for per chapter/section appendices. An @code{appendices}
3623environment is provided which can be used instead of the @code{\\appendix}
3624command.")
3625 (license license:lppl)))
3626
b92ac281
RW
3627(define-public texlive-latex-changebar
3628 (package
3629 (name "texlive-latex-changebar")
3630 (version (number->string %texlive-revision))
3631 (source (origin
3632 (method svn-fetch)
3633 (uri (texlive-ref "latex" "changebar"))
af8aa105 3634 (file-name (string-append name "-" version "-checkout"))
b92ac281
RW
3635 (sha256
3636 (base32
d4d9a1ec 3637 "05x15ilynqrl448h8l6qiraygamdldlngz89a2bw7kg74fym14ch"))))
b92ac281
RW
3638 (build-system texlive-build-system)
3639 (arguments '(#:tex-directory "latex/changebar"))
b8d8806b 3640 (home-page "https://www.ctan.org/pkg/changebar")
b92ac281
RW
3641 (synopsis "Generate changebars in LaTeX documents")
3642 (description
3643 "Identify areas of text to be marked with changebars with the
3644@code{\\cbstart} and @code{\\cbend} commands; the bars may be coloured. The
36a4366d
EF
3645package uses @code{drivers} to place the bars; the available drivers can work
3646with @code{dvitoln03}, @code{dvitops}, @code{dvips}, the emTeX and TeXtures DVI
b92ac281
RW
3647drivers, and VTeX and pdfTeX.")
3648 (license license:lppl)))
3649
fedd77c1
RW
3650(define-public texlive-latex-cmap
3651 (package
3652 (name "texlive-latex-cmap")
3653 (version (number->string %texlive-revision))
3654 (source (origin
3655 (method svn-fetch)
3656 (uri (svn-reference
3657 (url (string-append "svn://www.tug.org/texlive/tags/"
3658 %texlive-tag "/Master/texmf-dist/"
3659 "/tex/latex/cmap"))
3660 (revision %texlive-revision)))
3661 (file-name (string-append name "-" version "-checkout"))
3662 (sha256
3663 (base32
3664 "1s1rv6zgw105w2j6ffhnk914qrix87y1ndzri1q72g2kbr91zlbg"))))
3665 (build-system trivial-build-system)
3666 (arguments
3667 `(#:modules ((guix build utils))
3668 #:builder
3669 (begin
3670 (use-modules (guix build utils))
3671 (let ((target (string-append (assoc-ref %outputs "out")
3672 "/share/texmf-dist/tex/latex/cmap")))
3673 (mkdir-p target)
3674 (copy-recursively (assoc-ref %build-inputs "source") target)
3675 #t))))
3676 (home-page "https://www.tug.org/svn/texlive/tags/texlive-2017.1/\
3677Master/texmf-dist/tex/latex/cmap/")
3678 (synopsis "CMap support for PDF files")
3679 (description
3680 "This package embeds CMap tables into PDF files to make search and
3681copy-and-paste functions work properly.")
3682 (license license:lppl)))
3683
e003a5f0
RW
3684(define-public texlive-latex-colortbl
3685 (package
3686 (name "texlive-latex-colortbl")
3687 (version (number->string %texlive-revision))
3688 (source (origin
3689 (method svn-fetch)
3690 (uri (texlive-ref "latex" "colortbl"))
4439c1de 3691 (file-name (string-append name "-" version "-checkout"))
e003a5f0
RW
3692 (sha256
3693 (base32
3694 "190pmq8la2rq07xry8bn8z8yywzxv6fqyqaj7yjfj5rgw6x0mas8"))))
3695 (build-system texlive-build-system)
3696 (arguments '(#:tex-directory "latex/colortbl"))
b8d8806b 3697 (home-page "https://www.ctan.org/pkg/colortbl")
e003a5f0
RW
3698 (synopsis "Add colour to LaTeX tables")
3699 (description
3700 "This package allows rows, columns, and even individual cells in LaTeX
3701tables to be coloured.")
3702 (license license:lppl)))
3703
36ce05ff
RW
3704(define-public texlive-latex-fancybox
3705 (package
3706 (name "texlive-latex-fancybox")
3707 (version (number->string %texlive-revision))
3708 (source (origin
3709 (method svn-fetch)
3710 (uri (svn-reference
3711 (url (string-append "svn://www.tug.org/texlive/tags/"
3712 %texlive-tag "/Master/texmf-dist/"
3713 "/tex/latex/fancybox"))
3714 (revision %texlive-revision)))
62ee46b9 3715 (file-name (string-append name "-" version "-checkout"))
36ce05ff
RW
3716 (sha256
3717 (base32
3718 "0smmnaad2q8qwicay1frri990lv65l0k8cwzsvdsyp3jk8kp042w"))))
3719 (build-system trivial-build-system)
3720 (arguments
3721 `(#:modules ((guix build utils))
3722 #:builder
3723 (begin
3724 (use-modules (guix build utils))
3725 (let ((target (string-append (assoc-ref %outputs "out")
3726 "/share/texmf-dist/tex/latex/fancybox")))
3727 (mkdir-p target)
3728 (copy-recursively (assoc-ref %build-inputs "source") target)
3729 #t))))
b8d8806b 3730 (home-page "https://www.ctan.org/pkg/fancybox")
36ce05ff
RW
3731 (synopsis "Variants of \\fbox and other games with boxes")
3732 (description
3733 "This package provides variants of @code{\\fbox}: @code{\\shadowbox},
3734@code{\\doublebox}, @code{\\ovalbox}, @code{\\Ovalbox}, with helpful tools for
3735using box macros and flexible verbatim macros. You can box mathematics,
3736floats, center, flushleft, and flushright, lists, and pages.")
3737 (license license:lppl1.2+)))
3738
20282111
RW
3739(define-public texlive-latex-fancyhdr
3740 (package
3741 (name "texlive-latex-fancyhdr")
3742 (version (number->string %texlive-revision))
3743 (source (origin
3744 (method svn-fetch)
3745 (uri (svn-reference
3746 (url (string-append "svn://www.tug.org/texlive/tags/"
3747 %texlive-tag "/Master/texmf-dist/"
3748 "/tex/latex/fancyhdr"))
3749 (revision %texlive-revision)))
e89d5cf4 3750 (file-name (string-append name "-" version "-checkout"))
20282111
RW
3751 (sha256
3752 (base32
d4d9a1ec 3753 "1xsnzx7vgdfh9zh2m7bjz6bgdpxsgb1kyc19p50vhs34x5nbgsnr"))))
20282111
RW
3754 (build-system trivial-build-system)
3755 (arguments
3756 `(#:modules ((guix build utils))
3757 #:builder
3758 (begin
3759 (use-modules (guix build utils))
3760 (let ((target (string-append (assoc-ref %outputs "out")
3761 "/share/texmf-dist/tex/latex/fancyhdr")))
3762 (mkdir-p target)
3763 (copy-recursively (assoc-ref %build-inputs "source") target)
3764 #t))))
b8d8806b 3765 (home-page "https://www.ctan.org/pkg/fancyhdr")
20282111
RW
3766 (synopsis "Extensive control of page headers and footers in LaTeX2e")
3767 (description
3768 "The package provides extensive facilities, both for constructing headers
3769and footers, and for controlling their use (for example, at times when LaTeX
3770would automatically change the heading style in use).")
3771 (license license:lppl)))
3772
df2b9bb4
RW
3773(define-public texlive-latex-float
3774 (package
3775 (name "texlive-latex-float")
3776 (version (number->string %texlive-revision))
3777 (source (origin
3778 (method svn-fetch)
3779 (uri (texlive-ref "latex" "float"))
4fd0a591 3780 (file-name (string-append name "-" version "-checkout"))
df2b9bb4
RW
3781 (sha256
3782 (base32
3783 "0nbl7wylkv22fcdv4p8byhhj575fli6jnqjpkhrkbv8dzwah84nq"))))
3784 (build-system texlive-build-system)
3785 (arguments '(#:tex-directory "latex/float"))
b8d8806b 3786 (home-page "https://www.ctan.org/pkg/float")
df2b9bb4
RW
3787 (synopsis "Improved interface for floating objects")
3788 (description
3789 "This package improves the interface for defining floating objects such
3790as figures and tables. It introduces the boxed float, the ruled float and the
3791plaintop float. You can define your own floats and improve the behaviour of
3792the old ones. The package also provides the @code{H} float modifier option of
3793the obsolete @code{here} package. You can select this as automatic default
3794with @code{\\floatplacement{figure}{H}}.")
3795 (license license:lppl)))
3796
3921bc7c
RW
3797(define-public texlive-latex-footmisc
3798 (package
3799 (name "texlive-latex-footmisc")
3800 (version (number->string %texlive-revision))
3801 (source (origin
3802 (method svn-fetch)
3803 (uri (texlive-ref "latex" "footmisc"))
dae1d9e4 3804 (file-name (string-append name "-" version "-checkout"))
3921bc7c
RW
3805 (sha256
3806 (base32
3807 "03x61wwql8nh6zrqiiiq3rb0x7m3pn48c606zapy19y21fybwdxs"))))
3808 (build-system texlive-build-system)
3809 (arguments '(#:tex-directory "latex/footmisc"))
b8d8806b 3810 (home-page "https://www.ctan.org/pkg/footmisc")
3921bc7c
RW
3811 (synopsis "Range of footnote options")
3812 (description
3813 "This is a collection of ways to change the typesetting of footnotes.
3814The package provides means of changing the layout of the footnotes themselves,
3815a way to number footnotes per page, to make footnotes disappear in a
3816\"moving\" argument, and to deal with multiple references to footnotes from
3817the same place. The package also has a range of techniques for labelling
3818footnotes with symbols rather than numbers.")
3819 (license license:lppl1.3+)))
3820
b2bc1daf
RW
3821(define-public texlive-latex-listings
3822 (package
3823 (name "texlive-latex-listings")
3824 (version (number->string %texlive-revision))
3825 (source (origin
3826 (method svn-fetch)
3827 (uri (texlive-ref "latex" "listings"))
aeb135e3 3828 (file-name (string-append name "-" version "-checkout"))
b2bc1daf
RW
3829 (sha256
3830 (base32
3831 "1nsn9wp3wl12b36c0sqrim33lf33cr5wky0h4ncnw8lvqgm7h8wf"))))
3832 (build-system texlive-build-system)
3833 (arguments
3834 '(#:tex-directory "latex/listings"
3835 #:build-targets '("listings.ins")))
b8d8806b 3836 (home-page "https://www.ctan.org/pkg/listings")
b2bc1daf
RW
3837 (synopsis "Typeset source code listings using LaTeX")
3838 (description
3839 "The package enables the user to typeset programs (programming code)
3840within LaTeX; the source code is read directly by TeX---no front-end processor
3841is needed. Keywords, comments and strings can be typeset using different
3842styles. Support for @code{hyperref} is provided.")
3843 (license license:lppl1.3+)))
3844
02fd07b3
RW
3845(define-public texlive-latex-jknapltx
3846 (package
3847 (name "texlive-latex-jknapltx")
3848 (version (number->string %texlive-revision))
3849 (source (origin
3850 (method svn-fetch)
3851 (uri (svn-reference
3852 (url (string-append "svn://www.tug.org/texlive/tags/"
3853 %texlive-tag "/Master/texmf-dist/"
3854 "/tex/latex/jknapltx"))
3855 (revision %texlive-revision)))
aa499191 3856 (file-name (string-append name "-" version "-checkout"))
02fd07b3
RW
3857 (sha256
3858 (base32
3859 "0m034x72f2g07icr50gacyxfb9g1lz2rmqh4kqr1qjb421x2kds9"))))
3860 (build-system trivial-build-system)
3861 (arguments
3862 `(#:modules ((guix build utils))
3863 #:builder
3864 (begin
3865 (use-modules (guix build utils))
3866 (let ((target (string-append (assoc-ref %outputs "out")
3867 "/share/texmf-dist/tex/latex/jknapltx")))
3868 (mkdir-p target)
3869 (copy-recursively (assoc-ref %build-inputs "source") target)
3870 #t))))
b8d8806b 3871 (home-page "https://www.ctan.org/pkg/jknappen")
02fd07b3
RW
3872 (synopsis "Miscellaneous packages by Joerg Knappen")
3873 (description
3874 "This package provides miscellaneous macros by Joerg Knappen, including:
3875represent counters in greek; Maxwell's non-commutative division;
3876@code{latin1jk}, @code{latin2jk} and @code{latin3jk}, which are
3877@code{inputenc} definition files that allow verbatim input in the respective
3878ISO Latin codes; blackboard bold fonts in maths; use of RSFS fonts in maths;
3879extra alignments for @code{\\parboxes}; swap Roman and Sans fonts;
3880transliterate semitic languages; patches to make (La)TeX formulae embeddable
3881in SGML; use maths minus in text as appropriate; simple Young tableaux.")
3882 (license license:gpl2)))
3883
83c830d1
RW
3884(define-public texlive-fonts-ec
3885 (package
3886 (name "texlive-fonts-ec")
3887 (version (number->string %texlive-revision))
3888 (source (origin
3889 (method svn-fetch)
3890 (uri (svn-reference
3891 (url (string-append "svn://www.tug.org/texlive/tags/"
3892 %texlive-tag "/Master/texmf-dist/"
3893 "/fonts/source/jknappen/ec/"))
3894 (revision %texlive-revision)))
ca816eb3 3895 (file-name (string-append name "-" version "-checkout"))
83c830d1
RW
3896 (sha256
3897 (base32
3898 "12av65fbz9xiashm09c9m1fj1mijxls5xspd7652ry1n5s0nixy4"))))
3899 (build-system gnu-build-system)
3900 (arguments
3901 `(#:modules ((guix build gnu-build-system)
3902 (guix build utils)
3903 (srfi srfi-1)
3904 (srfi srfi-26))
3905 #:tests? #f ; no tests
3906 #:phases
3907 (modify-phases %standard-phases
3908 (delete 'configure)
3909 (replace 'build
3910 (lambda* (#:key inputs #:allow-other-keys)
3911 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
3912 ;; Tell mf where to find mf.base
3913 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
3914 ;; Tell mf where to look for source files
3915 (setenv "MFINPUTS"
3916 (string-append (getcwd) ":"
3917 mf "/share/texmf-dist/metafont/base:"
3918 (assoc-ref inputs "texlive-fonts-cm")
3919 "/share/texmf-dist/fonts/source/public/cm")))
3920 (mkdir "build")
c4fc86e4
MW
3921 (for-each (lambda (font)
3922 (format #t "building font ~a\n" font)
3923 (invoke "mf" "-progname=mf"
3924 "-output-directory=build"
3925 (string-append "\\"
3926 "mode:=ljfour; "
3927 "mag:=1; "
3928 "batchmode; "
3929 "input " (basename font ".mf"))))
3930 (find-files "." "[0-9]+\\.mf$"))
3931 #t))
83c830d1
RW
3932 (replace 'install
3933 (lambda* (#:key outputs #:allow-other-keys)
3934 (let* ((out (assoc-ref outputs "out"))
3935 (tfm (string-append
3936 out "/share/texmf-dist/fonts/tfm/jknappen/ec"))
3937 (mf (string-append
3938 out "/share/texmf-dist/fonts/source/jknappen/ec")))
3939 (for-each (cut install-file <> tfm)
3940 (find-files "build" "\\.*"))
3941 (for-each (cut install-file <> mf)
3942 (find-files "." "\\.mf"))
3943 #t))))))
3944 (native-inputs
3945 `(("texlive-bin" ,texlive-bin)
3946 ("texlive-metafont-base" ,texlive-metafont-base)
3947 ("texlive-fonts-cm" ,texlive-fonts-cm)))
b8d8806b 3948 (home-page "https://www.ctan.org/pkg/ec")
83c830d1
RW
3949 (synopsis "Computer modern fonts in T1 and TS1 encodings")
3950 (description
3951 "The EC fonts are European Computer Modern Fonts, supporting the complete
3952LaTeX T1 encoding defined at the 1990 TUG conference hold at Cork/Ireland.
3953These fonts are intended to be stable with no changes being made to the tfm
3954files. The set also contains a Text Companion Symbol font, called @code{tc},
3955featuring many useful characters needed in text typesetting, for example
3956oldstyle digits, currency symbols (including the newly created Euro symbol),
3957the permille sign, copyright, trade mark and servicemark as well as a copyleft
3958sign, and many others. Recent releases of LaTeX2e support the EC fonts. The
3959EC fonts supersede the preliminary version released as the DC fonts. The
3960fonts are available in (traced) Adobe Type 1 format, as part of the
3961@code{cm-super} bundle. The other Computer Modern-style T1-encoded Type 1
3962set, Latin Modern, is not actually a direct development of the EC set, and
3963differs from the EC in a number of particulars.")
3964 (license (license:fsf-free "https://www.tug.org/svn/texlive/tags/\
3965texlive-2017.1/Master/texmf-dist/doc/fonts/ec/copyrite.txt"))))
3966
5e9bf5a2
RW
3967(define-public texlive-fonts-adobe-times
3968 (package
3969 (name "texlive-fonts-adobe-times")
3970 (version (number->string %texlive-revision))
3971 (source (origin
3972 (method svn-fetch)
3973 (uri (svn-reference
3974 (url (string-append "svn://www.tug.org/texlive/tags/"
3975 %texlive-tag "/Master/texmf-dist/"
3976 "/fonts/type1/urw/times/"))
3977 (revision %texlive-revision)))
3978 (file-name (string-append name "-" version "-checkout"))
3979 (sha256
3980 (base32
3981 "15vzyr7favkv1mj00qxr03s89kw78nd066fh69by93272g8p5sgd"))))
3982 (build-system trivial-build-system)
3983 (arguments
3984 `(#:modules ((guix build utils)
3985 (ice-9 match))
3986 #:builder
3987 (begin
3988 (use-modules (guix build utils)
3989 (ice-9 match))
3990 (let ((root (string-append (assoc-ref %outputs "out")
3991 "/share/texmf-dist/"))
3992 (pkgs '(("source" . "fonts/type1/urw/times")
3993
3994 ("times-afm" . "fonts/afm/adobe/times")
3995 ("times-tfm" . "fonts/tfm/adobe/times")
3996 ("times-vf" . "fonts/vf/adobe/times")
3997
3998 ("urw-afm" . "fonts/afm/urw/times")
3999 ("urw35vf-tfm" . "fonts/tfm/urw35vf/times")
4000 ("urw35vf-vf" . "fonts/vf/urw35vf/times")
4001
4002 ("times-tex" . "tex/latex/times")
4003 ("dvips" . "dvips/times")
4004 ("fonts-map" . "fonts/map/dvips/times"))))
4005 (for-each (match-lambda
4006 ((pkg . dir)
4007 (let ((target (string-append root dir)))
4008 (mkdir-p target)
4009 (copy-recursively (assoc-ref %build-inputs pkg)
4010 target))))
4011 pkgs)
4012 #t))))
4013 (native-inputs
4014 `(("times-afm"
4015 ,(origin
4016 (method svn-fetch)
4017 (uri (svn-reference
4018 (url (string-append "svn://www.tug.org/texlive/tags/"
4019 %texlive-tag "/Master/texmf-dist/"
4020 "/fonts/afm/adobe/times"))
4021 (revision %texlive-revision)))
4022 (file-name (string-append name "-afm-" version "-checkout"))
4023 (sha256
4024 (base32
4025 "1k7h6vihfc6ri2lq9ggnq2g4zq3qcgq1vd0hr486g9cqrdpys6cy"))))
4026 ("times-tfm"
4027 ,(origin
4028 (method svn-fetch)
4029 (uri (svn-reference
4030 (url (string-append "svn://www.tug.org/texlive/tags/"
4031 %texlive-tag "/Master/texmf-dist/"
4032 "/fonts/tfm/adobe/times"))
4033 (revision %texlive-revision)))
4034 (file-name (string-append name "-tfm-" version "-checkout"))
4035 (sha256
4036 (base32
4037 "1hbgkjnf5xyganbznwpwszvr3iyk4bzb0ys4hd8ybawp60paadrr"))))
4038 ("times-vf"
4039 ,(origin
4040 (method svn-fetch)
4041 (uri (svn-reference
4042 (url (string-append "svn://www.tug.org/texlive/tags/"
4043 %texlive-tag "/Master/texmf-dist/"
4044 "/fonts/vf/adobe/times"))
4045 (revision %texlive-revision)))
4046 (file-name (string-append name "-vf-" version "-checkout"))
4047 (sha256
4048 (base32
4049 "18rfspnwdw9r81dy18lb4w96d09b6c4g7y80azwylalkhwdf2lfp"))))
4050 ("urw-afm"
4051 ,(origin
4052 (method svn-fetch)
4053 (uri (svn-reference
4054 (url (string-append "svn://www.tug.org/texlive/tags/"
4055 %texlive-tag "/Master/texmf-dist/"
4056 "/fonts/afm/urw/times"))
4057 (revision %texlive-revision)))
4058 (file-name (string-append name "-urw-afm-" version "-checkout"))
4059 (sha256
4060 (base32
4061 "0g0xpsyn6634g0b4rpd420v7i4gkz3zr12vcy2b8csbcscjvwri5"))))
4062 ("urw35vf-tfm"
4063 ,(origin
4064 (method svn-fetch)
4065 (uri (svn-reference
4066 (url (string-append "svn://www.tug.org/texlive/tags/"
4067 %texlive-tag "/Master/texmf-dist/"
4068 "/fonts/tfm/urw35vf/times"))
4069 (revision %texlive-revision)))
4070 (file-name (string-append name "-urw35vf-tfm-" version "-checkout"))
4071 (sha256
4072 (base32
4073 "0a4idlvpaqd0ypqgy1xw0rpx8q23bvssg8xq757zzn3zikj0w7pr"))))
4074 ("urw35vf-vf"
4075 ,(origin
4076 (method svn-fetch)
4077 (uri (svn-reference
4078 (url (string-append "svn://www.tug.org/texlive/tags/"
4079 %texlive-tag "/Master/texmf-dist/"
4080 "/fonts/vf/urw35vf/times"))
4081 (revision %texlive-revision)))
4082 (file-name (string-append name "-urw35vf-vf-" version "-checkout"))
4083 (sha256
4084 (base32
4085 "05mppwxd4c5x0yw50gca726f0ylc1rk8jf0jjkrriixq6rnw03di"))))
4086 ("times-tex"
4087 ,(origin
4088 (method svn-fetch)
4089 (uri (svn-reference
4090 (url (string-append "svn://www.tug.org/texlive/tags/"
4091 %texlive-tag "/Master/texmf-dist/"
4092 "/tex/latex/times"))
4093 (revision %texlive-revision)))
4094 (file-name (string-append name "-tex-" version "-checkout"))
4095 (sha256
4096 (base32
4097 "1gmd0x7c3vkvfzgmrsp4866rcdbyimfk3bjr91zaadc41r1i8xrp"))))
4098 ("dvips"
4099 ,(origin
4100 (method svn-fetch)
4101 (uri (svn-reference
4102 (url (string-append "svn://www.tug.org/texlive/tags/"
4103 %texlive-tag "/Master/texmf-dist/"
4104 "/dvips/times/"))
4105 (revision %texlive-revision)))
4106 (file-name (string-append name "-dvips-" version "-checkout"))
4107 (sha256
4108 (base32
4109 "1fvqpgqi7bp2q76nf5kmlhsdijxw65arqfy3ax3djwih3yg12mp0"))))
4110 ("fonts-map"
4111 ,(origin
4112 (method svn-fetch)
4113 (uri (svn-reference
4114 (url (string-append "svn://www.tug.org/texlive/tags/"
4115 %texlive-tag "/Master/texmf-dist/"
4116 "/fonts/map/dvips/times/"))
4117 (revision %texlive-revision)))
4118 (file-name (string-append name "-fonts-map-" version "-checkout"))
4119 (sha256
4120 (base32
4121 "12f00gzs2zgllkm59qdhw2xxj7lvg3p256232f1l275z3pldfqqi"))))))
4122 (home-page "https://ctan.org/pkg/urw-base35")
4123 (synopsis "URW Base 35 font pack for LaTeX")
4124 (description
4125 "This package provides a drop-in replacements for the Times font from
4126Adobe's basic set.")
4127 ;; No license version specified.
4128 (license license:gpl3+)))
4129
f2d1f060
RW
4130(define-public texlive-fonts-adobe-palatino
4131 (package
4132 (name "texlive-fonts-adobe-palatino")
4133 (version (number->string %texlive-revision))
4134 (source (origin
4135 (method svn-fetch)
4136 (uri (svn-reference
4137 (url (string-append "svn://www.tug.org/texlive/tags/"
4138 %texlive-tag "/Master/texmf-dist/"
4139 "/fonts/type1/urw/palatino/"))
4140 (revision %texlive-revision)))
4141 (file-name (string-append name "-" version "-checkout"))
4142 (sha256
4143 (base32
4144 "18dw5260c6fy7acxaqwrg3hw04kg63ijq4lkn56q5pa2g6nyylrp"))))
4145 (build-system trivial-build-system)
4146 (arguments
4147 `(#:modules ((guix build utils)
4148 (ice-9 match))
4149 #:builder
4150 (begin
4151 (use-modules (guix build utils)
4152 (ice-9 match))
4153 (let ((root (string-append (assoc-ref %outputs "out")
4154 "/share/texmf-dist/"))
4155 (pkgs '(("source" . "fonts/type1/urw/palatino")
4156
4157 ("palatino-afm" . "fonts/afm/adobe/palatino")
4158 ("palatino-tfm" . "fonts/tfm/adobe/palatino")
4159 ("palatino-vf" . "fonts/vf/adobe/palatino")
4160
4161 ("urw-afm" . "fonts/afm/urw/palatino")
4162 ("urw35vf-tfm" . "fonts/tfm/urw35vf/palatino")
4163 ("urw35vf-vf" . "fonts/vf/urw35vf/palatino")
4164
4165 ("palatino-tex" . "tex/latex/palatino")
4166 ("dvips" . "dvips/palatino")
4167 ("fonts-map" . "fonts/map/dvips/palatino"))))
4168 (for-each (match-lambda
4169 ((pkg . dir)
4170 (let ((target (string-append root dir)))
4171 (mkdir-p target)
4172 (copy-recursively (assoc-ref %build-inputs pkg)
4173 target))))
4174 pkgs)
4175 #t))))
4176 (native-inputs
4177 `(("palatino-afm"
4178 ,(origin
4179 (method svn-fetch)
4180 (uri (svn-reference
4181 (url (string-append "svn://www.tug.org/texlive/tags/"
4182 %texlive-tag "/Master/texmf-dist/"
4183 "/fonts/afm/adobe/palatino"))
4184 (revision %texlive-revision)))
4185 (file-name (string-append name "-afm-" version "-checkout"))
4186 (sha256
4187 (base32
4188 "0pxizay730cx7rb9y5bqq9dn1zxx3arc33rmdsn7l29pc51flmmi"))))
4189 ("palatino-tfm"
4190 ,(origin
4191 (method svn-fetch)
4192 (uri (svn-reference
4193 (url (string-append "svn://www.tug.org/texlive/tags/"
4194 %texlive-tag "/Master/texmf-dist/"
4195 "/fonts/tfm/adobe/palatino"))
4196 (revision %texlive-revision)))
4197 (file-name (string-append name "-tfm-" version "-checkout"))
4198 (sha256
4199 (base32
4200 "1w1vm0sk9kpsy14yhyf1v1q3c6b97cgbba74g578bcwjlh810mg0"))))
4201 ("palatino-vf"
4202 ,(origin
4203 (method svn-fetch)
4204 (uri (svn-reference
4205 (url (string-append "svn://www.tug.org/texlive/tags/"
4206 %texlive-tag "/Master/texmf-dist/"
4207 "/fonts/vf/adobe/palatino"))
4208 (revision %texlive-revision)))
4209 (file-name (string-append name "-vf-" version "-checkout"))
4210 (sha256
4211 (base32
4212 "1maqfis8hpybcn9lmm8r2b1g56620lfpsncg0742c3kkjd6dh97h"))))
4213 ("urw-afm"
4214 ,(origin
4215 (method svn-fetch)
4216 (uri (svn-reference
4217 (url (string-append "svn://www.tug.org/texlive/tags/"
4218 %texlive-tag "/Master/texmf-dist/"
4219 "/fonts/afm/urw/palatino"))
4220 (revision %texlive-revision)))
4221 (file-name (string-append name "-urw-afm-" version "-checkout"))
4222 (sha256
4223 (base32
4224 "0gk0xwy1fs2si5kb1j3dzgm52c8sagv32gd9dmw88m7sgh5qkd87"))))
4225 ("urw35vf-tfm"
4226 ,(origin
4227 (method svn-fetch)
4228 (uri (svn-reference
4229 (url (string-append "svn://www.tug.org/texlive/tags/"
4230 %texlive-tag "/Master/texmf-dist/"
4231 "/fonts/tfm/urw35vf/palatino"))
4232 (revision %texlive-revision)))
4233 (file-name (string-append name "-urw35vf-tfm-" version "-checkout"))
4234 (sha256
4235 (base32
4236 "19aq3xwfg7vkf1qzjdxgcvcdqwpvpavq3l25y64xni72qx0kmppz"))))
4237 ("urw35vf-vf"
4238 ,(origin
4239 (method svn-fetch)
4240 (uri (svn-reference
4241 (url (string-append "svn://www.tug.org/texlive/tags/"
4242 %texlive-tag "/Master/texmf-dist/"
4243 "/fonts/vf/urw35vf/palatino"))
4244 (revision %texlive-revision)))
4245 (file-name (string-append name "-urw35vf-vf-" version "-checkout"))
4246 (sha256
4247 (base32
4248 "1lkn4p6zimrs0ah6mxsang4bicp8j7xzl016529a3f168an7mdmj"))))
4249 ("palatino-tex"
4250 ,(origin
4251 (method svn-fetch)
4252 (uri (svn-reference
4253 (url (string-append "svn://www.tug.org/texlive/tags/"
4254 %texlive-tag "/Master/texmf-dist/"
4255 "/tex/latex/palatino"))
4256 (revision %texlive-revision)))
4257 (file-name (string-append name "-tex-" version "-checkout"))
4258 (sha256
4259 (base32
4260 "0ng9w7i0p1nb51amla32jj86vx6p84m6qc7asam3g4x8w5jf7s27"))))
4261 ("dvips"
4262 ,(origin
4263 (method svn-fetch)
4264 (uri (svn-reference
4265 (url (string-append "svn://www.tug.org/texlive/tags/"
4266 %texlive-tag "/Master/texmf-dist/"
4267 "/dvips/palatino/"))
4268 (revision %texlive-revision)))
4269 (file-name (string-append name "-dvips-" version "-checkout"))
4270 (sha256
4271 (base32
4272 "1pdbkfmhx4kk3brh5lg6fyl9ad2kbjmkrhgcx84klnlhq01mfdhb"))))
4273 ("fonts-map"
4274 ,(origin
4275 (method svn-fetch)
4276 (uri (svn-reference
4277 (url (string-append "svn://www.tug.org/texlive/tags/"
4278 %texlive-tag "/Master/texmf-dist/"
4279 "/fonts/map/dvips/palatino/"))
4280 (revision %texlive-revision)))
4281 (file-name (string-append name "-fonts-map-" version "-checkout"))
4282 (sha256
4283 (base32
4284 "0rg13hyp652hp3gnrj5pbyb84zkqmyi1qnm8c6spcyaq8pm06l0d"))))))
4285 (home-page "https://ctan.org/pkg/urw-base35")
4286 (synopsis "URW Base 35 font pack for LaTeX")
4287 (description
4288 "This package provides a drop-in replacements for the Palatino font from
4289Adobe's basic set.")
4290 ;; No license version specified.
4291 (license license:gpl3+)))
4292
4628315b
RW
4293(define-public texlive-fonts-adobe-zapfding
4294 (package
4295 (name "texlive-fonts-adobe-zapfding")
4296 (version (number->string %texlive-revision))
4297 (source (origin
4298 (method svn-fetch)
4299 (uri (svn-reference
4300 (url (string-append "svn://www.tug.org/texlive/tags/"
4301 %texlive-tag "/Master/texmf-dist/"
4302 "/fonts/type1/urw/zapfding/"))
4303 (revision %texlive-revision)))
4304 (file-name (string-append name "-" version "-checkout"))
4305 (sha256
4306 (base32
4307 "1sp3jblg3khp0yj121blvhph6ib09919kyrsk5x2lg258yypqyis"))))
4308 (build-system trivial-build-system)
4309 (arguments
4310 `(#:modules ((guix build utils)
4311 (ice-9 match))
4312 #:builder
4313 (begin
4314 (use-modules (guix build utils)
4315 (ice-9 match))
4316 (let ((root (string-append (assoc-ref %outputs "out")
4317 "/share/texmf-dist/"))
4318 (pkgs '(("source" . "fonts/type1/urw/zapfding")
4319 ("zapf-afm" . "fonts/afm/adobe/zapfding")
4320 ("zapf-tfm" . "fonts/tfm/adobe/zapfding")
4321 ("urw-afm" . "fonts/afm/urw/zapfding")
4322 ("urw35vf-tfm" . "fonts/tfm/urw35vf/zapfding")
4323
4324 ("zapf-tex" . "tex/latex/zapfding")
4325 ("dvips" . "dvips/zapfding")
4326 ("fonts-map" . "fonts/map/dvips/zapfding"))))
4327 (for-each (match-lambda
4328 ((pkg . dir)
4329 (let ((target (string-append root dir)))
4330 (mkdir-p target)
4331 (copy-recursively (assoc-ref %build-inputs pkg)
4332 target))))
4333 pkgs)
4334 #t))))
4335 (native-inputs
4336 `(("zapf-afm"
4337 ,(origin
4338 (method svn-fetch)
4339 (uri (svn-reference
4340 (url (string-append "svn://www.tug.org/texlive/tags/"
4341 %texlive-tag "/Master/texmf-dist/"
4342 "/fonts/afm/adobe/zapfding"))
4343 (revision %texlive-revision)))
4344 (file-name (string-append name "-afm-" version "-checkout"))
4345 (sha256
4346 (base32
4347 "0qvl4w1bfcpiakkd8rvkism46qnvzj9w7x4r8z9m0y7mspbkblyr"))))
4348 ("zapf-tfm"
4349 ,(origin
4350 (method svn-fetch)
4351 (uri (svn-reference
4352 (url (string-append "svn://www.tug.org/texlive/tags/"
4353 %texlive-tag "/Master/texmf-dist/"
4354 "/fonts/tfm/adobe/zapfding"))
4355 (revision %texlive-revision)))
4356 (file-name (string-append name "-tfm-" version "-checkout"))
4357 (sha256
4358 (base32
4359 "1i8mh9xsl8l4cgsg3nl4ha9q6m55j122riclaxsvkc5ka83432qm"))))
4360 ("urw-afm"
4361 ,(origin
4362 (method svn-fetch)
4363 (uri (svn-reference
4364 (url (string-append "svn://www.tug.org/texlive/tags/"
4365 %texlive-tag "/Master/texmf-dist/"
4366 "/fonts/afm/urw/zapfding"))
4367 (revision %texlive-revision)))
4368 (file-name (string-append name "-urw-afm-" version "-checkout"))
4369 (sha256
4370 (base32
4371 "0m4qndqh7ji723ff82c5c1q8ziqvblbaip7vx05vnl15fqbsnfx1"))))
4372 ("urw35vf-tfm"
4373 ,(origin
4374 (method svn-fetch)
4375 (uri (svn-reference
4376 (url (string-append "svn://www.tug.org/texlive/tags/"
4377 %texlive-tag "/Master/texmf-dist/"
4378 "/fonts/tfm/urw35vf/zapfding"))
4379 (revision %texlive-revision)))
4380 (file-name (string-append name "-urw35vf-tfm-" version "-checkout"))
4381 (sha256
4382 (base32
4383 "167g2x6mpjfqh0w1fhjbw14qcx6ridrj2zm1bd8bi0l2d7phj28m"))))
4384 ("zapf-tex"
4385 ,(origin
4386 (method svn-fetch)
4387 (uri (svn-reference
4388 (url (string-append "svn://www.tug.org/texlive/tags/"
4389 %texlive-tag "/Master/texmf-dist/"
4390 "/tex/latex/zapfding"))
4391 (revision %texlive-revision)))
4392 (file-name (string-append name "-tex-" version "-checkout"))
4393 (sha256
4394 (base32
4395 "0hp7i8f6nbrg7irrwc8fd7n1hrzjysa84d6iyivwlc65v9p7lmd0"))))
4396 ("dvips"
4397 ,(origin
4398 (method svn-fetch)
4399 (uri (svn-reference
4400 (url (string-append "svn://www.tug.org/texlive/tags/"
4401 %texlive-tag "/Master/texmf-dist/"
4402 "/dvips/zapfding/"))
4403 (revision %texlive-revision)))
4404 (file-name (string-append name "-dvips-" version "-checkout"))
4405 (sha256
4406 (base32
4407 "1f18sc4qwxykd786zhn6szcrycqvpvfhlcim71aamxmwghakd7fa"))))
4408 ("fonts-map"
4409 ,(origin
4410 (method svn-fetch)
4411 (uri (svn-reference
4412 (url (string-append "svn://www.tug.org/texlive/tags/"
4413 %texlive-tag "/Master/texmf-dist/"
4414 "/fonts/map/dvips/zapfding/"))
4415 (revision %texlive-revision)))
4416 (file-name (string-append name "-fonts-map-" version "-checkout"))
4417 (sha256
4418 (base32
4419 "17kwxmdrgz2fb072hx57a3pidcrhbgayphx11zyld2hv9149pkyl"))))))
4420 (home-page "https://ctan.org/pkg/urw-base35")
4421 (synopsis "URW Base 35 font pack for LaTeX")
4422 (description
4423 "This package provides a drop-in replacements for the Zapfding font from
4424Adobe's basic set.")
4425 ;; No license version specified.
4426 (license license:gpl3+)))
4427
f45a5520
RW
4428(define-public texlive-fonts-rsfs
4429 (package
4430 (name "texlive-fonts-rsfs")
4431 (version (number->string %texlive-revision))
4432 (source (origin
4433 (method svn-fetch)
4434 (uri (svn-reference
4435 (url (string-append "svn://www.tug.org/texlive/tags/"
4436 %texlive-tag "/Master/texmf-dist/"
4437 "/fonts/source/public/rsfs/"))
4438 (revision %texlive-revision)))
e26de9c9 4439 (file-name (string-append name "-" version "-checkout"))
f45a5520
RW
4440 (sha256
4441 (base32
4442 "0r12pn02r4a955prcvq0048nifh86ihlcgvw3pppqqvfngv34l5h"))))
4443 (build-system gnu-build-system)
4444 (arguments
4445 `(#:modules ((guix build gnu-build-system)
4446 (guix build utils)
4447 (srfi srfi-1)
4448 (srfi srfi-26))
4449 #:tests? #f ; no tests
4450 #:phases
4451 (modify-phases %standard-phases
4452 (delete 'configure)
4453 (replace 'build
4454 (lambda* (#:key inputs #:allow-other-keys)
4455 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
4456 ;; Tell mf where to find mf.base
4457 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
4458 ;; Tell mf where to look for source files
4459 (setenv "MFINPUTS"
4460 (string-append (getcwd) ":"
4461 mf "/share/texmf-dist/metafont/base:"
4462 (assoc-ref inputs "texlive-fonts-cm")
4463 "/share/texmf-dist/fonts/source/public/cm")))
4464 (mkdir "build")
d8ac82c2
MW
4465 (for-each (lambda (font)
4466 (format #t "building font ~a\n" font)
4467 (invoke "mf" "-progname=mf"
4468 "-output-directory=build"
4469 (string-append "\\"
4470 "mode:=ljfour; "
4471 "mag:=1; "
4472 "batchmode; "
4473 "input " (basename font ".mf"))))
4474 (find-files "." "[0-9]+\\.mf$"))
4475 #t))
f45a5520
RW
4476 (replace 'install
4477 (lambda* (#:key outputs #:allow-other-keys)
4478 (let* ((out (assoc-ref outputs "out"))
4479 (tfm (string-append
4480 out "/share/texmf-dist/fonts/tfm/public/rsfs"))
4481 (mf (string-append
4482 out "/share/texmf-dist/fonts/source/public/rsfs")))
4483 (for-each (cut install-file <> tfm)
4484 (find-files "build" "\\.*"))
4485 (for-each (cut install-file <> mf)
4486 (find-files "." "\\.mf"))
4487 #t))))))
4488 (native-inputs
4489 `(("texlive-bin" ,texlive-bin)
4490 ("texlive-metafont-base" ,texlive-metafont-base)
4491 ("texlive-fonts-cm" ,texlive-fonts-cm)))
b8d8806b 4492 (home-page "https://www.ctan.org/pkg/rsfs")
f45a5520
RW
4493 (synopsis "Ralph Smith's Formal Script font")
4494 (description
4495 "The fonts provide uppercase formal script letters for use as symbols in
4496scientific and mathematical typesetting (in contrast to the informal script
4497fonts such as that used for the calligraphic symbols in the TeX maths symbol
4498font). The fonts are provided as Metafont source, and as derived Adobe Type 1
4499format. LaTeX support, for using these fonts in mathematics, is available via
4500one of the packages @code{calrsfs} and @code{mathrsfs}.")
4501 (license (license:fsf-free "http://mirrors.ctan.org/fonts/rsfs/README"))))
4502
1562763c
RW
4503(define-public texlive-latex-eso-pic
4504 (package
4505 (name "texlive-latex-eso-pic")
4506 (version (number->string %texlive-revision))
4507 (source (origin
4508 (method svn-fetch)
4509 (uri (texlive-ref "latex" "eso-pic"))
2678a63b 4510 (file-name (string-append name "-" version "-checkout"))
1562763c
RW
4511 (sha256
4512 (base32
4513 "1xvmms28mvvfpks9x7lfya2xhh5k8jy3qnlih1mzcnf156xnb89z"))))
4514 (build-system texlive-build-system)
4515 (arguments '(#:tex-directory "latex/eso-pic"))
b8d8806b 4516 (home-page "https://www.ctan.org/pkg/eso-pic")
1562763c
RW
4517 (synopsis "Add picture commands (or backgrounds) to every page")
4518 (description
4519 "The package adds one or more user commands to LaTeX's @code{shipout}
4520routine, which may be used to place the output at fixed positions. The
4521@code{grid} option may be used to find the correct places.")
4522 (license license:lppl1.3+)))
4523
ae3779d5
RW
4524(define-public texlive-latex-eepic
4525 (package
4526 (name "texlive-latex-eepic")
4527 (version (number->string %texlive-revision))
4528 (source (origin
4529 (method svn-fetch)
4530 (uri (svn-reference
4531 (url (string-append "svn://www.tug.org/texlive/tags/"
4532 %texlive-tag "/Master/texmf-dist/"
4533 "/tex/latex/eepic"))
4534 (revision %texlive-revision)))
84d63643 4535 (file-name (string-append name "-" version "-checkout"))
ae3779d5
RW
4536 (sha256
4537 (base32
4538 "1c68gvh021pvybg07apsd2xhq2ljbg80kq94wh71drdga3c2zqjw"))))
4539 (build-system trivial-build-system)
4540 (arguments
4541 `(#:modules ((guix build utils))
4542 #:builder
4543 (begin
4544 (use-modules (guix build utils))
4545 (let ((target (string-append (assoc-ref %outputs "out")
4546 "/share/texmf-dist/tex/latex/eepic")))
4547 (mkdir-p target)
4548 (copy-recursively (assoc-ref %build-inputs "source") target)
4549 #t))))
b8d8806b 4550 (home-page "https://www.ctan.org/pkg/eepic")
ae3779d5
RW
4551 (synopsis "Extensions to epic and the LaTeX drawing tools")
4552 (description
4553 "Extensions to @code{epic} and the LaTeX picture drawing environment,
4554include the drawing of lines at any slope, the drawing of circles in any
4555radii, and the drawing of dotted and dashed lines much faster with much less
4556TeX memory, and providing several new commands for drawing ellipses, arcs,
4557splines, and filled circles and ellipses. The package uses @code{tpic}
4558@code{\\special} commands.")
4559 (license license:public-domain)))
4560
245f1f31
RW
4561(define-public texlive-latex-enumitem
4562 (package
4563 (name "texlive-latex-enumitem")
4564 (version (number->string %texlive-revision))
4565 (source (origin
4566 (method svn-fetch)
4567 (uri (svn-reference
4568 (url (string-append "svn://www.tug.org/texlive/tags/"
4569 %texlive-tag "/Master/texmf-dist/"
4570 "/tex/latex/enumitem"))
4571 (revision %texlive-revision)))
4572 (file-name (string-append name "-" version "-checkout"))
4573 (sha256
4574 (base32
4575 "0q24b1bkdi9l6bw787bpggww83jh2vj8955aw2m5yccqbx4vgr5r"))))
4576 (build-system trivial-build-system)
4577 (arguments
4578 `(#:modules ((guix build utils))
4579 #:builder
4580 (begin
4581 (use-modules (guix build utils))
4582 (let ((target (string-append (assoc-ref %outputs "out")
4583 "/share/texmf-dist/tex/latex/enumitem")))
4584 (mkdir-p target)
4585 (copy-recursively (assoc-ref %build-inputs "source") target)
4586 #t))))
b8d8806b 4587 (home-page "https://www.ctan.org/pkg/enumitem")
245f1f31
RW
4588 (synopsis "Customize basic list environments")
4589 (description
4590 "This package is intended to ease customizing the three basic list
4591environments: @code{enumerate}, @code{itemize} and @code{description}. It
4592extends their syntax to allow an optional argument where a set of parameters
4593in the form @code{key=value} are available, for example:
4594@code{\\begin{itemize}[itemsep=1ex,leftmargin=1cm]}.")
4595 (license license:lppl1.3+)))
4596
ecffeeb5
RW
4597(define-public texlive-latex-multirow
4598 (package
4599 (name "texlive-latex-multirow")
4600 (version (number->string %texlive-revision))
4601 (source (origin
4602 (method svn-fetch)
4603 (uri (texlive-ref "latex" "multirow"))
6a919804 4604 (file-name (string-append name "-" version "-checkout"))
ecffeeb5
RW
4605 (sha256
4606 (base32
4607 "0qlxy47f1f8plgch3jqfsnrdgpyz20sz46yp33i2jwvf9hvfczf0"))))
4608 (build-system texlive-build-system)
4609 (arguments '(#:tex-directory "latex/multirow"))
b8d8806b 4610 (home-page "https://www.ctan.org/pkg/multirow")
ecffeeb5
RW
4611 (synopsis "Create tabular cells spanning multiple rows")
4612 (description
4613 "The package provides tools for creating tabular cells spanning multiple
4614rows. It has a lot of flexibility, including an option for specifying an
4615entry at the \"natural\" width of its text.")
4616 (license license:lppl1.3+)))
4617
da38b235
RW
4618(define-public texlive-latex-overpic
4619 (package
4620 (name "texlive-latex-overpic")
4621 (version (number->string %texlive-revision))
4622 (source (origin
4623 (method svn-fetch)
4624 (uri (svn-reference
4625 (url (string-append "svn://www.tug.org/texlive/tags/"
4626 %texlive-tag "/Master/texmf-dist/"
4627 "/tex/latex/overpic"))
4628 (revision %texlive-revision)))
b2aef721 4629 (file-name (string-append name "-" version "-checkout"))
da38b235
RW
4630 (sha256
4631 (base32
d4d9a1ec 4632 "1rpx4ibjncj5416rg19v0xjbj3z9avhfdfn2gzp8r8sz9vz25c6g"))))
da38b235
RW
4633 (build-system trivial-build-system)
4634 (arguments
4635 `(#:modules ((guix build utils))
4636 #:builder
4637 (begin
4638 (use-modules (guix build utils))
4639 (let ((target (string-append (assoc-ref %outputs "out")
4640 "/share/texmf-dist/tex/latex/overpic")))
4641 (mkdir-p target)
4642 (copy-recursively (assoc-ref %build-inputs "source") target)
4643 #t))))
b8d8806b 4644 (home-page "https://www.ctan.org/pkg/overpic")
da38b235
RW
4645 (synopsis "Combine LaTeX commands over included graphics")
4646 (description
4647 "The @code{overpic} environment is a cross between the LaTeX
4648@code{picture} environment and the @code{\\includegraphics} command of
4649@code{graphicx}. The resulting picture environment has the same dimensions as
4650the included graphic. LaTeX commands can be placed on the graphic at defined
4651positions; a grid for orientation is available.")
4652 (license license:lppl1.0+)))
4653
e0d307d1
RW
4654(define-public texlive-latex-parskip
4655 (package
4656 (name "texlive-latex-parskip")
4657 (version (number->string %texlive-revision))
4658 (source (origin
4659 (method svn-fetch)
4660 (uri (svn-reference
4661 (url (string-append "svn://www.tug.org/texlive/tags/"
4662 %texlive-tag "/Master/texmf-dist/"
4663 "/tex/latex/parskip"))
4664 (revision %texlive-revision)))
4665 (file-name (string-append name "-" version "-checkout"))
4666 (sha256
4667 (base32
4668 "14r6h9hqb0qgccxj5l1208694fx8sb8avmgzps36lsbbpszl7i7m"))))
4669 (build-system trivial-build-system)
4670 (arguments
4671 `(#:modules ((guix build utils))
4672 #:builder
4673 (begin
4674 (use-modules (guix build utils))
4675 (let ((target (string-append (assoc-ref %outputs "out")
4676 "/share/texmf-dist/tex/latex/parskip")))
4677 (mkdir-p target)
4678 (copy-recursively (assoc-ref %build-inputs "source") target)
4679 #t))))
b8d8806b 4680 (home-page "https://www.ctan.org/pkg/parskip")
e0d307d1
RW
4681 (synopsis "Layout with zero \\parindent, non-zero \\parskip")
4682 (description
4683 "Simply changing @code{\\parskip} and @code{\\parindent} leaves a layout
4684that is untidy; this package (though it is no substitute for a properly
4685designed class) helps alleviate this untidiness.")
4686 (license license:lppl)))
4687
adc02c70
RW
4688(define-public texlive-latex-pdfpages
4689 (package
4690 (name "texlive-latex-pdfpages")
4691 (version (number->string %texlive-revision))
4692 (source (origin
4693 (method svn-fetch)
4694 (uri (texlive-ref "latex" "pdfpages"))
7372ce18 4695 (file-name (string-append name "-" version "-checkout"))
adc02c70
RW
4696 (sha256
4697 (base32
d4d9a1ec 4698 "0s4izcah7im67889qz4d26pcfpasmm35sj1rw4ragkkdk3rlbbbd"))))
adc02c70
RW
4699 (build-system texlive-build-system)
4700 (arguments '(#:tex-directory "latex/pdfpages"))
b8d8806b 4701 (home-page "https://www.ctan.org/pkg/pdfpages")
adc02c70
RW
4702 (synopsis "Include PDF documents in LaTeX")
4703 (description
4704 "This package simplifies the inclusion of external multi-page PDF
4705documents in LaTeX documents. Pages may be freely selected and it is possible
4706to put several logical pages onto each sheet of paper. Furthermore a lot of
4707hypertext features like hyperlinks and article threads are provided. The
4708package supports pdfTeX (pdfLaTeX) and VTeX. With VTeX it is even possible to
4709use this package to insert PostScript files, in addition to PDF files.")
4710 (license license:lppl1.3+)))
4711
d8fef6ea
RW
4712(define-public texlive-fonts-stmaryrd
4713 (package
4714 (name "texlive-fonts-stmaryrd")
4715 (version (number->string %texlive-revision))
4716 (source (origin
4717 (method svn-fetch)
4718 (uri (texlive-ref "fonts" "stmaryrd"))
19835372 4719 (file-name (string-append name "-" version "-checkout"))
d8fef6ea
RW
4720 (sha256
4721 (base32
4722 "08pn4ca3vl6qm9l3wm5h5iyjsrg411kkm1yana329xwg2j14s9n6"))))
4723 (build-system texlive-build-system)
4724 (arguments
4725 '(#:tex-directory "latex/stmaryrd"
4726 #:phases
4727 (modify-phases %standard-phases
4728 (add-after 'configure 'patch-ins
4729 (lambda _
4730 (substitute* "stmaryrd.ins"
4731 (("^%% LaTeX2e.*") "\\input docstrip\n")
4732 (("fontdef\\}\\}" line)
4733 (string-append line "\n\\endbatchfile")))
4734 #t)))))
b8d8806b 4735 (home-page "https://www.ctan.org/pkg/stmaryrd")
d8fef6ea
RW
4736 (synopsis "St Mary Road symbols for theoretical computer science")
4737 (description
4738 "The fonts were originally distributed as Metafont sources only, but
4739Adobe Type 1 versions are also now available. Macro support is provided for
4740use under LaTeX; the package supports the @code{only} option (provided by the
4741@code{somedefs} package) to restrict what is loaded, for those who don't need
4742the whole font.")
4743 (license license:lppl)))
4744
2db3a034
RW
4745(define-public texlive-latex-subfigure
4746 (package
4747 (name "texlive-latex-subfigure")
4748 (version (number->string %texlive-revision))
4749 (source (origin
4750 (method svn-fetch)
4751 (uri (texlive-ref "latex" "subfigure"))
e1834df6 4752 (file-name (string-append name "-" version "-checkout"))
2db3a034
RW
4753 (sha256
4754 (base32
4755 "15spcl5wb7w269qd6y596vp4yi8sa5ppcx8w4z2i9kyp02r3a0yb"))))
4756 (build-system texlive-build-system)
4757 (arguments '(#:tex-directory "latex/subfigure"))
b8d8806b 4758 (home-page "https://www.ctan.org/pkg/subfigure")
2db3a034
RW
4759 (synopsis "Figures divided into subfigures")
4760 (description
4761 "This (deprecated) package provides support for the manipulation and
4762reference of small or \"sub\" figures and tables within a single figure or
4763table environment. It is convenient to use this package when your subfigures
4764are to be separately captioned, referenced, or are to be included in the
4765List-of-Figures. A new @code{\\subfigure} command is introduced which can be
4766used inside a figure environment for each subfigure. An optional first
4767argument is used as the caption for that subfigure. The package is now
4768considered obsolete: it was superseded by @code{subfig}, but users may find
4769the more recent @code{subcaption} package more satisfactory.")
4770 (license license:lppl)))
4771
c73d0e9d
RW
4772(define-public texlive-latex-tabulary
4773 (package
4774 (name "texlive-latex-tabulary")
4775 (version (number->string %texlive-revision))
4776 (source (origin
4777 (method svn-fetch)
4778 (uri (texlive-ref "latex" "tabulary"))
4779 (file-name (string-append name "-" version "-checkout"))
4780 (sha256
4781 (base32
4782 "1adkdx2zkk42g82nqf57lv1nc1z7kwl13jmy8vpcsizsa0xdnx9n"))))
4783 (build-system texlive-build-system)
4784 (arguments '(#:tex-directory "latex/tabulary"))
b8d8806b 4785 (home-page "https://www.ctan.org/pkg/tabulary")
c73d0e9d
RW
4786 (synopsis "Tabular with variable width columns balanced")
4787 (description
4788 "The package defines a @code{tabular*}-like environment, @code{tabulary},
4789taking a \"total width\" argument as well as the column specifications. The
4790environment uses column types @code{L}, @code{C}, @code{R} and @code{J} for
4791variable width columns (@code{\\raggedright}, @code{\\centering},
4792@code{\\raggedleft}, and normally justified). In contrast to
4793@code{tabularx}'s @code{X} columns, the width of each column is weighted
4794according to the natural width of the widest cell in the column.")
4795 (license license:lppl)))
4796
e3088297
RW
4797(define-public texlive-latex-threeparttable
4798 (package
4799 (name "texlive-latex-threeparttable")
4800 (version (number->string %texlive-revision))
4801 (source (origin
4802 (method svn-fetch)
4803 (uri (svn-reference
4804 (url (string-append "svn://www.tug.org/texlive/tags/"
4805 %texlive-tag "/Master/texmf-dist/"
4806 "/tex/latex/threeparttable"))
4807 (revision %texlive-revision)))
d57e5d41 4808 (file-name (string-append name "-" version "-checkout"))
e3088297
RW
4809 (sha256
4810 (base32
4811 "10vy9k150w2lviw8h22s2mcykff38xci653m5823s2vv44pwbmzq"))))
4812 (build-system trivial-build-system)
4813 (arguments
4814 `(#:modules ((guix build utils))
4815 #:builder
4816 (begin
4817 (use-modules (guix build utils))
4818 (let ((target (string-append (assoc-ref %outputs "out")
4819 "/share/texmf-dist/tex/latex/threeparttable")))
4820 (mkdir-p target)
4821 (copy-recursively (assoc-ref %build-inputs "source") target)
4822 #t))))
b8d8806b 4823 (home-page "https://www.ctan.org/pkg/threeparttable")
e3088297
RW
4824 (synopsis "Tables with captions and notes all the same width")
4825 (description
4826 "This package facilitates tables with titles (captions) and notes. The
4827title and notes are given a width equal to the body of the table (a
4828@code{tabular} environment). By itself, a @code{threeparttable} does not
4829float, but you can put it in a @code{table} or a @code{table*} or some other
4830environment.")
4831 (license (license:fsf-free "file://threeparttable.sty"))))
4832
1b10d494
RW
4833(define-public texlive-fonts-txfonts
4834 (package
4835 (name "texlive-fonts-txfonts")
4836 (version (number->string %texlive-revision))
4837 (source (origin
4838 (method svn-fetch)
4839 (uri (svn-reference
4840 (url (string-append "svn://www.tug.org/texlive/tags/"
4841 %texlive-tag "/Master/texmf-dist/"
4842 "/tex/latex/txfonts"))
4843 (revision %texlive-revision)))
4844 (file-name (string-append name "-" version "-checkout"))
4845 (sha256
4846 (base32
4847 "0jl921qdphg8i7bkfprackn3xd4gmvxckc526nmzqsmahqkavgg2"))))
4848 (build-system trivial-build-system)
4849 (arguments
4850 `(#:modules ((guix build utils)
4851 (ice-9 match))
4852 #:builder
4853 (begin
4854 (use-modules (guix build utils)
4855 (ice-9 match))
4856 (let ((root (string-append (assoc-ref %outputs "out")
4857 "/share/texmf-dist/"))
4858 (pkgs '(("source" . "tex/latex/txfonts")
4859 ("txfonts-vf" . "fonts/tfm/public/txfonts")
4860 ("txfonts-afm" . "fonts/afm/public/txfonts")
4861 ("txfonts-tfm" . "fonts/tfm/public/txfonts")
4862 ("txfonts-type1" . "fonts/type1/public/txfonts")
4863 ("txfonts-enc" . "fonts/enc/dvips/txfonts")
4864 ("txfonts-map" . "fonts/map/dvips/txfonts"))))
4865 (for-each (match-lambda
4866 ((pkg . dir)
4867 (let ((target (string-append root dir)))
4868 (mkdir-p target)
4869 (copy-recursively (assoc-ref %build-inputs pkg)
4870 target))))
4871 pkgs)
4872 #t))))
4873 (native-inputs
4874 `(("txfonts-tfm"
4875 ,(origin
4876 (method svn-fetch)
4877 (uri (svn-reference
4878 (url (string-append "svn://www.tug.org/texlive/tags/"
4879 %texlive-tag "/Master/texmf-dist/"
4880 "/fonts/tfm/public/txfonts"))
4881 (revision %texlive-revision)))
4882 (file-name (string-append name "-tfm-" version "-checkout"))
4883 (sha256
4884 (base32
4885 "12ffmbrp48ap35qa3b4mi6ckif9q2vf7972jxh5dc1yzykhla2xv"))))
4886 ("txfonts-vf"
4887 ,(origin
4888 (method svn-fetch)
4889 (uri (svn-reference
4890 (url (string-append "svn://www.tug.org/texlive/tags/"
4891 %texlive-tag "/Master/texmf-dist/"
4892 "/fonts/vf/public/txfonts"))
4893 (revision %texlive-revision)))
4894 (file-name (string-append name "-vf-" version "-checkout"))
4895 (sha256
4896 (base32
4897 "04acyfdwvxpfx4l2xh2bpzdmpvwdf2pzbs7a236b0xckz2jvc1ci"))))
4898 ("txfonts-afm"
4899 ,(origin
4900 (method svn-fetch)
4901 (uri (svn-reference
4902 (url (string-append "svn://www.tug.org/texlive/tags/"
4903 %texlive-tag "/Master/texmf-dist/"
4904 "/fonts/afm/public/txfonts"))
4905 (revision %texlive-revision)))
4906 (file-name (string-append name "-afm-" version "-checkout"))
4907 (sha256
4908 (base32
4909 "1705klz51pnqzcs89s3521b84b6c89wlczflsh0vci66nl155yis"))))
4910 ("txfonts-type1"
4911 ,(origin
4912 (method svn-fetch)
4913 (uri (svn-reference
4914 (url (string-append "svn://www.tug.org/texlive/tags/"
4915 %texlive-tag "/Master/texmf-dist/"
4916 "/fonts/type1/public/txfonts"))
4917 (revision %texlive-revision)))
4918 (file-name (string-append name "-type1-" version "-checkout"))
4919 (sha256
4920 (base32
4921 "0ajwr7zb6ch3gxd0g8p2i4llhy2wr9a9saz6jq6hm6fxf4pgl5h3"))))
4922 ("txfonts-map"
4923 ,(origin
4924 (method svn-fetch)
4925 (uri (svn-reference
4926 (url (string-append "svn://www.tug.org/texlive/tags/"
4927 %texlive-tag "/Master/texmf-dist/"
4928 "/fonts/map/dvips/txfonts"))
4929 (revision %texlive-revision)))
4930 (file-name (string-append name "-map-" version "-checkout"))
4931 (sha256
4932 (base32
4933 "0kamr8a9x24jakas3v09dgv7kkpybj3i7qv4vz1iyypqr6kk1raj"))))
4934 ("txfonts-enc"
4935 ,(origin
4936 (method svn-fetch)
4937 (uri (svn-reference
4938 (url (string-append "svn://www.tug.org/texlive/tags/"
4939 %texlive-tag "/Master/texmf-dist/"
4940 "/fonts/enc/dvips/txfonts"))
4941 (revision %texlive-revision)))
4942 (file-name (string-append name "-enc-" version "-checkout"))
4943 (sha256
4944 (base32
4945 "1bal5fhw0xlhl37ayv8vlnqnsn1y82kadzfjhbgr223blspp4zsj"))))))
b8d8806b 4946 (home-page "https://www.ctan.org/pkg/threeparttable")
1b10d494
RW
4947 (synopsis "Times-like fonts in support of mathematics")
4948 (description
4949 "Txfonts supplies virtual text roman fonts using Adobe Times (or URW
4950NimbusRomNo9L) with some modified and additional text symbols in the OT1, T1,
4951and TS1 encodings; maths alphabets using Times/URW Nimbus; maths fonts
4952providing all the symbols of the Computer Modern and AMS fonts, including all
4953the Greek capital letters from CMR; and additional maths fonts of various
4954other symbols.
4955
4956The set is complemented by a sans-serif set of text fonts, based on
4957Helvetica/NimbusSanL, and a monospace set.
4958
4959All the fonts are in Type 1 format (AFM and PFB files), and are supported by
4960TeX metrics (VF and TFM files) and macros for use with LaTeX.")
4961 ;; Any version of the GPL with font exception.
4962 (license license:gpl3+)))
4963
f9e0fcb2
RW
4964(define-public texlive-fonts-iwona
4965 (package
4966 (name "texlive-fonts-iwona")
4967 (version "0.995b")
4968 (source (origin
4969 (method url-fetch)
4970 (uri (string-append "http://jmn.pl/pliki/Iwona-tex-"
4971 (string-map (lambda (c)
4972 (if (char=? c #\.)
4973 #\_ c))
4974 version)
4975 ".zip"))
4976 (sha256
4977 (base32
4978 "13684iqx5granpc5rfvqnmyvdpgpbr1x9y7i7y7bcaq0qxv7ph1x"))))
4979 (build-system trivial-build-system)
4980 (arguments
4981 `(#:modules ((guix build utils))
4982 #:builder
4983 (begin
4984 (use-modules (guix build utils))
4985 (let ((target (string-append (assoc-ref %outputs "out")
4986 "/share/texmf-dist/"))
4987 (unzip (string-append (assoc-ref %build-inputs "unzip")
4988 "/bin/unzip")))
e3cfef22 4989 (invoke unzip (assoc-ref %build-inputs "source"))
f9e0fcb2 4990 (mkdir-p target)
e3cfef22
MW
4991 (copy-recursively "iwona" target)
4992 #t))))
f9e0fcb2
RW
4993 (native-inputs
4994 `(("unzip" ,unzip)))
4995 (home-page "http://jmn.pl/en/kurier-i-iwona/")
4996 (synopsis "Sans-serif typeface for TeX")
4997 (description "Iwona is a two-element sans-serif typeface. It was created
4998as an alternative version of the Kurier typeface, which was designed in 1975
4999for a diploma in typeface design at the Warsaw Academy of Fine Arts under the
5000supervision of Roman Tomaszewski. Kurier was designed for linotype
5001typesetting of newspapers and similar periodicals. The Iwona fonts are an
5002alternative version of the Kurier fonts. The difference lies in the absence
5003of ink traps which typify the Kurier font.")
5004 (license license:gfl1.0)))
5005
acc620d6
RW
5006(define-public texlive-latex-titlesec
5007 (package
5008 (name "texlive-latex-titlesec")
5009 (version (number->string %texlive-revision))
5010 (source (origin
5011 (method svn-fetch)
5012 (uri (svn-reference
5013 (url (string-append "svn://www.tug.org/texlive/tags/"
5014 %texlive-tag "/Master/texmf-dist/"
5015 "/tex/latex/titlesec"))
5016 (revision %texlive-revision)))
0475e35c 5017 (file-name (string-append name "-" version "-checkout"))
acc620d6
RW
5018 (sha256
5019 (base32
5020 "04nmkhqx6jxcxx9a30zbcd5smxi5fd0cbp132bki7fnvhspnhg21"))))
5021 (build-system trivial-build-system)
5022 (arguments
5023 `(#:modules ((guix build utils))
5024 #:builder
5025 (begin
5026 (use-modules (guix build utils))
5027 (let ((target (string-append (assoc-ref %outputs "out")
5028 "/share/texmf-dist/tex/latex/titlesec")))
5029 (mkdir-p target)
5030 (copy-recursively (assoc-ref %build-inputs "source") target)
5031 #t))))
b8d8806b 5032 (home-page "https://www.ctan.org/pkg/titlesec")
acc620d6
RW
5033 (synopsis "Select alternative section titles")
5034 (description
5035 "This package provides an interface to sectioning commands for selection
5036from various title styles, e.g. for marginal titles and to change the font of
5037all headings with a single command, also providing simple one-step page
5038styles. It also includes a package to change the page styles when there are
5039floats in a page. You may assign headers/footers to individual floats, too.")
5040 (license license:lppl)))
5041
274e3d4f
RW
5042(define-public texlive-latex-type1cm
5043 (package
5044 (name "texlive-latex-type1cm")
5045 (version (number->string %texlive-revision))
5046 (source (origin
5047 (method svn-fetch)
5048 (uri (texlive-ref "latex" "type1cm"))
5049 (file-name (string-append name "-" version "-checkout"))
5050 (sha256
5051 (base32
5052 "1lvxrqfwcwa4p31zyfm80gr05v8c28xybv5ri79zi2ngz6834z12"))))
5053 (build-system texlive-build-system)
5054 (arguments '(#:tex-directory "latex/type1cm"))
b8d8806b 5055 (home-page "https://www.ctan.org/pkg/type1cm")
274e3d4f
RW
5056 (synopsis "Arbitrary size font selection in LaTeX")
5057 (description
5058 "LaTeX, by default, restricts the sizes at which you can use its default
5059computer modern fonts, to a fixed set of discrete sizes (effectively, a set
5060specified by Knuth). The @code{type1cm} package removes this restriction;
5061this is particularly useful when using scalable versions of the CM
5062fonts (Bakoma, or the versions from BSR/Y&Y, or True Type versions from Kinch,
5063PCTeX, etc.). In fact, since modern distributions will automatically generate
5064any bitmap font you might need, @code{type1cm} has wider application than just
36a17f05 5065those using scalable versions of the fonts. Note that the LaTeX distribution
274e3d4f
RW
5066now contains a package @code{fix-cm},f which performs the task of
5067@code{type1cm}, as well as doing the same job for T1- and TS1-encoded
5068@code{ec} fonts.")
5069 (license license:lppl)))
5070
406af0d6
RW
5071(define-public texlive-latex-lh
5072 (package
5073 (name "texlive-latex-lh")
5074 (version (number->string %texlive-revision))
5075 (source (origin
5076 (method svn-fetch)
5077 (uri (texlive-ref "latex" "lh"))
de20fd6a 5078 (file-name (string-append name "-" version "-checkout"))
406af0d6
RW
5079 (sha256
5080 (base32
5081 "00gdiwh3sfhh1iimjhpja7lm7k4vzqzql2irgwnpz94qvh25zwi5"))))
5082 (build-system texlive-build-system)
5083 (arguments '(#:tex-directory "latex/lh"))
b8d8806b 5084 (home-page "https://www.ctan.org/pkg/lh")
406af0d6
RW
5085 (synopsis "Cyrillic fonts that support LaTeX standard encodings")
5086 (description
5087 "The LH fonts address the problem of the wide variety of alphabets that
5088are written with Cyrillic-style characters. The fonts are the original basis
5089of the set of T2* and X2 encodings that are now used when LaTeX users need to
5090write in Cyrillic languages. Macro support in standard LaTeX encodings is
5091offered through the latex-cyrillic and t2 bundles, and the package itself
5092offers support for other (more traditional) encodings. The fonts, in the
5093standard T2* and X2 encodings are available in Adobe Type 1 format, in the
5094CM-Super family of fonts. The package also offers its own LaTeX support for
5095OT2 encoded fonts, CM bright shaped fonts and Concrete shaped fonts.")
5096 (license license:lppl)))
5097
44436def
RW
5098(define-public texlive-metapost
5099 (package
5100 (name "texlive-metapost")
5101 (version (number->string %texlive-revision))
5102 (source (origin
5103 (method svn-fetch)
5104 (uri (svn-reference
5105 (url (string-append "svn://www.tug.org/texlive/tags/"
5106 %texlive-tag "/Master/texmf-dist/"
5107 "/metapost"))
5108 (revision %texlive-revision)))
b4bb2750 5109 (file-name (string-append name "-" version "-checkout"))
44436def
RW
5110 (sha256
5111 (base32
d4d9a1ec 5112 "0sf18pc6chgy26p9bxxn44xcqhzjrfb53jxjr2y7l3jb6xllhblq"))))
44436def
RW
5113 (build-system trivial-build-system)
5114 (arguments
5115 `(#:modules ((guix build utils))
5116 #:builder
5117 (begin
5118 (use-modules (guix build utils))
5119 (let ((target (string-append (assoc-ref %outputs "out")
5120 "/share/texmf-dist/metapost")))
5121 (mkdir-p target)
5122 (copy-recursively (assoc-ref %build-inputs "source") target)
5123 #t))))
b8d8806b 5124 (home-page "https://www.ctan.org/pkg/metapost")
44436def
RW
5125 (synopsis "Create scalable illustrations")
5126 (description
5127 "MetaPost uses a language based on that of Metafont to produce precise
5128technical illustrations. Its output is scalable PostScript or SVG, rather
5129than the bitmaps Metafont creates.")
5130 (license license:lppl)))
5131
9ff7161a
LC
5132(define-public texlive-latex-acmart
5133 (package
5134 (name "texlive-latex-acmart")
ff281acc 5135 (version "1.60")
9ff7161a
LC
5136 (source (origin
5137 (method svn-fetch)
5138 (uri (texlive-ref "latex" "acmart"))
5139 (sha256
5140 (base32
ff281acc 5141 "0n62cs8dhcbn29y9ij1nnyigzr76yhk36kyahhqkkmvbafbys9s7"))
9ff7161a
LC
5142 (file-name (string-append name "-" version "-checkout"))))
5143 (build-system texlive-build-system)
5144 (arguments '(#:tex-directory "latex/acmart"))
b8d8806b 5145 (home-page "https://www.ctan.org/pkg/acmart")
9ff7161a
LC
5146 (synopsis "Class for typesetting publications of ACM")
5147 (description
5148 "This package provides a class for typesetting publications of the
5149Association for Computing Machinery (ACM).")
5150 (license license:lppl1.3+)))
5151
3966ebbb
RW
5152(define-public texlive-latex-varwidth
5153 (package
5154 (name "texlive-latex-varwidth")
5155 (version (number->string %texlive-revision))
5156 (source (origin
5157 (method svn-fetch)
5158 (uri (svn-reference
5159 (url (string-append "svn://www.tug.org/texlive/tags/"
5160 %texlive-tag "/Master/texmf-dist/"
5161 "/tex/latex/varwidth"))
5162 (revision %texlive-revision)))
5163 (file-name (string-append name "-" version "-checkout"))
5164 (sha256
5165 (base32
5166 "1bmz9ap0ffyg7qry2xi7lki06qx4809w028xvk88cl66h7p46g52"))))
5167 (build-system trivial-build-system)
5168 (arguments
5169 `(#:modules ((guix build utils))
5170 #:builder
5171 (begin
5172 (use-modules (guix build utils))
5173 (let ((target (string-append (assoc-ref %outputs "out")
5174 "/share/texmf-dist/tex/latex/varwidth")))
5175 (mkdir-p target)
5176 (copy-recursively (assoc-ref %build-inputs "source") target)
5177 #t))))
b8d8806b 5178 (home-page "https://www.ctan.org/pkg/varwidth")
3966ebbb
RW
5179 (synopsis "Variable-width minipage")
5180 (description
5181 "The @code{varwidth} environment is superficially similar to
5182@code{minipage}, but the specified width is just a maximum value — the box may
5183get a narrower “natural” width.")
5184 (license license:lppl)))
5185
cd2c77f4
RW
5186(define-public texlive-latex-wasysym
5187 (package
5188 (name "texlive-latex-wasysym")
5189 (version (number->string %texlive-revision))
5190 (source (origin
5191 (method svn-fetch)
5192 (uri (texlive-ref "latex" "wasysym"))
2cc9c011 5193 (file-name (string-append name "-" version "-checkout"))
cd2c77f4
RW
5194 (sha256
5195 (base32
5196 "1sgwbfwjjf70g54hh93gsd9jp9nm67w6n74x9d72a56n07jbk5hv"))))
5197 (build-system texlive-build-system)
5198 (arguments '(#:tex-directory "latex/wasysym"))
b8d8806b 5199 (home-page "https://www.ctan.org/pkg/wasysym")
cd2c77f4
RW
5200 (synopsis "LaTeX support file to use the WASY2 fonts")
5201 (description
5202 "The wasy2WASY2 (Waldi Symbol) font by Roland Waldi provides many glyphs
5203like male and female symbols and astronomical symbols, as well as the complete
5204lasy font set and other odds and ends. The wasysym package implements an easy
5205to use interface for these symbols.")
5206 (license license:lppl)))
5207
63ed869b
RW
5208(define-public texlive-latex-wrapfig
5209 (package
5210 (name "texlive-latex-wrapfig")
5211 (version (number->string %texlive-revision))
5212 (source (origin
5213 (method svn-fetch)
5214 (uri (svn-reference
5215 (url (string-append "svn://www.tug.org/texlive/tags/"
5216 %texlive-tag "/Master/texmf-dist/"
5217 "/tex/latex/wrapfig"))
5218 (revision %texlive-revision)))
5219 (file-name (string-append name "-" version "-checkout"))
5220 (sha256
5221 (base32
5222 "16xpyl0csmmwndz1xhzqfg9l0zcsnqxslsixsqkwd4zsvfj30sv4"))))
5223 (build-system trivial-build-system)
5224 (arguments
5225 `(#:modules ((guix build utils))
5226 #:builder
5227 (begin
5228 (use-modules (guix build utils))
5229 (let ((target (string-append (assoc-ref %outputs "out")
5230 "/share/texmf-dist/tex/latex/wrapfig")))
5231 (mkdir-p target)
5232 (copy-recursively (assoc-ref %build-inputs "source") target)
5233 #t))))
b8d8806b 5234 (home-page "https://www.ctan.org/pkg/wrapfig")
63ed869b
RW
5235 (synopsis "Produces figures which text can flow around")
5236 (description
5237 "This package allows figures or tables to have text wrapped around them.
5238It does not work in combination with list environments, but can be used in a
5239@code{parbox} or @code{minipage}, and in two-column format.")
5240 (license license:lppl)))
5241
c178ffca
RW
5242(define-public texlive-latex-ucs
5243 (package
5244 (name "texlive-latex-ucs")
5245 (version (number->string %texlive-revision))
5246 (source (origin
5247 (method svn-fetch)
5248 (uri (svn-reference
5249 (url (string-append "svn://www.tug.org/texlive/tags/"
5250 %texlive-tag "/Master/texmf-dist/"
5251 "/tex/latex/ucs"))
5252 (revision %texlive-revision)))
5253 (file-name (string-append name "-" version "-checkout"))
5254 (sha256
5255 (base32
5256 "0rrxwi60wmz5dfjifl4fwk66plf7wix85qnhfv4ylvmj6qi6hw37"))))
5257 (build-system trivial-build-system)
5258 (arguments
5259 `(#:modules ((guix build utils))
5260 #:builder
5261 (begin
5262 (use-modules (guix build utils))
5263 (let ((target (string-append (assoc-ref %outputs "out")
5264 "/share/texmf-dist/tex/latex/ucs")))
5265 (mkdir-p target)
5266 (copy-recursively (assoc-ref %build-inputs "source") target)
5267 #t))))
b8d8806b 5268 (home-page "https://www.ctan.org/pkg/ucs")
c178ffca
RW
5269 (synopsis "Extended UTF-8 input encoding support for LaTeX")
5270 (description
5271 "The bundle provides the @code{ucs} package, and @code{utf8x.def},
5272together with a large number of support files. The @code{utf8x.def}
5273definition file for use with @code{inputenc} covers a wider range of Unicode
5274characters than does @code{utf8.def} in the LaTeX distribution. The package
5275provides facilities for efficient use of its large sets of Unicode characters.
5276Glyph production may be controlled by various options, which permits use of
5277non-ASCII characters when coding mathematical formulae. Note that the bundle
5278previously had an alias “unicode”; that alias has now been withdrawn, and no
5279package of that name now exists.")
5280 (license license:lppl1.3+)))
5281
86af0f2a
RW
5282(define-public texlive-latex-preview
5283 (package
5284 (name "texlive-latex-preview")
5285 (version (number->string %texlive-revision))
5286 (source (origin
5287 (method svn-fetch)
5288 (uri (texlive-ref "latex" "preview"))
5289 (file-name (string-append name "-" version "-checkout"))
5290 (sha256
5291 (base32
d4d9a1ec 5292 "1hpsk4yp08qvbl43kqiv0hhwxv3gcqqxcpahyv6ch2b38pbj4bh6"))))
86af0f2a
RW
5293 (build-system texlive-build-system)
5294 (arguments
5295 '(#:tex-directory "latex/preview"
5296 #:phases
5297 (modify-phases %standard-phases
5298 (add-after 'unpack 'remove-generated-file
5299 (lambda _
5300 (delete-file "preview.drv")
5301 #t)))))
b8d8806b 5302 (home-page "https://www.ctan.org/pkg/preview")
86af0f2a
RW
5303 (synopsis "Extract bits of a LaTeX source for output")
5304 (description
5305 "The main purpose of the preview package is the extraction of selected
5306elements from a LaTeX source, like formulas or graphics, into separate
5307pages of a DVI file. A flexible and convenient interface allows it to
5308specify what commands and constructs should be extracted. This works
5309with DVI files postprocessed by either Dvips and Ghostscript or
5310dvipng, but it also works when you are using PDFTeX for generating PDF
5311files.")
5312 (license license:gpl3+)))
5313
87b4360e
RW
5314(define-public texlive-latex-acronym
5315 (package
5316 (name "texlive-latex-acronym")
5317 (version (number->string %texlive-revision))
5318 (source (origin
5319 (method svn-fetch)
5320 (uri (texlive-ref "latex" "acronym"))
5321 (file-name (string-append name "-" version "-checkout"))
5322 (sha256
5323 (base32
5324 "0jmasg40bk53zdd2jc8nc18jvdai3p2wmamy7hwli8gls4nf25qp"))))
5325 (build-system texlive-build-system)
5326 (arguments '(#:tex-directory "latex/acronym"))
b8d8806b 5327 (home-page "https://www.ctan.org/pkg/acronym")
87b4360e
RW
5328 (synopsis "Expand acronyms at least once")
5329 (description
5330 "This package ensures that all acronyms used in the text are spelled out
5331in full at least once. It also provides an environment to build a list of
5332acronyms used. The package is compatible with PDF bookmarks. The package
5333requires the suffix package, which in turn requires that it runs under
5334e-TeX.")
5335 (license license:lppl1.3+)))
5336
fedb80ee
RW
5337(define-public texlive-generic-pdftex
5338 (package
5339 (name "texlive-generic-pdftex")
5340 (version (number->string %texlive-revision))
5341 (source (origin
5342 (method svn-fetch)
5343 (uri (svn-reference
5344 (url (string-append "svn://www.tug.org/texlive/tags/"
5345 %texlive-tag "/Master/texmf-dist/"
5346 "/tex/generic/pdftex"))
5347 (revision %texlive-revision)))
66e765a0 5348 (file-name (string-append name "-" version "-checkout"))
fedb80ee
RW
5349 (sha256
5350 (base32
5351 "0k68zmqzs4qvrqxdwsrawbjb14hxqjfamq649azvai0jjxdpkljd"))))
5352 (build-system trivial-build-system)
5353 (arguments
5354 `(#:modules ((guix build utils))
5355 #:builder
5356 (begin
5357 (use-modules (guix build utils))
5358 (let ((target (string-append (assoc-ref %outputs "out")
7002a45d
PN
5359 "/share/texmf-dist/tex/generic/pdftex"))
5360 (target-map (string-append (assoc-ref %outputs "out")
5361 "/share/texmf-dist/fonts/map/pdftex")))
fedb80ee
RW
5362 (mkdir-p target)
5363 (copy-recursively (assoc-ref %build-inputs "source") target)
7002a45d
PN
5364 (mkdir-p target-map)
5365 (copy-recursively (assoc-ref %build-inputs "pdftex-map") target-map)
fedb80ee 5366 #t))))
7002a45d
PN
5367 (native-inputs
5368 `(("pdftex-map"
5369 ,(origin
5370 (method svn-fetch)
5371 (uri (svn-reference
5372 (url (string-append "svn://www.tug.org/texlive/tags/"
5373 %texlive-tag "/Master/texmf-dist/"
5374 "/fonts/map/pdftex"))
5375 (revision %texlive-revision)))
5376 (file-name (string-append name "-map-" version "-checkout"))
5377 (sha256
5378 (base32
d4d9a1ec 5379 "18jvcm0vwpg6wwzijvnb92xx78la45kkh71k6l44425krp2vnwm0"))))))
b8d8806b 5380 (home-page "https://www.ctan.org/pkg/pdftex")
fedb80ee
RW
5381 (synopsis "TeX extension for direct creation of PDF")
5382 (description
5383 "This package provides an extension of TeX which can be configured to
5384directly generate PDF documents instead of DVI.")
5385 (license license:gpl2+)))
5386
8bcdc23f 5387(define texlive-texmf
0aa34e82
AE
5388 (package
5389 (name "texlive-texmf")
3e1ebaab 5390 (version "20180414")
0aa34e82
AE
5391 (source texlive-texmf-src)
5392 (build-system gnu-build-system)
5393 (inputs
5394 `(("texlive-bin" ,texlive-bin)
5395 ("lua" ,lua)
5396 ("perl" ,perl)
5397 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
5398 ("ruby" ,ruby)
5399 ("tcsh" ,tcsh)))
5400 (arguments
5401 `(#:modules ((guix build gnu-build-system)
5402 (guix build utils)
5403 (srfi srfi-26))
a348af40
LC
5404
5405 ;; This package takes 4 GiB, which we can't afford to distribute from
5406 ;; our servers.
5407 #:substitutable? #f
5408
0aa34e82 5409 #:phases
4a6635f3
AE
5410 (modify-phases (map (cut assq <> %standard-phases)
5411 '(set-paths unpack patch-source-shebangs))
977403fe
RW
5412 (add-after 'unpack 'unset-environment-variables
5413 (lambda _
5414 (unsetenv "TEXMF")
5415 (unsetenv "TEXMFCNF")
5416 #t))
4a6635f3
AE
5417 (add-after 'patch-source-shebangs 'install
5418 (lambda* (#:key outputs #:allow-other-keys)
5419 (let ((share (string-append (assoc-ref outputs "out") "/share")))
5420 (mkdir-p share)
286eedec 5421 (invoke "mv" "texmf-dist" share))))
4a6635f3
AE
5422 (add-after 'install 'texmf-config
5423 (lambda* (#:key inputs outputs #:allow-other-keys)
5424 (let* ((out (assoc-ref outputs "out"))
5425 (share (string-append out "/share"))
5426 (texmfroot (string-append share "/texmf-dist/web2c"))
5427 (texmfcnf (string-append texmfroot "/texmf.cnf"))
5428 (texlive-bin (assoc-ref inputs "texlive-bin"))
5429 (texbin (string-append texlive-bin "/bin"))
5430 (tlpkg (string-append texlive-bin "/share/tlpkg")))
5431 ;; Register SHARE as TEXMFROOT in texmf.cnf.
5432 (substitute* texmfcnf
5433 (("TEXMFROOT = \\$SELFAUTOPARENT")
2d634d9b
FB
5434 (string-append "TEXMFROOT = " share))
5435 (("TEXMFLOCAL = \\$SELFAUTOGRANDPARENT/texmf-local")
5436 "TEXMFLOCAL = $SELFAUTODIR/share/texmf-local")
5437 (("!!\\$TEXMFLOCAL") "$TEXMFLOCAL"))
4a6635f3
AE
5438 ;; Register paths in texmfcnf.lua, needed for context.
5439 (substitute* (string-append texmfroot "/texmfcnf.lua")
5440 (("selfautodir:") out)
5441 (("selfautoparent:") (string-append share "/")))
5442 ;; Set path to TeXLive Perl modules
5443 (setenv "PERL5LIB"
5444 (string-append (getenv "PERL5LIB") ":" tlpkg))
5445 ;; Configure the texmf-dist tree; inspired from
5446 ;; http://slackbuilds.org/repository/13.37/office/texlive/
5447 (setenv "PATH" (string-append (getenv "PATH") ":" texbin))
5448 (setenv "TEXMFCNF" texmfroot)
286eedec
MW
5449 (invoke "updmap-sys" "--nohash" "--syncwithtrees")
5450 (invoke "mktexlsr")
0371132c 5451 (invoke "fmtutil-sys" "--all")))))))
7a15a68f 5452 (properties `((max-silent-time . 9600))) ; don't time out while grafting
0aa34e82 5453 (synopsis "TeX Live, a package of the TeX typesetting system")
eb0119ef
AE
5454 (description
5455 "TeX Live provides a comprehensive TeX document production system.
5456It includes all the major TeX-related programs, macro packages, and fonts
5457that are free software, including support for many languages around the
0aa34e82
AE
5458world.
5459
5460This package contains the complete tree of texmf-dist data.")
132e14b4
EF
5461 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
5462 (home-page "https://www.tug.org/texlive/")))
0aa34e82
AE
5463
5464(define-public texlive
5465 (package
5466 (name "texlive")
3e1ebaab 5467 (version "20180414")
0aa34e82
AE
5468 (source #f)
5469 (build-system trivial-build-system)
5470 (inputs `(("bash" ,bash) ; for wrap-program
5471 ("texlive-bin" ,texlive-bin)
5472 ("texlive-texmf" ,texlive-texmf)))
2d634d9b
FB
5473 (native-search-paths
5474 (list (search-path-specification
5475 (variable "TEXMFLOCAL")
5476 (files '("share/texmf-local")))))
0aa34e82
AE
5477 (arguments
5478 `(#:modules ((guix build utils))
5479 #:builder
5480 ;; Build the union of texlive-bin and texlive-texmf, but take the
5481 ;; conflicting subdirectory share/texmf-dist from texlive-texmf.
5482 (begin
5483 (use-modules (guix build utils))
5484 (let ((out (assoc-ref %outputs "out"))
5485 (bin (assoc-ref %build-inputs "texlive-bin"))
5486 (texmf (assoc-ref %build-inputs "texlive-texmf"))
5487 (bash (assoc-ref %build-inputs "bash")))
5488 (mkdir out)
5489 (with-directory-excursion out
5490 (for-each
5491 (lambda (name)
5492 (symlink (string-append bin "/" name) name))
5493 '("include" "lib"))
5494 (mkdir "bin")
5495 (with-directory-excursion "bin"
5496 (setenv "PATH" (string-append bash "/bin"))
5497 (for-each
5498 (lambda (name)
5499 (symlink name (basename name))
5500 (wrap-program
5501 (basename name)
5502 `("TEXMFCNF" =
5503 (,(string-append texmf "/share/texmf-dist/web2c")))))
5504 (find-files (string-append bin "/bin/") "")))
5505 (mkdir "share")
5506 (with-directory-excursion "share"
5507 (for-each
5508 (lambda (name)
5509 (symlink (string-append bin "/share/" name) name))
5510 '("info" "man" "tlpkg"))
5511 (for-each
5512 (lambda (name)
5513 (symlink (string-append texmf "/share/" name) name))
e3cfef22
MW
5514 '("texmf-dist" "texmf-var"))))
5515 #t))))
0aa34e82
AE
5516 (synopsis "TeX Live, a package of the TeX typesetting system")
5517 (description
5518 "TeX Live provides a comprehensive TeX document production system.
5519It includes all the major TeX-related programs, macro packages, and fonts
5520that are free software, including support for many languages around the
5521world.
5522
5523This package contains the complete TeX Live distribution.")
132e14b4
EF
5524 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
5525 (home-page "https://www.tug.org/texlive/")))
231eae53 5526
ebcf74da
RW
5527(define-public perl-text-bibtex
5528 (package
5529 (name "perl-text-bibtex")
a2460e0f 5530 (version "0.85")
ebcf74da
RW
5531 (source
5532 (origin
5533 (method url-fetch)
5534 (uri (string-append "mirror://cpan/authors/id/A/AM/AMBS/Text-BibTeX-"
5535 version ".tar.gz"))
5536 (sha256
5537 (base32
a2460e0f 5538 "036kxgbn1jf70pfm2lmjlzjwnhbkd888fp5lyvmkjpdd15gla18h"))))
ebcf74da
RW
5539 (build-system perl-build-system)
5540 (arguments
5541 `(#:phases
5542 (modify-phases %standard-phases
5543 (add-after 'unpack 'add-output-directory-to-rpath
5544 (lambda* (#:key outputs #:allow-other-keys)
5545 (substitute* "inc/MyBuilder.pm"
5546 (("-Lbtparse" line)
5547 (string-append "-Wl,-rpath="
5548 (assoc-ref outputs "out") "/lib " line)))
5549 #t))
5550 (add-after 'unpack 'install-libraries-to-/lib
5551 (lambda* (#:key outputs #:allow-other-keys)
5552 (substitute* "Build.PL"
5553 (("lib64") "lib"))
5554 #t)))))
5555 (native-inputs
5556 `(("perl-capture-tiny" ,perl-capture-tiny)
5557 ("perl-config-autoconf" ,perl-config-autoconf)
5558 ("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
5559 ("perl-module-build" ,perl-module-build)))
9aba9b12 5560 (home-page "https://metacpan.org/release/Text-BibTeX")
ebcf74da
RW
5561 (synopsis "Interface to read and parse BibTeX files")
5562 (description "@code{Text::BibTeX} is a Perl library for reading, parsing,
5563and processing BibTeX files. @code{Text::BibTeX} gives you access to the data
5564at many different levels: you may work with BibTeX entries as simple field to
5565string mappings, or get at the original form of the data as a list of simple
5566values (strings, macros, or numbers) pasted together.")
2f3108ad 5567 (license license:perl-license)))
ebcf74da 5568
d4000680
RW
5569(define-public biber
5570 (package
1335167a 5571 (name "biber")
41a01087 5572 (version "2.12")
d4000680 5573 (source (origin
41a01087
JL
5574 (method git-fetch)
5575 (uri (git-reference
5576 (url "https://github.com/plk/biber/")
5577 (commit (string-append "v" version))))
5578 (file-name (git-file-name name version))
5579 ;; TODO: Patch awaiting inclusion upstream (see:
5580 ;; https://github.com/plk/biber/issues/239).
5581 (patches (search-patches "biber-fix-encoding-write.patch"))
d4000680
RW
5582 (sha256
5583 (base32
41a01087 5584 "1g1hi6zvf2hmrjly1sidjaxy5440gfqm4p7p3n7kayshnjsmlskx"))))
d4000680
RW
5585 (build-system perl-build-system)
5586 (arguments
5587 `(#:phases
5588 (modify-phases %standard-phases
5589 (add-after 'install 'wrap-programs
5590 (lambda* (#:key outputs #:allow-other-keys)
5591 (let* ((out (assoc-ref outputs "out"))
5592 (perl5lib (getenv "PERL5LIB")))
5593 (wrap-program (string-append out "/bin/biber")
5594 `("PERL5LIB" ":" prefix
5595 (,(string-append perl5lib ":" out
5596 "/lib/perl5/site_perl")))))
5597 #t)))))
5598 (inputs
5599 `(("perl-autovivification" ,perl-autovivification)
5600 ("perl-class-accessor" ,perl-class-accessor)
5601 ("perl-data-dump" ,perl-data-dump)
5602 ("perl-data-compare" ,perl-data-compare)
5603 ("perl-data-uniqid" ,perl-data-uniqid)
5604 ("perl-datetime-format-builder" ,perl-datetime-format-builder)
5605 ("perl-datetime-calendar-julian" ,perl-datetime-calendar-julian)
41a01087 5606 ("perl-file-slurper" ,perl-file-slurper)
d4000680
RW
5607 ("perl-ipc-cmd" ,perl-ipc-cmd)
5608 ("perl-ipc-run3" ,perl-ipc-run3)
5609 ("perl-list-allutils" ,perl-list-allutils)
5610 ("perl-list-moreutils" ,perl-list-moreutils)
5611 ("perl-mozilla-ca" ,perl-mozilla-ca)
5612 ("perl-regexp-common" ,perl-regexp-common)
5613 ("perl-log-log4perl" ,perl-log-log4perl)
5614 ;; We cannot use perl-unicode-collate here, because otherwise the
5615 ;; hardcoded hashes in the tests would differ. See
5616 ;; https://mail-archive.com/debian-bugs-dist@lists.debian.org/msg1469249.html
5617 ;;("perl-unicode-collate" ,perl-unicode-collate)
5618 ("perl-unicode-normalize" ,perl-unicode-normalize)
5619 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
5620 ("perl-encode-eucjpascii" ,perl-encode-eucjpascii)
5621 ("perl-encode-jis2k" ,perl-encode-jis2k)
5622 ("perl-encode-hanextra" ,perl-encode-hanextra)
5623 ("perl-xml-libxml" ,perl-xml-libxml)
5624 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)
5625 ("perl-xml-libxslt" ,perl-xml-libxslt)
5626 ("perl-xml-writer" ,perl-xml-writer)
5627 ("perl-sort-key" ,perl-sort-key)
5628 ("perl-text-csv" ,perl-text-csv)
5629 ("perl-text-csv-xs" ,perl-text-csv-xs)
5630 ("perl-text-roman" ,perl-text-roman)
5631 ("perl-uri" ,perl-uri)
5632 ("perl-text-bibtex" ,perl-text-bibtex)
5633 ("perl-libwww" ,perl-libwww)
5634 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
5635 ("perl-business-isbn" ,perl-business-isbn)
5636 ("perl-business-issn" ,perl-business-issn)
5637 ("perl-business-ismn" ,perl-business-ismn)
5638 ("perl-lingua-translit" ,perl-lingua-translit)))
5639 (native-inputs
5640 `(("perl-config-autoconf" ,perl-config-autoconf)
5641 ("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
5642 ("perl-module-build" ,perl-module-build)
5643 ;; for tests
5644 ("perl-file-which" ,perl-file-which)
5645 ("perl-test-more" ,perl-test-most) ; FIXME: "more" would be sufficient
5646 ("perl-test-differences" ,perl-test-differences)))
5647 (home-page "http://biblatex-biber.sourceforge.net/")
5648 (synopsis "Backend for the BibLaTeX citation management tool")
5649 (description "Biber is a BibTeX replacement for users of biblatex. Among
5650other things it comes with full Unicode support.")
5651 (license license:artistic2.0)))
5652
231eae53
LC
5653(define-public rubber
5654 (package
5655 (name "rubber")
5656 (version "1.1")
5657 (source (origin
5658 (method url-fetch)
5659 (uri (list (string-append "https://launchpad.net/rubber/trunk/"
5660 version "/+download/rubber-"
5661 version ".tar.gz")
5662 (string-append "http://ebeffara.free.fr/pub/rubber-"
5663 version ".tar.gz")))
5664 (sha256
5665 (base32
5666 "1xbkv8ll889933gyi2a5hj7hhh216k04gn8fwz5lfv5iz8s34gbq"))))
5667 (build-system gnu-build-system)
5668 (arguments '(#:tests? #f)) ; no `check' target
5669 (inputs `(("texinfo" ,texinfo)
9bee5d6c 5670 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
231eae53
LC
5671 ("which" ,which)))
5672 (home-page "https://launchpad.net/rubber")
35b9e423 5673 (synopsis "Wrapper for LaTeX and friends")
231eae53
LC
5674 (description
5675 "Rubber is a program whose purpose is to handle all tasks related to the
5676compilation of LaTeX documents. This includes compiling the document itself,
5677of course, enough times so that all references are defined, and running BibTeX
5678to manage bibliographic references. Automatic execution of dvips to produce
5679PostScript documents is also included, as well as usage of pdfLaTeX to produce
5680PDF documents.")
5681 (license license:gpl2+)))
4791876c
RJ
5682
5683(define-public texmaker
5684 (package
5685 (name "texmaker")
585be42f 5686 (version "5.0.3")
4791876c
RJ
5687 (source (origin
5688 (method url-fetch)
5689 (uri (string-append "http://www.xm1math.net/texmaker/texmaker-"
5690 version ".tar.bz2"))
5691 (sha256
5692 (base32
585be42f 5693 "0vrj9w5lk3vf6138n5bz8phmy3xp5kv4dq1rgirghcf4hbxdyx30"))))
4791876c
RJ
5694 (build-system gnu-build-system)
5695 (arguments
5696 `(#:phases
5697 (modify-phases %standard-phases
5698 ;; Qt has its own configuration utility.
5699 (replace 'configure
5700 (lambda* (#:key outputs #:allow-other-keys)
5701 (let ((out (assoc-ref outputs "out")))
6c23ed9b
MW
5702 (invoke "qmake"
5703 (string-append "PREFIX=" out)
c36d9725 5704 (string-append "DESKTOPDIR=" out "/share/applications")
6c23ed9b 5705 (string-append "ICONDIR=" out "/share/pixmaps")
c36d9725 5706 (string-append "METAINFODIR=" out "/share/metainfo")
6c23ed9b 5707 "texmaker.pro")))))))
4791876c
RJ
5708 (inputs
5709 `(("poppler-qt5" ,poppler-qt5)
bd917486
TD
5710 ("qtbase" ,qtbase)
5711 ("qtscript" ,qtscript)
5712 ("qtwebkit" ,qtwebkit)
4791876c
RJ
5713 ("zlib" ,zlib)))
5714 (native-inputs
5715 `(("pkg-config" ,pkg-config)))
5716 (home-page "http://www.xm1math.net/texmaker/")
5717 (synopsis "LaTeX editor")
5718 (description "Texmaker is a program that integrates many tools needed to
5719develop documents with LaTeX, in a single application.")
5720 (license license:gpl2+)))
83457fe0 5721
83457fe0
JD
5722(define-public teximpatient
5723 (package
5724 (name "teximpatient")
5725 (version "2.4")
5726 (source (origin
4f2ee8e2 5727 (method url-fetch/tarbomb)
83457fe0
JD
5728 (uri (string-append "mirror://gnu/" name "/" name "-"
5729 version ".tar.gz"))
5730 (sha256
5731 (base32
5732 "0h56w22d99dh4fgld4ssik8ggnmhmrrbnrn1lnxi1zr0miphn1sd"))))
5733 (build-system gnu-build-system)
5734 (arguments
4f2ee8e2
RW
5735 `(#:tests? #f ; there are none
5736 #:phases
83457fe0 5737 (modify-phases %standard-phases
4f2ee8e2
RW
5738 (add-after 'unpack 'fix-packaging-error
5739 (lambda* (#:key inputs #:allow-other-keys)
5740 ;; This file should have been part of the tarball.
5741 (install-file (car
5742 (find-files
5743 (assoc-ref inputs "automake")
5744 "^install-sh$"))
5745 ".")
5746 ;; Remove generated file.
5747 (delete-file "book.pdf")
5748 #t)))))
83457fe0 5749 (native-inputs
4f2ee8e2
RW
5750 `(("texlive" ,(texlive-union (list texlive-latex-amsfonts
5751 texlive-fonts-amsfonts
5752 texlive-fonts-adobe-palatino
5753 texlive-fonts-adobe-zapfding
5754 texlive-fonts-knuth-lib
5755 texlive-fonts-mflogo-font
5756 texlive-generic-pdftex)))
83457fe0 5757 ("automake" ,automake)))
6fd52309 5758 (home-page "https://www.gnu.org/software/teximpatient/")
83457fe0
JD
5759 (synopsis "Book on TeX, plain TeX and Eplain")
5760 (description "@i{TeX for the Impatient} is a ~350 page book on TeX,
5761plain TeX, and Eplain, originally written by Paul Abrahams, Kathryn Hargreaves,
5762and Karl Berry.")
5763 (license license:fdl1.3+)))
ec40a050
DM
5764
5765(define-public lyx
5766 (package
5767 (name "lyx")
b17c8923 5768 (version "2.3.2-2")
ec40a050 5769 (source (origin
b17c8923 5770 (method url-fetch)
e5a03489
EF
5771 (uri (string-append "http://ftp.lyx.org/pub/lyx/stable/"
5772 (version-major+minor version) ".x/"
b17c8923
RW
5773 name "-" version ".tar.gz"))
5774 (sha256
5775 (base32
5776 "0vr0qwis6rhind6azfa270hqxci7rj8qb1kk5x6lm80mc34nvrqi"))
5777 (modules '((guix build utils)))
5778 (snippet
5779 '(begin
5780 (delete-file-recursively "3rdparty")
5781 #t))))
ec40a050
DM
5782 (build-system cmake-build-system)
5783 (arguments
5784 `(#:configure-flags `("-DLYX_USE_QT=QT5"
5785 "-DLYX_EXTERNAL_BOOST=1"
5786 "-DLYX_INSTALL=1"
5787 "-DLYX_RELEASE=1"
5788 ,(string-append "-DLYX_INSTALL_PREFIX="
5789 (assoc-ref %outputs "out")
5790 ;; Exact name and level is necessary.
e5a03489 5791 "/lyx" ,(version-major+minor version)))
ec40a050
DM
5792 #:phases
5793 (modify-phases %standard-phases
b17c8923
RW
5794 ;; See ;; https://www.lyx.org/trac/changeset/3a123b90af838b08680471d87170c38e56787df9/lyxgit
5795 (add-after 'unpack 'fix-compilation-with-boost-1.69
5796 (lambda _
5797 (substitute* "src/support/FileName.cpp"
5798 (("^template struct boost::detail::crc_table_t.*") ""))
5799 #t))
ec40a050
DM
5800 (add-after 'unpack 'patch-python
5801 (lambda* (#:key inputs #:allow-other-keys)
5802 (substitute* '("src/support/os.cpp")
b17c8923
RW
5803 (("\"python ")
5804 (string-append "\""
5805 (assoc-ref inputs "python")
5806 "/bin/python ")))
ec40a050
DM
5807 #t))
5808 (add-after 'patch-python 'patch-desktop-file
5809 (lambda* (#:key outputs #:allow-other-keys)
5810 (substitute* "lib/lyx.desktop.in"
b17c8923
RW
5811 (("Exec=")
5812 (string-append "Exec="
5813 (assoc-ref outputs "out")
5814 "/")))
ec40a050
DM
5815 #t))
5816 (add-before 'check 'setenv-check
5817 (lambda _
b17c8923
RW
5818 ;; Create missing file that would cause tests to fail.
5819 (with-output-to-file (string-append "../lyx-"
5820 ,version
5821 "/src/tests/check_layout.cmake")
5822 (const #t))
e5a03489
EF
5823 (setenv (string-append "LYX_DIR_"
5824 (string-join
5825 (string-split
5826 ,(version-major+minor version) #\-)) "x")
5827 (string-append (getcwd) "/../lyx-" ,version "/lib"))
ec40a050
DM
5828 #t))
5829 (add-after 'install 'install-symlinks
5830 (lambda* (#:key outputs #:allow-other-keys)
5831 (let ((out (assoc-ref outputs "out")))
5832 (mkdir-p (string-append out "/bin"))
e5a03489
EF
5833 (symlink (string-append "../lyx" ,(version-major+minor version)
5834 "/bin/lyx" ,(version-major+minor version))
5835 (string-append out "/bin/lyx" ,(version-major+minor version)))
ec40a050
DM
5836 #t))))))
5837 (inputs
5838 `(("boost" ,boost)
b17c8923 5839 ("hunspell" ,hunspell) ; Note: Could also use aspell instead.
ec40a050 5840 ("libx11" ,libx11)
b17c8923
RW
5841 ("mythes" ,mythes)
5842 ("python" ,python-2)
ec40a050
DM
5843 ("qtbase" ,qtbase)
5844 ("qtsvg" ,qtsvg)
5845 ("zlib" ,zlib)))
5846 (propagated-inputs
b17c8923
RW
5847 `(("texlive" ,(texlive-union (list texlive-fonts-ec)))))
5848 ;; FIXME: Python 3.7.0 cannot be used because the test infrastructure
5849 ;; "requires a bytes-like object, not 'str'". This may be fixed with
5850 ;; upgrades to Python.
ec40a050 5851 (native-inputs
b17c8923 5852 `(("python" ,python-2)
ec40a050
DM
5853 ("pkg-config" ,pkg-config)
5854 ("bc" ,bc)))
8960b2e6 5855 (home-page "https://www.lyx.org/")
ec40a050
DM
5856 (synopsis "Document preparation system with GUI")
5857 (description "LyX is a document preparation system. It excels at letting
5858you create complex technical and scientific articles with mathematics,
5859cross-references, bibliographies, indexes, etc. It is very good for working
5860with documents of any length in which the usual processing abilities are
5861required: automatic sectioning and pagination, spell checking and so forth.")
5862 (license license:gpl2+)))
7d50dff3
PN
5863
5864(define-public texlive-latex-media9
5865 (package
5866 (name "texlive-latex-media9")
5867 (version (number->string %texlive-revision))
5868 (source (origin
5869 (method svn-fetch)
5870 (uri (svn-reference
5871 (url (string-append "svn://www.tug.org/texlive/tags/"
5872 %texlive-tag "/Master/texmf-dist/"
5873 "/tex/latex/media9"))
5874 (revision %texlive-revision)))
5875 (file-name (string-append name "-" version "-checkout"))
5876 (sha256
5877 (base32
d4d9a1ec 5878 "0lhb2h5hxjq9alpk4r3gvg21pwyifs4ah6hqzp92k55mkp1xv73j"))))
7d50dff3
PN
5879 (build-system trivial-build-system)
5880 (arguments
5881 `(#:modules ((guix build utils))
5882 #:builder
5883 (begin
5884 (use-modules (guix build utils))
5885 (let ((target (string-append (assoc-ref %outputs "out")
5886 "/share/texmf-dist/tex/latex/media9")))
5887 (mkdir-p target)
5888 (copy-recursively (assoc-ref %build-inputs "source") target)
5889 #t))))
5890 (home-page "https://www.ctan.org/pkg/media9")
5891 (synopsis "Multimedia inclusion package with Adobe Reader-9/X compatibility")
5892 (description
5893 "The package provides an interface to embed interactive Flash (SWF) and 3D
5894objects (Adobe U3D & PRC), as well as video and sound files or streams in the
5895popular MP4, FLV and MP3 formats into PDF documents with Acrobat-9/X
5896compatibility. Playback of multimedia files uses the built-in Flash Player of
5897Adobe Reader and does, therefore, not depend on external plug-ins. Flash Player
5898supports the efficient H.264 codec for video compression.
5899
5900The package is based on the RichMedia Annotation, an Adobe addition to the PDF
5901specification. It replaces the now obsolete @code{movie15} package.")
5902 (license license:lppl)))
288c8c97
PN
5903
5904(define-public texlive-latex-ocgx2
5905 (package
5906 (name "texlive-latex-ocgx2")
5907 (version (number->string %texlive-revision))
5908 (source (origin
5909 (method svn-fetch)
5910 (uri (svn-reference
5911 (url (string-append "svn://www.tug.org/texlive/tags/"
5912 %texlive-tag "/Master/texmf-dist/"
5913 "/tex/latex/ocgx2"))
5914 (revision %texlive-revision)))
5915 (file-name (string-append name "-" version "-checkout"))
5916 (sha256
5917 (base32
d4d9a1ec 5918 "0zp00jg058djx8xp0xqwas92y3j97clkyd8z6pqr890yqy06myqb"))))
288c8c97
PN
5919 (build-system trivial-build-system)
5920 (arguments
5921 `(#:modules ((guix build utils))
5922 #:builder
5923 (begin
5924 (use-modules (guix build utils))
5925 (let ((target (string-append (assoc-ref %outputs "out")
5926 "/share/texmf-dist/tex/latex/ogcx2")))
5927 (mkdir-p target)
5928 (copy-recursively (assoc-ref %build-inputs "source") target)
5929 #t))))
5930 (home-page "https://www.ctan.org/pkg/ocgx2")
5931 (synopsis "Provide OCG (Optional Content Groups) support within a PDF document")
5932 (description
5933 "This package provides OCG (Optional Content Groups) support within a PDF
5934document.
5935
5936It re-implements the functionality of the @code{ocg}, @code{ocgx}, and
5937@code{ocg-p} packages and adds support for all known engines and back-ends
5938including:
5939
5940@itemize
5941@item LaTeX → dvips → @code{ps2pdf}/Distiller
5942@item (Xe)LaTeX(x) → @code{dvipdfmx}
5943@item pdfLaTeX and LuaLaTeX .
5944@end itemize
5945
5946It also ensures compatibility with the @code{media9} and @code{animate} packages.")
5947 (license license:lppl)))
b718793e
PN
5948
5949(define-public texlive-latex-ms
5950 (package
5951 (name "texlive-latex-ms")
5952 (version (number->string %texlive-revision))
5953 (source (origin
5954 (method svn-fetch)
5955 (uri (texlive-ref "latex" "ms"))
5956 (file-name (string-append name "-" version "-checkout"))
5957 (sha256
5958 (base32
5959 "0m4wx3yjb5al1qsv995z8fii8xxy96mcfihbnlx43lpgayiwz35s"))))
5960 (build-system texlive-build-system)
5961 (arguments
5962 '(#:tex-directory "latex/ms"
5963 #:tex-format "latex"))
5964 (home-page "https://ctan.org/pkg/ms")
5965 (synopsis "Various LATEX packages by Martin Schröder")
5966 (description
5967 "A bundle of LATEX packages by Martin Schröder; the collection comprises:
5968
5969@itemize
5970@item @command{count1to}, make use of fixed TEX counters;
5971@item @command{everysel}, set commands to execute every time a font is selected;
5972@item @command{everyshi}, set commands to execute whenever a page is shipped out;
5973@item @command{multitoc}, typeset the table of contents in multiple columns;
5974@item @command{prelim2e}, mark typeset pages as preliminary; and
5975@item @command{ragged2e}, typeset ragged text and allow hyphenation.
5976@end itemize\n")
5977 (license license:lppl1.3c+)))
707babdd
PN
5978
5979(define-public texlive-latex-needspace
5980 (package
5981 (name "texlive-latex-needspace")
5982 (version (number->string %texlive-revision))
5983 (source (origin
5984 (method svn-fetch)
5985 (uri (texlive-ref "latex" "needspace"))
5986 (file-name (string-append name "-" version "-checkout"))
5987 (sha256
5988 (base32
5989 "0kw80f5jh4gdpa2ka815abza3gr5z8b929w0745vrlc59pl0017y"))))
5990 (build-system texlive-build-system)
5991 (arguments
5992 '(#:tex-directory "latex/needspace"
5993 #:tex-format "latex"))
5994 (inputs
5995 `(("texlive-latex-filecontents" ,texlive-latex-filecontents)))
5996 (home-page "https://www.ctan.org/pkg/needspace")
5997 (synopsis "Insert pagebreak if not enough space")
5998 (description
5999 "Provides commands to disable pagebreaking within a given vertical
6000space. If there is not enough space between the command and the bottom of the
6001page, a new page will be started.")
6002 (license license:lppl)))
0e73c11b 6003
73635e3f
RW
6004(define-public texlive-latex-changepage
6005 (package
6006 (name "texlive-latex-changepage")
6007 (version (number->string %texlive-revision))
6008 (source
6009 (origin
6010 (method svn-fetch)
6011 (uri (texlive-ref "latex" "changepage"))
6012 (sha256
6013 (base32
6014 "1rpw8xg5p4jsyh236jma9dz3l29wjx4062f154b3wak5yjcxyxyb"))))
6015 (build-system texlive-build-system)
6016 (arguments
6017 '(#:tex-directory "latex/changepage"
6018 #:tex-format "latex"))
6019 (inputs
6020 `(("texlive-latex-filecontents" ,texlive-latex-filecontents)))
6021 (home-page "https://www.ctan.org/pkg/changepage")
6022 (synopsis "Margin adjustment and detection of odd/even pages")
6023 (description
6024 "The package provides commands to change the page layout in the middle of
6025a document, and to robustly check for typesetting on odd or even pages.
6026Instructions for use are at the end of the file. The package is an extraction
6027of code from the @code{memoir} class, whose user interface it shares.")
6028 (license license:lppl1.3+)))
6029
0e73c11b
PN
6030(define-public texlive-latex-eukdate
6031 (package
6032 (name "texlive-latex-eukdate")
6033 (version (number->string %texlive-revision))
6034 (source
6035 (origin
6036 (method svn-fetch)
6037 (uri (svn-reference
6038 (url (string-append "svn://www.tug.org/texlive/tags/"
6039 %texlive-tag "/Master/texmf-dist/"
6040 "/tex/latex/eukdate"))
6041 (revision %texlive-revision)))
6042 (file-name (string-append name "-" version "-checkout"))
6043 (sha256
6044 (base32
6045 "18xan116l8w47v560bkw6nbhkrml7g04xrlzk3jrpc7qsyf3n5fz"))))
6046 (build-system trivial-build-system)
6047 (arguments
6048 `(#:modules ((guix build utils))
6049 #:builder
6050 (begin
6051 (use-modules (guix build utils))
6052 (let ((target (string-append (assoc-ref %outputs "out")
6053 "/share/texmf-dist/tex/latex/eukdate")))
6054 (mkdir-p target)
6055 (copy-recursively (assoc-ref %build-inputs "source") target)
6056 #t))))
6057 (home-page "https://www.ctan.org/pkg/eukdate")
6058 (synopsis "UK format dates, with weekday")
6059 (description
6060 "The package is used to change the format of @code{\\today}’s date,
6061including the weekday, e.g., \"Saturday, 26 June 2008\", the 'UK format', which
6062is preferred in many parts of the world, as distinct from that which is used in
6063@code{\\maketitle} of the article class, \"June 26, 2008\", the 'US format'.")
6064 (license license:lppl)))
910d67fb
PN
6065
6066(define-public texlive-generic-ulem
6067 (package
6068 (name "texlive-generic-ulem")
6069 (version (number->string %texlive-revision))
6070 (source
6071 (origin
6072 (method svn-fetch)
6073 (uri (svn-reference
6074 (url (string-append "svn://www.tug.org/texlive/tags/"
6075 %texlive-tag "/Master/texmf-dist/"
6076 "/tex/generic/ulem"))
6077 (revision %texlive-revision)))
6078 (file-name (string-append name "-" version "-checkout"))
6079 (sha256
6080 (base32
6081 "1rzdniqq9zk39w8ch8ylx3ywh2mj87s4ivchrsk2b8nx06jyn797"))))
6082 (build-system trivial-build-system)
6083 (arguments
6084 `(#:modules ((guix build utils))
6085 #:builder
6086 (begin
6087 (use-modules (guix build utils))
6088 (let ((target (string-append (assoc-ref %outputs "out")
6089 "/share/texmf-dist/tex/generic/ulem")))
6090 (mkdir-p target)
6091 (copy-recursively (assoc-ref %build-inputs "source") target)
6092 #t))))
6093 (home-page "https://www.ctan.org/pkg/ulem")
6094 (synopsis "Underline text in TeX")
6095 (description
6096 "The package provides an @code{\\ul} (underline) command which will break
6097over line ends; this technique may be used to replace @code{\\em} (both in that
6098form and as the @code{\\emph} command), so as to make output look as if it comes
6099from a typewriter. The package also offers double and wavy underlining, and
6100striking out (line through words) and crossing out (/// over words).")
6101 (license license:lppl1.3c+)))
17ef5f1f
PN
6102
6103(define-public texlive-latex-pgf
6104 (package
6105 (name "texlive-latex-pgf")
6106 (version (number->string %texlive-revision))
6107 (source
6108 (origin
6109 (method svn-fetch)
6110 (uri (svn-reference
6111 (url (string-append "svn://www.tug.org/texlive/tags/"
6112 %texlive-tag "/Master/texmf-dist/"
6113 "/tex/latex/pgf"))
6114 (revision %texlive-revision)))
6115 (file-name (string-append name "-" version "-checkout"))
6116 (sha256
6117 (base32
6118 "1dq8p10pz8wn0vx412m7d7d5gj1syxly3yqdqvf7lv2xl8zndn5h"))))
6119 (build-system trivial-build-system)
6120 (native-inputs
6121 `(("texlive-latex-pgf-generic"
6122 ,(origin
6123 (method svn-fetch)
6124 (uri (svn-reference
6125 (url (string-append "svn://www.tug.org/texlive/tags/"
6126 %texlive-tag "/Master/texmf-dist/"
6127 "/tex/generic/pgf"))
6128 (revision %texlive-revision)))
6129 (file-name (string-append "texlive-latex-pgf-generic" version "-checkout"))
6130 (sha256
6131 (base32
6132 "0xkxw26sjzr5npjpzpr28yygwdbhzpdd0hsk80gjpidhcxmz393i"))))))
0fc71e4b
RW
6133 (propagated-inputs
6134 `(("texlive-latex-xcolor" ,texlive-latex-xcolor)))
17ef5f1f
PN
6135 (arguments
6136 `(#:modules ((guix build utils))
6137 #:builder
6138 (begin
6139 (use-modules (guix build utils))
6140 (let ((target-generic (string-append (assoc-ref %outputs "out")
6141 "/share/texmf-dist/tex/generic/pgf"))
6142 (target-latex (string-append (assoc-ref %outputs "out")
6143 "/share/texmf-dist/tex/latex/pgf")))
6144 (mkdir-p target-generic)
6145 (mkdir-p target-latex)
6146 (copy-recursively (assoc-ref %build-inputs "texlive-latex-pgf-generic") target-generic)
6147 (copy-recursively (assoc-ref %build-inputs "source") target-latex)
6148 #t))))
6149 (home-page "https://www.ctan.org/pkg/tikz")
6150 (synopsis "Create PostScript and PDF graphics in TeX")
6151 (description
6152 "PGF is a macro package for creating graphics. It is platform- and
6153format-independent and works together with the most important TeX backend
6154drivers, including pdfTeX and dvips. It comes with a user-friendly syntax layer
6155called TikZ.
6156
6157Its usage is similar to pstricks and the standard picture environment. PGF
6158works with plain (pdf-)TeX, (pdf-)LaTeX, and ConTeXt. Unlike pstricks, it can
6159produce either PostScript or PDF output.")
6160 (license license:lppl1.3c+)))
e7b2937d
PN
6161
6162(define-public texlive-latex-koma-script
6163 (package
6164 (name "texlive-latex-koma-script")
6165 (version (number->string %texlive-revision))
6166 (source (origin
6167 (method svn-fetch)
6168 (uri (svn-reference
6169 (url (string-append "svn://www.tug.org/texlive/tags/"
6170 %texlive-tag "/Master/texmf-dist/"
6171 "/tex/latex/koma-script"))
6172 (revision %texlive-revision)))
6173 (file-name (string-append name "-" version "-checkout"))
6174 (sha256
6175 (base32
d4d9a1ec 6176 "0nqwf0sr4mf3v9gqa6apv6ml2xhcdwax0vgyf12a672g7rpdyvgm"))))
e7b2937d
PN
6177 (build-system trivial-build-system)
6178 (arguments
6179 `(#:modules ((guix build utils)
6180 (ice-9 match))
6181 #:builder
6182 (begin
6183 (use-modules (guix build utils)
6184 (ice-9 match))
6185 (let ((root (string-append (assoc-ref %outputs "out")
6186 "/share/texmf-dist/"))
6187 (pkgs '(("source" . "tex/latex/koma-script"))))
6188 (for-each (match-lambda
6189 ((pkg . dir)
6190 (let ((target (string-append root dir)))
6191 (mkdir-p target)
6192 (copy-recursively (assoc-ref %build-inputs pkg)
6193 target))))
6194 pkgs)
6195 #t))))
6196 (home-page "https://www.ctan.org/pkg/koma-script")
6197 (synopsis "Bundle of versatile classes and packages")
6198 (description
6199 "The KOMA-Script bundle provides replacements for the article, report, and
6200book classes with emphasis on typography and versatility. There is also a
6201letter class.
6202
6203The bundle also offers:
6204
6205@itemize
6206@item a package for calculating type areas in the way laid down by the
6207typographer Jan Tschichold,
6208@item packages for easily changing and defining page styles,
6209@item a package scrdate for getting not only the current date but also the name
6210of the day, and
6211@item a package scrtime for getting the current time.
6212@end itemize
6213
6214All these packages may be used not only with KOMA-Script classes but also with
6215the standard classes.
6216
6217Since every package has its own version number, the version number quoted only
6218refers to the version of scrbook, scrreprt, scrartcl, scrlttr2 and
6219typearea (which are the main parts of the bundle).")
6220 (license license:lppl1.3+)))
893fbf12
RW
6221
6222(define-public texlive-generic-listofitems
6223 (package
6224 (name "texlive-generic-listofitems")
6225 (version (number->string %texlive-revision))
6226 (source (origin
6227 (method svn-fetch)
6228 (uri (svn-reference
6229 (url (string-append "svn://www.tug.org/texlive/tags/"
6230 %texlive-tag "/Master/texmf-dist/"
6231 "/tex/generic/listofitems"))
6232 (revision %texlive-revision)))
6233 (file-name (string-append name "-" version "-checkout"))
6234 (sha256
6235 (base32
d4d9a1ec 6236 "0hs28fc0v2l92ad9las9b8xcckyrdrwmyhcx1yzmbr6s7s6nvsx8"))))
893fbf12
RW
6237 (build-system trivial-build-system)
6238 (arguments
6239 `(#:modules ((guix build utils))
6240 #:builder
6241 (begin
6242 (use-modules (guix build utils))
6243 (let ((target (string-append (assoc-ref %outputs "out")
6244 "/share/texmf-dist/tex/generic/listofitems")))
6245 (mkdir-p target)
6246 (copy-recursively (assoc-ref %build-inputs "source") target)
6247 #t))))
6248 (home-page "https://www.ctan.org/pkg/listofitems")
88868575 6249 (synopsis "Grab items in lists using user-specified separation character")
893fbf12
RW
6250 (description
6251 "This package allows one to capture all the items of a list, for which
6252the parsing character has been selected by the user, and to access any of
6253these items with a simple syntax.")
6254 (license license:lppl1.3c+)))
1d0669f4
RW
6255
6256(define-public texlive-latex-readarray
6257 (package
6258 (name "texlive-latex-readarray")
6259 (version (number->string %texlive-revision))
6260 (source (origin
6261 (method svn-fetch)
6262 (uri (svn-reference
6263 (url (string-append "svn://www.tug.org/texlive/tags/"
6264 %texlive-tag "/Master/texmf-dist/"
6265 "/tex/latex/readarray"))
6266 (revision %texlive-revision)))
6267 (file-name (string-append name "-" version "-checkout"))
6268 (sha256
6269 (base32
6270 "0c53k180ivn1n7fz3ngvd2w1i5dw3kxml0n64vhki88xsylz7lxp"))))
6271 (build-system trivial-build-system)
6272 (arguments
6273 `(#:modules ((guix build utils))
6274 #:builder
6275 (begin
6276 (use-modules (guix build utils))
6277 (let ((target (string-append (assoc-ref %outputs "out")
6278 "/share/texmf-dist/tex/latex/readarray")))
6279 (mkdir-p target)
6280 (copy-recursively (assoc-ref %build-inputs "source") target)
6281 #t))))
6282 (propagated-inputs
6283 `(("texlive-generic-listofitems" ,texlive-generic-listofitems)))
6284 (home-page "https://www.ctan.org/pkg/readarray")
6285 (synopsis "Read, store and recall array-formatted data")
6286 (description
6287 "This package allows the user to input formatted data into elements of a
62882-D or 3-D array and to recall that data at will by individual cell number.
6289The data can be but need not be numerical in nature. It can be, for example,
6290formatted text.")
6291 (license license:lppl1.3)))
f50f343e
RW
6292
6293(define-public texlive-latex-verbatimbox
6294 (package
6295 (name "texlive-latex-verbatimbox")
6296 (version (number->string %texlive-revision))
6297 (source (origin
6298 (method svn-fetch)
6299 (uri (svn-reference
6300 (url (string-append "svn://www.tug.org/texlive/tags/"
6301 %texlive-tag "/Master/texmf-dist/"
6302 "/tex/latex/verbatimbox"))
6303 (revision %texlive-revision)))
6304 (file-name (string-append name "-" version "-checkout"))
6305 (sha256
6306 (base32
6307 "0qh1cgvfs463zsi2pjg490gj0mkjfdpfc381j10cbb5la304psna"))))
6308 (build-system trivial-build-system)
6309 (arguments
6310 `(#:modules ((guix build utils))
6311 #:builder
6312 (begin
6313 (use-modules (guix build utils))
6314 (let ((target (string-append (assoc-ref %outputs "out")
6315 "/share/texmf-dist/tex/latex/verbatimbox")))
6316 (mkdir-p target)
6317 (copy-recursively (assoc-ref %build-inputs "source") target)
6318 #t))))
6319 (propagated-inputs
6320 `(("texlive-latex-readarray" ,texlive-latex-readarray)))
6321 (home-page "https://www.ctan.org/pkg/verbatimbox")
6322 (synopsis "Deposit verbatim text in a box")
6323 (description
6324 "The package provides a @code{verbbox} environment to place its contents
6325into a globally available box, or into a box specified by the user. The
6326global box may then be used in a variety of situations (for example, providing
6327a replica of the @code{boxedverbatim} environment itself). A valuable use is
6328in places where the standard @code{verbatim} environment (which is based on a
6329@code{trivlist}) may not appear.")
6330 (license license:lppl1.3+)))
4348a059
RW
6331
6332(define-public texlive-latex-examplep
6333 (package
6334 (name "texlive-latex-examplep")
6335 (version (number->string %texlive-revision))
6336 (source (origin
6337 (method svn-fetch)
6338 (uri (svn-reference
6339 (url (string-append "svn://www.tug.org/texlive/tags/"
6340 %texlive-tag "/Master/texmf-dist/"
6341 "/tex/latex/examplep"))
6342 (revision %texlive-revision)))
6343 (file-name (string-append name "-" version "-checkout"))
6344 (sha256
6345 (base32
6346 "0fsvvmz68ij0zwfzrny6x13d92grxr4ap59lxgah4smbkccd6s27"))))
6347 (build-system trivial-build-system)
6348 (arguments
6349 `(#:modules ((guix build utils))
6350 #:builder
6351 (begin
6352 (use-modules (guix build utils))
6353 (let ((target (string-append (assoc-ref %outputs "out")
6354 "/share/texmf-dist/tex/latex/examplep")))
6355 (mkdir-p target)
6356 (copy-recursively (assoc-ref %build-inputs "source") target)
6357 #t))))
6358 (home-page "https://www.ctan.org/pkg/examplep")
6359 (synopsis "Verbatim phrases and listings in LaTeX")
6360 (description
6361 "Examplep provides sophisticated features for typesetting verbatim source
6362code listings, including the display of the source code and its compiled LaTeX
6363or METAPOST output side-by-side, with automatic width detection and enabled
6364page breaks (in the source), without the need for specifying the source twice.
6365Special care is taken that section, page and footnote numbers do not interfere
6366with the main document. For typesetting short verbatim phrases, a replacement
6367for the @code{\\verb} command is also provided in the package, which can be
6368used inside tables and moving arguments such as footnotes and section
6369titles.")
6370 ;; No version of the GPL is specified.
6371 (license license:gpl3+)))
547ab650
PN
6372
6373(define-public texlive-generic-xypic
6374 (package
6375 (name "texlive-generic-xypic")
6376 (version (number->string %texlive-revision))
6377 (source
6378 (origin
6379 (method svn-fetch)
6380 (uri (svn-reference
6381 (url (string-append "svn://www.tug.org/texlive/tags/"
6382 %texlive-tag "/Master/texmf-dist/"
6383 "/tex/generic/xypic"))
6384 (revision %texlive-revision)))
6385 (file-name (string-append name "-" version "-checkout"))
6386 (sha256
6387 (base32
6388 "1g5cyxwdfznq4lk9zl6fkjkapmhmwd2cm4m5aibxj20qgwnaggfz"))))
6389 (build-system trivial-build-system)
6390 (arguments
6391 `(#:modules ((guix build utils))
6392 #:builder
6393 (begin
6394 (use-modules (guix build utils))
6395 (let ((target (string-append (assoc-ref %outputs "out")
6396 "/share/texmf-dist/tex/generic/xypic")))
6397 (mkdir-p target)
6398 (copy-recursively (assoc-ref %build-inputs "source") target)
6399 #t))))
6400 (home-page "https://www.ctan.org/pkg/xypic")
6401 (synopsis "Flexible diagramming macros for TeX")
6402 (description
6403 "A package for typesetting a variety of graphs and diagrams with TeX.
6404Xy-pic works with most formats (including LaTeX, AMS-LaTeX, AMS-TeX, and plain
6405TeX).")
6406 (license license:gpl3+)))
1d9ce461
PN
6407
6408(define-public texlive-fonts-xypic
6409 (package
6410 (name "texlive-fonts-xypic")
6411 (version (number->string %texlive-revision))
6412 (source (origin
6413 (method svn-fetch)
6414 (uri (svn-reference
6415 (url (string-append "svn://www.tug.org/texlive/tags/"
6416 %texlive-tag "/Master/texmf-dist/"
6417 "/fonts/source/public/xypic"))
6418 (revision %texlive-revision)))
6419 (file-name (string-append name "-" version "-checkout"))
6420 (sha256
6421 (base32
6422 "0p20v1257kwsqnrk98cdhhiz2viv8l3ly4xay4by0an3j37m9xs3"))))
6423 (build-system trivial-build-system)
6424 (arguments
6425 `(#:modules ((guix build utils)
6426 (ice-9 match))
6427 #:builder
6428 (begin
6429 (use-modules (guix build utils)
6430 (ice-9 match))
6431 (let ((root (string-append (assoc-ref %outputs "out")
6432 "/share/texmf-dist/"))
6433 (pkgs '(("source" . "fonts/source/public/xypic")
6434 ("xypic-afm" . "fonts/afm/public/xypic")
6435 ("xypic-type1" . "fonts/type1/public/xypic")
6436 ("xypic-enc" . "fonts/enc/dvips/xypic"))))
6437 (for-each (match-lambda
6438 ((pkg . dir)
6439 (let ((target (string-append root dir)))
6440 (mkdir-p target)
6441 (copy-recursively (assoc-ref %build-inputs pkg)
6442 target))))
6443 pkgs)
6444 #t))))
6445 (native-inputs
6446 `(("xypic-afm"
6447 ,(origin
6448 (method svn-fetch)
6449 (uri (svn-reference
6450 (url (string-append "svn://www.tug.org/texlive/tags/"
6451 %texlive-tag "/Master/texmf-dist/"
6452 "/fonts/afm/public/xypic"))
6453 (revision %texlive-revision)))
6454 (file-name (string-append name "-afm-" version "-checkout"))
6455 (sha256
6456 (base32
6457 "149xdijxp8lw3s0qv2aqxxxyyn748z57dpr596rjvkqdffpnsddh"))))
6458 ("xypic-type1"
6459 ,(origin
6460 (method svn-fetch)
6461 (uri (svn-reference
6462 (url (string-append "svn://www.tug.org/texlive/tags/"
6463 %texlive-tag "/Master/texmf-dist/"
6464 "/fonts/type1/public/xypic"))
6465 (revision %texlive-revision)))
6466 (file-name (string-append name "-type1-" version "-checkout"))
6467 (sha256
6468 (base32
6469 "1bln89wib7g3hcv2jny3qi6jb73k9d2vbgx3wnnjwp3ryg0846if"))))
6470 ("xypic-enc"
6471 ,(origin
6472 (method svn-fetch)
6473 (uri (svn-reference
6474 (url (string-append "svn://www.tug.org/texlive/tags/"
6475 %texlive-tag "/Master/texmf-dist/"
6476 "/fonts/enc/dvips/xypic"))
6477 (revision %texlive-revision)))
6478 (file-name (string-append name "-enc-" version "-checkout"))
6479 (sha256
6480 (base32
6481 "0yi8vms3203l3p5slnhrrlzzp0f0jw77fkcvcaicrz2vmw9z99x7"))))))
6482 (home-page "https://www.ctan.org/pkg/xypic")
6483 (synopsis "Fonts for XY-pic")
6484 (description "This package provides the XY-pic fonts.")
6485 (license license:gpl3+)))
31595689
PN
6486
6487(define-public texlive-bibtex
6488 (package
6489 (name "texlive-bibtex")
6490 (version (number->string %texlive-revision))
6491 (source
6492 (origin
6493 (method svn-fetch)
6494 (uri (svn-reference
6495 (url (string-append "svn://www.tug.org/texlive/tags/"
6496 %texlive-tag "/Master/texmf-dist/"
6497 "/bibtex"))
6498 (revision %texlive-revision)))
6499 (file-name (string-append name "-" version "-checkout"))
6500 (sha256
6501 (base32
d4d9a1ec 6502 "0hnbs0s1znbn32hfcsyijl39z81sdb00jf092a4blqz421qs2mbv"))))
31595689
PN
6503 (build-system trivial-build-system)
6504 (arguments
6505 `(#:modules ((guix build utils))
6506 #:builder
6507 (begin
6508 (use-modules (guix build utils))
6509 (let ((target (string-append (assoc-ref %outputs "out")
6510 "/share/texmf-dist/bibtex")))
6511 (mkdir-p target)
6512 (copy-recursively (assoc-ref %build-inputs "source") target)
6513 #t))))
6514 (home-page "https://www.ctan.org/pkg/bibtex")
6515 (synopsis "Process bibliographies for LaTeX")
6516 (description
6517 "BibTeX allows the user to store his citation data in generic form, while
6518printing citations in a document in the form specified by a BibTeX style, to
6519be specified in the document itself (one often needs a LaTeX citation-style
6520package, such as @command{natbib} as well).")
6521 (license license:knuth)))
744b883e
PN
6522
6523(define-public texlive-fonts-charter
6524 (package
6525 (name "texlive-fonts-charter")
6526 (version (number->string %texlive-revision))
6527 (source (origin
6528 (method svn-fetch)
6529 (uri (svn-reference
6530 (url (string-append "svn://www.tug.org/texlive/tags/"
6531 %texlive-tag "/Master/texmf-dist/"
6532 "/fonts/type1/bitstrea/charter"))
6533 (revision %texlive-revision)))
6534 (file-name (string-append name "-" version "-checkout"))
6535 (sha256
6536 (base32
6537 "0yvib45xxff3jm5270zij4q888pivbc18cqs7lz4pqfhn1am4wnv"))))
6538 (build-system trivial-build-system)
6539 (arguments
6540 `(#:modules ((guix build utils)
6541 (ice-9 match))
6542 #:builder
6543 (begin
6544 (use-modules (guix build utils)
6545 (ice-9 match))
6546 (let ((root (string-append (assoc-ref %outputs "out")
6547 "/share/texmf-dist/"))
6548 (pkgs '(("source" . "fonts/type1/bitstrea/charter")
6549 ("charter-afm" . "fonts/afm/bitstrea/charter")
6550 ("charter-tfm" . "fonts/tfm/bitstrea/charter"))))
6551 (for-each (match-lambda
6552 ((pkg . dir)
6553 (let ((target (string-append root dir)))
6554 (mkdir-p target)
6555 (copy-recursively (assoc-ref %build-inputs pkg)
6556 target))))
6557 pkgs)
6558 #t))))
6559 (native-inputs
6560 `(("charter-afm"
6561 ,(origin
6562 (method svn-fetch)
6563 (uri (svn-reference
6564 (url (string-append "svn://www.tug.org/texlive/tags/"
6565 %texlive-tag "/Master/texmf-dist/"
6566 "/fonts/afm/bitstrea/charter"))
6567 (revision %texlive-revision)))
6568 (file-name (string-append name "-afm-" version "-checkout"))
6569 (sha256
6570 (base32
6571 "02nbkqrlr3vypnzslmr7dxg1353mmc0rl4ynx0s6qbvf313fq76a"))))
6572 ("charter-tfm"
6573 ,(origin
6574 (method svn-fetch)
6575 (uri (svn-reference
6576 (url (string-append "svn://www.tug.org/texlive/tags/"
6577 %texlive-tag "/Master/texmf-dist/"
6578 "/fonts/tfm/bitstrea/charter"))
6579 (revision %texlive-revision)))
6580 (file-name (string-append name "-tfm-" version "-checkout"))
6581 (sha256
6582 (base32
6583 "0j7ci9vprivbhac70aq0z7m23hqcpx1g0i3wp1k0h8ilhimj80xk"))))))
6584 (home-page "https://www.ctan.org/pkg/charter")
6585 (synopsis "Charter fonts for TeX")
6586 (description "A commercial text font donated for the common good. Support
6587for use with LaTeX is available in @code{freenfss}, part of
6588@command{psnfss}. ")
6589 (license (license:non-copyleft (string-append "http://mirrors.ctan.org/"
6590 "fonts/charter/readme.charter")))))
a5bfedb4
PN
6591
6592(define-public texlive-context-base
6593 (package
6594 (name "texlive-context-base")
6595 (version (number->string %texlive-revision))
6596 (source (origin
6597 (method svn-fetch)
6598 (uri (svn-reference
6599 (url (string-append "svn://www.tug.org/texlive/tags/"
6600 %texlive-tag "/Master/texmf-dist/"
6601 "/tex/context/base"))
6602 (revision %texlive-revision)))
6603 (file-name (string-append name "-" version "-checkout"))
6604 (sha256
6605 (base32
d4d9a1ec 6606 "0rlx4qqijms1n64gjx475kvip8l322fh7v17zkmwp1l1g0w3vlyz"))))
a5bfedb4
PN
6607 (build-system trivial-build-system)
6608 (arguments
6609 `(#:modules ((guix build utils))
6610 #:builder
6611 (begin
6612 (use-modules (guix build utils))
6613 (let ((target (string-append (assoc-ref %outputs "out")
6614 "/share/texmf-dist/tex/context/case")))
6615 (mkdir-p target)
6616 (copy-recursively (assoc-ref %build-inputs "source") target)
6617 #t))))
6618 (home-page "https://www.ctan.org/pkg/context")
6619 (synopsis "Full featured, parameter driven macro package for TeX")
6620 (description "A full featured, parameter driven macro package, which fully
6621supports advanced interactive documents. See the ConTeXt garden for a wealth
6622of support information.")
6623 (license license:gpl2+)))
63133706
RW
6624
6625(define-public texlive-latex-beamer
6626 (package
6627 (name "texlive-latex-beamer")
6628 (version (number->string %texlive-revision))
6629 (source (origin
6630 (method svn-fetch)
6631 (uri (svn-reference
6632 (url (string-append "svn://www.tug.org/texlive/tags/"
6633 %texlive-tag "/Master/texmf-dist/"
6634 "/tex/latex/beamer"))
6635 (revision %texlive-revision)))
6636 (file-name (string-append name "-" version "-checkout"))
6637 (sha256
6638 (base32
6639 "09y3qwbj0nckshvg9afgwcv9v3zdif1d7bnpzrggsa1fbr80mgk2"))))
6640 (build-system trivial-build-system)
6641 (outputs '("out" "doc"))
6642 (arguments
6643 `(#:modules ((guix build utils))
6644 #:builder
6645 (begin
6646 (use-modules (guix build utils))
6647 (let ((target (string-append (assoc-ref %outputs "out")
6648 "/share/texmf-dist/tex/latex/beamer"))
6649 (docs (string-append (assoc-ref %outputs "doc")
6650 "/share/texmf-dist/doc/latex/beamer/")))
6651 (mkdir-p target)
6652 (copy-recursively (assoc-ref %build-inputs "source") target)
6653
6654 (mkdir-p docs)
6655 (copy-recursively (assoc-ref %build-inputs "docs") docs)
6656 #t))))
6657 (propagated-inputs
6658 `(("texlive-latex-hyperref" ,texlive-latex-hyperref)
6659 ("texlive-latex-oberdiek" ,texlive-latex-oberdiek)
6660 ("texlive-latex-etoolbox" ,texlive-latex-etoolbox)
6661 ("texlive-latex-pgf" ,texlive-latex-pgf)))
6662 (native-inputs
6663 `(("docs"
6664 ,(origin
6665 (method svn-fetch)
6666 (uri (svn-reference
6667 (url (string-append "svn://www.tug.org/texlive/tags/"
6668 %texlive-tag "/Master/texmf-dist/"
6669 "/doc/latex/beamer"))
6670 (revision %texlive-revision)))
6671 (file-name (string-append name "-" version "-checkout"))
6672 (sha256
6673 (base32
6674 "102b18b9nw9dicqqgjwx0srh1mav8vh9wdvwayn741niza9hac23"))))))
6675 (home-page "https://www.ctan.org/pkg/beamer")
6676 (synopsis "LaTeX class for producing presentations and slides")
6677 (description "The beamer LaTeX class can be used for producing slides.
6678The class works in both PostScript and direct PDF output modes, using the
6679@code{pgf} graphics system for visual effects. Content is created in the
6680@code{frame} environment, and each frame can be made up of a number of slides
6681using a simple notation for specifying material to appear on each slide within
6682a frame. Short versions of title, authors, institute can also be specified as
6683optional parameters. Whole frame graphics are supported by plain frames. The
6684class supports @code{figure} and @code{table} environments, transparency
6685effects, varying slide transitions and animations.")
6686 ;; Code is dual licensed under GPLv2+ or LPPL1.3c+; documentation is
6687 ;; dual-licensed under either FDLv1.3+ or LPPL1.3c+.
6688 (license (list license:lppl1.3c+ license:gpl2+ license:fdl1.3+))))
cafd4d38
RW
6689
6690(define-public texlive-latex-xmpincl
6691 (package
6692 (name "texlive-latex-xmpincl")
6693 (version (number->string %texlive-revision))
6694 (source
6695 (origin
6696 (method svn-fetch)
6697 (uri (texlive-ref "latex" "xmpincl"))
6698 (sha256
6699 (base32
6700 "0lq3dfb4fsw955gjwllnk7cg00ciq5mva64mlpbva6g2jz117734"))))
6701 (build-system texlive-build-system)
6702 (arguments '(#:tex-directory "latex/xmpincl"))
6703 (home-page "http://www.ctan.org/pkg/xmpincl")
6704 (synopsis "Include eXtensible Metadata Platform data in pdfLaTeX")
6705 (description
6706 "The XMP (eXtensible Metadata platform) is a framework to add metadata to
6707digital material to enhance the workflow in publication. The essence is that
6708the metadata is stored in an XML file, and this XML stream is then embedded in
6709the file to which it applies.")
6710 (license license:gpl3+)))
f87dcb4d
RW
6711
6712(define-public texlive-latex-pdfx
6713 (package
6714 (name "texlive-latex-pdfx")
6715 (version (number->string %texlive-revision))
6716 (source
6717 (origin
6718 (method svn-fetch)
6719 (uri (texlive-ref "latex" "pdfx"))
6720 (sha256
6721 (base32
6722 "0ikxg8yzq78hy5b9x13d4nah46d0yvmwlqmdri06pygbx116dcac"))))
6723 (build-system texlive-build-system)
6724 (arguments
6725 '(#:tex-directory "latex/pdfx"
6726 #:phases
6727 (modify-phases %standard-phases
6728 (add-after 'unpack 'fix-encoding
6729 (lambda _
6730 (substitute* "pdfx.dtx"
6731 ((" .+umaczy") "umaczy"))
6732 #t))
6733 (add-before 'install 'install-tex-files
6734 (lambda* (#:key inputs outputs #:allow-other-keys)
6735 (let ((target (string-append (assoc-ref outputs "out")
6736 "/share/texmf-dist/tex/latex/pdfx")))
6737 (mkdir-p target)
6738 (copy-recursively (assoc-ref inputs "texlive-tex-pdfx") target)
6739 ;; Install the generated version in the "install" phase.
6740 (delete-file (string-append target "/pdfx.sty"))
6741 #t))))))
6742 (propagated-inputs
6743 `(("texlive-generic-pdftex" ,texlive-generic-pdftex)))
6744 (native-inputs
6745 `(("texlive-tex-pdfx"
6746 ,(origin
6747 (method svn-fetch)
6748 (uri (svn-reference
6749 (url (string-append "svn://www.tug.org/texlive/tags/"
6750 %texlive-tag "/Master/texmf-dist/"
6751 "/tex/latex/pdfx"))
6752 (revision %texlive-revision)))
6753 (file-name (string-append "texlive-tex-latex-pdfx-" version "-checkout"))
6754 (sha256
6755 (base32
6756 "14j1zsvqc59ims3sk34v6km8db6cimks28y5fcxcr5mi2ykvj4vf"))))))
6757 (home-page "https://www.ctan.org/pkg/pdfx")
6758 (synopsis "PDF/X and PDF/A support for pdfTeX, LuaTeX and XeTeX")
6759 (description
6760 "This package helps LaTeX users to create PDF/X, PFD/A and other
6761standards-compliant PDF documents with pdfTeX, LuaTeX and XeTeX.")
6762 (license license:lppl1.2+)))