Re: [問題] theorem 的 counter

看板LaTeX (論文排版)作者時間12年前 (2013/08/11 20:32), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串6/8 (看更多)
Hi, I pull out the book "TeX by topic" and study chapter 11 again. This is = what I came up with. \def\Ex{\futurelet\testchar\MaybeOptArgEx} \def\MaybeOptArgEx{\ifx[\testchar \let\next\OptArgEx \else=20 \let\next\NoOptArgEx=20 \fi=20 \next} \def\NoOptArgEx#1{ \begin{exercise} #1\par \end{exercise}} \def\OptArgEx[#1]#2{ \begin{exercise} #2\par \noindent=E8=A7=A3=E7=AD=94{\bf \theexercise:}\par #1 \end{exercise}} \section{Fifth try} This macro provides an option for solution. This means that the solution mu= st be surrounded by brackets [...]=20 \Ex{This is only a question without solution given.} \Ex[A solution goes here]{This has an option for adding a solution.} An image is attached http://ppt.cc/0mkp

08/12 15:40, , 1F
it is too complicate. i use the simplest one.
08/12 15:40, 1F
文章代碼(AID): #1I1uH2B5 (LaTeX)
文章代碼(AID): #1I1uH2B5 (LaTeX)