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