\raisebox 内 \baselineskip 的自动缩放

\raisebox 内 \baselineskip 的自动缩放

我最近问了一个问题得到了一个伟大的回答但答案的有效性相当有限,因为它似乎就像每次我想要实施解决方案时,我都必须“目测”正确的垂直对齐方式。例如,考虑这张图片:

在此处输入图片描述

代码:

\documentclass{exam}
\usepackage{amsmath}
\usepackage{tabularx}

\begin{document}

\begin{figure}[ht]
\begin{tabularx}{\linewidth}{@{}l>{\hsize=0.6\hsize}X |
                                 >{\hsize=0.3\hsize}X 
                             @{} }
    \hline 
 (a) &   $\begin{aligned}[t]
    f(x) & = 6\biggl[1-\frac{x}{3} + \frac{x^2}{2!3^2}-\frac{x^3}{3!3^3}+
            \cdots+\frac{(-1)^n x^n}{n!3^n}+\cdots\biggl]   \\
         &= 6-2x+\frac{x^2}{3}-\frac{x^3}{27}+\cdots+\frac{6(-1)^nx^n}{n!3^n}+\cdots
        \end{aligned}$ 

    &   \raisebox{-0.8\baselineskip}{$3:\begin{cases}
        1 : & \text{two of}\ 6, -2x, \frac{x^2}{3}, -\frac{x^3}{27}\\
        1 : & \text{remaining terms}\\
        1 : & \text{general term}
        \end{cases}$}
        \vspace{1ex}

        $\langle -1\rangle$ missing factor of 6\\[2em]
\hline
(b) & $g(0)=0$ and $g'(x)=f(x)$, so\newline

$\begin{aligned}[t]
g(x)
&= 6\biggl[x-\frac{x^2}{6}+\frac{x^3}{3!3^2}-\frac{x^4}{4!3^3}+
\cdots+\frac{(-1)^n x^{n+1}}{(n+1)!3^n}+\cdots\biggl]\\ 
&= 6x-x^2+\frac{x^3}{9}-\frac{x^4}{4(27)}+\cdots+
\frac{6(-1)^nx^{n+1}}{(n+1)!3^n}+\cdots
        \end{aligned}$ 

    &   \raisebox{-1.4\baselineskip}{$3:\begin{cases}
        1 : & \text{two terms}\\
        1 : & \text{remaining terms}\\
        1 : & \text{general term}
        \end{cases}$}
        \vspace{1ex}

        $\langle -1\rangle$ missing factor of 6\\
\hline
(c) & $f'(x)=-2e^{-x/3}$, so $h(x)=-2ke^{-ax/3}$\newline
$h(x)=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\cdots+\frac{x^n}{n!}+\cdots=e^x$\newline
$-2ke^{-ax/3}=e^x$\newline
$\frac{-a}{3}=1$ and $-2k=1$\newline
$a=-3$ and $k=-\frac{1}{2}$

\begin{center}OR\end{center}

$f'(x)=-2+\frac{2}{3}x+\cdots$, so\newline
$h(x)=kf'(ax)=-2k+\frac{2}{3}akx+\cdots$\newline
$h(x)=1+x+\cdots$\newline
$-2k=1$ and $\frac{2}{3}ak=1$\newline
$k=-\frac{1}{2}$ and $a=-3$

    &   \raisebox{-2.3\baselineskip}{$3:\begin{cases}
        1 : & \text{two terms}\\
        1 : & \parbox[t]{.3\columnwidth}{recognizes 
$h(x)=e^x$,\\\null\quad or\\equations 2 series for $h(x)$}\\
        1 : & \text{general term}
        \end{cases}$}

\end{tabularx}
\end{figure}

\end{document}

我的问题:有没有办法让 LaTeXC在使用时自动计算“正确值”\raisebox{-C\baselineskip}以确保垂直对齐正确?我不想hrule每次都添加一个,然后cases根据目测方法调整一个。有什么建议可以以原则性的方式解决这个问题吗?

答案1

在此处输入图片描述

\documentclass{exam}
\usepackage{amsmath}
\usepackage{tabularx}

\begin{document}

\begin{figure}[ht]
\begin{tabularx}{\linewidth}{@{}
                                 >{\hsize=0.05\hsize\mbox{}\endgraf}X
                                 >{\hsize=0.60\hsize\mbox{}\endgraf\vspace{-.5\baselineskip}}X |
                                 >{\hsize=0.35\hsize\mbox{}\endgraf\vspace{-.5\baselineskip}}X 
                             @{} }
    \hline 
 (a) &   $\begin{aligned}[t]
    f(x) & = 6\biggl[1-\frac{x}{3} + \frac{x^2}{2!3^2}-\frac{x^3}{3!3^3}+
            \cdots+\frac{(-1)^n x^n}{n!3^n}+\cdots\biggl]   \\
         &= 6-2x+\frac{x^2}{3}-\frac{x^3}{27}+\cdots+\frac{6(-1)^nx^n}{n!3^n}+\cdots
        \end{aligned}$ 

    &   $3:\begin{cases}
        1 : & \text{two of}\ 6, -2x, \frac{x^2}{3}, -\frac{x^3}{27}\\
        1 : & \text{remaining terms}\\
        1 : & \text{general term}
        \end{cases}$

        \vspace{1ex}

        $\langle -1\rangle$ missing factor of 6\\[2em]
\hline
(b) & $g(0)=0$ and $g'(x)=f(x)$, so\newline

$\begin{aligned}[t]
g(x)
&= 6\biggl[x-\frac{x^2}{6}+\frac{x^3}{3!3^2}-\frac{x^4}{4!3^3}+
\cdots+\frac{(-1)^n x^{n+1}}{(n+1)!3^n}+\cdots\biggl]\\ 
&= 6x-x^2+\frac{x^3}{9}-\frac{x^4}{4(27)}+\cdots+
\frac{6(-1)^nx^{n+1}}{(n+1)!3^n}+\cdots
        \end{aligned}$ 

    &   $3:\begin{cases}
        1 : & \text{two terms}\\
        1 : & \text{remaining terms}\\
        1 : & \text{general term}
        \end{cases}$

        \vspace{1ex}

        $\langle -1\rangle$ missing factor of 6\\
\hline
(c) & $f'(x)=-2e^{-x/3}$, so $h(x)=-2ke^{-ax/3}$\newline
$h(x)=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\cdots+\frac{x^n}{n!}+\cdots=e^x$\newline
$-2ke^{-ax/3}=e^x$\newline
$\frac{-a}{3}=1$ and $-2k=1$\newline
$a=-3$ and $k=-\frac{1}{2}$

\begin{center}OR\end{center}

$f'(x)=-2+\frac{2}{3}x+\cdots$, so\newline
$h(x)=kf'(ax)=-2k+\frac{2}{3}akx+\cdots$\newline
$h(x)=1+x+\cdots$\newline
$-2k=1$ and $\frac{2}{3}ak=1$\newline
$k=-\frac{1}{2}$ and $a=-3$

    &  $3:\begin{cases}
        1 : & \text{two terms}\\
        1 : & \parbox[t]{.3\columnwidth}{recognizes 
$h(x)=e^x$,\\\null\quad or\\equations 2 series for $h(x)$}\\
        1 : & \text{general term}
        \end{cases}$

\end{tabularx}
\end{figure}

\end{document}

相关内容