xxks-kkk / sphinxcontrib-pseudocode

A sphinx-doc extension that allows you to write LaTeX algorithm directly inside sphinx-doc
Other
10 stars 3 forks source link

Cannot display pseudo-code correctly #18

Open LuciusMos opened 2 years ago

LuciusMos commented 2 years ago

Hi, thank you very much for developing such a useful tool.

However, I copied the quicksort example, but it cannot display correctly:

image

I have:

Besides, my sphinx related libraries versions are:

sphinx-autobuild==2021.3.14
sphinx-autodoc-typehints==1.11.1
sphinx-copybutton==0.5.0
sphinx-jinja2-compat==0.1.2
sphinx-markdown-tables==0.0.15
sphinx-prompt==1.5.0
sphinx-rtd-theme==1.0.0
sphinx-tabs==3.2.0
sphinx-toolbox==2.18.1
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-httpdomain==1.8.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-pseudocode==0.7.0
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
xxks-kkk commented 2 years ago

@LuciusMos Thanks for the kind words. There are two ways to troubleshoot:

  1. You can inspect the web page and see what's the rendering errors are.
  2. You can checkout docs of this repo, which itself is a sphinx-doc containing demos of the extension. You can try to incrementally add your other extensions and see if there is any conflict. Please let me know if you identified any. I'm happy to take a closer look.
TheAxeC commented 2 years ago

It seems that numfig = True is a necessity within the conf.py file

If you remove that line from the docs of this repo (line 112 in the conf.py file), it will also stop working.

TheAxeC commented 2 years ago

In addition, there seems to be an issue when Sphinx imports (or automatically finds) rst files.

For example, in the docs from this repo, the page generated for demo.rst will not properly work (only the base index.html works) even though demo.rst gets included within index.rst.

njulhy commented 2 years ago

It seems that numfig = True is a necessity within the conf.py file

If you remove that line from the docs of this repo (line 112 in the conf.py file), it will also stop working.

solved my problem, thx

igormcoelho commented 1 year ago

I can confirm that numfig = True in conf.py also solved my problem. Thanks!