From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/27481 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Peter Newsgroups: gmane.text.pandoc Subject: Re: Adding the highlight directive to the rST reader Date: Fri, 15 Jan 2021 15:04:26 -0800 (PST) Message-ID: References: <9e025799-6d50-40a9-b8ab-a075437cb2b9@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1156_130837713.1610751866556" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19506"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCUL3CX4YUARB656RCAAMGQEMMCW73A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Jan 16 00:04:30 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f59.google.com ([209.85.161.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l0Y8r-0004vc-Vk for gtp-pandoc-discuss@m.gmane-mx.org; Sat, 16 Jan 2021 00:04:30 +0100 Original-Received: by mail-oo1-f59.google.com with SMTP id n17sf6032686oof.5 for ; Fri, 15 Jan 2021 15:04:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=JQtDhZ9DTpHuLjPHA5qcrYA9okEIvuqMQK623GFfGdA=; b=RWQhFo5MiQBz1Rl/1EaJSNLduvOrxrzy1znNkLyJ8QXA6N5RnjIqtabdWSh8PzyGBp JJIBe8p3KFG/0sayVdP4eiJ5CFKSNBEWsGvA18ZRC7Rs2N6AH0XCiGUnYWRtubWYMW63 sWcDr6vfpIJ6WT13QXL6YFpIrnyo8SKTrwRyKJ4Zwenb7dB4df/kp/JhUquqs7s2gotk ZyS3n+3eEj9xPkoCOfTOTymN568Tp3L0FT2ztgb9XYprFcwTdwPYUXHjSJDeSYCDz9/q eKo2KAU49/q2VhWElBtJFJS++7QLEwMJl1M0nCQUN5+3lN1QNZp6fUhclabt8qPZsB0U adZA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=JQtDhZ9DTpHuLjPHA5qcrYA9okEIvuqMQK623GFfGdA=; b=JnBlskv7tCuOToetQR/4QKh/QpDEMymqqH+Zx5HBqT+pIdr7kFQVEYmiVDdUoKZRB4 I64X3movDP9pHDXlgyVebBO0WgH9IjLqvm//fbfLkMgp3bNyl39hSVHkioNwL+VpWPoX 2UeBaEYJ2AfoFit83lMGciQbWJhcHiv3PM9doUIgrmJqkyW+p5IEzVBCfHTtXL1elB7Q 830YIdbrT2N2X68tLiVFsIqTp2Q34SO+MfH5P8KLKWwJ6nF2Z4VUpxh2GM+TBbdZzmy/ vOYaNvxAtFuzCBUjzcWiJbajFRE2j4o8W/LzeefdFe0zbbJRoNkgVutTrOqQX970wIeK jxRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=JQtDhZ9DTpHuLjPHA5qcrYA9okEIvuqMQK623GFfGdA=; b=kcAPcekxjSoqxoU7PRsnu+BrG4Lo4ACC2QhpR/Zs/ofK/9gQ0NeN6Gi5S/kjGfaGiv FLTOZnXudXqx7HELO2zkfOgM9CB/XOl1VmtS2IiCpAMI02YT6gKc0TIW+Oqc7hoTsipY fcluLpJGSddqDZejXnEkaa6ldjHoHjAW5klTiiQBCgHVYLho3qY3VPPjd7M0NE5g0xXj eRXbMr9OPZ2wb9j1jwpgG2i1ibi6ChGVCzBRA/vHBegN51kTvPGdPGD3FvKlW6zohiNm wSLn5SVk7iOeFQass72ERyrp5IFnX/X7MejBtOYhUlrxuJ9F18ZueFAYQleQHkZV2eiu BNbw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530jdXZsMuEkGILE9QsybgcBhPSmIQU1WLZoACxnNkPvbnMbqlXN ZrbgXANvkojacTm6vUrIX5Q= X-Google-Smtp-Source: ABdhPJyXSIuvwwPO9jtdtHlgJJHttZyCR0A/unO3rtaG4n0YATMaVTmVXvbed3nrntCKqZMOr4mC2w== X-Received: by 2002:a9d:711b:: with SMTP id n27mr10027486otj.221.1610751869026; Fri, 15 Jan 2021 15:04:29 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:6841:: with SMTP id c1ls2687359oto.8.gmail; Fri, 15 Jan 2021 15:04:27 -0800 (PST) X-Received: by 2002:a9d:3645:: with SMTP id w63mr9823745otb.117.1610751867361; Fri, 15 Jan 2021 15:04:27 -0800 (PST) In-Reply-To: X-Original-Sender: pmatulis-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:27481 Archived-At: ------=_Part_1156_130837713.1610751866556 Content-Type: multipart/alternative; boundary="----=_Part_1157_1885024849.1610751866556" ------=_Part_1157_1885024849.1610751866556 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'm currently struggling with a Sphinx:MD conversion project due to=20 Pandoc's lack of support for these Sphinx-specific directives: * :doc: * :ref: * :caption: @Lucas have you made any progress with these things? On Friday, 14 February 2020 at 17:41:17 UTC-5 John MacFarlane wrote: > > I don't know what they all look like: can you link to a list? > Maybe it would be a good idea to add a sphinx extension. > > Lucas Escot writes: > > > Thank you very much for such a quick merge. > > > > For the rest of Sphinx directives, should I go ahead and make an=20 > extension=20 > > or would you feel comfortable having them under vanilla rST too? > > > > Le jeudi 13 f=C3=A9vrier 2020 17:29:36 UTC+1, John MacFarlane a =C3=A9c= rit : > >> > >> > >> Yeah, even though it's a sphinx extension, I think I'd be=20 > >> comfortable merging that. Does anyone disagree? The procedure=20 > >> would be to submit a PR.=20 > >> > >> Lucas Escot > writes:=20 > >> > >> > Hello everyone,=20 > >> >=20 > >> > I just implemented the highlight directive=20 > >> > < > >>=20 > https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.ht= ml#directive-highlight>=20 > > >> > >> > to the pandoc rST reader.=20 > >> > This allows one to specify the default language to use when=20 > highlighting=20 > >> > literal blocks.=20 > >> > It is especially useful when writing rST in a literate agda or=20 > literate=20 > >> > haskell file, where it is undesirable to have to specify the languag= e=20 > at=20 > >> > every code block.=20 > >> >=20 > >> > .. highlight:: haskell=20 > >> >=20 > >> > From now on code will be highlighted as haskell::=20 > >> >=20 > >> > data Tree =3D Leaf | Node Tree Tree=20 > >> >=20 > >> > An other exemple too show how terse using literal blocks becomes::= =20 > >> >=20 > >> > main :: IO ()=20 > >> > main =3D putStrLn "Hello World!"=20 > >> >=20 > >> > We can change the language at any point in the document.=20 > >> >=20 > >> > .. highlight:: python=20 > >> >=20 > >> > So this block contains python code::=20 > >> >=20 > >> > def main():=20 > >> > print("OK")=20 > >> >=20 > >> > An we can still disable having a default language:=20 > >> >=20 > >> > .. highlight::=20 > >> >=20 > >> > This directive comes from the Sphinx extended rST (which argueably i= s=20 > >> one=20 > >> > of the most popular use case of rST out here, see readthedocs.io),= =20 > >> > this is why I am wondering *what is your stance on adding directives= =20 > to=20 > >> the=20 > >> > pandoc reader?* (which are not specified in the docutils reference)= =20 > >> >=20 > >> > My opinion is that such an addition is quite reasonable, and most=20 > people=20 > >> > use rST with sphinx and are therefore accustomed with said directive= =20 > >> > already.=20 > >> >=20 > >> > You can see my implementation here: https://github.com/flupe/pandoc= =20 > >> >=20 > >> > If you all agree it can be merged, what is the process? Should I=20 > create=20 > >> an=20 > >> > issue mentionning the problem or just make a PR?=20 > >> >=20 > >> > Best,=20 > >> > Lucas=20 > >> >=20 > >> > --=20 > >> > You received this message because you are subscribed to the Google= =20 > >> Groups "pandoc-discuss" group.=20 > >> > To unsubscribe from this group and stop receiving emails from it,=20 > send=20 > >> an email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org .=20 > >> > To view this discussion on the web visit=20 > >>=20 > https://groups.google.com/d/msgid/pandoc-discuss/9e025799-6d50-40a9-b8ab-= a075437cb2b9%40googlegroups.com.=20 > > >> > >> > > > > --=20 > > You received this message because you are subscribed to the Google=20 > Groups "pandoc-discuss" group. > > To unsubscribe from this group and stop receiving emails from it, send= =20 > an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/a6188c4b-d574-4fa3-b0ec-= a5f1fd6e03f9%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/b8cf0188-b6e0-4c45-8dce-bd296356db27n%40googlegroups.com. ------=_Part_1157_1885024849.1610751866556 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'm currently struggling with a Sphinx:MD conversion project due to Pandoc'= s lack of support for
these Sphinx-specific directives:

<= /div>
* :doc:
* :ref:
* :caption:

@Lucas have you made any progress with these things?

<= div class=3D"gmail_quote">
On Friday,= 14 February 2020 at 17:41:17 UTC-5 John MacFarlane wrote:

I don't know what they all look like: can you link to a list?
Maybe it would be a good idea to add a sphinx extension.

Lucas Escot <lucas...@gma= il.com> writes:

> Thank you very much for such a quick merge.
>
> For the rest of Sphinx directives, should I go ahead and make an e= xtension=20
> or would you feel comfortable having them under vanilla rST too?
>
> Le jeudi 13 f=C3=A9vrier 2020 17:29:36 UTC+1, John MacFarlane a = =C3=A9crit :
>>
>>
>> Yeah, even though it's a sphinx extension, I think I'd= be=20
>> comfortable merging that. Does anyone disagree? The procedure= =20
>> would be to submit a PR.=20
>>
>> Lucas Escot <luc= as...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> writes:=20
>>
>> > Hello everyone,=20
>> >=20
>> > I just implemented the highlight directive=20
>> > <
>> https://www.sphinx-doc.org/en/ma= ster/usage/restructuredtext/directives.html#directive-highlight>=20
>>
>> > to the pandoc rST reader.=20
>> > This allows one to specify the default language to use wh= en highlighting=20
>> > literal blocks.=20
>> > It is especially useful when writing rST in a literate ag= da or literate=20
>> > haskell file, where it is undesirable to have to specify = the language at=20
>> > every code block.=20
>> >=20
>> > .. highlight:: haskell=20
>> >=20
>> > From now on code will be highlighted as haskell::=20
>> >=20
>> > data Tree =3D Leaf | Node Tree Tree=20
>> >=20
>> > An other exemple too show how terse using literal blocks = becomes::=20
>> >=20
>> > main :: IO ()=20
>> > main =3D putStrLn "Hello World!"=20
>> >=20
>> > We can change the language at any point in the document.= =20
>> >=20
>> > .. highlight:: python=20
>> >=20
>> > So this block contains python code::=20
>> >=20
>> > def main():=20
>> > print("OK")=20
>> >=20
>> > An we can still disable having a default language:=20
>> >=20
>> > .. highlight::=20
>> >=20
>> > This directive comes from the Sphinx extended rST (which = argueably is=20
>> one=20
>> > of the most popular use case of rST out here, see readthedocs.io),=20
>> > this is why I am wondering *what is your stance on adding= directives to=20
>> the=20
>> > pandoc reader?* (which are not specified in the docutils = reference)=20
>> >=20
>> > My opinion is that such an addition is quite reasonable, = and most people=20
>> > use rST with sphinx and are therefore accustomed with sai= d directive=20
>> > already.=20
>> >=20
>> > You can see my implementation here: https://github.com/flupe/pandoc=20
>> >=20
>> > If you all agree it can be merged, what is the process? S= hould I create=20
>> an=20
>> > issue mentionning the problem or just make a PR?=20
>> >=20
>> > Best,=20
>> > Lucas=20
>> >=20
>> > --=20
>> > You received this message because you are subscribed to t= he Google=20
>> Groups "pandoc-discuss" group.=20
>> > To unsubscribe from this group and stop receiving emails = from it, send=20
>> an email to pandoc-= ...@googlegroups.com <javascript:>.=20
>> > To view this discussion on the web visit=20
>> https://groups.g= oogle.com/d/msgid/pandoc-discuss/9e025799-6d50-40a9-b8ab-a075437cb2b9%40goo= glegroups.com.=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-discus..= .@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/a6188= c4b-d574-4fa3-b0ec-a5f1fd6e03f9%40googlegroups.com.

--
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/b8cf0188-b6e0-4c45-8dce-bd296356db27n%40googlegroups.= com.
------=_Part_1157_1885024849.1610751866556-- ------=_Part_1156_130837713.1610751866556--