
ifeqcase 외부의 ifeqcase에 설정된 변수 값이 필요합니다. 예를 들어 이 코드는 작동하지 않습니다
\documentclass[12pt]{article}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{geometry}
\usepackage{calculator,calculus}
\usepackage{multido}
\usepackage{xstring}
\usepackage[fontsize=22pt]{scrextend}
\setmainfont{Latin Modern Sans Quotation}
\geometry{papersize{30cm,19.35cm},left=1cm,right=1cm,top=1cm,bottom=1cm}
\pagestyle{empty}
\newcommand{\valeurcal}[2]{
\SUBTRACT{1}{\ra}{\partiell}
\MULTIPLY{\partiell}{#1}{\partielll}
\MULTIPLY{\ra}{#2}{\partiell}
\ADD{\partiell}{\partielll}{\leresultat}
}
\begin{document}
\multido{\ra=0.0+0.2}{1}{
\valeurcal{0}{5}
\ROUND[0]{\leresultat}{\coupe}
\IfEqCase{\coupe}{%
{1}{ \COPY{5}{\nouvcoupe}}% test with calculator
{2}{ \def\nouvcoupe{6}}}% test with def, edef and gdef (thank for the answer)
value of nouvcoupe : \nouvcoupe}
\end{document}
나에게 : 정의되지 않은 제어 순서. (xelatex로 컴파일)
문제는 \valeurcal{0}{5}
. \valeurcal{0}{5}
으로 바꾸면 \COPY{2}{\leresultat}
컴파일할 수 있습니다(하지만 제대로 작동하지 않습니다)!
\valeurcal{0}{5}
0*(1-\ra)+5*\ra
어디에서 계산하세요 \ra
. 나에게 무엇을 조언하시나요? 미리 감사드립니다.
답변1
사용
\gdef\nouvcoupe{6}
g지역적인데프개시
답변2
알았어 [\def\nouvcoupe{6}]
없어졌어
\IfEqCase{\coupe}{%
{1}{ \COPY{5}{\nouvcoupe}}% test with calculator
{2}{ \def\nouvcoupe{6}}}[\def\nouvcoupe{6}]
괜찮아