我想在一行中同时显示方程式和文本,但数学环境却占据了主导地位。我该怎么做才能在方程式显示中包含文本?
答案1
像这样:
代码:
\documentclass[italian,10pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}
Text with equation $E=mc^2$ followed by text and $x=\frac{\sqrt{x-1}}{x^+2}$.\\
Another line of text.
\end{document}
或者像这样:
代码:
\documentclass[italian,10pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}
Text with equation $E=mc^2$ followed by text and $x=\frac{\sqrt{x-1}}{x^+2}$.\\
Another line of text.\\
Equation with text:
\[ x=\frac{-b\pm\sqrt{b^2-4ac}}{2a} \quad\text{solution of:}\quad ax^2+bx+c=0\]
\end{document}