안녕하세요. 매번 많은 도움을 받아 학원 책을 쓰고 있는 사람입니다.
도은이 아빠님이 완성된 툴을 제공하여 주셔서 잘쓰고 있습니다.
그러던 중 궁금점.....
질문을 다음과 같습니다. 첨부한 파일에 229번줄을 다음을 실행하는 부분이 정의되어 있는데요.
\begin{mun}
방정식 $|x|+|x-2|=5$ 의 모든 근의 합을 구하시오.
\begin{pul}
$2$
\end{pul}
\end{mun}
\vfill
%%%%%%%%%%%%%%연습문제 b %%%%%%%%%%%%%%%%%%
\newcommand\outputfilename{collectedsol.tex}
\newoutputstream{outputstream}\newinputstream{inputstream}
\IfStreamOpen{outputstream}{}{%
\openoutputfile{\outputfilename}{outputstream}%
}
\def\ERRMSG{}
\newcounter{munje}\setcounter{munje}{0}%%%%%문제를 파트별로번호를 출력할 시 \newcounter{munje}[part]\setcounter{munje}{0}로대체
\newcommand\fmtmunje{\arabic{munje}}
\newif\ifInMunEnv\InMunEnvfalse
\newenvironment{mun}
{\InMunEnvtrue\refstepcounter{munje}%
\par\noindent{\large{\bfseries \ovalbox{\fmtmunje \label{mun:\fmtmunje}}.~}}%
%\hyperlink{sol:\fmtmunje}{$\heartsuit$}%%%--마지막 풀이정리된후는 %를 앞에 붙치면 마크가 사라짐
}
{\InMunEnvfalse\par\bigskip}
\newenvironment{pul}%
{\ifInMunEnv\def\ERRMSG{}\else\def\ERRMSG{pul nesting Error! }\fi
\let\thismunje\fmtmunje
\addtostream{outputstream}{%
\string\par\string\bigskip
{\string\par\string\noindent\string\normalsize\string\sffamily{\itshape\ERRMSG}\ding{46}풀이 \thismunje. (Page...\string\pageref{mun:\thismunje})\string\hypertarget{sol:\thismunje}{}}\string\hrulefill\string\par
}
\expandafter\writeverbatim\expandafter{outputstream}
}%
{%
\endwriteverbatim
\par
}
\newcommand\printcollectedsol{%
\clearpage
\centerline{\LARGE \ding{46}문제 풀이}
\small
\closeoutputstream{outputstream}
\openinputfile{\outputfilename}{inputstream}
\readstream{inputstream}
}
%%%%%%%%%%%%%% 연습문제e %%%%%%%%%%%%%%%%%%%%%%%
이부분에서 위에서 입력한 방식
\begin{mun}
방정식 $|x|+|x-2|=5$ 의 모든 근의 합을 구하시오.
\begin{pul}
$2$
\end{pul}
\end{mun}
\vfill
에서
\begin{mun}
방정식 $|x|+|x-2|=5$ 의 모든 근의 합을 구하시오.
\end{mun}
\begin{pul}
$2$
\end{pul}
\vfill
와 같이 필요에 의하여 입력하여 pul이 부분을 출력하고 싶습니다. 즉 입력하는 방식만 바꾸고자 합니다.
부탁드립니다.
KTUG 한국 텍 사용자 그룹