Thanks for the prompt responses and earnest help.

John: I had defined the custom style in the style sheet I attached, specifying that the `Block Text` style should be followed by `Body Text 2` style. I assumed that was enough because this functionality seems to work with regard to `First Paragraph` and `Body Text` styles ("this functionality" meaning that pandoc seems to abide by the `Style for following paragraph` feature). Is this assumption incorrect? At any rate, following through with the `+fenced_divs` attribute worked and implemented the `Body Text 2` style. For future reference, you must do as the manual indicates and surround the chunk immediately following the blockquote in:

::: {custom-style="Body Text 2"}
Rest of chunk.
:::

Bastien: Thanks for pointing me to your lua filter. I had a hard time getting the snippet you shared in this thread to work, most likely because I don't know lua and trying to put out 1million fires. However, when I examined your lua filter on github, I was able to work that. For my particular case, I didn't like the fact it rendered the subsequent hunk as `First Paragraph + unindented` (or some such). It was instructive to see the exact openxml code required to implement the fix, which I was able to reproduce in an Rmarkdown document as:

```{=openxml}
<w:pPr>
    <w:pStyle w:val="BodyText"/>
    <w:ind w:hanging="0"/>
    <w:rPr></w:rPr></w:pPr>
```

So for Rmarkdown users looking to render text after blockquotes in a sort of "keep with preceding" style, then pasting the above snippet works.
On Wednesday, October 27, 2021 at 12:57:34 PM UTC-4 Bastien Dumont wrote:
If all you want is to prevent indentation, you can use a filter that I wrote for a similar need: https://github.com/badumont/lua-filters/tree/complex-paragraphs/complex-paragraphs (which supports other output formats and enables you to control more precisely what is indented or not). If you really need to set a style, the following filter should work:

```
is_preceding_BlockQuote = false

function Block(block)
if block.t == 'BlockQuote' then
is_preceding_BlockQuote = true
elseif is_preceding_BlockQuote == true then
is_preceding_BlockQuote = false
return pandoc.Div(block, {['custom-style'] = 'Body Text 2'})
end
end
```

Le Wednesday 27 October 2021 à 09:32:34AM, Landon Yarrington a écrit :
> To clarify, in the MRE above, my goal is to get the paragraph immediately after
> the blockquote to render as "Body Text 2" according to the style in the
> ref_template.docx. Using this and every other stylesheet I've made, the
> following paragraphs always come out as style "First Paragraph."
>
> On Wednesday, October 27, 2021 at 12:28:02 PM UTC-4 Landon Yarrington wrote:
>
> I'm trying to process block quotes in a way such that the following
> paragraph directly after a block quote is styled as a continuation of the
> paragraph in which the blockquote is nested. I tried several different
> styles, but cannot seem to achieve this. I almost filed an issue on GH, but
> thought twice :-)
>
> I'm using pandoc 2.15 with the following command.
>
> `pandoc -N -t docx -f
> markdown+markdown_attribute+mmd_link_attributes+simple_tables+multiline_tables+auto_identifiers+table_captions+yaml_metadata_block+raw_attribute+implicit_figures+latex_macros+header_attributes
> --reference-doc=ref_template.docx example.md -o TEST_example.docx`
> Is this a user-error, a problem with my ref_template.docx, or what?
>
> And here's `example.md`
> ````
> # Heading1
>
> Here's some text. Here's some text. Here's some text. Here's some text.
> Here's some text. Here's some text. Here's some text. Here's some text.
> Here's some text. Here's some text. Here's some text. Here's some text.
> Here's some text. Here's some text. Here's some text. Here's some text.
> Here's some text. Here's some text. Here's some text. Here's some text.
> Here's some text. Here's some text. Here's some text.
>
> Here's some text. Here's some text. Here's some text. Here's some text.
> Here's some text. Here's some text. Here's some text. Here's some text.
> Here's some text. Here's some text. Here's some text. Here's some text.
>
> ## Heading 2
>
> Here's some text. Here's some text. Here's some text. Here's some text.
> Here's some text. Here's some text. Here's some text. Here's some text.
> Here's some text.
>
> Here's some text. Here's some text. Here's some text. Here's some text.
> Here's some text. Here's some text.
>
> > Block quote time. Block quote time. Block quote time. Block quote time.
> Block quote time. Block quote time. Block quote time. Block quote time.
> Block quote time. Block quote time. Block quote time. Block quote time.
> Block quote time. Block quote time. Block quote time. Block quote time.
> Block quote time. Block quote time. Block quote time.
>
> Back to the text. Back to the text. Back to the text. Back to the text.
> Back to the text.
>
> Here's some text. Here's some text. Here's some text. Here's some text.
> Here's some text. Here's some text. Here's some text. Here's some text.
> Here's some text. Here's some text.
> ````
>
> --
> 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 [1]pandoc-discus...@googlegroups.com.
> To view this discussion on the web visit [2]https://groups.google.com/d/msgid/
> pandoc-discuss/86c4d6cd-4ea3-41ad-aae9-c301f049a2can%40googlegroups.com.
>
> References:
>
> [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [2] https://groups.google.com/d/msgid/pandoc-discuss/86c4d6cd-4ea3-41ad-aae9-c301f049a2can%40googlegroups.com?utm_medium=email&utm_source=footer

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/1b625016-e8cd-4400-9492-fae034e235d8n%40googlegroups.com.