From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29260 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: org-mode verse blocks in docx Date: Sat, 18 Sep 2021 11:33:48 -0700 Message-ID: References: <8779cbcd-caf4-485f-a73d-3bf2b0c57e60n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7723"; mail-complaints-to="usenet@ciao.gmane.io" To: Charles Pletcher , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBGXCTCFAMGQE6XL2K6Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Sep 18 20:34:06 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qt1-f192.google.com ([209.85.160.192]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mRfA4-0001lC-Fq for gtp-pandoc-discuss@m.gmane-mx.org; Sat, 18 Sep 2021 20:34:04 +0200 Original-Received: by mail-qt1-f192.google.com with SMTP id e6-20020ac84e46000000b0029baad9aaa0sf122238127qtw.11 for ; Sat, 18 Sep 2021 11:34:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1631990043; cv=pass; d=google.com; s=arc-20160816; b=Y7iFhgdp/xp8a6eRiAVoddgspbvlaGHF7ELLGbIOhWYFPZoeoroitaxZJ/S7zIxdZW w7UvhN1XSPWrevZTy09yz/LesKISm6n03qvkOhMBpEgj5dC1su+bExy/POmtWpSNQOiG Z2MBzTgwWGaHnaz60QAXcVKpGix7FW5xC8hnw6IKwil0z5aNa4fyNbn5/Hn9Wyb8v+uN 3PDn9f9jn+ThflJ0NXD0zZPq28T7RpWirpKYkQxaHgNy4tJ6GSEhzaIyo0k5pjsqyRLg cM6hN1N/tsektrbivJO4Ht4cmp9CYkvimoPhvZJSyIjX04mcx8eTnRTUqKujDDLtpid/ +ydQ== 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:content-transfer-encoding :mime-version:message-id:date:references:in-reply-to:subject:to:from :sender:dkim-signature; bh=mlcfBgnGGn5qjNNaD8bBmreSlQmLOLvwqE/sp9NE/Ik=; b=BraOhy1BVdUkjILsEeWPZtppLo9Wu8O39VPySfe56p6c9yn0Wl6etniJi21nmsGTrp LT8qs+jGMbSbn3KO892eLE3EzKPhc8cy1H19WxhfHGFFOBUczLNdp4Gw5TOKHFZlKTsg gYlGO6/CaLqDWGYIlhwkhZ+fz/Ev8dLKxpbMX3tWuNA0e8y/RxhwuLVhsL+H9jdCiFEW ucmrON8RvQ+UXCTJ4heA9K4lR3cpYm3PKTPhKZiNBO95b+qBbgrFwFYsNQokL8QwT/5A MdM8VsrabqgcDgcL1aXzVxMunDHJIbPh8GQbLlVUt8XrFCVHiB/yRnwp4t76SRbU0ce4 EYDw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=T2DdZvCT; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62f as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=mlcfBgnGGn5qjNNaD8bBmreSlQmLOLvwqE/sp9NE/Ik=; b=cVuRVbB/ZXlNJI9lYdD9GeTbUpp/A5VbofidVZuG4dXbKliwn/dVsVmBxYzKh2zhAR rhj4HkTUHXD+64sxFo21rD/3ikqE2tp7fM3+osSiIdw8AZTzVHH7bi5+7ZSUF3x9qw0u om6SEAkTY5Lj8F2ZrxEZK25BJoUy+ge2kkp5McGv4ooyIgbx1veChUU2KFfm0He1AhPW DQjCiuTUfv0LGqLNGAgkAFtliF/phy0g7270pF7uQ7sg/ilEX6XbhkT4n8vSLvQJg6jt lqryuNWsEobYtEIbSHu5sqqonqLZEXW2DyC64xeR37rsMXGPIh3Pl2MuDxVsXo+E/Bf/ bQeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:content-transfer-encoding :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=mlcfBgnGGn5qjNNaD8bBmreSlQmLOLvwqE/sp9NE/Ik=; b=aREQJtjcXz1v/SSKscSqHEIr6ylyIx7d9P7Vip0Mx0d5WXfM/KOsyhJhYt2vyfhDX/ IE2emPLVEn82YiqkWJEct0uCTC1PuYql3u6Z5mR6Q/cZhabQef4JpsbFJzuQ8BNYL/GK KL5rzAH7w3rVIZNeDNXaYknGNHZBKD7p2CW/VTzMDAk5ZFQAzGQtQ90XwbkWpzT3WtYE MmDNBqGL8H0r8f+Q3sgfWlfsTnKho6oE03DwV01C+iXEAlWOwjwxs6WX6YPzq8gNDvYe SnUkh1FfgcSTAsEZ1tSFAI0qakW0SmZ0x+/ZWgOlrl0rsmeBm21YgTN0ujCNkqVl3194 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5305cP18O1z+hd/v0ZS8wuyMqGq5uS8othZnDeDKLwxz2+7ubWv3 r3L4YV1D5y9nR60GIoKJh34= X-Google-Smtp-Source: ABdhPJyfxHXgWHAT7VXgeFd5MNklw11YHGfWxRetC/YzNa0kRgsVnEHkqMO8gHCLxf/z+Rfd8Wwj8Q== X-Received: by 2002:a37:62ca:: with SMTP id w193mr2863713qkb.137.1631990043260; Sat, 18 Sep 2021 11:34:03 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:620a:1582:: with SMTP id d2ls12140465qkk.9.gmail; Sat, 18 Sep 2021 11:34:01 -0700 (PDT) X-Received: by 2002:a05:620a:2488:: with SMTP id i8mr16762212qkn.58.1631990041684; Sat, 18 Sep 2021 11:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631990041; cv=none; d=google.com; s=arc-20160816; b=OFGV/4uWclMFKwE4e9yftECZjCF20yoIFpz+I9tw7sS6ccAt2UCpjYvSqh6lcKBWm5 /MBB4kEhsKjRjsQygdRl5ETR7oGYyJLIyscrbaWrYKAjAP1qVnip5T8EmwbTtcLHzNmb jbswTdk/IOVlioDjLbZhBkZGOGJTmyajCH+49HmEK666SAX+KiqWqaOdZUvmtPHmsyZ8 nERH4gVw3ySOevdZg2KFqemb+PqPTpcH5Gqvp/KN0sFetGcwF/J/tjmavgtqPT05Lcjv foe8v1VNEIkVMQXtzm67UIQgL6TjwlLZZOgJsRM+z9FXHKfIPHeYZgwOxWbStPPCxigZ 9yDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:dkim-signature; bh=HJnMreIwDlb5FNUS4UNHxdz60IwnCbuUIMPmWmg0hqQ=; b=LhjPWldrgSRV2JAreZizX1hNJge6QxHEo/ULWMU9BKdyR2vRF191SKxTJ443nQtDBJ iribVkR3C2GWBvjsXOKCoG1faq+Djju9yDhEnoEt3qD5s+08JVJFiyTVcQxDjbkByjMw 78fmEgJf6COP7zof0YYZ/4+rP+zgSC1v3D7mxgwHp6wMBl7KCkYouqkehm64Cp3DlDg+ Tg6VI9zBWWxJoS+iG7IgbU3tfxERP2uFHDfuDuRloaZ6rVueRrJNw0+KTdhGJiQlkhyv kTvnitZL50eXMMdwNxuM4LqOVaLvgfTwhnBlT6dTJ9sYDxtn/b/8L14hjE6pFw28GMe/ NZJw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=T2DdZvCT; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62f as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com. [2607:f8b0:4864:20::62f]) by gmr-mx.google.com with ESMTPS id p18si517505qtl.2.2021.09.18.11.34.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Sep 2021 11:34:01 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62f as permitted sender) client-ip=2607:f8b0:4864:20::62f; Original-Received: by mail-pl1-x62f.google.com with SMTP id l6so3601566plh.9 for ; Sat, 18 Sep 2021 11:34:01 -0700 (PDT) X-Received: by 2002:a17:902:a38b:b0:138:fc25:dd75 with SMTP id x11-20020a170902a38b00b00138fc25dd75mr15262863pla.4.1631990040433; Sat, 18 Sep 2021 11:34:00 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id u21sm10690267pgk.57.2021.09.18.11.33.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Sep 2021 11:33:59 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id EEAEDA1A8; Sat, 18 Sep 2021 14:33:48 -0400 (EDT) In-Reply-To: <8779cbcd-caf4-485f-a73d-3bf2b0c57e60n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=T2DdZvCT; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62f as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@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:29260 Archived-At: Currently verse blocks are parsed as pandoc LineBlock elements. When rendered to docx, they appear as regular paragraphs with hard breaks, so there is no styling. However, you could try using a filter that puts each LineBlock element into a Div with a custom style attribute. Then the docx writer will add this style. How to do that? See the documentation on Lua filters on the website. With a Lua filter it would be something like this: function LineBlock(el) local div =3D pandoc.Div({el}) div.attributes['custom-style'] =3D 'Poetry' return div end Save this as poetry.lua. Then invoke with pandoc --lua-filter poetry.lua yourfile.org -o yourfile.docx Charles Pletcher writes: > Apologies if this question has already been answered, but I couldn't find= =20 > anything for this specific conversion by searching around. > > I'm trying to export org-mode containing verse blocks to docx, but the do= cx=20 > output doesn't have any style attached to the verse blocks that I can=20 > modify in my reference.docx. > > I want to be able to format verses via Word's styles so that I don't need= =20 > to format each block individually. > > Is it possible to do this, or am I missing something simple? > > Minimal example for what I'm trying to do: > > input.org: > > #+begin_verse > =CE=BB=CE=B5=CE=AF=CF=80=CE=BF=CF=85 =CE=BC=CE=B7=CE=B4=E1=BD=B2 =CF=83= =CF=8D, =CF=80=CE=B1=CF=81=CE=B8=CE=AD=CE=BD', =E1=BC=90=CF=80' =CE=BF=E1= =BC=B4=CE=BA=CF=89=CE=BD, > =CE=BC=CE=B5=CE=B3=CE=AC=CE=BB=CE=BF=CF=85=CF=82 =CE=BC=E1=BD=B2=CE=BD = =E1=BC=B0=CE=B4=CE=BF=E1=BF=A6=CF=83=CE=B1 =CE=BD=CE=AD=CE=BF=CF=85=CF=82 = =CE=B8=CE=B1=CE=BD=CE=AC=CF=84=CE=BF=CF=85=CF=82, > =CF=80=CE=BF=CE=BB=CE=BB=E1=BD=B0 =CE=B4=E1=BD=B2 =CF=80=CE=AE=CE=BC=CE= =B1=CF=84=CE=B1 =CE=BA=CE=B1=CE=B9=CE=BD=CE=BF=CF=80=CE=B1=CE=B8=E1=BF=86= =C2=B7 > =CE=BA=CE=BF=E1=BD=90=CE=B4=E1=BD=B2=CE=BD =CF=84=CE=BF=CF=8D=CF=84=CF=89= =CE=BD =E1=BD=85 =CF=84=CE=B9 =CE=BC=E1=BD=B4 =CE=96=CE=B5=CF=8D=CF=82. > #+end_verse > > pandoc -i input.org -o output.docx > > You'll see that the verse just has the "Body Text" style. > > Thanks, > Charles > > > --=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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/8779cbcd-caf4-485f-a73d-3bf2b0c57e60n%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/m2tuihivhv.fsf%40Johns-Air.hsd1.ca.comcast.net.