[Tutkielma-TeX] [darcs] jydiss.cls-muutos: Ugly hack so that the citations of included articles are in bold, whereas normal citations are between square brackets

Matthieu Weber mweber at mit.jyu.fi
Tue Sep 4 15:48:41 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:46:13 EEST 2007  Matthieu Weber <mweber at mit.jyu.fi>
  * Ugly hack so that the citations of included articles are in bold, whereas normal citations are between square brackets
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
@@ -867,7 +867,7 @@
 \newcommand{\artpublish}[1]{\gdef\diss at art@publish{#1}}
 \newcommand{\artyear}[1]{\gdef\diss at art@year{#1}}
 \newcommand{\artcopyright}[1]{\gdef\diss at art@copyright{#1}}
-\newcommand{\artlabel}{\Roman{articles}}
+\newcommand{\artlabel}{\textbf{P\Roman{articles}}}
 \newcommand{\artpages}[1]{\gdef\diss at art@pages{#1}}
 \newcommand{\arthide}{\diss at art@visiblefalse}
 \newcommand{\artmakebib}{%
@@ -901,9 +901,13 @@
 \fi
 }\newpage\ }
 
+\def\diss at artcite#1{\global\@namedef{diss at artcite@#1}{}%
+\immediate\write\@mainaux{\string\diss at artcite{#1}}}
+
 \newenvironment{article}[1]
 {\stepcounter{articles}
 \gdef\diss at art@label{#1}
+\diss at artcite{#1}
 \gdef\diss at art@title{Set a title with \textbackslash arttitle}
 \gdef\diss at art@author{Set an author with \textbackslash artauthor}
 \let\diss at art@publish=\relax
@@ -968,6 +972,15 @@
 \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}}
 
+% Changing the citation label in the body of the document depending on wether
+% the citation is an included article or not
+\newif\ifdiss at artcite\diss at artcitefalse
+\let\@cite at rig=\@cite
+\def\@cite#1#2{\ifdiss at artcite\textbf{#1}\else\@cite at rig{#1}{#2}\fi\diss at artcitefalse}
+
+\let\@citex at rig=\@citex
+\def\@citex[#1]#2{\@ifundefined{diss at artcite@#2}{\diss at artcitefalse\@citex at rig[#1]{#2}}{\diss at artcitetrue\@citex at rig[#1]{#2}}}
+
 %%%% Floats and numbering
 
 \@removefromreset{figure}{chapter}






More information about the Tutkielma-TeX mailing list