joostkremers / pandoc-mode

An Emacs minor mode for interacting with Pandoc.
https://joostkremers.github.io/pandoc-mode/
174 stars 14 forks source link

Exporting to pptx from org I do not get the equations inside the equation environment. Inside $$ everything works fine #108

Open falematte opened 2 years ago

joostkremers commented 2 years ago

This sounds like a problem with Pandoc, not pandoc-mode, so my suggestion would be to ask on the Pandoc mailing list:

https://groups.google.com/g/pandoc-discuss

falematte commented 2 years ago

Thank you for the answer. I do not think that this is a pandoc bug. Exporting the same file with ox-pandoc to pptx works fine. Equations are correctly exported. Probably they are using two different padoc options?

joostkremers commented 2 years ago

pandoc-mode only passes the options to Pandoc that you specify. If you don't specify any options, only the input and output formats and the output file are passed to Pandoc, nothing else.

You can check the exact Pandoc command that pandoc-mode issues in the log buffer, which you can display with C-/ L.

falematte commented 2 years ago

Got it! The point is that both the programs are calling the same pandoc version BUT in one equations environment are fine while.in the other not. Maybe some filters? Options? P.s I tried to paste the pandoc command from the pandoc mode log in my shell but it freezes...

joostkremers commented 2 years ago

Got it! The point is that both the programs are calling the same pandoc version BUT in one equations environment are fine while.in the other not. Maybe some filters? Options?

To compare, you'd have to find out what the exact command is that ox-pandoc sends. Unfortunately, I don't know how to do that. There are a number of ways to modify how Pandoc processes a file, options on the command line, a defaults file, a YAML code block, filters...

P.s I tried to paste the pandoc command from the pandoc mode log in my shell but it freezes...

It wasn't frozen, it was waiting for input. :slightly_smiling_face: By default, pandoc reads from stdin, pandoc-mode uses this to send the contents of the buffer to it. If you want to use it on the command line, you need to pass it the name of the file you're converting.

falematte commented 2 years ago

Thank you for the answer. I Paste below two pandoc "commands" the first one from "pandoc-mode" while the second from ox-pandoc. Could you please suggest me on how to set up "pandoc-mode" in order to have the same output?

pandoc --read=org --write=pptx --output=/home/Dropbox/neoass.pptx


Running pandoc with args: (-f org -t pptx -o /home/Dropbox/neoass.pptx --standalone

joostkremers commented 2 years ago

Thank you for the answer. I Paste below two pandoc "commands" the first one from "pandoc-mode" while the second from ox-pandoc. Could you please suggest me on how to set up "pandoc-mode" in order to have the same output?

It should be fairly self-explanatory: bring up the menu with C-c / and then search for the relevant option.

To help you find options more easily, the menu presents the options in the same categories that Pandoc's user guide does here. The option --standalone is under "Options | General Writer Options".

If you want to make this permanent (i.e., have this option applied automatically whenever you open the relevant file and set the output format to pptx), you need to save the settings. This is all explained in the pandoc-mode manual.

falematte commented 2 years ago

Thank you, I checked the standalone option but it is still not working... Any other possible options/filters?

joostkremers commented 2 years ago

Thank you, I checked the standalone option but it is still not working... Any other possible options/filters?

I assume you have checked the log buffer to make sure the pandoc command is correct? If so, I don't know why it doesn't work. What happens when you issue the command yourself from the command line?

The only other thing that comes to mind is that there may be some additional settings that are being used by ox-pandoc (like I said, Pandoc has a number of ways to specify settings), or perhaps ox-pandoc and pandoc-mode are finding different Pandoc versions (which I assume you've also checked, though.)

If all else fails, you could send me a sample Org file that shows the problem when converted with pandoc-mode. Perhaps that might help me debug this.