\addtocounter というものです
作成方法
\addtocounter{<counter>}{<num>}
意味は ”Adds <num> to <counter>” カウンタ の現在の 値に 希望 の数を 加算するようです。
では TeX ファイル (source code)を見てみます。
\documentclass[a5paper,12pt]{jarticle}
\newenvironment{exercise}[1]
{\par\noindent\textbf{Exercise(#1)}\begin{itshape}\par\noindent}
{\end{itshape}}
\begin{document}
\section{counter 1}
counter section:~\thesection
\subsection{exercise 1}
\begin{exercise}{An Example1}
This is a sample1.
\end{exercise}
\newcounter{exercise}
\addtocounter{exercise}{038}
counter exercise~\theexercise
\subsection{exercise 2}
\begin{exercise}{An Example2}
This is a sample2.
\end{exercise}
\addtocounter{exercise}{119}
counter exercise~\theexercise
counter page:~\thepage
\newpage
\section{counter page2}
counter section:~\thesection
\section{exercise 3}
\begin{exercise}{An Example page2}
This is a sample on page2.
\end{exercise}
\addtocounter{exercise}{569}
counter exercise~\theexercise
counter page:~\thepage
\end{document}
この結果の表示例です
画像は適宜 切り取り 拡大縮小をしていますが
1頁
2頁

このようにするのでしょう。
にゃんたろう 拝!
2008年 8月 2日 (土) 21:00:28 JST 作成