Re: [問題] theorem 的 counter
How about this
\begin{document}
\newtheorem{exercise}{=E4=BD=9C=E6=A5=AD}[section]
\newtheorem{answer}{=E8=A7=A3}[exercise]
\section{Old method}
\begin{exercise}
Old question
\end{exercise}
\begin{answer}
Old answer
\end{answer}
\section{Second try}
\renewcommand{\theanswer}{\theexercise}
\begin{exercise}
Old question
\end{exercise}
\begin{answer}
Old answer
\end{answer}
Hmmm, two separate environment are not desired.
\section{Third try}
A single environment with imbedded wordings.
\begin{exercise}
Question goes here.
.....
{\noindent \bf =E4=BD=9C=E6=A5=AD \theexercise =E8=A7=A3 \par}
Solution goes here.
\end{exercise}
\section{Fourth try}
Here we define a newenvironment with 2 inputs,=20
one for question and one for the solution.
\newenvironment{exwsol}[2]
{\begin{exercise}
#1\par
\noindent=E8=A7=A3=E7=AD=94{\bf \theexercise:}\par
#2
}
{\end{exercise}}
Then give an example displayed below
\begin{exwsol}
{Question goes here.}
{Solution goes here.}
\end{exwsol}
\end{document}
An image is attached.
http://ppt.cc/5R-6
討論串 (同標題文章)
LaTeX 近期熱門文章
PTT數位生活區 即時熱門文章