Pandoc , how to attach files from markdown to docx - pandoc

I write my notes in markdown with some links to local files
Is there a way to attach these files while converting from markdown to docx ?
thanks

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

Convert from slidy to powerpoint with pandoc or something else?

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.

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.

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.

How to do a link to a file in rst with sphinx?

I am writing a documentation and I would like to include links to pdf files or zip archives. How can I achieve that using rst language and sphinx ?
If I do that
here is a pdf file : `pdf <doc/mypdf.pdf>`_
It does not work because, during the compilation sphinx do not copy the contains of the doc directory (I use the makefile generated by sphinx-quickstart).
On the contrary, using the image directive :
.. image:: img/plop.png
sphinx does copy the plop.png image in build directory. How can I obtain the same behavior for pdf or zip archive ?
A solution is to use the :download: “role” (detailed in the sphinx documentation on roles).
Here is a short example assuming you have a file mypdf.pdf in a directory doc. The directory doc and your rst file must be in the same directory:
here is a pdf file :download:`pdf <doc/mypdf.pdf>`
Note that you mustn't put a blank space between :download: and the path to the file.
The image directive also works for PDF files.
.. image:: doc/mypdf.pdf

Resources