Latex maths to docx

Hello there.

I am hoping someone can help me with a puzzle on compiling latex equations to *.docx.

The problem seems to be how $$ … $$ is being parsed in my markdown to docx workflow with custom pandoc. Essentially, it all used to work fine – and now it doesn’t! And I can’t figure out, or remember, what has changed to unpick it!

The puzzle is that while $$ … $$ no longer works, inline maths “$ … $” does! So, I assume that it is not is not the pandoc command. I’ve looked through the compile settings, particularly the maths block in the styles section, but that still has the $$ prefix and suffix ticked to register as raw latex.

If I try to compile to HTML, it writes the maths block where there is a latex environment but retains the $$ (eg \begin{aligned}. If the block is just between ( $$ … $$), then it doesn’t translate (just like in word).

I don’t recall altering any settings, But - I guess - I must have.

I hope someone can help

Moved to the Markdown & LaTeX forum, which is likely to draw more helpful responses. – Katherine

There aren’t any native settings in Scrivener that would modify how this works, so the stuff that you set up with styles (and replacements is another thing worth double-checking) is going to be where to look.

Of course you can always double-check the correctness of the output, and potentially eliminate Scrivener and your settings from any troubleshooting investigation, by compiling to plain “MultiMarkdown” using the “Basic Pandoc” compile format in the sidebar. If that looks clean, then set your custom format to use plain MMD as well, and make sure the “Pandoc syntax” option is ticked in the Processing pane, for it. If that looks fine, all double-dollar-signs in place, then you’re looking at the end of the chain as far as Scrivener’s processing of the data goes. After it makes the text file you’re looking at, it passes it along to Pandoc just like you see it.

So that should always be step one when trying to figure out where a link in the chain got broken.