\hdots 的定位

\hdots 的定位

我希望 two\hdots位于两个 = 之间,并且还希望 the\vdots位于最后一行下方。此外,我希望标记(等式的数字)不位于其下方。

我不被允许改变的价值BCOR

你有什么想法吗?谢谢!

\documentclass[12pt,twoside,parskip=half-,numbers=noenddot,BCOR=8mm,headheight=29pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}

%MATHEMATIK
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{amsthm}

\begin{document}
\begin{equation}\label{eqn:1}
\begin{alignedat}{3}
&c_{0}&&=P(Q(0))&&=a_{0}\\
&c_{1}&&=P^{\prime}(Q(0))Q^{\prime}(0)&&=a_{1}b_{1}\\
&c_{2}&&=\frac{P^{\prime\prime}(Q(0))Q^{\prime}(0)^{2}+P^{\prime}(Q(0))Q^{\prime\prime}(0)}{2}&&=a_{2}b_{1}^{2}+a_{1}b_{2}\\
&c_{3}&&=\hdots&&=a_{3}b_{1}^{3}+2a_{2}b_{1}b_{2}+a_{1}b_{3}\\
&c_{4}&&=\hdots&&=b_{1}^{2}(a_{4}b_{1}^{2}+3a_{3}b_{2})+a_{2}(b_{2}^{2}+2b_{1}b_{3})+a_{1}b_{4}\\[-1ex]
\multispan{3}\hfill\vdots\hfill
\end{alignedat}
\end{equation}
\end{document}

答案1

除非您拆分最宽的术语之一并且右下角的术语是唯一的候选者,否则您无法让显示适合给定的文本宽度。

您只需要两对列,alignedat然后就可以使用\multispan技巧进行居中:

\documentclass[12pt,twoside,parskip=half-,numbers=noenddot,BCOR=8mm,headheight=29pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}

%MATHEMATIK
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{amsthm}

\begin{document}
\begin{equation}\label{eqn:1}
\begin{alignedat}{2}
c_{0}&=P(Q(0))&&=a_{0}\\
c_{1}&=P'(Q(0))Q'(0)&&=a_{1}b_{1}\\
c_{2}&=\frac{P''(Q(0))Q'(0)^{2}+P'(Q(0))Q''(0)}{2}&&=a_{2}b_{1}^{2}+a_{1}b_{2}\\
c_{3}&\multispan{1}${}=\hfill\cdots\hfill$&&=a_{3}b_{1}^{3}+2a_{2}b_{1}b_{2}+a_{1}b_{3}\\
c_{4}&\multispan{1}${}=\hfill\cdots\hfill$&&=
  \!\begin{aligned}[t]
  &b_{1}^{2}(a_{4}b_{1}^{2}+3a_{3}b_{2})\\
  &\qquad+a_{2}(b_{2}^{2}+2b_{1}b_{3})+a_{1}b_{4}
  \end{aligned}
\\[-1ex]
\multispan{4}\hfill\vdots\hfill
\end{alignedat}
\end{equation}
\end{document}

在此处输入图片描述

以下是我排版显示的方式。

\documentclass[12pt,twoside,parskip=half-,numbers=noenddot,BCOR=8mm,headheight=29pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}

%MATHEMATIK
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{amsthm}

\begin{document}
\begin{equation}\label{eqn:1}
\begin{aligned}
c_{0}&=P(Q(0))\\
     &=a_{0}\\[1ex]
c_{1}&=P'(Q(0))Q'(0)\\
     &=a_{1}b_{1}\\[1ex]
c_{2}&=\frac{P''(Q(0))Q'(0)^{2}+P'(Q(0))Q''(0)}{2}\\
     &=a_{2}b_{1}^{2}+a_{1}b_{2}\\[1ex]
c_{3}&=\cdots\\
     &=a_{3}b_{1}^{3}+2a_{2}b_{1}b_{2}+a_{1}b_{3}\\
c_{4}&=\cdots\\
     &=b_{1}^{2}(a_{4}b_{1}^{2}+3a_{3}b_{2})+a_{2}(b_{2}^{2}+2b_{1}b_{3})+a_{1}b_{4}
\\[-1ex]
&\vdotswithin{=}
\end{aligned}
\end{equation}
\end{document}

在此处输入图片描述

答案2

由于这看起来像是一个单一的案例,而不是需要一般用例解决方案的案例,因此我认为离散使用\hspace{}是一种合理的方法,可以根据特定需求进行调整。

我使用堆栈将最后一个方程分成两行来解决了宽度问题。

\documentclass[12pt,twoside,parskip=half-,numbers=noenddot,BCOR=8mm,headheight=29pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}

%MATHEMATIK
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{amsthm}
\usepackage{stackengine}
\stackMath
\begin{document}
\begin{equation}\label{eqn:1}
\renewcommand\stackalignment{r}
\begin{alignedat}{3}
&c_{0}&&=P(Q(0))&&=a_{0}\\
&c_{1}&&=P^{\prime}(Q(0))Q^{\prime}(0)&&=a_{1}b_{1}\\
&c_{2}&&=\frac{P^{\prime\prime}(Q(0))Q^{\prime}(0)^{2}+P^{\prime}(Q(0))Q^{\prime\prime}(0)}{2}&&=a_{2}b_{1}^{2}+a_{1}b_{2}\\
&c_{3}&&={}\hspace{77pt}\hdots&&=a_{3}b_{1}^{3}+2a_{2}b_{1}b_{2}+a_{1}b_{3}\\
&c_{4}&&={}\hspace{77pt}\hdots&&=b_{1}^{2}(a_{4}b_{1}^{2}+3a_{3}b_{2})+a_{2}(b_{2}^{2}+\stackunder[5pt]{2b_{1}b_{3}}{+a_{1}b_{4}})\\[-1ex]
& &&\rlap{\hspace{186pt}\vdots}&&
\end{alignedat}
\end{equation}
\centering x\\to test for centering
\end{document}

在此处输入图片描述

答案3

您可以使用以下方法\makebox来创建正确宽度的框:

在此处输入图片描述

方程式编号低于的原因是您的方程式太宽,无法容纳方程式编号(如包的使用所示showframe)。

您可以应用\mathrlap最后一行的一部分:

&c_{4}&&=\hcenteredDots&&=b_{1}^{2}(a_{4}b_{1}^{2}+3a_{3}b_{2})+a_{2}(b_{2}^{2}+2b_{1}b_{3})+\mathrlap{a_{1}b_{4}}\\

然后等式数字将不会在下面:

在此处输入图片描述

代码:

\documentclass[12pt,twoside,parskip=half-,numbers=noenddot,BCOR=8mm,headheight=29pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}

%MATHEMATIK
\usepackage{amssymb}
%\usepackage{amsmath}% <-- included in mathtools
\usepackage{mathtools}
\usepackage{amsthm}

\usepackage{showframe}
\newcommand*{\Widest}{\frac{P^{\prime\prime}(Q(0))Q^{\prime}(0)^{2}+P^{\prime}(Q(0))Q^{\prime\prime}(0)}{2}}%
\newcommand*{\hcenteredDots}{\makebox[\widthof{$\displaystyle\Widest$}][c]{$\dotsb$}}

\begin{document}
\begin{equation}\label{eqn:1}
\begin{alignedat}{3}
&c_{0}&&=P(Q(0))&&=a_{0}\\
&c_{1}&&=P^{\prime}(Q(0))Q^{\prime}(0)&&=a_{1}b_{1}\\
&c_{2}&&=\Widest&&=a_{2}b_{1}^{2}+a_{1}b_{2}\\
&c_{3}&&=\hcenteredDots&&=a_{3}b_{1}^{3}+2a_{2}b_{1}b_{2}+a_{1}b_{3}\\
&c_{4}&&=\hcenteredDots&&=b_{1}^{2}(a_{4}b_{1}^{2}+3a_{3}b_{2})+a_{2}(b_{2}^{2}+2b_{1}b_{3})+a_{1}b_{4}\\%[-1ex]
& && &&\makebox[\widthof{=}][r]{\vdots}
\end{alignedat}
\end{equation}
\end{document}

相关内容