From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31415 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: ANSI escape sequences in jupyter notebook output cells Date: Tue, 20 Sep 2022 11:01:40 -0700 Message-ID: References: <956e8385-8b5f-49de-a74a-cc62f84be526n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4927"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBBCEAVCMQMGQEWCFV7HI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Sep 20 20:01:48 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-yb1-f189.google.com ([209.85.219.189]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oahZ5-00018Q-Ow for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 20 Sep 2022 20:01:47 +0200 Original-Received: by mail-yb1-f189.google.com with SMTP id f3-20020a056902038300b00696588a0e87sf2854932ybs.3 for ; Tue, 20 Sep 2022 11:01:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663696906; cv=pass; d=google.com; s=arc-20160816; b=s5nnhyXJA6UcLvka1SIsmOiwafisEYJeA3E4tkqHkDg8ZL1FMw8mfUi8mHeZOLVDKp WH9oQMdnBwO7YxXiakzgcVhFjXfNI1asLRszfUV5dOQDnchqr+HyYCSm268rGykQ1a+J 2THWUjj5XLQ5+mNS7378cxy86EzbvCUyiIJAEFI4qgd2xq2oZCufRZC2dk+ogFDiYBJT nP0bDYEYZWP29ZrzOAVweUWKCzq1CqEfFaHe0Uv04IfZV+1RWrUy/xVp/5fMDnxk9oW+ cI4IIxdi4dsOWE/vRM5t1rRaa+6eKwDwKu4VMlgYdnqynmKea5k3HkmorCmPIYF+koPB A2Jg== 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:message-id:in-reply-to:to :references:date:subject:mime-version:content-transfer-encoding:from :sender:dkim-signature:dkim-signature; bh=7d3j2TsFPb/fmYQVDSlP+WNO1p5RdUtIE4yEDbmWs4U=; b=W+rqe1ISWM1KQ+hK735mdzZXK80trIqndok3+efz4B9mHISUUGlq87h7xh6+n3oRqr I+PlL1cezkHn/7+6LmyzPuryfC8NpKzQ/IlSkoKwtsmszqg1CUQ6v7YOr59pYuoPHKdo tIJLW+rCxhCY5TwqzC8xAb0vuo8Jym6iPLPiETSyjktmduIG0qoRZNqEc9GcKpNDsjCf T4qJuU2gxOwuXE06p1jZns0O14jEvkZN2AExzqtvqpvWnLS2D5dKOAkro5zVFPyLumpE GveXBMDk6eJZP732uRqBKK52FhD8nYwqOg0POTvpT+Cz106QU39FN3ja3CIHtzz1Bikk blkA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZWVsU7Ti; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::636 as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date; bh=7d3j2TsFPb/fmYQVDSlP+WNO1p5RdUtIE4yEDbmWs4U=; b=DYcXQUcrEY6ifneCNA7nLHEEStlUAiATn/dqHAeknaNAzpa5JjtAjyJHYSbTYe5iRw wZ+OFCu1iHEDYqZbfZG64INKUiM0vb6o+oTZrEs08HxLFh35p//vJK4gXSVWomsBlbTC SalRkZkefDChnpTDpAm9xL5knQt4TMLZMmwy6zx5NkBo6/1xMsejEvl1HxEhmWYYPlHj w5zeo6JQMtXYX/Oz+C+1nmyKVyHKSg2AXJ6r/NacC4R+LySQsGaTr8bksvQ/mKt6SVwg EYZi4m9i0yYQex475KsOI/Vbn08HEgOTBNEksuDCNl94CfYz0usymeTAsga455E0e2z8 weSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date; bh=7d3j2TsFPb/fmYQVDSlP+WNO1p5RdUtIE4yEDbmWs4U=; b=qL/g6qWYh1RTn6rn+q2D79sS9MflxuAVaEieJ+XPT0pvAznbx6pZ6UVLeSCgCoIxxX YfVJlSsTkHwG4l3XZrI7XfMpLZGQAcdDRYOHTIovZPjrs9Zh/3Jpm9VzkuHJZn7tadnp RhWA+WgkF4UQKKZGXa995t+m68yyJzZTDb7Ffe9jMPFmVhWp6tmDPnYm37NqAEr9Mb9N 0W4dkwgVvbP7IVzo1hBfRvdCP71iHCJ7DQoDjHki6Vk0737sFd0C6yo3724VKAPWlmYz 9fSXSynd9Fp1rnrRYwZ473TQT75LNng25G4iPrK/+ezRr3MCo3rKwSuZc03Jo3Qb4pZq 6TEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:sender:from:to:cc :subject:date; bh=7d3j2TsFPb/fmYQVDSlP+WNO1p5RdUtIE4yEDbmWs4U=; b=DU9I0LpP8PPs9KYLv8w+vhwt7zdqD6ZK+i/AkWcYY2gHFyhz914TAQlZZ/60AqfhiZ NbNr+g46GumIBVc0sjopuFPNx96Gxgvdb+Xc2tLSPhWvpBgiqRR5V9omIfJxVAsBSJum VSv7CvwD9OwlWZXr6IBhaSElBWXH6ocrPg9rERR0VNeA5y902jca+nM8/qi+gIl3Jz5p 2wIDBfzbuvqtW3WrgSbuSecdNvWQ4HVGHFy+NeEtUjVibjb+oDGqWr5qNYyWLECWhn3L mN7op0u9gfaO9YbpaFZVfqifplKNzHLR6Vbo4lUD Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf3xv2KEtU4Dbo0HpxGkfhW6H0JDBhlchMpPgDO3Ei7TPHAgHRmL /rnUqB4Tl+mkKsoXEuXKv30= X-Google-Smtp-Source: AMsMyM4YS2YDAlk+p40mZLyAmJNsiUKRdTwQ/4bPNbKFhpasEQfcKZsQUBuW5o5EKBlWHr25DWVoxw== X-Received: by 2002:a25:26c9:0:b0:6a9:922:4a6d with SMTP id m192-20020a2526c9000000b006a909224a6dmr20931515ybm.239.1663696906755; Tue, 20 Sep 2022 11:01:46 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a25:b195:0:b0:6b1:75e6:fb34 with SMTP id h21-20020a25b195000000b006b175e6fb34ls4634969ybj.5.-pod-prod-gmail; Tue, 20 Sep 2022 11:01:43 -0700 (PDT) X-Received: by 2002:a25:511:0:b0:6a8:d3a4:5ce3 with SMTP id 17-20020a250511000000b006a8d3a45ce3mr20422424ybf.245.1663696903909; Tue, 20 Sep 2022 11:01:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663696903; cv=none; d=google.com; s=arc-20160816; b=LQ4EVZXMWOz9tGwT2iNzy8C6TF0fMREXb4C9GMmFDZUgSxFXbfzQ9bcPyy/MV5AjC4 reW7U5DQgfN51qzLiVc7Q7sludbgeRpDzL+GkFILponAMikLrnpWo1kbhUBjWHI/KD2G zpYhLLT3LkxxcC1vFXU+m/bHL7BEx8aLa0pBtnmbMYwTT/J11/qJ3astqMTYW6lOzQDw G8HhMTE25X+QWC0VbsGx253bJDPDA6fXrQHd1MTkPeiyzySLDs8DOir6YddAJZkwv4fX FpATDcC7QGA7G+QiG9utDtuPbT60TlwK3cOL7G0lz+wF2+aeF70Wii72IAkaOVAlF3Z9 mCVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:dkim-signature; bh=PZ7f/QbhGBIKT7V0rTlxDpzSKW2CGwhfi1X/vHzpzQ4=; b=k7GnyH/S6vgzXXP66Ug0/paSzMDDf2eK1j8qOhRuW5LHvKM/seMT3vMjx1kOVdUje8 ilWA8+2mHUlXgOv3VJvVgtBRKKJysuIoQgVAqna1rqeulDQRa+nkdJCCYOP3q4wKODzV raDKw5048d3jrOvtLzmLX6FrB3SpMfKE82mu2jEHtc4ZKUNpVFLijEBEzkvalh6giMiK pUZBlivf440ojVgiFQitMagjyjR00zg0y2X5qGnzF4Y8HdrLvBQ1/iBHJfcEdQGL4SQG dPzvwBmP6atUF/IvvtmBhtMts+yb7mql/J8apjocRFeUO6VKIBVzUxu5LEF54k8OrImf Xt3g== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZWVsU7Ti; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::636 as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com. [2607:f8b0:4864:20::636]) by gmr-mx.google.com with ESMTPS id b5-20020a25b845000000b006aea4e47938si25140ybm.1.2022.09.20.11.01.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Sep 2022 11:01:43 -0700 (PDT) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::636 as permitted sender) client-ip=2607:f8b0:4864:20::636; Original-Received: by mail-pl1-x636.google.com with SMTP id b21so3177041plz.7 for ; Tue, 20 Sep 2022 11:01:43 -0700 (PDT) X-Received: by 2002:a17:903:230e:b0:178:3356:b82a with SMTP id d14-20020a170903230e00b001783356b82amr813128plh.138.1663696903181; Tue, 20 Sep 2022 11:01:43 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:644:400:7c40:75a9:35bd:ff1:143b]) by smtp.gmail.com with ESMTPSA id r26-20020a63441a000000b0042b5095b7b4sm249137pga.5.2022.09.20.11.01.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Sep 2022 11:01:41 -0700 (PDT) In-Reply-To: <956e8385-8b5f-49de-a74a-cc62f84be526n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZWVsU7Ti; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::636 as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:31415 Archived-At: The ANSI escapes are stripped out of the code block unless the output forma= t is ipynb OR `--ipynb-output=3Dall` is used. So, if you use that command-line option, you could write a filter that does= something with the ANSI escapes. > On Sep 20, 2022, at 7:59 AM, Meik Hellmund wrot= e: >=20 > 'jupyter nbconvert' is able to produce colored output in HTML and LaTeX = from ipynb files with output colored and styled by ANSI escape sequences. I= think https://github.com/jupyter/nbconvert/blob/main/nbconvert/filters/an= si.py is the relevant code. =20 >=20 > Is it possible to implement this by a pandoc filter? If I understand http= s://github.com/jgm/pandoc/issues/5633 correctly, those escape sequences ar= e already missing in the AST presented to a filter. Would it be possible to= have an option that keeps them?=20 >=20 > Many thanks for a great software and years of development and maintenance= ! > Meik >=20 >=20 > --=20 > You received this message because you are subscribed to the Google Groups= "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an= email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/956e8385-8b5f-49de-a74a-cc62f84be526n%40googlegroups.com. --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/A2514F6B-C5E9-4815-A15B-06570F1DA399%40gmail.com.