gnu: Add texlive-microtype.
[jackhill/guix/guix.git] / gnu / packages / tex.scm
index 137e000..3ac6e5e 100644 (file)
@@ -3,7 +3,7 @@
 ;;; 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, 2020 Ricardo Wurmus <rekado@elephly.net>
@@ -11,8 +11,9 @@
 ;;; 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)
@@ -3093,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
@@ -6005,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
+              (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)))
-    (inputs `(("python" ,python-2) ; incompatible with Python 3 (print syntax)
-              ("which" ,which)))
     (home-page "https://launchpad.net/rubber")
     (synopsis "Wrapper for LaTeX and friends")
     (description
@@ -6116,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 ")))
-             #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")
-                               "/")))
+                               "/bin/python3 ")))
              #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.
@@ -7306,7 +7290,7 @@ to what constitutes a good table in this context.  The package offers
                    (list "/doc/latex/csquotes/"
                          "/tex/latex/csquotes/")
                    (base32
-                    "15hgn37zg433skn7ijqs1kl2z56fhy29cjxn01b5pjrnrkdar4i4")
+                    "088gvi60d7sdl6fgg68fbz30fnpqc3yrpkx80sfw7vwgar3wm3av")
                    #:trivial? #t)))
     (package
       (inherit template)
@@ -7325,3 +7309,137 @@ 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))))
+
+(define-public texlive-todonotes
+  (let ((template (simple-texlive-package
+                   "texlive-todonotes"
+                   (list "/doc/latex/todonotes/"
+                         "/tex/latex/todonotes/")
+                   (base32
+                    "0lvxsskz4bdfxhd59hf77kiq8k4nh2spb66vc6hifdgi21z8r8wm")
+                   #:trivial? #t)))
+    (package
+      (inherit template)
+      (propagated-inputs
+       `(("texlive-latex-pgf" ,texlive-latex-pgf)
+         ("texlive-latex-xkeyval" ,texlive-latex-xkeyval)))
+      (home-page "http://www.ctan.org/pkg/todonotes")
+      (synopsis "Marking things to do in a LaTeX document")
+      (description "The @code{todonotes} package lets the user mark
+things to do later, in a simple and visually appealing way.  The
+package takes several options to enable customization and finetuning
+of the visual appearance.")
+      (license license:lppl1.3+))))
+
+(define-public texlive-units
+  (let ((template (simple-texlive-package
+                   "texlive-units"
+                   (list "/doc/latex/units/"
+                         "/tex/latex/units/")
+                   (base32
+                    "1ia1vzy8dp7pdvmawwnmh9lmkajmpnnh62dixrjpb6mnxq118bfd")
+                   #:trivial? #t)))
+    (package
+      (inherit template)
+      (home-page "http://www.ctan.org/pkg/units")
+      (synopsis "Typeset physical units and fractions")
+      (description "@code{units} is a package for typesetting physical
+units in a standard-looking way.  The package is based upon
+@code{nicefrac}, a package for typing fractions.  @code{nicefrac} is
+included in the @code{units} bundle.")
+      (license license:gpl3+))))
+
+(define-public texlive-microtype
+  (let ((template (simple-texlive-package
+                   "texlive-microtype"
+                   (list "/doc/latex/microtype/"
+                         "/tex/latex/microtype/")
+                   (base32
+                    "0xmjpzbj4nqmnl5m7xx1bshdk2c8n57rmbvn0j479ypj4wdlq9iy")
+                   #:trivial? #t)))
+    (package
+      (inherit template)
+      (home-page "http://www.ctan.org/pkg/microtype")
+      (synopsis "Subliminal refinements towards typographical perfection")
+      (description "@code{microtype} provides a LaTeX interface to the
+micro-typographic extensions that were introduced by pdfTeX and have
+since propagated to XeTeX and LuaTeX: most prominently character
+protrusion and font expansion, the adjustment of kerning and interword
+spacing, hyphenatable letterspacing and the possibility to disable all
+or selected ligatures.  These features may be applied to customisable
+sets of fonts.  All micro-typographic aspects of the fonts can be
+configured in a straight-forward and flexible way.  Settings for
+various fonts are provided.  An alternative package @code{letterspace},
+which also works with plain TeX, is included in the bundle.")
+      (license license:lppl1.3c))))