I want to write a simple line as below in my Sphinx reST document:
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
:
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:
If i delete the p2
part,all multipe math equations inline can’t be on a single line shown in my browser:
How can fix it then?
2
Answers
Upgrade my sphinx to the latest version-8,inline math words do not have a break line.
Whether you like it or not, the result of
make html
is HTML and CSS so the rendering will be fully controlled by the rules.Your snippet in reStructuredText is compiled to the following HTML elements,
So, when I use the Furo theme to test, the preview looks like this,
You see something differently, probably because the theme you chose aligns elements another way.