[Tutkielma-TeX] [darcs] jydiss.cls-muutos: Added the "contribution" environment for defining the author's contribution

Matthieu Weber mweber at mit.jyu.fi
Tue Sep 4 15:48:40 EEST 2007


(English below)

Tämä on automaattinen ilmoitus jydiss-luokkaan tai sen dokumentaatioon tehdystä
muutoksesta.  Voit hakea uuden, muutetun version osoitteesta
  http://antti-juhani.kaijanaho.fi/darcs/jydiss/

Alla on tiedot tehdystä muutoksesta.

---

This is an automated notification of a change made to the jydiss document
class or its accompanying documentation.  You can get the new version at
  http://antti-juhani.kaijanaho.fi/darcs/jydiss/

Below, you will find information about the actual change.

Tue Sep  4 15:44:16 EEST 2007  Matthieu Weber <mweber at mit.jyu.fi>
  * Added the "contribution" environment for defining the author's contribution
diff -rN -u old-jydiss/jydiss.cls new-jydiss/jydiss.cls
--- old-jydiss/jydiss.cls	2007-09-04 15:48:40.000000000 +0300
+++ new-jydiss/jydiss.cls	2007-09-04 15:48:40.000000000 +0300
@@ -107,6 +107,10 @@
 \diss at altttfalse
 \DeclareOption{alttt}{\diss at alttttrue}
 
+\newif\ifdiss at contrib@before
+\diss at contrib@beforefalse
+\DeclareOption{contribbefore}{\diss at contrib@beforetrue}
+
 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
 \ProcessOptions
 \LoadClass[a4paper,12pt]{book}
@@ -576,7 +580,13 @@
 
   \cleardoublepage
   \tableofcontents
-  \ifdiss at loar\listofarticles\fi
+  \ifdiss at loar % This is ugly
+	  \ifdiss at contrib@before
+	    \listofarticles
+	  \else
+	    \listofarticles\jydiss at contrib@body
+	  \fi
+	\fi
   \cleardoublepage
   \@mainmattertrue
   \pagestyle{myheadings}
@@ -830,7 +840,8 @@
   {\endlist}
 
 \newlistof{articles}{loar}{\listarticlename}
-\renewcommand{\@cftmakeloartitle}{\chapter*{\listarticlename}}
+\renewcommand{\@cftmakeloartitle}{\chapter*{\listarticlename}%
+\ifdiss at contrib@before\jydiss at contrib@body\fi}
 
 \newcommand{\includedarticles}{
 \ifjydiss at toc@space
@@ -912,6 +923,51 @@
 %\addtocounter{TotPages}{\diss at art@pages}
 }
 
+% ``Author's contribution'' environment, shamelessly copied from
+% ltugproc.cls's abstract environment
+
+\newtoks\jydiss at contrib@toks  \jydiss at contrib@toks{}
+\let\if at jydiss@contrib\iffalse
+\def\contribution{\def\@jydiss at contrib@{contribution}%
+  \ifx\@currenvir\@jydiss at contrib@
+  \else
+    \TBError{\string\contrib\space is illegal:%
+      \MessageBreak
+      use \string\begin{\@jydiss at contrib@} instead}%
+      {\@jydiss at contrib@\space may only be used as an environment}
+  \fi
+  \global\let\if at jydiss@contrib\iftrue
+  {\ifnum0=`}\fi
+  \@jydiss at contrib@getbody}
+\let\endjydiss at contrib\relax
+\long\def\@jydiss at contrib@getbody#1\end{%
+  \global\jydiss at contrib@toks\expandafter{\the\jydiss at contrib@toks#1}%
+  \@jydiss at contrib@findend}
+\def\@jydiss at contrib@findend#1{%
+  \def\@tempa{#1}%
+  \ifx\@tempa\@jydiss at contrib@
+    \expandafter\@jydiss at contrib@end
+  \else
+    \def\@tempb{document}%
+    \ifx\@tempa\@tempb
+      \TBError{\string\begin{\@jydiss at contrib@}
+          ended by \string\end{\@tempb}}%
+        {You've forgotten \string\end{\@jydiss at contrib@}}
+    \else
+       \global\jydiss at contrib@toks\expandafter{\the\jydiss at contrib@toks\end{#1}}
+       \expandafter\expandafter\expandafter\@jydiss at contrib@getbody
+    \fi
+  \fi}
+\def\@jydiss at contrib@end{\ifnum0=`{\fi}%
+  \expandafter\end\expandafter{\@jydiss at contrib@}
+  \immediate\write\@mainaux{%
+    \string\jydiss at set@contrib at body\string{\the\jydiss at contrib@toks\string}%
+  }%
+}
+
+\def\jydiss at contrib@body{You need to run \LaTeX{} a second time.}
+\newcommand\jydiss at set@contrib at body[1]{\long\gdef\jydiss at contrib@body{#1}}
+
 %%%% Floats and numbering
 
 \@removefromreset{figure}{chapter}
diff -rN -u old-jydiss/manual.tex new-jydiss/manual.tex
--- old-jydiss/manual.tex	2007-09-04 15:48:40.000000000 +0300
+++ new-jydiss/manual.tex	2007-09-04 15:48:40.000000000 +0300
@@ -135,6 +135,8 @@
 \item[loar] will include the list of included articles into the document.
 \item[shortloft] will put the lists of figures and tables on the same page, if
 they are short. \emph{Do not use it if you do not have a list of figures}.
+\item[contribbefore] will place the description of the author's contribution
+before the list of included articles instead of after.
 \end{opts}
 
 \subsection{Layout Fine-Tuning Options}
@@ -252,6 +254,11 @@
 layout of the references in the list of included articles, and the
 \cmd{artmaketitle} command for controling the layout of the title page of the
 included article.
+\item[contribution] Defines the author's contribution regarding the included
+articles. This environment may appear anywhere in the document, and its
+content will be added just after the list of included articles, under the same
+heading. Using the \opt{contribbefore} class option, the text will be added
+before the list of included articles.
 \end{envs}
 
 \section{Useful Internal Commands}






More information about the Tutkielma-TeX mailing list