From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31414 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Meik Hellmund Newsgroups: gmane.text.pandoc Subject: ANSI escape sequences in jupyter notebook output cells Date: Tue, 20 Sep 2022 07:59:08 -0700 (PDT) Message-ID: <956e8385-8b5f-49de-a74a-cc62f84be526n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_836_1422593224.1663685948810" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38949"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDYPJG4RWYHRBPVKU6MQMGQEL2A7KTQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Sep 20 16:59:13 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qv1-f64.google.com ([209.85.219.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oaeiP-0009zz-6o for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 20 Sep 2022 16:59:13 +0200 Original-Received: by mail-qv1-f64.google.com with SMTP id w19-20020a0562140b3300b0049cad77df78sf2174334qvj.6 for ; Tue, 20 Sep 2022 07:59:13 -0700 (PDT) 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-sender :mime-version:subject:message-id:to:from:date:sender:from:to:cc :subject:date; bh=5ygugUMFpNhMX2ozMWNRYwk3L4j3OUx3sn4H5MhiWOs=; b=O3/y7oO9RkzWenirD3LBuQ/tspR8YzbLdvMbJAiq34aP6N0tQJcKcxJe7HlUR8gZAl Q5WIM9XfnjDlwh9jjvMqXyO0IIssQjZhdC905nLhbkpJd23iWQwBoJJY8iq9fXHxT8f9 ccMelje4gVu4v4eYaQFX9xdW5SL/PUkojKl3IwWxaJfiY2h3Kfd5p24K6lOJg0rBQnzX kur6PzI2d2T85FIiYMOiGDF0S4+h8rKPGvTiQJhSUEVo6ToSdu1igtJC0j95fYlalbo0 B9ZpiOjoLoevmNxfecza7n7zJlksH/I//twMnaEfvpqfV2jBSp6GM73kRwEAoB2CPHnn DQMw== 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-sender :mime-version:subject:message-id:to:from:date:from:to:cc:subject :date; bh=5ygugUMFpNhMX2ozMWNRYwk3L4j3OUx3sn4H5MhiWOs=; b=TEjPfa0oXOeXjBHMUSwBj6AHY75Wee3kbydorC66zuoAWPbFERDoFnj8WxThWvqcf2 fBPRt2eJMFPSWDmHAycoJ2fgOZ5bO1n0IFEBqufhIGW4AleMOmN/ygyhBMOzb/XizF3j nrJlGcJIjkch/daRhZyUuoO29DCZtGFoWAzhvr8tXJ1XUZZiZ3Bwn3FU5nHYw4f3XDLe JPSlmyagSfAsL1WeYfPsjWgvoCgvnA+aKfmmUElE0hQFIkte1nkFiVRdrxujtYgQz+yF V8dBdnm392BlFqDiRPMdaFPTd9IHjUDipOU/o6v3cOjD4Yae0Zf0s3IpbJuIoAKoLKbC SRkA== 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-sender:mime-version:subject:message-id:to:from:date :x-gm-message-state:sender:from:to:cc:subject:date; bh=5ygugUMFpNhMX2ozMWNRYwk3L4j3OUx3sn4H5MhiWOs=; b=GZtDlUEEAqPkvf9ORQRaLade6vhHSFxNaZGYGWtLGdRckscbIVYFHXSdlMaQGsbuqN g+4eyAwXdDODy7xPdB0dl9Bx5z4YHssumHTqaBMj/w5c1sJC4thzn9Lwn7+G6N/j8Kt5 phZcIYZ4wgxHT+cij9tdiNDNDDVnVzlqwY9DiqLJuekcogR0CVmWggDnI6xjfyarJxc9 dnJc6Xa1ejJ9yqwMaE1Do7NZ/oKg/Me2XVENIYOyJPoVczcUyUUK9c6PeNUS3dUnFYZD iBcde+Eq38W46yHtLS+HbNB8YcVJty0muGYJDJ4PQweI1cj14l/8MFaSo7J+wdqhrMhw YBRQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf2v27JV3yFokwrhHd7ycBwVGi9pO7DdvTBmDI8dyxLJzWMkES3W QmCSBVQO2LvOViLDotc+IpA= X-Google-Smtp-Source: AMsMyM4Nce1Zeu7x6yWm7h2yUImCB1P+mWAAL+Ji8dK8477+tiC8/QtRFFa6NfmeaiscqXJeUAaK9A== X-Received: by 2002:ac8:754c:0:b0:35c:caea:3e73 with SMTP id b12-20020ac8754c000000b0035ccaea3e73mr19764561qtr.504.1663685952209; Tue, 20 Sep 2022 07:59:12 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ae9:e917:0:b0:6cd:f96e:7a6b with SMTP id x23-20020ae9e917000000b006cdf96e7a6bls5679489qkf.8.-pod-prod-gmail; Tue, 20 Sep 2022 07:59:09 -0700 (PDT) X-Received: by 2002:a05:620a:a58:b0:6ce:7e34:901b with SMTP id j24-20020a05620a0a5800b006ce7e34901bmr17004207qka.467.1663685949371; Tue, 20 Sep 2022 07:59:09 -0700 (PDT) X-Original-Sender: Meik.Hellmund-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:31414 Archived-At: ------=_Part_836_1422593224.1663685948810 Content-Type: multipart/alternative; boundary="----=_Part_837_899957655.1663685948810" ------=_Part_837_899957655.1663685948810 Content-Type: text/plain; charset="UTF-8" '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/ansi.py is the relevant code. Is it possible to implement this by a pandoc filter? If I understand https://github.com/jgm/pandoc/issues/5633 correctly, those escape sequences are already missing in the AST presented to a filter. Would it be possible to have an option that keeps them? Many thanks for a great software and years of development and maintenance! Meik -- 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/msgid/pandoc-discuss/956e8385-8b5f-49de-a74a-cc62f84be526n%40googlegroups.com. ------=_Part_837_899957655.1663685948810 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 'jupyter nbconvert' is able to produce colored  output in HTML and LaT= eX from ipynb files with output colored and styled by ANSI escape sequences= . I think  https://github.com/jupyter/nbconvert/blob/main/nbconvert/fi= lters/ansi.py is the relevant code.  

Is it po= ssible to implement this by a pandoc filter? If I understand https://github= .com/jgm/pandoc/issues/5633 correctly,  those escape sequences are alr= eady missing in the AST presented to a filter. Would it be possible to have= an option that keeps them? 

Many thanks for a grea= t software and years of development and maintenance!
Meik

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/956e8385-8b5f-49de-a74a-cc62f84be526n%40googlegroups.= com.
------=_Part_837_899957655.1663685948810-- ------=_Part_836_1422593224.1663685948810--