From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31641 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: perro tuerto Newsgroups: gmane.text.pandoc Subject: Re: DTP Formats Date: Mon, 24 Oct 2022 12:04:57 -0700 (PDT) Message-ID: References: <94877023-0E96-4760-8B50-900C3087DB5B@gmail.com> <6080948D-C510-4C74-BF12-1BD9DD3C4193@gmail.com> <65d7b8a6-77fd-4e53-8e14-f98ceefd836bn@googlegroups.com> <6444F4E4-2C77-484B-B047-EA83FFDA4970@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_23162_7989898.1666638297883" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33276"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCMYR75V2YMRBW6D3ONAMGQE3DJ4IUQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Oct 24 21:05:03 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f56.google.com ([209.85.160.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1on2kw-0008OD-V1 for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 24 Oct 2022 21:05:02 +0200 Original-Received: by mail-oa1-f56.google.com with SMTP id 586e51a60fabf-13b6f7d8bf4sf3005333fac.7 for ; Mon, 24 Oct 2022 12:05:02 -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:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=6uZxCrSaIajVrK/7/mU6fiqyDwSYlk3T2WGj/CE26+c=; b=W/uerfKKJVmZgw8w0y/Q4v4MSe5Yu47KIPODPWrhmIAXwkWA1n24/aQLcKtbAlkKpJ nU5LQApDdlOld9Sd94yHqpyEJLg+uTiCnhnsLgiIjvXgpUM5PXUVrb2hRregwJm/1mSq C7wnfPRvvY4kkqvXqjfDj47le0X8NKcujiF3lAGWLQK2Fu5UdoF1Sp7pmjYWNGaa7m3K 5xzVRpdaboaxRJgkKcCnsIoiDzcVhJcCjX7Zh2/pVJChALujxixaicNK6zyozHw4KQVV rl+fmvm36ai9gVAqw/BrUETmTq7/pfkiyy5xshK+uK3BlhYEuGlCbstGHfOhjAxPuzkc NwZg== 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:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=6uZxCrSaIajVrK/7/mU6fiqyDwSYlk3T2WGj/CE26+c=; b=g35dxXY5HifehvhudFz1rWJdaXK5gvME1eWpIUzD43/QCQRM3vaBAy7futuffekPyJ l/QEvwKkeRxm11/eRG7rgO2cwzxA6zYlsnNBwE8aWDtVYYxoAH2Ra7tyhAH/kT0+70Ct O4s6x5XhKLU2Pcuhpcg/gZDCisVuwgNMPAQZ9Z4zLZEcf+7yVTkOoKL4qqeSaznFC9i6 4OcLZ3MqGcf0p92k1OuiVdMaQwfVvX14ByZRt27IgDoFfZ3YKHmVr0AHyS54M+ilvQTs /5g1Iu8DwCpHsuyskcTiDjj3FFnlfxnf3wiZE5qpiQQKM9/RQ1w1J2OIuBuDAovxcNMd v/eg== 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:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=6uZxCrSaIajVrK/7/mU6fiqyDwSYlk3T2WGj/CE26+c=; b=ReiGMvIcStGGAtUEh6l7R1bHlIJf1WwrbubSipQxpwomZowrgElhVUlXSEsqbx1KCo stFZEaaqA6ylFmtop8vjE9GlLMp6vYdrleqQz3qvuKW/7PYowBx2zof0aQAiWkUagi/A 2QDRvLo0UPyn1xeUboR2yUdffiuDISXtZVFfClzRUFcp8Vqj8RwOKIOZMA+hpunrcQuH vk7Z1jB5pYOe64YVLfXVs/z9nkb3o9nPSqkbaqmmDd8Ogx5vrDNDi0ScAiWXldMnNK3m Hbl13mfTErBOd+38u7wTvQTMQmWeQdcTqEa1cwxblscMgZP5NJjxgH3r7Qr9ZNzcslbv WwOA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf0MIMjYdrpVT4p8T4rxNewJdnDojTNp6Ds3LGG8Fw4TFV4OEZM+ 8AOsG2Kc5c1XO70IbX0WPrQ= X-Google-Smtp-Source: AMsMyM4y42IeDOviNQQ+BjW8KKaIKlIAytLtRJIeHiDRjzhz83/hyFVu1VRk/3CWPqC29K/lqgj2Hg== X-Received: by 2002:a05:6870:8a0e:b0:132:259a:afca with SMTP id p14-20020a0568708a0e00b00132259aafcamr20848582oaq.273.1666638301533; Mon, 24 Oct 2022 12:05:01 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:93d1:b0:131:8180:91a with SMTP id c17-20020a05687093d100b001318180091als3182922oal.8.-pod-prod-gmail; Mon, 24 Oct 2022 12:04:58 -0700 (PDT) X-Received: by 2002:a05:6870:c182:b0:12a:e54e:c6e8 with SMTP id h2-20020a056870c18200b0012ae54ec6e8mr38658410oad.207.1666638298781; Mon, 24 Oct 2022 12:04:58 -0700 (PDT) In-Reply-To: <6444F4E4-2C77-484B-B047-EA83FFDA4970-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> X-Original-Sender: nika.zhenya-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:31641 Archived-At: ------=_Part_23162_7989898.1666638297883 Content-Type: multipart/alternative; boundary="----=_Part_23163_1200809090.1666638297883" ------=_Part_23163_1200809090.1666638297883 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Oh, ok, looks way more easy like that. So in all inlines and blocks I will= =20 try to add/remove global stack and only in Str I will use those attrs to=20 create the itext. El viernes, 21 de octubre de 2022 a las 9:36:11 UTC-7, fiddlosopher=20 escribi=C3=B3: > One approach could be to keep a global stack of attributes. > > function Strong(el) > -- add "Strong" to the attribute stack > -- process the children of el > -- remove "Strong" from the top of the attribute stack > end > > function Str(el) > -- get all the attributes from the current attribute stack > -- output an ITEXT node with these attributes > end > > > On Oct 20, 2022, at 9:12 AM, perro tuerto wrote: > >=20 > > I am working on a Scribus writer --- it stills need a lot of work but= =20 > the work in progress is here. The main difficulty for Scribus writer is= =20 > that its structure is =E2=80=9Cflat=E2=80=9D. For example, what it is usu= al for html (or=20 > other xml format) is a nested structure like this: > >=20 > >

I have a strong and=20 > italic.

Other paragraph.

I am=20 > outside.

> >=20 > > Where there are nested blocks and inlines (I ignore attr for clearness)= : > >=20 > > Div [Para [ Str, Space, Str, Space, Str, Space, Strong [ Str, Space,=20 > Str, Space, Emph [ Str]], Str], Para [ Str, Space, Str]], Para [Str, Spac= e,=20 > Str, Space, Str] > >=20 > > But in Scribus, same structure should be like the following: > >=20 > > > > > > > > > > > > > > > > > > > >=20 > > So the must difficult task I am trying to solve is how to flat the=20 > structure and inherit the attributes --- as far as I noted, only classes= =20 > have to be inherit. In the first test I tried to solve it by pure regex,= =20 > lol, it worked except the inheritance of inline atrributes. In the second= =20 > try it seems it could work, but I have to continue working and refactor t= he=20 > code for the classic writer --- to late I come to realize that the new=20 > writer works when you don't need to rewrite everything, which it is not= =20 > this case. > >=20 > > So, if anyone has an idea of how to solve this problem (elements=20 > flattening and attributes inheritance), I will be happy to know :D > >=20 > > El jueves, 18 de agosto de 2022 a las 5:20:16 UTC-7,=20 > leon...-bM6h3K5UM15l57MIdRCFDg@public.gmane.org escribi=C3=B3: > > Yes, I have notified the relevant people and hopefully we'll get it=20 > fixed. (we updated to a new system so things something get lost...) > >=20 > > No support for Scribus in pandoc currently, though that might be an=20 > interesting thing to try to do with the new Lua reader/writer=20 > functionality. Alternatively, it does support importing Word files and yo= u=20 > could go that route - but, of course, that wouldn't be automatic. > >=20 > > Leonard > >=20 > > On Thu, Aug 18, 2022 at 7:51 AM Trevor Jenkins =20 > wrote: > > On 17 Aug 2022, at 19:45, Leonard Rosenthol =20 > wrote: > >=20 > > > Trevor - what do you want/need to know about ICML? I believe the=20 > documentation is part of the InDesign SDK. > >=20 > > As a sometime member of WG8 my interest is nothing more than=20 > intellectual curiosity, But the broken link is important. > >=20 > > Although it did raise my question of whether pandoc could process=20 > Scribus documents into/from other formats. And subsequent general questio= n=20 > of the absence of the simple introduction/excmples for using Lua. > >=20 > > Regards, Trevor. > >=20 > > <>< Re: deemed! > >=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/6080948D-C510-4C74-BF12-= 1BD9DD3C4193%40gmail.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/65d7b8a6-77fd-4e53-8e14-= f98ceefd836bn%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/ecb02338-4814-4d8e-8e43-b6b5dd0eae2fn%40googlegroups.com. ------=_Part_23163_1200809090.1666638297883 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Oh, ok, looks way more easy like that. So in all inlines and blocks I = will try to add/remove global stack and only in Str I will use those attrs = to create the itext.
El viernes, 21 de octubre de 2022 a las 9:36:11 UTC-7,= fiddlosopher escribi=C3=B3:
One approach could be to keep a global stack of attributes.

function Strong(el)
-- add "Strong" to the attribute stack
-- process the children of el
-- remove "Strong" from the top of the attribute stack
end

function Str(el)
-- get all the attributes from the current attribute stack
-- output an ITEXT node with these attributes
end

> On Oct 20, 2022, at 9:12 AM, perro tuerto <nika....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>=20
> I am working on a Scribus writer --- it stills need a lot of work = but the work in progress is here. The main difficulty for Scribus writer is= that its structure is =E2=80=9Cflat=E2=80=9D. For example, what it is usua= l for html (or other xml format) is a nested structure like this:
>=20
> <div class=3D"dd"><p class=3D"pp">= I have a <strong>strong and <em>italic</em></strong>= ;.</p><p>Other paragraph.</p></div><p>I am ou= tside.</p>
>=20
> Where there are nested blocks and inlines (I ignore attr for clear= ness):
>=20
> Div [Para [ Str, Space, Str, Space, Str, Space, Strong [ Str, Spac= e, Str, Space, Emph [ Str]], Str], Para [ Str, Space, Str]], Para [Str, Spa= ce, Str, Space, Str]
>=20
> But in Scribus, same structure should be like the following:
>=20
> <ITEXT CH=3D"I have a "/>
> <ITEXT CPARENT=3D"Strong" CH=3D"strong and "= ;/>
> <ITEXT CPARENT=3D"StrongEmph" CH=3D"italic"= />
> <ITEXT CH=3D"."/>
> <para PARENT=3D"ddpp"/>
> <ITEXT CH=3D"Other paragraph."/>
> <para PARENT=3D"dd"/>
> <ITEXT CH=3D"I am outside."/>
> <para />
>=20
> So the must difficult task I am trying to solve is how to flat the= structure and inherit the attributes --- as far as I noted, only classes h= ave to be inherit. In the first test I tried to solve it by pure regex, lol= , it worked except the inheritance of inline atrributes. In the second try = it seems it could work, but I have to continue working and refactor the cod= e for the classic writer --- to late I come to realize that the new writer = works when you don't need to rewrite everything, which it is not this c= ase.
>=20
> So, if anyone has an idea of how to solve this problem (elements f= lattening and attributes inheritance), I will be happy to know :D
>=20
> El jueves, 18 de agosto de 2022 a las 5:20:16 UTC-7, leon...-bM6h3K5UM15l57MIdRCFDg@public.gmane.org escribi=C3=B3:
> Yes, I have notified the relevant people and hopefully we'll g= et it fixed. (we updated to a new system so things something get lost...)
>=20
> No support for Scribus in pandoc currently, though that might be a= n interesting thing to try to do with the new Lua reader/writer functionali= ty. Alternatively, it does support importing Word files and you could go t= hat route - but, of course, that wouldn't be automatic.
>=20
> Leonard
>=20
> On Thu, Aug 18, 2022 at 7:51 AM Trevor Jenkins <bslwa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On 17 Aug 2022, at 19:45, Leonard Rosenthol <leon...-bM6h3K5UM15l57MIdRCFDg@public.gmane.org> wrote:
>=20
> > Trevor - what do you want/need to know about ICML? I believe= the documentation is part of the InDesign SDK.
>=20
> As a sometime member of WG8 my interest is nothing more than intel= lectual curiosity, But the broken link is important.
>=20
> Although it did raise my question of whether pandoc could process = Scribus documents into/from other formats. And subsequent general question = of the absence of the simple introduction/excmples for using Lua.
>=20
> Regards, Trevor.
>=20
> <>< Re: deemed!
>=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 ht= tps://groups.google.com/d/msgid/pandoc-discuss/6080948D-C510-4C74-BF12-1BD9= DD3C4193%40gmail.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/65d7b8a6-7= 7fd-4e53-8e14-f98ceefd836bn%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/ecb02338-4814-4d8e-8e43-b6b5dd0eae2fn%40googlegroups.= com.
------=_Part_23163_1200809090.1666638297883-- ------=_Part_23162_7989898.1666638297883--