From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/27497 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: math2svg Lua filter now available! Date: Mon, 18 Jan 2021 11:06:59 +0100 Message-ID: <87im7ud0e4.fsf@zeitkraut.de> References: <5bcd2b35-8e92-4c98-9768-ba498c97383eo@googlegroups.com> <04d0e359-5cab-4e1f-a2b4-0b4a20912fa7n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33049"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRBSN3SWAAMGQEDAH2KGI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jan 18 11:07:07 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wm1-f57.google.com ([209.85.128.57]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l1RRD-0008TO-KY for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 18 Jan 2021 11:07:07 +0100 Original-Received: by mail-wm1-f57.google.com with SMTP id d2sf523436wmc.1 for ; Mon, 18 Jan 2021 02:07:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1610964427; cv=pass; d=google.com; s=arc-20160816; b=TqVt/FkwN97lZOMsXEQqCIPoWZSxVzhfOe5O2fKNiMTqGTMhQ4RyFdc2Vz2mIGnANi 5oNa+626Do42MT3xRHlt2eI7qcyQn30klZw+BLz9Fd89x9JUNFgssZb7ZULxc3AktFpS eK7gogIbdQ4eqK+GnNa8m3ubfYl44svyilYC9f/kHzq5hTpJj++A+GfcWQydmB0pOl7y NFxkVBvI+H/JSyA0L+gap29K5mXb1FkV4BG/2JpLatkX1q7CR5ClMMKTd9qSc1x/+a/L v+5Ehm4WGLo3n6GYuroMLnFlsKcuhv/ZxiLMe0KADB8HDSrpjyzzhGVIZhyAFO7oC84H OzfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:message-id :date:in-reply-to:subject:to:from:references:sender:dkim-signature; bh=RnrklwDZ7QRxZtW9Dlz+VwAVHJYf9u1OvTDOmHGkXbo=; b=XJCXBh8UHYrhOzEQoe0NcnI/iD6S6c7aZAGeSsJV+rwfAc9DtnLh/ecrw5xleUvnXC 3/08EGZr4CQCXiCTVkA9hTJyDE2D6O8CWbjqGQkCMRm9zHl8mFwdn0jEoe5LYpJ5RD8Y keOj4P4wZIYXnPBKKkYq5wKCWUDEnX3pkjNwaipnOhVnT5l2Fb/E1+40a/JfEQ6LBZYV vZDZPDMvzHlstVmJF9MuUAnDVcwzUPTVdo2szE2KmElO8K90GhEK8GgRpOMgDTsB/07R pNE2gQ3NxWfBI8Ki+pGGl5ltO2Yrzgx0O86oCHfaU5PnI3CAh+bFYLh43FeQchm+5Ql7 FKPA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050::465:202 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:references:from:to:subject:in-reply-to:date:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=RnrklwDZ7QRxZtW9Dlz+VwAVHJYf9u1OvTDOmHGkXbo=; b=EruiA7RwsSmScqxexRj767qm+0zKYCFfGPiRbIfg83/cLGfu7CL6e1QeV0hQFlmNT4 k2/DK6WN16S008a9mNbTmerdS/uiJwhIAP4YnUgLhWbT/tlxseE8KOiwzs2QttLKgbAc yRA9eTBrTRZ9JPcljAq5ZTGUzoe3PR/UHJVjXN/yPQ5HDaXzkANw3tQYRIZjPbhpOMaz AfakMdrCPL9VLbGLaaM052D7P3UjhoSqJi/yhTu/VPUfhDF0iNKQfafjIhEdCZ3TwVtP PJx+qpIqBZaXI27j2V1Jt9zq5iNF0YA6sLVaDPcF+x5iTJLxSAsemw3ivjLNBcqLXBZ+ 2suA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:references:from:to:subject:in-reply-to :date:message-id:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=RnrklwDZ7QRxZtW9Dlz+VwAVHJYf9u1OvTDOmHGkXbo=; b=PSW9dIFHCqvRUy76zEusgRAmJEXfrsne+S0JgAKjrtr0G2zO/Mb/Hcw3WP0BLvzDw/ dDH2IvQJk7UYJLVSht7HQ9DDu7QodUhbXfz6bT2LxTVAqd9/6mipWLJ3fFHTu2PJtf8C 9vZyWnZ6qGJXsU2+b3pxw/gA6VjPLzhMqNbWkU9blAU28ib7PegaMKGZR0Y7bY4RrXm/ CR1yAtoCugDASJ7t9L1ROByG5Si9CXUI329UEkVRx3BzN63AzTvqh8+M74qwu51EMOXO oH88ySLAKPYHPLo9OHOIoHcr2vPZaBNDkDZ9gnpMGHwKbfPOq/VcTHNzv1G/4ZLx2Nud ETiw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531VMxoaf11Lis2LQafLVqxe8oL+HuSyBfHrjADP8yxWS3wxv1TB qWbXjKbQvuyZV3UDg94XoXs= X-Google-Smtp-Source: ABdhPJzaHuD4sW/q17Zg/C6cmQGcJ9nxinSqm6UPa9kDeVHWLiQ/5rcmwe8Xnorojcs3nUonYLUdqQ== X-Received: by 2002:a1c:25c2:: with SMTP id l185mr5335321wml.62.1610964427285; Mon, 18 Jan 2021 02:07:07 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a1c:385:: with SMTP id 127ls5898751wmd.0.canary-gmail; Mon, 18 Jan 2021 02:07:05 -0800 (PST) X-Received: by 2002:a7b:cb54:: with SMTP id v20mr20400923wmj.148.1610964424981; Mon, 18 Jan 2021 02:07:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610964424; cv=none; d=google.com; s=arc-20160816; b=u4LPXVZ2fvNaejbYdVwd5SKw45J+zy1EyZdyN0NBDFT8RJE5Gj84hPrp4Ceote4I4g UrWiLSly2jGuXeDfU0A+MdTIsMU03txGKfvqC0BcONbj/iBbwAvu1kWLClvMBbjaJF6Q iMR2Or+p8webpVZVucaXUXyyq+bZt86J4ikQ0JXFPd2df8QX8Mc7bP3Y4ybIx9BVy3no kcVDTCOUJf0MWUtrezMt0YU7oYQJ88ddAKAGNZYEKudDLBDnN7V5xgTxz/Bms0JpxJgr QktEbDEB0yHlHgvABU7Dwpvae/muJyS4YhNZ9fea+51v9phFCPYqTza1aBmfbVGl9pi/ B/Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:in-reply-to:subject:to:from:references; bh=uEg3/hCPtPh/Yb5aeRgRVxR7WDGJXuDo7mO/sqOa3N0=; b=do776wKxZ32pJ7ca2tSZq9uxDrrLR7piD4wpL7gMRPceYfKnlkf/qtdnyYwUzls8sU MQ1jOEJVLyZ+rmLHJSKnK9t4q04iPWid7PweRW5mpaYgnzXDIYrKcF5PpckXwDaQfqAW VRKAr2fjcW0rB7GffFUlnt5WAJQ+O+X183c/FcHcWsF3FXFuZ4kfaxNLWkm3bq+0c0M3 k9godoD9WegnwPoTKo2RKKKPfiUZKI73h/bLwe8HV9c05zLzD1sy9wFC5NyScgQ1vNIT ZqS95GpOAmNIDmWSsWuGzwA/ZUIPzf48/KYNDN1gWL/Dtkld+brsfKTA4Wz5aJ2YcbDQ eFaA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050::465:202 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org. [2001:67c:2050::465:202]) by gmr-mx.google.com with ESMTPS id b1si912359wrv.5.2021.01.18.02.07.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 02:07:04 -0800 (PST) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050::465:202 as permitted sender) client-ip=2001:67c:2050::465:202; Original-Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4DK6s445vxzQlS2 for ; Mon, 18 Jan 2021 11:07:04 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Original-Received: from smtp2.mailbox.org ([80.241.60.241]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id o4cEpj0WNXHj for ; Mon, 18 Jan 2021 11:07:00 +0100 (CET) In-reply-to: <04d0e359-5cab-4e1f-a2b4-0b4a20912fa7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Rspamd-Score: -11.06 / 15.00 / 15.00 X-Rspamd-Queue-Id: 35C0E17D4 X-Rspamd-UID: 870ece X-Original-Sender: albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050::465:202 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:27497 Archived-At: Attempting an answer: The main difference is Haskell vs. Lua filter, i.e. Serge's filter can be used without having a Haskell stack installed. It is also very configurable, allowing, e.g., to chose the font and SVG image properties via metadata settings. The filter by jgm has a cache to avoid repeated rendering of the same images. It thereby might be faster when rendering both display and inline math, as inline math often contains single variables like $x$. PRs to add this to the Lua version would be welcome. Serge's README also provides CSS snippets to number equations; this might be of interest no matter which filter is used. For reference, the filter by jgm is here: https://github.com/jgm/pandoc-tex2svg christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org writes: > What's the difference with jgm's similar package? > > On Saturday, January 16, 2021 at 12:42:07 PM UTC-8 stoo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > This is to inform the Pandoc community that the math2svg Lua filter is now available from: > https://github.com/pandoc/lua-filters/tree/master/math2svg > > math2svg converts LaTeX math to MathJax generated scalable vector graphics (SVG) for insertion into the output document in a > standalone manner. SVG output is in any of the available MathJax fonts. > > This is useful when a CSS paged media engine (such as Prince XML) cannot process complex JavaScript as required by MathJax. See: > https://www.print-css.rocks for information about CSS paged media, a W3C standard. > > No Internet connection is required when generating or viewing SVG formulas, resulting in both absolute privacy and offline, standalone > robustness. > > Personally, I have been using it for quite some time to generate PDFs with MathJax generated formulas in an unattended typesetting > workflow using Prince XML. > > Here is a brief sample document: > https://hamwaves.com/zc.measuring/en/zc.measuring.letter.pdf > > More intricate documents with Markdown source, makefile and CSS are available from the same web site. > > Kind regards, > Serge Y. Stroobandt -- Albert Krewinkel GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124