尽管已经至少有一个具有相同标题的问题,但我相信没有一个问题对应于同一个问题。
以下代码片段就是问题所在:第二个方程式没有居中显示。您可以在下面的屏幕截图中看到结果。
\documentclass[a4paper,14pt,twoside,reqno]{extbook}
\usepackage[tmargin=28mm,bmargin=28mm,lmargin=28mm,rmargin=28mm]{geometry}
\usepackage{amsmath, amsfonts,amssymb,epsfig,amstext,amsthm,mathpazo, xfp, latexsym}
\begin{document}
\begin{equation}\label{3.0.10}
\fcolorbox{gray}{gray!10}{$ \displaystyle
\begin{split}
x_{42} &\equiv \dfrac{(x_{41} y_{11} - x_{11} y_{41})(y_{11} - y_{41})}{(x_{11} - x_{41})^2 + (y_{11} - y_{41})^2}\\
y_{42} &\equiv \dfrac{(x_{41} y_{11} - x_{11} y_{41})(x_{41} - x_{11})}{(x_{11} - x_{41})^2 + (y_{11} - y_{41})^2}
\end{split}$}
\end{equation}
\\
after 3 iterations and very long algebraic simplifications, we get:
\\
\begin{equation}\label{3.0.11}
\fcolorbox{gray}{gray!10}{$ \displaystyle
\begin{split}
s_{14}^2 = & \frac{(x_{21} y_{31} - x_{31} y_{21})^2}{(x_{31} - x_{21})^2 + (y_{31} - y_{21})^2} \cdot\\
\cdot & \frac{(x_{31} y_{41} - x_{41} y_{31})^2}{(x_{41} - x_{31})^2 + (y_{41} - y_{31})^2} \cdot \\
\cdot & \frac{1}{\left(x_{21}^2 + y_{21}^2\right) \left(x_{31}^2 + y_{31}^2\right)\left(x_{41}^2 + y_{41}^2\right)} \cdot \\
\cdot & \frac{1}{(x_{21} - x_{11})^2 + (y_{21} - y_{11})^2}\cdot\\
\cdot & \frac{\lambda_4'^2}{(x_{11} - x_{41})^2 + (y_{11} - y_{41})^2}
\end{split}$}
\end{equation}
\end{document}
\
编辑 1 __________________________________________________________________
我之前省略了几个包;现在我把它们都包括了。但我不认为这是问题所在,因为在文档中我有很多类似的方程式,而这个问题没有出现;这很奇怪。
显然,我可以手动修复它,但我想知道为什么会发生这种情况。
谢谢 David Carlisle 的回复;我已经删除了 epsfig 包;我真的不记得我为什么要再包含它了。我按照示例或建议包含了这些包,但我不知道它们是如何工作的,也不知道除了由于可能的不兼容性而消耗资源之外,它们可能存在哪些问题。因此,在这方面的任何建议都会受到欢迎。
\documentclass[a4paper,14pt,twoside,reqno]{extbook}
\usepackage[tmargin=28mm,bmargin=28mm,lmargin=28mm,rmargin=28mm]{geometry}
\usepackage{amsmath, amsfonts,amssymb,amstext,amsthm,mathpazo, xfp, latexsym}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage{geometry}
\usepackage{cite}
\usepackage{times}
\usepackage[usenames]{color}
\usepackage[dvipsnames]{xcolor}
\usepackage{pstricks}
\usepackage{tikz, ifthen, bclogo}
\usepackage{pst-poly}
\usepackage{pst-all}
\usetikzlibrary{decorations.fractals,calc} \usetikzlibrary{arrows,calc,patterns,shadows,petri,decorations.markings,shapes,trees}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{lindenmayersystems}
\usepackage{latexsym, graphicx}
\usepackage{subfigure}
\usepackage[thicklines, makeroom]{cancel}
\usepackage{verbatim}
\usepackage{wasysym}
\usepackage{stmaryrd, scalerel, stackengine}
\usepackage{pifont}
\usepackage{calligra}
\usepackage{mathtools}
\usepackage{titlesec}
\usepackage{underoverlap}
\usepackage{mathtools}
\usepackage{etoolbox} %Definition of bcancelto
\begin{document}
\begin{equation}\label{3.0.10}
\fcolorbox{gray}{gray!10}{$ \displaystyle
\begin{split}
x_{42} &\equiv \dfrac{(x_{41} y_{11} - x_{11} y_{41})(y_{11} - y_{41})}
{(x_{11} - x_{41})^2 + (y_{11} - y_{41})^2}\\
y_{42} &\equiv \dfrac{(x_{41} y_{11} - x_{11} y_{41})(x_{41} - x_{11})}
{(x_{11} - x_{41})^2 + (y_{11} - y_{41})^2}
\end{split}$}
\end{equation}
after 3 iterations and very long algebraic simplifications, we get:\\
\begin{equation}\label{3.0.11}
\fcolorbox{gray}{gray!10}{$ \displaystyle
\begin{split}
s_{14}^2 = & \frac{(x_{21} y_{31} - x_{31} y_{21})^2}{(x_{31} - x_{21})^2
+ (y_{31} - y_{21})^2} \cdot\\
\cdot & \frac{(x_{31} y_{41} - x_{41} y_{31})^2}{(x_{41} - x_{31})^2 +
(y_{41} - y_{31})^2} \cdot \\
\cdot & \frac{1}{\left(x_{21}^2 + y_{21}^2\right) \left(x_{31}^2 +
y_{31}^2\right)\left(x_{41}^2 + y_{41}^2\right)} \cdot \\
\cdot & \frac{1}{(x_{21} - x_{11})^2 + (y_{21} - y_{11})^2}\cdot\\
\cdot & \frac{\lambda_4'^2}{(x_{11} - x_{41})^2 + (y_{11} -
y_{41})^2}
\end{split}$}
\end{equation}
\end{document}
答案1
不要忽视警告!
\fcolorbox
您会收到未定义的错误,因此添加xcolor
包
您会收到一条警告,要求aligned
您不要使用split
,因此请更改split
为aligned
您会收到关于错误放置的 10000 的警告\\
,因此请删除这些,然后
也可以使用&=
not (或者如果您需要在 = 的右侧对齐,=&
则使用)={}&
\documentclass[a4paper,14pt,twoside,reqno]{extbook}
\usepackage[tmargin=28mm,bmargin=28mm,lmargin=28mm,rmargin=28mm]{geometry}
\usepackage{amsmath, amsfonts,amssymb,epsfig,amstext,amsthm,mathpazo, xfp, latexsym,xcolor}
\begin{document}
\begin{equation}\label{3.0.10}
\fcolorbox{gray}{gray!10}{$
\begin{aligned}
x_{42} &\equiv \dfrac{(x_{41} y_{11} - x_{11} y_{41})(y_{11} - y_{41})}{(x_{11} - x_{41})^2 + (y_{11} - y_{41})^2}\\
y_{42} &\equiv \dfrac{(x_{41} y_{11} - x_{11} y_{41})(x_{41} - x_{11})}{(x_{11} - x_{41})^2 + (y_{11} - y_{41})^2}
\end{aligned}$}
\end{equation}
after 3 iterations and very long algebraic simplifications, we get:
\begin{equation}\label{3.0.11}
\fcolorbox{gray}{gray!10}{$
\begin{aligned}
s_{14}^2 &= \frac{(x_{21} y_{31} - x_{31} y_{21})^2}{(x_{31} - x_{21})^2 + (y_{31} - y_{21})^2} \cdot\\
&\qquad \cdot \frac{(x_{31} y_{41} - x_{41} y_{31})^2}{(x_{41} - x_{31})^2 + (y_{41} - y_{31})^2} \cdot \\
&\qquad \cdot \frac{1}{\left(x_{21}^2 + y_{21}^2\right) \left(x_{31}^2 + y_{31}^2\right)\left(x_{41}^2 + y_{41}^2\right)} \cdot \\
&\qquad \cdot \frac{1}{(x_{21} - x_{11})^2 + (y_{21} - y_{11})^2}\cdot\\
&\qquad \cdot \frac{\lambda_4'^2}{(x_{11} - x_{41})^2 + (y_{11} - y_{41})^2}
\end{aligned}$}
\end{equation}
\end{document}