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 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>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages tex)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system perl)
32 #:use-module (guix build-system trivial)
33 #:use-module (guix build-system texlive)
34 #:use-module (guix utils)
35 #:use-module (guix git-download)
36 #:use-module (guix svn-download)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages bash)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages fontutils)
42 #:use-module (gnu packages gd)
43 #:use-module (gnu packages ghostscript)
44 #:use-module (gnu packages gtk)
45 #:use-module (gnu packages icu4c)
46 #:use-module (gnu packages image)
47 #:use-module (gnu packages lua)
48 #:use-module (gnu packages multiprecision)
49 #:use-module (gnu packages pdf)
50 #:use-module (gnu packages perl)
51 #:use-module (gnu packages pkg-config)
52 #:use-module (gnu packages python)
53 #:use-module (gnu packages qt)
54 #:use-module (gnu packages ruby)
55 #:use-module (gnu packages shells)
56 #:use-module (gnu packages base)
57 #:use-module (gnu packages web)
58 #:use-module (gnu packages xml)
59 #:use-module (gnu packages xorg)
60 #:use-module (gnu packages xdisorg)
61 #:autoload (gnu packages texinfo) (texinfo)
62 #:use-module (ice-9 ftw)
63 #:use-module (ice-9 match)
64 #:use-module ((srfi srfi-1) #:hide (zip)))
66 (define texlive-extra-src
69 (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523-extra.tar.xz")
71 "0q4a92zmwhn4ry6xgrp4k8wq11ax2sg9rg9yrsrdkr719y0x887a"))))
73 (define texlive-texmf-src
76 (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523b-texmf.tar.xz")
77 (patches (search-patches "texlive-texmf-CVE-2016-10243.patch"))
78 (patch-flags '("-p2"))
80 "1dv8vgfzpczqw82hv9g7a8djhhyzywljmrarlcyy6g2qi5q51glr"))))
82 (define-public texlive-bin
89 (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523b-source.tar.xz")
91 "1v91vahxlxkdra0qz3f132vvx5d9cx2jy84yl1hkch0agyj2rcx8"))))
92 (build-system gnu-build-system)
94 `(("texlive-extra-src" ,texlive-extra-src)
96 ("fontconfig" ,fontconfig)
97 ("fontforge" ,fontforge)
98 ("freetype" ,freetype)
101 ("ghostscript" ,ghostscript)
102 ("graphite2" ,graphite2)
103 ("harfbuzz" ,harfbuzz)
105 ("libpaper" ,libpaper)
114 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
119 ("zziplib" ,zziplib)))
121 `(("pkg-config" ,pkg-config)))
123 `(#:out-of-source? #t
125 `("--disable-native-texlive-build"
126 "--with-system-cairo"
127 "--with-system-freetype2"
130 "--with-system-graphite2"
131 "--with-system-harfbuzz"
133 "--with-system-libgs"
134 "--with-system-libpaper"
135 "--with-system-libpng"
137 "--with-system-pixman"
138 "--with-system-poppler"
139 "--with-system-potrace"
140 "--with-system-teckit"
143 "--with-system-zziplib")
145 ;; Disable tests on mips64 to cope with a failure of luajiterr.test.
146 ;; XXX FIXME fix luajit properly on mips64.
147 #:tests? ,(not (string-prefix? "mips64" (or (%current-target-system)
150 (modify-phases %standard-phases
151 (add-after 'install 'postint
152 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
153 (let* ((out (assoc-ref outputs "out"))
154 (share (string-append out "/share"))
155 (texlive-extra (assoc-ref inputs "texlive-extra-src"))
156 (unpack (assoc-ref %standard-phases 'unpack))
157 (patch-source-shebangs
158 (assoc-ref %standard-phases 'patch-source-shebangs)))
159 ;; Create symbolic links for the latex variants and their
161 (with-directory-excursion (string-append out "/bin/")
163 '("pdftex" "pdftex" "xetex" "luatex")
164 '("latex" "pdflatex" "xelatex" "lualatex")))
165 (with-directory-excursion (string-append share "/man/man1/")
166 (symlink "luatex.1" "lualatex.1"))
167 ;; Unpack texlive-extra and install tlpkg.
168 (mkdir "texlive-extra")
169 (with-directory-excursion "texlive-extra"
170 (apply unpack (list #:source texlive-extra))
171 (apply patch-source-shebangs (list #:source texlive-extra))
172 (system* "mv" "tlpkg" share))))))))
173 (synopsis "TeX Live, a package of the TeX typesetting system")
175 "TeX Live provides a comprehensive TeX document production system.
176 It includes all the major TeX-related programs, macro packages, and fonts
177 that are free software, including support for many languages around the
180 This package contains the binaries.")
181 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
182 (home-page "https://www.tug.org/texlive/")))
184 (define-public texlive-dvips
186 (name "texlive-dvips")
187 (version (number->string %texlive-revision))
191 (url (string-append "svn://www.tug.org/texlive/tags/"
192 %texlive-tag "/Master/texmf-dist/"
194 (revision %texlive-revision)))
197 "0fcy2hpapbj01ncpjj3v39yhr0jjxb6rm13qaxjjw66s3vydxls1"))))
198 (build-system trivial-build-system)
200 `(#:modules ((guix build utils))
203 (use-modules (guix build utils))
204 (let ((target (string-append (assoc-ref %outputs "out")
205 "/share/texmf-dist/dvips")))
207 (copy-recursively (assoc-ref %build-inputs "source") target)
209 (home-page "http://www.ctan.org/pkg/dvips")
210 (synopsis "DVI to PostScript drivers")
211 (description "This package provides files needed for converting DVI files
213 ;; Various free software licenses apply to individual files.
214 (license (list license:lppl1.3c+
218 (define-public texlive-generic-unicode-data
220 (name "texlive-generic-unicode-data")
221 (version (number->string %texlive-revision))
225 (url (string-append "svn://www.tug.org/texlive/tags/"
226 %texlive-tag "/Master/texmf-dist/"
227 "/tex/generic/unicode-data"))
228 (revision %texlive-revision)))
231 "0ivrhp6jz31pl4z841g4ws41lmvdiwz4sslmhf02inlib79gz6r2"))))
232 (build-system trivial-build-system)
234 `(#:modules ((guix build utils))
237 (use-modules (guix build utils))
238 (let ((target (string-append (assoc-ref %outputs "out")
239 "/share/texmf-dist/tex/generic/unicode-data")))
241 (copy-recursively (assoc-ref %build-inputs "source") target)
243 (home-page "http://www.ctan.org/pkg/unicode-data")
244 (synopsis "Unicode data and loaders for TeX")
245 (description "This bundle provides generic access to Unicode Consortium
246 data for TeX use. It contains a set of text files provided by the Unicode
247 Consortium which are currently all from Unicode 8.0.0, with the exception of
248 @code{MathClass.txt} which is not currently part of the Unicode Character
249 Database. Accompanying these source data are generic TeX loader files
250 allowing this data to be used as part of TeX runs, in particular in building
251 format files. Currently there are two loader files: one for general character
252 set up and one for initializing XeTeX character classes as has been carried
253 out to date by @code{unicode-letters.tex}. ")
254 (license license:lppl1.3c+)))
256 (define-public texlive-generic-dehyph-exptl
258 (name "texlive-generic-dehyph-exptl")
259 (version (number->string %texlive-revision))
263 (url (string-append "svn://www.tug.org/texlive/tags/"
264 %texlive-tag "/Master/texmf-dist/"
265 "/tex/generic/dehyph-exptl"))
266 (revision %texlive-revision)))
269 "1l9wgv99qq0ysvlxqpj4g8bl0dywbzra4g8m2kmpg2fb0i0hczap"))))
270 (build-system trivial-build-system)
272 `(#:modules ((guix build utils))
275 (use-modules (guix build utils))
276 (let ((target (string-append (assoc-ref %outputs "out")
277 "/share/texmf-dist/tex/generic/dehyph-exptl")))
279 (copy-recursively (assoc-ref %build-inputs "source") target)
281 (home-page "http://projekte.dante.de/Trennmuster/WebHome")
282 (synopsis "Hyphenation patterns for German")
283 (description "The package provides experimental hyphenation patterns for
284 the German language, covering both traditional and reformed orthography. The
285 patterns can be used with packages Babel and hyphsubst from the Oberdiek
287 ;; Hyphenation patterns are under the Expat license; documentation is
289 (license (list license:expat license:lppl))))
291 (define-public texlive-generic-tex-ini-files
293 (name "texlive-generic-tex-ini-files")
294 (version (number->string %texlive-revision))
298 (url (string-append "svn://www.tug.org/texlive/tags/"
299 %texlive-tag "/Master/texmf-dist/"
300 "/tex/generic/tex-ini-files"))
301 (revision %texlive-revision)))
304 "1wh42n1lmzcvi3g6mm31nm3yd5ha5bl260xqc444jg1m9fdp3wz5"))))
305 (build-system trivial-build-system)
307 `(#:modules ((guix build utils))
310 (use-modules (guix build utils))
311 (let ((target (string-append (assoc-ref %outputs "out")
312 "/share/texmf-dist/tex/generic/tex-ini-files")))
314 (copy-recursively (assoc-ref %build-inputs "source") target)
316 (home-page "http://ctan.org/pkg/tex-ini-files")
317 (synopsis "Files for creating TeX formats")
318 (description "This bundle provides a collection of model \".ini\" files
319 for creating TeX formats. These files are commonly used to introduced
320 distribution-dependent variations in formats. They are also used to
321 allow existing format source files to be used with newer engines, for example
322 to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
323 (license license:public-domain)))
325 (define-public texlive-generic-hyph-utf8
327 (name "texlive-generic-hyph-utf8")
328 (version (number->string %texlive-revision))
332 (url (string-append "svn://www.tug.org/texlive/tags/"
333 %texlive-tag "/Master/texmf-dist/"
334 "/tex/generic/hyph-utf8"))
335 (revision %texlive-revision)))
338 "0ghizcz7ps16dzfqf66wwg5i181assc6qsm0g7g5dbmp909931vi"))))
339 (build-system trivial-build-system)
341 `(#:modules ((guix build utils))
344 (use-modules (guix build utils))
345 (let ((target (string-append (assoc-ref %outputs "out")
346 "/share/texmf-dist/tex/generic/hyph-utf8")))
348 (copy-recursively (assoc-ref %build-inputs "source") target)
350 (home-page "http://ctan.org/pkg/hyph-utf8")
351 (synopsis "Hyphenation patterns expressed in UTF-8")
352 (description "Modern native UTF-8 engines such as XeTeX and LuaTeX need
353 hyphenation patterns in UTF-8 format, whereas older systems require
354 hyphenation patterns in the 8-bit encoding of the font in use (such encodings
355 are codified in the LaTeX scheme with names like OT1, T2A, TS1, OML, LY1,
356 etc). The present package offers a collection of conversions of existing
357 patterns to UTF-8 format, together with converters for use with 8-bit fonts in
358 older systems. Since hyphenation patterns for Knuthian-style TeX systems are
359 only read at iniTeX time, it is hoped that the UTF-8 patterns, with their
360 converters, will completely supplant the older patterns.")
361 ;; Individual files each have their own license. Most of these files are
362 ;; independent hyphenation patterns.
363 (license (list license:lppl1.0+
378 license:public-domain
381 (define-public texlive-metafont-base
383 (name "texlive-metafont-base")
384 (version (number->string %texlive-revision))
388 (url (string-append "svn://www.tug.org/texlive/tags/"
389 %texlive-tag "/Master/texmf-dist/"
391 (revision %texlive-revision)))
394 "1yl4n8cn5xqk2nc22zgzq6ymd7bhm6xx1mz3azip7i3ki4bhb5q5"))))
395 (build-system gnu-build-system)
397 `(#:tests? #f ; no test target
399 (modify-phases %standard-phases
402 (lambda* (#:key inputs #:allow-other-keys)
403 (let ((cwd (getcwd)))
405 (string-append cwd "/base:"
412 (with-directory-excursion "build"
413 (zero? (system* "inimf" "mf.mf")))))
415 (lambda* (#:key outputs #:allow-other-keys)
416 (let* ((out (assoc-ref outputs "out"))
417 (base (string-append out "/share/texmf-dist/web2c"))
418 (mf (string-append out "/share/texmf-dist/metafont/base")))
421 (install-file "build/mf.base" base)
422 (copy-recursively "base" mf)
425 `(("texlive-bin" ,texlive-bin)))
426 (home-page "http://www.ctan.org/pkg/metafont")
427 (synopsis "Metafont base files")
428 (description "This package provides the Metafont base files needed to
429 build fonts using the Metafont system.")
430 (license license:knuth)))
432 (define-public texlive-fonts-cm
434 (name "texlive-fonts-cm")
435 (version (number->string %texlive-revision))
439 (url (string-append "svn://www.tug.org/texlive/tags/"
440 %texlive-tag "/Master/texmf-dist/"
441 "/fonts/source/public/cm"))
442 (revision %texlive-revision)))
445 "045k5b9rdmbxpy1a3006l1x96z1rd18vg3cwrvnld9bqybw5qz44"))))
446 (build-system gnu-build-system)
448 `(#:modules ((guix build gnu-build-system)
452 #:tests? #f ; no tests
454 (modify-phases %standard-phases
457 (lambda* (#:key inputs #:allow-other-keys)
458 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
459 ;; Tell mf where to find mf.base
460 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
461 ;; Tell mf where to look for source files
463 (string-append (getcwd) ":"
464 mf "/share/texmf-dist/metafont/base")))
466 (every (lambda (font)
467 (format #t "building font ~a\n" font)
468 (zero? (system* "mf" "-progname=mf"
469 "-output-directory=build"
475 (basename font ".mf")))))
476 (find-files "." "cm(.*[0-9]+.*|inch)\\.mf$"))))
478 (lambda* (#:key outputs #:allow-other-keys)
479 (let* ((out (assoc-ref outputs "out"))
481 out "/share/texmf-dist/fonts/tfm/public/cm"))
483 out "/share/texmf-dist/fonts/source/public/cm")))
484 (for-each (cut install-file <> tfm)
485 (find-files "build" "\\.*"))
486 (for-each (cut install-file <> mf)
487 (find-files "." "\\.mf"))
490 `(("texlive-bin" ,texlive-bin)
491 ("texlive-metafont-base" ,texlive-metafont-base)))
492 (home-page "http://www.ctan.org/pkg/cm")
493 (synopsis "Computer Modern fonts for TeX")
494 (description "This package provides the Computer Modern fonts by Donald
495 Knuth. The Computer Modern font family is a large collection of text,
496 display, and mathematical fonts in a range of styles, based on Monotype Modern
498 (license license:knuth)))
500 (define-public texlive-fonts-knuth-lib
502 (name "texlive-fonts-knuth-lib")
503 (version (number->string %texlive-revision))
507 (url (string-append "svn://www.tug.org/texlive/tags/"
508 %texlive-tag "/Master/texmf-dist/"
509 "/fonts/source/public/knuth-lib"))
510 (revision %texlive-revision)))
513 "0in9aqyi8jkyf9d16z0li50z5fpwj1iwgwm83gmvwqcf7chfs04y"))))
514 (build-system gnu-build-system)
516 `(#:modules ((guix build gnu-build-system)
519 #:tests? #f ; no tests
521 (modify-phases %standard-phases
524 (lambda* (#:key inputs #:allow-other-keys)
525 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
526 ;; Tell mf where to find mf.base
528 (string-append mf "/share/texmf-dist/web2c"))
529 ;; Tell mf where to look for source files
531 (string-append (getcwd) ":"
532 mf "/share/texmf-dist/metafont/base")))
534 (zero? (system* "mf" "-progname=mf"
535 "-output-directory=build"
542 (lambda* (#:key outputs #:allow-other-keys)
543 (let* ((out (assoc-ref outputs "out"))
545 out "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
547 out "/share/texmf-dist/fonts/source/public/knuth-lib")))
548 (for-each (cut install-file <> tfm)
549 (find-files "build" "\\.*"))
550 (for-each (cut install-file <> mf)
551 (find-files "." "\\.mf"))
554 `(("texlive-bin" ,texlive-bin)
555 ("texlive-metafont-base" ,texlive-metafont-base)))
556 (home-page "https://www.ctan.org/pkg/knuth-lib")
557 (synopsis "Small library of METAFONT sources")
558 (description "This is a collection of core TeX and METAFONT macro files
559 from Donald Knuth, including the plain format, plain base, and the MF logo
561 (license license:knuth)))
563 (define-public texlive-fonts-latex
565 (name "texlive-fonts-latex")
566 (version (number->string %texlive-revision))
570 (url (string-append "svn://www.tug.org/texlive/tags/"
571 %texlive-tag "/Master/texmf-dist/"
572 "/fonts/source/public/latex-fonts"))
573 (revision %texlive-revision)))
576 "0ypsm4xv9cw0jckk2qc7gi9hcmhf31mrg56pz3llyx3yd9vq2lps"))))
577 (build-system gnu-build-system)
579 `(#:modules ((guix build gnu-build-system)
583 #:tests? #f ; no tests
585 (modify-phases %standard-phases
588 (lambda* (#:key inputs #:allow-other-keys)
589 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
590 ;; Tell mf where to find mf.base
591 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
592 ;; Tell mf where to look for source files
594 (string-append (getcwd) ":"
595 mf "/share/texmf-dist/metafont/base:"
596 (assoc-ref inputs "texlive-fonts-cm")
597 "/share/texmf-dist/fonts/source/public/cm")))
599 (every (lambda (font)
600 (format #t "building font ~a\n" font)
601 (zero? (system* "mf" "-progname=mf"
602 "-output-directory=build"
608 '("icmcsc10" "icmex10" "icmmi8" "icmsy8" "icmtt8"
609 "ilasy8" "ilcmss8" "ilcmssb8" "ilcmssi8"
610 "lasy5" "lasy6" "lasy7" "lasy8" "lasy9" "lasy10" "lasyb10"
611 "lcircle10" "lcirclew10" "lcmss8" "lcmssb8" "lcmssi8"
612 "line10" "linew10"))))
614 (lambda* (#:key outputs #:allow-other-keys)
615 (let* ((out (assoc-ref outputs "out"))
617 out "/share/texmf-dist/fonts/tfm/public/latex-fonts"))
619 out "/share/texmf-dist/fonts/source/public/latex-fonts")))
620 (for-each (cut install-file <> tfm)
621 (find-files "build" "\\.*"))
622 (for-each (cut install-file <> mf)
623 (find-files "." "\\.mf"))
626 `(("texlive-bin" ,texlive-bin)
627 ("texlive-metafont-base" ,texlive-metafont-base)
628 ("texlive-fonts-cm" ,texlive-fonts-cm)))
629 (home-page "http://www.ctan.org/pkg/latex-fonts")
630 (synopsis "Collection of fonts used in LaTeX distributions")
631 (description "This is a collection of fonts for use with standard LaTeX
632 packages and classes. It includes invisible fonts (for use with the slides
633 class), line and circle fonts (for use in the picture environment) and LaTeX
635 (license license:lppl1.2+)))
637 (define-public texlive-fonts-amsfonts
639 (name "texlive-fonts-amsfonts")
640 (version (number->string %texlive-revision))
644 (url (string-append "svn://www.tug.org/texlive/tags/"
645 %texlive-tag "/Master/texmf-dist/"
646 "/fonts/source/public/amsfonts"))
647 (revision %texlive-revision)))
650 "07h20rvpbdb4k72hzmjkyb29426zr9wxsfp6yd4ajbbpd3vx8grb"))))
651 (build-system gnu-build-system)
653 `(#:modules ((guix build gnu-build-system)
657 #:tests? #f ; no tests
659 (modify-phases %standard-phases
662 (lambda* (#:key inputs #:allow-other-keys)
663 (let ((mf (assoc-ref inputs "texlive-metafont-base"))
665 ;; Tell mf where to find mf.base
666 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
667 ;; Tell mf where to look for source files
669 (string-append cwd ":"
674 mf "/share/texmf-dist/metafont/base:"
675 (assoc-ref inputs "texlive-fonts-cm")
676 "/share/texmf-dist/fonts/source/public/cm")))
678 (every (lambda (font)
679 (format #t "building font ~a\n" (basename font ".mf"))
680 (with-directory-excursion (dirname font)
681 (zero? (system* "mf" "-progname=mf"
682 "-output-directory=../build"
689 (basename font ".mf"))))))
690 (find-files "." "[0-9]+\\.mf$"))))
692 (lambda* (#:key outputs #:allow-other-keys)
693 (let* ((out (assoc-ref outputs "out"))
695 out "/share/texmf-dist/fonts/tfm/public/amsfonts"))
697 out "/share/texmf-dist/fonts/source/public/amsfonts")))
698 (for-each (cut install-file <> tfm)
699 (find-files "build" "\\.*"))
700 (for-each (cut install-file <> mf)
701 (find-files "." "\\.mf"))
704 `(("texlive-fonts-cm" ,texlive-fonts-cm)
705 ("texlive-metafont-base" ,texlive-metafont-base)
706 ("texlive-bin" ,texlive-bin)))
707 (home-page "http://www.ctan.org/pkg/amsfonts")
708 (synopsis "TeX fonts from the American Mathematical Society")
710 "This package provides an extended set of fonts for use in mathematics,
711 including: extra mathematical symbols; blackboard bold letters (uppercase
712 only); fraktur letters; subscript sizes of bold math italic and bold Greek
713 letters; subscript sizes of large symbols such as sum and product; added sizes
714 of the Computer Modern small caps font; cyrillic fonts (from the University of
715 Washington); Euler mathematical fonts. All fonts are provided as Adobe Type 1
716 files, and all except the Euler fonts are provided as Metafont source. The
717 distribution also includes the canonical Type 1 versions of the Computer
718 Modern family of fonts. The Euler fonts are supported by separate packages;
719 details can be found in the documentation.")
720 (license license:silofl1.1)))
722 (define-public texlive-latex-amsfonts
724 (name "texlive-latex-amsfonts")
725 (version (number->string %texlive-revision))
728 (uri (texlive-ref "latex" "amsfonts"))
731 "0slzfv5h2m03b2xvm2sasznz4azh6rgi069z161dja3l8rln79hm"))))
732 (build-system texlive-build-system)
733 (arguments '(#:tex-directory "latex/amsfonts"))
735 `(("texlive-fonts-cm" ,texlive-fonts-cm)
736 ("texlive-metafont-base" ,texlive-metafont-base)))
737 (home-page "http://www.ctan.org/pkg/amsfonts")
738 (synopsis "TeX fonts from the American Mathematical Society")
740 "This package provides basic LaTeX support for the symbol fonts provides
741 by the amsfonts package. It provides @code{amsfonts.sty}, with names of
742 individual symbols defined in @code{amssymb.sty}.")
743 (license license:silofl1.1)))
745 ;; This provides etex.src which is needed to build various formats, including
746 ;; luatex.fmt and pdflatex.fmt
747 (define-public texlive-tex-plain
749 (name "texlive-tex-plain")
750 (version (number->string %texlive-revision))
754 (url (string-append "svn://www.tug.org/texlive/tags/"
755 %texlive-tag "/Master/texmf-dist/"
757 (revision %texlive-revision)))
760 "0mjgl3gscn3ps29yjambz1j9fg81ynnncb96vpprwx4xsijhsns0"))))
761 (build-system trivial-build-system)
763 `(#:modules ((guix build utils))
766 (use-modules (guix build utils))
767 (let ((target (string-append (assoc-ref %outputs "out")
768 "/share/texmf-dist/tex/plain")))
770 (copy-recursively (assoc-ref %build-inputs "source") target)
772 (home-page "https://www.ctan.org/pkg/plain")
773 (synopsis "Plain TeX format and supporting files")
775 "Contains files used to build the Plain TeX format, as described in the
776 TeXbook, together with various supporting files (some also discussed in the
778 (license license:knuth)))
780 (define-public texlive-latex-base
786 (url (string-append "svn://www.tug.org/texlive/tags/"
787 %texlive-tag "/Master/texmf-dist/"
789 (revision %texlive-revision)))
790 (sha256 (base32 hash))))))
792 (name "texlive-latex-base")
793 (version (number->string %texlive-revision))
796 (uri (texlive-ref "latex" "base"))
799 "1h9pir2hz6i9avc4lrl733p3zf4rpkg8537x1zdbhs91hvhikw9k"))))
800 (build-system gnu-build-system)
802 `(#:modules ((guix build gnu-build-system)
807 #:tests? #f ; no tests
809 (modify-phases %standard-phases
812 (lambda* (#:key inputs #:allow-other-keys)
813 ;; Find required fonts
815 (string-append (assoc-ref inputs "texlive-fonts-cm")
816 "/share/texmf-dist/fonts/tfm/public/cm:"
817 (assoc-ref inputs "texlive-fonts-latex")
818 "/share/texmf-dist/fonts/tfm/public/latex-fonts:"
819 (assoc-ref inputs "texlive-fonts-knuth-lib")
820 "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
826 (append-map (match-lambda
830 (eq? 'directory (stat:type stat)))
836 ;; Create an empty texsys.cfg, because latex.ltx wants to include
837 ;; it. This file must exist and it's fine if it's empty.
838 (with-output-to-file "texsys.cfg"
839 (lambda _ (format #t "%")))
843 (and (zero? (system* "luatex" "-ini" "-interaction=batchmode"
844 "-output-directory=build"
846 (zero? (system* "tex" "-ini" "-interaction=batchmode"
847 "-output-directory=web2c"
849 ;; LaTeX, pdfetex/pdftex, and XeTeX require e-TeX, which
850 ;; is enabled only in extended mode (activated with a
851 ;; leading asterisk). We should not use luatex here,
852 ;; because that would make the generated format files
853 ;; incompatible with any other TeX engine.
856 (zero? (system* "latex" "-ini" "-interaction=batchmode"
857 "-output-directory=web2c"
858 "-translate-file=cp227.tcx"
859 (string-append "*" format ".ini"))))
865 (zero? (system* format "-ini" "-interaction=batchmode"
866 "-output-directory=web2c"
867 (string-append "*" format ".ini"))))
872 (zero? (system* "luatex" "-ini" "-interaction=batchmode"
873 "-output-directory=web2c"
874 (string-append format ".ini"))))
875 '("dviluatex" "dvilualatex" "luatex" "lualatex")))))
877 (lambda* (#:key outputs #:allow-other-keys)
878 (let* ((out (assoc-ref outputs "out"))
879 (target (string-append
880 out "/share/texmf-dist/tex/latex/base"))
881 (web2c (string-append
882 out "/share/texmf-dist/web2c")))
885 (for-each delete-file (find-files "." "\\.(log|aux)$"))
886 (for-each (cut install-file <> target)
887 (find-files "build" ".*"))
888 (for-each (cut install-file <> web2c)
889 (find-files "web2c" ".*"))
890 ;; pdftex is really just the same as pdfetex, but since it
891 ;; doesn't have its own format file, we need to copy it.
892 (copy-file "web2c/pdfetex.fmt"
893 (string-append web2c "/pdftex.fmt"))
896 `(("texlive-bin" ,texlive-bin)
897 ("texlive-generic-unicode-data" ,texlive-generic-unicode-data)
898 ("texlive-generic-dehyph-exptl" ,texlive-generic-dehyph-exptl)
899 ("texlive-generic-tex-ini-files" ,texlive-generic-tex-ini-files)
900 ("texlive-latex-latexconfig"
901 ,(texlive-dir "tex/latex/latexconfig/"
902 "1zb3j49cj8p75yph6c8iysjp7qbdvghwf0mn9j0l7qq3qkbz2xaf"))
903 ("texlive-generic-hyph-utf8" ,texlive-generic-hyph-utf8)
904 ("texlive-generic-hyphen"
905 ,(texlive-dir "tex/generic/hyphen/"
906 "0xim36wybw2625yd0zwlp9m2c2xrcybw58gl4rih9nkph0wqwwhd"))
907 ("texlive-generic-ruhyphen"
908 ,(texlive-dir "tex/generic/ruhyphen/"
909 "14rjkpl4zkjqs13rcf9kcd24mn2kx7i1jbdwxq8ds94bi66ylzsd"))
910 ("texlive-generic-ukrhyph"
911 ,(texlive-dir "tex/generic/ukrhyph/"
912 "1cfwdg2rhbayl3w0x1xqd36d45zbc96f029myp13s7cb6kbmbppv"))
913 ("texlive-generic-config"
914 ,(texlive-dir "tex/generic/config/"
915 "19vj088p4kkp6xll0141m4kl6ssgdzhs3g10i232khb07aqiag8s"))
916 ("texlive-tex-plain" ,texlive-tex-plain)
917 ("texlive-fonts-cm" ,texlive-fonts-cm)
918 ("texlive-fonts-latex" ,texlive-fonts-latex)
919 ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib)))
920 (home-page "http://www.ctan.org/pkg/latex-base")
921 (synopsis "Base sources of LaTeX")
923 "This bundle comprises the source of LaTeX itself, together with several
924 packages which are considered \"part of the kernel\". This bundle, together
925 with the required packages, constitutes what every LaTeX distribution should
927 (license license:lppl1.3c+))))
929 (define-public texlive-latex-filecontents
931 (name "texlive-latex-filecontents")
932 (version (number->string %texlive-revision))
935 (uri (texlive-ref "latex" "filecontents"))
938 "0swkbxv8vg0yizadfnvrwjb4cj0pn34v9wm6v7wqq903fdav7k7q"))))
939 (build-system texlive-build-system)
940 (arguments '(#:tex-directory "latex/filecontents"))
941 (home-page "http://www.ctan.org/pkg/filecontents")
942 (synopsis "Extended filecontents and filecontents* environments")
944 "LaTeX2e's @code{filecontents} and @code{filecontents*} environments
945 enable a LaTeX source file to generate external files as it runs through
946 LaTeX. However, there are two limitations of these environments: they refuse
947 to overwrite existing files, and they can only be used in the preamble of a
948 document. The filecontents package removes these limitations, letting you
949 overwrite existing files and letting you use @code{filecontents} /
950 @code{filecontents*} anywhere.")
951 (license license:lppl1.3c+)))
953 (define-public texlive-generic-ifxetex
955 (name "texlive-generic-ifxetex")
956 (version (number->string %texlive-revision))
959 (uri (texlive-ref "generic" "ifxetex"))
962 "0w2xj7n0szavj329kds09q626szkc378p3w0sk022q0ln4ksz86d"))))
963 (build-system texlive-build-system)
965 '(#:tex-directory "generic/ifxetex"
966 #:tex-format "xelatex"))
968 `(("texlive-latex-filecontents" ,texlive-latex-filecontents)))
969 (home-page "http://www.ctan.org/pkg/ifxetex")
970 (synopsis "Am I running under XeTeX?")
972 "This is a simple package which provides an @code{\\ifxetex} conditional,
973 so that other code can determine that it is running under XeTeX. The package
974 requires the e-TeX extensions to the TeX primitive set.")
975 (license license:lppl1.3c+)))
977 (define-public texlive-generic-epsf
979 (name "texlive-generic-epsf")
980 (version (number->string %texlive-revision))
984 (url (string-append "svn://www.tug.org/texlive/tags/"
985 %texlive-tag "/Master/texmf-dist/"
986 "/tex/generic/epsf"))
987 (revision %texlive-revision)))
990 "14w3j81ympyvg8hkk9i1xgr8a0gfnfsb2ki8qqsk5pa051za1xcy"))))
991 (build-system trivial-build-system)
993 `(#:modules ((guix build utils))
996 (use-modules (guix build utils))
997 (let ((target (string-append (assoc-ref %outputs "out")
998 "/share/texmf-dist/tex/generic/epfs")))
1000 (copy-recursively (assoc-ref %build-inputs "source") target)
1002 (home-page "http://www.ctan.org/pkg/epsf")
1003 (synopsis "Simple macros for EPS inclusion")
1005 "This package provides the original (and now obsolescent) graphics
1006 inclusion macros for use with dvips, still widely used by Plain TeX users (in
1007 particular). For LaTeX users, the package is nowadays (rather strongly)
1008 deprecated in favour of the more sophisticated standard LaTeX latex-graphics
1009 bundle of packages. (The latex-graphics bundle is also available to Plain TeX
1010 users, via its Plain TeX version.)")
1011 (license license:public-domain)))
1013 (define-public texlive-latex-fancyvrb
1015 (name "texlive-latex-fancyvrb")
1016 (version (number->string %texlive-revision))
1019 (uri (texlive-ref "latex" "fancyvrb"))
1022 "03l7140y031rr14h02i4z9zqsfvrbn7wzwxbjsrjcgrk6sdr71wv"))))
1023 (build-system texlive-build-system)
1025 '(#:tex-directory "latex/fancyvrb"
1026 ;; We exclude "fvrb-ex" to avoid a dependency on texlive-luaotfload and
1027 ;; thus texlive-luatex-lualibs.
1028 #:build-targets '("fancyvrb.ins")))
1029 (home-page "http://www.ctan.org/pkg/fancyvrb")
1030 (synopsis "Sophisticated verbatim text")
1032 "This package provides tools for the flexible handling of verbatim text
1033 including: verbatim commands in footnotes; a variety of verbatim environments
1034 with many parameters; ability to define new customized verbatim environments;
1035 save and restore verbatim text and environments; write and read files in
1036 verbatim mode; build \"example\" environments (showing both result and
1038 (license license:lppl1.0+)))
1040 (define-public texlive-latex-graphics
1042 (name "texlive-latex-graphics")
1043 (version (number->string %texlive-revision))
1046 (uri (texlive-ref "latex" "graphics"))
1049 "07azyn0b1s49vbdlr6dmygrminxp72ndl24j1091hiiccvrjq3xc"))))
1050 (build-system texlive-build-system)
1052 '(#:tex-directory "latex/graphics"
1054 (modify-phases %standard-phases
1055 (add-after 'install 'install-config
1056 (lambda* (#:key inputs outputs #:allow-other-keys)
1057 (let ((cfg (assoc-ref inputs "graphics-cfg"))
1058 (target (string-append (assoc-ref outputs "out")
1059 "/share/texmf-dist/tex/latex/graphics-cfg")))
1061 (install-file (string-append cfg "/graphics.cfg") target)
1062 (install-file (string-append cfg "/color.cfg") target)
1064 (add-after 'install 'install-defs
1065 (lambda* (#:key inputs outputs #:allow-other-keys)
1066 (let ((def (assoc-ref inputs "graphics-def"))
1067 (target (string-append (assoc-ref outputs "out")
1068 "/share/texmf-dist/tex/latex/graphics-def")))
1070 (copy-recursively def target)
1077 (url "https://github.com/latex3/graphics-cfg.git")
1078 (commit "19d1238af17df376cd46333b229579b0f7f3a41f")))
1081 "12kbgbm52gmmgn8zajb74s8n5rvnxcfdvs3iyj8vcw5vrsw5i6mh"))))
1086 (url (string-append "svn://www.tug.org/texlive/tags/"
1087 %texlive-tag "/Master/texmf-dist/"
1088 "/tex/latex/graphics-def"))
1089 (revision %texlive-revision)))
1092 "0gi4qv6378nl84s8n1yx3hjqvv7r4lza7hpbymbl5rzwgw8qrnyb"))))))
1093 (home-page "http://www.ctan.org/pkg/latex-graphics")
1094 (synopsis "LaTeX standard graphics bundle")
1096 "This is a collection of LaTeX packages for producing color, including
1097 graphics (e.g. PostScript) files, and rotation and scaling of text in LaTeX
1098 documents. It comprises the packages color, graphics, graphicx, trig, epsfig,
1099 keyval, and lscape.")
1100 ;; The configuration files are released under CC0.
1101 (license (list license:lppl1.3c+
1104 (define-public texlive-latex-xcolor
1106 (name "texlive-latex-xcolor")
1107 (version (number->string %texlive-revision))
1110 (uri (texlive-ref "latex" "xcolor"))
1113 "01n613s7bcrd2n4jfawm0k4nn2ny3aaifp2jjfif3lz4sbv31494"))))
1114 (build-system texlive-build-system)
1115 (arguments '(#:tex-directory "latex/xcolor"))
1116 (home-page "http://www.ctan.org/pkg/xcolor")
1117 (synopsis "Driver-independent color extensions for LaTeX and pdfLaTeX")
1119 "The package starts from the basic facilities of the colorcolor package,
1120 and provides easy driver-independent access to several kinds of color tints,
1121 shades, tones, and mixes of arbitrary colors. It allows a user to select a
1122 document-wide target color model and offers complete tools for conversion
1123 between eight color models. Additionally, there is a command for alternating
1124 row colors plus repeated non-aligned material (like horizontal lines) in
1126 (license license:lppl1.2+)))
1128 (define-public texlive-latex-hyperref
1130 (name "texlive-latex-hyperref")
1132 ;; The sources in the TeX Live SVN repository do not contain hluatex.dtx,
1133 ;; so we fetch the release from GitHub.
1136 (uri (string-append "https://github.com/ho-tex/hyperref/"
1137 "archive/release-" version ".tar.gz"))
1138 (file-name (string-append name "-" version ".tar.gz"))
1141 "1d3rmjgzh0025a1dza55zb6nzzlgd1y9snwx45wq1c1vf42m79h2"))))
1142 (build-system texlive-build-system)
1143 (arguments '(#:tex-directory "latex/hyperref"))
1144 (home-page "http://www.ctan.org/pkg/hyperref")
1145 (synopsis "Extensive support for hypertext in LaTeX")
1147 "The hyperref package is used to handle cross-referencing commands in
1148 LaTeX to produce hypertext links in the document. The package provides
1149 backends for the special set defined for HyperTeX DVI processors; for embedded
1150 pdfmark commands for processing by Acrobat Distiller (dvips and dvipsone); for
1151 dviwindo; for PDF control within pdfTeX and dvipdfm; for TeX4ht; and for VTeX
1152 pdf and HTML backends. The package is distributed with the backref and
1153 nameref packages, which make use of the facilities of hyperref.")
1154 (license license:lppl1.3+)))
1156 (define-public texlive-latex-oberdiek
1158 (name "texlive-latex-oberdiek")
1159 (version (number->string %texlive-revision))
1162 (uri (texlive-ref "latex" "oberdiek"))
1165 "0aswvsxgsn709xmvpcg50d2xl7vcy1ckdxb9c1cligqqfjjvviqf"))))
1166 (build-system texlive-build-system)
1168 '(#:tex-directory "latex/oberdiek"
1169 #:build-targets '("oberdiek.ins")
1171 (modify-phases %standard-phases
1172 ;; "ifpdf.ins" is not generated, so we need to process the dtx file.
1173 (add-after 'unpack 'do-not-process-ifpdf.ins
1175 (substitute* "oberdiek.ins"
1176 (("ifpdf.ins") "ifpdf.dtx"))
1178 (home-page "http://www.ctan.org/pkg/oberdiek")
1179 (synopsis "Bundle of packages submitted by Heiko Oberdiek")
1181 "The bundle comprises various LaTeX packages, providing among others:
1182 better accessibility support for PDF files; extensible chemists reaction
1183 arrows; record information about document class(es) used; and many more.")
1184 (license license:lppl1.3+)))
1186 (define-public texlive-latex-tools
1188 (name "texlive-latex-tools")
1189 (version (number->string %texlive-revision))
1192 (uri (texlive-ref "latex" "tools"))
1195 "052a0pch2k5zls5jlay9xxcf93rw3i60a2x28y3ip3rhbsv3xgiz"))))
1196 (build-system texlive-build-system)
1198 '(#:tex-directory "latex/tools"
1199 #:build-targets '("tools.ins")))
1200 (home-page "http://www.ctan.org/pkg/latex-tools")
1201 (synopsis "LaTeX standard tools bundle")
1203 "This package is a collection of (variously) simple tools provided as
1204 part of the LaTeX required tools distribution, comprising the following
1205 packages: afterpage, array, bm, calc, dcolumn, delarray, enumerate, fileerr,
1206 fontsmpl, ftnright, hhline, indentfirst, layout, longtable, multicol,
1207 rawfonts, showkeys, somedefs, tabularx, theorem, trace, varioref, verbatim,
1209 (license license:lppl1.3+)))
1211 (define-public texlive-latex-url
1213 (name "texlive-latex-url")
1214 (version (number->string %texlive-revision))
1218 (url (string-append "svn://www.tug.org/texlive/tags/"
1219 %texlive-tag "/Master/texmf-dist/"
1221 (revision %texlive-revision)))
1224 "184s2543cwia5l7iibhlkl1ffbncfhjpv5p56zq0c15by5sghlac"))))
1225 (build-system trivial-build-system)
1227 `(#:modules ((guix build utils))
1230 (use-modules (guix build utils))
1231 (let ((target (string-append (assoc-ref %outputs "out")
1232 "/share/texmf-dist/tex/latex/url")))
1234 (copy-recursively (assoc-ref %build-inputs "source") target)
1236 (home-page "https://www.ctan.org/pkg/url")
1237 (synopsis "Verbatim with URL-sensitive line breaks")
1238 (description "The command @code{\\url} is a form of verbatim command that
1239 allows linebreaks at certain characters or combinations of characters, accepts
1240 reconfiguration, and can usually be used in the argument to another command.
1241 The command is intended for email addresses, hypertext links,
1242 directories/paths, etc., which normally have no spaces, so by default the
1243 package ignores spaces in its argument. However, a package option allows
1244 spaces, which is useful for operating systems where spaces are a common part
1246 ;; The license header states that it is under LPPL version 2 or later, but
1247 ;; the latest version is 1.3c.
1248 (license license:lppl1.3c+)))
1250 (define-public texlive-latex-l3kernel
1252 (name "texlive-latex-l3kernel")
1253 (version (number->string %texlive-revision))
1256 (uri (texlive-ref "latex" "l3kernel"))
1259 "0r0wfk594j8wkdqhh21haimwsfq8x5jch4ldm21hkzk5dnmvpbg6"))))
1260 (build-system texlive-build-system)
1262 '(#:tex-directory "latex/l3kernel"))
1263 (home-page "http://www.ctan.org/pkg/l3kernel")
1264 (synopsis "LaTeX3 programmers’ interface")
1266 "The l3kernel bundle provides an implementation of the LaTeX3
1267 programmers’ interface, as a set of packages that run under LaTeX 2e. The
1268 interface provides the foundation on which the LaTeX3 kernel and other future
1269 code are built: it is an API for TeX programmers. The packages are set up so
1270 that the LaTeX3 conventions can be used with regular LaTeX 2e packages.")
1271 (license license:lppl1.3c+)))
1273 (define-public texlive-latex-l3packages
1275 (name "texlive-latex-l3packages")
1276 (version (number->string %texlive-revision))
1279 (uri (texlive-ref "latex" "l3packages"))
1282 "16jplkvzdysfssijq9l051nsks65c2nrarsl17k8gjhc28yznj8y"))))
1283 (build-system texlive-build-system)
1285 '(#:tex-directory "latex/l3packages"
1287 (modify-phases %standard-phases
1288 ;; All package sources are in sub-directories, so we need to add them
1290 (add-after 'unpack 'set-TEXINPUTS
1292 (let ((cwd (getcwd)))
1294 (string-append cwd "/l3keys2e:"
1301 `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel)))
1302 (home-page "http://www.ctan.org/pkg/l3packages")
1303 (synopsis "High-level LaTeX3 concepts")
1305 "This bundle holds prototype implementations of concepts for a LaTeX
1306 designer interface, to be used with the experimental LaTeX kernel as
1307 programming tools and kernel support. Packages provided in this release are:
1310 @item l3keys2e, which makes the facilities of the kernel module l3keys
1311 available for use by LaTeX 2e packages;
1312 @item xfrac, which provides flexible splitlevel fractions;
1313 @item xparse, which provides a high-level interface for declaring document
1315 @item xtemplate, which provides a means of defining generic functions using a
1318 (license license:lppl1.3c+)))
1320 (define-public texlive-latex-fontspec
1322 (name "texlive-latex-fontspec")
1323 (version (number->string %texlive-revision))
1326 (uri (texlive-ref "latex" "fontspec"))
1329 "1rx43y5xmjqvc27pjdnmqwp4pcw3czcfd6nfpmzc1gnqfl1hlc0q"))))
1330 (build-system texlive-build-system)
1332 '(#:tex-directory "latex/fontspec"
1333 #:build-targets '("fontspec.dtx")))
1335 `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel)))
1336 (home-page "http://www.ctan.org/pkg/fontspec")
1337 (synopsis "Advanced font selection in XeLaTeX and LuaLaTeX")
1339 "Fontspec is a package for XeLaTeX and LuaLaTeX. It provides an
1340 automatic and unified interface to feature-rich AAT and OpenType fonts through
1341 the NFSS in LaTeX running on XeTeX or LuaTeX engines. The package requires
1342 the l3kernel and xparse bundles from the LaTeX 3 development team.")
1343 (license license:lppl1.3+)))
1345 ;; The SVN directory contains little more than a dtx file that generates three
1346 ;; of the many lua files that should be installed as part of this package.
1347 ;; This is why we take the release from GitHub instead.
1348 (define-public texlive-luatex-lualibs
1350 (name "texlive-luatex-lualibs")
1354 (uri (string-append "https://github.com/lualatex/lualibs/"
1355 "releases/download/v"
1356 version "/lualibs.zip"))
1359 "1xx9blvrmx9hyhrl345lpai9m6xxnw997261a1ahn1bm5r2j5fqy"))))
1360 (build-system gnu-build-system)
1363 (list (string-append "DESTDIR="
1364 (assoc-ref %outputs "out")
1365 "/share/texmf-dist"))
1367 (modify-phases %standard-phases
1368 (delete 'configure))))
1370 `(("texlive-bin" ,texlive-bin)
1373 (home-page "https://github.com/lualatex/lualibs")
1374 (synopsis "Lua modules for general programming (in the (La)TeX world)")
1376 "Lualibs is a collection of Lua modules useful for general programming.
1377 The bundle is based on Lua modules shipped with ConTeXt, and made available in
1378 this bundle for use independent of ConTeXt.")
1379 ;; GPL version 2 only
1380 (license license:gpl2)))
1382 (define-public texlive-latex-amsmath
1384 (name "texlive-latex-amsmath")
1385 (version (number->string %texlive-revision))
1388 (uri (texlive-ref "latex" "amsmath"))
1391 "178ywjpdlv78qmfzqdyn6gy14620zjsn2q9wap76fbr9s4hw6dba"))))
1392 (build-system texlive-build-system)
1393 (arguments '(#:tex-directory "latex/amsmath"))
1394 (home-page "http://www.ctan.org/pkg/amsmath")
1395 (synopsis "AMS mathematical facilities for LaTeX")
1397 "This is the principal package in the AMS-LaTeX distribution. It adapts
1398 for use in LaTeX most of the mathematical features found in AMS-TeX; it is
1399 highly recommended as an adjunct to serious mathematical typesetting in LaTeX.
1400 When amsmath is loaded, AMS-LaTeX packages @code{amsbsyamsbsy} (for bold
1401 symbols), @code{amsopnamsopn} (for operator names) and
1402 @code{amstextamstext} (for text embedded in mathematics) are also loaded.
1403 This package is part of the LaTeX required distribution; however, several
1404 contributed packages add still further to its appeal; examples are
1405 @code{empheqempheq}, which provides functions for decorating and highlighting
1406 mathematics, and @code{ntheoremntheorem}, for specifying theorem (and similar)
1408 (license license:lppl1.3c+)))
1410 (define-public texlive-latex-amscls
1412 (name "texlive-latex-amscls")
1413 (version (number->string %texlive-revision))
1416 (uri (texlive-ref "latex" "amscls"))
1419 "0jmcr37mcdi7drczppvr6lmz5d5yd9m67ii79gp2nglg1xpw934j"))))
1420 (build-system texlive-build-system)
1422 `(#:tex-directory "latex/amscls"))
1423 (home-page "http://www.ctan.org/pkg/amscls")
1424 (synopsis "AMS document classes for LaTeX")
1426 "This bundle contains three AMS classes: @code{amsartamsart} (for writing
1427 articles for the AMS), @code{amsbookamsbook} (for books) and
1428 @code{amsprocamsproc} (for proceedings), together with some supporting
1429 material. The material is made available as part of the AMS-LaTeX
1431 (license license:lppl1.3c+)))
1433 (define-public texlive-latex-babel
1435 (name "texlive-latex-babel")
1436 (version (number->string %texlive-revision))
1439 (uri (texlive-ref "latex" "babel"))
1442 "1n3i5adsyy7jw0imnzrm2i8wkf73i3mjk9h3ic8cb9cd19i4r9r3"))))
1443 (build-system texlive-build-system)
1445 '(#:tex-directory "latex/babel"
1447 (modify-phases %standard-phases
1448 ;; This package tries to produce babel.aux twice but refuses to
1449 ;; overwrite the first one.
1450 (add-before 'build 'fix-ins
1452 (substitute* "babel.ins"
1453 (("askonceonly") "askforoverwritefalse"))
1455 (home-page "http://www.ctan.org/pkg/babel")
1456 (synopsis "Multilingual support for Plain TeX or LaTeX")
1458 "The package manages culturally-determined typographical (and other)
1459 rules, and hyphenation patterns for a wide range of languages. A document may
1460 select a single language to be supported, or it may select several, in which
1461 case the document may switch from one language to another in a variety of
1462 ways. Babel uses contributed configuration files that provide the detail of
1463 what has to be done for each language. Users of XeTeX are advised to use the
1464 polyglossia package rather than Babel.")
1465 (license license:lppl1.3+)))
1467 (define-public texlive-latex-cyrillic
1469 (name "texlive-latex-cyrillic")
1470 (version (number->string %texlive-revision))
1473 (uri (texlive-ref "latex" "cyrillic"))
1476 "1mdhl35hwas68ki56qqngzar37dwv4mm64l2canihr255bz34lbv"))))
1477 (build-system texlive-build-system)
1479 '(#:tex-directory "latex/cyrillic"))
1480 (home-page "http://www.ctan.org/pkg/latex-cyrillic")
1481 (synopsis "Support for Cyrillic fonts in LaTeX")
1483 "This bundle of macros files provides macro support (including font
1484 encoding macros) for the use of Cyrillic characters in fonts encoded under the
1485 T2* and X2 encodings. These encodings cover (between them) pretty much every
1486 language that is written in a Cyrillic alphabet.")
1487 (license license:lppl1.3c+)))
1489 (define-public texlive-latex-psnfss
1491 (name "texlive-latex-psnfss")
1492 (version (number->string %texlive-revision))
1495 (uri (texlive-ref "latex" "psnfss"))
1498 "1920dcq8613yzprasbg80fh4fcjcidvvl54wkx438nimyxcri7qz"))))
1499 (build-system texlive-build-system)
1500 (arguments '(#:tex-directory "latex/psnfss"))
1501 (home-page "http://www.ctan.org/pkg/psnfss")
1502 (synopsis "Font support for common PostScript fonts")
1504 "The PSNFSS collection includes a set of files that provide a complete
1505 working setup of the LaTeX font selection scheme (NFSS2) for use with common
1506 PostScript fonts. It covers the so-called \"Base\" fonts (which are built
1507 into any Level 2 PostScript printing device and the Ghostscript interpreter)
1508 and a number of free fonts. It provides font definition files, macros and
1509 font metrics. The bundle as a whole is part of the LaTeX required set of
1511 (license license:lppl1.2+)))
1513 (define-public texlive-union
1514 (lambda* (#:optional (packages '()))
1515 "Return 'texlive-union' package which is a union of PACKAGES and the
1516 standard LaTeX packages."
1517 (let ((default-packages
1522 texlive-metafont-base
1524 ;; LaTeX packages from the "required" set.
1525 texlive-latex-amsmath
1526 texlive-latex-amscls
1528 texlive-latex-cyrillic
1529 texlive-latex-graphics
1530 texlive-latex-psnfss
1531 texlive-latex-tools)))
1533 (name "texlive-union")
1534 (version (number->string %texlive-revision))
1536 (build-system trivial-build-system)
1538 '(#:modules ((guix build union)
1540 (guix build texlive-build-system)
1541 (guix build gnu-build-system)
1542 (guix build gremlin)
1546 (use-modules (ice-9 match)
1550 (guix build texlive-build-system))
1551 (let* ((out (assoc-ref %outputs "out"))
1552 (texmf.cnf (string-append out "/share/texmf-dist/web2c/texmf.cnf")))
1553 ;; Build a modifiable union of all inputs (but exclude bash)
1554 (match (filter (match-lambda
1556 (not (string=? "bash" name))))
1558 (((names . directories) ...)
1559 (union-build (assoc-ref %outputs "out")
1561 #:create-all-directories? #t)))
1563 ;; The configuration file "texmf.cnf" is provided by the
1564 ;; "texlive-bin" package. We take it and override only the
1565 ;; setting for TEXMFROOT and TEXMF. This file won't be consulted
1566 ;; by default, though, so we still need to set TEXMFCNF.
1567 (substitute* texmf.cnf
1568 (("^TEXMFROOT = .*")
1569 (string-append "TEXMFROOT = " out "/share\n"))
1571 "TEXMF = $TEXMFROOT/share/texmf-dist\n"))
1572 (setenv "PATH" (string-append (assoc-ref %build-inputs "bash")
1575 (cut wrap-program <>
1576 `("TEXMFCNF" ":" = (,(dirname texmf.cnf)))
1577 `("TEXMF" ":" = (,(string-append out "/share/texmf-dist"))))
1578 (find-files (string-append out "/bin") ".*"))
1582 ,@(map (lambda (package)
1583 (list (package-name package) package))
1584 (append default-packages packages))))
1585 (home-page (package-home-page texlive-bin))
1586 (synopsis "Union of TeX Live packages")
1587 (description "This package provides a subset of the TeX Live
1589 (license (fold (lambda (package result)
1590 (match (package-license package)
1592 (append lst result))
1593 ((? license:license? license)
1594 (cons license result))))
1596 (append default-packages packages)))))))
1598 (define-public texlive-tiny
1600 (inherit (texlive-union))
1601 (name "texlive-tiny")
1602 (description "This is a very limited subset of the TeX Live distribution.
1603 It includes little more than the required set of LaTeX packages.")))
1605 (define-public texlive-latex-amsrefs
1607 (name "texlive-latex-amsrefs")
1608 (version (number->string %texlive-revision))
1611 (uri (texlive-ref "latex" "amsrefs"))
1612 (file-name (string-append name "-" version "-checkout"))
1615 "15i4k479dwrpr0kspmm70g1yn4p3dkh0whyzmr93hph9bggnh1i1"))))
1616 (build-system texlive-build-system)
1617 (arguments '(#:tex-directory "latex/amsrefs"))
1618 (home-page "http://www.ctan.org/pkg/amsrefs")
1619 (synopsis "LaTeX-based replacement for BibTeX")
1621 "Amsrefs is a LaTeX package for bibliographies that provides an archival
1622 data format similar to the format of BibTeX database files, but adapted to
1623 make direct processing by LaTeX easier. The package can be used either in
1624 conjunction with BibTeX or as a replacement for BibTeX.")
1625 (license license:lppl1.3+)))
1627 (define-public texlive-latex-natbib
1629 (name "texlive-latex-natbib")
1630 (version (number->string %texlive-revision))
1633 (uri (texlive-ref "latex" "natbib"))
1636 "0aqliq0nwblxyrzhwhv77pnmk7qh2y3prgq7z7qhwcbgz5kisld7"))))
1637 (build-system texlive-build-system)
1638 (arguments '(#:tex-directory "latex/natbib"))
1639 (home-page "http://www.ctan.org/pkg/natbib")
1640 (synopsis "Flexible bibliography support")
1642 "This bundle provides a package that implements both author-year and
1643 numbered references, as well as much detailed of support for other
1644 bibliography use. Also provided are versions of the standard BibTeX styles
1645 that are compatible with @code{natbib}: @code{plainnat}, @code{unsrtnat},
1646 @code{abbrnat}. The bibliography styles produced by @code{custom-bib} are
1647 designed from the start to be compatible with @code{natbib}.")
1648 (license license:lppl)))
1650 (define-public texlive-latex-seminar
1652 (name "texlive-latex-seminar")
1653 (version (number->string %texlive-revision))
1657 (url (string-append "svn://www.tug.org/texlive/tags/"
1658 %texlive-tag "/Master/texmf-dist/"
1659 "/tex/latex/seminar"))
1660 (revision %texlive-revision)))
1663 "0y4i651b75y6006n03x8n86bsqvjsailvvz9bhzy51dzsznqidq0"))))
1664 (build-system texlive-build-system)
1665 (arguments '(#:tex-directory "latex/seminar"))
1666 (home-page "http://www.ctan.org/pkg/seminar")
1667 (synopsis "Make overhead slides")
1668 ;; TODO: This package may need fancybox and xcomment at runtime.
1670 "This package provides a class that produces overhead
1671 slides (transparencies), with many facilities. Seminar is not nowadays
1672 reckoned a good basis for a presentation — users are advised to use more
1673 recent classes such as powerdot or beamer, both of which are tuned to
1674 21st-century presentation styles.")
1675 (license license:lppl1.2+)))
1677 (define-public texlive-latex-g-brief
1679 (name "texlive-latex-g-brief")
1680 (version (number->string %texlive-revision))
1683 (uri (texlive-ref "latex" "g-brief"))
1684 (file-name (string-append name "-" version "-checkout"))
1687 "0sikazkg0dpkcpzlbqw8qzxr81paf2f443vsrh14jnw7s4gswvc5"))))
1688 (build-system texlive-build-system)
1690 '(#:tex-directory "latex/g-brief"
1692 (modify-phases %standard-phases
1693 (add-after 'unpack 'remove-generated-file
1695 (delete-file "g-brief.drv")
1697 (home-page "http://www.ctan.org/pkg/g-brief")
1698 (synopsis "Letter document class")
1700 "This package is designed for formatting formless letters in German; it
1701 can also be used for English (by those who can read the documentation). There
1702 are LaTeX 2.09 @code{documentstyle} and LaTeX 2e class files for both an
1703 \"old\" and a \"new\" version of g-brief.")
1704 (license license:lppl)))
1706 (define-public texlive-latex-hyperref
1708 (name "texlive-latex-hyperref")
1709 (version (number->string %texlive-revision))
1712 (uri (texlive-ref "latex" "hyperref"))
1715 "03arf3xvz1jsbvlpgc5qxbxbl9wmk8k09cn6b8gv9pzgpjy4vx4j"))))
1716 (build-system texlive-build-system)
1718 '(#:tex-directory "latex/hyperref"
1720 (modify-phases %standard-phases
1721 (add-after 'unpack 'remove-hluatex.def
1723 ;; This depends on hluatex.dtx, which does not exist and is
1724 ;; nowhere to be found in the sources of the TeX Live
1726 (substitute* "hyperref.ins"
1727 (("\\\\file\\{hluatex.def\\}.*") ""))
1729 ;; The package depends on the kvoptions, ltxcmds, and refcount packages,
1730 ;; which are part of the oberdiek bundle.
1732 `(("texlive-latex-oberdiek" ,texlive-latex-oberdiek)))
1733 (home-page "http://www.ctan.org/pkg/hyperref")
1734 (synopsis "Extensive support for hypertext in LaTeX")
1736 "The @code{hyperref} package is used to handle cross-referencing commands
1737 in LaTeX to produce hypertext links in the document. The package provides
1738 backends for the @code{\\special} set defined for HyperTeX DVI processors; for
1739 embedded @code{pdfmark} commands for processing by Acrobat
1740 Distiller (@code{dvips} and Y&Y's @code{dvipsone}); for Y&Y's @code{dviwindo};
1741 for PDF control within pdfTeX and @code{dvipdfm}; for TeX4ht; and for VTeX's
1742 pdf and HTML backends. The package is distributed with the @code{backref} and
1743 @code{nameref} packages, which make use of the facilities of @code{hyperref}.")
1744 (license license:lppl1.3+)))
1746 (define-public texlive-tex-texinfo
1748 (name "texlive-tex-texinfo")
1749 (version (number->string %texlive-revision))
1753 (url (string-append "svn://www.tug.org/texlive/tags/"
1754 %texlive-tag "/Master/texmf-dist/"
1756 (revision %texlive-revision)))
1759 "09zj2w3lx0y6i2syfjjgizahf86z301dw8p37ln6syfhqhzqdz46"))))
1760 (build-system trivial-build-system)
1762 `(#:modules ((guix build utils))
1765 (use-modules (guix build utils))
1766 (let ((target (string-append (assoc-ref %outputs "out")
1767 "/share/texmf-dist/tex/texinfo")))
1769 (copy-recursively (assoc-ref %build-inputs "source") target)
1771 (home-page "http://www.ctan.org/pkg/texinfo")
1772 (synopsis "TeX macros to handle Texinfo files")
1774 "Texinfo is the preferred format for documentation in the GNU project;
1775 the format may be used to produce online or printed output from a single
1776 source. The Texinfo macros may be used to produce printable output using TeX;
1777 other programs in the distribution offer online interactive use (with
1778 hypertext linkages in some cases).")
1779 (license license:gpl3+)))
1781 (define-public texlive-latex-anysize
1783 (name "texlive-latex-anysize")
1784 (version (number->string %texlive-revision))
1788 (url (string-append "svn://www.tug.org/texlive/tags/"
1789 %texlive-tag "/Master/texmf-dist/"
1790 "/tex/latex/anysize"))
1791 (revision %texlive-revision)))
1794 "19khwqjlvznc955sijhww3c4zbb0053rvzwv9nz738qknq7y18vb"))))
1795 (build-system trivial-build-system)
1797 `(#:modules ((guix build utils))
1800 (use-modules (guix build utils))
1801 (let ((target (string-append (assoc-ref %outputs "out")
1802 "/share/texmf-dist/tex/latex/anysize")))
1804 (copy-recursively (assoc-ref %build-inputs "source") target)
1806 (home-page "http://www.ctan.org/pkg/anysize")
1807 (synopsis "Simple package to set up document margins")
1809 "This is a simple package to set up document margins. This package is
1810 considered obsolete; alternatives are the @code{typearea} package from the
1811 @code{koma-script} bundle, or the @code{geometry} package.")
1812 (license license:public-domain)))
1814 (define-public texlive-latex-appendix
1816 (name "texlive-latex-appendix")
1817 (version (number->string %texlive-revision))
1820 (uri (texlive-ref "latex" "appendix"))
1823 "0rxfpr8vq3brwx5rc7qn91ixlp9zva4zrms8a579fqa1g5yva7vg"))))
1824 (build-system texlive-build-system)
1825 (arguments '(#:tex-directory "latex/appendix"))
1826 (home-page "http://www.ctan.org/pkg/appendix")
1827 (synopsis "Extra control of appendices")
1829 "The appendix package provides various ways of formatting the titles of
1830 appendices. Also (sub)appendices environments are provided that can be used,
1831 for example, for per chapter/section appendices. An @code{appendices}
1832 environment is provided which can be used instead of the @code{\\appendix}
1834 (license license:lppl)))
1836 (define-public texlive-latex-changebar
1838 (name "texlive-latex-changebar")
1839 (version (number->string %texlive-revision))
1842 (uri (texlive-ref "latex" "changebar"))
1845 "1ik4m8pzfsn1grlda6fniqqfwmgj7rfxwg63jdw0p0qv002vc7ik"))))
1846 (build-system texlive-build-system)
1847 (arguments '(#:tex-directory "latex/changebar"))
1848 (home-page "http://www.ctan.org/pkg/changebar")
1849 (synopsis "Generate changebars in LaTeX documents")
1851 "Identify areas of text to be marked with changebars with the
1852 @code{\\cbstart} and @code{\\cbend} commands; the bars may be coloured. The
1853 package uses 'drivers' to place the bars; the available drivers can work with
1854 @code{dvitoln03}, @code{dvitops}, @code{dvips}, the emTeX and TeXtures DVI
1855 drivers, and VTeX and pdfTeX.")
1856 (license license:lppl)))
1858 (define-public texlive-latex-colortbl
1860 (name "texlive-latex-colortbl")
1861 (version (number->string %texlive-revision))
1864 (uri (texlive-ref "latex" "colortbl"))
1867 "190pmq8la2rq07xry8bn8z8yywzxv6fqyqaj7yjfj5rgw6x0mas8"))))
1868 (build-system texlive-build-system)
1869 (arguments '(#:tex-directory "latex/colortbl"))
1870 (home-page "http://www.ctan.org/pkg/colortbl")
1871 (synopsis "Add colour to LaTeX tables")
1873 "This package allows rows, columns, and even individual cells in LaTeX
1874 tables to be coloured.")
1875 (license license:lppl)))
1877 (define-public texlive-latex-fancybox
1879 (name "texlive-latex-fancybox")
1880 (version (number->string %texlive-revision))
1884 (url (string-append "svn://www.tug.org/texlive/tags/"
1885 %texlive-tag "/Master/texmf-dist/"
1886 "/tex/latex/fancybox"))
1887 (revision %texlive-revision)))
1890 "0smmnaad2q8qwicay1frri990lv65l0k8cwzsvdsyp3jk8kp042w"))))
1891 (build-system trivial-build-system)
1893 `(#:modules ((guix build utils))
1896 (use-modules (guix build utils))
1897 (let ((target (string-append (assoc-ref %outputs "out")
1898 "/share/texmf-dist/tex/latex/fancybox")))
1900 (copy-recursively (assoc-ref %build-inputs "source") target)
1902 (home-page "http://www.ctan.org/pkg/fancybox")
1903 (synopsis "Variants of \\fbox and other games with boxes")
1905 "This package provides variants of @code{\\fbox}: @code{\\shadowbox},
1906 @code{\\doublebox}, @code{\\ovalbox}, @code{\\Ovalbox}, with helpful tools for
1907 using box macros and flexible verbatim macros. You can box mathematics,
1908 floats, center, flushleft, and flushright, lists, and pages.")
1909 (license license:lppl1.2+)))
1911 (define-public texlive-latex-fancyhdr
1913 (name "texlive-latex-fancyhdr")
1914 (version (number->string %texlive-revision))
1918 (url (string-append "svn://www.tug.org/texlive/tags/"
1919 %texlive-tag "/Master/texmf-dist/"
1920 "/tex/latex/fancyhdr"))
1921 (revision %texlive-revision)))
1924 "04h430agf8aj7ziwyb46xpk95c605rjk1wzhr63m6ylipihidlgw"))))
1925 (build-system trivial-build-system)
1927 `(#:modules ((guix build utils))
1930 (use-modules (guix build utils))
1931 (let ((target (string-append (assoc-ref %outputs "out")
1932 "/share/texmf-dist/tex/latex/fancyhdr")))
1934 (copy-recursively (assoc-ref %build-inputs "source") target)
1936 (home-page "http://www.ctan.org/pkg/fancyhdr")
1937 (synopsis "Extensive control of page headers and footers in LaTeX2e")
1939 "The package provides extensive facilities, both for constructing headers
1940 and footers, and for controlling their use (for example, at times when LaTeX
1941 would automatically change the heading style in use).")
1942 (license license:lppl)))
1944 (define-public texlive-latex-fancyvrb
1946 (name "texlive-latex-fancyvrb")
1947 (version (number->string %texlive-revision))
1950 (uri (texlive-ref "latex" "fancyvrb"))
1953 "03l7140y031rr14h02i4z9zqsfvrbn7wzwxbjsrjcgrk6sdr71wv"))))
1954 (build-system texlive-build-system)
1956 '(#:build-targets '("fancyvrb.ins") ; fvrb-ex.ins cannot be built
1957 #:tex-directory "latex/fancyvrb"))
1958 (home-page "http://www.ctan.org/pkg/fancyvrb")
1959 (synopsis "Sophisticated verbatim text")
1961 "This package provides tools for flexible handling of verbatim text
1962 including: verbatim commands in footnotes; a variety of verbatim environments
1963 with many parameters; ability to define new customized verbatim environments;
1964 save and restore verbatim text and environments; write and read files in
1965 verbatim mode; build \"example\" environments (showing both result and
1967 (license license:lppl1.0+)))
1969 (define-public texlive-latex-float
1971 (name "texlive-latex-float")
1972 (version (number->string %texlive-revision))
1975 (uri (texlive-ref "latex" "float"))
1978 "0nbl7wylkv22fcdv4p8byhhj575fli6jnqjpkhrkbv8dzwah84nq"))))
1979 (build-system texlive-build-system)
1980 (arguments '(#:tex-directory "latex/float"))
1981 (home-page "http://www.ctan.org/pkg/float")
1982 (synopsis "Improved interface for floating objects")
1984 "This package improves the interface for defining floating objects such
1985 as figures and tables. It introduces the boxed float, the ruled float and the
1986 plaintop float. You can define your own floats and improve the behaviour of
1987 the old ones. The package also provides the @code{H} float modifier option of
1988 the obsolete @code{here} package. You can select this as automatic default
1989 with @code{\\floatplacement{figure}{H}}.")
1990 (license license:lppl)))
1992 (define-public texlive-latex-footmisc
1994 (name "texlive-latex-footmisc")
1995 (version (number->string %texlive-revision))
1998 (uri (texlive-ref "latex" "footmisc"))
2001 "03x61wwql8nh6zrqiiiq3rb0x7m3pn48c606zapy19y21fybwdxs"))))
2002 (build-system texlive-build-system)
2003 (arguments '(#:tex-directory "latex/footmisc"))
2004 (home-page "http://www.ctan.org/pkg/footmisc")
2005 (synopsis "Range of footnote options")
2007 "This is a collection of ways to change the typesetting of footnotes.
2008 The package provides means of changing the layout of the footnotes themselves,
2009 a way to number footnotes per page, to make footnotes disappear in a
2010 \"moving\" argument, and to deal with multiple references to footnotes from
2011 the same place. The package also has a range of techniques for labelling
2012 footnotes with symbols rather than numbers.")
2013 (license license:lppl1.3+)))
2015 (define-public texlive-latex-listings
2017 (name "texlive-latex-listings")
2018 (version (number->string %texlive-revision))
2021 (uri (texlive-ref "latex" "listings"))
2024 "1nsn9wp3wl12b36c0sqrim33lf33cr5wky0h4ncnw8lvqgm7h8wf"))))
2025 (build-system texlive-build-system)
2027 '(#:tex-directory "latex/listings"
2028 #:build-targets '("listings.ins")))
2029 (home-page "http://www.ctan.org/pkg/listings")
2030 (synopsis "Typeset source code listings using LaTeX")
2032 "The package enables the user to typeset programs (programming code)
2033 within LaTeX; the source code is read directly by TeX---no front-end processor
2034 is needed. Keywords, comments and strings can be typeset using different
2035 styles. Support for @code{hyperref} is provided.")
2036 (license license:lppl1.3+)))
2038 (define-public texlive-latex-jknapltx
2040 (name "texlive-latex-jknapltx")
2041 (version (number->string %texlive-revision))
2045 (url (string-append "svn://www.tug.org/texlive/tags/"
2046 %texlive-tag "/Master/texmf-dist/"
2047 "/tex/latex/jknapltx"))
2048 (revision %texlive-revision)))
2051 "0m034x72f2g07icr50gacyxfb9g1lz2rmqh4kqr1qjb421x2kds9"))))
2052 (build-system trivial-build-system)
2054 `(#:modules ((guix build utils))
2057 (use-modules (guix build utils))
2058 (let ((target (string-append (assoc-ref %outputs "out")
2059 "/share/texmf-dist/tex/latex/jknapltx")))
2061 (copy-recursively (assoc-ref %build-inputs "source") target)
2063 (home-page "http://www.ctan.org/pkg/jknappen")
2064 (synopsis "Miscellaneous packages by Joerg Knappen")
2066 "This package provides miscellaneous macros by Joerg Knappen, including:
2067 represent counters in greek; Maxwell's non-commutative division;
2068 @code{latin1jk}, @code{latin2jk} and @code{latin3jk}, which are
2069 @code{inputenc} definition files that allow verbatim input in the respective
2070 ISO Latin codes; blackboard bold fonts in maths; use of RSFS fonts in maths;
2071 extra alignments for @code{\\parboxes}; swap Roman and Sans fonts;
2072 transliterate semitic languages; patches to make (La)TeX formulae embeddable
2073 in SGML; use maths minus in text as appropriate; simple Young tableaux.")
2074 (license license:gpl2)))
2076 (define-public texlive-fonts-ec
2078 (name "texlive-fonts-ec")
2079 (version (number->string %texlive-revision))
2083 (url (string-append "svn://www.tug.org/texlive/tags/"
2084 %texlive-tag "/Master/texmf-dist/"
2085 "/fonts/source/jknappen/ec/"))
2086 (revision %texlive-revision)))
2089 "12av65fbz9xiashm09c9m1fj1mijxls5xspd7652ry1n5s0nixy4"))))
2090 (build-system gnu-build-system)
2092 `(#:modules ((guix build gnu-build-system)
2096 #:tests? #f ; no tests
2098 (modify-phases %standard-phases
2101 (lambda* (#:key inputs #:allow-other-keys)
2102 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
2103 ;; Tell mf where to find mf.base
2104 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
2105 ;; Tell mf where to look for source files
2107 (string-append (getcwd) ":"
2108 mf "/share/texmf-dist/metafont/base:"
2109 (assoc-ref inputs "texlive-fonts-cm")
2110 "/share/texmf-dist/fonts/source/public/cm")))
2112 (every (lambda (font)
2113 (format #t "building font ~a\n" font)
2114 (zero? (system* "mf" "-progname=mf"
2115 "-output-directory=build"
2120 "input " (basename font ".mf")))))
2121 (find-files "." "[0-9]+\\.mf$"))))
2123 (lambda* (#:key outputs #:allow-other-keys)
2124 (let* ((out (assoc-ref outputs "out"))
2126 out "/share/texmf-dist/fonts/tfm/jknappen/ec"))
2128 out "/share/texmf-dist/fonts/source/jknappen/ec")))
2129 (for-each (cut install-file <> tfm)
2130 (find-files "build" "\\.*"))
2131 (for-each (cut install-file <> mf)
2132 (find-files "." "\\.mf"))
2135 `(("texlive-bin" ,texlive-bin)
2136 ("texlive-metafont-base" ,texlive-metafont-base)
2137 ("texlive-fonts-cm" ,texlive-fonts-cm)))
2138 (home-page "http://www.ctan.org/pkg/ec")
2139 (synopsis "Computer modern fonts in T1 and TS1 encodings")
2141 "The EC fonts are European Computer Modern Fonts, supporting the complete
2142 LaTeX T1 encoding defined at the 1990 TUG conference hold at Cork/Ireland.
2143 These fonts are intended to be stable with no changes being made to the tfm
2144 files. The set also contains a Text Companion Symbol font, called @code{tc},
2145 featuring many useful characters needed in text typesetting, for example
2146 oldstyle digits, currency symbols (including the newly created Euro symbol),
2147 the permille sign, copyright, trade mark and servicemark as well as a copyleft
2148 sign, and many others. Recent releases of LaTeX2e support the EC fonts. The
2149 EC fonts supersede the preliminary version released as the DC fonts. The
2150 fonts are available in (traced) Adobe Type 1 format, as part of the
2151 @code{cm-super} bundle. The other Computer Modern-style T1-encoded Type 1
2152 set, Latin Modern, is not actually a direct development of the EC set, and
2153 differs from the EC in a number of particulars.")
2154 (license (license:fsf-free "https://www.tug.org/svn/texlive/tags/\
2155 texlive-2017.1/Master/texmf-dist/doc/fonts/ec/copyrite.txt"))))
2157 (define-public texlive-fonts-rsfs
2159 (name "texlive-fonts-rsfs")
2160 (version (number->string %texlive-revision))
2164 (url (string-append "svn://www.tug.org/texlive/tags/"
2165 %texlive-tag "/Master/texmf-dist/"
2166 "/fonts/source/public/rsfs/"))
2167 (revision %texlive-revision)))
2170 "0r12pn02r4a955prcvq0048nifh86ihlcgvw3pppqqvfngv34l5h"))))
2171 (build-system gnu-build-system)
2173 `(#:modules ((guix build gnu-build-system)
2177 #:tests? #f ; no tests
2179 (modify-phases %standard-phases
2182 (lambda* (#:key inputs #:allow-other-keys)
2183 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
2184 ;; Tell mf where to find mf.base
2185 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
2186 ;; Tell mf where to look for source files
2188 (string-append (getcwd) ":"
2189 mf "/share/texmf-dist/metafont/base:"
2190 (assoc-ref inputs "texlive-fonts-cm")
2191 "/share/texmf-dist/fonts/source/public/cm")))
2193 (every (lambda (font)
2194 (format #t "building font ~a\n" font)
2195 (zero? (system* "mf" "-progname=mf"
2196 "-output-directory=build"
2201 "input " (basename font ".mf")))))
2202 (find-files "." "[0-9]+\\.mf$"))))
2204 (lambda* (#:key outputs #:allow-other-keys)
2205 (let* ((out (assoc-ref outputs "out"))
2207 out "/share/texmf-dist/fonts/tfm/public/rsfs"))
2209 out "/share/texmf-dist/fonts/source/public/rsfs")))
2210 (for-each (cut install-file <> tfm)
2211 (find-files "build" "\\.*"))
2212 (for-each (cut install-file <> mf)
2213 (find-files "." "\\.mf"))
2216 `(("texlive-bin" ,texlive-bin)
2217 ("texlive-metafont-base" ,texlive-metafont-base)
2218 ("texlive-fonts-cm" ,texlive-fonts-cm)))
2219 (home-page "http://www.ctan.org/pkg/rsfs")
2220 (synopsis "Ralph Smith's Formal Script font")
2222 "The fonts provide uppercase formal script letters for use as symbols in
2223 scientific and mathematical typesetting (in contrast to the informal script
2224 fonts such as that used for the calligraphic symbols in the TeX maths symbol
2225 font). The fonts are provided as Metafont source, and as derived Adobe Type 1
2226 format. LaTeX support, for using these fonts in mathematics, is available via
2227 one of the packages @code{calrsfs} and @code{mathrsfs}.")
2228 (license (license:fsf-free "http://mirrors.ctan.org/fonts/rsfs/README"))))
2230 (define-public texlive-latex-eso-pic
2232 (name "texlive-latex-eso-pic")
2233 (version (number->string %texlive-revision))
2236 (uri (texlive-ref "latex" "eso-pic"))
2239 "1xvmms28mvvfpks9x7lfya2xhh5k8jy3qnlih1mzcnf156xnb89z"))))
2240 (build-system texlive-build-system)
2241 (arguments '(#:tex-directory "latex/eso-pic"))
2242 (home-page "http://www.ctan.org/pkg/eso-pic")
2243 (synopsis "Add picture commands (or backgrounds) to every page")
2245 "The package adds one or more user commands to LaTeX's @code{shipout}
2246 routine, which may be used to place the output at fixed positions. The
2247 @code{grid} option may be used to find the correct places.")
2248 (license license:lppl1.3+)))
2250 (define-public texlive-latex-eepic
2252 (name "texlive-latex-eepic")
2253 (version (number->string %texlive-revision))
2257 (url (string-append "svn://www.tug.org/texlive/tags/"
2258 %texlive-tag "/Master/texmf-dist/"
2259 "/tex/latex/eepic"))
2260 (revision %texlive-revision)))
2263 "1c68gvh021pvybg07apsd2xhq2ljbg80kq94wh71drdga3c2zqjw"))))
2264 (build-system trivial-build-system)
2266 `(#:modules ((guix build utils))
2269 (use-modules (guix build utils))
2270 (let ((target (string-append (assoc-ref %outputs "out")
2271 "/share/texmf-dist/tex/latex/eepic")))
2273 (copy-recursively (assoc-ref %build-inputs "source") target)
2275 (home-page "http://www.ctan.org/pkg/eepic")
2276 (synopsis "Extensions to epic and the LaTeX drawing tools")
2278 "Extensions to @code{epic} and the LaTeX picture drawing environment,
2279 include the drawing of lines at any slope, the drawing of circles in any
2280 radii, and the drawing of dotted and dashed lines much faster with much less
2281 TeX memory, and providing several new commands for drawing ellipses, arcs,
2282 splines, and filled circles and ellipses. The package uses @code{tpic}
2283 @code{\\special} commands.")
2284 (license license:public-domain)))
2286 (define-public texlive-latex-multirow
2288 (name "texlive-latex-multirow")
2289 (version (number->string %texlive-revision))
2292 (uri (texlive-ref "latex" "multirow"))
2295 "0qlxy47f1f8plgch3jqfsnrdgpyz20sz46yp33i2jwvf9hvfczf0"))))
2296 (build-system texlive-build-system)
2297 (arguments '(#:tex-directory "latex/multirow"))
2298 (home-page "http://www.ctan.org/pkg/multirow")
2299 (synopsis "Create tabular cells spanning multiple rows")
2301 "The package provides tools for creating tabular cells spanning multiple
2302 rows. It has a lot of flexibility, including an option for specifying an
2303 entry at the \"natural\" width of its text.")
2304 (license license:lppl1.3+)))
2306 (define-public texlive-latex-overpic
2308 (name "texlive-latex-overpic")
2309 (version (number->string %texlive-revision))
2313 (url (string-append "svn://www.tug.org/texlive/tags/"
2314 %texlive-tag "/Master/texmf-dist/"
2315 "/tex/latex/overpic"))
2316 (revision %texlive-revision)))
2319 "0m29q9qdb00558b7g2i7iw6w62n5s46yx81j8m99qkv77magk4fm"))))
2320 (build-system trivial-build-system)
2322 `(#:modules ((guix build utils))
2325 (use-modules (guix build utils))
2326 (let ((target (string-append (assoc-ref %outputs "out")
2327 "/share/texmf-dist/tex/latex/overpic")))
2329 (copy-recursively (assoc-ref %build-inputs "source") target)
2331 (home-page "http://www.ctan.org/pkg/overpic")
2332 (synopsis "Combine LaTeX commands over included graphics")
2334 "The @code{overpic} environment is a cross between the LaTeX
2335 @code{picture} environment and the @code{\\includegraphics} command of
2336 @code{graphicx}. The resulting picture environment has the same dimensions as
2337 the included graphic. LaTeX commands can be placed on the graphic at defined
2338 positions; a grid for orientation is available.")
2339 (license license:lppl1.0+)))
2341 (define-public texlive-latex-pdfpages
2343 (name "texlive-latex-pdfpages")
2344 (version (number->string %texlive-revision))
2347 (uri (texlive-ref "latex" "pdfpages"))
2350 "06p5smfq66559ppdnmkl3hp8534x84ywbscimsiir4gllpya3i9h"))))
2351 (build-system texlive-build-system)
2352 (arguments '(#:tex-directory "latex/pdfpages"))
2353 (home-page "http://www.ctan.org/pkg/pdfpages")
2354 (synopsis "Include PDF documents in LaTeX")
2356 "This package simplifies the inclusion of external multi-page PDF
2357 documents in LaTeX documents. Pages may be freely selected and it is possible
2358 to put several logical pages onto each sheet of paper. Furthermore a lot of
2359 hypertext features like hyperlinks and article threads are provided. The
2360 package supports pdfTeX (pdfLaTeX) and VTeX. With VTeX it is even possible to
2361 use this package to insert PostScript files, in addition to PDF files.")
2362 (license license:lppl1.3+)))
2364 (define-public texlive-fonts-stmaryrd
2366 (name "texlive-fonts-stmaryrd")
2367 (version (number->string %texlive-revision))
2370 (uri (texlive-ref "fonts" "stmaryrd"))
2373 "08pn4ca3vl6qm9l3wm5h5iyjsrg411kkm1yana329xwg2j14s9n6"))))
2374 (build-system texlive-build-system)
2376 '(#:tex-directory "latex/stmaryrd"
2378 (modify-phases %standard-phases
2379 (add-after 'configure 'patch-ins
2381 (substitute* "stmaryrd.ins"
2382 (("^%% LaTeX2e.*") "\\input docstrip\n")
2383 (("fontdef\\}\\}" line)
2384 (string-append line "\n\\endbatchfile")))
2386 (home-page "http://www.ctan.org/pkg/stmaryrd")
2387 (synopsis "St Mary Road symbols for theoretical computer science")
2389 "The fonts were originally distributed as Metafont sources only, but
2390 Adobe Type 1 versions are also now available. Macro support is provided for
2391 use under LaTeX; the package supports the @code{only} option (provided by the
2392 @code{somedefs} package) to restrict what is loaded, for those who don't need
2394 (license license:lppl)))
2396 (define-public texlive-latex-subfigure
2398 (name "texlive-latex-subfigure")
2399 (version (number->string %texlive-revision))
2402 (uri (texlive-ref "latex" "subfigure"))
2405 "15spcl5wb7w269qd6y596vp4yi8sa5ppcx8w4z2i9kyp02r3a0yb"))))
2406 (build-system texlive-build-system)
2407 (arguments '(#:tex-directory "latex/subfigure"))
2408 (home-page "http://www.ctan.org/pkg/subfigure")
2409 (synopsis "Figures divided into subfigures")
2411 "This (deprecated) package provides support for the manipulation and
2412 reference of small or \"sub\" figures and tables within a single figure or
2413 table environment. It is convenient to use this package when your subfigures
2414 are to be separately captioned, referenced, or are to be included in the
2415 List-of-Figures. A new @code{\\subfigure} command is introduced which can be
2416 used inside a figure environment for each subfigure. An optional first
2417 argument is used as the caption for that subfigure. The package is now
2418 considered obsolete: it was superseded by @code{subfig}, but users may find
2419 the more recent @code{subcaption} package more satisfactory.")
2420 (license license:lppl)))
2422 (define-public texlive-latex-titlesec
2424 (name "texlive-latex-titlesec")
2425 (version (number->string %texlive-revision))
2429 (url (string-append "svn://www.tug.org/texlive/tags/"
2430 %texlive-tag "/Master/texmf-dist/"
2431 "/tex/latex/titlesec"))
2432 (revision %texlive-revision)))
2435 "04nmkhqx6jxcxx9a30zbcd5smxi5fd0cbp132bki7fnvhspnhg21"))))
2436 (build-system trivial-build-system)
2438 `(#:modules ((guix build utils))
2441 (use-modules (guix build utils))
2442 (let ((target (string-append (assoc-ref %outputs "out")
2443 "/share/texmf-dist/tex/latex/titlesec")))
2445 (copy-recursively (assoc-ref %build-inputs "source") target)
2447 (home-page "http://www.ctan.org/pkg/titlesec")
2448 (synopsis "Select alternative section titles")
2450 "This package provides an interface to sectioning commands for selection
2451 from various title styles, e.g. for marginal titles and to change the font of
2452 all headings with a single command, also providing simple one-step page
2453 styles. It also includes a package to change the page styles when there are
2454 floats in a page. You may assign headers/footers to individual floats, too.")
2455 (license license:lppl)))
2457 (define-public texlive-latex-lh
2459 (name "texlive-latex-lh")
2460 (version (number->string %texlive-revision))
2463 (uri (texlive-ref "latex" "lh"))
2466 "00gdiwh3sfhh1iimjhpja7lm7k4vzqzql2irgwnpz94qvh25zwi5"))))
2467 (build-system texlive-build-system)
2468 (arguments '(#:tex-directory "latex/lh"))
2469 (home-page "http://www.ctan.org/pkg/lh")
2470 (synopsis "Cyrillic fonts that support LaTeX standard encodings")
2472 "The LH fonts address the problem of the wide variety of alphabets that
2473 are written with Cyrillic-style characters. The fonts are the original basis
2474 of the set of T2* and X2 encodings that are now used when LaTeX users need to
2475 write in Cyrillic languages. Macro support in standard LaTeX encodings is
2476 offered through the latex-cyrillic and t2 bundles, and the package itself
2477 offers support for other (more traditional) encodings. The fonts, in the
2478 standard T2* and X2 encodings are available in Adobe Type 1 format, in the
2479 CM-Super family of fonts. The package also offers its own LaTeX support for
2480 OT2 encoded fonts, CM bright shaped fonts and Concrete shaped fonts.")
2481 (license license:lppl)))
2483 (define-public texlive-metapost
2485 (name "texlive-metapost")
2486 (version (number->string %texlive-revision))
2490 (url (string-append "svn://www.tug.org/texlive/tags/"
2491 %texlive-tag "/Master/texmf-dist/"
2493 (revision %texlive-revision)))
2496 "03nvjddffiz796wll6axzmgfvynyciy2mqamv20qx252w71vwkwd"))))
2497 (build-system trivial-build-system)
2499 `(#:modules ((guix build utils))
2502 (use-modules (guix build utils))
2503 (let ((target (string-append (assoc-ref %outputs "out")
2504 "/share/texmf-dist/metapost")))
2506 (copy-recursively (assoc-ref %build-inputs "source") target)
2508 (home-page "http://www.ctan.org/pkg/metapost")
2509 (synopsis "Create scalable illustrations")
2511 "MetaPost uses a language based on that of Metafont to produce precise
2512 technical illustrations. Its output is scalable PostScript or SVG, rather
2513 than the bitmaps Metafont creates.")
2514 (license license:lppl)))
2516 (define-public texlive-latex-wasysym
2518 (name "texlive-latex-wasysym")
2519 (version (number->string %texlive-revision))
2522 (uri (texlive-ref "latex" "wasysym"))
2525 "1sgwbfwjjf70g54hh93gsd9jp9nm67w6n74x9d72a56n07jbk5hv"))))
2526 (build-system texlive-build-system)
2527 (arguments '(#:tex-directory "latex/wasysym"))
2528 (home-page "http://www.ctan.org/pkg/wasysym")
2529 (synopsis "LaTeX support file to use the WASY2 fonts")
2531 "The wasy2WASY2 (Waldi Symbol) font by Roland Waldi provides many glyphs
2532 like male and female symbols and astronomical symbols, as well as the complete
2533 lasy font set and other odds and ends. The wasysym package implements an easy
2534 to use interface for these symbols.")
2535 (license license:lppl)))
2537 (define-public texlive-latex-ucs
2539 (name "texlive-latex-ucs")
2540 (version (number->string %texlive-revision))
2544 (url (string-append "svn://www.tug.org/texlive/tags/"
2545 %texlive-tag "/Master/texmf-dist/"
2547 (revision %texlive-revision)))
2548 (file-name (string-append name "-" version "-checkout"))
2551 "0rrxwi60wmz5dfjifl4fwk66plf7wix85qnhfv4ylvmj6qi6hw37"))))
2552 (build-system trivial-build-system)
2554 `(#:modules ((guix build utils))
2557 (use-modules (guix build utils))
2558 (let ((target (string-append (assoc-ref %outputs "out")
2559 "/share/texmf-dist/tex/latex/ucs")))
2561 (copy-recursively (assoc-ref %build-inputs "source") target)
2563 (home-page "http://www.ctan.org/pkg/ucs")
2564 (synopsis "Extended UTF-8 input encoding support for LaTeX")
2566 "The bundle provides the @code{ucs} package, and @code{utf8x.def},
2567 together with a large number of support files. The @code{utf8x.def}
2568 definition file for use with @code{inputenc} covers a wider range of Unicode
2569 characters than does @code{utf8.def} in the LaTeX distribution. The package
2570 provides facilities for efficient use of its large sets of Unicode characters.
2571 Glyph production may be controlled by various options, which permits use of
2572 non-ASCII characters when coding mathematical formulae. Note that the bundle
2573 previously had an alias “unicode”; that alias has now been withdrawn, and no
2574 package of that name now exists.")
2575 (license license:lppl1.3+)))
2577 (define-public texlive-latex-preview
2579 (name "texlive-latex-preview")
2580 (version (number->string %texlive-revision))
2583 (uri (texlive-ref "latex" "preview"))
2584 (file-name (string-append name "-" version "-checkout"))
2587 "0j6fff6q0ca96nwfdgay2jm55792z4q9aa0rczmiw2qccyg5n2dv"))))
2588 (build-system texlive-build-system)
2590 '(#:tex-directory "latex/preview"
2592 (modify-phases %standard-phases
2593 (add-after 'unpack 'remove-generated-file
2595 (delete-file "preview.drv")
2597 (home-page "http://www.ctan.org/pkg/preview")
2598 (synopsis "Extract bits of a LaTeX source for output")
2600 "The main purpose of the preview package is the extraction of selected
2601 elements from a LaTeX source, like formulas or graphics, into separate
2602 pages of a DVI file. A flexible and convenient interface allows it to
2603 specify what commands and constructs should be extracted. This works
2604 with DVI files postprocessed by either Dvips and Ghostscript or
2605 dvipng, but it also works when you are using PDFTeX for generating PDF
2607 (license license:gpl3+)))
2609 (define-public texlive-latex-acronym
2611 (name "texlive-latex-acronym")
2612 (version (number->string %texlive-revision))
2615 (uri (texlive-ref "latex" "acronym"))
2616 (file-name (string-append name "-" version "-checkout"))
2619 "0jmasg40bk53zdd2jc8nc18jvdai3p2wmamy7hwli8gls4nf25qp"))))
2620 (build-system texlive-build-system)
2621 (arguments '(#:tex-directory "latex/acronym"))
2622 (home-page "http://www.ctan.org/pkg/acronym")
2623 (synopsis "Expand acronyms at least once")
2625 "This package ensures that all acronyms used in the text are spelled out
2626 in full at least once. It also provides an environment to build a list of
2627 acronyms used. The package is compatible with PDF bookmarks. The package
2628 requires the suffix package, which in turn requires that it runs under
2630 (license license:lppl1.3+)))
2632 (define texlive-texmf
2634 (name "texlive-texmf")
2636 (source texlive-texmf-src)
2637 (build-system gnu-build-system)
2639 `(("texlive-bin" ,texlive-bin)
2642 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
2646 `(#:modules ((guix build gnu-build-system)
2650 ;; This package takes 4 GiB, which we can't afford to distribute from
2655 (modify-phases (map (cut assq <> %standard-phases)
2656 '(set-paths unpack patch-source-shebangs))
2657 (add-after 'patch-source-shebangs 'install
2658 (lambda* (#:key outputs #:allow-other-keys)
2659 (let ((share (string-append (assoc-ref outputs "out") "/share")))
2661 (system* "mv" "texmf-dist" share))))
2662 (add-after 'install 'texmf-config
2663 (lambda* (#:key inputs outputs #:allow-other-keys)
2664 (let* ((out (assoc-ref outputs "out"))
2665 (share (string-append out "/share"))
2666 (texmfroot (string-append share "/texmf-dist/web2c"))
2667 (texmfcnf (string-append texmfroot "/texmf.cnf"))
2668 (texlive-bin (assoc-ref inputs "texlive-bin"))
2669 (texbin (string-append texlive-bin "/bin"))
2670 (tlpkg (string-append texlive-bin "/share/tlpkg")))
2671 ;; Register SHARE as TEXMFROOT in texmf.cnf.
2672 (substitute* texmfcnf
2673 (("TEXMFROOT = \\$SELFAUTOPARENT")
2674 (string-append "TEXMFROOT = " share))
2675 (("TEXMFLOCAL = \\$SELFAUTOGRANDPARENT/texmf-local")
2676 "TEXMFLOCAL = $SELFAUTODIR/share/texmf-local")
2677 (("!!\\$TEXMFLOCAL") "$TEXMFLOCAL"))
2678 ;; Register paths in texmfcnf.lua, needed for context.
2679 (substitute* (string-append texmfroot "/texmfcnf.lua")
2680 (("selfautodir:") out)
2681 (("selfautoparent:") (string-append share "/")))
2682 ;; Set path to TeXLive Perl modules
2684 (string-append (getenv "PERL5LIB") ":" tlpkg))
2685 ;; Configure the texmf-dist tree; inspired from
2686 ;; http://slackbuilds.org/repository/13.37/office/texlive/
2687 (setenv "PATH" (string-append (getenv "PATH") ":" texbin))
2688 (setenv "TEXMFCNF" texmfroot)
2689 (system* "updmap-sys" "--nohash" "--syncwithtrees")
2690 (system* "mktexlsr")
2691 (system* "fmtutil-sys" "--all")))))))
2692 (properties `((max-silent-time . 9600))) ; don't time out while grafting
2693 (synopsis "TeX Live, a package of the TeX typesetting system")
2695 "TeX Live provides a comprehensive TeX document production system.
2696 It includes all the major TeX-related programs, macro packages, and fonts
2697 that are free software, including support for many languages around the
2700 This package contains the complete tree of texmf-dist data.")
2701 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
2702 (home-page "https://www.tug.org/texlive/")))
2704 (define-public texlive
2709 (build-system trivial-build-system)
2710 (inputs `(("bash" ,bash) ; for wrap-program
2711 ("texlive-bin" ,texlive-bin)
2712 ("texlive-texmf" ,texlive-texmf)))
2713 (native-search-paths
2714 (list (search-path-specification
2715 (variable "TEXMFLOCAL")
2716 (files '("share/texmf-local")))))
2718 `(#:modules ((guix build utils))
2720 ;; Build the union of texlive-bin and texlive-texmf, but take the
2721 ;; conflicting subdirectory share/texmf-dist from texlive-texmf.
2723 (use-modules (guix build utils))
2724 (let ((out (assoc-ref %outputs "out"))
2725 (bin (assoc-ref %build-inputs "texlive-bin"))
2726 (texmf (assoc-ref %build-inputs "texlive-texmf"))
2727 (bash (assoc-ref %build-inputs "bash")))
2729 (with-directory-excursion out
2732 (symlink (string-append bin "/" name) name))
2735 (with-directory-excursion "bin"
2736 (setenv "PATH" (string-append bash "/bin"))
2739 (symlink name (basename name))
2743 (,(string-append texmf "/share/texmf-dist/web2c")))))
2744 (find-files (string-append bin "/bin/") "")))
2746 (with-directory-excursion "share"
2749 (symlink (string-append bin "/share/" name) name))
2750 '("info" "man" "tlpkg"))
2753 (symlink (string-append texmf "/share/" name) name))
2754 '("texmf-dist" "texmf-var"))))))))
2755 (synopsis "TeX Live, a package of the TeX typesetting system")
2757 "TeX Live provides a comprehensive TeX document production system.
2758 It includes all the major TeX-related programs, macro packages, and fonts
2759 that are free software, including support for many languages around the
2762 This package contains the complete TeX Live distribution.")
2763 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
2764 (home-page "https://www.tug.org/texlive/")))
2767 ;; texlive-texmf-minimal is a pruned, small version of the texlive tree,
2768 ;; in particular dropping documentation and fonts. It weighs in at 470 MiB
2769 ;; instead of 4 GiB.
2770 (define texlive-texmf-minimal
2771 (package (inherit texlive-texmf)
2772 (name "texlive-texmf-minimal")
2774 (substitute-keyword-arguments
2775 (package-arguments texlive-texmf)
2776 ((#:modules modules)
2781 `(modify-phases ,phases
2782 (add-after 'unpack 'prune
2784 (define (delete subdir exclude)
2785 "Delete all files and directories in SUBDIR except for those
2786 given in the list EXCLUDE."
2787 (with-directory-excursion subdir
2788 (for-each delete-file-recursively
2789 (lset-difference equal?
2793 (with-directory-excursion "texmf-dist"
2794 (for-each delete-file-recursively
2795 '("doc" "source" "tex4ht"))
2796 ;; Delete all subdirectories of "fonts", except for "tfm" and
2797 ;; any directories named "cm".
2798 (delete "fonts" '("afm" "map" "pk" "source" "tfm" "type1"))
2799 (delete "fonts/afm" '("public"))
2800 (delete "fonts/afm/public" '("amsfonts"))
2801 (delete "fonts/afm/public/amsfonts" '("cm"))
2802 (delete "fonts/map" '("dvips"))
2803 (delete "fonts/map/dvips" '("cm"))
2804 (delete "fonts/source" '("public"))
2805 (delete "fonts/source/public" '("cm"))
2806 (delete "fonts/tfm" '("public"))
2807 (delete "fonts/type1" '("public"))
2808 (delete "fonts/type1/public" '("amsfonts"))
2809 (delete "fonts/type1/public/amsfonts" '("cm")))
2812 "TeX Live provides a comprehensive TeX document production system.
2813 It includes all the major TeX-related programs, macro packages, and fonts
2814 that are free software, including support for many languages around the
2817 This package contains a small subset of the texmf-dist data.")))
2820 ;; texlive-minimal is the same as texlive, but using texlive-texmf-minimal
2821 ;; instead of the full texlive-texmf. It can be used, for instance, as a
2822 ;; native input to packages that need texlive to build their documentation.
2823 (define-public texlive-minimal
2824 (package (inherit texlive)
2825 (name "texlive-minimal")
2827 `(("texlive-texmf" ,texlive-texmf-minimal)
2828 ,@(alist-delete "texlive-texmf" (package-inputs texlive))))
2829 (native-search-paths
2830 (list (search-path-specification
2831 (variable "TEXMFLOCAL")
2832 (files '("share/texmf-local")))))
2834 "TeX Live provides a comprehensive TeX document production system.
2835 It includes all the major TeX-related programs, macro packages, and fonts
2836 that are free software, including support for many languages around the
2839 This package contains a small working part of the TeX Live distribution.")))
2841 (define-public perl-text-bibtex
2843 (name "perl-text-bibtex")
2848 (uri (string-append "mirror://cpan/authors/id/A/AM/AMBS/Text-BibTeX-"
2852 "0kkfx8skk763pivz6h2ffy2zdp1lvy6d5sz0kjaj0mdbjffvnnb4"))))
2853 (build-system perl-build-system)
2856 (modify-phases %standard-phases
2857 (add-after 'unpack 'add-output-directory-to-rpath
2858 (lambda* (#:key outputs #:allow-other-keys)
2859 (substitute* "inc/MyBuilder.pm"
2861 (string-append "-Wl,-rpath="
2862 (assoc-ref outputs "out") "/lib " line)))
2864 (add-after 'unpack 'install-libraries-to-/lib
2865 (lambda* (#:key outputs #:allow-other-keys)
2866 (substitute* "Build.PL"
2870 `(("perl-capture-tiny" ,perl-capture-tiny)
2871 ("perl-config-autoconf" ,perl-config-autoconf)
2872 ("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
2873 ("perl-module-build" ,perl-module-build)))
2874 (home-page "http://search.cpan.org/dist/Text-BibTeX")
2875 (synopsis "Interface to read and parse BibTeX files")
2876 (description "@code{Text::BibTeX} is a Perl library for reading, parsing,
2877 and processing BibTeX files. @code{Text::BibTeX} gives you access to the data
2878 at many different levels: you may work with BibTeX entries as simple field to
2879 string mappings, or get at the original form of the data as a list of simple
2880 values (strings, macros, or numbers) pasted together.")
2881 (license license:perl-license)))
2883 (define-public biber
2889 (uri (string-append "https://github.com/plk/biber/archive/v"
2891 (file-name (string-append name "-" version ".tar.gz"))
2894 "158smzgjhjvyabdv97si5q88zjj5l8j1zbfnddvzy6fkpfhskgkp"))))
2895 (build-system perl-build-system)
2898 (modify-phases %standard-phases
2899 (add-after 'install 'wrap-programs
2900 (lambda* (#:key outputs #:allow-other-keys)
2901 (let* ((out (assoc-ref outputs "out"))
2902 (perl5lib (getenv "PERL5LIB")))
2903 (wrap-program (string-append out "/bin/biber")
2904 `("PERL5LIB" ":" prefix
2905 (,(string-append perl5lib ":" out
2906 "/lib/perl5/site_perl")))))
2909 `(("perl-autovivification" ,perl-autovivification)
2910 ("perl-class-accessor" ,perl-class-accessor)
2911 ("perl-data-dump" ,perl-data-dump)
2912 ("perl-data-compare" ,perl-data-compare)
2913 ("perl-data-uniqid" ,perl-data-uniqid)
2914 ("perl-datetime-format-builder" ,perl-datetime-format-builder)
2915 ("perl-datetime-calendar-julian" ,perl-datetime-calendar-julian)
2916 ("perl-file-slurp" ,perl-file-slurp)
2917 ("perl-ipc-cmd" ,perl-ipc-cmd)
2918 ("perl-ipc-run3" ,perl-ipc-run3)
2919 ("perl-list-allutils" ,perl-list-allutils)
2920 ("perl-list-moreutils" ,perl-list-moreutils)
2921 ("perl-mozilla-ca" ,perl-mozilla-ca)
2922 ("perl-regexp-common" ,perl-regexp-common)
2923 ("perl-log-log4perl" ,perl-log-log4perl)
2924 ;; We cannot use perl-unicode-collate here, because otherwise the
2925 ;; hardcoded hashes in the tests would differ. See
2926 ;; https://mail-archive.com/debian-bugs-dist@lists.debian.org/msg1469249.html
2927 ;;("perl-unicode-collate" ,perl-unicode-collate)
2928 ("perl-unicode-normalize" ,perl-unicode-normalize)
2929 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
2930 ("perl-encode-eucjpascii" ,perl-encode-eucjpascii)
2931 ("perl-encode-jis2k" ,perl-encode-jis2k)
2932 ("perl-encode-hanextra" ,perl-encode-hanextra)
2933 ("perl-xml-libxml" ,perl-xml-libxml)
2934 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)
2935 ("perl-xml-libxslt" ,perl-xml-libxslt)
2936 ("perl-xml-writer" ,perl-xml-writer)
2937 ("perl-sort-key" ,perl-sort-key)
2938 ("perl-text-csv" ,perl-text-csv)
2939 ("perl-text-csv-xs" ,perl-text-csv-xs)
2940 ("perl-text-roman" ,perl-text-roman)
2941 ("perl-uri" ,perl-uri)
2942 ("perl-text-bibtex" ,perl-text-bibtex)
2943 ("perl-libwww" ,perl-libwww)
2944 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
2945 ("perl-business-isbn" ,perl-business-isbn)
2946 ("perl-business-issn" ,perl-business-issn)
2947 ("perl-business-ismn" ,perl-business-ismn)
2948 ("perl-lingua-translit" ,perl-lingua-translit)))
2950 `(("perl-config-autoconf" ,perl-config-autoconf)
2951 ("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
2952 ("perl-module-build" ,perl-module-build)
2954 ("perl-file-which" ,perl-file-which)
2955 ("perl-test-more" ,perl-test-most) ; FIXME: "more" would be sufficient
2956 ("perl-test-differences" ,perl-test-differences)))
2957 (home-page "http://biblatex-biber.sourceforge.net/")
2958 (synopsis "Backend for the BibLaTeX citation management tool")
2959 (description "Biber is a BibTeX replacement for users of biblatex. Among
2960 other things it comes with full Unicode support.")
2961 (license license:artistic2.0)))
2963 ;; Our version of texlive comes with biblatex 3.4, which is only compatible
2964 ;; with biber 2.5 according to the compatibility matrix in the biber
2966 (define-public biber-2.5
2967 (package (inherit biber)
2972 (uri (string-append "https://github.com/plk/biber/archive/v"
2974 (file-name (string-append name "-" version ".tar.gz"))
2977 "163sd343wkrzwnvj2003m2j0kz517jmjr4savw6f8bjxhj8fdrqv"))))
2979 (substitute-keyword-arguments (package-arguments biber)
2981 `(modify-phases ,phases
2982 (add-before 'check 'delete-failing-test
2984 (delete-file "t/sort-order.t")
2987 `(("perl-date-simple" ,perl-date-simple)
2988 ,@(package-inputs biber)))))
2990 (define-public rubber
2996 (uri (list (string-append "https://launchpad.net/rubber/trunk/"
2997 version "/+download/rubber-"
2999 (string-append "http://ebeffara.free.fr/pub/rubber-"
3000 version ".tar.gz")))
3003 "1xbkv8ll889933gyi2a5hj7hhh216k04gn8fwz5lfv5iz8s34gbq"))))
3004 (build-system gnu-build-system)
3005 (arguments '(#:tests? #f)) ; no `check' target
3006 (inputs `(("texinfo" ,texinfo)
3007 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
3009 (home-page "https://launchpad.net/rubber")
3010 (synopsis "Wrapper for LaTeX and friends")
3012 "Rubber is a program whose purpose is to handle all tasks related to the
3013 compilation of LaTeX documents. This includes compiling the document itself,
3014 of course, enough times so that all references are defined, and running BibTeX
3015 to manage bibliographic references. Automatic execution of dvips to produce
3016 PostScript documents is also included, as well as usage of pdfLaTeX to produce
3018 (license license:gpl2+)))
3020 (define-public texmaker
3026 (uri (string-append "http://www.xm1math.net/texmaker/texmaker-"
3027 version ".tar.bz2"))
3030 "056njk6j8wma23mlp7xa3rgfaxx0q8ynwx8wkmj7iy0b85p9ds9c"))))
3031 (build-system gnu-build-system)
3034 (modify-phases %standard-phases
3035 ;; Qt has its own configuration utility.
3037 (lambda* (#:key outputs #:allow-other-keys)
3038 (let ((out (assoc-ref outputs "out")))
3039 (zero? (system* "qmake"
3040 (string-append "PREFIX=" out)
3041 (string-append "DESKTOPDIR=" out
3042 "/share/applications")
3043 (string-append "ICONDIR=" out "/share/pixmaps")
3044 "texmaker.pro"))))))))
3046 `(("poppler-qt5" ,poppler-qt5)
3048 ("qtscript" ,qtscript)
3049 ("qtwebkit" ,qtwebkit)
3052 `(("pkg-config" ,pkg-config)))
3053 (home-page "http://www.xm1math.net/texmaker/")
3054 (synopsis "LaTeX editor")
3055 (description "Texmaker is a program that integrates many tools needed to
3056 develop documents with LaTeX, in a single application.")
3057 (license license:gpl2+)))
3060 (define-public teximpatient
3062 (name "teximpatient")
3066 (uri (string-append "mirror://gnu/" name "/" name "-"
3070 "0h56w22d99dh4fgld4ssik8ggnmhmrrbnrn1lnxi1zr0miphn1sd"))))
3071 (build-system gnu-build-system)
3074 (modify-phases %standard-phases
3076 ;; Unfortunately some mistakes have been made in packaging.
3077 ;; Work around them here ...
3079 (lambda* (#:key inputs outputs #:allow-other-keys)
3080 (let ((srcdir "teximpatient-2.4"))
3081 (system* "tar" "-xzf" (assoc-ref inputs "source")
3082 (string-append "--one-top-level=" srcdir))
3083 (delete-file (string-append srcdir "/book.pdf"))
3086 (assoc-ref inputs "automake")
3089 (chdir srcdir)))))))
3091 `(("texlive" ,texlive)
3092 ("automake" ,automake)))
3093 (home-page "https://www.gnu.org/software/teximpatient/")
3094 (synopsis "Book on TeX, plain TeX and Eplain")
3095 (description "@i{TeX for the Impatient} is a ~350 page book on TeX,
3096 plain TeX, and Eplain, originally written by Paul Abrahams, Kathryn Hargreaves,
3098 (license license:fdl1.3+)))