htmlcsspython-sphinxrestructuredtext

How to write multipe math equations inline on a single line in Sphinx


I want to write a simple line as below in my Sphinx reST document:
enter image description here

To write the line using :math: flag:

We know that :math:`A \to B \vdash A \to \forall x B`, provided that :math:`x` is not free in :math:`A`.

The appearance shown in browser after make html:

enter image description here

How can make it a one line without line break?
I want to tune the line with restructuredtext grammar to get the desired appearnce ,instead of tune the html or css code.

I have installed Furo as my default theme, try to write logic formula :

math formula
===================
p1:

We know that :math:`A \to B \vdash A \to \forall x B`, provided that :math:`x` is not free in :math:`A`.


p2:

.. raw:: html

   <!DOCTYPE html>
   <html>
   <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width">
     <title>MathJax example</title>
   <script type="text/javascript" async
     src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML">
   </script>
   <script type="text/x-mathjax-config">
   MathJax.Hub.Config({
     tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},
   });
   </script>
   </head>
   <body>
   We know that `A \to B \vdash A \to \forall x B`, provided that `x` is not free in `A`.
   </body>
   </html>

The appearance:

enter image description here

If i delete the p2 part,all multipe math equations inline can't be on a single line shown in my browser:

enter image description here

How can fix it then?


Solution

  • Upgrade my sphinx to the latest version-8,inline math words do not have a break line.