From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31792 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aidan Reilly Newsgroups: gmane.text.pandoc Subject: Re: docbook codeblock callouts > markdown Date: Fri, 25 Nov 2022 02:24:13 -0800 (PST) Message-ID: <7925cbe1-1d0d-4b9f-abe4-9224472bd417n@googlegroups.com> References: <99430384-ef3a-4534-a9da-8dcbcf7f0f91n@googlegroups.com> <8735a9po3h.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2628_215139024.1669371853505" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24788"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDO2LZEJ4EIRBU5PQKOAMGQE6JL3ZYA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Nov 25 11:24:23 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wm1-f56.google.com ([209.85.128.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oyVsc-0006HH-Ub for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 25 Nov 2022 11:24:22 +0100 Original-Received: by mail-wm1-f56.google.com with SMTP id z15-20020a1c4c0f000000b003cf6f80007csf1641409wmf.3 for ; Fri, 25 Nov 2022 02:24:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669371862; cv=pass; d=google.com; s=arc-20160816; b=M5Q52MsIlnu/HO5WATE3ljFXzNYywlTXoxKTvJ+tCHU6zcja/jN+SSeoaLYzZgRJXc 6vM5tlycJJFagAwUcVCu+CJsVrGR4pTPEW2LcCUEPb9ZEJ0FVuNtuPO/LiIKsFffvsZx xhrBc/An/0tTrJrCJ1ZjlomI462+Jzg7OapbM9RTdw5mLHUgbOKqfCrVRuswIcBWO/tw 9T1q2mfCX61y/pxxBQw+F23CT9dDTe0YfBiRnccxbueqYunaZr9UrDC752f1Zel2pQkJ 2MGPc9dZt8bMva9fRLiAIkG9HSLuYH/m41Qr/zzv3u5jNecXsyf+15TBFmIe7mXHs6ir IQIQ== 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:mime-version:subject :references:in-reply-to:message-id:to:from:date:sender :dkim-signature; bh=XZruEwcMeVu6ibq3yDfbUjKvnJX9IuqSeWkqght9qE8=; b=gvLRF4/5szHk+6RAf3z/9ALEn+1ju9UzlAGWzphRlmoze9+umBKCj9HtcGkFK5uTHB R4Ggz8yCMoT/iWBWRvk/VVNgymzOH8TJn0LKpJu2u4kEsELBz/xIbfJol+PYs1B1iF0M /ZdF7wrabbVmrE2On4T/C2DAmGa57FQ3hQRXIS/RL+KVSABx0mz6mczRUfjVqh/732LR Sq71YAx4T8E6Th5LtWSPmc8+zQRO1w+VX7NCnGFt642lj+eOvkYb0qWfqRb/g2cNfMcx IH1p+nTE71wRG4TaFHac0aniqfebtuYKj+zBYQwokd+ZzpNt6xIu9mR/EU2OlpLtO1mM BPLQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Et5j0QgU; spf=pass (google.com: domain of aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org designates 170.10.133.124 as permitted sender) smtp.mailfrom=aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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:mime-version :subject:references:in-reply-to:message-id:to:from:date:sender:from :to:cc:subject:date:message-id:reply-to; bh=XZruEwcMeVu6ibq3yDfbUjKvnJX9IuqSeWkqght9qE8=; b=hYi1gXRlhBUJgEi0wDsxJmEla1T8J3oMuHaaRTUQvR683bL7cJfYPNigmrRWwT2AAm +4pdZldaov3ttrbxLrDgEf+0AkE1nIKzuJEqkjC2vA3wf/7yG1wmtstXcrsaDKuOQ/qm IPIDPfoz3Ev89pz83dxD2EFcA+oCANnksBe7T/e2ZNUc4KaY0ZpVkf0cf1vNrja/4q2Y Trz2X65aNY817jWs7bCfPd3FRj4XbSjdvAfFg3x5rRXBhcf0SdKl/mka+7b/NZSkl+wA YR5Bt7Mw3NWjpQUZrsT/PNYZRubcndKnkbk+PxuMAHxx7b91zHIrlePbd7f8rnPkjwie QcpA== 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:mime-version :subject:references:in-reply-to:message-id:to:from:date :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=XZruEwcMeVu6ibq3yDfbUjKvnJX9IuqSeWkqght9qE8=; b=byBRHFipM5w9OjeyevkiIfqJKqa4OVgstPOS4kC8ztU3Cq3ObujbQsqP3nKV2AQD/C f28ccc7hjStCfz68AdsaL64Q7J4JJ8INmUgQ1drTluT2+pQ/ZTXe+72W8VvyBFAszVI1 Rsc8O+LvlPCxGyJ204H6ZqyQgd9+9UceglCLZI9qJpfTsYUK2sWTnoGPjtzDgE2mDnMy 1g67BHprC4TlUq/cdQTfy3z0mWUD+rZqMY15wg0FPHDBDX8OzsdaCbBDBR21kvITbe1B 9hE5vr+h1HWdXPf7yE8vM7EUUFQ1ylvrz41n93TiVTfKXI Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANoB5pmGmo3n6+cWOIHNt1o5yVcZfaKxWusJsIlm8+YwvC5hyWalXu9Y Msxcya6gpA0BhJxigwthzCg= X-Google-Smtp-Source: AA0mqf733p06jHQff2K75W0JKEi76GqtaDpRmt0yaCW/ZrnatwbKIMXIYxP+ceNyCKGa6Z7t59xg7A== X-Received: by 2002:a5d:5684:0:b0:236:61bb:c79d with SMTP id f4-20020a5d5684000000b0023661bbc79dmr22288475wrv.632.1669371862571; Fri, 25 Nov 2022 02:24:22 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:600c:1d13:b0:3a8:3c9f:7e90 with SMTP id l19-20020a05600c1d1300b003a83c9f7e90ls4079571wms.1.-pod-canary-gmail; Fri, 25 Nov 2022 02:24:18 -0800 (PST) X-Received: by 2002:a05:600c:46c8:b0:3cf:8896:e1de with SMTP id q8-20020a05600c46c800b003cf8896e1demr20212855wmo.4.1669371858073; Fri, 25 Nov 2022 02:24:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669371858; cv=none; d=google.com; s=arc-20160816; b=aCYhdMlO7/lUyDKOhIoTGZtwmUZMYMMDAWbjKp+DA3G0ze+a3knVN9BZs6cIhPtgOX F7D9wtXIcZ7SrYvK4oDT0OWDIZVSgZGavZmyK2lpf64WQ1vfNa3x51Ub97kCjE5SHs5Z Em55L+u24vPNzY1NR/tT0ci7f93uXhi8Xs+6wOSbZpWq0rKyVO7QdegdoXf1S3XHWHrt McvCEfNCNI2w3kTKzgzH1CmtXwtgrUxpf/TpTsdeVmGYk3fWf3XNKtSfD15JGOYEVD5l pwu5j8TOpLHx/oC5iigKNlfFh3/Ujlt/UE6ywMt7X2LolizLxaM+o58VghCqj33/djkr vy9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:subject:references:in-reply-to:message-id:to:from:date :dkim-signature; bh=BOaam3qddgAgbUZntGzHvIv0zoBvEWm+sKqTx+zz5o8=; b=noMAwFCccd0iS8FrXeJpAhNX9cDuzbNDfjfrWhWn/IQeRNFEixS5tBnU8Mw3RSI5fr bC4c/tKn0hznreJrJTEdPbcyfDb7pTH4dkcAXgDUljPZ7Ye3m/2djf1DwIVrvzFOUBgS doYIysMOHj16ZgFu3WFs5+k1jHQwulGWastxcLCmKn0X6cuLdnf2c0lEkfhG8EtVncA1 QUQmCjiKd2mjZm3xRGgHSeEew3jEB5CEoG0KlNGzTQwo8N5A560Ksr9HaNyDDwa8wpMF YAMOAXYs+FeWD/VaBhpdFMQfDhrcB6aCadW9FzVWYpEGj7w2kVtM6o/OSBTZCKMkArbO SB4g== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Et5j0QgU; spf=pass (google.com: domain of aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org designates 170.10.133.124 as permitted sender) smtp.mailfrom=aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Original-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com. [170.10.133.124]) by gmr-mx.google.com with ESMTPS id bx13-20020a5d5b0d000000b00239778ccf84si177905wrb.2.2022.11.25.02.24.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Nov 2022 02:24:18 -0800 (PST) Received-SPF: pass (google.com: domain of aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; Original-Received: from mail-oi1-f198.google.com (mail-oi1-f198.google.com [209.85.167.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-442-JANjhPbcN3ak15askoJUAg-1; Fri, 25 Nov 2022 05:24:15 -0500 X-MC-Unique: JANjhPbcN3ak15askoJUAg-1 Original-Received: by mail-oi1-f198.google.com with SMTP id x203-20020acae0d4000000b0035a623fce1aso1469432oig.10 for ; Fri, 25 Nov 2022 02:24:15 -0800 (PST) X-Received: by 2002:a05:6870:9e02:b0:13b:13c1:53dd with SMTP id ps2-20020a0568709e0200b0013b13c153ddmr12764751oab.189.1669371854670; Fri, 25 Nov 2022 02:24:14 -0800 (PST) X-Received: by 2002:a05:6870:9e02:b0:13b:13c1:53dd with SMTP id ps2-20020a0568709e0200b0013b13c153ddmr12764746oab.189.1669371854465; Fri, 25 Nov 2022 02:24:14 -0800 (PST) In-Reply-To: <8735a9po3h.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Original-Sender: aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Et5j0QgU; spf=pass (google.com: domain of aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org designates 170.10.133.124 as permitted sender) smtp.mailfrom=aireilly-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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:31792 Archived-At: ------=_Part_2628_215139024.1669371853505 Content-Type: multipart/alternative; boundary="----=_Part_2629_1184896522.1669371853505" ------=_Part_2629_1184896522.1669371853505 Content-Type: text/plain; charset="UTF-8" Hi Albert! So here is the complete example: $ cat callout.adoc [source,yaml] ---- bmc: address: credentialsName: <1> disableCertificateVerification: True ---- <1> `credentialsName` needs a callout $ cat callout.xml
Untitled 2022-11-25 bmc: address: <bmc_address> credentialsName: <secret_credentials_name> disableCertificateVerification: True credentialsName needs a callout
$ pandoc -t markdown -f docbook callout.xml ``` yaml bmc: address: credentialsName: disableCertificateVerification: True ``` - `credentialsName` needs a callout I'm just not clear whether this can be handled with a lua filter or not. Thanks, Aidan On Wednesday, November 23, 2022 at 5:39:22 PM UTC Albert Krewinkel wrote: > > Aidan Reilly writes: > > > A feature of docbook/asciidoc that is really useful is codeblock > > callouts. It seems that this is not currently supported in the latest > > pandoc. > > I didn't know about callouts, they seem like a nice and useful feature: > https://docs.asciidoctor.org/asciidoc/latest/verbatim/callouts/ > > Could you post the DocBook code generated by asciidoctor? I suspect that > this feature would require changes to the docbook reader, but maybe once > could make do with a custom Lua reader. > > > Is there a way to tell pandoc to passthrough codeblocks "untouched"? > > I think if this was the case a lua filter could apply the rest of the > > markup I need. > > > > Example: > > $ cat callout.adoc > > [source,yaml] > > ---- > > bmc: > > address: > > credentialsName: <1> > > disableCertificateVerification: True > > ---- > > <1> `credentialsName` needs a callout> > > > > Run through asciidoctor > pandoc: > > > > $ asciidoctor -b docbook -o - callout.adoc | pandoc -t markdown -f > > docbook > > ``` yaml > > bmc: > > address: > > credentialsName: > > disableCertificateVerification: True > > ``` > > > > - `credentialsName` needs a callout > > > > Any other suggestions or strategies welcome > > > -- > Albert Krewinkel > GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 > -- 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/7925cbe1-1d0d-4b9f-abe4-9224472bd417n%40googlegroups.com. ------=_Part_2629_1184896522.1669371853505 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Albert!

So here is the complete example: 

$ cat callo= ut.adoc
[source,yaml]
----
bmc:
  address: <bmc_address= >
  credentialsName: <secret_credentials_name>  <1= >
  disableCertificateVerification: True
----
<1> `c= redentialsName` needs a callout


$ cat callout.xml
<?xml ve= rsion=3D"1.0" encoding=3D"UTF-8"?>
<?asciidoc-toc?>
<?asc= iidoc-numbered?>
<article xmlns=3D"http://docbook.org/ns/docbook" xmlns:xl=3D"http://www.w3.org/1999/xlink" version=3D"5.0" x= ml:lang=3D"en">
<info>
<title>Untitled</title><date>2022-11-25</date>
</info>
<programlistin= g language=3D"yaml" linenumbering=3D"unnumbered">bmc:
  address:= &lt;bmc_address&gt;
  credentialsName: &lt;secret_cred= entials_name&gt;  <co xml:id=3D"CO1-1"/>
  disableCe= rtificateVerification: True</programlisting>
<calloutlist><callout arearefs=3D"CO1-1">
<para><literal>credenti= alsName</literal> needs a callout</para>
</callout></calloutlist>
</article>


$ pandoc -t markdown -= f docbook callout.xml
``` yaml
bmc:
  address: <bmc_addres= s>
  credentialsName: <secret_credentials_name>  
=   disableCertificateVerification: True
```

-   `credent= ialsName` needs a callout

I'm just not clear whether this can be han= dled with a lua filter or not.

Thanks,

Aidan

On Wednesday, November 23, 2022 at 5:39:22 PM UTC Albert Kr= ewinkel wrote:
aire...@red= hat.com> writes:

> A feature of docbook/asciidoc that is really useful is codeblock
> callouts. It seems that this is not currently supported in the lat= est
> pandoc.

I didn't know about callouts, they seem like a nice and useful feat= ure:
https://docs.asciidoctor.org/asciidoc/late= st/verbatim/callouts/

Could you post the DocBook code generated by asciidoctor? I suspect tha= t
this feature would require changes to the docbook reader, but maybe onc= e
could make do with a custom Lua reader.

> Is there a way to tell pandoc to passthrough codeblocks "unto= uched"?
> I think if this was the case a lua filter could apply the rest of = the
> markup I need.=20
>
> Example:=20
> $ cat callout.adoc
> [source,yaml]
> ----
> bmc:
> address: <bmc_address>
> credentialsName: <secret_credentials_name> <1>
> disableCertificateVerification: True
> ----
> <1> `credentialsName` needs a callout>
>
> Run through asciidoctor > pandoc:
> =20
> $ asciidoctor -b docbook -o - callout.adoc | pandoc -t markdown -f
> docbook
> ``` yaml
> bmc:
> address: <bmc_address>
> credentialsName: <secret_credentials_name> =20
> disableCertificateVerification: True
> ```
>
> - `credentialsName` needs a callout
>
> Any other suggestions or strategies welcome


--=20
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124

--
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/7925cbe1-1d0d-4b9f-abe4-9224472bd417n%40googlegroups.= com.
------=_Part_2629_1184896522.1669371853505-- ------=_Part_2628_215139024.1669371853505--