Convert from slidy to powerpoint with pandoc or something else? - powerpoint

I'd like to convert a slidy presentation to powerpoint. I tried using pandoc:
pandoc -f html+tex_math_dollars+tex_math_single_backslash test.html -o test.pptx
Does create a powerpoint file, but the file doesn't have separate slides, all the text is one slide, probably because the above command doesn't tell pandoc to recognize that the html is slidy.
I found commands for pandoc to convert TO slidy but nothing about converting FROM slidy.

Related

Pandoc .docx to .md with math and images

I am trying to export .docx file to a .md file with math and images. However, only the image is present on the new file, but not the math in mathjax. Any idea how to solve this?
The code I use is: pandoc --extract-media=.-s file.docx -t markdown -o file.md

pandoc command param --epub-cover-image generate fail

I wanna generate docx from markdown files ,and insert into the conver picture, From pandoc metada , I can use --epub-cover-image.
My directory :
then command:
pandoc -s a.md b.md c.md -o example.docx --epub-cover-image cover.png
It generate example.docx file, but the cover.png does not insert into the docx file ?
Quoting the pandoc manual section on --epub-cover-image:
Use the specified image as the EPUB cover.
Since you are not generating a EPUB ebook but a docx word file, the option has simply no effect.

Left-align text when converting from md to pdf

I'm converting a markdown file to pdf with:
pandoc -o out.pdf in.md
The results are justified alignment, a pet hate. Is there any way to render regular text as left-aligned instead? Nothing appears in help for 'left' or 'align'..
You could use the latex package ragged2e.
For one document
Add this to your yaml front matter:
---
header-includes:
- \usepackage[document]{ragged2e}
---
For all documents
Edit your pandoc latex template; to create it:
pandoc -D latex > ~/.pandoc/templates/default.latex
Then open the file and add somewhere before the \begin{document}:
\usepackage[document]{ragged2e}

How to split Pandoc template files into sub files

I would like to be able to split Pandoc template files into sub files using the \input{path-to-file} in the template file. When I use the \input command, I get the following error message when running pandoc -o output.pdf --template=default.latex --latex-engine=lualatex:
! LaTeX Error: Missing \begin{document}.
How do I properly split pandoc template files?
I think this is not possible to achieve with Pandoc. I choose to switch to Panzer, a project which combines Pandoc with styles.

use pandoc to embed images into a docx file that are in a HTML

Is it possible to embed images into a docx file that are embedded in a HTML file?
I am trying and it's not working for me, and perhaps I am not adding some extra parameter when I am running pandoc.
pandoc -f html -t docx -o testdoc.docx image.html
Thank you very much!
I managed to solve this by executing the following command:
pandoc -s file_name.html -o file_name.docx;
There are actually 2 important points that you need to consider:
The quality of the output file is pretty much related to how pandoc interpret your HTML file, so that if the source was pretty complex then you wouldn't really expect a pretty good quality output, for instance the <hr/> tag is not recognized by pandoc, while the <p> tag is.
The path of the image is not an HTTP path but instead it is a full desk path, meaning:
This is NO good:
<img src="http://www.example.com/images/img.jpg" />
And This is what pandoc can really read:
<img src="/var/www/example.com/images/img.jpg" />
HTH

Resources