amedama41 / docxbuilder

Sphinx docx builder extension
https://pypi.org/project/docxbuilder/
MIT License
31 stars 13 forks source link

Images are not shown with matplotlib.sphinxext.plot_directive #22

Open olebole opened 1 year ago

olebole commented 1 year ago

Is this project still alive?

When I try to build docx documentation with matplotlib, the images are not included in the document. Complete example:

# docs/conf.py
project = '…'
extensions = [
    'matplotlib.sphinxext.plot_directive',
    "docxbuilder",
]
Simple matplotlib plot
----------------------

.. plot::

   import matplotlib.pyplot as plt
   plt.plot([1, 2, 3], [4, 5, 6])
   plt.title("A plotting exammple")

produces a warning:

writing... /home/oles/sphinxword/docs/index.rst:: WARNING: Failed to get filepath

The plot files are both in the build directory, and in the plot_directive subdirectory of the build directory. The HTML build works fine here.

cobhc999 commented 5 days ago

Could you solve this issue by yourslef?

olebole commented 4 days ago

Unfortunately not.