命令の位置 順序 ”% ”記号の 有用性を 試行錯誤した例です。
まず画像を 3枚 みてもらいましょう。 素人の 個猫 にとっては 全て いいように 思われるのですが?
では TeX ファイル (source code)を見てみます。
\documentclass[a5paper,12pt]{jarticle}
\begin{document}
\newcounter{exercise}
\newenvironment{exercise}[1]%
{\refstepcounter{exercise}\vspace{10pt}\par\noindent
\textbf{Exercise \theexercise\ (#1)}
\begin{itshape}\par\noindent\vspace{10pt}}%
{\end{itshape}\vspace{10pt}\par}
Exercise~\ref{ex:simple} is a simple exercise.
\begin{exercise}{Simple Exercise}%
\label{ex:simple}%
This is a simple exercise.
\end{exercise}
\end{document}
では TeX ファイル (source code)を見てみます。
\documentclass[a5paper,12pt]{jarticle}
\begin{document}
\newcounter{exercise}
\newenvironment{exercise}[1]
{\refstepcounter{exercise}\vspace{10pt}\par\noindent
\textbf{Exercise \theexercise\ (#1)}
\begin{itshape}\par\noindent\vspace{10pt}}
{\end{itshape}\vspace{10pt}\par}
Exercise~\ref{ex:simple} is a simple exercise.
\begin{exercise}{Simple Exercise}
\label{ex:simple}
This is a simple exercise.
\end{exercise}
\end{document}
では TeX ファイル (source code)を見てみます。
\documentclass[a5paper,12pt]{jarticle}
\newenvironment{exercise}[1]%
{\refstepcounter{exercise}\vspace{10pt}\par\noindent
\textbf{Exercise \theexercise\ (#1)}
\begin{itshape}\par\noindent\vspace{10pt}}%
{\end{itshape}\vspace{10pt}\par}
\newcounter{exercise}
\begin{document}
Exercise~\ref{ex:simple} is a simple exercise.
\begin{exercise}{Simple Exercise}%
\label{ex:simple}%
This is a simple exercise.
\end{exercise}
\end{document}
http://theoval.cmp.uea.ac.uk/~nlct/latex/novices/counters.html
” % ”の 存在 と 命令の 位置とい うか順序 について試行したものです。正解というのではありません。参考に ど うぞ。
にゃんたろう 拝!
2008年 8月 2日 (土) 21:01:12 JST 作成