public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: ANSI escape sequences in jupyter notebook output cells
Date: Tue, 20 Sep 2022 11:01:40 -0700	[thread overview]
Message-ID: <A2514F6B-C5E9-4815-A15B-06570F1DA399@gmail.com> (raw)
In-Reply-To: <956e8385-8b5f-49de-a74a-cc62f84be526n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

The ANSI escapes are stripped out of the code block unless the output format is ipynb OR `--ipynb-output=all` 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 <meik.hellmund-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> '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.

-- 
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/A2514F6B-C5E9-4815-A15B-06570F1DA399%40gmail.com.


  parent reply	other threads:[~2022-09-20 18:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20 14:59 Meik Hellmund
     [not found] ` <956e8385-8b5f-49de-a74a-cc62f84be526n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-09-20 18:01   ` John MacFarlane [this message]
     [not found]     ` <A2514F6B-C5E9-4815-A15B-06570F1DA399-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-09-21 10:14       ` Meik Hellmund
     [not found]         ` <5f877bed-697b-481c-9604-c5d69168eda9n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-09-21 17:31           ` John MacFarlane
     [not found]             ` <C06A9D62-D18A-45A0-B1A8-CC0C7917AB1D-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-09-26 19:06               ` Meik Hellmund

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A2514F6B-C5E9-4815-A15B-06570F1DA399@gmail.com \
    --to=fiddlosopher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /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.
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 NNTP newsgroup(s).