From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32890 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sigismond Newsgroups: gmane.text.pandoc Subject: Re: docx+styles to dokuwiki somehow ? Date: Wed, 28 Jun 2023 08:00:05 -0700 (PDT) Message-ID: <62b0db64-b7ab-48e8-9025-9c969304e1b6n@googlegroups.com> References: <16df0de5-a608-4e6e-9545-3fa338229d8fn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3846_1430004842.1687964405683" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34538"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCJ4VS5M3INRB6EV6GSAMGQEW4EAW6Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jun 28 17:00:12 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f58.google.com ([209.85.160.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qEWeS-0008rC-0I for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 28 Jun 2023 17:00:12 +0200 Original-Received: by mail-oa1-f58.google.com with SMTP id 586e51a60fabf-1b01cf5d063sf4620234fac.2 for ; Wed, 28 Jun 2023 08:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1687964411; x=1690556411; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to: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=JNndkJdKGbguProEQNof9qp+wmvmGJ0MAA+Qm2d9NJU=; b=XtRRh+jcgkJ51jiwhvHcH/o1Kxh1Du9xBcEH6ui+zyPuzRez0Nj/E+VjqrP/+UK5dr Kaxikp1fquDxafyrHW6ZWI60tVwlrC3D4scWZ/hc4Y+LZrHevIOJjX4Zows4zJCu9Ekw GwunHdNfPoP7Zg84znYeahcAtvbF56vRf5srv0MRPtapaTUcuCh5yuM48MMr02KzvWIt x0nqEJW5MhVYNiaFA601njkFjZE3R/m37ZpxdgJIE68ElTIiNVIpc6Q3ZByWtJinOyPy q4hdEGvM0BQ+ZQGcAPCv1kiGRj4mEZ9gi1SAyXcM+6OTmTiyfpFCd6gCmB6/UbIAK3CC KkkQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687964411; x=1690556411; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=JNndkJdKGbguProEQNof9qp+wmvmGJ0MAA+Qm2d9NJU=; b=aN0mD4YG5EQ4U2h/sJDYP1luXuMS33DmqLhgbnc8bf9XEsns/jn78N5/pLp3xpy305 FFvp7S86YC2Ncwn6By2gu5zuMlKtJM37tmSOAI7M90ghdxXXDVQ6gVAsFxln4NZPPl1g p7H1xXETa3dyawW9ssemtkc0dH+3ln5uJ6KA4N/lpFOG9oqlUclFJmWNYYg7Q+ws+qU/ j9ejLNZDauwlmdec4iqumL9iSO0A5ogTkV4e3NaHpy+5U9s4CFHNIftHFNY0o7W5ROgy MFK5BIkqahl6qK1aeHG6bSieeIzjCNhAc3VaJzwP0xCupXiM5fqQFXG6yRcFkjbq/Nm3 bBLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687964411; x=1690556411; 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:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=JNndkJdKGbguProEQNof9qp+wmvmGJ0MAA+Qm2d9NJU=; b=FlfZj+rAyR0t25sJAQ0OFPWdcBBgNGlu/+sg/ycV+kNfHSFHgWNtV+7QeK+QApZ3/3 pD4vIsEo4mDJPFBtWxL+sskaZlnbucNvnEIkDAYA1vmn7FcnT/eL2pEYpeKeyQK5DJh6 n2CrnRiz430w1QnWXsYpvPwYAfDXJcjuhPtIw0w+/g99C+6CG3J975feScFvsoW93A+T jZ01RVWQBFoGYmgcDYIydDu6N7w/8zlsdHOmhhQdpLTVrqNH0hPT1JUfQjuL6iHAaaex pFrf8y6cdqxKJOLonA7ISju1wVHid+krP+kHX21Z9GpLhH3ciU Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDwzDHiKCFmXJd7nRwEAmhAQsIGgVjSVqdJY+YN+8S+Wolll6AFr XolpDtkaVfr53aIiEXVkVqo= X-Google-Smtp-Source: ACHHUZ4aV796xVEC/Ry0jw/44SohDqX0PWPgVLG5dy5Tpu/QMkZ/uYJab/se807eLQWKbYKqminDmQ== X-Received: by 2002:a05:6870:3404:b0:1b0:3433:7664 with SMTP id g4-20020a056870340400b001b034337664mr8975213oah.40.1687964410920; Wed, 28 Jun 2023 08:00:10 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:fba0:b0:1ad:11bf:6d1a with SMTP id kv32-20020a056870fba000b001ad11bf6d1als2146152oab.2.-pod-prod-04-us; Wed, 28 Jun 2023 08:00:07 -0700 (PDT) X-Received: by 2002:a05:6808:17aa:b0:3a1:f2f0:69f3 with SMTP id bg42-20020a05680817aa00b003a1f2f069f3mr2217952oib.7.1687964406363; Wed, 28 Jun 2023 08:00:06 -0700 (PDT) In-Reply-To: X-Original-Sender: pascal.conil.lacoste-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:32890 Archived-At: ------=_Part_3846_1430004842.1687964405683 Content-Type: multipart/alternative; boundary="----=_Part_3847_1899592347.1687964405683" ------=_Part_3847_1899592347.1687964405683 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable @Bastien I managed to extend your workaround to the other badly handled types, thank= =20 you. Then, I tried to extend this already very useful lua filter in order to=20 convert some specific custom-styled divs to level 1 titles in dokuwiki=20 output. For example, with `Warburg (Otto Heinrich)` having the custom-style `mots`,= =20 what I get is ``` Warburg (Otto Heinrich) ``` what I would like is ```=20 =3D=3D=3D=3D=3D=3D Warburg (Otto Heinrich) =3D=3D=3D=3D=3D=3D ```=20 So I modified the filter to add a new condition :=20 ``` function Div (div) local custom_style =3D div.attributes['custom-style'] if custom_style then if custom_style =3D=3D 'mots' then local pre =3D pandoc.RawBlock('dokuwiki', '=3D=3D=3D=3D=3D=3D') local post =3D pandoc.RawBlock('dokuwiki', '=3D=3D=3D=3D=3D=3D') else=20 local pre =3D pandoc.RawBlock('dokuwiki', '') local post =3D pandoc.RawBlock('dokuwiki', '') end local content =3D div.content table.insert(content, 1, pre) table.insert(content, post) return content end end ``` Well, it doesn't work in many ways : - first, it tells me that=20 Block, list of Blocks, or compatible element expected, got Blocks I guess my condition is badly formed. - then if I just try to test it without the added (and buggy) condition, ``` function Div (div) local custom_style =3D div.attributes['custom-style'] if custom_style then local pre =3D pandoc.RawBlock('dokuwiki', '=3D=3D=3D=3D=3D=3D') local post =3D pandoc.RawBlock('dokuwiki', '=3D=3D=3D=3D=3D=3D') local content =3D div.content table.insert(content, 1, pre) table.insert(content, post) return content end end ``` I get=E2=80=A6 a block ```=20 =3D=3D=3D=3D=3D=3D Warburg (Otto Heinrich) =3D=3D=3D=3D=3D=3D ```=20 which doesn't convert to a proper level 1 title in dokuwiki. I understand that my desired modification is inline whereas the original=20 filter is designed to manage blocks but my lack of knowledge in lua lets me= =20 struggling to go past that. Could you please show me the way to do this ? Thanks. Le mardi 27 juin 2023 =C3=A0 12:21:20 UTC+2, Sigismond a =C3=A9crit : > Thank you Bastien. > I did not find a bug report that specifically treats this issue. Many=20 > other issues with dokuwiki and lists though. > So that's a bug report #8920 > > Le mardi 27 juin 2023 =C3=A0 11:53:48 UTC+2, Bastien DUMONT a =C3=A9crit = : > >> I think that it is worth a bug report if it has not been done yet. As a= =20 >> workaround, you can expand the filter to remove all divs with custom-sty= le=20 >> from the bullet lists.=20 >> >> ```=20 >> function Div (div)=20 >> local custom_style =3D div.attributes['custom-style']=20 >> if custom_style then=20 >> local pre =3D pandoc.RawBlock('dokuwiki', '> '">')=20 >> local post =3D pandoc.RawBlock('dokuwiki', '')=20 >> table.insert(div.content, post)=20 >> table.insert(div.content, 1, pre)=20 >> return div.content=20 >> end=20 >> end=20 >> >> local remove_custom_styles =3D {=20 >> Div =3D function(div)=20 >> if div.attributes['custom-style'] then=20 >> return div.content=20 >> end=20 >> end=20 >> }=20 >> >> function BulletList(list)=20 >> -- Do the same for all types that are badly handled with docx+styles=20 >> -- (e.g. OrderedList)=20 >> return list:walk(remove_custom_styles)=20 >> end=20 >> >> return {=20 >> -- We must process the bullet lists first to remove the divs=20 >> -- before they are converted to raw code.=20 >> { BulletList =3D BulletList },=20 >> { Div =3D Div }=20 >> }=20 >> >> ```=20 >> >> Le Tuesday 27 June 2023 =C3=A0 02:35:06AM, Sigismond a =C3=A9crit :=20 >> > Well=E2=80=A6 it does work but, somehow, docx+styles messes with the l= ists :=20 >> > For a simple docx with just one list, unordered here is what I get wit= h=20 >> -f=20 >> > docx+styles -t dokuwiki :=20 >> >
    =20 >> >
  • Liste 1

    =20 >> >
  • =20 >> >
  • liste 2

    =20 >> >
  • =20 >> >
  • liste 3

    =20 >> >=20 >> >
      =20 >> >
    • liste 3a

      =20 >> >
    • =20 >> >
    • liste 3b

      =20 >> >
    • =20 >> >
    • liste 3c

      =20 >> >
    =20 >> >
  • =20 >> >
  • liste 4

    =20 >> >
=20 >> >=20 >> > Which is not parsed by dokuwiki.=20 >> >=20 >> >=20 >> > Without +styles :=20 >> > * Liste 1=20 >> > * liste 2=20 >> > * liste 3=20 >> > * liste 3a=20 >> > * liste 3b=20 >> > * liste 3c=20 >> > * liste 4=20 >> >=20 >> > Which is syntactically correct dokuwiki format.=20 >> >=20 >> > If I understand it well, Pandoc seems to consider an ordered list badl= y=20 >> > formatted only when +styles is applied and it spits out some raw html= =20 >> with

=20 >> > tags inside

  • s=20 >> >=20 >> > So what is it ? Bad implementation in Dokuwiki writer ? =20 >> > How can I benefit from both +styles, with my lua filter, and lists ? = =20 >> >=20 >> > --=20 >> > Pascal=20 >> > Le lundi 26 juin 2023 =C3=A0 16:04:17 UTC+2, Sigismond a =C3=A9crit := =20 >> >=20 >> > Thanks a lot Bastien, it works perfectly well.=20 >> >=20 >> > Le lundi 26 juin 2023 =C3=A0 15:47:00 UTC+2, Bastien DUMONT a =C3=A9cr= it :=20 >> >=20 >> > With `-f docx+styles`, you can replace the divs with custom styles wit= h=20 >> > this kind of filter:=20 >> >=20 >> > ```=20 >> > function Div (div)=20 >> > local custom_style =3D div.attributes['custom-style']=20 >> > if custom_style then=20 >> > local pre =3D pandoc.RawBlock('dokuwiki', '> > '">')=20 >> > local post =3D pandoc.RawBlock('dokuwiki', '')=20 >> > local content =3D div.content=20 >> > table.insert(content, 1, pre)=20 >> > table.insert(content, post)=20 >> > return content=20 >> > end=20 >> > end=20 >> > ```=20 >> >=20 >> > Le Monday 26 June 2023 =C3=A0 06:16:48AM, Sigismond a =C3=A9crit :=20 >> > > OK, let's try it another way :=20 >> > >=20 >> > > I plan to use Pandoc to convert several docx files to dokuwiki=20 >> > format.=20 >> > > I need to retain custom block styles and convert them to custom tags= ,=20 >> > something=20 >> > > like =20 >> > >=20 >> > > =20 >> > > my dokuwiki formatted block text=20 >> > > =20 >> > >=20 >> > > Do I need to develop a custom dokuwiki writer from scratch to do tha= t=20 >> > or is=20 >> > > there a way to use lua filters for this purpose.=20 >> > > Sorry if the answer is obvious but I struggle to find relevant=20 >> > information.=20 >> > >=20 >> > > Thanks for any help,=20 >> > > --=20 >> > > Pascal=20 >> > >=20 >> > >=20 >> > > Le mercredi 26 avril 2023 =C3=A0 16:14:20 UTC+2, pascal Conil-lacost= e a=20 >> > =C3=A9crit :=20 >> > >=20 >> > > Hi everybody,=20 >> > >=20 >> > > I've been using pandoc for some years to accomplish very=20 >> > straightforward=20 >> > > conversions.=20 >> > > Now that what I plan to do is a little more complex, I struggle to= =20 >> > find=20 >> > > relevant information.=20 >> > >=20 >> > > I need to convert docx to dokuwiki and retain Word custom styles. I= =20 >> > thought=20 >> > > I could use docx+styles to get custom-styles in dokuwiki files but= =20 >> > they=20 >> > > don't make it to the output and get stripped.=20 >> > >=20 >> > > I would be happy with ::: {custom-style=3D"myStyle"} my text here:::= =20 >> > >=20 >> > > If I could get something along these lines, I would be able to apply= =20 >> > some=20 >> > > other simple transformation to get to the final dokuwiki files and= =20 >> > treat=20 >> > > them with a plugin.=20 >> > >=20 >> > > What is the best way to achieve this ? Filters ? Templates ?=20 >> > >=20 >> > > Any help welcome!=20 >> > >=20 >> > > --=20 >> > > You received this message because you are subscribed to the Google= =20 >> > Groups=20 >> > > "pandoc-discuss" group.=20 >> > > To unsubscribe from this group and stop receiving emails from it,=20 >> > send an email=20 >> > > to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 >> > > To view this discussion on the web visit [2][1]https://=20 >> > groups.google.com/d/msgid/=20 >> > > pandoc-discuss/bdc377c4-3918-4f0f-a87e-a66f9d128cc2n%[2]=20 >> > 40googlegroups.com.=20 >> > >=20 >> > > References:=20 >> > >=20 >> > > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org=20 >> > > [2] [3]https://groups.google.com/d/msgid/pandoc-discuss/=20 >> > bdc377c4-3918-4f0f-a87e-a66f9d128cc2n%40googlegroups.com?utm_medium=3D= =20 >> > email&utm_source=3Dfooter=20 >> >=20 >> >=20 >> > --=20 >> > You received this message because you are subscribed to the Google=20 >> Groups=20 >> > "pandoc-discuss" group.=20 >> > To unsubscribe from this group and stop receiving emails from it, send= =20 >> an email=20 >> > to [4]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 >> > To view this discussion on the web visit [5] >> https://groups.google.com/d/msgid/=20 >> > pandoc-discuss/f0b95670-24a3-4870-842f-fb6e7791a694n%40googlegroups.co= m.=20 >> >> >=20 >> > References:=20 >> >=20 >> > [1] https://groups.google.com/d/msgid/=20 >> > [2] http://40googlegroups.com/=20 >> > [3]=20 >> https://groups.google.com/d/msgid/pandoc-discuss/bdc377c4-3918-4f0f-a87e= -a66f9d128cc2n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter=20 >> > [4] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org=20 >> > [5]=20 >> https://groups.google.com/d/msgid/pandoc-discuss/f0b95670-24a3-4870-842f= -fb6e7791a694n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter=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 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/62b0db64-b7ab-48e8-9025-9c969304e1b6n%40googlegroups.com. ------=_Part_3847_1899592347.1687964405683 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable @Bastien
    I managed to extend your workaround to the other badly handled= types, thank you.
    Then, I tried to extend this already very usef= ul lua filter in order to convert some specific custom-styled divs to level= 1 titles in dokuwiki output.

    For example, with = `Warburg (Otto Heinrich)` having the custom-style `mots`, what I get is
    ```
    <WRAP mots>
    Warburg (Otto Heinrich)
    </WRAP>
    ```
    what I would like is
    <= div>```
    =3D=3D=3D=3D=3D=3D Warburg (Otto Heinrich)=C2=A0=3D=3D=3D=3D=3D= =3D
    ```

    So I modified the filter to add a new condition= :=C2=A0
    ```
    function Div (div)
    local custom_style =3D div.attributes['custom-style'] if custom_style then
    if custom_style =3D=3D 'mots' then local pre =3D pandoc.RawBlo= ck('dokuwiki', '=3D=3D=3D=3D=3D=3D')
    local post =3D pandoc.RawBlock('dokuwiki', '=3D=3D=3D=3D=3D=3D')=
    else
    local pre =3D pandoc.RawBlock('dokuwiki', '<= ;WRAP ' .. custom_style .. '>')
    = local post =3D pandoc.RawBlock('dokuwiki', '</WRAP>')
    <= span style=3D"white-space: pre;"> end
    local content =3D div.content
    table.insert(content, 1, pre)
    table.insert(content, post)
    return content
    end
    end
    ```

    We= ll, it doesn't work in many ways :
    - first, it tells me that=C2= =A0
    Block, list of Blocks, or compatible element expected, got Bl= ocks
    I guess my condition is badly formed.

    =
    - then if I just try to test it without the added (and buggy) conditio= n,
    ```
    function Div (div)
    local custom_style =3D div.attributes['custom-style'= ]
    if custom_style then
    = local pre =3D pandoc.RawBlock('d= okuwiki', '=3D=3D=3D=3D=3D=3D')
    local post =3D pandoc.RawBlock('dokuwiki', '=3D=3D=3D=3D=3D=3D')
    = local content =3D div.content table.insert(content, 1, pre)=
    table.insert(content, post= )
    return content
    end
    end
    ```
    =
    I get=E2=80=A6 a block
    ```
    =3D=3D=3D=3D=3D=3D
    Warburg (Otto Heinrich)

    =3D= =3D=3D=3D=3D=3D
    ```
    which doesn't convert to a proper level 1 title in dokuwiki.

    I understand that my desired modification is inline= whereas the original filter is designed to manage blocks but my lack of kn= owledge in lua lets me struggling to go past that.

    Could you please show me the way to do this ?
    Thanks.

    Le mardi 27 juin 2023 =C3=A0 12:21:20 UTC+2, Sigismond a =C3=A9c= rit=C2=A0:
    Th= ank you Bastien.
    I did not find a bug report that specifically treats t= his issue. Many other issues with dokuwiki and lists though.
    Le mardi 27 juin 2023 =C3=A0 11:53:48 UTC+2, Bastien D= UMONT a =C3=A9crit=C2=A0:
    I think that it is worth a bug report if it has not been done yet. As = a workaround, you can expand the filter to remove all divs with custom-styl= e from the bullet lists.

    ```
    function Div (div)
    local custom_style =3D div.attributes['custom-style']
    if custom_style then
    local pre =3D pandoc.RawBlock('dokuwiki', '<WARP &qu= ot;' .. custom_style .. '">')
    local post =3D pandoc.RawBlock('dokuwiki', '</WARP&g= t;')
    table.insert(div.content, post)
    table.insert(div.content, 1, pre)
    return div.content
    end
    end

    local remove_custom_styles =3D {
    Div =3D function(div)
    if div.attributes['custom-style'] then
    return div.content
    end
    end
    }

    function BulletList(list)
    -- Do the same for all types that are badly handled with docx+styles
    -- (e.g. OrderedList)
    return list:walk(remove_custom_styles)
    end

    return {
    -- We must process the bullet lists first to remove the divs
    -- before they are converted to raw code.
    { BulletList =3D BulletList },
    { Div =3D Div }
    }

    ```

    Le Tuesday 27 June 2023 =C3=A0 02:35:06AM, Sigismond a =C3=A9crit :
    > Well=E2=80=A6 it does work but, somehow, docx+styles messes with t= he lists :
    > For a simple docx with just one list, unordered here is what I get= with -f
    > docx+styles -t dokuwiki :
    > <HTML><ul></HTML>
    > <HTML><li></HTML><HTML><p></HTML&= gt;Liste 1<HTML></p></HTML>
    > <HTML></li></HTML>
    > <HTML><li></HTML><HTML><p></HTML&= gt;liste 2<HTML></p></HTML>
    > <HTML></li></HTML>
    > <HTML><li></HTML><HTML><p></HTML&= gt;liste 3<HTML></p></HTML>
    >=20
    > <HTML><ul></HTML>
    > <HTML><li></HTML><HTML><p></HTML&= gt;liste 3a<HTML></p></HTML>
    > <HTML></li></HTML>
    > <HTML><li></HTML><HTML><p></HTML&= gt;liste 3b<HTML></p></HTML>
    > <HTML></li></HTML>
    > <HTML><li></HTML><HTML><p></HTML&= gt;liste 3c<HTML></p></HTML>
    > <HTML></li></HTML><HTML></ul></HT= ML>
    > <HTML></li></HTML>
    > <HTML><li></HTML><HTML><p></HTML&= gt;liste 4<HTML></p></HTML>
    > <HTML></li></HTML><HTML></ul></HT= ML>
    >=20
    > Which is not parsed by dokuwiki.
    >=20
    >=20
    > Without +styles :
    > =C2=A0 * Liste 1
    > =C2=A0 * liste 2
    > =C2=A0 * liste 3
    > =C2=A0 =C2=A0 * liste 3a
    > =C2=A0 =C2=A0 * liste 3b
    > =C2=A0 =C2=A0 * liste 3c
    > =C2=A0 * liste 4
    >=20
    > Which is syntactically correct dokuwiki format.
    >=20
    > If I understand it well, Pandoc seems to consider an ordered list = badly
    > formatted only when +styles is applied and it spits out some raw h= tml with <p>
    > tags inside <li>s
    >=20
    > So what is it ? Bad implementation in Dokuwiki writer ?=C2=A0
    > How can I benefit from both +styles, with my lua filter, and lists= ?=C2=A0
    >=20
    > --
    > =C2=A0 Pascal
    > Le lundi 26 juin 2023 =C3=A0 16:04:17 UTC+2, Sigismond a =C3=A9cri= t=C2=A0:
    >=20
    > Thanks a lot Bastien, it works perfectly well.
    >=20
    > Le lundi 26 juin 2023 =C3=A0 15:47:00 UTC+2, Bastien DUMONT a = =C3=A9crit=C2=A0:
    >=20
    > With `-f docx+styles`, you can replace the divs with custo= m styles with
    > this kind of filter:
    >=20
    > ```
    > function Div (div)
    > local custom_style =3D div.attributes['custom-style= 9;]
    > if custom_style then
    > local pre =3D pandoc.RawBlock('dokuwiki', '<= ;WARP "' .. custom_style ..
    > '">')
    > local post =3D pandoc.RawBlock('dokuwiki', '&l= t;/WARP>')
    > local content =3D div.content
    > table.insert(content, 1, pre)
    > table.insert(content, post)
    > return content
    > end
    > end
    > ```
    >=20
    > Le Monday 26 June 2023 =C3=A0 06:16:48AM, Sigismond a =C3= =A9crit :
    > > OK, let's try it another way :
    > >
    > > I plan to use Pandoc to convert several docx files to= dokuwiki
    > format.
    > > I need to retain custom block styles and convert them= to custom tags,
    > something
    > > like=C2=A0
    > >
    > > <WARP my-custom-block-style>
    > > my dokuwiki formatted block text
    > > </WARP>
    > >
    > > Do I need to develop a custom dokuwiki writer from sc= ratch to do that
    > or is
    > > there a way to use lua filters for this purpose.
    > > Sorry if the answer is obvious but I struggle to find= relevant
    > information.
    > >
    > > Thanks for any help,
    > > --
    > > =C2=A0 Pascal
    > >
    > >
    > > Le mercredi 26 avril 2023 =C3=A0 16:14:20 UTC+2, pasc= al Conil-lacoste a
    > =C3=A9crit=C2=A0:
    > >
    > > Hi everybody,
    > >
    > > I've been using pandoc for some years to accompli= sh very
    > straightforward
    > > conversions.
    > > Now that what I plan to do is a little more complex, = I struggle to
    > find
    > > relevant information.
    > >
    > > I need to convert docx to dokuwiki and retain Word cu= stom styles. I
    > thought
    > > I could use docx+styles to get custom-styles in dokuw= iki files but
    > they
    > > don't make it to the output and get stripped.
    > >
    > > I would be happy with ::: {custom-style=3D"mySty= le"} my text here:::
    > >
    > > If I could get something along these lines, I would b= e able to apply
    > some
    > > other simple transformation to get to the final dokuw= iki files and
    > treat
    > > them with a plugin.
    > >
    > > What is the best way to achieve this ? Filters ? Temp= lates ?
    > >
    > > Any help welcome!
    > >
    > > --
    > > You received this message because you are subscribed = to the Google
    > Groups
    > > "pandoc-discuss" group.
    > > To unsubscribe from this group and stop receiving ema= ils from it,
    > send an email
    > > to [1]pandoc-discus...@googlegrou= ps.com.
    > > To view this discussion on the web visit [2][1]https:= //
    > groups.google.c= om/d/msgid/
    > > pandoc-discuss/bdc377c4-3918-4f0f-a87e-a66f9d128cc2n%= [2]
    > 40googlegroups.com.
    > >
    > > References:
    > >
    > > [1] mailto:pandoc-discus...@googl= egroups.com
    > > [2] [3]https://groups.google.com/d/msgid/pandoc-discu= ss/
    > bdc377c4-3918-4f0f-a87e-a66f9d128cc2n%40googlegroups.com?utm_medium=3D
    > email&utm_source=3Dfooter
    >=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 [4]pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
    > To view this discussion on the web visit [5]https://groups.google.com/d/msgid/
    > pandoc-discuss/f0b95670-24a3-4870-842f-fb6e7791a694n%40googlegroups.com.
    >=20
    > References:
    >=20
    > [1] https://groups.= google.com/d/msgid/
    > [2] http://40googlegroups.com/
    > [3] https://groups= .google.com/d/msgid/pandoc-discuss/bdc377c4-3918-4f0f-a87e-a66f9d128cc2n%40= googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter
    > [4] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
    > [5]
    https://groups= .google.com/d/msgid/pandoc-discuss/f0b95670-24a3-4870-842f-fb6e7791a694n%40= googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter

    --
    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/62b0db64-b7ab-48e8-9025-9c969304e1b6n%40googlegroups.= com.
    ------=_Part_3847_1899592347.1687964405683-- ------=_Part_3846_1430004842.1687964405683--