From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/24665 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Gwern Branwen Newsgroups: gmane.text.pandoc Subject: Colored equations? (particularly compiling to HTML) Date: Wed, 18 Mar 2020 23:27:25 -0400 Message-ID: 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="ciao.gmane.io:159.69.161.202"; logging-data="92996"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDFJXQMSYMIRBQ6NZPZQKGQEF2Y6Y4A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Mar 19 04:28:06 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ua1-f61.google.com ([209.85.222.61]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jElqo-000O4r-TJ for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 19 Mar 2020 04:28:06 +0100 Original-Received: by mail-ua1-f61.google.com with SMTP id 14sf203605ual.20 for ; Wed, 18 Mar 2020 20:28:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1584588486; cv=pass; d=google.com; s=arc-20160816; b=pdrQS5mi584mX737RAqAxlpvXbHhn9gg3rEp1kk86gNTTHpwKSyL60VM5lsOHJhaUF +OK/Lt8jokGvJAVgmFNXEtwxfdcU8d/bvl3XD5QYnP0N9yK68TXgy98yeshnqzAmK2sq DPopG9pSiLfGfnCS7SocOKKcaTSYh7AiO1dWobw1HIqE/DQFP+iQdkAhsu0ShyqwVcOs fbEOpFkkwGj2F3ZsfN5Qrg6/ZscmINfon6/zPtpyShdTXx+Pv/8MEvHpvGafC8WCreGG N2pYx2ADmeVSTWdGxDQzZ24Gs2h6BzfHbY4E/FcroN6tensJrSqlaCrE2jl1qOFt4rQg pMzA== 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:to:subject:message-id:date :from:mime-version:sender:dkim-signature; bh=DYDz4I1uR00BwXN6UPswky5DbV0r6ouOJrlDF+w8aAI=; b=ySvNA0ZU4i+iwIhLKbLD+kQFntlUzEkxJocZvxztjnt0ZWJKpEwuiWzi2tp9Y9Afl9 BqVv/Z8oO68PcEni6208LLo0xhsIAn3a0u3WM3U1pprjm11Nc+ruCJWpKurpKqhsRY3T 33R1IcjLOhCUQAojhY5nYgmPXUrQy0+k+Yw1zE//W2Ynj4fqW1f68XvfKxLWx+9pp+0y /i7pWA+ie0afS5YtEuhjmwfOzoZrn8F0dmJMDQjGQL8oZqBhukn+yVlYij3HRVMgR5GC WL8k/neuNwEQULAFY+6UM2OC0+rSlpmNyQPLNh/EhE5S55O6JttBQcWSlV6JpD+fw5y9 BGgQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.166.179 as permitted sender) smtp.mailfrom=gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:date:message-id:subject:to :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=DYDz4I1uR00BwXN6UPswky5DbV0r6ouOJrlDF+w8aAI=; b=FkU6+uOre3GiajESQSChJvzPQHNoeaW3FwATWkAAMSpwtisuOJyQQSgl8pbMTPkwxx 652GVjtRrDfqawJnEvl+tZAM2+n1CgMj9kvjeeqDK8Op5JT/3rskXyO8B7vXFE5DZU7D +QyiKN3ppoWroW/3jGjWtNHJDIAHc2vpi2jm8ZGiacpDm2zJS4npXXT3upbfK23vbRWX APRORRriub2MObV6jEjTnRAZ45tAJQEB/VWzMy+3pEVs80CZ+o30PXIEfGv8kuFNnO+y x5R3lnK4269hSo22d/S710DnhWfSOEV40HGJECwKlwLiR0v74uwl2j2pMZwe+/LE+B8d Inrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:date:message-id:subject :to: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=DYDz4I1uR00BwXN6UPswky5DbV0r6ouOJrlDF+w8aAI=; b=CZJ+2uUCICDoyN5SDdJt74yAJV3UwG2YWwQJLYRZohuXw7PoMIKNs7CLdHx3sDhmza KpQG7/KofNygcgRM/EoWb0xyVI0WgE+Mmkgi1kITb2G3xQaok2/zCmwk4lyCNkS70iAT eNjzqn0T2T7jFtz7qIsef4h6x8+3OthlndUZKt22ZYJ6pQ9OUf3hkG07MXEO5aw7ol1P jmsO/z2XaW3hmWw0unFzS+0XhElOLH75pO9mNHt2CZLsHh4tOtolamWmRxPJQ6Vb0Oq2 tEmjV5uDIe0ac/RoXBMY6uSVBDpIFiojuIL4Bn+RWhIwaI0qtq6P+cdTxHUTKXOlJ0Sy 2nww== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANhLgQ2CyCrRPTi4rKE2/VdaptXdIMa3uhCWVBELzBwYkAPNBm10DII1 c1Egr5ihzZPJeqf0p16Dm/U= X-Google-Smtp-Source: ADFU+vs22/KuaCar3Kr7FHI/RtYJn35vZU4ZMPEixN2GOWuOa4Csw0hacCdbesBS3BWn1vGciWJiHg== X-Received: by 2002:a67:4c5:: with SMTP id 188mr554280vse.43.1584588485974; Wed, 18 Mar 2020 20:28:05 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ab0:69c1:: with SMTP id u1ls82846uaq.9.gmail; Wed, 18 Mar 2020 20:28:03 -0700 (PDT) X-Received: by 2002:ab0:5a69:: with SMTP id m38mr421394uad.135.1584588483116; Wed, 18 Mar 2020 20:28:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584588483; cv=none; d=google.com; s=arc-20160816; b=yW4dBfVVz8J8pa1VF4J3vh2OCVjQyM/KViqYtb4Y3GI0IjerVeH8Bsvs2tTmI7G31q jeRALhQjQQ1ZlorXP51AfTiI/ooI2Jd53cEqwzS3BoGoO820il8C1EcDDNNonQmIALrt vlxEJLsy79d2cgabYp0ucj4BZIJC7ToD8VyRNj2Wi3DzNxD5aMOeq/3xX+hr7xB+h7sN kMXHYBzxFoOLZONjXpQ1gr42IcjFd7ybZapdMsJYn06+TCIZV7AKx/bvWY6eg5mEhHYn tB2kKFp82m1oGfHXqffeJOoZCI3jnyFtfl0qgOQf/7bR6dNL03ZaqfrRiqrt5tpxDec5 exRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version; bh=A3hSgmatSnbogsAV3uNb8rlqvPECRXqCbIZkIp4q+Z0=; b=EFA1jDDPRgIctatH3G+mAUVb/30jt2Onoea+A0KJUwq2Xq0LDAegOJNe3rvzFHgZBk AicFfD+yk5pg2a1C6+kBPlgYDa08at9rgpID5fm2cYqYrMpnrhrfn168t3/93UiOuCPA p6z+OQ5/MQ/qjH4VCyxa4Vq0VNuCIYydhsottlMOWsFVWNHrdAwEFLu+iYt3O2hdZZ90 f0/7ynFYCHPX2gLacxtOBdLEIOUzJnLYD8NgE7Vs4YcGBelJu5iPP34ofvpyhDgndvEN DSd+TYXUiaGdnZ4Pjn548u6C4ndspBT5di0enwgaFLzrSmFS3hIVWn8Lm+hmK1gYvIwG l7pw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.166.179 as permitted sender) smtp.mailfrom=gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Original-Received: from mail-il1-f179.google.com (mail-il1-f179.google.com. [209.85.166.179]) by gmr-mx.google.com with ESMTPS id z26si24939vsp.1.2020.03.18.20.28.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Mar 2020 20:28:03 -0700 (PDT) Received-SPF: pass (google.com: domain of gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.166.179 as permitted sender) client-ip=209.85.166.179; Original-Received: by mail-il1-f179.google.com with SMTP id j69so886849ila.11 for ; Wed, 18 Mar 2020 20:28:03 -0700 (PDT) X-Received: by 2002:a92:4007:: with SMTP id n7mr1193386ila.61.1584588482022; Wed, 18 Mar 2020 20:28:02 -0700 (PDT) X-Original-Sender: gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of gwern0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.166.179 as permitted sender) smtp.mailfrom=gwern0-Re5JQEeQqe8AvxtiuMwx3w@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:24665 Archived-At: Has anyone found a good way to do annotated colored equations in Pandoc? A Twitter thread ( https://twitter.com/kwinkunks/status/1232333955501826051 ) of examples of colored equations like https://row1.ca/pixels-and-their-neighbors with many implemented in Latex and/or Tikz ( http://www.texample.net/tikz/examples/ ). Rubricated* or colored equations would be nice to have for Markdown->HTML and other formats. In an earlier discussion of Pandoc->Docx ( https://groups.google.com/d/msgid/pandoc-discuss/aa5ab201-d3a6-44e2-807d-3f92a97f7a8b%40googlegroups.com ), John says that the texmath package doesn't support the necessary TeX color library, so you can't simply write out color annotations in native TeX expressions with $/$$. People writing Latex->PDF presumably can just use that color library directly. What other option have people tried? One could write Latex or anything else and screenshot it as a figure, but that's not too pleasant or editable. Could one use the Tikz filter ( https://pandoc.org/lua-filters.html#building-images-with-tikz https://github.com/jgm/pandocfilters/blob/master/examples/tikz.py https://github.com/jgm/pandocfilters/blob/master/examples/tikz-sample.md ) or something much like it, to automatically generate a figure/screenshot? It doesn't yield the same MathML or whatever, and it might be a little tricky to integrate into Hakyll (unless one inlined the image as a data-uri? it'd be relatively small). That might be equivalent to https://github.com/liamoc/latex-formulae#readme ** which generates inline PNGs, and https://taeer.bar-yam.me/blog/posts/hakyll-tikz/ which generates inline SVGs. * https://www.gwern.net/Red ** examples: http://liamoc.net/posts/2017-07-08-abstraction/index.html http://liamoc.net/posts/2015-11-10-patch-theory/index.html ; incidentally, he has some very impressive literate Agda code implementation, examples in http://liamoc.net/posts/2015-08-23-verified-compiler -- gwern