The problem with publish LaTex formulas in confluence

77 Views Asked by At

I generate rst files containing formulas in latex, then try to upload them to confluence

Example: File main.rst consist the formulas

:math:`\sqrt{3x-1}+(1+x)^2`

The conf file.py is located in the docs folder

Its contents

extensions = [
    'sphinxcontrib.confluencebuilder',
    'sphinxcontrib.katex'
]

confluence_publish = True
confluence_space_key = '~user'
confluence_parent_page = 'Test rst generate'
confluence_server_url='https://confluence.com'
confluence_page_hierarchy = True
confluence_page_generation_notice = True
confluence_prev_next_buttons_location = 'top'
confluence_server_user='username'
confluence_server_pass='password'

I run it with the command

sphinx-build -b confluence docs _build/confluence

output:

Running Sphinx v7.2.6
WARNING: normalizing confluence url from https://confluence.com/ 
building [mo]: targets for 0 po files that are out of date
writing output... 
building [confluence]: targets for 2 source files that are out of date
reading sources... [100%] main
looking for now-outdated files... none found
checking consistency... done
preparing documents... WARNING: title conflict detected with 'index' and 'main'
WARNING: LaTeX command 'latex' cannot be run (needed for math display), check the imgmath_latex setting
done
copying assets... done
writing output... [100%] main
WARNING: ignoring node since no latex macro configured
WARNING: ignoring node since no latex macro configured
publishing documents... [100%] main
building intersphinx... done
publishing assets... [100%] objects.inv
Publish point: https://confluence.com/viewpage.action?pageId=209333449
build succeeded, 5 warnings.

As a result, the formula is not displayed

0

There are 0 best solutions below