Thank you so much for posting this filter that converts the paragraph after block quote to Body Text 2! It worked great for me. But: I also have other element environments (e.g. equations) that I'd like to suppress indents after when I use pandoc to compile md to docx. I couldn't get your complex paragraphs filter to work for me. However, I'm already used to writing "\noindent" from my LaTeX days (and it helps to have that if I want to compile md to tex anyway). Would it be possible to write a filter that assigns the Block Text 2 style to every paragraph that starts with "\noindent"? On Wednesday, October 27, 2021 at 11:57:34 AM UTC-5 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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/bc83b25d-d676-4582-ba04-830e3f378c2an%40googlegroups.com.