Dear Bastien
I investigated this matter and I ended up writing a special filter in LUA to read docx and convert styles to Latex. The reason is complex, but numbering paragraphs and refering to them is not replicated well in Latex. I am trying to use cross-references as bookmarks from Word as the \label \ref pair in Latex. I think I managed to do this through a filter

So here is what I accomplished:
- keep the numbering of all styles as they are converted by Pandoc by the -f styles option, except a list of special styles that are filtered differently
-special styles content is converted but not numbered.
- numbered lists are converted and adapted to enumerate packages in Latex. This is needed when a list element is refered to as a bookmark

I can post the Lua filter here if that is what people usually do.
Thanks for your input.
Best,
Ioan

On Thursday, October 26, 2023 at 11:49:05 AM UTC-5 Bastien DUMONT wrote:
> So is the -f docx+styles working with the docx reader, too? If so, how?

-f docx+styles means “use the docx reader and enable the ‘styles’ extension”, so yes! As is written in the manual, it renders the styles as divs and spans with a “custom-style” attribute. You will have to use a filter to convert some of these divs and spans to whatever code you want in your LaTeX file.

Or are you talking about customized lists, not custom styles?

--
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/b3c6042e-3843-4b0d-a431-bd8553c652d5n%40googlegroups.com.