From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 67549@debbugs.gnu.org
Cc: ngraves@ngraves.fr
Subject: [bug#67549] [PATCH 2/2] gnu: Add latexml.
Date: Sat, 2 Dec 2023 12:08:46 +0100 [thread overview]
Message-ID: <20231202110848.25504-2-ngraves@ngraves.fr> (raw)
In-Reply-To: <20231202110848.25504-1-ngraves@ngraves.fr>
* gnu/packages/markup.scm (latexml): New variable.
Change-Id: If7199a8b74b990ad29718adcb905a5ed31882cf5
---
gnu/packages/markup.scm | 87 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 86 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/markup.scm b/gnu/packages/markup.scm
index 4a9a382104..67c39686d0 100644
--- a/gnu/packages/markup.scm
+++ b/gnu/packages/markup.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2022 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -45,13 +46,18 @@ (define-module (gnu packages markup)
#:use-module (gnu packages base)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages databases)
#:use-module (gnu packages libffi)
+ #:use-module (gnu packages imagemagick)
#:use-module (gnu packages perl)
#:use-module (gnu packages perl-check)
+ #:use-module (gnu packages perl-compression)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
- #:use-module (gnu packages web))
+ #:use-module (gnu packages tex)
+ #:use-module (gnu packages web)
+ #:use-module (gnu packages xml))
(define-public hoedown
(package
@@ -125,6 +131,85 @@ (define-public markdown
(license (license:non-copyleft "file://License.text"
"See License.text in the distribution."))))
+(define-public latexml
+ (package
+ (name "latexml")
+ (version "0.8.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ "https://math.nist.gov/~BMiller/LaTeXML/releases/LaTeXML-0.8.7.tar.gz")
+ (sha256
+ (base32 "0yfclh3bkksd4xvrhwf06xsbisp84x12vk6lml6yr7bp82a9vni5"))))
+ (build-system perl-build-system)
+ (arguments
+ (let ((input-names (map (compose package-name cadr)
+ (package-propagated-inputs this-package))))
+ (list
+ #:tests? #f ; Some file tests are missing.
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'find-itself
+ ;; Fix run-time 'Can't locate [].pm in @INC' failure.
+ (lambda _
+ (with-directory-excursion (string-append #$output "/bin")
+ (for-each
+ (lambda (program)
+ (wrap-program program
+ `("PERL5LIB" ":" prefix
+ (,(string-append #$output "/lib/perl5/site_perl")
+ ,#$@(map (lambda (in)
+ (file-append
+ (this-package-input in) "/lib/perl5/site_perl"))
+ input-names)))))
+ (find-files "." ".*")))))))))
+ (inputs
+ (list perl libxml2 libxslt))
+ (propagated-inputs
+ (list perl-archive-zip
+ perl-common-sense
+ perl-db-file
+ perl-file-which
+ perl-encode-locale
+ perl-getopt-long
+ perl-http-date
+ perl-http-message
+ perl-image-magick
+ perl-image-size
+ perl-io-string
+ perl-json-xs
+ perl-libwww
+ perl-mime-base64
+ perl-parse-recdescent
+ perl-pod-parser
+ perl-text-unidecode
+ perl-time-hires
+ perl-try-tiny
+ perl-types-serialiser
+ perl-uri
+ perl-xml-libxml
+ perl-xml-libxslt
+ perl-xml-sax-base))
+ (native-inputs
+ (list texlive-bin
+ perl-test-more-utf8
+ perl-extutils-manifest
+ perl-data-dumper
+ perl-ipc-run3
+ perl-file-temp))
+ (home-page "https://math.nist.gov/~BMiller/LaTeXML")
+ (synopsis "A LaTeX to XML/HTML/MathML converter")
+ (description "This package provides a LaTeX converter, with the following goals:
+@itemize
+@item Faithful emulation of TEX’s behaviour;
+@item Easily extensible;
+@item Lossless, preserving both semantic and presentation cues;
+@item Use an abstract LATEX-like, extensible, document type;
+@item Infer the semantics of mathematical content
+@end itemize")
+ (license license:cc0)))
+
(define-public lowdown
(package
(name "lowdown")
--
2.41.0
next prev parent reply other threads:[~2023-12-02 11:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 17:17 [bug#67549] [PATCH 0/2] gnu: Add latexml Nicolas Graves via Guix-patches via
2023-12-02 11:08 ` [bug#67549] [PATCH 1/2] gnu: Add perl-image-size Nicolas Graves via Guix-patches via
2023-12-02 11:08 ` Nicolas Graves via Guix-patches via [this message]
2024-04-11 22:10 ` [bug#67549] [PATCH v2 0/2] Re: Add latexml Steve George
2024-04-11 22:10 ` [bug#67549] [PATCH v2 1/2] gnu: Add perl-image-size Steve George
2024-04-11 22:10 ` [bug#67549] [PATCH v2 2/2] gnu: Add latexml Steve George
2024-04-16 22:03 ` bug#67549: [PATCH v2 0/2] " Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231202110848.25504-2-ngraves@ngraves.fr \
--to=guix-patches@gnu.org \
--cc=67549@debbugs.gnu.org \
--cc=ngraves@ngraves.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).