
iopart 문서 클래스는 iopart.cls
파일 에 다음을 정의합니다.
\def\cases#1{%
\left\{\,\vcenter{\def\\{\cr}\normalbaselines\openup1\jot\m@th%
\ialign{\strut$\displaystyle{##}\hfil$&\tqs
\rm##\hfil\crcr#1\crcr}}\right.}%
이것이 의 환경을 대체하는 것 amsmath
입니까 cases
? 어떻게 사용하나요? 정의는 파일의 다른 곳에서는 나타나지 않습니다.
Cases 환경을 수동으로 구현하는 방법에 대한 질문은 이미 요청되었습니다.여기. 해당 게시물의 나이를 고려할 때 이것이 여전히 필요한지 궁금합니다.
답변1
\cases
환경이 아닌 이 정의는 LaTeX 커널의 정의를 수정한 것이며 이는 기본적으로 일반 TeX의 정의와 동일합니다.
그런데 \rm
및 같은 명령은 \bf
더 이상 사용되지 않으며 거의 30년 동안 더 이상 사용되지 않습니다.
amsmath
와 함께 로드할 수 있는 매우 간단한 방법이 있습니다 iopart
. 또한 iopart
와 \cases
의 결과 amsmath
를 비교하기 위해 트릭을 사용할 것입니다 cases
.
\documentclass[10pt]{iopart}
% for using amsmath
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax
%%% This is just to compare the results
\let\iopartcases\cases
%%%
\usepackage{amsmath}
\begin{document}
In the following display I'll be using \verb|\cases| as
defined by \verb|iopart| in order to check the differences
\[
f(x)=\iopartcases{1 & abc \\ 0 & uvw}
\]
The following display will use \verb|cases| as defined by
\verb|amsmath| in order to check the differences
\[
f(x)=\begin{cases} 1 & abc \\ 0 & uvw \end{cases}
\]
Now we can decide which one to use.
\end{document}
원하는 방식을 선호한다면 환경 iopart
을 정의할 수 있습니다 . 환경을 iopcases
재정의하지는 않습니다 .amsmath
\documentclass[10pt]{iopart}
% for using amsmath
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax
%%% This is just to compare the results
\let\iopartcases\cases
%%%
\usepackage{amsmath}
\usepackage{mathtools}
\makeatletter
\newcases{iopcases}{\tqs}
{$\m@th\displaystyle##$\hfil}
{##\hfil}
{\lbrace}
{.}
\makeatother
\begin{document}
In the following display I'll be using \verb|\cases| as
defined by \verb|iopart| in order to check the differences
\[
f(x)=\iopartcases{1 & abc \\ 0 & uvw}
\]
The following display will use \verb|iopcases| as defined
above in order to check the differences
\[
f(x)=\begin{iopcases} 1 & abc \\ 0 & uvw \end{iopcases}
\]
Now we can decide which one to use.
\end{document}
당신처럼 얇은 공간을 원하시나요 iopart
? 로 변경
\makeatletter
\newcases{iopcases}{\tqs}
{$\m@th\displaystyle\,##$\hfil}
{##\hfil}
{\lbrace}
{.}
\makeatother
그리고 당신은 얻을 것이다
iopart
개인적인 용도로는 사용하지 않겠습니다 . 수학 조판을 위한 기본 도구를 사용하기 위해 트릭이 필요하지 않은 몇 가지 다른 클래스가 있습니다.