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