Re: 数学書の問題群と後ろの答え群との対応

名前: あべ
日時: 2005-12-26 14:00:19
IPアドレス: 61.213.84.*

>>40150 でっちあげてみました.既製品があるのならそちらを使った方がよいかと思いますが. \documentclass{jbook} \makeatletter \newcounter{problem} \setcounter{problem}{0} \newenvironment{problem}{ \refstepcounter{problem} \if@filesw \protected@write\@auxout{} {\string\addproblem{\thechapter 章,\thesection 節,問題\theproblem ,\thepage ページ}} \textbf{問題\theproblem} \fi }{} \def\addproblem#1{ \@ifundefined{@prob}{ \gdef\@prob{#1}}{ \global\edef\@prob{\@prob \par #1} }} \def\printproblems{ \@ifundefined{@prob}{undefined}{\@prob} } \makeatother \begin{document} \chapter{いろは} \section{aaa} \begin{problem} test \end{problem} \begin{problem} test \end{problem} [問題リスト] \printproblems \end{document} 見た目とかは適当です.

この書き込みへの返事:

お名前
題名 
メッセージ(タグは <a href="...">...</a> だけ使えます)