]> AND Private Git Repository - mpi-energy2.git/blob - mpi-energy2-extension/ecrc.sty
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
adding some changes
[mpi-energy2.git] / mpi-energy2-extension / ecrc.sty
1 %%
2 %% This is file `ecrc.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% elsarticle.dtx  (with options: `class')
8 %% 
9 %% Copyright 2009, 2010, 2011 Elsevier Ltd
10 %% 
11 %% This file is part of the 'Elsarticle Bundle'.
12 %% -------------------------------------------
13 %% 
14 %% It may be distributed under the conditions of the LaTeX Project Public
15 %% License, either version 1.2 of this license or (at your option) any
16 %% later version.  The latest version of this license is in
17 %%    http://www.latex-project.org/lppl.txt
18 %% and version 1.2 or later is part of all distributions of LaTeX
19 %% version 1999/12/01 or later.
20 %% 
21 %%
22 \NeedsTeXFormat{LaTeX2e}%
23
24 \ProvidesPackage{ecrc}[2011/05/07 v1.2a ecrc]
25
26 \DeclareOption{procedia}{\global\elsarticle@nsmodeltrue}
27 \newif\ifelsarticle@nsmodel\elsarticle@nsmodelfalse
28
29 \ProcessOptions
30
31 \RequirePackage{geometry}
32 \ifnum\jtype=1
33  \geometry{twoside,
34   paperwidth=210mm,
35   paperheight=297mm,
36   textheight=562pt,
37   textwidth=384pt,
38   centering,
39   headheight=10pt,
40   headsep=12pt,
41   footskip=12pt,
42   footnotesep=24pt plus 2pt minus 12pt,
43 }
44  \global\let\bibfont=\footnotesize
45  \global\bibsep=0pt
46  \if@twocolumn\global\@twocolumnfalse\fi
47  \else
48 \ifnum\jtype=3
49   \ifelsarticle@nsmodel
50    \AtBeginDocument{\@twosidetrue\@mparswitchfalse}
51    \def\@evenfoot{}
52    \def\@oddfoot{}
53    \geometry{twoside,
54     paperwidth=210mm,
55     paperheight=297mm,
56     textheight=622pt,
57     textwidth=428.72pt,
58     centering,
59     headheight=10pt,
60     headsep=12pt,
61     footskip=12pt,
62     footnotesep=24pt plus 2pt minus 12pt,
63     columnsep=2pc
64 }
65   \else
66     \geometry{twoside,
67      paperwidth=210mm,
68      paperheight=297mm,
69      textheight=622pt,
70      textwidth=468pt,
71      centering,
72      headheight=10pt,
73      headsep=12pt,
74      footskip=12pt,
75      footnotesep=24pt plus 2pt minus 12pt,
76      columnsep=2pc
77 }
78 \fi
79  \global\let\bibfont=\footnotesize
80  \global\bibsep=0pt
81  \if@twocolumn\input{fleqn.clo}\fi
82 \else\ifnum\jtype=5
83  \RequirePackage{geometry}
84  \geometry{twoside,
85   paperwidth=210mm,
86   paperheight=297mm,
87   textheight=682pt,
88   textwidth=522pt,
89   centering,
90   headheight=10pt,
91   headsep=12pt,
92   footskip=12pt,
93   footnotesep=24pt plus 2pt minus 12pt,
94   columnsep=18pt
95  }%
96  \global\let\bibfont=\footnotesize
97  \global\bibsep=0pt
98  \input{fleqn.clo}
99  \global\@twocolumntrue
100 %%
101 %% End of option '5p'
102 %%
103 \fi\fi\fi
104
105 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
106
107 \AtEndDocument{\label{lastpage}}
108
109 \let\@journalname\@empty
110 \def\journalname#1{\gdef\@journalname{#1}}
111
112 \let\@jid\@empty
113 \def\jid#1{\gdef\@jid{#1}}
114
115 \def\reprintline{%
116     \parbox[t]{\@tempdima}{\centering%
117     \raisebox{20pt}{\includegraphics{SDlogo-\jtype p}}\\[-12pt]
118     \mbox{\footnotesize\@journalname~xx~(xxxx)~xxx-xxx}%
119     }}
120
121 \def\volume#1{\gdef\@vol{#1}}
122 \def\firstpage#1{\gdef\@firstpage{#1}%
123                   \setcounter{page}{#1}}
124                   
125 \def\lastpage{\pageref{lastpage}}
126
127 \def\jnltitlelogo#1{\gdef\@jnltitlelogo{#1}}
128
129 \newdimen\dummylogowidth
130 \dummylogowidth=87pt
131
132 \jnltitlelogo{Journal Logo}
133
134 \def\TopRule{\rule{\dummylogowidth}{1.85pt}\\[-9.6pt]
135              \rule{\dummylogowidth}{1pt}}
136
137 \def\BottomRule{\rule{\dummylogowidth}{1pt}\\[-9pt]        
138                 \rule{\dummylogowidth}{1.85pt}}  
139
140
141 \def\jnltitlebox{\parbox[c][42pt]{84.37pt}%%
142                 {\fontsize{18pt}{20pt}\sffamily\selectfont
143                 \centering\@jnltitlelogo}}
144
145 \def\dummyjnllogo{%
146       \parbox[c][61pt][c]{\dummylogowidth}%
147       {\TopRule%
148        \vfill%
149         \jnltitlebox%
150        \vfill%
151        \BottomRule%
152 }}
153
154 \def\elslogo{\includegraphics{elsevier-logo-\jtype p}}
155 \def\sdlogo{\includegraphics{SDlogo-\jtype p}}
156 \def\jnllogo{\IfFileExists{\@jid logo}%
157    {\includegraphics{\@jid logo}}%
158    {\dummyjnllogo}%
159    }
160
161 \def\elsarticle@titlefont{\fontsize{17pt}{20.4}\selectfont}
162 \def\elsarticle@authorfont{\fontsize{13pt}{15.6}\selectfont}
163 \def\elsarticle@absfont{\fontsize{9pt}{10.8}\selectfont}
164
165 \def\runauth#1{\gdef\@runauth{#1}}
166 \runauth{Author}
167
168 \let\@dochead\@gobble
169 \def\dochead#1{\gdef\@dochead{\centering{\large#1}}}
170
171 \def\ps@pprintTitle{%
172     \def\@evenhead{%% Even head
173       \setbox1=\hbox{\elslogo}%
174       \setbox2=\hbox{\sdlogo}%
175       \setbox3=\hbox{\jnllogo}%
176 %      \@tempdima=\textwidth\relax%
177 %      \advance \@tempdima - \wd1%
178 %      \advance \@tempdima - \wd3%
179 %      \advance \@tempdima - 72pt%
180 %      \showthe\wd1
181 %      \showthe\wd2
182       \vspace*{2pc}
183       \parbox[t]{\wd1}{\elslogo}
184        \hfil\parbox[t]{19pc}{\centering%
185        \raisebox{23pt}{\sdlogo}\\[-12pt]
186        \mbox{\footnotesize\@journalname~\@vol~(\the\year)%
187          ~\@firstpage--\lastpage}}\hfil%
188         \raisebox{23pt}{\parbox[c]{\wd3}{\jnllogo\\[6pt]
189         \ifelsarticle@nsmodel%
190          \hspace*{-1.8pc}{\footnotesize www.elsevier.com/locate/procedia}%
191         \fi}}}
192       \let\@oddhead\@evenhead%
193       \let\@oddfoot\@empty
194       \let\@oddfoot\@evenfoot
195 }      
196
197 \long\def\MaketitleBox{%
198   \resetTitleCounters
199   \def\baselinestretch{1}%
200   \begin{center}%
201   \ifx\@dochead\@empty\relax%
202      \vspace*{3pc}%
203   \else%
204      \vspace*{5pc}%
205    \@dochead%
206      \par%
207      \vspace*{1.75pc}%
208    \fi%
209    \def\baselinestretch{1}%
210     {\strut\elsarticle@titlefont\@title\strut}\par\vskip18pt
211 %    \normalsize\elsauthors\par\vskip10pt
212     {\elsarticle@authorfont\elsauthors}\par\vskip10pt
213     \footnotesize\itshape\elsaddress\par\vskip36pt
214     \hrule\vskip12pt
215     \ifvoid\absbox\else\unvbox\absbox\par\vskip10pt\fi
216     \ifvoid\keybox\else\unvbox\keybox\par\vskip10pt\fi
217     \hrule\vskip12pt
218     \end{center}%
219    \ifcase\jtype\or
220     \vspace*{-20pt}%
221    \or 
222    \or 
223     \vspace*{-20pt}%
224    \fi 
225 }
226
227 \def\ps@headings{%
228     \def\@oddhead{\parbox{\textwidth}{\itshape\footnotesize%
229         \hfill\@runauth~/~\@journalname~\@vol~(\the\year)~%
230           \@firstpage--\lastpage%
231          \hfill{\rm \thepage}}}%
232     \def\@evenhead{\parbox{\textwidth}{\itshape\footnotesize%
233          {\rm \thepage}\hfil\@runauth~/~\@journalname~\@vol~(\the\year)~%
234          \@firstpage--\lastpage\hfil}}%
235     \let\@evenfoot\@empty%
236     \let\@evenfoot\@oddfoot}
237
238 \pagestyle{headings}
239
240
241 \def\footnoterule{\kern-3\p@%
242   \hrule width 3pc height .25pt
243   \kern3\p@}
244
245 \newif\if@copyrightline\@copyrightlinefalse
246 \let\@copyrightyear\@empty
247 \def\copyrightyear#1{\gdef\@copyrightyear{#1}}
248 \let\@copyrightowner\@empty
249 \def\copyrightowner#1{\gdef\@copyrightowner{#1}}
250
251 \def\CopyrightLine{\@ifnextchar[{\@CopyrightLine}{\@CopyrightLine[]}}
252 \def\@CopyrightLine[#1]#2#3{\@copyrightlinetrue%
253                        \gdef\@copyrightprefix{#1}%
254                        \gdef\@copyrightyear{#2}%
255                        \gdef\@copyrighttext{#3}% 
256                        \gdef\@CopyrightLine{\par\vskip1pc%
257                        \noindent\ifx\@copyrightprefix\@empty\relax%
258                        \else\@copyrightprefix~\fi%
259                        \textcopyright~\@copyrightyear~%
260                        \@copyrighttext~}}
261
262 \renewenvironment{abstract}{\global\setbox\absbox=\vbox\bgroup
263   \hsize=\textwidth\def\baselinestretch{1}%
264   \noindent\unskip\textbf{Abstract}%
265   \elsarticle@absfont\par\medskip\unskip\noindent\ignorespaces}
266  {\if@copyrightline\@CopyrightLine\fi\egroup}
267
268 \def\keyword{%
269   \def\sep{\unskip, }%
270  \def\MSC{\@ifnextchar[{\@MSC}{\@MSC[2000]}}
271   \def\@MSC[##1]{\par\leavevmode\hbox {\it ##1~MSC:\space}}%
272   \def\PACS{\par\leavevmode\hbox {\it PACS:\space}}%
273   \def\JEL{\par\leavevmode\hbox {\it JEL:\space}}%
274   \global\setbox\keybox=\vbox\bgroup\hsize=\textwidth
275   \normalsize\normalfont\def\baselinestretch{1}
276   \parskip\z@
277   \elsarticle@absfont\noindent\textit{Keywords: }
278   \raggedright                         % Keywords are not justified.
279   \ignorespaces}
280 \def\endkeyword{\par \egroup}
281
282 \ifelsarticle@nsmodel
283 \def\figurename{Fig.}
284 \long\def\@makecaption#1#2{%
285   \vskip\abovecaptionskip\footnotesize
286   \sbox\@tempboxa{#1. #2}%
287   \ifdim \wd\@tempboxa >\hsize
288     #1. #2\par
289   \else
290     \global \@minipagefalse
291     \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
292   \fi
293   \vskip\belowcaptionskip}
294 \else
295 \long\def\@makecaption#1#2{%
296   \vskip\abovecaptionskip\footnotesize
297   \sbox\@tempboxa{#1. #2}%
298   \ifdim \wd\@tempboxa >\hsize
299     #1. #2\par
300   \else
301     \global \@minipagefalse
302     \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
303   \fi
304   \vskip\belowcaptionskip}
305 \fi
306
307 \makeatother
308
309 %% Change log
310
311 %% 27 Feb 2010:  Fontsize of dochead changed to \large from \Large
312 %%               as per Martin Ruck's mail on 26 Feb 2010.
313 %%
314 %%--------
315 %%
316 %% 7 May 2011:   As pe Martin Ruck's request on May 5, to make the
317 %%               output same as that of Word template, following changes
318 %%               are made:
319 %
320 %%               1. New option `procedia' defined. If this option is
321 %%                  used along with the 3p option, the output will be
322 %%                  same as that of the Word template.
323 %
324 %%               2. \CopyrightLine[<text-before-year>]{<year>}{<restt-of-the-copyright-text>}
325 %%                  defined.
326 %%                  eg: \CopyrightLine[Crown copyright]{2011}{Published by Elsevier Ltd.}
327 %%                      \CopyrightLine{2011}{Elsevier Ltd. All rights reserved}
328 %
329 %%               3. Fontsize of the following parts updated:
330 %%                  Title, Author, Abstract, Keywords
331 %
332 %%               4. Header and footer corrected. Earlier for both the
333 %%                  odd and even pages, the header was same. But now
334 %%                  this is changed.
335 %
336 %%               5. `Figure' changed to `Fig.' in caption.
337 %
338 %%               6. Textwidth changed to 428.pt for the option `nsmodel'.
339 %
340 %%               7. EPS version of logos created so that authors can
341 %%                  can use latex too in addition to pdflatex.
342 %
343 %% 2 June 2011:  1. A small typo corrected. (Proceedia changed to
344 %%                  Procedia).
345 %
346 %%               2. The journal url will appear only if the option
347 %%                  `procedia' is given.