Latex 乳胶配方错误
我正在尝试用乳胶制作这个配方: 我尝试使用的代码:Latex 乳胶配方错误,latex,formula,Latex,Formula,我正在尝试用乳胶制作这个配方: 我尝试使用的代码:pos(v)=\left\{\begin{matrix}0&v $ 是的,我试着在一些地方放置美元,没有结果:( 希望有人知道如何更正此错误!提前感谢这对我来说很好。我的第一个猜测与环境有关。您是否将公式包含在$中?您必须这样做才能进入数学模式: $pos(v)=\left\{\begin{matrix}0&v使用数学的内容需要放在数学模式中(即,被内联数学符号$包围,$或显示数学\[..\]或类似内容): \documentclass{ar
pos(v)=\left\{\begin{matrix}0&v
$
是的,我试着在一些地方放置美元,没有结果:(
希望有人知道如何更正此错误!提前感谢这对我来说很好。我的第一个猜测与环境有关。您是否将公式包含在$
中?您必须这样做才能进入数学模式:
$pos(v)=\left\{\begin{matrix}0&v使用数学的内容需要放在数学模式中(即,被内联数学符号$
包围,$
或显示数学\[
..\]
或类似内容):
\documentclass{article}
\usepackage{amsmath}
\开始{document}
\[
位置(v)=\左\{
\开始{matrix}
0&v<0\\
否则
\结束{矩阵}
\对。
\]
\[
\文本{pos}(v)=\begin{cases}
0&\text{if$v<0$}\\
v&\text{other}
\结束{cases}
\]
\结束{document}
我建议使用cases
来显示条件函数。另外,使用\text
来设置适当的文本内容,而不仅仅是在数学模式下设置文本;否则间距会很糟糕
$pos(v) = \left\{ \begin{matrix} 0 & v<0 \\ v & otherwise \end{matrix} \right.$
\begin{equation}
pos(v) = \left\{
\begin{matrix}
0 & v<0 \\
v & otherwise
\end{matrix}
\right.
\end{equation}
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
pos(v) = \left\{
\begin{matrix}
0 & v < 0 \\
v & otherwise
\end{matrix}
\right.
\]
\[
\text{pos}(v) = \begin{cases}
0 & \text{if $v < 0$} \\
v & \text{otherwise}
\end{cases}
\]
\end{document}