gnu: texlive-latex-base: Declare a source file-name.
[jackhill/guix/guix.git] / gnu / packages / tex.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
6 ;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
9 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
10 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
11 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
12 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
13 ;;;
14 ;;; This file is part of GNU Guix.
15 ;;;
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
20 ;;;
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
25 ;;;
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29 (define-module (gnu packages tex)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system perl)
35 #:use-module (guix build-system trivial)
36 #:use-module (guix build-system texlive)
37 #:use-module (guix utils)
38 #:use-module (guix git-download)
39 #:use-module (guix svn-download)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages bash)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages fontutils)
45 #:use-module (gnu packages gd)
46 #:use-module (gnu packages ghostscript)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages icu4c)
49 #:use-module (gnu packages image)
50 #:use-module (gnu packages lua)
51 #:use-module (gnu packages multiprecision)
52 #:use-module (gnu packages pdf)
53 #:use-module (gnu packages perl)
54 #:use-module (gnu packages perl-check)
55 #:use-module (gnu packages pkg-config)
56 #:use-module (gnu packages python)
57 #:use-module (gnu packages qt)
58 #:use-module (gnu packages ruby)
59 #:use-module (gnu packages shells)
60 #:use-module (gnu packages base)
61 #:use-module (gnu packages web)
62 #:use-module (gnu packages xml)
63 #:use-module (gnu packages xorg)
64 #:use-module (gnu packages xdisorg)
65 #:autoload (gnu packages texinfo) (texinfo)
66 #:use-module (ice-9 ftw)
67 #:use-module (ice-9 match)
68 #:use-module ((srfi srfi-1) #:hide (zip)))
69
70 (define texlive-extra-src
71 (origin
72 (method url-fetch)
73 (uri "ftp://tug.org/historic/systems/texlive/2017/texlive-20170524-extra.tar.xz")
74 (sha256 (base32
75 "0zvd2zskk78ig114mfj24g15qys41hzqv59fmqpirdbgq9c9gr5g"))))
76
77 (define texlive-texmf-src
78 (origin
79 (method url-fetch)
80 (uri "ftp://tug.org/historic/systems/texlive/2017/texlive-20170524-texmf.tar.xz")
81 (sha256 (base32
82 "1v69y3kgkbk24f7s4dfkknwd317mqmck5jgpyb35wqgqfy5p0qrz"))))
83
84 (define-public texlive-bin
85 (package
86 (name "texlive-bin")
87 (version "20170524")
88 (source
89 (origin
90 (method url-fetch)
91 (uri (string-append "ftp://tug.org/historic/systems/texlive/2017/"
92 "texlive-" version "-source.tar.xz"))
93 (patches
94 (list
95 ;; This is required for compatibility with Poppler >= 0.58.
96 ;; See <http://tutex.tug.org/pipermail/tex-k/2017-September/002809.html>
97 ;; and <https://bugs.archlinux.org/task/55720> for some discussion.
98 (origin
99 (method url-fetch)
100 (uri (string-append "https://git.archlinux.org/svntogit/packages.git/plain"
101 "/trunk/texlive-poppler-0.59.patch?h=packages/texlive-bin"
102 "&id=ba2de374e2b21ecc4b85cc9777f2f15c4d356c61"))
103 (file-name "texlive-poppler-compat.patch")
104 (sha256
105 (base32
106 "1c4ikq4kxw48bi3i33bzpabrjvbk01fwjr2lz20gkc9kv8l0bg3n")))))
107 (sha256 (base32
108 "1amjrxyasplv4alfwcxwnw4nrx7dz2ydmddkq16k6hg90i9njq81"))))
109 (build-system gnu-build-system)
110 (inputs
111 `(("texlive-extra-src" ,texlive-extra-src)
112 ("cairo" ,cairo)
113 ("fontconfig" ,fontconfig)
114 ("fontforge" ,fontforge)
115 ("freetype" ,freetype)
116 ("gd" ,gd)
117 ("gmp" ,gmp)
118 ("ghostscript" ,ghostscript)
119 ("graphite2" ,graphite2)
120 ("harfbuzz" ,harfbuzz)
121 ("icu4c" ,icu4c)
122 ("libpaper" ,libpaper)
123 ("libpng" ,libpng)
124 ("libxaw" ,libxaw)
125 ("libxt" ,libxt)
126 ("mpfr" ,mpfr)
127 ("perl" ,perl)
128 ("pixman" ,pixman)
129 ("poppler" ,poppler)
130 ("potrace" ,potrace)
131 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
132 ("ruby" ,ruby)
133 ("tcsh" ,tcsh)
134 ("teckit" ,teckit)
135 ("zlib" ,zlib)
136 ("zziplib" ,zziplib)))
137 (native-inputs
138 `(("pkg-config" ,pkg-config)))
139 (arguments
140 `(#:out-of-source? #t
141 #:configure-flags
142 `("--disable-native-texlive-build"
143 ;; XXX: This is needed because recent Poppler requires C++11 or later.
144 ;; Remove after switch to GCC >= 6.
145 "CXXFLAGS=-std=gnu++11"
146 "--with-system-cairo"
147 "--with-system-freetype2"
148 "--with-system-gd"
149 "--with-system-gmp"
150 "--with-system-graphite2"
151 "--with-system-harfbuzz"
152 "--with-system-icu"
153 "--with-system-libgs"
154 "--with-system-libpaper"
155 "--with-system-libpng"
156 "--with-system-mpfr"
157 "--with-system-pixman"
158 "--with-system-poppler"
159 "--with-system-potrace"
160 "--with-system-teckit"
161 "--with-system-xpdf"
162 "--with-system-zlib"
163 "--with-system-zziplib")
164
165 ;; Disable tests on mips64/aarch64 to cope with a failure of luajiterr.test.
166 ;; XXX FIXME fix luajit properly on mips64 and aarch64.
167 #:tests? ,(let ((s (or (%current-target-system)
168 (%current-system))))
169 (not (or (string-prefix? "aarch64" s)
170 (string-prefix? "mips64" s))))
171 #:phases
172 (modify-phases %standard-phases
173 (add-after 'install 'postint
174 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
175 (let* ((out (assoc-ref outputs "out"))
176 (share (string-append out "/share"))
177 (texlive-extra (assoc-ref inputs "texlive-extra-src"))
178 (unpack (assoc-ref %standard-phases 'unpack))
179 (patch-source-shebangs
180 (assoc-ref %standard-phases 'patch-source-shebangs)))
181 ;; Create symbolic links for the latex variants and their
182 ;; man pages.
183 (with-directory-excursion (string-append out "/bin/")
184 (for-each symlink
185 '("pdftex" "pdftex" "xetex" "luatex")
186 '("latex" "pdflatex" "xelatex" "lualatex")))
187 (with-directory-excursion (string-append share "/man/man1/")
188 (symlink "luatex.1" "lualatex.1"))
189 ;; Unpack texlive-extra and install tlpkg.
190 (mkdir "texlive-extra")
191 (with-directory-excursion "texlive-extra"
192 (apply unpack (list #:source texlive-extra))
193 (apply patch-source-shebangs (list #:source texlive-extra))
194 (system* "mv" "tlpkg" share))))))))
195 (synopsis "TeX Live, a package of the TeX typesetting system")
196 (description
197 "TeX Live provides a comprehensive TeX document production system.
198 It includes all the major TeX-related programs, macro packages, and fonts
199 that are free software, including support for many languages around the
200 world.
201
202 This package contains the binaries.")
203 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
204 (home-page "https://www.tug.org/texlive/")))
205
206 (define-public texlive-dvips
207 (package
208 (name "texlive-dvips")
209 (version (number->string %texlive-revision))
210 (source (origin
211 (method svn-fetch)
212 (uri (svn-reference
213 (url (string-append "svn://www.tug.org/texlive/tags/"
214 %texlive-tag "/Master/texmf-dist/"
215 "/dvips"))
216 (revision %texlive-revision)))
217 (file-name (string-append name "-" version "-checkout"))
218 (sha256
219 (base32
220 "0fcy2hpapbj01ncpjj3v39yhr0jjxb6rm13qaxjjw66s3vydxls1"))))
221 (build-system trivial-build-system)
222 (arguments
223 `(#:modules ((guix build utils))
224 #:builder
225 (begin
226 (use-modules (guix build utils))
227 (let* ((root (string-append (assoc-ref %outputs "out")
228 "/share/texmf-dist"))
229 (dvips (string-append root "/dvips"))
230 (maps (string-append root "/fonts/map/dvips/tetex"))
231 (encs (string-append root "/fonts/enc/dvips/base")))
232 (mkdir-p dvips)
233 (copy-recursively (assoc-ref %build-inputs "source") dvips)
234 (mkdir-p maps)
235 (copy-recursively (assoc-ref %build-inputs "dvips-font-maps") maps)
236 (mkdir-p encs)
237 (copy-recursively (assoc-ref %build-inputs "dvips-base-enc") encs)
238 #t))))
239 (native-inputs
240 `(("dvips-font-maps"
241 ,(origin
242 (method svn-fetch)
243 (uri (svn-reference
244 (url (string-append "svn://www.tug.org/texlive/tags/"
245 %texlive-tag "/Master/texmf-dist/"
246 "/fonts/map/dvips/tetex"))
247 (revision %texlive-revision)))
248 (file-name (string-append "dvips-font-maps-" version "-checkout"))
249 (sha256
250 (base32
251 "100208pg7q6lj7swiq9p9287nn6b64bl62bnlaxpjni9y2kdrqy5"))))
252 ("dvips-base-enc"
253 ,(origin
254 (method svn-fetch)
255 (uri (svn-reference
256 (url (string-append "svn://www.tug.org/texlive/tags/"
257 %texlive-tag "/Master/texmf-dist/"
258 "/fonts/enc/dvips/base"))
259 (revision %texlive-revision)))
260 (file-name (string-append "dvips-base-enc-" version "-checkout"))
261 (sha256
262 (base32
263 "1xnf6ms0h87r55kxik4vicwr1907scj789lhqflqns8svvsli5iy"))))))
264 (home-page "https://www.ctan.org/pkg/dvips")
265 (synopsis "DVI to PostScript drivers")
266 (description "This package provides files needed for converting DVI files
267 to PostScript.")
268 ;; Various free software licenses apply to individual files.
269 (license (list license:lppl1.3c+
270 license:expat
271 license:lgpl3+))))
272
273 (define-public texlive-generic-unicode-data
274 (package
275 (name "texlive-generic-unicode-data")
276 (version (number->string %texlive-revision))
277 (source (origin
278 (method svn-fetch)
279 (uri (svn-reference
280 (url (string-append "svn://www.tug.org/texlive/tags/"
281 %texlive-tag "/Master/texmf-dist/"
282 "/tex/generic/unicode-data"))
283 (revision %texlive-revision)))
284 (file-name (string-append name "-" version "-checkout"))
285 (sha256
286 (base32
287 "0ivrhp6jz31pl4z841g4ws41lmvdiwz4sslmhf02inlib79gz6r2"))))
288 (build-system trivial-build-system)
289 (arguments
290 `(#:modules ((guix build utils))
291 #:builder
292 (begin
293 (use-modules (guix build utils))
294 (let ((target (string-append (assoc-ref %outputs "out")
295 "/share/texmf-dist/tex/generic/unicode-data")))
296 (mkdir-p target)
297 (copy-recursively (assoc-ref %build-inputs "source") target)
298 #t))))
299 (home-page "https://www.ctan.org/pkg/unicode-data")
300 (synopsis "Unicode data and loaders for TeX")
301 (description "This bundle provides generic access to Unicode Consortium
302 data for TeX use. It contains a set of text files provided by the Unicode
303 Consortium which are currently all from Unicode 8.0.0, with the exception of
304 @code{MathClass.txt} which is not currently part of the Unicode Character
305 Database. Accompanying these source data are generic TeX loader files
306 allowing this data to be used as part of TeX runs, in particular in building
307 format files. Currently there are two loader files: one for general character
308 set up and one for initializing XeTeX character classes as has been carried
309 out to date by @code{unicode-letters.tex}. ")
310 (license license:lppl1.3c+)))
311
312 (define-public texlive-generic-dehyph-exptl
313 (package
314 (name "texlive-generic-dehyph-exptl")
315 (version (number->string %texlive-revision))
316 (source (origin
317 (method svn-fetch)
318 (uri (svn-reference
319 (url (string-append "svn://www.tug.org/texlive/tags/"
320 %texlive-tag "/Master/texmf-dist/"
321 "/tex/generic/dehyph-exptl"))
322 (revision %texlive-revision)))
323 (file-name (string-append name "-" version "-checkout"))
324 (sha256
325 (base32
326 "1l9wgv99qq0ysvlxqpj4g8bl0dywbzra4g8m2kmpg2fb0i0hczap"))))
327 (build-system trivial-build-system)
328 (arguments
329 `(#:modules ((guix build utils))
330 #:builder
331 (begin
332 (use-modules (guix build utils))
333 (let ((target (string-append (assoc-ref %outputs "out")
334 "/share/texmf-dist/tex/generic/dehyph-exptl")))
335 (mkdir-p target)
336 (copy-recursively (assoc-ref %build-inputs "source") target)
337 #t))))
338 (home-page "http://projekte.dante.de/Trennmuster/WebHome")
339 (synopsis "Hyphenation patterns for German")
340 (description "The package provides experimental hyphenation patterns for
341 the German language, covering both traditional and reformed orthography. The
342 patterns can be used with packages Babel and hyphsubst from the Oberdiek
343 bundle.")
344 ;; Hyphenation patterns are under the Expat license; documentation is
345 ;; under LPPL.
346 (license (list license:expat license:lppl))))
347
348 (define-public texlive-generic-tex-ini-files
349 (package
350 (name "texlive-generic-tex-ini-files")
351 (version (number->string %texlive-revision))
352 (source (origin
353 (method svn-fetch)
354 (uri (svn-reference
355 (url (string-append "svn://www.tug.org/texlive/tags/"
356 %texlive-tag "/Master/texmf-dist/"
357 "/tex/generic/tex-ini-files"))
358 (revision %texlive-revision)))
359 (file-name (string-append name "-" version "-checkout"))
360 (sha256
361 (base32
362 "1wh42n1lmzcvi3g6mm31nm3yd5ha5bl260xqc444jg1m9fdp3wz5"))))
363 (build-system trivial-build-system)
364 (arguments
365 `(#:modules ((guix build utils))
366 #:builder
367 (begin
368 (use-modules (guix build utils))
369 (let ((target (string-append (assoc-ref %outputs "out")
370 "/share/texmf-dist/tex/generic/tex-ini-files")))
371 (mkdir-p target)
372 (copy-recursively (assoc-ref %build-inputs "source") target)
373 #t))))
374 (home-page "https://www.ctan.org/pkg/tex-ini-files")
375 (synopsis "Files for creating TeX formats")
376 (description "This bundle provides a collection of model \".ini\" files
377 for creating TeX formats. These files are commonly used to introduced
378 distribution-dependent variations in formats. They are also used to
379 allow existing format source files to be used with newer engines, for example
380 to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
381 (license license:public-domain)))
382
383 (define-public texlive-generic-hyph-utf8
384 (package
385 (name "texlive-generic-hyph-utf8")
386 (version (number->string %texlive-revision))
387 (source (origin
388 (method svn-fetch)
389 (uri (svn-reference
390 (url (string-append "svn://www.tug.org/texlive/tags/"
391 %texlive-tag "/Master/texmf-dist/"
392 "/tex/generic/hyph-utf8"))
393 (revision %texlive-revision)))
394 (file-name (string-append name "-" version "-checkout"))
395 (sha256
396 (base32
397 "0ghizcz7ps16dzfqf66wwg5i181assc6qsm0g7g5dbmp909931vi"))))
398 (build-system trivial-build-system)
399 (arguments
400 `(#:modules ((guix build utils))
401 #:builder
402 (begin
403 (use-modules (guix build utils))
404 (let ((target (string-append (assoc-ref %outputs "out")
405 "/share/texmf-dist/tex/generic/hyph-utf8")))
406 (mkdir-p target)
407 (copy-recursively (assoc-ref %build-inputs "source") target)
408 #t))))
409 (home-page "https://ctan.org/pkg/hyph-utf8")
410 (synopsis "Hyphenation patterns expressed in UTF-8")
411 (description "Modern native UTF-8 engines such as XeTeX and LuaTeX need
412 hyphenation patterns in UTF-8 format, whereas older systems require
413 hyphenation patterns in the 8-bit encoding of the font in use (such encodings
414 are codified in the LaTeX scheme with names like OT1, T2A, TS1, OML, LY1,
415 etc). The present package offers a collection of conversions of existing
416 patterns to UTF-8 format, together with converters for use with 8-bit fonts in
417 older systems. Since hyphenation patterns for Knuthian-style TeX systems are
418 only read at iniTeX time, it is hoped that the UTF-8 patterns, with their
419 converters, will completely supplant the older patterns.")
420 ;; Individual files each have their own license. Most of these files are
421 ;; independent hyphenation patterns.
422 (license (list license:lppl1.0+
423 license:lppl1.2+
424 license:lppl1.3
425 license:lppl1.3+
426 license:lppl1.3a+
427 license:lgpl2.1
428 license:lgpl2.1+
429 license:lgpl3+
430 license:gpl2+
431 license:gpl3+
432 license:mpl1.1
433 license:asl2.0
434 license:expat
435 license:bsd-3
436 license:cc0
437 license:public-domain
438 license:wtfpl2))))
439
440 (define-public texlive-metafont-base
441 (package
442 (name "texlive-metafont-base")
443 (version (number->string %texlive-revision))
444 (source (origin
445 (method svn-fetch)
446 (uri (svn-reference
447 (url (string-append "svn://www.tug.org/texlive/tags/"
448 %texlive-tag "/Master/texmf-dist/"
449 "/metafont"))
450 (revision %texlive-revision)))
451 (file-name (string-append name "-" version "-checkout"))
452 (sha256
453 (base32
454 "1yl4n8cn5xqk2nc22zgzq6ymd7bhm6xx1mz3azip7i3ki4bhb5q5"))))
455 (build-system gnu-build-system)
456 (arguments
457 `(#:tests? #f ; no test target
458 #:phases
459 (modify-phases %standard-phases
460 (delete 'configure)
461 (replace 'build
462 (lambda* (#:key inputs #:allow-other-keys)
463 (let ((cwd (getcwd)))
464 (setenv "MFINPUTS"
465 (string-append cwd "/base:"
466 cwd "/misc:"
467 cwd "/roex:"
468 cwd "/feynmf:"
469 cwd "/mfpic:"
470 cwd "/config")))
471 (mkdir "build")
472 (with-directory-excursion "build"
473 (zero? (system* "inimf" "mf.mf")))))
474 (replace 'install
475 (lambda* (#:key outputs #:allow-other-keys)
476 (let* ((out (assoc-ref outputs "out"))
477 (base (string-append out "/share/texmf-dist/web2c"))
478 (mf (string-append out "/share/texmf-dist/metafont/base")))
479 (mkdir-p base)
480 (mkdir-p mf)
481 (install-file "build/mf.base" base)
482 (copy-recursively "base" mf)
483 #t))))))
484 (native-inputs
485 `(("texlive-bin" ,texlive-bin)))
486 (home-page "https://www.ctan.org/pkg/metafont")
487 (synopsis "Metafont base files")
488 (description "This package provides the Metafont base files needed to
489 build fonts using the Metafont system.")
490 (license license:knuth)))
491
492 (define-public texlive-fontname
493 (package
494 (name "texlive-fontname")
495 (version (number->string %texlive-revision))
496 (source (origin
497 (method svn-fetch)
498 (uri (svn-reference
499 (url (string-append "svn://www.tug.org/texlive/tags/"
500 %texlive-tag "/Master/texmf-dist/"
501 "/fonts/map/fontname"))
502 (revision %texlive-revision)))
503 (file-name (string-append name "-" version "-checkout"))
504 (sha256
505 (base32
506 "0cssbzcx15221dynp5sii72qh4l18mwkr14n8w1xb19j8pbaqasz"))))
507 (build-system trivial-build-system)
508 (arguments
509 `(#:modules ((guix build utils))
510 #:builder
511 (begin
512 (use-modules (guix build utils))
513 (let ((target (string-append (assoc-ref %outputs "out")
514 "/share/texmf-dist/fonts/map/fontname")))
515 (mkdir-p target)
516 (copy-recursively (assoc-ref %build-inputs "source") target)
517 #t))))
518 (home-page "https://www.ctan.org/pkg/fontname")
519 (synopsis "Scheme for naming fonts in TeX")
520 (description "This is Fontname, a naming scheme for (the base part of)
521 external TeX font filenames. This makes at most eight-character names
522 from (almost) arbitrarily complex font names, thus helping portability of TeX
523 documents.")
524 (license license:public-domain)))
525
526 (define-public texlive-fonts-cm
527 (package
528 (name "texlive-fonts-cm")
529 (version (number->string %texlive-revision))
530 (source (origin
531 (method svn-fetch)
532 (uri (svn-reference
533 (url (string-append "svn://www.tug.org/texlive/tags/"
534 %texlive-tag "/Master/texmf-dist/"
535 "/fonts/source/public/cm"))
536 (revision %texlive-revision)))
537 (file-name (string-append name "-" version "-checkout"))
538 (sha256
539 (base32
540 "045k5b9rdmbxpy1a3006l1x96z1rd18vg3cwrvnld9bqybw5qz44"))))
541 (build-system gnu-build-system)
542 (arguments
543 `(#:modules ((guix build gnu-build-system)
544 (guix build utils)
545 (srfi srfi-1)
546 (srfi srfi-26))
547 #:tests? #f ; no tests
548 #:phases
549 (modify-phases %standard-phases
550 (delete 'configure)
551 (replace 'build
552 (lambda* (#:key inputs #:allow-other-keys)
553 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
554 ;; Tell mf where to find mf.base
555 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
556 ;; Tell mf where to look for source files
557 (setenv "MFINPUTS"
558 (string-append (getcwd) ":"
559 mf "/share/texmf-dist/metafont/base")))
560 (mkdir "build")
561 (every (lambda (font)
562 (format #t "building font ~a\n" font)
563 (zero? (system* "mf" "-progname=mf"
564 "-output-directory=build"
565 (string-append "\\"
566 "mode:=ljfour; "
567 "mag:=1; "
568 "batchmode; "
569 "input "
570 (basename font ".mf")))))
571 (find-files "." "cm(.*[0-9]+.*|inch)\\.mf$"))))
572 (replace 'install
573 (lambda* (#:key outputs #:allow-other-keys)
574 (let* ((out (assoc-ref outputs "out"))
575 (tfm (string-append
576 out "/share/texmf-dist/fonts/tfm/public/cm"))
577 (mf (string-append
578 out "/share/texmf-dist/fonts/source/public/cm")))
579 (for-each (cut install-file <> tfm)
580 (find-files "build" "\\.*"))
581 (for-each (cut install-file <> mf)
582 (find-files "." "\\.mf"))
583 #t))))))
584 (native-inputs
585 `(("texlive-bin" ,texlive-bin)
586 ("texlive-metafont-base" ,texlive-metafont-base)))
587 (home-page "https://www.ctan.org/pkg/cm")
588 (synopsis "Computer Modern fonts for TeX")
589 (description "This package provides the Computer Modern fonts by Donald
590 Knuth. The Computer Modern font family is a large collection of text,
591 display, and mathematical fonts in a range of styles, based on Monotype Modern
592 8A.")
593 (license license:knuth)))
594
595 (define-public texlive-fonts-knuth-lib
596 (package
597 (name "texlive-fonts-knuth-lib")
598 (version (number->string %texlive-revision))
599 (source (origin
600 (method svn-fetch)
601 (uri (svn-reference
602 (url (string-append "svn://www.tug.org/texlive/tags/"
603 %texlive-tag "/Master/texmf-dist/"
604 "/fonts/source/public/knuth-lib"))
605 (revision %texlive-revision)))
606 (file-name (string-append name "-" version "-checkout"))
607 (sha256
608 (base32
609 "0in9aqyi8jkyf9d16z0li50z5fpwj1iwgwm83gmvwqcf7chfs04y"))))
610 (build-system gnu-build-system)
611 (arguments
612 `(#:modules ((guix build gnu-build-system)
613 (guix build utils)
614 (srfi srfi-26))
615 #:tests? #f ; no tests
616 #:phases
617 (modify-phases %standard-phases
618 (delete 'configure)
619 (replace 'build
620 (lambda* (#:key inputs #:allow-other-keys)
621 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
622 ;; Tell mf where to find mf.base
623 (setenv "MFBASES"
624 (string-append mf "/share/texmf-dist/web2c"))
625 ;; Tell mf where to look for source files
626 (setenv "MFINPUTS"
627 (string-append (getcwd) ":"
628 mf "/share/texmf-dist/metafont/base")))
629 (mkdir "build")
630 (zero? (system* "mf" "-progname=mf"
631 "-output-directory=build"
632 (string-append "\\"
633 "mode:=ljfour; "
634 "mag:=1; "
635 "batchmode; "
636 "input manfnt")))))
637 (replace 'install
638 (lambda* (#:key outputs #:allow-other-keys)
639 (let* ((out (assoc-ref outputs "out"))
640 (tfm (string-append
641 out "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
642 (mf (string-append
643 out "/share/texmf-dist/fonts/source/public/knuth-lib")))
644 (for-each (cut install-file <> tfm)
645 (find-files "build" "\\.*"))
646 (for-each (cut install-file <> mf)
647 (find-files "." "\\.mf"))
648 #t))))))
649 (native-inputs
650 `(("texlive-bin" ,texlive-bin)
651 ("texlive-metafont-base" ,texlive-metafont-base)))
652 (home-page "https://www.ctan.org/pkg/knuth-lib")
653 (synopsis "Small library of METAFONT sources")
654 (description "This is a collection of core TeX and METAFONT macro files
655 from Donald Knuth, including the plain format, plain base, and the MF logo
656 fonts.")
657 (license license:knuth)))
658
659 (define-public texlive-fonts-latex
660 (package
661 (name "texlive-fonts-latex")
662 (version (number->string %texlive-revision))
663 (source (origin
664 (method svn-fetch)
665 (uri (svn-reference
666 (url (string-append "svn://www.tug.org/texlive/tags/"
667 %texlive-tag "/Master/texmf-dist/"
668 "/fonts/source/public/latex-fonts"))
669 (revision %texlive-revision)))
670 (file-name (string-append name "-" version "-checkout"))
671 (sha256
672 (base32
673 "0ypsm4xv9cw0jckk2qc7gi9hcmhf31mrg56pz3llyx3yd9vq2lps"))))
674 (build-system gnu-build-system)
675 (arguments
676 `(#:modules ((guix build gnu-build-system)
677 (guix build utils)
678 (srfi srfi-1)
679 (srfi srfi-26))
680 #:tests? #f ; no tests
681 #:phases
682 (modify-phases %standard-phases
683 (delete 'configure)
684 (replace 'build
685 (lambda* (#:key inputs #:allow-other-keys)
686 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
687 ;; Tell mf where to find mf.base
688 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
689 ;; Tell mf where to look for source files
690 (setenv "MFINPUTS"
691 (string-append (getcwd) ":"
692 mf "/share/texmf-dist/metafont/base:"
693 (assoc-ref inputs "texlive-fonts-cm")
694 "/share/texmf-dist/fonts/source/public/cm")))
695 (mkdir "build")
696 (every (lambda (font)
697 (format #t "building font ~a\n" font)
698 (zero? (system* "mf" "-progname=mf"
699 "-output-directory=build"
700 (string-append "\\"
701 "mode:=ljfour; "
702 "mag:=1; "
703 "batchmode; "
704 "input " font))))
705 '("icmcsc10" "icmex10" "icmmi8" "icmsy8" "icmtt8"
706 "ilasy8" "ilcmss8" "ilcmssb8" "ilcmssi8"
707 "lasy5" "lasy6" "lasy7" "lasy8" "lasy9" "lasy10" "lasyb10"
708 "lcircle10" "lcirclew10" "lcmss8" "lcmssb8" "lcmssi8"
709 "line10" "linew10"))))
710 (replace 'install
711 (lambda* (#:key outputs #:allow-other-keys)
712 (let* ((out (assoc-ref outputs "out"))
713 (tfm (string-append
714 out "/share/texmf-dist/fonts/tfm/public/latex-fonts"))
715 (mf (string-append
716 out "/share/texmf-dist/fonts/source/public/latex-fonts")))
717 (for-each (cut install-file <> tfm)
718 (find-files "build" "\\.*"))
719 (for-each (cut install-file <> mf)
720 (find-files "." "\\.mf"))
721 #t))))))
722 (native-inputs
723 `(("texlive-bin" ,texlive-bin)
724 ("texlive-metafont-base" ,texlive-metafont-base)
725 ("texlive-fonts-cm" ,texlive-fonts-cm)))
726 (home-page "https://www.ctan.org/pkg/latex-fonts")
727 (synopsis "Collection of fonts used in LaTeX distributions")
728 (description "This is a collection of fonts for use with standard LaTeX
729 packages and classes. It includes invisible fonts (for use with the slides
730 class), line and circle fonts (for use in the picture environment) and LaTeX
731 symbol fonts.")
732 (license license:lppl1.2+)))
733
734 (define-public texlive-fonts-amsfonts
735 (package
736 (name "texlive-fonts-amsfonts")
737 (version (number->string %texlive-revision))
738 (source (origin
739 (method svn-fetch)
740 (uri (svn-reference
741 (url (string-append "svn://www.tug.org/texlive/tags/"
742 %texlive-tag "/Master/texmf-dist/"
743 "/fonts/source/public/amsfonts"))
744 (revision %texlive-revision)))
745 (file-name (string-append name "-" version "-checkout"))
746 (sha256
747 (base32
748 "07h20rvpbdb4k72hzmjkyb29426zr9wxsfp6yd4ajbbpd3vx8grb"))))
749 (build-system gnu-build-system)
750 (arguments
751 `(#:modules ((guix build gnu-build-system)
752 (guix build utils)
753 (srfi srfi-1)
754 (srfi srfi-26))
755 #:tests? #f ; no tests
756 #:phases
757 (modify-phases %standard-phases
758 (delete 'configure)
759 (replace 'build
760 (lambda* (#:key inputs #:allow-other-keys)
761 (let ((mf (assoc-ref inputs "texlive-metafont-base"))
762 (cwd (getcwd)))
763 ;; Tell mf where to find mf.base
764 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
765 ;; Tell mf where to look for source files
766 (setenv "MFINPUTS"
767 (string-append cwd ":"
768 cwd "/cmextra:"
769 cwd "/cyrillic:"
770 cwd "/dummy:"
771 cwd "/symbols:"
772 mf "/share/texmf-dist/metafont/base:"
773 (assoc-ref inputs "texlive-fonts-cm")
774 "/share/texmf-dist/fonts/source/public/cm")))
775 (mkdir "build")
776 (every (lambda (font)
777 (format #t "building font ~a\n" (basename font ".mf"))
778 (with-directory-excursion (dirname font)
779 (zero? (system* "mf" "-progname=mf"
780 "-output-directory=../build"
781 (string-append "\\"
782 "mode:=ljfour; "
783 "mag:=1; "
784 "nonstopmode; "
785 "input "
786 (getcwd) "/"
787 (basename font ".mf"))))))
788 (find-files "." "[0-9]+\\.mf$"))))
789 (replace 'install
790 (lambda* (#:key outputs #:allow-other-keys)
791 (let* ((out (assoc-ref outputs "out"))
792 (tfm (string-append
793 out "/share/texmf-dist/fonts/tfm/public/amsfonts"))
794 (mf (string-append
795 out "/share/texmf-dist/fonts/source/public/amsfonts")))
796 (for-each (cut install-file <> tfm)
797 (find-files "build" "\\.*"))
798 (for-each (cut install-file <> mf)
799 (find-files "." "\\.mf"))
800 #t))))))
801 (native-inputs
802 `(("texlive-fonts-cm" ,texlive-fonts-cm)
803 ("texlive-metafont-base" ,texlive-metafont-base)
804 ("texlive-bin" ,texlive-bin)))
805 (home-page "https://www.ctan.org/pkg/amsfonts")
806 (synopsis "TeX fonts from the American Mathematical Society")
807 (description
808 "This package provides an extended set of fonts for use in mathematics,
809 including: extra mathematical symbols; blackboard bold letters (uppercase
810 only); fraktur letters; subscript sizes of bold math italic and bold Greek
811 letters; subscript sizes of large symbols such as sum and product; added sizes
812 of the Computer Modern small caps font; cyrillic fonts (from the University of
813 Washington); Euler mathematical fonts. All fonts are provided as Adobe Type 1
814 files, and all except the Euler fonts are provided as Metafont source. The
815 distribution also includes the canonical Type 1 versions of the Computer
816 Modern family of fonts. The Euler fonts are supported by separate packages;
817 details can be found in the documentation.")
818 (license license:silofl1.1)))
819
820 (define-public texlive-latex-amsfonts
821 (package
822 (name "texlive-latex-amsfonts")
823 (version (number->string %texlive-revision))
824 (source (origin
825 (method svn-fetch)
826 (uri (texlive-ref "latex" "amsfonts"))
827 (file-name (string-append name "-" version "-checkout"))
828 (sha256
829 (base32
830 "0slzfv5h2m03b2xvm2sasznz4azh6rgi069z161dja3l8rln79hm"))))
831 (build-system texlive-build-system)
832 (arguments '(#:tex-directory "latex/amsfonts"))
833 (native-inputs
834 `(("texlive-fonts-cm" ,texlive-fonts-cm)
835 ("texlive-metafont-base" ,texlive-metafont-base)))
836 (home-page "https://www.ctan.org/pkg/amsfonts")
837 (synopsis "TeX fonts from the American Mathematical Society")
838 (description
839 "This package provides basic LaTeX support for the symbol fonts provides
840 by the amsfonts package. It provides @code{amsfonts.sty}, with names of
841 individual symbols defined in @code{amssymb.sty}.")
842 (license license:silofl1.1)))
843
844 ;; This provides etex.src which is needed to build various formats, including
845 ;; luatex.fmt and pdflatex.fmt
846 (define-public texlive-tex-plain
847 (package
848 (name "texlive-tex-plain")
849 (version (number->string %texlive-revision))
850 (source (origin
851 (method svn-fetch)
852 (uri (svn-reference
853 (url (string-append "svn://www.tug.org/texlive/tags/"
854 %texlive-tag "/Master/texmf-dist/"
855 "/tex/plain"))
856 (revision %texlive-revision)))
857 (file-name (string-append name "-" version "-checkout"))
858 (sha256
859 (base32
860 "0mjgl3gscn3ps29yjambz1j9fg81ynnncb96vpprwx4xsijhsns0"))))
861 (build-system trivial-build-system)
862 (arguments
863 `(#:modules ((guix build utils))
864 #:builder
865 (begin
866 (use-modules (guix build utils))
867 (let ((target (string-append (assoc-ref %outputs "out")
868 "/share/texmf-dist/tex/plain")))
869 (mkdir-p target)
870 (copy-recursively (assoc-ref %build-inputs "source") target)
871 #t))))
872 (home-page "https://www.ctan.org/pkg/plain")
873 (synopsis "Plain TeX format and supporting files")
874 (description
875 "Contains files used to build the Plain TeX format, as described in the
876 TeXbook, together with various supporting files (some also discussed in the
877 book).")
878 (license license:knuth)))
879
880 (define-public texlive-latex-base
881 (let ((texlive-dir
882 (lambda (dir hash)
883 (origin
884 (method svn-fetch)
885 (uri (svn-reference
886 (url (string-append "svn://www.tug.org/texlive/tags/"
887 %texlive-tag "/Master/texmf-dist/"
888 dir))
889 (revision %texlive-revision)))
890 (file-name (string-append "texlive-generic-"
891 (last (string-split
892 (string-drop-right dir 1) #\/))
893 "-" (number->string %texlive-revision)
894 "-checkout"))
895 (sha256 (base32 hash))))))
896 (package
897 (name "texlive-latex-base")
898 (version (number->string %texlive-revision))
899 (source (origin
900 (method svn-fetch)
901 (uri (texlive-ref "latex" "base"))
902 (file-name (string-append name "-" version "-checkout"))
903 (sha256
904 (base32
905 "1h9pir2hz6i9avc4lrl733p3zf4rpkg8537x1zdbhs91hvhikw9k"))))
906 (build-system gnu-build-system)
907 (arguments
908 `(#:modules ((guix build gnu-build-system)
909 (guix build utils)
910 (ice-9 match)
911 (srfi srfi-1)
912 (srfi srfi-26))
913 #:tests? #f ; no tests
914 #:phases
915 (modify-phases %standard-phases
916 (delete 'configure)
917 (replace 'build
918 (lambda* (#:key inputs #:allow-other-keys)
919 ;; Find required fonts
920 (setenv "TFMFONTS"
921 (string-append (assoc-ref inputs "texlive-fonts-cm")
922 "/share/texmf-dist/fonts/tfm/public/cm:"
923 (assoc-ref inputs "texlive-fonts-latex")
924 "/share/texmf-dist/fonts/tfm/public/latex-fonts:"
925 (assoc-ref inputs "texlive-fonts-knuth-lib")
926 "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
927 (setenv "TEXINPUTS"
928 (string-append
929 (getcwd) ":"
930 (getcwd) "/build:"
931 (string-join
932 (append-map (match-lambda
933 ((_ . dir)
934 (find-files dir
935 (lambda (_ stat)
936 (eq? 'directory (stat:type stat)))
937 #:directories? #t
938 #:stat stat)))
939 inputs)
940 ":")))
941
942 ;; Create an empty texsys.cfg, because latex.ltx wants to include
943 ;; it. This file must exist and it's fine if it's empty.
944 (with-output-to-file "texsys.cfg"
945 (lambda _ (format #t "%")))
946
947 (mkdir "build")
948 (mkdir "web2c")
949 (and (zero? (system* "luatex" "-ini" "-interaction=batchmode"
950 "-output-directory=build"
951 "unpack.ins"))
952 (zero? (system* "tex" "-ini" "-interaction=batchmode"
953 "-output-directory=web2c"
954 "tex.ini"))
955 ;; LaTeX, pdfetex/pdftex, and XeTeX require e-TeX, which
956 ;; is enabled only in extended mode (activated with a
957 ;; leading asterisk). We should not use luatex here,
958 ;; because that would make the generated format files
959 ;; incompatible with any other TeX engine.
960 (every
961 (lambda (format)
962 (zero? (system* "latex" "-ini" "-interaction=batchmode"
963 "-output-directory=web2c"
964 "-translate-file=cp227.tcx"
965 (string-append "*" format ".ini"))))
966 '("latex"
967 "pdflatex"
968 "pdfetex"))
969 (every
970 (lambda (format)
971 (zero? (system* format "-ini" "-interaction=batchmode"
972 "-output-directory=web2c"
973 (string-append "*" format ".ini"))))
974 '("xetex"
975 "xelatex"))
976 (every
977 (lambda (format)
978 (zero? (system* "luatex" "-ini" "-interaction=batchmode"
979 "-output-directory=web2c"
980 (string-append format ".ini"))))
981 '("dviluatex" "dvilualatex" "luatex" "lualatex")))))
982 (replace 'install
983 (lambda* (#:key outputs #:allow-other-keys)
984 (let* ((out (assoc-ref outputs "out"))
985 (target (string-append
986 out "/share/texmf-dist/tex/latex/base"))
987 (web2c (string-append
988 out "/share/texmf-dist/web2c")))
989 (mkdir-p target)
990 (mkdir-p web2c)
991 (for-each delete-file (find-files "." "\\.(log|aux)$"))
992 (for-each (cut install-file <> target)
993 (find-files "build" ".*"))
994 (for-each (cut install-file <> web2c)
995 (find-files "web2c" ".*"))
996 ;; pdftex is really just the same as pdfetex, but since it
997 ;; doesn't have its own format file, we need to copy it.
998 (copy-file "web2c/pdfetex.fmt"
999 (string-append web2c "/pdftex.fmt"))
1000 #t))))))
1001 (native-inputs
1002 `(("texlive-bin" ,texlive-bin)
1003 ("texlive-generic-unicode-data" ,texlive-generic-unicode-data)
1004 ("texlive-generic-dehyph-exptl" ,texlive-generic-dehyph-exptl)
1005 ("texlive-generic-tex-ini-files" ,texlive-generic-tex-ini-files)
1006 ("texlive-latex-latexconfig"
1007 ,(texlive-dir "tex/latex/latexconfig/"
1008 "1zb3j49cj8p75yph6c8iysjp7qbdvghwf0mn9j0l7qq3qkbz2xaf"))
1009 ("texlive-generic-hyph-utf8" ,texlive-generic-hyph-utf8)
1010 ("texlive-generic-hyphen"
1011 ,(texlive-dir "tex/generic/hyphen/"
1012 "0xim36wybw2625yd0zwlp9m2c2xrcybw58gl4rih9nkph0wqwwhd"))
1013 ("texlive-generic-ruhyphen"
1014 ,(texlive-dir "tex/generic/ruhyphen/"
1015 "14rjkpl4zkjqs13rcf9kcd24mn2kx7i1jbdwxq8ds94bi66ylzsd"))
1016 ("texlive-generic-ukrhyph"
1017 ,(texlive-dir "tex/generic/ukrhyph/"
1018 "1cfwdg2rhbayl3w0x1xqd36d45zbc96f029myp13s7cb6kbmbppv"))
1019 ("texlive-generic-config"
1020 ,(texlive-dir "tex/generic/config/"
1021 "19vj088p4kkp6xll0141m4kl6ssgdzhs3g10i232khb07aqiag8s"))
1022 ("texlive-tex-plain" ,texlive-tex-plain)
1023 ("texlive-fonts-cm" ,texlive-fonts-cm)
1024 ("texlive-fonts-latex" ,texlive-fonts-latex)
1025 ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib)))
1026 (home-page "https://www.ctan.org/pkg/latex-base")
1027 (synopsis "Base sources of LaTeX")
1028 (description
1029 "This bundle comprises the source of LaTeX itself, together with several
1030 packages which are considered \"part of the kernel\". This bundle, together
1031 with the required packages, constitutes what every LaTeX distribution should
1032 contain.")
1033 (license license:lppl1.3c+))))
1034
1035 (define-public texlive-latex-filecontents
1036 (package
1037 (name "texlive-latex-filecontents")
1038 (version (number->string %texlive-revision))
1039 (source (origin
1040 (method svn-fetch)
1041 (uri (texlive-ref "latex" "filecontents"))
1042 (sha256
1043 (base32
1044 "0swkbxv8vg0yizadfnvrwjb4cj0pn34v9wm6v7wqq903fdav7k7q"))))
1045 (build-system texlive-build-system)
1046 (arguments '(#:tex-directory "latex/filecontents"))
1047 (home-page "https://www.ctan.org/pkg/filecontents")
1048 (synopsis "Extended filecontents and filecontents* environments")
1049 (description
1050 "LaTeX2e's @code{filecontents} and @code{filecontents*} environments
1051 enable a LaTeX source file to generate external files as it runs through
1052 LaTeX. However, there are two limitations of these environments: they refuse
1053 to overwrite existing files, and they can only be used in the preamble of a
1054 document. The filecontents package removes these limitations, letting you
1055 overwrite existing files and letting you use @code{filecontents} /
1056 @code{filecontents*} anywhere.")
1057 (license license:lppl1.3c+)))
1058
1059 (define-public texlive-generic-ifxetex
1060 (package
1061 (name "texlive-generic-ifxetex")
1062 (version (number->string %texlive-revision))
1063 (source (origin
1064 (method svn-fetch)
1065 (uri (texlive-ref "generic" "ifxetex"))
1066 (sha256
1067 (base32
1068 "0w2xj7n0szavj329kds09q626szkc378p3w0sk022q0ln4ksz86d"))))
1069 (build-system texlive-build-system)
1070 (arguments
1071 '(#:tex-directory "generic/ifxetex"
1072 #:tex-format "xelatex"))
1073 (inputs
1074 `(("texlive-latex-filecontents" ,texlive-latex-filecontents)))
1075 (home-page "https://www.ctan.org/pkg/ifxetex")
1076 (synopsis "Am I running under XeTeX?")
1077 (description
1078 "This is a simple package which provides an @code{\\ifxetex} conditional,
1079 so that other code can determine that it is running under XeTeX. The package
1080 requires the e-TeX extensions to the TeX primitive set.")
1081 (license license:lppl1.3c+)))
1082
1083 (define-public texlive-generic-epsf
1084 (package
1085 (name "texlive-generic-epsf")
1086 (version (number->string %texlive-revision))
1087 (source (origin
1088 (method svn-fetch)
1089 (uri (svn-reference
1090 (url (string-append "svn://www.tug.org/texlive/tags/"
1091 %texlive-tag "/Master/texmf-dist/"
1092 "/tex/generic/epsf"))
1093 (revision %texlive-revision)))
1094 (sha256
1095 (base32
1096 "14w3j81ympyvg8hkk9i1xgr8a0gfnfsb2ki8qqsk5pa051za1xcy"))))
1097 (build-system trivial-build-system)
1098 (arguments
1099 `(#:modules ((guix build utils))
1100 #:builder
1101 (begin
1102 (use-modules (guix build utils))
1103 (let ((target (string-append (assoc-ref %outputs "out")
1104 "/share/texmf-dist/tex/generic/epfs")))
1105 (mkdir-p target)
1106 (copy-recursively (assoc-ref %build-inputs "source") target)
1107 #t))))
1108 (home-page "https://www.ctan.org/pkg/epsf")
1109 (synopsis "Simple macros for EPS inclusion")
1110 (description
1111 "This package provides the original (and now obsolescent) graphics
1112 inclusion macros for use with dvips, still widely used by Plain TeX users (in
1113 particular). For LaTeX users, the package is nowadays (rather strongly)
1114 deprecated in favour of the more sophisticated standard LaTeX latex-graphics
1115 bundle of packages. (The latex-graphics bundle is also available to Plain TeX
1116 users, via its Plain TeX version.)")
1117 (license license:public-domain)))
1118
1119 (define-public texlive-latex-fancyvrb
1120 (package
1121 (name "texlive-latex-fancyvrb")
1122 (version (number->string %texlive-revision))
1123 (source (origin
1124 (method svn-fetch)
1125 (uri (texlive-ref "latex" "fancyvrb"))
1126 (sha256
1127 (base32
1128 "03l7140y031rr14h02i4z9zqsfvrbn7wzwxbjsrjcgrk6sdr71wv"))))
1129 (build-system texlive-build-system)
1130 (arguments
1131 '(#:tex-directory "latex/fancyvrb"
1132 ;; We exclude "fvrb-ex" to avoid a dependency on texlive-luaotfload and
1133 ;; thus texlive-luatex-lualibs.
1134 #:build-targets '("fancyvrb.ins")))
1135 (home-page "https://www.ctan.org/pkg/fancyvrb")
1136 (synopsis "Sophisticated verbatim text")
1137 (description
1138 "This package provides tools for the flexible handling of verbatim text
1139 including: verbatim commands in footnotes; a variety of verbatim environments
1140 with many parameters; ability to define new customized verbatim environments;
1141 save and restore verbatim text and environments; write and read files in
1142 verbatim mode; build \"example\" environments (showing both result and
1143 verbatim source).")
1144 (license license:lppl1.0+)))
1145
1146 (define-public texlive-latex-graphics
1147 (package
1148 (name "texlive-latex-graphics")
1149 (version (number->string %texlive-revision))
1150 (source (origin
1151 (method svn-fetch)
1152 (uri (texlive-ref "latex" "graphics"))
1153 (sha256
1154 (base32
1155 "07azyn0b1s49vbdlr6dmygrminxp72ndl24j1091hiiccvrjq3xc"))))
1156 (build-system texlive-build-system)
1157 (arguments
1158 '(#:tex-directory "latex/graphics"
1159 #:phases
1160 (modify-phases %standard-phases
1161 (add-after 'install 'install-config
1162 (lambda* (#:key inputs outputs #:allow-other-keys)
1163 (let ((cfg (assoc-ref inputs "graphics-cfg"))
1164 (target (string-append (assoc-ref outputs "out")
1165 "/share/texmf-dist/tex/latex/graphics-cfg")))
1166 (mkdir-p target)
1167 (install-file (string-append cfg "/graphics.cfg") target)
1168 (install-file (string-append cfg "/color.cfg") target)
1169 #t)))
1170 (add-after 'install 'install-defs
1171 (lambda* (#:key inputs outputs #:allow-other-keys)
1172 (let ((def (assoc-ref inputs "graphics-def"))
1173 (target (string-append (assoc-ref outputs "out")
1174 "/share/texmf-dist/tex/latex/graphics-def")))
1175 (mkdir-p target)
1176 (copy-recursively def target)
1177 #t))))))
1178 (native-inputs
1179 `(("graphics-cfg"
1180 ,(origin
1181 (method git-fetch)
1182 (uri (git-reference
1183 (url "https://github.com/latex3/graphics-cfg.git")
1184 (commit "19d1238af17df376cd46333b229579b0f7f3a41f")))
1185 (sha256
1186 (base32
1187 "12kbgbm52gmmgn8zajb74s8n5rvnxcfdvs3iyj8vcw5vrsw5i6mh"))))
1188 ("graphics-def"
1189 ,(origin
1190 (method svn-fetch)
1191 (uri (svn-reference
1192 (url (string-append "svn://www.tug.org/texlive/tags/"
1193 %texlive-tag "/Master/texmf-dist/"
1194 "/tex/latex/graphics-def"))
1195 (revision %texlive-revision)))
1196 (sha256
1197 (base32
1198 "0gi4qv6378nl84s8n1yx3hjqvv7r4lza7hpbymbl5rzwgw8qrnyb"))))))
1199 (home-page "https://www.ctan.org/pkg/latex-graphics")
1200 (synopsis "LaTeX standard graphics bundle")
1201 (description
1202 "This is a collection of LaTeX packages for producing color, including
1203 graphics (e.g. PostScript) files, and rotation and scaling of text in LaTeX
1204 documents. It comprises the packages color, graphics, graphicx, trig, epsfig,
1205 keyval, and lscape.")
1206 ;; The configuration files are released under CC0.
1207 (license (list license:lppl1.3c+
1208 license:cc0))))
1209
1210 (define-public texlive-latex-xcolor
1211 (package
1212 (name "texlive-latex-xcolor")
1213 (version (number->string %texlive-revision))
1214 (source (origin
1215 (method svn-fetch)
1216 (uri (texlive-ref "latex" "xcolor"))
1217 (sha256
1218 (base32
1219 "01n613s7bcrd2n4jfawm0k4nn2ny3aaifp2jjfif3lz4sbv31494"))))
1220 (build-system texlive-build-system)
1221 (arguments '(#:tex-directory "latex/xcolor"))
1222 (home-page "https://www.ctan.org/pkg/xcolor")
1223 (synopsis "Driver-independent color extensions for LaTeX and pdfLaTeX")
1224 (description
1225 "The package starts from the basic facilities of the colorcolor package,
1226 and provides easy driver-independent access to several kinds of color tints,
1227 shades, tones, and mixes of arbitrary colors. It allows a user to select a
1228 document-wide target color model and offers complete tools for conversion
1229 between eight color models. Additionally, there is a command for alternating
1230 row colors plus repeated non-aligned material (like horizontal lines) in
1231 tables.")
1232 (license license:lppl1.2+)))
1233
1234 (define-public texlive-latex-hyperref
1235 (package
1236 (name "texlive-latex-hyperref")
1237 (version "6.84a2")
1238 ;; The sources in the TeX Live SVN repository do not contain hluatex.dtx,
1239 ;; so we fetch the release from GitHub.
1240 (source (origin
1241 (method url-fetch)
1242 (uri (string-append "https://github.com/ho-tex/hyperref/"
1243 "archive/release-" version ".tar.gz"))
1244 (file-name (string-append name "-" version ".tar.gz"))
1245 (sha256
1246 (base32
1247 "1d3rmjgzh0025a1dza55zb6nzzlgd1y9snwx45wq1c1vf42m79h2"))))
1248 (build-system texlive-build-system)
1249 (arguments '(#:tex-directory "latex/hyperref"))
1250 (home-page "https://www.ctan.org/pkg/hyperref")
1251 (synopsis "Extensive support for hypertext in LaTeX")
1252 (description
1253 "The @code{hyperref} package is used to handle cross-referencing commands
1254 in LaTeX to produce hypertext links in the document. The package provides
1255 backends for the @code{\\special} set defined for HyperTeX DVI processors; for
1256 embedded @code{pdfmark} commands for processing by Acrobat
1257 Distiller (@code{dvips} and Y&Y's @code{dvipsone}); for Y&Y's @code{dviwindo};
1258 for PDF control within pdfTeX and @code{dvipdfm}; for TeX4ht; and for VTeX's
1259 pdf and HTML backends. The package is distributed with the @code{backref} and
1260 @code{nameref} packages, which make use of the facilities of @code{hyperref}.")
1261 (license license:lppl1.3+)))
1262
1263 (define-public texlive-latex-oberdiek
1264 (package
1265 (name "texlive-latex-oberdiek")
1266 (version (number->string %texlive-revision))
1267 (source (origin
1268 (method svn-fetch)
1269 (uri (texlive-ref "latex" "oberdiek"))
1270 (sha256
1271 (base32
1272 "0aswvsxgsn709xmvpcg50d2xl7vcy1ckdxb9c1cligqqfjjvviqf"))))
1273 (build-system texlive-build-system)
1274 (arguments
1275 '(#:tex-directory "latex/oberdiek"
1276 #:build-targets '("oberdiek.ins")
1277 #:phases
1278 (modify-phases %standard-phases
1279 ;; "ifpdf.ins" is not generated, so we need to process the dtx file.
1280 (add-after 'unpack 'do-not-process-ifpdf.ins
1281 (lambda _
1282 (substitute* "oberdiek.ins"
1283 (("ifpdf.ins") "ifpdf.dtx"))
1284 #t)))))
1285 (home-page "https://www.ctan.org/pkg/oberdiek")
1286 (synopsis "Bundle of packages submitted by Heiko Oberdiek")
1287 (description
1288 "The bundle comprises various LaTeX packages, providing among others:
1289 better accessibility support for PDF files; extensible chemists reaction
1290 arrows; record information about document class(es) used; and many more.")
1291 (license license:lppl1.3+)))
1292
1293 (define-public texlive-latex-tools
1294 (package
1295 (name "texlive-latex-tools")
1296 (version (number->string %texlive-revision))
1297 (source (origin
1298 (method svn-fetch)
1299 (uri (texlive-ref "latex" "tools"))
1300 (sha256
1301 (base32
1302 "052a0pch2k5zls5jlay9xxcf93rw3i60a2x28y3ip3rhbsv3xgiz"))))
1303 (build-system texlive-build-system)
1304 (arguments
1305 '(#:tex-directory "latex/tools"
1306 #:build-targets '("tools.ins")))
1307 (home-page "https://www.ctan.org/pkg/latex-tools")
1308 (synopsis "LaTeX standard tools bundle")
1309 (description
1310 "This package is a collection of (variously) simple tools provided as
1311 part of the LaTeX required tools distribution, comprising the following
1312 packages: afterpage, array, bm, calc, dcolumn, delarray, enumerate, fileerr,
1313 fontsmpl, ftnright, hhline, indentfirst, layout, longtable, multicol,
1314 rawfonts, showkeys, somedefs, tabularx, theorem, trace, varioref, verbatim,
1315 xr, and xspace.")
1316 (license license:lppl1.3+)))
1317
1318 (define-public texlive-latex-url
1319 (package
1320 (name "texlive-latex-url")
1321 (version (number->string %texlive-revision))
1322 (source (origin
1323 (method svn-fetch)
1324 (uri (svn-reference
1325 (url (string-append "svn://www.tug.org/texlive/tags/"
1326 %texlive-tag "/Master/texmf-dist/"
1327 "/tex/latex/url"))
1328 (revision %texlive-revision)))
1329 (sha256
1330 (base32
1331 "184s2543cwia5l7iibhlkl1ffbncfhjpv5p56zq0c15by5sghlac"))))
1332 (build-system trivial-build-system)
1333 (arguments
1334 `(#:modules ((guix build utils))
1335 #:builder
1336 (begin
1337 (use-modules (guix build utils))
1338 (let ((target (string-append (assoc-ref %outputs "out")
1339 "/share/texmf-dist/tex/latex/url")))
1340 (mkdir-p target)
1341 (copy-recursively (assoc-ref %build-inputs "source") target)
1342 #t))))
1343 (home-page "https://www.ctan.org/pkg/url")
1344 (synopsis "Verbatim with URL-sensitive line breaks")
1345 (description "The command @code{\\url} is a form of verbatim command that
1346 allows linebreaks at certain characters or combinations of characters, accepts
1347 reconfiguration, and can usually be used in the argument to another command.
1348 The command is intended for email addresses, hypertext links,
1349 directories/paths, etc., which normally have no spaces, so by default the
1350 package ignores spaces in its argument. However, a package option allows
1351 spaces, which is useful for operating systems where spaces are a common part
1352 of file names.")
1353 ;; The license header states that it is under LPPL version 2 or later, but
1354 ;; the latest version is 1.3c.
1355 (license license:lppl1.3c+)))
1356
1357 (define-public texlive-latex-l3kernel
1358 (package
1359 (name "texlive-latex-l3kernel")
1360 (version (number->string %texlive-revision))
1361 (source (origin
1362 (method svn-fetch)
1363 (uri (texlive-ref "latex" "l3kernel"))
1364 (sha256
1365 (base32
1366 "0r0wfk594j8wkdqhh21haimwsfq8x5jch4ldm21hkzk5dnmvpbg6"))))
1367 (build-system texlive-build-system)
1368 (arguments
1369 '(#:tex-directory "latex/l3kernel"))
1370 (home-page "https://www.ctan.org/pkg/l3kernel")
1371 (synopsis "LaTeX3 programmers’ interface")
1372 (description
1373 "The l3kernel bundle provides an implementation of the LaTeX3
1374 programmers’ interface, as a set of packages that run under LaTeX 2e. The
1375 interface provides the foundation on which the LaTeX3 kernel and other future
1376 code are built: it is an API for TeX programmers. The packages are set up so
1377 that the LaTeX3 conventions can be used with regular LaTeX 2e packages.")
1378 (license license:lppl1.3c+)))
1379
1380 (define-public texlive-latex-l3packages
1381 (package
1382 (name "texlive-latex-l3packages")
1383 (version (number->string %texlive-revision))
1384 (source (origin
1385 (method svn-fetch)
1386 (uri (texlive-ref "latex" "l3packages"))
1387 (sha256
1388 (base32
1389 "16jplkvzdysfssijq9l051nsks65c2nrarsl17k8gjhc28yznj8y"))))
1390 (build-system texlive-build-system)
1391 (arguments
1392 '(#:tex-directory "latex/l3packages"
1393 #:phases
1394 (modify-phases %standard-phases
1395 ;; All package sources are in sub-directories, so we need to add them
1396 ;; to TEXINPUTS.
1397 (add-after 'unpack 'set-TEXINPUTS
1398 (lambda _
1399 (let ((cwd (getcwd)))
1400 (setenv "TEXINPUTS"
1401 (string-append cwd "/l3keys2e:"
1402 cwd "/xparse:"
1403 cwd "/xfrac:"
1404 cwd "/xfp:"
1405 cwd "/xtemplate")))
1406 #t)))))
1407 (inputs
1408 `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel)))
1409 (home-page "https://www.ctan.org/pkg/l3packages")
1410 (synopsis "High-level LaTeX3 concepts")
1411 (description
1412 "This bundle holds prototype implementations of concepts for a LaTeX
1413 designer interface, to be used with the experimental LaTeX kernel as
1414 programming tools and kernel sup­port. Packages provided in this release are:
1415
1416 @enumerate
1417 @item l3keys2e, which makes the facilities of the kernel module l3keys
1418 available for use by LaTeX 2e packages;
1419 @item xfrac, which provides flexible splitlevel fractions;
1420 @item xparse, which provides a high-level interface for declaring document
1421 commands; and
1422 @item xtemplate, which provides a means of defining generic functions using a
1423 key-value syntax.
1424 @end enumerate\n")
1425 (license license:lppl1.3c+)))
1426
1427 (define-public texlive-latex-fontspec
1428 (package
1429 (name "texlive-latex-fontspec")
1430 (version (number->string %texlive-revision))
1431 (source (origin
1432 (method svn-fetch)
1433 (uri (texlive-ref "latex" "fontspec"))
1434 (sha256
1435 (base32
1436 "1rx43y5xmjqvc27pjdnmqwp4pcw3czcfd6nfpmzc1gnqfl1hlc0q"))))
1437 (build-system texlive-build-system)
1438 (arguments
1439 '(#:tex-directory "latex/fontspec"
1440 #:build-targets '("fontspec.dtx")))
1441 (inputs
1442 `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel)))
1443 (home-page "https://www.ctan.org/pkg/fontspec")
1444 (synopsis "Advanced font selection in XeLaTeX and LuaLaTeX")
1445 (description
1446 "Fontspec is a package for XeLaTeX and LuaLaTeX. It provides an
1447 automatic and unified interface to feature-rich AAT and OpenType fonts through
1448 the NFSS in LaTeX running on XeTeX or LuaTeX engines. The package requires
1449 the l3kernel and xparse bundles from the LaTeX 3 development team.")
1450 (license license:lppl1.3+)))
1451
1452 ;; The SVN directory contains little more than a dtx file that generates three
1453 ;; of the many lua files that should be installed as part of this package.
1454 ;; This is why we take the release from GitHub instead.
1455 (define-public texlive-luatex-lualibs
1456 (package
1457 (name "texlive-luatex-lualibs")
1458 (version "2.5")
1459 (source (origin
1460 (method url-fetch)
1461 (uri (string-append "https://github.com/lualatex/lualibs/"
1462 "releases/download/v"
1463 version "/lualibs.zip"))
1464 (sha256
1465 (base32
1466 "1xx9blvrmx9hyhrl345lpai9m6xxnw997261a1ahn1bm5r2j5fqy"))))
1467 (build-system gnu-build-system)
1468 (arguments
1469 `(#:make-flags
1470 (list (string-append "DESTDIR="
1471 (assoc-ref %outputs "out")
1472 "/share/texmf-dist"))
1473 #:phases
1474 (modify-phases %standard-phases
1475 (delete 'configure))))
1476 (native-inputs
1477 `(("texlive-bin" ,texlive-bin)
1478 ("unzip" ,unzip)
1479 ("zip" ,zip)))
1480 (home-page "https://github.com/lualatex/lualibs")
1481 (synopsis "Lua modules for general programming (in the (La)TeX world)")
1482 (description
1483 "Lualibs is a collection of Lua modules useful for general programming.
1484 The bundle is based on Lua modules shipped with ConTeXt, and made available in
1485 this bundle for use independent of ConTeXt.")
1486 ;; GPL version 2 only
1487 (license license:gpl2)))
1488
1489 (define-public texlive-latex-amsmath
1490 (package
1491 (name "texlive-latex-amsmath")
1492 (version (number->string %texlive-revision))
1493 (source (origin
1494 (method svn-fetch)
1495 (uri (texlive-ref "latex" "amsmath"))
1496 (sha256
1497 (base32
1498 "178ywjpdlv78qmfzqdyn6gy14620zjsn2q9wap76fbr9s4hw6dba"))))
1499 (build-system texlive-build-system)
1500 (arguments '(#:tex-directory "latex/amsmath"))
1501 (home-page "https://www.ctan.org/pkg/amsmath")
1502 (synopsis "AMS mathematical facilities for LaTeX")
1503 (description
1504 "This is the principal package in the AMS-LaTeX distribution. It adapts
1505 for use in LaTeX most of the mathematical features found in AMS-TeX; it is
1506 highly recommended as an adjunct to serious mathematical typesetting in LaTeX.
1507 When amsmath is loaded, AMS-LaTeX packages @code{amsbsyamsbsy} (for bold
1508 symbols), @code{amsopnamsopn} (for operator names) and
1509 @code{amstextamstext} (for text embedded in mathematics) are also loaded.
1510 This package is part of the LaTeX required distribution; however, several
1511 contributed packages add still further to its appeal; examples are
1512 @code{empheqempheq}, which provides functions for decorating and highlighting
1513 mathematics, and @code{ntheoremntheorem}, for specifying theorem (and similar)
1514 definitions.")
1515 (license license:lppl1.3c+)))
1516
1517 (define-public texlive-latex-amscls
1518 (package
1519 (name "texlive-latex-amscls")
1520 (version (number->string %texlive-revision))
1521 (source (origin
1522 (method svn-fetch)
1523 (uri (texlive-ref "latex" "amscls"))
1524 (sha256
1525 (base32
1526 "0jmcr37mcdi7drczppvr6lmz5d5yd9m67ii79gp2nglg1xpw934j"))))
1527 (build-system texlive-build-system)
1528 (arguments
1529 `(#:tex-directory "latex/amscls"))
1530 (home-page "https://www.ctan.org/pkg/amscls")
1531 (synopsis "AMS document classes for LaTeX")
1532 (description
1533 "This bundle contains three AMS classes: @code{amsartamsart} (for writing
1534 articles for the AMS), @code{amsbookamsbook} (for books) and
1535 @code{amsprocamsproc} (for proceedings), together with some supporting
1536 material. The material is made available as part of the AMS-LaTeX
1537 distribution.")
1538 (license license:lppl1.3c+)))
1539
1540 (define-public texlive-latex-babel
1541 (package
1542 (name "texlive-latex-babel")
1543 (version (number->string %texlive-revision))
1544 (source (origin
1545 (method svn-fetch)
1546 (uri (texlive-ref "latex" "babel"))
1547 (sha256
1548 (base32
1549 "1n3i5adsyy7jw0imnzrm2i8wkf73i3mjk9h3ic8cb9cd19i4r9r3"))))
1550 (build-system texlive-build-system)
1551 (arguments
1552 '(#:tex-directory "generic/babel"
1553 #:phases
1554 (modify-phases %standard-phases
1555 ;; This package tries to produce babel.aux twice but refuses to
1556 ;; overwrite the first one.
1557 (add-before 'build 'fix-ins
1558 (lambda _
1559 (substitute* "babel.ins"
1560 (("askonceonly") "askforoverwritefalse"))
1561 #t)))))
1562 (home-page "https://www.ctan.org/pkg/babel")
1563 (synopsis "Multilingual support for Plain TeX or LaTeX")
1564 (description
1565 "The package manages culturally-determined typographical (and other)
1566 rules, and hyphenation patterns for a wide range of languages. A document may
1567 select a single language to be supported, or it may select several, in which
1568 case the document may switch from one language to another in a variety of
1569 ways. Babel uses contributed configuration files that provide the detail of
1570 what has to be done for each language. Users of XeTeX are advised to use the
1571 polyglossia package rather than Babel.")
1572 (license license:lppl1.3+)))
1573
1574 (define-public texlive-generic-babel-english
1575 (package
1576 (name "texlive-generic-babel-english")
1577 (version (number->string %texlive-revision))
1578 (source (origin
1579 (method svn-fetch)
1580 (uri (texlive-ref "generic" "babel-english"))
1581 (file-name (string-append name "-" version "-checkout"))
1582 (sha256
1583 (base32
1584 "1s404wbx91z5w65hm024kyl4h56zsa096irx18vsx8jvlmwsr5wc"))))
1585 (build-system texlive-build-system)
1586 (arguments '(#:tex-directory "generic/babel-english"))
1587 (home-page "https://www.ctan.org/pkg/babel-english")
1588 (synopsis "Babel support for English")
1589 (description
1590 "This package provides the language definition file for support of
1591 English in @code{babel}. Care is taken to select British hyphenation patterns
1592 for British English and Australian text, and default (\"american\") patterns
1593 for Canadian and USA text.")
1594 (license license:lppl1.3+)))
1595
1596 (define-public texlive-latex-cyrillic
1597 (package
1598 (name "texlive-latex-cyrillic")
1599 (version (number->string %texlive-revision))
1600 (source (origin
1601 (method svn-fetch)
1602 (uri (texlive-ref "latex" "cyrillic"))
1603 (sha256
1604 (base32
1605 "1mdhl35hwas68ki56qqngzar37dwv4mm64l2canihr255bz34lbv"))))
1606 (build-system texlive-build-system)
1607 (arguments
1608 '(#:tex-directory "latex/cyrillic"))
1609 (home-page "https://www.ctan.org/pkg/latex-cyrillic")
1610 (synopsis "Support for Cyrillic fonts in LaTeX")
1611 (description
1612 "This bundle of macros files provides macro support (including font
1613 encoding macros) for the use of Cyrillic characters in fonts encoded under the
1614 T2* and X2 encodings. These encodings cover (between them) pretty much every
1615 language that is written in a Cyrillic alphabet.")
1616 (license license:lppl1.3c+)))
1617
1618 (define-public texlive-latex-psnfss
1619 (package
1620 (name "texlive-latex-psnfss")
1621 (version (number->string %texlive-revision))
1622 (source (origin
1623 (method svn-fetch)
1624 (uri (texlive-ref "latex" "psnfss"))
1625 (sha256
1626 (base32
1627 "1920dcq8613yzprasbg80fh4fcjcidvvl54wkx438nimyxcri7qz"))))
1628 (build-system texlive-build-system)
1629 (arguments '(#:tex-directory "latex/psnfss"))
1630 (home-page "https://www.ctan.org/pkg/psnfss")
1631 (synopsis "Font support for common PostScript fonts")
1632 (description
1633 "The PSNFSS collection includes a set of files that provide a complete
1634 working setup of the LaTeX font selection scheme (NFSS2) for use with common
1635 PostScript fonts. It covers the so-called \"Base\" fonts (which are built
1636 into any Level 2 PostScript printing device and the Ghostscript interpreter)
1637 and a number of free fonts. It provides font definition files, macros and
1638 font metrics. The bundle as a whole is part of the LaTeX required set of
1639 packages.")
1640 (license license:lppl1.2+)))
1641
1642 (define-public texlive-union
1643 (lambda* (#:optional (packages '()))
1644 "Return 'texlive-union' package which is a union of PACKAGES and the
1645 standard LaTeX packages."
1646 (let ((default-packages
1647 (list texlive-bin
1648 texlive-dvips
1649 texlive-fontname
1650 texlive-fonts-cm
1651 texlive-fonts-latex
1652 texlive-metafont-base
1653 texlive-latex-base
1654 ;; LaTeX packages from the "required" set.
1655 texlive-latex-amsmath
1656 texlive-latex-amscls
1657 texlive-latex-babel
1658 texlive-generic-babel-english
1659 texlive-latex-cyrillic
1660 texlive-latex-graphics
1661 texlive-latex-psnfss
1662 texlive-latex-tools)))
1663 (package
1664 (name "texlive-union")
1665 (version (number->string %texlive-revision))
1666 (source #f)
1667 (build-system trivial-build-system)
1668 (arguments
1669 '(#:modules ((guix build union)
1670 (guix build utils)
1671 (guix build texlive-build-system)
1672 (guix build gnu-build-system)
1673 (guix build gremlin)
1674 (guix elf))
1675 #:builder
1676 (begin
1677 (use-modules (ice-9 match)
1678 (srfi srfi-26)
1679 (guix build union)
1680 (guix build utils)
1681 (guix build texlive-build-system))
1682 (let* ((out (assoc-ref %outputs "out"))
1683 (texmf.cnf (string-append out "/share/texmf-dist/web2c/texmf.cnf")))
1684 ;; Build a modifiable union of all inputs (but exclude bash)
1685 (match (filter (match-lambda
1686 ((name . _)
1687 (not (string=? "bash" name))))
1688 %build-inputs)
1689 (((names . directories) ...)
1690 (union-build (assoc-ref %outputs "out")
1691 directories
1692 #:create-all-directories? #t
1693 #:log-port (%make-void-port "w"))))
1694
1695 ;; The configuration file "texmf.cnf" is provided by the
1696 ;; "texlive-bin" package. We take it and override only the
1697 ;; setting for TEXMFROOT and TEXMF. This file won't be consulted
1698 ;; by default, though, so we still need to set TEXMFCNF.
1699 (substitute* texmf.cnf
1700 (("^TEXMFROOT = .*")
1701 (string-append "TEXMFROOT = " out "/share\n"))
1702 (("^TEXMF = .*")
1703 "TEXMF = $TEXMFROOT/share/texmf-dist\n"))
1704 (setenv "PATH" (string-append (assoc-ref %build-inputs "bash")
1705 "/bin"))
1706 (for-each
1707 (cut wrap-program <>
1708 `("TEXMFCNF" ":" = (,(dirname texmf.cnf)))
1709 `("TEXMF" ":" = (,(string-append out "/share/texmf-dist"))))
1710 (find-files (string-append out "/bin") ".*"))
1711 #t))))
1712 (inputs
1713 `(("bash" ,bash)
1714 ,@(map (lambda (package)
1715 (list (package-name package) package))
1716 (append default-packages packages))))
1717 (home-page (package-home-page texlive-bin))
1718 (synopsis "Union of TeX Live packages")
1719 (description "This package provides a subset of the TeX Live
1720 distribution.")
1721 (license (fold (lambda (package result)
1722 (match (package-license package)
1723 ((lst ...)
1724 (append lst result))
1725 ((? license:license? license)
1726 (cons license result))))
1727 '()
1728 (append default-packages packages)))))))
1729
1730 (define-public texlive-tiny
1731 (package
1732 (inherit (texlive-union))
1733 (name "texlive-tiny")
1734 (description "This is a very limited subset of the TeX Live distribution.
1735 It includes little more than the required set of LaTeX packages.")))
1736
1737 (define-public texlive-latex-amsrefs
1738 (package
1739 (name "texlive-latex-amsrefs")
1740 (version (number->string %texlive-revision))
1741 (source (origin
1742 (method svn-fetch)
1743 (uri (texlive-ref "latex" "amsrefs"))
1744 (file-name (string-append name "-" version "-checkout"))
1745 (sha256
1746 (base32
1747 "15i4k479dwrpr0kspmm70g1yn4p3dkh0whyzmr93hph9bggnh1i1"))))
1748 (build-system texlive-build-system)
1749 (arguments '(#:tex-directory "latex/amsrefs"))
1750 (home-page "https://www.ctan.org/pkg/amsrefs")
1751 (synopsis "LaTeX-based replacement for BibTeX")
1752 (description
1753 "Amsrefs is a LaTeX package for bibliographies that provides an archival
1754 data format similar to the format of BibTeX database files, but adapted to
1755 make direct processing by LaTeX easier. The package can be used either in
1756 conjunction with BibTeX or as a replacement for BibTeX.")
1757 (license license:lppl1.3+)))
1758
1759 (define-public texlive-latex-bigfoot
1760 (package
1761 (name "texlive-latex-bigfoot")
1762 (version (number->string %texlive-revision))
1763 (source (origin
1764 (method svn-fetch)
1765 (uri (texlive-ref "latex" "bigfoot"))
1766 (file-name (string-append name "-" version "-checkout"))
1767 (sha256
1768 (base32
1769 "092g8alnsdwlgl1isdnqrr32l161994295kadr1n05d81xgj5wnv"))))
1770 (build-system texlive-build-system)
1771 (arguments
1772 '(#:tex-directory "latex/bigfoot"
1773 #:phases
1774 (modify-phases %standard-phases
1775 (add-after 'unpack 'remove-generated-file
1776 (lambda _
1777 (for-each delete-file (find-files "." "\\.drv$"))
1778 #t)))))
1779 (home-page "https://www.ctan.org/pkg/bigfoot")
1780 (synopsis "Footnotes for critical editions")
1781 (description
1782 "This package aims to provide a one-stop solution to requirements for
1783 footnotes. It offers: Multiple footnote apparatus superior to that of
1784 @code{manyfoot}. Footnotes can be formatted in separate paragraphs, or be run
1785 into a single paragraph (this choice may be selected per footnote series);
1786 Things you might have expected (such as @code{\\verb}-like material in
1787 footnotes, and color selections over page breaks) now work. Note that the
1788 majority of the bigfoot package's interface is identical to that of
1789 @code{manyfoot}; users should seek information from that package's
1790 documentation. The bigfoot bundle also provides the @code{perpage} and
1791 @code{suffix} packages.")
1792 (license license:gpl2+)))
1793
1794 (define-public texlive-latex-blindtext
1795 (package
1796 (name "texlive-latex-blindtext")
1797 (version (number->string %texlive-revision))
1798 (source (origin
1799 (method svn-fetch)
1800 (uri (texlive-ref "latex" "blindtext"))
1801 (file-name (string-append name "-" version "-checkout"))
1802 (sha256
1803 (base32
1804 "1jrja9b1pzdh9zgv1jh807w4xijqja58n2mqny6dkwicv8qfgbfg"))))
1805 (build-system texlive-build-system)
1806 (arguments '(#:tex-directory "latex/blindtext"))
1807 (home-page "https://www.ctan.org/pkg/blindtext")
1808 (synopsis "Producing 'blind' text for testing")
1809 (description
1810 "The package provides the commands @code{\\blindtext} and
1811 @code{\\Blindtext} for creating \"blind\" text useful in testing new classes
1812 and packages, and @code{\\blinddocument}, @code{\\Blinddocument} for creating
1813 an entire random document with sections, lists, mathematics, etc. The package
1814 supports three languages, @code{english}, @code{(n)german} and @code{latin};
1815 the @code{latin} option provides a short \"lorem ipsum\" (for a fuller \"lorem
1816 ipsum\" text, see the @code{lipsum} package).")
1817 (license license:lppl)))
1818
1819 (define-public texlive-latex-dinbrief
1820 (package
1821 (name "texlive-latex-dinbrief")
1822 (version (number->string %texlive-revision))
1823 (source (origin
1824 (method svn-fetch)
1825 (uri (texlive-ref "latex" "dinbrief"))
1826 (file-name (string-append name "-" version "-checkout"))
1827 (sha256
1828 (base32
1829 "0lb0kiy8fxzl6cnhcw1sggy6jrjvcd6kj1kkw3k9lkimm388yjz6"))))
1830 (build-system texlive-build-system)
1831 (arguments
1832 '(#:tex-directory "latex/dinbrief"
1833 #:phases
1834 (modify-phases %standard-phases
1835 (add-after 'unpack 'remove-generated-file
1836 (lambda _
1837 (delete-file "dinbrief.drv")
1838 #t)))))
1839 (home-page "https://www.ctan.org/pkg/dinbrief")
1840 (synopsis "German letter DIN style")
1841 (description
1842 "This package implements a document layout for writing letters according
1843 to the rules of DIN (Deutsches Institut für Normung, German standardisation
1844 institute). A style file for LaTeX 2.09 (with limited support of the
1845 features) is part of the package. Since the letter layout is based on a
1846 German standard, the user guide is written in German, but most macros have
1847 English names from which the user can recognize what they are used for. In
1848 addition there are example files showing how letters may be created with the
1849 package.")
1850 (license license:lppl)))
1851
1852 (define-public texlive-latex-draftwatermark
1853 (package
1854 (name "texlive-latex-draftwatermark")
1855 (version (number->string %texlive-revision))
1856 (source (origin
1857 (method svn-fetch)
1858 (uri (texlive-ref "latex" "draftwatermark"))
1859 (file-name (string-append name "-" version "-checkout"))
1860 (sha256
1861 (base32
1862 "1zyl2pcz2x529gzj5m93a1s4ipymdabf7qdjl3l1673pizd4hfyv"))))
1863 (build-system texlive-build-system)
1864 (arguments '(#:tex-directory "latex/draftwatermark"))
1865 (home-page "https://www.ctan.org/pkg/draftwatermark")
1866 (synopsis "Put a grey textual watermark on document pages")
1867 (description
1868 "This package provides a means to add a textual, light grey watermark on
1869 every page or on the first page of a document. Typical usage may consist in
1870 writing words such as DRAFT or CONFIDENTIAL across document pages. The
1871 package performs a similar function to that of @code{draftcopy}, but its
1872 implementation is output device independent, and made very simple by relying
1873 on everypage.")
1874 (license license:lppl1.3+)))
1875
1876 (define-public texlive-latex-environ
1877 (package
1878 (name "texlive-latex-environ")
1879 (version (number->string %texlive-revision))
1880 (source (origin
1881 (method svn-fetch)
1882 (uri (texlive-ref "latex" "environ"))
1883 (file-name (string-append name "-" version "-checkout"))
1884 (sha256
1885 (base32
1886 "06h28b26dyjkj9shksphgqfv4130jfkwhbw737hxn7d3yvdfffyd"))))
1887 (build-system texlive-build-system)
1888 (arguments '(#:tex-directory "latex/environ"))
1889 (home-page "https://www.ctan.org/pkg/environ")
1890 (synopsis "New interface for environments in LaTeX")
1891 (description
1892 "This package provides the @code{\\collect@@body} command (as in
1893 @code{amsmath}), as well as a @code{\\long} version @code{\\Collect@@Body},
1894 for collecting the body text of an environment. These commands are used to
1895 define a new author interface to creating new environments.")
1896 (license license:lppl)))
1897
1898 (define-public texlive-latex-eqparbox
1899 (package
1900 (name "texlive-latex-eqparbox")
1901 (version (number->string %texlive-revision))
1902 (source (origin
1903 (method svn-fetch)
1904 (uri (texlive-ref "latex" "eqparbox"))
1905 (file-name (string-append name "-" version "-checkout"))
1906 (sha256
1907 (base32
1908 "0pvmhsd4xmpil0m3c7qcgwilbk266mlkzv03g0jr8r3zd8jxlyzq"))))
1909 (build-system texlive-build-system)
1910 (arguments '(#:tex-directory "latex/eqparbox"))
1911 (home-page "https://www.ctan.org/pkg/eqparbox")
1912 (synopsis "Create equal-widthed parboxes")
1913 (description
1914 "LaTeX users sometimes need to ensure that two or more blocks of text
1915 occupy the same amount of horizontal space on the page. To that end, the
1916 @code{eqparbox} package defines a new command, @code{\\eqparbox}, which works
1917 just like @code{\\parbox}, except that instead of specifying a width, one
1918 specifies a tag. All @code{eqparbox}es with the same tag---regardless of
1919 where they are in the document---will stretch to fit the widest
1920 @code{eqparbox} with that tag. This simple, equal-width mechanism can be used
1921 for a variety of alignment purposes, as is evidenced by the examples in
1922 @code{eqparbox}'s documentation. Various derivatives of @code{\\eqparbox} are
1923 also provided.")
1924 (license license:lppl1.3+)))
1925
1926 (define-public texlive-latex-expdlist
1927 (package
1928 (name "texlive-latex-expdlist")
1929 (version (number->string %texlive-revision))
1930 (source (origin
1931 (method svn-fetch)
1932 (uri (texlive-ref "latex" "expdlist"))
1933 (file-name (string-append name "-" version "-checkout"))
1934 (sha256
1935 (base32
1936 "1x7byk6x10njir3y9rm56glhdzrxwqag7gsnw2sqn1czlq525w7r"))))
1937 (build-system texlive-build-system)
1938 (arguments
1939 '(#:tex-directory "latex/expdlist"
1940 #:phases
1941 (modify-phases %standard-phases
1942 (add-after 'unpack 'remove-generated-file
1943 (lambda _
1944 (for-each delete-file
1945 (find-files "." "\\.drv$"))
1946 #t)))))
1947 (home-page "https://www.ctan.org/pkg/expdlist")
1948 (synopsis "Expanded description environments")
1949 (description
1950 "The package provides additional features for the LaTeX
1951 @code{description} environment, including adjustable left margin. The package
1952 also allows the user to \"break\" a list (for example, to interpose a comment)
1953 without affecting the structure of the list (this works for @code{itemize} and
1954 @code{enumerate} lists, and numbered lists remain in sequence).")
1955 (license license:lppl)))
1956
1957 (define-public texlive-latex-filemod
1958 (package
1959 (name "texlive-latex-filemod")
1960 (version (number->string %texlive-revision))
1961 (source (origin
1962 (method svn-fetch)
1963 (uri (svn-reference
1964 (url (string-append "svn://www.tug.org/texlive/tags/"
1965 %texlive-tag "/Master/texmf-dist/"
1966 "/tex/latex/filemod"))
1967 (revision %texlive-revision)))
1968 (sha256
1969 (base32
1970 "0vpxilfw69xv78f03g0j0zw0bw4qcn36whqp8phcq48qk1ax2kr2"))))
1971 (build-system trivial-build-system)
1972 (arguments
1973 `(#:modules ((guix build utils))
1974 #:builder
1975 (begin
1976 (use-modules (guix build utils))
1977 (let ((target (string-append (assoc-ref %outputs "out")
1978 "/share/texmf-dist/tex/latex/filemod")))
1979 (mkdir-p target)
1980 (copy-recursively (assoc-ref %build-inputs "source") target)
1981 #t))))
1982 (home-page "https://www.ctan.org/pkg/filemod")
1983 (synopsis "Provide file modification times, and compare them")
1984 (description
1985 "This package provides macros to read and compare the modification dates
1986 of files. The files may be @code{.tex} files, images or other files (as long
1987 as they can be found by LaTeX). It uses the @code{\\pdffilemoddate} primitive
1988 of pdfLaTeX to find the file modification date as PDF date string, parses the
1989 string and returns the value to the user. The package will also work for DVI
1990 output with recent versions of the LaTeX compiler which uses pdfLaTeX in DVI
1991 mode. The functionality is provided by purely expandable macros or by faster
1992 but non-expandable ones.")
1993 (license license:lppl1.3+)))
1994
1995 (define-public texlive-latex-ifplatform
1996 (package
1997 (name "texlive-latex-ifplatform")
1998 (version (number->string %texlive-revision))
1999 (source (origin
2000 (method svn-fetch)
2001 (uri (texlive-ref "latex" "ifplatform"))
2002 (file-name (string-append name "-" version "-checkout"))
2003 (sha256
2004 (base32
2005 "11gvvjvmdfs9b7mm19yf80zwkx49jqcbq6g8qb9y5ns1r1qvnixp"))))
2006 (build-system texlive-build-system)
2007 (arguments '(#:tex-directory "latex/ifplatform"))
2008 (home-page "https://www.ctan.org/pkg/ifplatform")
2009 (synopsis "Conditionals to test which platform is being used")
2010 (description
2011 "This package uses the (La)TeX extension @code{-shell-escape} to
2012 establish whether the document is being processed on a Windows or on a
2013 Unix-like system, or on Cygwin (Unix environment over a Windows system).
2014 Booleans provided are: @code{\\ifwindows}, @code{\\iflinux}, @code{\\ifmacosx}
2015 and @code{\\ifcygwin}. The package also preserves the output of @code{uname}
2016 on a Unix-like system, which may be used to distinguish between various
2017 classes of systems.")
2018 (license license:lppl)))
2019
2020 (define-public texlive-latex-natbib
2021 (package
2022 (name "texlive-latex-natbib")
2023 (version (number->string %texlive-revision))
2024 (source (origin
2025 (method svn-fetch)
2026 (uri (texlive-ref "latex" "natbib"))
2027 (sha256
2028 (base32
2029 "0aqliq0nwblxyrzhwhv77pnmk7qh2y3prgq7z7qhwcbgz5kisld7"))))
2030 (build-system texlive-build-system)
2031 (arguments '(#:tex-directory "latex/natbib"))
2032 (home-page "https://www.ctan.org/pkg/natbib")
2033 (synopsis "Flexible bibliography support")
2034 (description
2035 "This bundle provides a package that implements both author-year and
2036 numbered references, as well as much detailed of support for other
2037 bibliography use. Also provided are versions of the standard BibTeX styles
2038 that are compatible with @code{natbib}: @code{plainnat}, @code{unsrtnat},
2039 @code{abbrnat}. The bibliography styles produced by @code{custom-bib} are
2040 designed from the start to be compatible with @code{natbib}.")
2041 (license license:lppl)))
2042
2043 (define-public texlive-latex-psfrag
2044 (package
2045 (name "texlive-latex-psfrag")
2046 (version (number->string %texlive-revision))
2047 (source (origin
2048 (method svn-fetch)
2049 (uri (texlive-ref "latex" "psfrag"))
2050 (file-name (string-append name "-" version "-checkout"))
2051 (sha256
2052 (base32
2053 "1dxbl5il7wbbsp0v45vk884xi1192wxw03849pb1g5q4x808n352"))))
2054 (build-system texlive-build-system)
2055 (arguments '(#:tex-directory "latex/psfrag"))
2056 (home-page "https://www.ctan.org/pkg/psfrag")
2057 (synopsis "Replace strings in encapsulated PostScript figures")
2058 (description
2059 "This package allows LaTeX constructions (equations, picture
2060 environments, etc.) to be precisely superimposed over Encapsulated PostScript
2061 figures, using your own favorite drawing tool to create an EPS figure and
2062 placing simple text \"tags\" where each replacement is to be placed, with
2063 PSfrag automatically removing these tags from the figure and replacing them
2064 with a user specified LaTeX construction, properly aligned, scaled, and/or
2065 rotated.")
2066 (license (license:fsf-free "file://psfrag.dtx"))))
2067
2068 (define-public texlive-latex-pstool
2069 (package
2070 (name "texlive-latex-pstool")
2071 (version (number->string %texlive-revision))
2072 (source (origin
2073 (method svn-fetch)
2074 (uri (texlive-ref "latex" "pstool"))
2075 (file-name (string-append name "-" version "-checkout"))
2076 (sha256
2077 (base32
2078 "1kwlk1x67lad4xb7gpkxqgdlxwpi6nvq1r9wika7m92abmyf18h3"))))
2079 (build-system texlive-build-system)
2080 (arguments
2081 '(#:tex-directory "latex/pstool"
2082 #:tex-format "latex"))
2083 (inputs
2084 `(("texlive-fonts-cm" ,texlive-fonts-cm)
2085 ("texlive-latex-filecontents" ,texlive-latex-filecontents)))
2086 (propagated-inputs
2087 `(("texlive-latex-bigfoot" ,texlive-latex-bigfoot)
2088 ("texlive-latex-filemod" ,texlive-latex-filemod)
2089 ("texlive-latex-graphics" ,texlive-latex-graphics)
2090 ("texlive-latex-ifplatform" ,texlive-latex-ifplatform)
2091 ("texlive-latex-oberdiek" ,texlive-latex-oberdiek)
2092 ("texlive-latex-psfrag" ,texlive-latex-psfrag)
2093 ("texlive-latex-trimspaces" ,texlive-latex-trimspaces)))
2094 (home-page "https://www.ctan.org/pkg/pstool")
2095 (synopsis "Process PostScript graphisc within pdfLaTeX documents")
2096 (description
2097 "This is a package for processing PostScript graphics with @code{psfrag}
2098 labels within pdfLaTeX documents. Every graphic is compiled individually,
2099 drastically speeding up compilation time when only a single figure needs
2100 re-processing.")
2101 (license license:lppl)))
2102
2103 (define-public texlive-latex-seminar
2104 (package
2105 (name "texlive-latex-seminar")
2106 (version (number->string %texlive-revision))
2107 (source (origin
2108 (method svn-fetch)
2109 (uri (svn-reference
2110 (url (string-append "svn://www.tug.org/texlive/tags/"
2111 %texlive-tag "/Master/texmf-dist/"
2112 "/tex/latex/seminar"))
2113 (revision %texlive-revision)))
2114 (sha256
2115 (base32
2116 "0y4i651b75y6006n03x8n86bsqvjsailvvz9bhzy51dzsznqidq0"))))
2117 (build-system texlive-build-system)
2118 (arguments '(#:tex-directory "latex/seminar"))
2119 (home-page "https://www.ctan.org/pkg/seminar")
2120 (synopsis "Make overhead slides")
2121 ;; TODO: This package may need fancybox and xcomment at runtime.
2122 (description
2123 "This package provides a class that produces overhead
2124 slides (transparencies), with many facilities. Seminar is not nowadays
2125 reckoned a good basis for a presentation — users are advised to use more
2126 recent classes such as powerdot or beamer, both of which are tuned to
2127 21st-century presentation styles.")
2128 (license license:lppl1.2+)))
2129
2130 (define-public texlive-latex-trimspaces
2131 (package
2132 (name "texlive-latex-trimspaces")
2133 (version (number->string %texlive-revision))
2134 (source (origin
2135 (method svn-fetch)
2136 (uri (texlive-ref "latex" "trimspaces"))
2137 (sha256
2138 (base32
2139 "0da00lb32am4g63mn96625wg48p3pj3spx79lajrk17d549apwqa"))))
2140 (build-system texlive-build-system)
2141 (arguments
2142 '(#:tex-directory "latex/trimspaces"
2143 #:tex-format "latex"
2144 #:phases
2145 (modify-phases %standard-phases
2146 (add-after 'unpack 'fix-bug
2147 (lambda _
2148 ;; The "ins" file refers to the wrong source file.
2149 (substitute* "trimspaces.ins"
2150 (("pstool.tex") "trimspaces.tex"))
2151 #t)))))
2152 (inputs
2153 `(("texlive-latex-filecontents" ,texlive-latex-filecontents)))
2154 (home-page "https://www.ctan.org/pkg/trimspaces")
2155 (synopsis "Trim spaces around an argument or within a macro")
2156 (description
2157 "This very short package allows you to expandably remove spaces around a
2158 token list (commands are provided to remove spaces before, spaces after, or
2159 both); or to remove surrounding spaces within a macro definition, or to define
2160 space-stripped macros.")
2161 (license license:lppl)))
2162
2163 (define-public texlive-latex-capt-of
2164 (package
2165 (name "texlive-latex-capt-of")
2166 (version (number->string %texlive-revision))
2167 (source (origin
2168 (method svn-fetch)
2169 (uri (svn-reference
2170 (url (string-append "svn://www.tug.org/texlive/tags/"
2171 %texlive-tag "/Master/texmf-dist/"
2172 "/tex/latex/capt-of"))
2173 (revision %texlive-revision)))
2174 (file-name (string-append name "-" version "-checkout"))
2175 (sha256
2176 (base32
2177 "1y2s50f6lz0jx2748lj3iy56hrpcczgnbzmvphxv7aqndyyamd4x"))))
2178 (build-system trivial-build-system)
2179 (arguments
2180 `(#:modules ((guix build utils))
2181 #:builder
2182 (begin
2183 (use-modules (guix build utils))
2184 (let ((target (string-append (assoc-ref %outputs "out")
2185 "/share/texmf-dist/tex/latex/capt-of")))
2186 (mkdir-p target)
2187 (copy-recursively (assoc-ref %build-inputs "source") target)
2188 #t))))
2189 (home-page "https://www.ctan.org/pkg/capt-of")
2190 (synopsis "Captions on more than floats")
2191 (description
2192 "This package defines a command @code{\\captionof} for putting a caption
2193 to something that's not a float.")
2194 (license license:lppl)))
2195
2196 (define-public texlive-latex-etoolbox
2197 (package
2198 (name "texlive-latex-etoolbox")
2199 (version (number->string %texlive-revision))
2200 (source (origin
2201 (method svn-fetch)
2202 (uri (svn-reference
2203 (url (string-append "svn://www.tug.org/texlive/tags/"
2204 %texlive-tag "/Master/texmf-dist/"
2205 "/tex/latex/etoolbox"))
2206 (revision %texlive-revision)))
2207 (file-name (string-append name "-" version "-checkout"))
2208 (sha256
2209 (base32
2210 "0016bscnpima9krrg2569mva78xzwnygzlvg87dznsm6gf8g589v"))))
2211 (build-system trivial-build-system)
2212 (arguments
2213 `(#:modules ((guix build utils))
2214 #:builder
2215 (begin
2216 (use-modules (guix build utils))
2217 (let ((target (string-append (assoc-ref %outputs "out")
2218 "/share/texmf-dist/tex/latex/etoolbox")))
2219 (mkdir-p target)
2220 (copy-recursively (assoc-ref %build-inputs "source") target)
2221 #t))))
2222 (home-page "https://www.ctan.org/pkg/etoolbox")
2223 (synopsis "e-TeX tools for LaTeX")
2224 (description
2225 "This package is a toolbox of programming facilities geared primarily
2226 towards LaTeX class and package authors. It provides LaTeX frontends to some
2227 of the new primitives provided by e-TeX as well as some generic tools which
2228 are not strictly related to e-TeX but match the profile of this package. The
2229 package provides functions that seem to offer alternative ways of implementing
2230 some LaTeX kernel commands; nevertheless, the package will not modify any part
2231 of the LaTeX kernel.")
2232 (license license:lppl1.3+)))
2233
2234 (define-public texlive-latex-fncychap
2235 (package
2236 (name "texlive-latex-fncychap")
2237 (version (number->string %texlive-revision))
2238 (source (origin
2239 (method svn-fetch)
2240 (uri (svn-reference
2241 (url (string-append "svn://www.tug.org/texlive/tags/"
2242 %texlive-tag "/Master/texmf-dist/"
2243 "/tex/latex/fncychap"))
2244 (revision %texlive-revision)))
2245 (file-name (string-append name "-" version "-checkout"))
2246 (sha256
2247 (base32
2248 "0fdk84dbicfjfprkz6vk15x36mvlhaw9isjmgkc56jp2khwjswwq"))))
2249 (build-system trivial-build-system)
2250 (arguments
2251 `(#:modules ((guix build utils))
2252 #:builder
2253 (begin
2254 (use-modules (guix build utils))
2255 (let ((target (string-append (assoc-ref %outputs "out")
2256 "/share/texmf-dist/tex/latex/fncychap")))
2257 (mkdir-p target)
2258 (copy-recursively (assoc-ref %build-inputs "source") target)
2259 #t))))
2260 (home-page "https://www.ctan.org/pkg/fncychap")
2261 (synopsis "Seven predefined chapter heading styles")
2262 (description
2263 "This package provides seven predefined chapter heading styles. Each
2264 style can be modified using a set of simple commands. Optionally one can
2265 modify the formatting routines in order to create additional chapter
2266 headings.")
2267 (license license:lppl1.3+)))
2268
2269 (define-public texlive-latex-framed
2270 (package
2271 (name "texlive-latex-framed")
2272 (version (number->string %texlive-revision))
2273 (source (origin
2274 (method svn-fetch)
2275 (uri (svn-reference
2276 (url (string-append "svn://www.tug.org/texlive/tags/"
2277 %texlive-tag "/Master/texmf-dist/"
2278 "/tex/latex/framed"))
2279 (revision %texlive-revision)))
2280 (file-name (string-append name "-" version "-checkout"))
2281 (sha256
2282 (base32
2283 "14a4ydqsvp3vcfavl21jrv0ybiqypaaqzg2q2cs3rzkandg7w98x"))))
2284 (build-system trivial-build-system)
2285 (arguments
2286 `(#:modules ((guix build utils))
2287 #:builder
2288 (begin
2289 (use-modules (guix build utils))
2290 (let ((target (string-append (assoc-ref %outputs "out")
2291 "/share/texmf-dist/tex/latex/framed")))
2292 (mkdir-p target)
2293 (copy-recursively (assoc-ref %build-inputs "source") target)
2294 #t))))
2295 (home-page "https://www.ctan.org/pkg/framed")
2296 (synopsis "Framed or shaded regions that can break across pages")
2297 (description
2298 "The package creates three environments: @code{framed}, which puts an
2299 ordinary frame box around the region, @code{shaded}, which shades the region,
2300 and @code{leftbar}, which places a line at the left side. The environments
2301 allow a break at their start (the @code{\\FrameCommand} enables creation of a
2302 title that is “attached” to the environment); breaks are also allowed in the
2303 course of the framed/shaded matter. There is also a command
2304 @code{\\MakeFramed} to make your own framed-style environments.")
2305 ;; The header states: "These macros may be freely transmitted, reproduced,
2306 ;; or modified for any purpose provided that this notice is left intact."
2307 (license (license:fsf-free "file://framed.sty"))))
2308
2309 (define-public texlive-latex-g-brief
2310 (package
2311 (name "texlive-latex-g-brief")
2312 (version (number->string %texlive-revision))
2313 (source (origin
2314 (method svn-fetch)
2315 (uri (texlive-ref "latex" "g-brief"))
2316 (file-name (string-append name "-" version "-checkout"))
2317 (sha256
2318 (base32
2319 "0sikazkg0dpkcpzlbqw8qzxr81paf2f443vsrh14jnw7s4gswvc5"))))
2320 (build-system texlive-build-system)
2321 (arguments
2322 '(#:tex-directory "latex/g-brief"
2323 #:phases
2324 (modify-phases %standard-phases
2325 (add-after 'unpack 'remove-generated-file
2326 (lambda _
2327 (delete-file "g-brief.drv")
2328 #t)))))
2329 (home-page "https://www.ctan.org/pkg/g-brief")
2330 (synopsis "Letter document class")
2331 (description
2332 "This package is designed for formatting formless letters in German; it
2333 can also be used for English (by those who can read the documentation). There
2334 are LaTeX 2.09 @code{documentstyle} and LaTeX 2e class files for both an
2335 \"old\" and a \"new\" version of g-brief.")
2336 (license license:lppl)))
2337
2338 (define-public texlive-latex-galois
2339 (package
2340 (name "texlive-latex-galois")
2341 (version (number->string %texlive-revision))
2342 (source (origin
2343 (method svn-fetch)
2344 (uri (texlive-ref "latex" "galois"))
2345 (file-name (string-append name "-" version "-checkout"))
2346 (sha256
2347 (base32
2348 "0d4l0msk8j5pi95xnmm9wygv1vbpkwkv5amx9l0km86cs79jpp1h"))))
2349 (build-system texlive-build-system)
2350 (arguments '(#:tex-directory "latex/galois"))
2351 (home-page "https://www.ctan.org/pkg/galois")
2352 (synopsis "Typeset Galois connections")
2353 (description
2354 "The package deals with connections in two-dimensional style, optionally
2355 in colour.")
2356 (license license:lppl)))
2357
2358 (define-public texlive-latex-gcite
2359 (package
2360 (name "texlive-latex-gcite")
2361 (version (number->string %texlive-revision))
2362 (source (origin
2363 (method svn-fetch)
2364 (uri (texlive-ref "latex" "gcite"))
2365 (file-name (string-append name "-" version "-checkout"))
2366 (sha256
2367 (base32
2368 "03g9by54yrypn599y98r1xh7qw0bbbmpzq0bfwpj6j5q5rkl1mfa"))))
2369 (build-system texlive-build-system)
2370 (arguments '(#:tex-directory "latex/gcite"))
2371 (home-page "https://www.ctan.org/pkg/gcite")
2372 (synopsis "Citations in a reader-friendly style")
2373 (description
2374 "The package allows citations in the German style, which is considered by
2375 many to be particularly reader-friendly. The citation provides a small amount
2376 of bibliographic information in a footnote on the page where each citation is
2377 made. It combines a desire to eliminate unnecessary page-turning with the
2378 look-up efficiency afforded by numeric citations. The package makes use of
2379 BibLaTeX, and is considered experimental.")
2380 (license license:lppl1.3+)))
2381
2382 (define-public texlive-latex-geometry
2383 (package
2384 (name "texlive-latex-geometry")
2385 (version (number->string %texlive-revision))
2386 (source (origin
2387 (method svn-fetch)
2388 (uri (texlive-ref "latex" "geometry"))
2389 (file-name (string-append name "-" version "-checkout"))
2390 (sha256
2391 (base32
2392 "1r2kfcwclg33yk5z8mvlagwxj7nr1mc3w4bdpmhrwv6dn8mrbvw8"))))
2393 (build-system texlive-build-system)
2394 (arguments '(#:tex-directory "latex/geometry"))
2395 (home-page "https://www.ctan.org/pkg/geometry")
2396 (synopsis "Flexible and complete interface to document dimensions")
2397 (description
2398 "This package provides an easy and flexible user interface to customize
2399 page layout, implementing auto-centering and auto-balancing mechanisms so that
2400 the users have only to give the least description for the page layout. The
2401 package knows about all the standard paper sizes, so that the user need not
2402 know what the nominal \"real\" dimensions of the paper are, just its standard
2403 name (such as a4, letter, etc.). An important feature is the package's
2404 ability to communicate the paper size it's set up to the output.")
2405 (license license:lppl)))
2406
2407 (define-public texlive-latex-mdwtools
2408 (package
2409 (name "texlive-latex-mdwtools")
2410 (version (number->string %texlive-revision))
2411 (source (origin
2412 (method svn-fetch)
2413 (uri (texlive-ref "latex" "mdwtools"))
2414 (file-name (string-append name "-" version "-checkout"))
2415 (sha256
2416 (base32
2417 "0caxs74hla28hc67csf5i5ahadx97w8vxh3mdmsprxbpd1mr7ssg"))))
2418 (build-system texlive-build-system)
2419 (arguments '(#:tex-directory "latex/mdwtools"))
2420 (home-page "https://www.ctan.org/pkg/mdwtools")
2421 (synopsis "Miscellaneous tools by Mark Wooding")
2422 (description
2423 "This collection of tools includes: @code{atsupport} for short commands
2424 starting with @code{@@}, macros to sanitize the OT1 encoding of the
2425 @code{cmtt} fonts; a @code{doafter} command; improved @code{footnote} support;
2426 @code{mathenv} for various alignment in maths; list handling; @code{mdwmath}
2427 which adds some minor changes to LaTeX maths; a rewrite of LaTeX's tabular and
2428 array environments; verbatim handling; and syntax diagrams.")
2429 (license license:gpl3+)))
2430
2431 (define-public texlive-latex-polyglossia
2432 (package
2433 (name "texlive-latex-polyglossia")
2434 (version (number->string %texlive-revision))
2435 (source (origin
2436 (method svn-fetch)
2437 (uri (texlive-ref "latex" "polyglossia"))
2438 (file-name (string-append name "-" version "-checkout"))
2439 (sha256
2440 (base32
2441 "09mvszd5qgqg4cfglpj5qxyzjz190ppb9p8gnsnjydwp1akvhayf"))))
2442 (build-system texlive-build-system)
2443 (arguments '(#:tex-directory "latex/polyglossia"))
2444 (home-page "https://www.ctan.org/pkg/polyglossia")
2445 (synopsis "Alternative to babel for XeLaTeX and LuaLaTeX")
2446 (description
2447 "This package provides a complete Babel replacement for users of LuaLaTeX
2448 and XeLaTeX; it relies on the @code{fontspec} package, version 2.0 at least.")
2449 (license license:lppl1.3+)))
2450
2451 (define-public texlive-latex-supertabular
2452 (package
2453 (name "texlive-latex-supertabular")
2454 (version (number->string %texlive-revision))
2455 (source (origin
2456 (method svn-fetch)
2457 (uri (texlive-ref "latex" "supertabular"))
2458 (file-name (string-append name "-" version "-checkout"))
2459 (sha256
2460 (base32
2461 "14b2bc7cqz4ckxxycim9sw6jkrr1pahivm1rdbpz5k6hl967w1s3"))))
2462 (build-system texlive-build-system)
2463 (arguments '(#:tex-directory "latex/supertabular"))
2464 (home-page "https://www.ctan.org/pkg/supertabular")
2465 (synopsis "Multi-page tables package")
2466 (description
2467 "This package was a predecessor of @code{longtable}; the newer
2468 package (designed on quite different principles) is easier to use and more
2469 flexible, in many cases, but supertabular retains its usefulness in a few
2470 situations where longtable has problems.")
2471 (license license:lppl1.3+)))
2472
2473 (define-public texlive-tex-texinfo
2474 (package
2475 (name "texlive-tex-texinfo")
2476 (version (number->string %texlive-revision))
2477 (source (origin
2478 (method svn-fetch)
2479 (uri (svn-reference
2480 (url (string-append "svn://www.tug.org/texlive/tags/"
2481 %texlive-tag "/Master/texmf-dist/"
2482 "/tex/texinfo"))
2483 (revision %texlive-revision)))
2484 (sha256
2485 (base32
2486 "09zj2w3lx0y6i2syfjjgizahf86z301dw8p37ln6syfhqhzqdz46"))))
2487 (build-system trivial-build-system)
2488 (arguments
2489 `(#:modules ((guix build utils))
2490 #:builder
2491 (begin
2492 (use-modules (guix build utils))
2493 (let ((target (string-append (assoc-ref %outputs "out")
2494 "/share/texmf-dist/tex/texinfo")))
2495 (mkdir-p target)
2496 (copy-recursively (assoc-ref %build-inputs "source") target)
2497 #t))))
2498 (home-page "https://www.ctan.org/pkg/texinfo")
2499 (synopsis "TeX macros to handle Texinfo files")
2500 (description
2501 "Texinfo is the preferred format for documentation in the GNU project;
2502 the format may be used to produce online or printed output from a single
2503 source. The Texinfo macros may be used to produce printable output using TeX;
2504 other programs in the distribution offer online interactive use (with
2505 hypertext linkages in some cases).")
2506 (license license:gpl3+)))
2507
2508 (define-public texlive-latex-upquote
2509 (package
2510 (name "texlive-latex-upquote")
2511 (version (number->string %texlive-revision))
2512 (source (origin
2513 (method svn-fetch)
2514 (uri (texlive-ref "latex" "upquote"))
2515 (file-name (string-append name "-" version "-checkout"))
2516 (sha256
2517 (base32
2518 "0d1050i973wnxigy0xpky5l7vn4ff7ldhkjpdqsw5s653gagwixp"))))
2519 (build-system texlive-build-system)
2520 (arguments '(#:tex-directory "latex/upquote"))
2521 (home-page "https://www.ctan.org/pkg/upquote")
2522 (synopsis "Show \"realistic\" quotes in verbatim")
2523 (description
2524 "Typewriter-style fonts are best for program listings, but Computer
2525 Modern Typewriter prints @code{`} and @code{'} as bent opening and closing
2526 single quotes. Other fonts, and most programming languages, print @code{`} as
2527 a grave accent and @code{'} upright; @code{'} is used both to open and to
2528 close quoted strings. The package switches the typewriter font to Computer
2529 Modern Typewriter in OT1 encoding, and modifies the behaviour of
2530 @code{verbatim}, @code{verbatim*}, @code{\\verb}, and @code{\\verb*} to print
2531 in the expected way. It does this regardless of other fonts or encodings in
2532 use, so long as the package is loaded after the other fonts were. The package
2533 does not affect @code{\\tt}, @code{\\texttt}, etc.")
2534 (license license:lppl1.2+)))
2535
2536 (define-public texlive-latex-anysize
2537 (package
2538 (name "texlive-latex-anysize")
2539 (version (number->string %texlive-revision))
2540 (source (origin
2541 (method svn-fetch)
2542 (uri (svn-reference
2543 (url (string-append "svn://www.tug.org/texlive/tags/"
2544 %texlive-tag "/Master/texmf-dist/"
2545 "/tex/latex/anysize"))
2546 (revision %texlive-revision)))
2547 (sha256
2548 (base32
2549 "19khwqjlvznc955sijhww3c4zbb0053rvzwv9nz738qknq7y18vb"))))
2550 (build-system trivial-build-system)
2551 (arguments
2552 `(#:modules ((guix build utils))
2553 #:builder
2554 (begin
2555 (use-modules (guix build utils))
2556 (let ((target (string-append (assoc-ref %outputs "out")
2557 "/share/texmf-dist/tex/latex/anysize")))
2558 (mkdir-p target)
2559 (copy-recursively (assoc-ref %build-inputs "source") target)
2560 #t))))
2561 (home-page "https://www.ctan.org/pkg/anysize")
2562 (synopsis "Simple package to set up document margins")
2563 (description
2564 "This is a simple package to set up document margins. This package is
2565 considered obsolete; alternatives are the @code{typearea} package from the
2566 @code{koma-script} bundle, or the @code{geometry} package.")
2567 (license license:public-domain)))
2568
2569 (define-public texlive-latex-appendix
2570 (package
2571 (name "texlive-latex-appendix")
2572 (version (number->string %texlive-revision))
2573 (source (origin
2574 (method svn-fetch)
2575 (uri (texlive-ref "latex" "appendix"))
2576 (sha256
2577 (base32
2578 "0rxfpr8vq3brwx5rc7qn91ixlp9zva4zrms8a579fqa1g5yva7vg"))))
2579 (build-system texlive-build-system)
2580 (arguments '(#:tex-directory "latex/appendix"))
2581 (home-page "https://www.ctan.org/pkg/appendix")
2582 (synopsis "Extra control of appendices")
2583 (description
2584 "The appendix package provides various ways of formatting the titles of
2585 appendices. Also (sub)appendices environments are provided that can be used,
2586 for example, for per chapter/section appendices. An @code{appendices}
2587 environment is provided which can be used instead of the @code{\\appendix}
2588 command.")
2589 (license license:lppl)))
2590
2591 (define-public texlive-latex-changebar
2592 (package
2593 (name "texlive-latex-changebar")
2594 (version (number->string %texlive-revision))
2595 (source (origin
2596 (method svn-fetch)
2597 (uri (texlive-ref "latex" "changebar"))
2598 (sha256
2599 (base32
2600 "1ik4m8pzfsn1grlda6fniqqfwmgj7rfxwg63jdw0p0qv002vc7ik"))))
2601 (build-system texlive-build-system)
2602 (arguments '(#:tex-directory "latex/changebar"))
2603 (home-page "https://www.ctan.org/pkg/changebar")
2604 (synopsis "Generate changebars in LaTeX documents")
2605 (description
2606 "Identify areas of text to be marked with changebars with the
2607 @code{\\cbstart} and @code{\\cbend} commands; the bars may be coloured. The
2608 package uses 'drivers' to place the bars; the available drivers can work with
2609 @code{dvitoln03}, @code{dvitops}, @code{dvips}, the emTeX and TeXtures DVI
2610 drivers, and VTeX and pdfTeX.")
2611 (license license:lppl)))
2612
2613 (define-public texlive-latex-cmap
2614 (package
2615 (name "texlive-latex-cmap")
2616 (version (number->string %texlive-revision))
2617 (source (origin
2618 (method svn-fetch)
2619 (uri (svn-reference
2620 (url (string-append "svn://www.tug.org/texlive/tags/"
2621 %texlive-tag "/Master/texmf-dist/"
2622 "/tex/latex/cmap"))
2623 (revision %texlive-revision)))
2624 (file-name (string-append name "-" version "-checkout"))
2625 (sha256
2626 (base32
2627 "1s1rv6zgw105w2j6ffhnk914qrix87y1ndzri1q72g2kbr91zlbg"))))
2628 (build-system trivial-build-system)
2629 (arguments
2630 `(#:modules ((guix build utils))
2631 #:builder
2632 (begin
2633 (use-modules (guix build utils))
2634 (let ((target (string-append (assoc-ref %outputs "out")
2635 "/share/texmf-dist/tex/latex/cmap")))
2636 (mkdir-p target)
2637 (copy-recursively (assoc-ref %build-inputs "source") target)
2638 #t))))
2639 (home-page "https://www.tug.org/svn/texlive/tags/texlive-2017.1/\
2640 Master/texmf-dist/tex/latex/cmap/")
2641 (synopsis "CMap support for PDF files")
2642 (description
2643 "This package embeds CMap tables into PDF files to make search and
2644 copy-and-paste functions work properly.")
2645 (license license:lppl)))
2646
2647 (define-public texlive-latex-colortbl
2648 (package
2649 (name "texlive-latex-colortbl")
2650 (version (number->string %texlive-revision))
2651 (source (origin
2652 (method svn-fetch)
2653 (uri (texlive-ref "latex" "colortbl"))
2654 (sha256
2655 (base32
2656 "190pmq8la2rq07xry8bn8z8yywzxv6fqyqaj7yjfj5rgw6x0mas8"))))
2657 (build-system texlive-build-system)
2658 (arguments '(#:tex-directory "latex/colortbl"))
2659 (home-page "https://www.ctan.org/pkg/colortbl")
2660 (synopsis "Add colour to LaTeX tables")
2661 (description
2662 "This package allows rows, columns, and even individual cells in LaTeX
2663 tables to be coloured.")
2664 (license license:lppl)))
2665
2666 (define-public texlive-latex-fancybox
2667 (package
2668 (name "texlive-latex-fancybox")
2669 (version (number->string %texlive-revision))
2670 (source (origin
2671 (method svn-fetch)
2672 (uri (svn-reference
2673 (url (string-append "svn://www.tug.org/texlive/tags/"
2674 %texlive-tag "/Master/texmf-dist/"
2675 "/tex/latex/fancybox"))
2676 (revision %texlive-revision)))
2677 (sha256
2678 (base32
2679 "0smmnaad2q8qwicay1frri990lv65l0k8cwzsvdsyp3jk8kp042w"))))
2680 (build-system trivial-build-system)
2681 (arguments
2682 `(#:modules ((guix build utils))
2683 #:builder
2684 (begin
2685 (use-modules (guix build utils))
2686 (let ((target (string-append (assoc-ref %outputs "out")
2687 "/share/texmf-dist/tex/latex/fancybox")))
2688 (mkdir-p target)
2689 (copy-recursively (assoc-ref %build-inputs "source") target)
2690 #t))))
2691 (home-page "https://www.ctan.org/pkg/fancybox")
2692 (synopsis "Variants of \\fbox and other games with boxes")
2693 (description
2694 "This package provides variants of @code{\\fbox}: @code{\\shadowbox},
2695 @code{\\doublebox}, @code{\\ovalbox}, @code{\\Ovalbox}, with helpful tools for
2696 using box macros and flexible verbatim macros. You can box mathematics,
2697 floats, center, flushleft, and flushright, lists, and pages.")
2698 (license license:lppl1.2+)))
2699
2700 (define-public texlive-latex-fancyhdr
2701 (package
2702 (name "texlive-latex-fancyhdr")
2703 (version (number->string %texlive-revision))
2704 (source (origin
2705 (method svn-fetch)
2706 (uri (svn-reference
2707 (url (string-append "svn://www.tug.org/texlive/tags/"
2708 %texlive-tag "/Master/texmf-dist/"
2709 "/tex/latex/fancyhdr"))
2710 (revision %texlive-revision)))
2711 (sha256
2712 (base32
2713 "04h430agf8aj7ziwyb46xpk95c605rjk1wzhr63m6ylipihidlgw"))))
2714 (build-system trivial-build-system)
2715 (arguments
2716 `(#:modules ((guix build utils))
2717 #:builder
2718 (begin
2719 (use-modules (guix build utils))
2720 (let ((target (string-append (assoc-ref %outputs "out")
2721 "/share/texmf-dist/tex/latex/fancyhdr")))
2722 (mkdir-p target)
2723 (copy-recursively (assoc-ref %build-inputs "source") target)
2724 #t))))
2725 (home-page "https://www.ctan.org/pkg/fancyhdr")
2726 (synopsis "Extensive control of page headers and footers in LaTeX2e")
2727 (description
2728 "The package provides extensive facilities, both for constructing headers
2729 and footers, and for controlling their use (for example, at times when LaTeX
2730 would automatically change the heading style in use).")
2731 (license license:lppl)))
2732
2733 (define-public texlive-latex-float
2734 (package
2735 (name "texlive-latex-float")
2736 (version (number->string %texlive-revision))
2737 (source (origin
2738 (method svn-fetch)
2739 (uri (texlive-ref "latex" "float"))
2740 (sha256
2741 (base32
2742 "0nbl7wylkv22fcdv4p8byhhj575fli6jnqjpkhrkbv8dzwah84nq"))))
2743 (build-system texlive-build-system)
2744 (arguments '(#:tex-directory "latex/float"))
2745 (home-page "https://www.ctan.org/pkg/float")
2746 (synopsis "Improved interface for floating objects")
2747 (description
2748 "This package improves the interface for defining floating objects such
2749 as figures and tables. It introduces the boxed float, the ruled float and the
2750 plaintop float. You can define your own floats and improve the behaviour of
2751 the old ones. The package also provides the @code{H} float modifier option of
2752 the obsolete @code{here} package. You can select this as automatic default
2753 with @code{\\floatplacement{figure}{H}}.")
2754 (license license:lppl)))
2755
2756 (define-public texlive-latex-footmisc
2757 (package
2758 (name "texlive-latex-footmisc")
2759 (version (number->string %texlive-revision))
2760 (source (origin
2761 (method svn-fetch)
2762 (uri (texlive-ref "latex" "footmisc"))
2763 (sha256
2764 (base32
2765 "03x61wwql8nh6zrqiiiq3rb0x7m3pn48c606zapy19y21fybwdxs"))))
2766 (build-system texlive-build-system)
2767 (arguments '(#:tex-directory "latex/footmisc"))
2768 (home-page "https://www.ctan.org/pkg/footmisc")
2769 (synopsis "Range of footnote options")
2770 (description
2771 "This is a collection of ways to change the typesetting of footnotes.
2772 The package provides means of changing the layout of the footnotes themselves,
2773 a way to number footnotes per page, to make footnotes disappear in a
2774 \"moving\" argument, and to deal with multiple references to footnotes from
2775 the same place. The package also has a range of techniques for labelling
2776 footnotes with symbols rather than numbers.")
2777 (license license:lppl1.3+)))
2778
2779 (define-public texlive-latex-listings
2780 (package
2781 (name "texlive-latex-listings")
2782 (version (number->string %texlive-revision))
2783 (source (origin
2784 (method svn-fetch)
2785 (uri (texlive-ref "latex" "listings"))
2786 (sha256
2787 (base32
2788 "1nsn9wp3wl12b36c0sqrim33lf33cr5wky0h4ncnw8lvqgm7h8wf"))))
2789 (build-system texlive-build-system)
2790 (arguments
2791 '(#:tex-directory "latex/listings"
2792 #:build-targets '("listings.ins")))
2793 (home-page "https://www.ctan.org/pkg/listings")
2794 (synopsis "Typeset source code listings using LaTeX")
2795 (description
2796 "The package enables the user to typeset programs (programming code)
2797 within LaTeX; the source code is read directly by TeX---no front-end processor
2798 is needed. Keywords, comments and strings can be typeset using different
2799 styles. Support for @code{hyperref} is provided.")
2800 (license license:lppl1.3+)))
2801
2802 (define-public texlive-latex-jknapltx
2803 (package
2804 (name "texlive-latex-jknapltx")
2805 (version (number->string %texlive-revision))
2806 (source (origin
2807 (method svn-fetch)
2808 (uri (svn-reference
2809 (url (string-append "svn://www.tug.org/texlive/tags/"
2810 %texlive-tag "/Master/texmf-dist/"
2811 "/tex/latex/jknapltx"))
2812 (revision %texlive-revision)))
2813 (sha256
2814 (base32
2815 "0m034x72f2g07icr50gacyxfb9g1lz2rmqh4kqr1qjb421x2kds9"))))
2816 (build-system trivial-build-system)
2817 (arguments
2818 `(#:modules ((guix build utils))
2819 #:builder
2820 (begin
2821 (use-modules (guix build utils))
2822 (let ((target (string-append (assoc-ref %outputs "out")
2823 "/share/texmf-dist/tex/latex/jknapltx")))
2824 (mkdir-p target)
2825 (copy-recursively (assoc-ref %build-inputs "source") target)
2826 #t))))
2827 (home-page "https://www.ctan.org/pkg/jknappen")
2828 (synopsis "Miscellaneous packages by Joerg Knappen")
2829 (description
2830 "This package provides miscellaneous macros by Joerg Knappen, including:
2831 represent counters in greek; Maxwell's non-commutative division;
2832 @code{latin1jk}, @code{latin2jk} and @code{latin3jk}, which are
2833 @code{inputenc} definition files that allow verbatim input in the respective
2834 ISO Latin codes; blackboard bold fonts in maths; use of RSFS fonts in maths;
2835 extra alignments for @code{\\parboxes}; swap Roman and Sans fonts;
2836 transliterate semitic languages; patches to make (La)TeX formulae embeddable
2837 in SGML; use maths minus in text as appropriate; simple Young tableaux.")
2838 (license license:gpl2)))
2839
2840 (define-public texlive-fonts-ec
2841 (package
2842 (name "texlive-fonts-ec")
2843 (version (number->string %texlive-revision))
2844 (source (origin
2845 (method svn-fetch)
2846 (uri (svn-reference
2847 (url (string-append "svn://www.tug.org/texlive/tags/"
2848 %texlive-tag "/Master/texmf-dist/"
2849 "/fonts/source/jknappen/ec/"))
2850 (revision %texlive-revision)))
2851 (sha256
2852 (base32
2853 "12av65fbz9xiashm09c9m1fj1mijxls5xspd7652ry1n5s0nixy4"))))
2854 (build-system gnu-build-system)
2855 (arguments
2856 `(#:modules ((guix build gnu-build-system)
2857 (guix build utils)
2858 (srfi srfi-1)
2859 (srfi srfi-26))
2860 #:tests? #f ; no tests
2861 #:phases
2862 (modify-phases %standard-phases
2863 (delete 'configure)
2864 (replace 'build
2865 (lambda* (#:key inputs #:allow-other-keys)
2866 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
2867 ;; Tell mf where to find mf.base
2868 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
2869 ;; Tell mf where to look for source files
2870 (setenv "MFINPUTS"
2871 (string-append (getcwd) ":"
2872 mf "/share/texmf-dist/metafont/base:"
2873 (assoc-ref inputs "texlive-fonts-cm")
2874 "/share/texmf-dist/fonts/source/public/cm")))
2875 (mkdir "build")
2876 (every (lambda (font)
2877 (format #t "building font ~a\n" font)
2878 (zero? (system* "mf" "-progname=mf"
2879 "-output-directory=build"
2880 (string-append "\\"
2881 "mode:=ljfour; "
2882 "mag:=1; "
2883 "batchmode; "
2884 "input " (basename font ".mf")))))
2885 (find-files "." "[0-9]+\\.mf$"))))
2886 (replace 'install
2887 (lambda* (#:key outputs #:allow-other-keys)
2888 (let* ((out (assoc-ref outputs "out"))
2889 (tfm (string-append
2890 out "/share/texmf-dist/fonts/tfm/jknappen/ec"))
2891 (mf (string-append
2892 out "/share/texmf-dist/fonts/source/jknappen/ec")))
2893 (for-each (cut install-file <> tfm)
2894 (find-files "build" "\\.*"))
2895 (for-each (cut install-file <> mf)
2896 (find-files "." "\\.mf"))
2897 #t))))))
2898 (native-inputs
2899 `(("texlive-bin" ,texlive-bin)
2900 ("texlive-metafont-base" ,texlive-metafont-base)
2901 ("texlive-fonts-cm" ,texlive-fonts-cm)))
2902 (home-page "https://www.ctan.org/pkg/ec")
2903 (synopsis "Computer modern fonts in T1 and TS1 encodings")
2904 (description
2905 "The EC fonts are European Computer Modern Fonts, supporting the complete
2906 LaTeX T1 encoding defined at the 1990 TUG conference hold at Cork/Ireland.
2907 These fonts are intended to be stable with no changes being made to the tfm
2908 files. The set also contains a Text Companion Symbol font, called @code{tc},
2909 featuring many useful characters needed in text typesetting, for example
2910 oldstyle digits, currency symbols (including the newly created Euro symbol),
2911 the permille sign, copyright, trade mark and servicemark as well as a copyleft
2912 sign, and many others. Recent releases of LaTeX2e support the EC fonts. The
2913 EC fonts supersede the preliminary version released as the DC fonts. The
2914 fonts are available in (traced) Adobe Type 1 format, as part of the
2915 @code{cm-super} bundle. The other Computer Modern-style T1-encoded Type 1
2916 set, Latin Modern, is not actually a direct development of the EC set, and
2917 differs from the EC in a number of particulars.")
2918 (license (license:fsf-free "https://www.tug.org/svn/texlive/tags/\
2919 texlive-2017.1/Master/texmf-dist/doc/fonts/ec/copyrite.txt"))))
2920
2921 (define-public texlive-fonts-rsfs
2922 (package
2923 (name "texlive-fonts-rsfs")
2924 (version (number->string %texlive-revision))
2925 (source (origin
2926 (method svn-fetch)
2927 (uri (svn-reference
2928 (url (string-append "svn://www.tug.org/texlive/tags/"
2929 %texlive-tag "/Master/texmf-dist/"
2930 "/fonts/source/public/rsfs/"))
2931 (revision %texlive-revision)))
2932 (sha256
2933 (base32
2934 "0r12pn02r4a955prcvq0048nifh86ihlcgvw3pppqqvfngv34l5h"))))
2935 (build-system gnu-build-system)
2936 (arguments
2937 `(#:modules ((guix build gnu-build-system)
2938 (guix build utils)
2939 (srfi srfi-1)
2940 (srfi srfi-26))
2941 #:tests? #f ; no tests
2942 #:phases
2943 (modify-phases %standard-phases
2944 (delete 'configure)
2945 (replace 'build
2946 (lambda* (#:key inputs #:allow-other-keys)
2947 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
2948 ;; Tell mf where to find mf.base
2949 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
2950 ;; Tell mf where to look for source files
2951 (setenv "MFINPUTS"
2952 (string-append (getcwd) ":"
2953 mf "/share/texmf-dist/metafont/base:"
2954 (assoc-ref inputs "texlive-fonts-cm")
2955 "/share/texmf-dist/fonts/source/public/cm")))
2956 (mkdir "build")
2957 (every (lambda (font)
2958 (format #t "building font ~a\n" font)
2959 (zero? (system* "mf" "-progname=mf"
2960 "-output-directory=build"
2961 (string-append "\\"
2962 "mode:=ljfour; "
2963 "mag:=1; "
2964 "batchmode; "
2965 "input " (basename font ".mf")))))
2966 (find-files "." "[0-9]+\\.mf$"))))
2967 (replace 'install
2968 (lambda* (#:key outputs #:allow-other-keys)
2969 (let* ((out (assoc-ref outputs "out"))
2970 (tfm (string-append
2971 out "/share/texmf-dist/fonts/tfm/public/rsfs"))
2972 (mf (string-append
2973 out "/share/texmf-dist/fonts/source/public/rsfs")))
2974 (for-each (cut install-file <> tfm)
2975 (find-files "build" "\\.*"))
2976 (for-each (cut install-file <> mf)
2977 (find-files "." "\\.mf"))
2978 #t))))))
2979 (native-inputs
2980 `(("texlive-bin" ,texlive-bin)
2981 ("texlive-metafont-base" ,texlive-metafont-base)
2982 ("texlive-fonts-cm" ,texlive-fonts-cm)))
2983 (home-page "https://www.ctan.org/pkg/rsfs")
2984 (synopsis "Ralph Smith's Formal Script font")
2985 (description
2986 "The fonts provide uppercase formal script letters for use as symbols in
2987 scientific and mathematical typesetting (in contrast to the informal script
2988 fonts such as that used for the calligraphic symbols in the TeX maths symbol
2989 font). The fonts are provided as Metafont source, and as derived Adobe Type 1
2990 format. LaTeX support, for using these fonts in mathematics, is available via
2991 one of the packages @code{calrsfs} and @code{mathrsfs}.")
2992 (license (license:fsf-free "http://mirrors.ctan.org/fonts/rsfs/README"))))
2993
2994 (define-public texlive-latex-eso-pic
2995 (package
2996 (name "texlive-latex-eso-pic")
2997 (version (number->string %texlive-revision))
2998 (source (origin
2999 (method svn-fetch)
3000 (uri (texlive-ref "latex" "eso-pic"))
3001 (sha256
3002 (base32
3003 "1xvmms28mvvfpks9x7lfya2xhh5k8jy3qnlih1mzcnf156xnb89z"))))
3004 (build-system texlive-build-system)
3005 (arguments '(#:tex-directory "latex/eso-pic"))
3006 (home-page "https://www.ctan.org/pkg/eso-pic")
3007 (synopsis "Add picture commands (or backgrounds) to every page")
3008 (description
3009 "The package adds one or more user commands to LaTeX's @code{shipout}
3010 routine, which may be used to place the output at fixed positions. The
3011 @code{grid} option may be used to find the correct places.")
3012 (license license:lppl1.3+)))
3013
3014 (define-public texlive-latex-eepic
3015 (package
3016 (name "texlive-latex-eepic")
3017 (version (number->string %texlive-revision))
3018 (source (origin
3019 (method svn-fetch)
3020 (uri (svn-reference
3021 (url (string-append "svn://www.tug.org/texlive/tags/"
3022 %texlive-tag "/Master/texmf-dist/"
3023 "/tex/latex/eepic"))
3024 (revision %texlive-revision)))
3025 (sha256
3026 (base32
3027 "1c68gvh021pvybg07apsd2xhq2ljbg80kq94wh71drdga3c2zqjw"))))
3028 (build-system trivial-build-system)
3029 (arguments
3030 `(#:modules ((guix build utils))
3031 #:builder
3032 (begin
3033 (use-modules (guix build utils))
3034 (let ((target (string-append (assoc-ref %outputs "out")
3035 "/share/texmf-dist/tex/latex/eepic")))
3036 (mkdir-p target)
3037 (copy-recursively (assoc-ref %build-inputs "source") target)
3038 #t))))
3039 (home-page "https://www.ctan.org/pkg/eepic")
3040 (synopsis "Extensions to epic and the LaTeX drawing tools")
3041 (description
3042 "Extensions to @code{epic} and the LaTeX picture drawing environment,
3043 include the drawing of lines at any slope, the drawing of circles in any
3044 radii, and the drawing of dotted and dashed lines much faster with much less
3045 TeX memory, and providing several new commands for drawing ellipses, arcs,
3046 splines, and filled circles and ellipses. The package uses @code{tpic}
3047 @code{\\special} commands.")
3048 (license license:public-domain)))
3049
3050 (define-public texlive-latex-enumitem
3051 (package
3052 (name "texlive-latex-enumitem")
3053 (version (number->string %texlive-revision))
3054 (source (origin
3055 (method svn-fetch)
3056 (uri (svn-reference
3057 (url (string-append "svn://www.tug.org/texlive/tags/"
3058 %texlive-tag "/Master/texmf-dist/"
3059 "/tex/latex/enumitem"))
3060 (revision %texlive-revision)))
3061 (file-name (string-append name "-" version "-checkout"))
3062 (sha256
3063 (base32
3064 "0q24b1bkdi9l6bw787bpggww83jh2vj8955aw2m5yccqbx4vgr5r"))))
3065 (build-system trivial-build-system)
3066 (arguments
3067 `(#:modules ((guix build utils))
3068 #:builder
3069 (begin
3070 (use-modules (guix build utils))
3071 (let ((target (string-append (assoc-ref %outputs "out")
3072 "/share/texmf-dist/tex/latex/enumitem")))
3073 (mkdir-p target)
3074 (copy-recursively (assoc-ref %build-inputs "source") target)
3075 #t))))
3076 (home-page "https://www.ctan.org/pkg/enumitem")
3077 (synopsis "Customize basic list environments")
3078 (description
3079 "This package is intended to ease customizing the three basic list
3080 environments: @code{enumerate}, @code{itemize} and @code{description}. It
3081 extends their syntax to allow an optional argument where a set of parameters
3082 in the form @code{key=value} are available, for example:
3083 @code{\\begin{itemize}[itemsep=1ex,leftmargin=1cm]}.")
3084 (license license:lppl1.3+)))
3085
3086 (define-public texlive-latex-multirow
3087 (package
3088 (name "texlive-latex-multirow")
3089 (version (number->string %texlive-revision))
3090 (source (origin
3091 (method svn-fetch)
3092 (uri (texlive-ref "latex" "multirow"))
3093 (sha256
3094 (base32
3095 "0qlxy47f1f8plgch3jqfsnrdgpyz20sz46yp33i2jwvf9hvfczf0"))))
3096 (build-system texlive-build-system)
3097 (arguments '(#:tex-directory "latex/multirow"))
3098 (home-page "https://www.ctan.org/pkg/multirow")
3099 (synopsis "Create tabular cells spanning multiple rows")
3100 (description
3101 "The package provides tools for creating tabular cells spanning multiple
3102 rows. It has a lot of flexibility, including an option for specifying an
3103 entry at the \"natural\" width of its text.")
3104 (license license:lppl1.3+)))
3105
3106 (define-public texlive-latex-overpic
3107 (package
3108 (name "texlive-latex-overpic")
3109 (version (number->string %texlive-revision))
3110 (source (origin
3111 (method svn-fetch)
3112 (uri (svn-reference
3113 (url (string-append "svn://www.tug.org/texlive/tags/"
3114 %texlive-tag "/Master/texmf-dist/"
3115 "/tex/latex/overpic"))
3116 (revision %texlive-revision)))
3117 (sha256
3118 (base32
3119 "0m29q9qdb00558b7g2i7iw6w62n5s46yx81j8m99qkv77magk4fm"))))
3120 (build-system trivial-build-system)
3121 (arguments
3122 `(#:modules ((guix build utils))
3123 #:builder
3124 (begin
3125 (use-modules (guix build utils))
3126 (let ((target (string-append (assoc-ref %outputs "out")
3127 "/share/texmf-dist/tex/latex/overpic")))
3128 (mkdir-p target)
3129 (copy-recursively (assoc-ref %build-inputs "source") target)
3130 #t))))
3131 (home-page "https://www.ctan.org/pkg/overpic")
3132 (synopsis "Combine LaTeX commands over included graphics")
3133 (description
3134 "The @code{overpic} environment is a cross between the LaTeX
3135 @code{picture} environment and the @code{\\includegraphics} command of
3136 @code{graphicx}. The resulting picture environment has the same dimensions as
3137 the included graphic. LaTeX commands can be placed on the graphic at defined
3138 positions; a grid for orientation is available.")
3139 (license license:lppl1.0+)))
3140
3141 (define-public texlive-latex-parskip
3142 (package
3143 (name "texlive-latex-parskip")
3144 (version (number->string %texlive-revision))
3145 (source (origin
3146 (method svn-fetch)
3147 (uri (svn-reference
3148 (url (string-append "svn://www.tug.org/texlive/tags/"
3149 %texlive-tag "/Master/texmf-dist/"
3150 "/tex/latex/parskip"))
3151 (revision %texlive-revision)))
3152 (file-name (string-append name "-" version "-checkout"))
3153 (sha256
3154 (base32
3155 "14r6h9hqb0qgccxj5l1208694fx8sb8avmgzps36lsbbpszl7i7m"))))
3156 (build-system trivial-build-system)
3157 (arguments
3158 `(#:modules ((guix build utils))
3159 #:builder
3160 (begin
3161 (use-modules (guix build utils))
3162 (let ((target (string-append (assoc-ref %outputs "out")
3163 "/share/texmf-dist/tex/latex/parskip")))
3164 (mkdir-p target)
3165 (copy-recursively (assoc-ref %build-inputs "source") target)
3166 #t))))
3167 (home-page "https://www.ctan.org/pkg/parskip")
3168 (synopsis "Layout with zero \\parindent, non-zero \\parskip")
3169 (description
3170 "Simply changing @code{\\parskip} and @code{\\parindent} leaves a layout
3171 that is untidy; this package (though it is no substitute for a properly
3172 designed class) helps alleviate this untidiness.")
3173 (license license:lppl)))
3174
3175 (define-public texlive-latex-pdfpages
3176 (package
3177 (name "texlive-latex-pdfpages")
3178 (version (number->string %texlive-revision))
3179 (source (origin
3180 (method svn-fetch)
3181 (uri (texlive-ref "latex" "pdfpages"))
3182 (sha256
3183 (base32
3184 "06p5smfq66559ppdnmkl3hp8534x84ywbscimsiir4gllpya3i9h"))))
3185 (build-system texlive-build-system)
3186 (arguments '(#:tex-directory "latex/pdfpages"))
3187 (home-page "https://www.ctan.org/pkg/pdfpages")
3188 (synopsis "Include PDF documents in LaTeX")
3189 (description
3190 "This package simplifies the inclusion of external multi-page PDF
3191 documents in LaTeX documents. Pages may be freely selected and it is possible
3192 to put several logical pages onto each sheet of paper. Furthermore a lot of
3193 hypertext features like hyperlinks and article threads are provided. The
3194 package supports pdfTeX (pdfLaTeX) and VTeX. With VTeX it is even possible to
3195 use this package to insert PostScript files, in addition to PDF files.")
3196 (license license:lppl1.3+)))
3197
3198 (define-public texlive-fonts-stmaryrd
3199 (package
3200 (name "texlive-fonts-stmaryrd")
3201 (version (number->string %texlive-revision))
3202 (source (origin
3203 (method svn-fetch)
3204 (uri (texlive-ref "fonts" "stmaryrd"))
3205 (sha256
3206 (base32
3207 "08pn4ca3vl6qm9l3wm5h5iyjsrg411kkm1yana329xwg2j14s9n6"))))
3208 (build-system texlive-build-system)
3209 (arguments
3210 '(#:tex-directory "latex/stmaryrd"
3211 #:phases
3212 (modify-phases %standard-phases
3213 (add-after 'configure 'patch-ins
3214 (lambda _
3215 (substitute* "stmaryrd.ins"
3216 (("^%% LaTeX2e.*") "\\input docstrip\n")
3217 (("fontdef\\}\\}" line)
3218 (string-append line "\n\\endbatchfile")))
3219 #t)))))
3220 (home-page "https://www.ctan.org/pkg/stmaryrd")
3221 (synopsis "St Mary Road symbols for theoretical computer science")
3222 (description
3223 "The fonts were originally distributed as Metafont sources only, but
3224 Adobe Type 1 versions are also now available. Macro support is provided for
3225 use under LaTeX; the package supports the @code{only} option (provided by the
3226 @code{somedefs} package) to restrict what is loaded, for those who don't need
3227 the whole font.")
3228 (license license:lppl)))
3229
3230 (define-public texlive-latex-subfigure
3231 (package
3232 (name "texlive-latex-subfigure")
3233 (version (number->string %texlive-revision))
3234 (source (origin
3235 (method svn-fetch)
3236 (uri (texlive-ref "latex" "subfigure"))
3237 (sha256
3238 (base32
3239 "15spcl5wb7w269qd6y596vp4yi8sa5ppcx8w4z2i9kyp02r3a0yb"))))
3240 (build-system texlive-build-system)
3241 (arguments '(#:tex-directory "latex/subfigure"))
3242 (home-page "https://www.ctan.org/pkg/subfigure")
3243 (synopsis "Figures divided into subfigures")
3244 (description
3245 "This (deprecated) package provides support for the manipulation and
3246 reference of small or \"sub\" figures and tables within a single figure or
3247 table environment. It is convenient to use this package when your subfigures
3248 are to be separately captioned, referenced, or are to be included in the
3249 List-of-Figures. A new @code{\\subfigure} command is introduced which can be
3250 used inside a figure environment for each subfigure. An optional first
3251 argument is used as the caption for that subfigure. The package is now
3252 considered obsolete: it was superseded by @code{subfig}, but users may find
3253 the more recent @code{subcaption} package more satisfactory.")
3254 (license license:lppl)))
3255
3256 (define-public texlive-latex-tabulary
3257 (package
3258 (name "texlive-latex-tabulary")
3259 (version (number->string %texlive-revision))
3260 (source (origin
3261 (method svn-fetch)
3262 (uri (texlive-ref "latex" "tabulary"))
3263 (file-name (string-append name "-" version "-checkout"))
3264 (sha256
3265 (base32
3266 "1adkdx2zkk42g82nqf57lv1nc1z7kwl13jmy8vpcsizsa0xdnx9n"))))
3267 (build-system texlive-build-system)
3268 (arguments '(#:tex-directory "latex/tabulary"))
3269 (home-page "https://www.ctan.org/pkg/tabulary")
3270 (synopsis "Tabular with variable width columns balanced")
3271 (description
3272 "The package defines a @code{tabular*}-like environment, @code{tabulary},
3273 taking a \"total width\" argument as well as the column specifications. The
3274 environment uses column types @code{L}, @code{C}, @code{R} and @code{J} for
3275 variable width columns (@code{\\raggedright}, @code{\\centering},
3276 @code{\\raggedleft}, and normally justified). In contrast to
3277 @code{tabularx}'s @code{X} columns, the width of each column is weighted
3278 according to the natural width of the widest cell in the column.")
3279 (license license:lppl)))
3280
3281 (define-public texlive-latex-threeparttable
3282 (package
3283 (name "texlive-latex-threeparttable")
3284 (version (number->string %texlive-revision))
3285 (source (origin
3286 (method svn-fetch)
3287 (uri (svn-reference
3288 (url (string-append "svn://www.tug.org/texlive/tags/"
3289 %texlive-tag "/Master/texmf-dist/"
3290 "/tex/latex/threeparttable"))
3291 (revision %texlive-revision)))
3292 (sha256
3293 (base32
3294 "10vy9k150w2lviw8h22s2mcykff38xci653m5823s2vv44pwbmzq"))))
3295 (build-system trivial-build-system)
3296 (arguments
3297 `(#:modules ((guix build utils))
3298 #:builder
3299 (begin
3300 (use-modules (guix build utils))
3301 (let ((target (string-append (assoc-ref %outputs "out")
3302 "/share/texmf-dist/tex/latex/threeparttable")))
3303 (mkdir-p target)
3304 (copy-recursively (assoc-ref %build-inputs "source") target)
3305 #t))))
3306 (home-page "https://www.ctan.org/pkg/threeparttable")
3307 (synopsis "Tables with captions and notes all the same width")
3308 (description
3309 "This package facilitates tables with titles (captions) and notes. The
3310 title and notes are given a width equal to the body of the table (a
3311 @code{tabular} environment). By itself, a @code{threeparttable} does not
3312 float, but you can put it in a @code{table} or a @code{table*} or some other
3313 environment.")
3314 (license (license:fsf-free "file://threeparttable.sty"))))
3315
3316 (define-public texlive-fonts-txfonts
3317 (package
3318 (name "texlive-fonts-txfonts")
3319 (version (number->string %texlive-revision))
3320 (source (origin
3321 (method svn-fetch)
3322 (uri (svn-reference
3323 (url (string-append "svn://www.tug.org/texlive/tags/"
3324 %texlive-tag "/Master/texmf-dist/"
3325 "/tex/latex/txfonts"))
3326 (revision %texlive-revision)))
3327 (file-name (string-append name "-" version "-checkout"))
3328 (sha256
3329 (base32
3330 "0jl921qdphg8i7bkfprackn3xd4gmvxckc526nmzqsmahqkavgg2"))))
3331 (build-system trivial-build-system)
3332 (arguments
3333 `(#:modules ((guix build utils)
3334 (ice-9 match))
3335 #:builder
3336 (begin
3337 (use-modules (guix build utils)
3338 (ice-9 match))
3339 (let ((root (string-append (assoc-ref %outputs "out")
3340 "/share/texmf-dist/"))
3341 (pkgs '(("source" . "tex/latex/txfonts")
3342 ("txfonts-vf" . "fonts/tfm/public/txfonts")
3343 ("txfonts-afm" . "fonts/afm/public/txfonts")
3344 ("txfonts-tfm" . "fonts/tfm/public/txfonts")
3345 ("txfonts-type1" . "fonts/type1/public/txfonts")
3346 ("txfonts-enc" . "fonts/enc/dvips/txfonts")
3347 ("txfonts-map" . "fonts/map/dvips/txfonts"))))
3348 (for-each (match-lambda
3349 ((pkg . dir)
3350 (let ((target (string-append root dir)))
3351 (mkdir-p target)
3352 (copy-recursively (assoc-ref %build-inputs pkg)
3353 target))))
3354 pkgs)
3355 #t))))
3356 (native-inputs
3357 `(("txfonts-tfm"
3358 ,(origin
3359 (method svn-fetch)
3360 (uri (svn-reference
3361 (url (string-append "svn://www.tug.org/texlive/tags/"
3362 %texlive-tag "/Master/texmf-dist/"
3363 "/fonts/tfm/public/txfonts"))
3364 (revision %texlive-revision)))
3365 (file-name (string-append name "-tfm-" version "-checkout"))
3366 (sha256
3367 (base32
3368 "12ffmbrp48ap35qa3b4mi6ckif9q2vf7972jxh5dc1yzykhla2xv"))))
3369 ("txfonts-vf"
3370 ,(origin
3371 (method svn-fetch)
3372 (uri (svn-reference
3373 (url (string-append "svn://www.tug.org/texlive/tags/"
3374 %texlive-tag "/Master/texmf-dist/"
3375 "/fonts/vf/public/txfonts"))
3376 (revision %texlive-revision)))
3377 (file-name (string-append name "-vf-" version "-checkout"))
3378 (sha256
3379 (base32
3380 "04acyfdwvxpfx4l2xh2bpzdmpvwdf2pzbs7a236b0xckz2jvc1ci"))))
3381 ("txfonts-afm"
3382 ,(origin
3383 (method svn-fetch)
3384 (uri (svn-reference
3385 (url (string-append "svn://www.tug.org/texlive/tags/"
3386 %texlive-tag "/Master/texmf-dist/"
3387 "/fonts/afm/public/txfonts"))
3388 (revision %texlive-revision)))
3389 (file-name (string-append name "-afm-" version "-checkout"))
3390 (sha256
3391 (base32
3392 "1705klz51pnqzcs89s3521b84b6c89wlczflsh0vci66nl155yis"))))
3393 ("txfonts-type1"
3394 ,(origin
3395 (method svn-fetch)
3396 (uri (svn-reference
3397 (url (string-append "svn://www.tug.org/texlive/tags/"
3398 %texlive-tag "/Master/texmf-dist/"
3399 "/fonts/type1/public/txfonts"))
3400 (revision %texlive-revision)))
3401 (file-name (string-append name "-type1-" version "-checkout"))
3402 (sha256
3403 (base32
3404 "0ajwr7zb6ch3gxd0g8p2i4llhy2wr9a9saz6jq6hm6fxf4pgl5h3"))))
3405 ("txfonts-map"
3406 ,(origin
3407 (method svn-fetch)
3408 (uri (svn-reference
3409 (url (string-append "svn://www.tug.org/texlive/tags/"
3410 %texlive-tag "/Master/texmf-dist/"
3411 "/fonts/map/dvips/txfonts"))
3412 (revision %texlive-revision)))
3413 (file-name (string-append name "-map-" version "-checkout"))
3414 (sha256
3415 (base32
3416 "0kamr8a9x24jakas3v09dgv7kkpybj3i7qv4vz1iyypqr6kk1raj"))))
3417 ("txfonts-enc"
3418 ,(origin
3419 (method svn-fetch)
3420 (uri (svn-reference
3421 (url (string-append "svn://www.tug.org/texlive/tags/"
3422 %texlive-tag "/Master/texmf-dist/"
3423 "/fonts/enc/dvips/txfonts"))
3424 (revision %texlive-revision)))
3425 (file-name (string-append name "-enc-" version "-checkout"))
3426 (sha256
3427 (base32
3428 "1bal5fhw0xlhl37ayv8vlnqnsn1y82kadzfjhbgr223blspp4zsj"))))))
3429 (home-page "https://www.ctan.org/pkg/threeparttable")
3430 (synopsis "Times-like fonts in support of mathematics")
3431 (description
3432 "Txfonts supplies virtual text roman fonts using Adobe Times (or URW
3433 NimbusRomNo9L) with some modified and additional text symbols in the OT1, T1,
3434 and TS1 encodings; maths alphabets using Times/URW Nimbus; maths fonts
3435 providing all the symbols of the Computer Modern and AMS fonts, including all
3436 the Greek capital letters from CMR; and additional maths fonts of various
3437 other symbols.
3438
3439 The set is complemented by a sans-serif set of text fonts, based on
3440 Helvetica/NimbusSanL, and a monospace set.
3441
3442 All the fonts are in Type 1 format (AFM and PFB files), and are supported by
3443 TeX metrics (VF and TFM files) and macros for use with LaTeX.")
3444 ;; Any version of the GPL with font exception.
3445 (license license:gpl3+)))
3446
3447 (define-public texlive-fonts-iwona
3448 (package
3449 (name "texlive-fonts-iwona")
3450 (version "0.995b")
3451 (source (origin
3452 (method url-fetch)
3453 (uri (string-append "http://jmn.pl/pliki/Iwona-tex-"
3454 (string-map (lambda (c)
3455 (if (char=? c #\.)
3456 #\_ c))
3457 version)
3458 ".zip"))
3459 (sha256
3460 (base32
3461 "13684iqx5granpc5rfvqnmyvdpgpbr1x9y7i7y7bcaq0qxv7ph1x"))))
3462 (build-system trivial-build-system)
3463 (arguments
3464 `(#:modules ((guix build utils))
3465 #:builder
3466 (begin
3467 (use-modules (guix build utils))
3468 (let ((target (string-append (assoc-ref %outputs "out")
3469 "/share/texmf-dist/"))
3470 (unzip (string-append (assoc-ref %build-inputs "unzip")
3471 "/bin/unzip")))
3472 (system* unzip (assoc-ref %build-inputs "source"))
3473 (mkdir-p target)
3474 (copy-recursively "iwona" target)))))
3475 (native-inputs
3476 `(("unzip" ,unzip)))
3477 (home-page "http://jmn.pl/en/kurier-i-iwona/")
3478 (synopsis "Sans-serif typeface for TeX")
3479 (description "Iwona is a two-element sans-serif typeface. It was created
3480 as an alternative version of the Kurier typeface, which was designed in 1975
3481 for a diploma in typeface design at the Warsaw Academy of Fine Arts under the
3482 supervision of Roman Tomaszewski. Kurier was designed for linotype
3483 typesetting of newspapers and similar periodicals. The Iwona fonts are an
3484 alternative version of the Kurier fonts. The difference lies in the absence
3485 of ink traps which typify the Kurier font.")
3486 (license license:gfl1.0)))
3487
3488 (define-public texlive-latex-titlesec
3489 (package
3490 (name "texlive-latex-titlesec")
3491 (version (number->string %texlive-revision))
3492 (source (origin
3493 (method svn-fetch)
3494 (uri (svn-reference
3495 (url (string-append "svn://www.tug.org/texlive/tags/"
3496 %texlive-tag "/Master/texmf-dist/"
3497 "/tex/latex/titlesec"))
3498 (revision %texlive-revision)))
3499 (sha256
3500 (base32
3501 "04nmkhqx6jxcxx9a30zbcd5smxi5fd0cbp132bki7fnvhspnhg21"))))
3502 (build-system trivial-build-system)
3503 (arguments
3504 `(#:modules ((guix build utils))
3505 #:builder
3506 (begin
3507 (use-modules (guix build utils))
3508 (let ((target (string-append (assoc-ref %outputs "out")
3509 "/share/texmf-dist/tex/latex/titlesec")))
3510 (mkdir-p target)
3511 (copy-recursively (assoc-ref %build-inputs "source") target)
3512 #t))))
3513 (home-page "https://www.ctan.org/pkg/titlesec")
3514 (synopsis "Select alternative section titles")
3515 (description
3516 "This package provides an interface to sectioning commands for selection
3517 from various title styles, e.g. for marginal titles and to change the font of
3518 all headings with a single command, also providing simple one-step page
3519 styles. It also includes a package to change the page styles when there are
3520 floats in a page. You may assign headers/footers to individual floats, too.")
3521 (license license:lppl)))
3522
3523 (define-public texlive-latex-type1cm
3524 (package
3525 (name "texlive-latex-type1cm")
3526 (version (number->string %texlive-revision))
3527 (source (origin
3528 (method svn-fetch)
3529 (uri (texlive-ref "latex" "type1cm"))
3530 (file-name (string-append name "-" version "-checkout"))
3531 (sha256
3532 (base32
3533 "1lvxrqfwcwa4p31zyfm80gr05v8c28xybv5ri79zi2ngz6834z12"))))
3534 (build-system texlive-build-system)
3535 (arguments '(#:tex-directory "latex/type1cm"))
3536 (home-page "https://www.ctan.org/pkg/type1cm")
3537 (synopsis "Arbitrary size font selection in LaTeX")
3538 (description
3539 "LaTeX, by default, restricts the sizes at which you can use its default
3540 computer modern fonts, to a fixed set of discrete sizes (effectively, a set
3541 specified by Knuth). The @code{type1cm} package removes this restriction;
3542 this is particularly useful when using scalable versions of the CM
3543 fonts (Bakoma, or the versions from BSR/Y&Y, or True Type versions from Kinch,
3544 PCTeX, etc.). In fact, since modern distributions will automatically generate
3545 any bitmap font you might need, @code{type1cm} has wider application than just
3546 those using scaleable versions of the fonts. Note that the LaTeX distribution
3547 now contains a package @code{fix-cm},f which performs the task of
3548 @code{type1cm}, as well as doing the same job for T1- and TS1-encoded
3549 @code{ec} fonts.")
3550 (license license:lppl)))
3551
3552 (define-public texlive-latex-lh
3553 (package
3554 (name "texlive-latex-lh")
3555 (version (number->string %texlive-revision))
3556 (source (origin
3557 (method svn-fetch)
3558 (uri (texlive-ref "latex" "lh"))
3559 (sha256
3560 (base32
3561 "00gdiwh3sfhh1iimjhpja7lm7k4vzqzql2irgwnpz94qvh25zwi5"))))
3562 (build-system texlive-build-system)
3563 (arguments '(#:tex-directory "latex/lh"))
3564 (home-page "https://www.ctan.org/pkg/lh")
3565 (synopsis "Cyrillic fonts that support LaTeX standard encodings")
3566 (description
3567 "The LH fonts address the problem of the wide variety of alphabets that
3568 are written with Cyrillic-style characters. The fonts are the original basis
3569 of the set of T2* and X2 encodings that are now used when LaTeX users need to
3570 write in Cyrillic languages. Macro support in standard LaTeX encodings is
3571 offered through the latex-cyrillic and t2 bundles, and the package itself
3572 offers support for other (more traditional) encodings. The fonts, in the
3573 standard T2* and X2 encodings are available in Adobe Type 1 format, in the
3574 CM-Super family of fonts. The package also offers its own LaTeX support for
3575 OT2 encoded fonts, CM bright shaped fonts and Concrete shaped fonts.")
3576 (license license:lppl)))
3577
3578 (define-public texlive-metapost
3579 (package
3580 (name "texlive-metapost")
3581 (version (number->string %texlive-revision))
3582 (source (origin
3583 (method svn-fetch)
3584 (uri (svn-reference
3585 (url (string-append "svn://www.tug.org/texlive/tags/"
3586 %texlive-tag "/Master/texmf-dist/"
3587 "/metapost"))
3588 (revision %texlive-revision)))
3589 (sha256
3590 (base32
3591 "03nvjddffiz796wll6axzmgfvynyciy2mqamv20qx252w71vwkwd"))))
3592 (build-system trivial-build-system)
3593 (arguments
3594 `(#:modules ((guix build utils))
3595 #:builder
3596 (begin
3597 (use-modules (guix build utils))
3598 (let ((target (string-append (assoc-ref %outputs "out")
3599 "/share/texmf-dist/metapost")))
3600 (mkdir-p target)
3601 (copy-recursively (assoc-ref %build-inputs "source") target)
3602 #t))))
3603 (home-page "https://www.ctan.org/pkg/metapost")
3604 (synopsis "Create scalable illustrations")
3605 (description
3606 "MetaPost uses a language based on that of Metafont to produce precise
3607 technical illustrations. Its output is scalable PostScript or SVG, rather
3608 than the bitmaps Metafont creates.")
3609 (license license:lppl)))
3610
3611 (define-public texlive-latex-acmart
3612 (package
3613 (name "texlive-latex-acmart")
3614 (version "1.45")
3615 (source (origin
3616 (method svn-fetch)
3617 (uri (texlive-ref "latex" "acmart"))
3618 (sha256
3619 (base32
3620 "10zs8ga88ksypv1v4p6mynmfa7749q2hgxlr4shnwfjd9wrb421q"))
3621 (file-name (string-append name "-" version "-checkout"))))
3622 (build-system texlive-build-system)
3623 (arguments '(#:tex-directory "latex/acmart"))
3624 (home-page "https://www.ctan.org/pkg/acmart")
3625 (synopsis "Class for typesetting publications of ACM")
3626 (description
3627 "This package provides a class for typesetting publications of the
3628 Association for Computing Machinery (ACM).")
3629 (license license:lppl1.3+)))
3630
3631 (define-public texlive-latex-varwidth
3632 (package
3633 (name "texlive-latex-varwidth")
3634 (version (number->string %texlive-revision))
3635 (source (origin
3636 (method svn-fetch)
3637 (uri (svn-reference
3638 (url (string-append "svn://www.tug.org/texlive/tags/"
3639 %texlive-tag "/Master/texmf-dist/"
3640 "/tex/latex/varwidth"))
3641 (revision %texlive-revision)))
3642 (file-name (string-append name "-" version "-checkout"))
3643 (sha256
3644 (base32
3645 "1bmz9ap0ffyg7qry2xi7lki06qx4809w028xvk88cl66h7p46g52"))))
3646 (build-system trivial-build-system)
3647 (arguments
3648 `(#:modules ((guix build utils))
3649 #:builder
3650 (begin
3651 (use-modules (guix build utils))
3652 (let ((target (string-append (assoc-ref %outputs "out")
3653 "/share/texmf-dist/tex/latex/varwidth")))
3654 (mkdir-p target)
3655 (copy-recursively (assoc-ref %build-inputs "source") target)
3656 #t))))
3657 (home-page "https://www.ctan.org/pkg/varwidth")
3658 (synopsis "Variable-width minipage")
3659 (description
3660 "The @code{varwidth} environment is superficially similar to
3661 @code{minipage}, but the specified width is just a maximum value — the box may
3662 get a narrower “natural” width.")
3663 (license license:lppl)))
3664
3665 (define-public texlive-latex-wasysym
3666 (package
3667 (name "texlive-latex-wasysym")
3668 (version (number->string %texlive-revision))
3669 (source (origin
3670 (method svn-fetch)
3671 (uri (texlive-ref "latex" "wasysym"))
3672 (sha256
3673 (base32
3674 "1sgwbfwjjf70g54hh93gsd9jp9nm67w6n74x9d72a56n07jbk5hv"))))
3675 (build-system texlive-build-system)
3676 (arguments '(#:tex-directory "latex/wasysym"))
3677 (home-page "https://www.ctan.org/pkg/wasysym")
3678 (synopsis "LaTeX support file to use the WASY2 fonts")
3679 (description
3680 "The wasy2WASY2 (Waldi Symbol) font by Roland Waldi provides many glyphs
3681 like male and female symbols and astronomical symbols, as well as the complete
3682 lasy font set and other odds and ends. The wasysym package implements an easy
3683 to use interface for these symbols.")
3684 (license license:lppl)))
3685
3686 (define-public texlive-latex-wrapfig
3687 (package
3688 (name "texlive-latex-wrapfig")
3689 (version (number->string %texlive-revision))
3690 (source (origin
3691 (method svn-fetch)
3692 (uri (svn-reference
3693 (url (string-append "svn://www.tug.org/texlive/tags/"
3694 %texlive-tag "/Master/texmf-dist/"
3695 "/tex/latex/wrapfig"))
3696 (revision %texlive-revision)))
3697 (file-name (string-append name "-" version "-checkout"))
3698 (sha256
3699 (base32
3700 "16xpyl0csmmwndz1xhzqfg9l0zcsnqxslsixsqkwd4zsvfj30sv4"))))
3701 (build-system trivial-build-system)
3702 (arguments
3703 `(#:modules ((guix build utils))
3704 #:builder
3705 (begin
3706 (use-modules (guix build utils))
3707 (let ((target (string-append (assoc-ref %outputs "out")
3708 "/share/texmf-dist/tex/latex/wrapfig")))
3709 (mkdir-p target)
3710 (copy-recursively (assoc-ref %build-inputs "source") target)
3711 #t))))
3712 (home-page "https://www.ctan.org/pkg/wrapfig")
3713 (synopsis "Produces figures which text can flow around")
3714 (description
3715 "This package allows figures or tables to have text wrapped around them.
3716 It does not work in combination with list environments, but can be used in a
3717 @code{parbox} or @code{minipage}, and in two-column format.")
3718 (license license:lppl)))
3719
3720 (define-public texlive-latex-ucs
3721 (package
3722 (name "texlive-latex-ucs")
3723 (version (number->string %texlive-revision))
3724 (source (origin
3725 (method svn-fetch)
3726 (uri (svn-reference
3727 (url (string-append "svn://www.tug.org/texlive/tags/"
3728 %texlive-tag "/Master/texmf-dist/"
3729 "/tex/latex/ucs"))
3730 (revision %texlive-revision)))
3731 (file-name (string-append name "-" version "-checkout"))
3732 (sha256
3733 (base32
3734 "0rrxwi60wmz5dfjifl4fwk66plf7wix85qnhfv4ylvmj6qi6hw37"))))
3735 (build-system trivial-build-system)
3736 (arguments
3737 `(#:modules ((guix build utils))
3738 #:builder
3739 (begin
3740 (use-modules (guix build utils))
3741 (let ((target (string-append (assoc-ref %outputs "out")
3742 "/share/texmf-dist/tex/latex/ucs")))
3743 (mkdir-p target)
3744 (copy-recursively (assoc-ref %build-inputs "source") target)
3745 #t))))
3746 (home-page "https://www.ctan.org/pkg/ucs")
3747 (synopsis "Extended UTF-8 input encoding support for LaTeX")
3748 (description
3749 "The bundle provides the @code{ucs} package, and @code{utf8x.def},
3750 together with a large number of support files. The @code{utf8x.def}
3751 definition file for use with @code{inputenc} covers a wider range of Unicode
3752 characters than does @code{utf8.def} in the LaTeX distribution. The package
3753 provides facilities for efficient use of its large sets of Unicode characters.
3754 Glyph production may be controlled by various options, which permits use of
3755 non-ASCII characters when coding mathematical formulae. Note that the bundle
3756 previously had an alias “unicode”; that alias has now been withdrawn, and no
3757 package of that name now exists.")
3758 (license license:lppl1.3+)))
3759
3760 (define-public texlive-latex-preview
3761 (package
3762 (name "texlive-latex-preview")
3763 (version (number->string %texlive-revision))
3764 (source (origin
3765 (method svn-fetch)
3766 (uri (texlive-ref "latex" "preview"))
3767 (file-name (string-append name "-" version "-checkout"))
3768 (sha256
3769 (base32
3770 "0j6fff6q0ca96nwfdgay2jm55792z4q9aa0rczmiw2qccyg5n2dv"))))
3771 (build-system texlive-build-system)
3772 (arguments
3773 '(#:tex-directory "latex/preview"
3774 #:phases
3775 (modify-phases %standard-phases
3776 (add-after 'unpack 'remove-generated-file
3777 (lambda _
3778 (delete-file "preview.drv")
3779 #t)))))
3780 (home-page "https://www.ctan.org/pkg/preview")
3781 (synopsis "Extract bits of a LaTeX source for output")
3782 (description
3783 "The main purpose of the preview package is the extraction of selected
3784 elements from a LaTeX source, like formulas or graphics, into separate
3785 pages of a DVI file. A flexible and convenient interface allows it to
3786 specify what commands and constructs should be extracted. This works
3787 with DVI files postprocessed by either Dvips and Ghostscript or
3788 dvipng, but it also works when you are using PDFTeX for generating PDF
3789 files.")
3790 (license license:gpl3+)))
3791
3792 (define-public texlive-latex-acronym
3793 (package
3794 (name "texlive-latex-acronym")
3795 (version (number->string %texlive-revision))
3796 (source (origin
3797 (method svn-fetch)
3798 (uri (texlive-ref "latex" "acronym"))
3799 (file-name (string-append name "-" version "-checkout"))
3800 (sha256
3801 (base32
3802 "0jmasg40bk53zdd2jc8nc18jvdai3p2wmamy7hwli8gls4nf25qp"))))
3803 (build-system texlive-build-system)
3804 (arguments '(#:tex-directory "latex/acronym"))
3805 (home-page "https://www.ctan.org/pkg/acronym")
3806 (synopsis "Expand acronyms at least once")
3807 (description
3808 "This package ensures that all acronyms used in the text are spelled out
3809 in full at least once. It also provides an environment to build a list of
3810 acronyms used. The package is compatible with PDF bookmarks. The package
3811 requires the suffix package, which in turn requires that it runs under
3812 e-TeX.")
3813 (license license:lppl1.3+)))
3814
3815 (define-public texlive-generic-pdftex
3816 (package
3817 (name "texlive-generic-pdftex")
3818 (version (number->string %texlive-revision))
3819 (source (origin
3820 (method svn-fetch)
3821 (uri (svn-reference
3822 (url (string-append "svn://www.tug.org/texlive/tags/"
3823 %texlive-tag "/Master/texmf-dist/"
3824 "/tex/generic/pdftex"))
3825 (revision %texlive-revision)))
3826 (sha256
3827 (base32
3828 "0k68zmqzs4qvrqxdwsrawbjb14hxqjfamq649azvai0jjxdpkljd"))))
3829 (build-system trivial-build-system)
3830 (arguments
3831 `(#:modules ((guix build utils))
3832 #:builder
3833 (begin
3834 (use-modules (guix build utils))
3835 (let ((target (string-append (assoc-ref %outputs "out")
3836 "/share/texmf-dist/tex/generic/pdftex")))
3837 (mkdir-p target)
3838 (copy-recursively (assoc-ref %build-inputs "source") target)
3839 #t))))
3840 (home-page "https://www.ctan.org/pkg/pdftex")
3841 (synopsis "TeX extension for direct creation of PDF")
3842 (description
3843 "This package provides an extension of TeX which can be configured to
3844 directly generate PDF documents instead of DVI.")
3845 (license license:gpl2+)))
3846
3847 (define texlive-texmf
3848 (package
3849 (name "texlive-texmf")
3850 (version "2017")
3851 (source texlive-texmf-src)
3852 (build-system gnu-build-system)
3853 (inputs
3854 `(("texlive-bin" ,texlive-bin)
3855 ("lua" ,lua)
3856 ("perl" ,perl)
3857 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
3858 ("ruby" ,ruby)
3859 ("tcsh" ,tcsh)))
3860 (arguments
3861 `(#:modules ((guix build gnu-build-system)
3862 (guix build utils)
3863 (srfi srfi-26))
3864
3865 ;; This package takes 4 GiB, which we can't afford to distribute from
3866 ;; our servers.
3867 #:substitutable? #f
3868
3869 #:phases
3870 (modify-phases (map (cut assq <> %standard-phases)
3871 '(set-paths unpack patch-source-shebangs))
3872 (add-after 'patch-source-shebangs 'install
3873 (lambda* (#:key outputs #:allow-other-keys)
3874 (let ((share (string-append (assoc-ref outputs "out") "/share")))
3875 (mkdir-p share)
3876 (system* "mv" "texmf-dist" share))))
3877 (add-after 'install 'texmf-config
3878 (lambda* (#:key inputs outputs #:allow-other-keys)
3879 (let* ((out (assoc-ref outputs "out"))
3880 (share (string-append out "/share"))
3881 (texmfroot (string-append share "/texmf-dist/web2c"))
3882 (texmfcnf (string-append texmfroot "/texmf.cnf"))
3883 (texlive-bin (assoc-ref inputs "texlive-bin"))
3884 (texbin (string-append texlive-bin "/bin"))
3885 (tlpkg (string-append texlive-bin "/share/tlpkg")))
3886 ;; Register SHARE as TEXMFROOT in texmf.cnf.
3887 (substitute* texmfcnf
3888 (("TEXMFROOT = \\$SELFAUTOPARENT")
3889 (string-append "TEXMFROOT = " share))
3890 (("TEXMFLOCAL = \\$SELFAUTOGRANDPARENT/texmf-local")
3891 "TEXMFLOCAL = $SELFAUTODIR/share/texmf-local")
3892 (("!!\\$TEXMFLOCAL") "$TEXMFLOCAL"))
3893 ;; Register paths in texmfcnf.lua, needed for context.
3894 (substitute* (string-append texmfroot "/texmfcnf.lua")
3895 (("selfautodir:") out)
3896 (("selfautoparent:") (string-append share "/")))
3897 ;; Set path to TeXLive Perl modules
3898 (setenv "PERL5LIB"
3899 (string-append (getenv "PERL5LIB") ":" tlpkg))
3900 ;; Configure the texmf-dist tree; inspired from
3901 ;; http://slackbuilds.org/repository/13.37/office/texlive/
3902 (setenv "PATH" (string-append (getenv "PATH") ":" texbin))
3903 (setenv "TEXMFCNF" texmfroot)
3904 (system* "updmap-sys" "--nohash" "--syncwithtrees")
3905 (system* "mktexlsr")
3906 (system* "fmtutil-sys" "--all")))))))
3907 (properties `((max-silent-time . 9600))) ; don't time out while grafting
3908 (synopsis "TeX Live, a package of the TeX typesetting system")
3909 (description
3910 "TeX Live provides a comprehensive TeX document production system.
3911 It includes all the major TeX-related programs, macro packages, and fonts
3912 that are free software, including support for many languages around the
3913 world.
3914
3915 This package contains the complete tree of texmf-dist data.")
3916 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
3917 (home-page "https://www.tug.org/texlive/")))
3918
3919 (define-public texlive
3920 (package
3921 (name "texlive")
3922 (version "2017")
3923 (source #f)
3924 (build-system trivial-build-system)
3925 (inputs `(("bash" ,bash) ; for wrap-program
3926 ("texlive-bin" ,texlive-bin)
3927 ("texlive-texmf" ,texlive-texmf)))
3928 (native-search-paths
3929 (list (search-path-specification
3930 (variable "TEXMFLOCAL")
3931 (files '("share/texmf-local")))))
3932 (arguments
3933 `(#:modules ((guix build utils))
3934 #:builder
3935 ;; Build the union of texlive-bin and texlive-texmf, but take the
3936 ;; conflicting subdirectory share/texmf-dist from texlive-texmf.
3937 (begin
3938 (use-modules (guix build utils))
3939 (let ((out (assoc-ref %outputs "out"))
3940 (bin (assoc-ref %build-inputs "texlive-bin"))
3941 (texmf (assoc-ref %build-inputs "texlive-texmf"))
3942 (bash (assoc-ref %build-inputs "bash")))
3943 (mkdir out)
3944 (with-directory-excursion out
3945 (for-each
3946 (lambda (name)
3947 (symlink (string-append bin "/" name) name))
3948 '("include" "lib"))
3949 (mkdir "bin")
3950 (with-directory-excursion "bin"
3951 (setenv "PATH" (string-append bash "/bin"))
3952 (for-each
3953 (lambda (name)
3954 (symlink name (basename name))
3955 (wrap-program
3956 (basename name)
3957 `("TEXMFCNF" =
3958 (,(string-append texmf "/share/texmf-dist/web2c")))))
3959 (find-files (string-append bin "/bin/") "")))
3960 (mkdir "share")
3961 (with-directory-excursion "share"
3962 (for-each
3963 (lambda (name)
3964 (symlink (string-append bin "/share/" name) name))
3965 '("info" "man" "tlpkg"))
3966 (for-each
3967 (lambda (name)
3968 (symlink (string-append texmf "/share/" name) name))
3969 '("texmf-dist" "texmf-var"))))))))
3970 (synopsis "TeX Live, a package of the TeX typesetting system")
3971 (description
3972 "TeX Live provides a comprehensive TeX document production system.
3973 It includes all the major TeX-related programs, macro packages, and fonts
3974 that are free software, including support for many languages around the
3975 world.
3976
3977 This package contains the complete TeX Live distribution.")
3978 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
3979 (home-page "https://www.tug.org/texlive/")))
3980
3981 (define-public perl-text-bibtex
3982 (package
3983 (name "perl-text-bibtex")
3984 (version "0.85")
3985 (source
3986 (origin
3987 (method url-fetch)
3988 (uri (string-append "mirror://cpan/authors/id/A/AM/AMBS/Text-BibTeX-"
3989 version ".tar.gz"))
3990 (sha256
3991 (base32
3992 "036kxgbn1jf70pfm2lmjlzjwnhbkd888fp5lyvmkjpdd15gla18h"))))
3993 (build-system perl-build-system)
3994 (arguments
3995 `(#:phases
3996 (modify-phases %standard-phases
3997 (add-after 'unpack 'add-output-directory-to-rpath
3998 (lambda* (#:key outputs #:allow-other-keys)
3999 (substitute* "inc/MyBuilder.pm"
4000 (("-Lbtparse" line)
4001 (string-append "-Wl,-rpath="
4002 (assoc-ref outputs "out") "/lib " line)))
4003 #t))
4004 (add-after 'unpack 'install-libraries-to-/lib
4005 (lambda* (#:key outputs #:allow-other-keys)
4006 (substitute* "Build.PL"
4007 (("lib64") "lib"))
4008 #t)))))
4009 (native-inputs
4010 `(("perl-capture-tiny" ,perl-capture-tiny)
4011 ("perl-config-autoconf" ,perl-config-autoconf)
4012 ("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
4013 ("perl-module-build" ,perl-module-build)))
4014 (home-page "http://search.cpan.org/dist/Text-BibTeX")
4015 (synopsis "Interface to read and parse BibTeX files")
4016 (description "@code{Text::BibTeX} is a Perl library for reading, parsing,
4017 and processing BibTeX files. @code{Text::BibTeX} gives you access to the data
4018 at many different levels: you may work with BibTeX entries as simple field to
4019 string mappings, or get at the original form of the data as a list of simple
4020 values (strings, macros, or numbers) pasted together.")
4021 (license license:perl-license)))
4022
4023 (define-public biber
4024 (package
4025 (name "biber")
4026 (version "2.7")
4027 (source (origin
4028 (method url-fetch)
4029 (uri (string-append "https://github.com/plk/biber/archive/v"
4030 version ".tar.gz"))
4031 (file-name (string-append name "-" version ".tar.gz"))
4032 (sha256
4033 (base32
4034 "17wd80jg98qyddhvz4cin8779ycvppaf2va77r1lyvymjz6w9bx0"))))
4035 (build-system perl-build-system)
4036 (arguments
4037 `(#:phases
4038 (modify-phases %standard-phases
4039 (add-after 'install 'wrap-programs
4040 (lambda* (#:key outputs #:allow-other-keys)
4041 (let* ((out (assoc-ref outputs "out"))
4042 (perl5lib (getenv "PERL5LIB")))
4043 (wrap-program (string-append out "/bin/biber")
4044 `("PERL5LIB" ":" prefix
4045 (,(string-append perl5lib ":" out
4046 "/lib/perl5/site_perl")))))
4047 #t)))))
4048 (inputs
4049 `(("perl-autovivification" ,perl-autovivification)
4050 ("perl-class-accessor" ,perl-class-accessor)
4051 ("perl-data-dump" ,perl-data-dump)
4052 ("perl-data-compare" ,perl-data-compare)
4053 ("perl-data-uniqid" ,perl-data-uniqid)
4054 ("perl-datetime-format-builder" ,perl-datetime-format-builder)
4055 ("perl-datetime-calendar-julian" ,perl-datetime-calendar-julian)
4056 ("perl-file-slurp" ,perl-file-slurp)
4057 ("perl-ipc-cmd" ,perl-ipc-cmd)
4058 ("perl-ipc-run3" ,perl-ipc-run3)
4059 ("perl-list-allutils" ,perl-list-allutils)
4060 ("perl-list-moreutils" ,perl-list-moreutils)
4061 ("perl-mozilla-ca" ,perl-mozilla-ca)
4062 ("perl-regexp-common" ,perl-regexp-common)
4063 ("perl-log-log4perl" ,perl-log-log4perl)
4064 ;; We cannot use perl-unicode-collate here, because otherwise the
4065 ;; hardcoded hashes in the tests would differ. See
4066 ;; https://mail-archive.com/debian-bugs-dist@lists.debian.org/msg1469249.html
4067 ;;("perl-unicode-collate" ,perl-unicode-collate)
4068 ("perl-unicode-normalize" ,perl-unicode-normalize)
4069 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
4070 ("perl-encode-eucjpascii" ,perl-encode-eucjpascii)
4071 ("perl-encode-jis2k" ,perl-encode-jis2k)
4072 ("perl-encode-hanextra" ,perl-encode-hanextra)
4073 ("perl-xml-libxml" ,perl-xml-libxml)
4074 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)
4075 ("perl-xml-libxslt" ,perl-xml-libxslt)
4076 ("perl-xml-writer" ,perl-xml-writer)
4077 ("perl-sort-key" ,perl-sort-key)
4078 ("perl-text-csv" ,perl-text-csv)
4079 ("perl-text-csv-xs" ,perl-text-csv-xs)
4080 ("perl-text-roman" ,perl-text-roman)
4081 ("perl-uri" ,perl-uri)
4082 ("perl-text-bibtex" ,perl-text-bibtex)
4083 ("perl-libwww" ,perl-libwww)
4084 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
4085 ("perl-business-isbn" ,perl-business-isbn)
4086 ("perl-business-issn" ,perl-business-issn)
4087 ("perl-business-ismn" ,perl-business-ismn)
4088 ("perl-lingua-translit" ,perl-lingua-translit)))
4089 (native-inputs
4090 `(("perl-config-autoconf" ,perl-config-autoconf)
4091 ("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
4092 ("perl-module-build" ,perl-module-build)
4093 ;; for tests
4094 ("perl-file-which" ,perl-file-which)
4095 ("perl-test-more" ,perl-test-most) ; FIXME: "more" would be sufficient
4096 ("perl-test-differences" ,perl-test-differences)))
4097 (home-page "http://biblatex-biber.sourceforge.net/")
4098 (synopsis "Backend for the BibLaTeX citation management tool")
4099 (description "Biber is a BibTeX replacement for users of biblatex. Among
4100 other things it comes with full Unicode support.")
4101 (license license:artistic2.0)))
4102
4103 (define-public rubber
4104 (package
4105 (name "rubber")
4106 (version "1.1")
4107 (source (origin
4108 (method url-fetch)
4109 (uri (list (string-append "https://launchpad.net/rubber/trunk/"
4110 version "/+download/rubber-"
4111 version ".tar.gz")
4112 (string-append "http://ebeffara.free.fr/pub/rubber-"
4113 version ".tar.gz")))
4114 (sha256
4115 (base32
4116 "1xbkv8ll889933gyi2a5hj7hhh216k04gn8fwz5lfv5iz8s34gbq"))))
4117 (build-system gnu-build-system)
4118 (arguments '(#:tests? #f)) ; no `check' target
4119 (inputs `(("texinfo" ,texinfo)
4120 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
4121 ("which" ,which)))
4122 (home-page "https://launchpad.net/rubber")
4123 (synopsis "Wrapper for LaTeX and friends")
4124 (description
4125 "Rubber is a program whose purpose is to handle all tasks related to the
4126 compilation of LaTeX documents. This includes compiling the document itself,
4127 of course, enough times so that all references are defined, and running BibTeX
4128 to manage bibliographic references. Automatic execution of dvips to produce
4129 PostScript documents is also included, as well as usage of pdfLaTeX to produce
4130 PDF documents.")
4131 (license license:gpl2+)))
4132
4133 (define-public texmaker
4134 (package
4135 (name "texmaker")
4136 (version "4.5")
4137 (source (origin
4138 (method url-fetch)
4139 (uri (string-append "http://www.xm1math.net/texmaker/texmaker-"
4140 version ".tar.bz2"))
4141 (sha256
4142 (base32
4143 "056njk6j8wma23mlp7xa3rgfaxx0q8ynwx8wkmj7iy0b85p9ds9c"))))
4144 (build-system gnu-build-system)
4145 (arguments
4146 `(#:phases
4147 (modify-phases %standard-phases
4148 ;; Qt has its own configuration utility.
4149 (replace 'configure
4150 (lambda* (#:key outputs #:allow-other-keys)
4151 (let ((out (assoc-ref outputs "out")))
4152 (zero? (system* "qmake"
4153 (string-append "PREFIX=" out)
4154 (string-append "DESKTOPDIR=" out
4155 "/share/applications")
4156 (string-append "ICONDIR=" out "/share/pixmaps")
4157 "texmaker.pro"))))))))
4158 (inputs
4159 `(("poppler-qt5" ,poppler-qt5)
4160 ("qtbase" ,qtbase)
4161 ("qtscript" ,qtscript)
4162 ("qtwebkit" ,qtwebkit)
4163 ("zlib" ,zlib)))
4164 (native-inputs
4165 `(("pkg-config" ,pkg-config)))
4166 (home-page "http://www.xm1math.net/texmaker/")
4167 (synopsis "LaTeX editor")
4168 (description "Texmaker is a program that integrates many tools needed to
4169 develop documents with LaTeX, in a single application.")
4170 (license license:gpl2+)))
4171
4172
4173 (define-public teximpatient
4174 (package
4175 (name "teximpatient")
4176 (version "2.4")
4177 (source (origin
4178 (method url-fetch)
4179 (uri (string-append "mirror://gnu/" name "/" name "-"
4180 version ".tar.gz"))
4181 (sha256
4182 (base32
4183 "0h56w22d99dh4fgld4ssik8ggnmhmrrbnrn1lnxi1zr0miphn1sd"))))
4184 (build-system gnu-build-system)
4185 (arguments
4186 `(#:phases
4187 (modify-phases %standard-phases
4188 (delete 'check)
4189 ;; Unfortunately some mistakes have been made in packaging.
4190 ;; Work around them here ...
4191 (replace 'unpack
4192 (lambda* (#:key inputs outputs #:allow-other-keys)
4193 (let ((srcdir "teximpatient-2.4"))
4194 (system* "tar" "-xzf" (assoc-ref inputs "source")
4195 (string-append "--one-top-level=" srcdir))
4196 (delete-file (string-append srcdir "/book.pdf"))
4197 (install-file (car
4198 (find-files
4199 (assoc-ref inputs "automake")
4200 "^install-sh$"))
4201 srcdir)
4202 (chdir srcdir)))))))
4203 (native-inputs
4204 `(("texlive" ,texlive)
4205 ("automake" ,automake)))
4206 (home-page "https://www.gnu.org/software/teximpatient/")
4207 (synopsis "Book on TeX, plain TeX and Eplain")
4208 (description "@i{TeX for the Impatient} is a ~350 page book on TeX,
4209 plain TeX, and Eplain, originally written by Paul Abrahams, Kathryn Hargreaves,
4210 and Karl Berry.")
4211 (license license:fdl1.3+)))