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