summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/amsaddr/amsaddr.sty
blob: bd3c7cf9f5406a4cbd0f9554ea44a6d0d3c21f86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
%%
%% This is file `amsaddr.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% amsaddr.dtx  (with options: `package')
%% 
%% Copyright (C) 2006 by Jérôme Lelong <jerome.lelong@gmail.com>
%% 
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3c of this license
%% or (at your option) any later version.  The latest version of this
%% license is in:
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
  \def\filename{amsaddr}
  \def\fileversion{v1.0}
  \def\filedate{2006/12/12}
  \ifx\protected@edef\@undefined
     \let\protected@edef\edef
  \fi
\newif\if@footaddr
\DeclareOption{foot}{\@footaddrtrue}
\ProcessOptions\relax
\newcounter{g@author}
\setcounter{g@author}{0}
\renewcommand{\author}[2][]{%
  \stepcounter{g@author}
  \ifx\@empty\authors
    \gdef\authors{#2}%
  \else
    \g@addto@macro\authors{\and#2}%
  \fi
  \g@addto@macro\addresses{\author{#2}}%
  \@ifnotempty{#1}{%
    \ifx\@empty\shortauthors
      \gdef\shortauthors{#1}%
    \else
      \g@addto@macro\shortauthors{\and#1}%
    \fi
  }%
}
\let\emails\@empty
\renewcommand{\email}[2][]{
  \ifx\@empty\emails
    \gdef\emails{\mbox{#2}}
  \else
    \g@addto@macro\emails{,\space\mbox{#2}}
  \fi
}
\def\@set@authors@addresses{\par
  \skip@30\p@
  \centering
  \begingroup
  \def\author##1{\par\vskip\skip@\MakeUppercase{##1}}%
  \def\\{\protect\linebreak}%
  \centering
  \def\address##1##2{\par\addvspace\bigskipamount%
    {\itshape\ignorespaces##2}%
  }%
  \def\email##1##2{%
    \@ifnotempty{##2}{, \ignorespaces{\ttfamily##2}}}%
  \def\curraddr##1##2{}%
  \def\urladdr##1##2{}%
  \addresses
  \endgroup
}
\def\@setfoot@addresses{
  \def\author##1{}%
  \def\\{\unskip, \ignorespaces}%
  \newif\if@firstaddr
  \@firstaddrtrue
  \def\address##1##2{%
    \if@firstaddr\@firstaddrfalse\else\par\fi
    \@ifnotempty{##1}{(\ignorespaces##1\unskip) }%
    {\scshape\ignorespaces##2}%
  }%
  \def\email##1##2{}%
  \def\curraddr##1##2{}%
  \def\urladdr##1##2{}%
  \addresses
}
\def\@setaddresses{\par
  \nobreak \begingroup
  \def\author##1{\nobreak\addvspace\bigskipamount}%
  \def\\{\unskip, \ignorespaces}%
  \interlinepenalty\@M
  \def\address##1##2{}%
  \def\email##1##2{}%
  \def\curraddr##1##2{\begingroup
    \@ifnotempty{##2}{\nobreak\indent{\itshape Current address}%
      \@ifnotempty{##1}{, \ignorespaces##1\unskip}\/:\space
      ##2\par}\endgroup}%
  \def\urladdr##1##2{\begingroup
    \@ifnotempty{##2}{\nobreak\indent{\itshape URL}%
      \@ifnotempty{##1}{, \ignorespaces##1\unskip}\/:\space
      \ttfamily##2\par}\endgroup}%
  \addresses
  \endgroup
}
\def\@setemails{%
  \ifnum\theg@author > 1
    \mbox{{\itshape E-mail addresses}:\space}{\ttfamily\emails}.
  \else
    \mbox{{\itshape E-mail address}:\space}{\ttfamily\emails}.
  \fi%
}
\def\@maketitle{%
  \normalfont\normalsize
  \let\@makefnmark\relax  \let\@thefnmark\relax
  \if@footaddr\@footnotetext{\@setfoot@addresses}\fi
  \ifx\@empty\emails\else \@footnotetext{\@setemails}\fi
  \ifx\@empty\@date\else \@footnotetext{\@setdate}\fi
  \ifx\@empty\@subjclass\else \@footnotetext{\@setsubjclass}\fi
  \ifx\@empty\@keywords\else \@footnotetext{\@setkeywords}\fi
  \ifx\@empty\thankses\else \@footnotetext{%
    \def\par{\let\par\@par}\@setthanks}\fi
  \@mkboth{\@nx\shortauthors}{\@nx\shorttitle}%
  \global\topskip42\p@\relax % 5.5pc   "   "   "     "     "
  \@settitle
  \if@footaddr\ifx\@empty\authors \else \@setauthors \fi
  \else%
     \ifx\@empty\authors \else \@set@authors@addresses \fi
  \fi
  \ifx\@empty\@dedicatory
  \else
    \baselineskip18\p@
    \vtop{\centering{\footnotesize\itshape\@dedicatory\@@par}%
      \global\dimen@i\prevdepth}\prevdepth\dimen@i
  \fi
  \@setabstract
  \normalsize
  \if@titlepage
    \newpage
  \else
    \dimen@34\p@ \advance\dimen@-\baselineskip
    \vskip\dimen@\relax
  \fi
  \let\addresses\relax
  \let\@setfoot@addresses\relax
} % end \@maketitle
\def\enddoc@text{
  \ifx\@empty\addresses\else \@setaddresses\fi
}
\endinput
%%
%% End of file `amsaddr.sty'.