gnu: r-maldiquant: Move to (gnu packages cran).
[jackhill/guix/guix.git] / gnu / packages / tex.scm
index d95434a..63b144c 100644 (file)
@@ -3,15 +3,17 @@
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2016, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
-;;; Copyright © 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017, 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Danny Milosavljevic <dannym+a@scratchpost.org>
-;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2018, 2020 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2020 Paul Garlick <pgarlick@tourbillion-technology.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
+  #:use-module (guix build-system python)
+  #:use-module (guix build-system qt)
   #:use-module (guix build-system trivial)
   #:use-module (guix build-system texlive)
   #:use-module (guix utils)
@@ -255,7 +258,8 @@ files from LOCATIONS with expected checksum HASH.  CODE is not currently in use.
                       "03vc88dz37mjjyaspzv0fik2fp5gp8qv82114869akd1dhszbaax")
           (search-patch "texlive-bin-poppler-0.83.patch")
           (arch-patch "texlive-poppler-0.84.patch" arch-revision
-                      "1ia6cr99krk4ipx4hdi2qdb98bh2h26mckjlpxdzrjnfhlnghksa"))))
+                      "1ia6cr99krk4ipx4hdi2qdb98bh2h26mckjlpxdzrjnfhlnghksa")
+          (search-patch "texlive-bin-poppler-0.86.patch"))))
       (modules '((guix build utils)
                  (ice-9 ftw)))
       (snippet
@@ -3091,7 +3095,7 @@ this bundle for use independent of ConTeXt.")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                    (url "https://github.com/lualatex/luaotfload.git")
+                    (url "https://github.com/lualatex/luaotfload")
                     (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
@@ -4755,6 +4759,32 @@ fonts.  Note that direct substitutes for the bitmapped EC fonts are available,
 via the CM-super, Latin Modern and (in a restricted way) CM-LGC font sets.")
     (license license:lppl1.3+)))
 
+(define-public texlive-inconsolata
+  (package
+    (inherit (simple-texlive-package
+              "texlive-inconsolata"
+              (list "/doc/fonts/inconsolata/"
+                    "/fonts/enc/dvips/inconsolata/"
+                    "/fonts/map/dvips/inconsolata/"
+                    "/fonts/opentype/public/inconsolata/"
+                    "/fonts/tfm/public/inconsolata/"
+                    "/fonts/type1/public/inconsolata/"
+                    "/tex/latex/inconsolata/")
+              (base32
+               "1a77w26m4c4j0202s1qkikz7ha6cxlv8zxhzi9s3l0x1l2pl7cr2")
+              #:trivial? #t))
+    (home-page "https://www.ctan.org/pkg/inconsolata")
+    (synopsis "Monospaced font with support files for use with TeX")
+    (description
+     "Inconsolata is a monospaced font designed by Raph Levien.  This package
+contains the font (in both Adobe Type 1 and OpenType formats) in regular and
+bold weights, with additional glyphs and options to control slashed zero,
+upright quotes and a shapelier lower-case L, plus metric files for use with
+TeX, and LaTeX font definition and other relevant files.")
+    (license (list license:lppl1.3+
+                   license:silofl1.1
+                   license:asl2.0))))
+
 (define-public texlive-times
   (package
     (inherit (simple-texlive-package
@@ -5888,6 +5918,9 @@ values (strings, macros, or numbers) pasted together.")
 
 (define-public biber
   (package
+    ;; Note: When updating Biber, make sure it matches our BibLaTeX version by
+    ;; checking the Biber/BibLaTeX compatibility matrix in the BibLaTeX manual
+    ;; at <https://ctan.org/pkg/biblatex>.
     (name "biber")
     (version "2.12")
     (source (origin
@@ -5898,7 +5931,8 @@ values (strings, macros, or numbers) pasted together.")
               (file-name (git-file-name name version))
               ;; TODO: Patch awaiting inclusion upstream (see:
               ;; https://github.com/plk/biber/issues/239).
-              (patches (search-patches "biber-fix-encoding-write.patch"))
+              (patches (search-patches "biber-fix-encoding-write.patch"
+                                       "biber-sortinithash.patch"))
               (sha256
                (base32
                 "1g1hi6zvf2hmrjly1sidjaxy5440gfqm4p7p3n7kayshnjsmlskx"))))
@@ -5973,22 +6007,30 @@ other things it comes with full Unicode support.")
 (define-public rubber
   (package
     (name "rubber")
-    (version "1.1")
+    (version "1.5.1")
     (source (origin
-             (method url-fetch)
-             (uri (list (string-append "https://launchpad.net/rubber/trunk/"
-                                       version "/+download/rubber-"
-                                       version ".tar.gz")
-                        (string-append "http://ebeffara.free.fr/pub/rubber-"
-                                       version ".tar.gz")))
-             (sha256
-              (base32
-               "1xbkv8ll889933gyi2a5hj7hhh216k04gn8fwz5lfv5iz8s34gbq"))))
-    (build-system gnu-build-system)
-    (arguments '(#:tests? #f))                    ; no `check' target
-    (inputs `(("texinfo" ,texinfo)
-              ("python" ,python-2) ; incompatible with Python 3 (print syntax)
-              ("which" ,which)))
+              (method url-fetch)
+              (uri (list (string-append "https://launchpad.net/rubber/trunk/"
+                                        version "/+download/rubber-"
+                                        version ".tar.gz")
+                         (string-append "http://ebeffara.free.fr/pub/rubber-"
+                                        version ".tar.gz")))
+              (sha256
+               (base32
+                "178dmrp0mza5gqjiqgk6dqs0c10s0c517pk6k9pjbam86vf47a1p"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:tests? #f ; no `check' target
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'build)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; texlive is required to build the PDF documentation; do not
+             ;; build it.
+             (invoke "python" "setup.py" "build" "--pdf=False" "install"
+                     (string-append "--prefix=" (assoc-ref outputs "out"))))))))
+    (native-inputs `(("texinfo" ,texinfo)))
     (home-page "https://launchpad.net/rubber")
     (synopsis "Wrapper for LaTeX and friends")
     (description
@@ -6084,75 +6126,49 @@ and Karl Berry.")
 (define-public lyx
   (package
     (name "lyx")
-    (version "2.3.3")
+    (version "2.3.5.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://ftp.lyx.org/pub/lyx/stable/"
                                   (version-major+minor version) ".x/"
-                                  "lyx-" version ".tar.gz"))
+                                  "lyx-" version ".tar.xz"))
               (sha256
                (base32
-                "0j3xincwmsscfgv13g3z6h4kx1qfzgg8x71fs393akcdxsh2g07c"))
+                "0mv32s26igm0pd8vs7d2mk1240dpr83y0a2wyh3xz6b67ph0w157"))
               (modules '((guix build utils)))
               (snippet
                '(begin
                   (delete-file-recursively "3rdparty")
                   #t))))
-    (build-system cmake-build-system)
+    (build-system qt-build-system)
     (arguments
      `(#:configure-flags `("-DLYX_USE_QT=QT5"
                            "-DLYX_EXTERNAL_BOOST=1"
                            "-DLYX_INSTALL=1"
                            "-DLYX_RELEASE=1"
+                           "-DLYX_PROGRAM_SUFFIX=OFF"
                            ,(string-append "-DLYX_INSTALL_PREFIX="
-                                           (assoc-ref %outputs "out")
-                                           ;; Exact name and level is necessary.
-                                           "/lyx" ,(version-major+minor version)))
+                                           (assoc-ref %outputs "out")))
        #:phases
        (modify-phases %standard-phases
-         ;; See ;; https://www.lyx.org/trac/changeset/3a123b90af838b08680471d87170c38e56787df9/lyxgit
-         (add-after 'unpack 'fix-compilation-with-boost-1.69
-           (lambda _
-             (substitute* "src/support/FileName.cpp"
-               (("^template struct boost::detail::crc_table_t.*") ""))
-             #t))
          (add-after 'unpack 'patch-python
            (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* '("src/support/os.cpp")
+             (substitute* '("lib/configure.py"
+                            "src/support/ForkedCalls.cpp"
+                            "src/support/Systemcall.cpp"
+                            "src/support/os.cpp"
+                            "src/support/filetools.cpp")
                (("\"python ")
                 (string-append "\""
                                (assoc-ref inputs "python")
-                               "/bin/python ")))
+                               "/bin/python3 ")))
              #t))
-         (add-after 'patch-python 'patch-desktop-file
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "lib/lyx.desktop.in"
-               (("Exec=")
-                (string-append "Exec="
-                               (assoc-ref outputs "out")
-                               "/")))
-             #t))
-         (add-before 'check 'setenv-check
+         (add-after 'unpack 'add-missing-test-file
            (lambda _
              ;; Create missing file that would cause tests to fail.
-             (with-output-to-file (string-append "../lyx-"
-                                                 ,version
-                                                 "/src/tests/check_layout.cmake")
+             (with-output-to-file "src/tests/check_layout.cmake"
                (const #t))
-             (setenv (string-append "LYX_DIR_"
-                                    (string-join
-                                      (string-split
-                                        ,(version-major+minor version) #\-)) "x")
-                     (string-append (getcwd) "/../lyx-" ,version "/lib"))
-             #t))
-         (add-after 'install 'install-symlinks
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (mkdir-p (string-append out "/bin"))
-               (symlink (string-append "../lyx" ,(version-major+minor version)
-                                       "/bin/lyx" ,(version-major+minor version))
-                        (string-append out "/bin/lyx" ,(version-major+minor version)))
-               #t))))))
+             #t)))))
     (inputs
      `(("boost" ,boost)
        ("hunspell" ,hunspell)           ; Note: Could also use aspell instead.
@@ -6920,7 +6936,7 @@ the file to which it applies.")
     (home-page "https://www.ctan.org/pkg/pdfx")
     (synopsis "PDF/X and PDF/A support for pdfTeX, LuaTeX and XeTeX")
     (description
-     "This package helps LaTeX users to create PDF/X, PFD/A and other
+     "This package helps LaTeX users to create PDF/X, PDF/A and other
 standards-compliant PDF documents with pdfTeX, LuaTeX and XeTeX.")
     (license license:lppl1.2+)))
 
@@ -7021,6 +7037,32 @@ a different path and manipulating characters.  It includes the functionality
 of the old package @code{pst-char}.")
       (license license:lppl))))
 
+(define-public texlive-marginnote
+  (let ((template (simple-texlive-package
+                   "texlive-marginnote"
+                   (list "/source/latex/marginnote/marginnote.dtx")
+                   (base32
+                    "1vj1k8xm11gjdfj60as42d8lsv3dbzrm5dlgqcfk89d9dzm3k39j"))))
+    (package
+      (inherit template)
+      (home-page "http://www.ctan.org/pkg/marginnote")
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/marginnote")
+         ((#:build-targets _ '())
+          ''("marginnote.dtx"))
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (add-after 'unpack 'chdir
+               (lambda _ (chdir "source/latex/marginnote") #t))))))
+      (synopsis "Notes in the margin")
+      (description "This package provides the command @code{\\marginnote} that
+may be used instead of @code{\\marginpar} at almost every place where
+@code{\\marginpar} cannot be used, e.g., inside floats, footnotes, or in
+frames made with the @code{framed} package.")
+      (license license:lppl1.3c+))))
+
 (define-public texlive-iftex
   (let ((template (simple-texlive-package
                    "texlive-iftex"
@@ -7241,3 +7283,100 @@ commands as well as behind-the-scenes optimisation.  Guidelines are given as
 to what constitutes a good table in this context.  The package offers
 @code{longtable} compatibility.")
     (license license:lppl1.3+)))
+
+(define-public texlive-csquotes
+  (let ((template (simple-texlive-package
+                   "texlive-csquotes"
+                   (list "/doc/latex/csquotes/"
+                         "/tex/latex/csquotes/")
+                   (base32
+                    "088gvi60d7sdl6fgg68fbz30fnpqc3yrpkx80sfw7vwgar3wm3av")
+                   #:trivial? #t)))
+    (package
+      (inherit template)
+      (propagated-inputs
+       `(("texlive-etoolbox" ,texlive-etoolbox)))
+      (home-page "https://www.ctan.org/pkg/csquotes")
+      (synopsis "Context sensitive quotation facilities")
+      (description "This package provides advanced facilities for inline and
+display quotations.  It is designed for a wide range of tasks ranging from the
+most simple applications to the more complex demands of formal quotations.
+The facilities include commands, environments, and user-definable 'smart
+quotes' which dynamically adjust to their context.  Quotation marks are
+switched automatically if quotations are nested and they can be adjusted to
+the current language if the babel package is available.  There are additional
+facilities designed to cope with the more specific demands of academic
+writing, especially in the humanities and the social sciences.  All quote
+styles as well as the optional active quotes are freely configurable.")
+      (license license:lppl1.3c+))))
+
+(define-public texlive-logreq
+  (let ((template (simple-texlive-package
+                   "texlive-logreq"
+                   (list "/doc/latex/logreq/"
+                         "/tex/latex/logreq/")
+                   (base32
+                    "13difccs3cxlkqlnhw286yb0c7mifrxfd402a2x5wwxv0m1kgfqd")
+                   #:trivial? #t)))
+    (package
+      (inherit template)
+      (propagated-inputs
+       `(("texlive-etoolbox" ,texlive-etoolbox)))
+      (home-page "https://www.ctan.org/pkg/logreq")
+      (synopsis "Support for automation of the LaTeX workflow")
+      (description "The package helps to automate a typical LaTeX
+workflow that involves running LaTeX several times and running tools
+such as BibTeX or makeindex.  It will log requests like \"please rerun
+LaTeX\" or \"please run BibTeX on file X\" to an external file in a
+machine-readable format.  Compiler scripts and integrated LaTeX
+editing environments may parse this file to determine the next steps
+in the workflow.  In sum, the package will do two things:
+
+@enumerate
+@item
+enable package authors to use LaTeX commands to issue requests, and
+
+@item
+collect all requests from all packages and write them to an external
+XML file.
+@end enumerate\n")
+      (license license:lppl1.3c))))
+
+(define-public texlive-biblatex
+  (let ((template (simple-texlive-package
+                   "texlive-biblatex"
+                   (list "/doc/latex/biblatex/"
+                         "/tex/latex/biblatex/")
+                   (base32
+                    "11kzvny50iklzkamr0rqd5x532q8rxny1xhmf96jl8mzj1d2zmay")
+                   #:trivial? #t)))
+    (package
+      (inherit template)
+      (propagated-inputs
+       `(("texlive-logreq" ,texlive-logreq)
+         ("texlive-url" ,texlive-url)))
+      (home-page "https://www.ctan.org/pkg/biblatex")
+      (synopsis "Sophisticated bibliographies in LaTeX")
+      (description "BibLaTeX is a complete reimplementation of the
+bibliographic facilities provided by LaTeX.  Formatting of the
+bibliography is entirely controlled by LaTeX macros, facilitating the
+design of new bibliography and citation styles.  BibLaTeX uses its own
+data backend program \"biber\" to read and process the bibliographic
+data.  With biber, the range of features provided by biblatex
+includes:
+
+@enumerate
+@item
+full unicode support,
+
+@item
+customisable bibliography labels,
+
+@item
+multiple bibliographies in the same document, and
+
+@item
+subdivided bibliographies, such as bibliographies per chapter or
+section.
+@end enumerate\n")
+      (license license:lppl1.3c))))