如何在一行中写出几个线性方程组并自动转换?
\begin{multline*}
\begin{split}
\begin{cases}
- x + 8y = -15\\
4x -4y = 32\\
\end{cases}
\end{split}
\end{multline*}
%
\begin{multline*}
\begin{split}
\begin{cases}
y = \cfrac{x-15}{8}\\
4x -4y = 32\\
\end{cases}
\end{split}
\end{multline*}
%
\begin{multline*}
\begin{split}
\begin{cases}
y = \cfrac{x-15}{8}\\
4x -4(\cfrac{x-15}{8}) = 32\\
\end{cases}
\end{split}
\end{multline*}
%
\begin{multline*}
\begin{split}
\begin{cases}
y = \cfrac{x-15}{8}\\
7x = 49\\
\end{cases}
\end{split}
\end{multline*}
%
\begin{multline*}
\begin{split}
\begin{cases}
y = -1\\
x = 7\\
\end{cases}
\end{split}
\end{multline*}
%
我想写下几个线性方程组,使它们从左到右、从上到下(求解线性方程组的一个例子),而不是一个接一个(默认)。
答案1
还有另一种解决方案,采用五个并行array
环境。
\documentclass{article}
\usepackage[letterpaper,margin=1in]{geometry}
\usepackage{array}
\newcommand\myarray[1]{%
\begingroup
\renewcommand\arraystretch{1.33}
\left\{ \begin{array}{@{}l@{}} #1 \end{array} \right.
\endgroup}
\begin{document}
\[
\myarray{-x + 8y = -15\\4x -4y = 32}
\Rightarrow
\myarray{y = \frac{1}{8}(x-15)\\4x -4y = 32}
\Rightarrow
\myarray{y = \frac{1}{8}(x-15)\\4x -\frac{4}{8}(x-15) =32}
\Rightarrow
\myarray{y = \frac{1}{8}(x-15)\\7x = 49}
\Rightarrow
\myarray{y = \frac{1}{8}(-8)=-1\\x = 7}
\]
Alternatively, without any \verb+\frac+ terms:
\[
\myarray{-x + 8y = -15\\4x -4y = 32}
\Rightarrow
\myarray{-x + 8y = -15\\x = 8+y}
\Rightarrow
\myarray{-8-y+8y=-15\\x = 8+y}
\Rightarrow
\myarray{7y=-7\\x = 8+y}
\Rightarrow
\myarray{y = -1\\x = 8+(-1)=7}
\]
\end{document}
答案2
以下是我对自动中断的建议:
\documentclass{article}
\usepackage{amsmath}
\newenvironment{multisys}
{\begin{minipage}{\displaywidth}
\lineskip=1ex
\leftskip=0pt plus 1fil
\rightskip=.15\displaywidth plus 1fill
\parfillskip=-.15\displaywidth plus -1fill
$}
{$\end{minipage}}
\newenvironment{system}
{\left\lbrace\renewcommand{\arraystretch}{1.2}\begin{array}{@{}l@{}}}
{\end{array}\right.\kern-\nulldelimiterspace}
\begin{document}
\[
\begin{multisys}
\begin{system}
- x + 8y = -15\\[2ex]
4x -4y = 32
\end{system}
\iff
\begin{system}
y = \dfrac{x-15}{8}\\[2ex]
4x -4y = 32
\end{system}
\iff
\begin{system}
y = \dfrac{x-15}{8}\\[2ex]
4x -4\left(\dfrac{x-15}{8}\right) = 32
\end{system}
\iff
\begin{system}
y = \dfrac{x-15}{8}\\[2ex]
7x = 49
\end{system}
\iff
\begin{system}
y = -1\\[2ex]
x = 7
\end{system}
\end{multisys}
\]
\end{document}
答案3
尝试使用它:
\left \{
\begin{tabular}{ccc}
- x + 8y = -15\\
4x -4y = 32\\
\end{tabular}
\Rightarrow
\left \{
\begin{tabular}{ccc}
- x + 8y = -15\\
4x -4y = 32\\
\end{tabular}
资源这里。
答案4
如果你想使用d风格分形tions,使用\dfrac
。\cfrac
是为C连续的分形tions。不过,我更喜欢米中型分形tion,,\mfrac
来自nccmath
。
像这样?
\documentclass{article}
\usepackage{mathtools}
\usepackage{nccmath}
\begin{document}
\begin{multline*}
\left\{\begin{matrix*}[l]
- x + 8y = -15\\
4x -4y = 32\\
\end{matrix*}\right.\Leftrightarrow\left\{\begin{matrix*}[l]
y = \mfrac{x-15}{8}\\[1ex]
4x -4y = 32\\
\end{matrix*}\right.\\
\Leftrightarrow\left\{\begin{matrix*}[l]
y = \mfrac{x-15}{8}\\[1ex]
4x -4\left(\mfrac{x-15}{8}\right) = 32\\
\end{matrix*}\right.\Leftrightarrow\left\{\begin{matrix*}[l]
y = \mfrac{x-15}{8}\\[1ex]
7x = 49\\
\end{matrix*}\right.\Leftrightarrow\left\{\begin{matrix*}[l]
y = -1\\
x = 7\\
\end{matrix*}\right.
\end{multline*}
\end{document}
推荐方法:
\documentclass{article}
\usepackage{mathtools}
\usepackage{nccmath}
\begin{document}
\begin{align*}
\left\{\begin{matrix*}[l]
- x + 8y = -15\\
4x -4y = 32\\
\end{matrix*}\right.&\Leftrightarrow\left\{\begin{matrix*}[l]
y = \mfrac{x-15}{8}\\[1ex]
4x -4y = 32\\
\end{matrix*}\right.\\
&\Leftrightarrow\left\{\begin{matrix*}[l]
y = \mfrac{x-15}{8}\\[1ex]
4x -4\left(\mfrac{x-15}{8}\right) = 32\\
\end{matrix*}\right.\\
&\Leftrightarrow\left\{\begin{matrix*}[l]
y = \mfrac{x-15}{8}\\[1ex]
7x = 49\\
\end{matrix*}\right.\\
&\Leftrightarrow\left\{\begin{matrix*}[l]
y = -1\\
x = 7\\
\end{matrix*}\right.
\end{align*}
\end{document}