If you're willing to use docx instead of ODT, you can take advantage of pandoc's support for Custom Styles and avoid the XML wrangling. You simply get a copy of the default reference doc with `pandoc -o custom-reference.docx --print-default- data-file reference.docx`, add a Rose style to `custom-reference.docx`, and give a `custom-style=Rose` attribute in Markdown to colored text.

On Monday, November 6, 2023 at 10:23:36 AM UTC-5 Kelly “STrRedWolf” Price wrote:
Hello all.  Using Pandoc to help convert my fiction (written in Markdown) into ODT format so I can combine and publish... but in writing, I found a specific use case.

I need colored text.

For instance, if I define a CSS stylesheet file to color said text, I can use this Markdown:

[Are the good guys really good if they use it for cover for evil?]{.rose}

I can work around it a bit by exporting to HTML (markdown_phpextra+bracketed_spans) and opening that into LibreOffice, but that opens a whole can of LibreOffice worms relating to web vs PDF/print formatting.

Is there a way for Pandoc to translate the CSS stylesheet into ODT styles, and apply said styles as wanted?

--
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/8f4c5470-82f5-44c8-8f17-3f807ccdbd11n%40googlegroups.com.