Use case or problem
When using Pandoc to export a page to DocX, it does not pass in to Pandoc the currently selected CSS theme. The result is that the DocX does not reflect the CSS colors (I.E. Code blocks)
Proposed solution
Simply add the “-s .css” to the call to Pandoc
Current workaround (optional)
The only workaround I could find was to call Pandoc from the command line and pass in my CSS Theme from inside my selected .obsidian directory.
@John_Howell Does it have any effect if you call pandoc from the command line and pass your CSS to pandoc as described in your workaround?
On the command line, passing the CSS via the “-s” parameter works as expected. Font colors appear in the exported DocX as they do in the UI.
That’s interesting! I always assumed, that pandoc uses --reference-doc
option to specify style reference when producing DOCX, ODT and PPTX files, as described in Pandoc User’s Guide.