-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
obeylines实现在参数中换行导致cases,aligned等环境出错 #37
Labels
Macro/core
Related to TeX core macros.
Comments
问题出在 \makeatletter
\begingroup
\catcode\active\active
\protected\gdef\mathobeylines{%
\catcode\active\active \let^^M\math@obeylines}
\endgroup
\protected\def\math@obeylines{%
\unless\ifmmode\expandafter\par\fi}
\newcommand\testE[2]{\item[5.]#1\par#2\par
\ifteacher\begingroup\mathobeylines\expandafter\testEaux
\else\expandafter\@gobble\fi}
\newcommand\testEaux[1]{\indent\color{red}#1\par\endgroup}
\makeatother |
十分感谢李老师的再次耐心解答,真心感谢! |
李老师,您好,最近用您写的代码有发现了一个新问题,之前我没有考虑到 \begin{itemize}
\testE{15}{设实数$x$,$y$满足约束条件$\begin{cases}%
x\geqslant 0\
x\leqslant y\
x+y\geqslant 2
\end{cases}%
$,则$z=2x+y$的取值范围为 .
}%
{解:由约束条件$\begin{cases}%
x\geqslant 0\
x\leqslant y\
x+y\geqslant 2
\end{cases}%
$作出可行域如图,
化$z=2x+y$为$y=-2x+z$,由图可知,当直线$y=-2x+z$过$A$时,直线在$y$轴上的截距最小,$z$有最小值为$2$.
${\therefore}z=2x+y$的取值范围为$[2$,$+\infty)$.
\hh\color{blue}故答案为:$[2$,$+\infty)$.
\begin{tabular}{|c|c|c|c|}%\hline
$x$ & $(0$,$\ln (2k))$ & $\ln (2k)$ & $(\ln (2k)$,$k) $\
%\hline
$f'(x)$ & $-$ & $0$ & $+ $\
%\hline
$f(x)$ & ${\searrow}$ & 极小值 & ${\nearrow} $\
%\hline
\end{tabular}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: