1

When converting a latex file to word, I'd like to skip some sections which Pandoc does not handle well, or redefine commands which pandoc does not understand. Now I use the following highly unelegant mechanism:

\iffalse
    % code executed by pandoc only
    \def\SI#1#2{#1\,\mathrm{#2}}
\fi

What is the correct way make pandoc execute (or skip) some sections of code?

Roel
  • 197
  • 8

1 Answers1

1

I guess it is not available now. There is another post open and not answered yet. And I found also an open issue for this behavior.

  • Thanks, That issue indeed seems to raise a similar issue. I've added my finings there. – Roel Sep 20 '20 at 22:51
  • Ah, so probably adding the code I want to be executed in another file and running that previous to the main file will solve it. I wasn't aware of that. At least I can hack something together that does not exploit missing functionality in pandoc – Roel Sep 20 '20 at 22:53