%% This is file `spr-sola-addons.sty'
%%
%% LaTeX 2e style file for the processing of LaTeX2e files
%% of the SOLA journal (Springer)
%%
%%
%% Macros written by Deimantas Galcius, VTeX, Lithuania
%% Please submit bugs or your comments to deimi@vtex.lt
%%
%% The original distribution is located at:
%% http://www.e-publications.org/springer/support/
%%
%% This style file contains additional macros and is designed to use
%% with class  "SolarPhysics.cls"
%%
%% You are free to use this style file as you see fit, provided 
%% that you do not make changes to the file. 
%% If you DO make changes, you are required to rename this file.
%%
%% It may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
%%
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
%%
%%
% Changes:
% 2007.02.23 sectioning counter format amended: fullstop introduced
%            urlstyle: sans serif
% 2007.03.23 option: "optionalrh" for optional running title/author
%            email: sffamily + prefix "e-mail: "
% 2007.04.12 figure: fullstop; idline
\NeedsTeXFormat{LaTeX2e}
\def\get@CVSdate#1Id: #2,v #3 #4 #5 #6 #7${#4}%$
\def\file@version{\get@CVSdate$Id: spr-sola-addons.sty,v 1.1 2006/12/13 14:34:38 deimi Exp $}
\ProvidesPackage{spr-sola-addons}
             [\file@version
                 Springer style for SOLA journal (DG)]

\newif\if@optionalrh\global\@optionalrhfalse\relax
\DeclareOption{optionalrh}{\global\@optionalrhtrue\relax}
\ProcessOptions
% Dimensions
\setlength\textheight{198mm}
\setlength\textwidth{347\p@}

\setlength\parindent{12\p@}
\setlength\headheight{12\p@}
\setlength\headsep{14\p@}
\setlength\topskip{10\p@}
\setlength\footskip{17\p@}
\setlength\maxdepth{\z@}
\setlength\topmargin       {12mm}
\advance\topmargin by-7pt
%
  \setlength\oddsidemargin   {16.5mm}% gutter margin
  \setlength\evensidemargin  {16.5mm}% outer


  \renewcommand\normalsize{%
     \@setfontsize\normalsize{9.5}{11.5pt plus .3pt minus .3pt}%
     \abovedisplayskip 10\p@ \@plus2\p@ \@minus2\p@
     \abovedisplayshortskip 6\p@ \@plus2\p@
     \belowdisplayshortskip 6\p@ \@plus2\p@
     \belowdisplayskip \abovedisplayskip}

  \renewcommand\small{%
     \@setfontsize\small\@ixpt{11\p@ plus .2\p@ minus .2\p@}%
     \abovedisplayskip 7.5\p@ \@plus4\p@ \@minus1\p@
     \belowdisplayskip \abovedisplayskip
     \abovedisplayshortskip \abovedisplayskip
     \belowdisplayshortskip \abovedisplayskip}

  \renewcommand\footnotesize{%
     \@setfontsize\footnotesize\@viiipt{9.25\p@ plus .1pt minus .1pt}%%
     \abovedisplayskip 6\p@ \@plus4\p@ \@minus1\p@
     \belowdisplayskip \abovedisplayskip
     \abovedisplayshortskip \abovedisplayskip
     \belowdisplayshortskip \abovedisplayskip}

  \setlength\smallskipamount{6\p@ \@plus 1\p@ \@minus 1\p@}
  \setlength\medskipamount  {11.5\p@ \@plus 3\p@ \@minus 3\p@}
  \setlength\bigskipamount  {23\p@ \@plus 6\p@ \@minus 3\p@}

%%
\IfFileExists{lmodern.sty}{\RequirePackage[T1]{fontenc}\RequirePackage{lmodern}}{}


% fonts amended
%% from  `omlcmm.fd':
\DeclareFontShape{OML}{cmm}{m}{it}%
     {<5><6><7><8><9-10>gen*cmmi%
      <10><11>cmmi10%
      <12->cmmi12%
      }{}

\DeclareFontShape{OML}{cmm}{b}{it}{%
      <-6> cmmib5 <6-8> cmmib7 <8-> cmmib10%
      }{}

%% from `omscmsy.fd'

\DeclareFontShape{OMS}{cmsy}{m}{n}{%
      <5><6><7><8><9-10>gen*cmsy%
      <10->cmsy10%
      }{}

\DeclareFontShape{OMS}{cmsy}{b}{n}{%
      <-6> cmbsy5 <6-8> cmbsy7 <8-> cmbsy10%
      }{}

% from `ot1cmr.fd'

\DeclareFontShape{OT1}{cmr}{m}{n}%
     {<5><6><7><8><9-10><12>gen*cmr%
      <11>cmr10%
      <13-17>cmr12%
      <17->cmr17}{}
\DeclareFontShape{OT1}{cmr}{m}{sl}%
     {%
      <5><6><7>cmsl8%
      <8><9>gen*cmsl%
      <10><11>cmsl10%
      <12->cmsl12%
      }{}
\DeclareFontShape{OT1}{cmr}{m}{it}%
     {%
      <5><6><7>cmti7%
      <8>cmti8%
      <9>cmti9%
      <10><11>cmti10%
      <12->cmti12%
      }{}
\DeclareFontShape{OT1}{cmr}{m}{sc}{<-> cmcsc10}{}

\DeclareFontShape{OT1}{cmr}{b}{n}{<->cmb10}{}

%%%%%%%% bold extended series
\DeclareFontShape{OT1}{cmr}{bx}{n}
   {%
      <5><6><7><8><9-10>gen*cmbx%
      <10><11>cmbx10%
      <12->cmbx12%
      }{}
\DeclareFontShape{OT1}{cmr}{bx}{sl}{<->cmbxsl10}{}
\DeclareFontShape{OT1}{cmr}{bx}{it}{<->cmbxti10}{}

%% math
\DeclareFontFamily{U}{wasy}{}
\DeclareFontShape{U}{wasy}{m}{n}{ <5> <6> <7> <8> <9-10> gen * wasy
      <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88>wasy10  }{}


% FOOTNOTES
\setlength\footnotesep   {10\p@}% 
\setlength{\skip\footins}{18\p@ \@plus 4\p@ \@minus 2\p@}
\skip\@mpfootins = \skip\footins
%
\def\footnoterule{\kern-3\p@ \hrule \@width 108\p@ \kern 2.6\p@} % the \hrule is .4pt high
\renewcommand\@makefntext[1]{\@makefnmark #1}
\def\@makefnmark{\@textsuperscript{\normalfont\@thefnmark}}%



%  sectioning
% skiemenavimo isjungimas
\def\nohyphen{\pretolerance=\@M \tolerance=\@M \hyphenpenalty=\@M \exhyphenpenalty=\@M}

\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-\bigskipamount}%
                                   {\medskipamount}%
                                   {\normalsize\bfseries\mathversion{bold}\raggedright\nohyphen}}

\renewcommand\subsection{\@startsection {subsection}{2}{\z@}%
                                   {-\medskipamount}%
                                   {\medskipamount}%
                                   {\normalsize\nohyphen}}

\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                   {-\medskipamount}%
                                   {\medskipamount}%
                                   {\itshape\raggedright}}

\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                   {\medskipamount}%
                                   {-10pt}%
                                   {\bfseries}}

\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
                                   {0.1pt}%
                                   {-1em}%
                                   {\itshape}}


% Format for the counter:
  \def\section@numbersep{.}
  \def\subsection@numbersep{.}
  \def\subsubsection@numbersep{.}
  \def\paragraph@numbersep{.}
  \def\subparagraph@numbersep{.}

% Format for the counter:
\def\@seccntformat#1{{\csname #1@prefix\endcsname\csname the#1\endcsname\csname#1@numbersep\endcsname\enspace}}

% misc
\overfullrule=5pt

% Abstract
\let\abstractnamefont=\bfseries
\def\abstractsize{\normalsize\normalfont}
\let\abstractdot\relax

% Title
%   skip20pt
%   fontsize 13/15; bfseries; marginright 10mm

\def\raggedrightmargin#1{%
  \let\\\@centercr\@rightskip #1 plus 1fil  \rightskip\@rightskip
  \leftskip\z@skip
  \parindent\z@\nohyphen}

\def\titleflushstyle{\raggedrightmargin{10mm}}
\def\openingflushstyle{\vglue-\topskip\hrule \@height 1\p@ \vskip40\p@}
\def\titlefont{\fontsize{13}{15}\selectfont\bfseries\mathversion{bold}}

% Author
\def\authorsize{\normalsize\bfseries\raggedrightmargin{42mm}\let\sep=\authorsep}
\def\authorsep{~{\mathversion{bold}\ensuremath{\cdot}}\ }

\def\email@prefix{e-mail:~}
\def\@formatauthors{\begingroup
  \authorsize
  \leavevmode
  \gdef\surname##1{##1}%
  \gdef\email##1{ \hbox{(\email@prefix{\sffamily \lowercase{##1}})}}%
  \cnt@authors=0
  \def\@k@p##1{\advance\cnt@authors by 1}\@curauths
  \def\@k@p##1{\advance\cnt@authors by -1
    \ifnum\cnt@authors>1
    \@formatname{##1}{,}\penalty0\ \fi     % signif. space
    \ifnum\cnt@authors=1                               % before \fi's !!
    \@formatname{##1}{} \authorand \penalty0\ \fi
    \ifnum\cnt@authors<1
    \@formatname{##1}{}\par\fi}\@curauths
   \vskip \afterauthorskip
  \endgroup}


% Institute
\def\institutesize{\footnotesize\normalfont}
\def\@formatinstitute{\insert\footins{\institutesize
    \institutecase{\@curinst}\par}}
%


% Figure
\renewcommand{\fnum@figure}{{\bfseries\figurename~\thefigure.\/}}

% Table 
\renewcommand\thetable{\@arabic\c@table}
\renewcommand{\fnum@table}{{\bfseries\tablename~\thetable.\/}}

% Acknowledgements
\def\acknowledgements{\paragraph*{\acknowledgementsname}%
  \message{\acknowledgementsname}}
\newenvironment{ack}[1][Acknowledgement]{\footnotesize\paragraph*{#1}}{}
\newenvironment{acks}[1][Acknowledgements]{\footnotesize\paragraph*{#1}}{}


% Running head'ai
% % pirmas puslapis
\def\@jname{Solar Physics}
\def\@doi{\@doihead \@thedoi}
\def\@doihead{DOI:\space}
\def\@thedoi{10.1007/\textbullet\textbullet\textbullet\textbullet\textbullet-\textbullet\textbullet\textbullet-\textbullet\textbullet\textbullet-\textbullet\textbullet\textbullet\textbullet-\textbullet}
%
\def\ps@opening{%
  \def\@oddhead{\parbox[t]{\textwidth}{\footnotesize\@jname\\\@doi}}%
  \let\@evenhead\@oddhead
  \def\@oddfoot{\@gobble\idline\hfill}%\@copyrightfoot \@barcode\idline\@kapidentfoot\hss}
  \def\@evenfoot{\hfill\@gobble\idline}}
%

\def\ps@headings{%
  \def\@oddfoot{\idline\hfil }%
  \let\@evenfoot\@oddfoot
  \def\@evenhead{\rh@rule\hbox{}\@gobble{\rlap{\footnotesize\thepage}}\hfil
    \@markfont\mymyleftmark}%
  \def\@oddhead{\rh@rule\@markfont\mymyrightmark\hfill\@gobble{\llap{\footnotesize\thepage}}}%
}
\def\rh@rule{\leavevmode\lower6pt\hbox to0pt{\vrule height1pt width\textwidth\hss}}
\pagestyle{headings}

\def\@coprtyear{\textbullet\textbullet\textbullet\textbullet} 
\def\@volume{0}
\def\@@firstpage{\textbullet}
\def\@@lastpage{\textbullet}
\if@optionalrh
\def\mymyleftmark{\@runningauthor}%
\def\mymyrightmark{\@runningtitle}%
\else
\def\mymyleftmark{\@jname\@gobble{\ (\@coprtyear)
    \@volume:\@firstpage--\@lastpage}}
\let\mymyrightmark\mymyleftmark
\fi


% Springer Copyright
\def\sprcopyright{\gdef\@copyright{\copyright@size\copyright@text\vskip2\baselineskip}}
\def\copyright@text{\textcopyright\ Springer \textbullet\textbullet\textbullet\textbullet}
\let\copyright@size\footnotesize

\def\@maketitle{%
   \@arttype \@title \@subtitle \@authorsandinstitutes \@date  \@copyright
   \@abstract \@keywords \@abbreviations \@classification
   \@nomenclature \@translation \@dedication \@motto}
\sprcopyright


% Enumerate
  \def\kapenumargs{%
   \topsep        \smallskipamount
   \partopsep     \z@ \@plus 1pt
   \itemsep       \z@ \@plus \z@
   \parsep        \z@ \@plus 1pt
   \if@margspec \else \leftmargini   \z@ \fi
   \if@margspec \else \leftmarginii  1em \fi
   \if@margspec \else \leftmarginiii 1em \fi
   \if@margspec \else \leftmarginiv  1em \fi
   \if@margspec
     \leftmargin\csname leftmargin\romannumeral\@enumdepth\endcsname
     \labelwidth\leftmargin
     \advance\labelwidth-\labelsep
   \fi
   \rightmargin   \z@
   \listparindent \z@
   \itemindent    \z@
  }

\def\enumerate{\@ifnextchar[%
    {\kap@enumerate}%
    {\if@margspec \kap@enumerate[] \else \kap@enumerate[0] \fi }}

% Itemize

\def\kapitemargs{%
\itemsep \z@%
\parsep \z@%
\leftmargini\z@%
\itemindent\z@%
}

\def\labelitemi  {\textbullet}
\def\labelitemii {\textendash}
\def\labelitemiii{\textasteriskcentered} 
\def\labelitemiv {{\footnotesize +}}

\AtBeginDocument{\@ifundefined{urlstyle}{}{\urlstyle{sf}}}


\def\idline{\if@noid\else
    \rlap{\smash{\vtop to \id@boxheight{%
     \vfil\hbox to\textwidth{%
     \hfil\footnotesize\tt
     \jobname.tex; \TODAY;~\timenow;~p.\thepage}}}}%
   \fi}


\endinput