From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/22765 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Newsgroups: gmane.text.pandoc Subject: Re: docx writer: using styles from reference document Date: Mon, 20 May 2019 15:40:14 +0200 Message-ID: References: <0c37bc1d-ea10-4945-98a8-b169997ac437@googlegroups.com> <87v9ynr3wc.fsf@jhu.edu> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f16306058951df45" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="189767"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Jesse Rosenthal To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCHJFA6CVYERBS64RLTQKGQELYSK47A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon May 20 15:40:29 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ed1-f57.google.com ([209.85.208.57]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hSiWi-000nE0-2H for gtp-pandoc-discuss@m.gmane.org; Mon, 20 May 2019 15:40:28 +0200 Original-Received: by mail-ed1-f57.google.com with SMTP id r20sf25240888edp.17 for ; Mon, 20 May 2019 06:40:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1558359627; cv=pass; d=google.com; s=arc-20160816; b=QT+1cdGWA2d1isLPGL4SZ3Z3phNGS+GzeDi+GYiat4dWUU10zUD4BNZmLMwIylzVwI uEw4tf2Y8I+8QPUmnWFdJ8clmOytCf8WyxLJGEdPAr4SgIic8xOaJtrRcjwPvmvvZkC0 jYgUW4vE16uo0uaoJLXpwj78SdgT4HL50oet8Tey/pof2GuCmTAIOFl8+iyGogSXH2Nm ugn2IWKkGDBjZdWXcdjbDwIWETDYruFtve7cTiQwe5rfs6jIvD/y5d1utUHK0nk53d0J DcrAhvMp0AH95XQrt6zCkFs9yX7wQdIM3W62sas+jPhNis/Eslyt+wWtC6rPOakL1Rc3 6S2g== 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:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=gKFKZrhOFDGziE+jfm/fXWd0CYW1iAxB52kFDc0XX9s=; b=l+XCLndDqcA4RMHWmk5KZvkrJKTzy8sJWqYI8xwPv6/d5LLzGHgLpCI0+bPPPagSXI AoiYdQVax/r/Aw1YuAdeTG/vI5rx6X7D8sfGdeB4guBtBplwHfzbxQh4u6a+fR4KkYSO tfSIiVptUjJTSM2aoOeNrfy49yq+3xenwLB9oV73yn3JfpbvOdwW0ANCcBT9buNdA5ZA KatcsAJEuy5KCv9bPnCBoIobyNZyGLTNvoTv7yBbSlthpXLQ783PVxFGYgrOv2gMrSzl 2TS/FgK3D4yNJ2ag0D3/46lBtsAmWG1r00M/WkHE0TzEQs63E1yjC1TF/mVrG0HwjVEi f7Yg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JBYVtltp; spf=pass (google.com: domain of alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::432 as permitted sender) smtp.mailfrom=alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:references:in-reply-to:from:date:message-id :subject:to:cc: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=gKFKZrhOFDGziE+jfm/fXWd0CYW1iAxB52kFDc0XX9s=; b=lT+Qojjk99p7rZHmBtVGvZOPYSJyDc53yGsC9274keKQu7/LReHQ1Z270MRciSxkCx b7hxcXGCHL4YKlrOrTLl6RdxlLAcS5eKoubVeiG6Ygu8goECBlWH5DIxXZ9mM1nt+a2H yYRWj2HftSHX+Aqj4jqQQAzDcysjx99Z+c1TsoOQbr2kh/UfUQEiEi1frdLXLgdUS2xr J8L0Y4lWlxXWfhxEWH0ySMqw40oMB34ICVhpgx9MMvD2COHtqwt9DBZ6JIXMgcBm9kZc +Bv4y10+gm4dyRaHTGBkjlBY3sgKXhRoyi7i805TiTcb3UJ1mQtuQDYohIvjCHiz9QYI dqng== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc: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=gKFKZrhOFDGziE+jfm/fXWd0CYW1iAxB52kFDc0XX9s=; b=vZPUA1mQCM0SuW4Y1mQC3ifdqiEVcs5iVQidsnxGOmbwMnvEyNGhuUJQF8WCsXoL4Z plqDsDyNhye63UnYkLaKa/ey6jj9uy+asC2SVqV4nTGvwlSCzGhoco0Sd2PXMXKZlUqq z/IEgovqgR8A+BMVN1Vd9Nzamfo+9yDWR1WPFIJn/IvU4nmAOi8o4/qrbT31NSfmNnqH 4s1jA670FOpCvkXq/WAgRlaNuXZ3JCoU9fWiDyGI9cBvzPjjxJHhKV09hVeavqMY+xlY +C3rJBXXq1K0QIcKl7HJV1ShXWU/prXLv88kBPEcTizGHaxWIWgq93GMuz+UZoQXKN1U OFqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:references:in-reply-to:from :date:message-id:subject:to:cc: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=gKFKZrhOFDGziE+jfm/fXWd0CYW1iAxB52kFDc0XX9s=; b=hB3SyukZEdJEGiPvfsTBKrJqhhsni+ojaksmKwO7HRBwIF2nxjZXig0Rk9hwsqpJNz P/xcPVJGKuq3mSQxcAj9LmBMRr7NBpoya4S3X7h2gFcTDSvliDRWC9roVVC53KRuAAaE cfyykHCZBZrW2njJ3ZSnTPuf+Ry7P5VogarTYOue0rLB43d7/71Je5fIGpe6SkV5Syuf ngsuvj3GJ1i2UnC+HwpMrTgmT3v7Zt4P2ZEs9hib39AD+sM+lI1u1o+u/p0y9fVyvuWL +y0mqSFm8HknsyU8Xa7nBX2JLMndu8d5uacJKK01jZR+YrFMafqoe9zFs8SP86G0i0Vh +i2w== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAWhb1rZYou3gdchgY+r5ucIGbtUSQXseARguIbak0FQvJ1VfbMm nSrCrPK+XLEOuXoQXjCWok8= X-Google-Smtp-Source: APXvYqzGilBivWMsbXa8H4RhvnCEWOrKjHkmAowjxoxEdTzjXsZvypCWJeeutg1YrhTvh25E6tR07w== X-Received: by 2002:a50:aeaf:: with SMTP id e44mr75641539edd.239.1558359627558; Mon, 20 May 2019 06:40:27 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a50:b1e7:: with SMTP id n36ls4998463edd.5.gmail; Mon, 20 May 2019 06:40:26 -0700 (PDT) X-Received: by 2002:a50:89b0:: with SMTP id g45mr76853623edg.200.1558359626564; Mon, 20 May 2019 06:40:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558359626; cv=none; d=google.com; s=arc-20160816; b=dxg7TNSYutj9L5pxzMaYhwoKQiQ2DAjoy0UQRHXx2sd3HcWn+tFp9tTga42g1Bim1j k4SMybiQWYRa6gbUC2AxQ/lGjV9MlX+FN6h5nb6kHXHsryesJ0zJAdVVDA1f92XQ00hW 6uRS5EREfb1Avy68x2y59qd81fjnIHoKuXsZ2aFnBp8maD5p/4utjNyZiGLw73UK7NK5 4ciqkyRra0v5KS0kjUIgMshhqJEQKuw8VkE9O7Yv7Zz19V6F/cNgAkLzdCjfO6u/jL1/ b3Ripsfw4C8i7zrDFKTTRe2ircroJAW1y4eRvTOJKX0Pjd2Oc+mxNm2ym/yyQthcNGJW CGUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=e2nOrXs6hwHfnp1Uu6jfCYBf48Jt2agtxr3w3/cJowo=; b=0hCfsR8fzivz+60SjpsCi9b5P4+Ac8rIFA+ZjL2BLgXtCxbxCgjX/b1iO6UHP/WaVG aA9Wr1XCqoR/XI4AZ0QFMjQH1a7Y+mpiYtDj2/HEea1I7QXjFr4B2GVYBsrk+SNBQo1N PCTj8SZzqKX1eqVKMCjR+gq6sADI/GLKObAQShnjgXyjrTw6JVkI5qmEFDTg9g1EpJpl n8n6hV5Ud57fawKx/XmKO5UA1wXHX4r23p2SGqqLCnKX7Hs0hKL6UPLbeozZIY/d2s2p tR6pyoY4Ppu1lPlJVNC72pFAM/VaV7g2hO++gB6Qygz7rxD5WcF6IJbiETo620GxSHCS J+rw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JBYVtltp; spf=pass (google.com: domain of alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::432 as permitted sender) smtp.mailfrom=alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com. [2a00:1450:4864:20::432]) by gmr-mx.google.com with ESMTPS id l30si2328982edd.4.2019.05.20.06.40.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 May 2019 06:40:26 -0700 (PDT) Received-SPF: pass (google.com: domain of alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::432 as permitted sender) client-ip=2a00:1450:4864:20::432; Original-Received: by mail-wr1-x432.google.com with SMTP id d18so14675456wrs.5 for ; Mon, 20 May 2019 06:40:26 -0700 (PDT) X-Received: by 2002:a5d:4647:: with SMTP id j7mr10676559wrs.280.1558359626046; Mon, 20 May 2019 06:40:26 -0700 (PDT) In-Reply-To: X-Original-Sender: alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JBYVtltp; spf=pass (google.com: domain of alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::432 as permitted sender) smtp.mailfrom=alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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.org gmane.text.pandoc:22765 Archived-At: --000000000000f16306058951df45 Content-Type: text/plain; charset="UTF-8" Hi Brandon Jesse shared this with me earlier in the thread, it helped a lot: https://pandoc.org/lua-filters.html cheers Alan On Mon, May 20, 2019 at 3:09 PM Brandon Keith Biggs < brandonkeithbiggs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > Hello, > I would love a link in the documentation to a guide on using these > filters, because having a TOC, title page, controlling page numbers, and > all that is very common when using word. > Thanks, > > Brandon Keith Biggs > > > On Mon, May 20, 2019 at 6:06 AM Alan wrote: > >> Hi >> >> I made some progress on this: >> >> 1. I got the cover page working by using the lua filter to remove all the >> meta data inlines then reconstructing it all as an "abstract" meta element. >> Handily the Abstract has Blocks not Inlines, so the custom styles work. And >> the TOC appears after the abstract. >> >> 2. Hard breaks remain a problem though. I can work around this on the >> cover page with some spacing, but that's not feasible for the rest of a >> typical document. >> Question: is the non-support hard breaks in Pandoc an intentional >> position, or is this just a gap that the community would be interested in >> filling if someone cared enough to implement it? >> >> One new challenge: >> >> 3. Page numbers. Can I use the lua filter to insert a page number footer >> in the generated docx? >> >> regards >> Alan >> >> >> On Fri, May 10, 2019 at 4:29 PM Alan wrote: >> >>> Hi >>> >>> The lua filter approach is working reasonably well but I have a couple >>> more in depth questions. For context, my pandoc input format is docbook >>> generated from asciidoc. >>> >>> 1. Title, subtitle, author and other meta elements: how do I apply >>> styles to them? >>> - I've tried wrapping them in Spans (inside a "function Pandoc(doc)") >>> as suggested by the custom-style docs, but they don't pick up any styles. >>> - I tried turning them into Div/Para objects in the main body, but then >>> they appear after the generated TOC. >>> Basically I need to support setting up a cover page followed by a TOC. >>> >>> 2. Page breaks/hard breaks. They don't seem to be supported by the >>> Pandoc internal model. Any suggestions for getting around this? >>> Also related to the cover page need. >>> >>> regards >>> Alan >>> >>> >>> On Mon, May 6, 2019 at 5:41 PM Alan wrote: >>> >>>> Thanks for the reply Jesse >>>> >>>> I did check out the custom styles, but you are right that I'd rather >>>> not embed that in every paragraph. I'm dealing with moderately large >>>> documents and it would get old pretty fast. >>>> >>>> I hadn't considered the lua filters yet. Good idea, I will give it a >>>> try. >>>> >>>> regards >>>> Alan >>>> >>>> On Mon, May 6, 2019 at 5:36 PM Jesse Rosenthal >>>> wrote: >>>> >>>>> Alan McLachlan writes: >>>>> >>>>> > pandoc today generates the paragraph text set to "Normal" >>>>> > style, I want it to use "My Style 1" instead of Normal. >>>>> >>>>> This is a job for custom-styles: >>>>> https://pandoc.org/MANUAL.html#custom-styles >>>>> >>>>> So, one (not particularly user-friendly) way to do it would be to wrap >>>>> ever paragaph in a div, to give it a custom style >>>>> >>>>> ~~~ >>>>> ::: {custom-style="My Style 1"} >>>>> Here is a paragraph. >>>>> ::: >>>>> >>>>> ::: {custom-style="My Style 1"} >>>>> Here is another. >>>>> ::: >>>>> ~~~ >>>>> >>>>> But you probably don't want to do that -- instead, it would be nice to >>>>> just write as normal: >>>>> >>>>> ~~~ >>>>> Here is a paragraph. >>>>> >>>>> Here is another. >>>>> ~~~ >>>>> >>>>> and then have paragraphs converted on the fly. To do that, you'd use a >>>>> pandoc filter (https://pandoc.org/lua-filters.html): >>>>> >>>>> ~~~ >>>>> function Para(blk) >>>>> local attr = pandoc.Attr() >>>>> attr.attributes["custom-style"] = "My Style 1" >>>>> return pandoc.Div({blk}, attr) >>>>> end >>>>> ~~~ >>>>> >>>>> That will convert all plain paras into a styled div. Save that in a >>>>> file >>>>> (`style.lua`), and then run it on the simple markdown file: >>>>> >>>>> `pandoc input.md --lua-filter=styler.lua -o output.docx` >>>>> >>>>> >>>>> -- >> 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pandoc-discuss/CABQ_dt_VkYEL5ED8i8Wo7GUeNA-Kgwyzjpzw2V%3DvdWYt1%2BkCLg%40mail.gmail.com >> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "pandoc-discuss" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/pandoc-discuss/zzEvOYD3IR4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/CAKAWQkXpaypSpUU62p%3DFr_bhyLhLuAKMQ18MOy2TzTu6LmV3jg%40mail.gmail.com > > . > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CABQ_dt-uz_JTNFiHTfC1zBzUBeXnDbTL457OeZ_gUozVQc5p0Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. --000000000000f16306058951df45 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Brandon

Jesse shared this= with me earlier in the thread, it helped a lot:

cheers
=
Alan

On Mon, May 20, 2019 at 3:09 PM Brandon Keith Biggs <brandonkeithbiggs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org= > wrote:
Hello,
I would love a link in the documentation to a guide= on using these filters, because having a TOC, title page, controlling page= numbers, and all that is very common when using word.
Thanks,
On Mon, May 20, 2019 at 6:06 AM Alan <alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
=
Hi

I made some progress on this:

=
1. I got the cover page working by using the lua filter to remov= e all the meta data inlines then reconstructing it all as an "abstract= " meta element. Handily the Abstract has Blocks not Inlines, so the cu= stom styles work. And the TOC appears after the abstract.
2. Hard breaks remain a problem though. I can work around this = on the cover page with some spacing, but that's not feasible for the re= st of a typical document.
Question: is the non-support hard break= s in Pandoc an intentional position, or is this just a gap that the communi= ty would be interested in filling if someone cared enough to implement it?<= /div>

One new challenge:

3. Pag= e numbers. Can I use the lua filter to insert a page number footer in the g= enerated docx?

regards
Alan


On Fri, May 10, 2019 at 4:29 PM Alan <alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
H= i

The lua filter approach is working reasonably we= ll but I have a couple more in depth questions. For context, my pandoc inpu= t format is docbook generated from asciidoc.

1= . Title, subtitle, author and other meta elements: how do I apply styles to= them?
=C2=A0- I've tried wrapping them in Spans (inside= a "function Pandoc(doc)") as suggested by the custom-style docs,= but they don't pick up any styles.
=C2=A0- I tried turn= ing them into Div/Para objects in the main body, but then they appear after= the generated TOC.
Basically I need to support setting up a cove= r page followed by a TOC.

2. Page breaks/hard = breaks. They don't seem to be supported by the Pandoc internal model. A= ny suggestions for getting around this?
Also related to the cover= page need.

regards
Alan


On Mon, May 6, 2019 at 5:41 PM Alan <alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
T= hanks for the reply Jesse

I did check out the cust= om styles, but you are right that I'd rather not embed that in every pa= ragraph. I'm dealing with moderately large documents and it would get o= ld pretty fast.

I hadn't considered the lua fi= lters yet. Good idea, I will give it a try.

regard= s
Alan

On Mon, May 6, 2019 at 5:36 PM Jesse Rosenthal &l= t;jrosenthal-5xu6Ak7Li58@public.gmane.org= u> wrote:
Alan McLachlan <alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> pandoc today generates the paragraph text set to "Normal" > style, I want it to use "My Style 1" instead of Normal.

This is a job for custom-styles:
https://pandoc.org/MANUAL.html#custom-styles

So, one (not particularly user-friendly) way to do it would be to wrap
ever paragaph in a div, to give it a custom style

~~~
::: {custom-style=3D"My Style 1"}
Here is a paragraph.
:::

::: {custom-style=3D"My Style 1"}
Here is another.
:::
~~~

But you probably don't want to do that -- instead, it would be nice to<= br> just write as normal:

~~~
Here is a paragraph.

Here is another.
~~~

and then have paragraphs converted on the fly. To do that, you'd use a<= br> pandoc filter (https://pandoc.org/lua-filters.html):

~~~
function Para(blk)
=C2=A0 =C2=A0local attr =3D pandoc.Attr()
=C2=A0 =C2=A0attr.attributes["custom-style"] =3D "My Style 1= "
=C2=A0 =C2=A0return pandoc.Div({blk}, attr)
end
~~~

That will convert all plain paras into a styled div. Save that in a file (`style.lua`), and then run it on the simple markdown file:

`pandoc input.md --lua-filter=3Dstyler.lua -o output.docx`


--
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 pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CABQ_dt_VkYEL5= ED8i8Wo7GUeNA-Kgwyzjpzw2V%3DvdWYt1%2BkCLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Goog= le Groups "pandoc-discuss" group.
To unsubscribe from this topic, visit https://g= roups.google.com/d/topic/pandoc-discuss/zzEvOYD3IR4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to p= andoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAKAWQkXpaypSpUU6= 2p%3DFr_bhyLhLuAKMQ18MOy2TzTu6LmV3jg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.= google.com/d/msgid/pandoc-discuss/CABQ_dt-uz_JTNFiHTfC1zBzUBeXnDbTL457OeZ_g= UozVQc5p0Q%40mail.gmail.com.
For more options, visit http= s://groups.google.com/d/optout.
--000000000000f16306058951df45--