diff options
author | Karl Berry <karl@freefriends.org> | 2020-11-24 22:14:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-11-24 22:14:52 +0000 |
commit | 512aad456fcefe6986fae2fb28ed6b984bee943b (patch) | |
tree | fced1c33944832e5b8881dff54346fbffdb074d6 | |
parent | 65729647c2eaf76d7e51c5875f01c54ba1e54d3d (diff) |
elsarticle (23nov20)
git-svn-id: svn://tug.org/texlive/trunk@56999 c570f23f-e606-0410-a88d-b1316a301751
15 files changed, 845 insertions, 73 deletions
diff --git a/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-harv.bst b/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-harv.bst index 3eaac4de6d0..3bf1acb435d 100644 --- a/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-harv.bst +++ b/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-harv.bst @@ -1,7 +1,7 @@ %% %% This is file `elsarticle-harv.bst' (Version 2.1), %% -%% Copyright 2009-2019 Elsevier Ltd +%% Copyright 2009-2020 Elsevier Ltd %% %% This file is part of the 'Elsarticle Bundle'. %% --------------------------------------------- @@ -13,9 +13,9 @@ %% and version 1.2 or later is part of all distributions of LaTeX %% version 1999/12/01 or later. %% -%% $Id: elsarticle-harv.bst 163 2019-01-14 09:54:24Z rishi $ +%% $Id: elsarticle-harv.bst 194 2020-11-23 11:29:27Z rishi $ %% -%% $URL: http://lenova.river-valley.com/svn/elsarticle/trunk/elsarticle-harv.bst $ +%% $URL: https://lenova.river-valley.com/svn/elsarticle/trunk/elsarticle-harv.bst $ %% ENTRY @@ -1595,3 +1595,4 @@ EXECUTE {end.bib} %% a. collaboration added. %% + diff --git a/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num-names.bst b/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num-names.bst index e61de97b2ef..562466a9096 100644 --- a/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num-names.bst +++ b/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num-names.bst @@ -1,7 +1,7 @@ %% %% This is file `elsarticle-num-names.bst' (Version 2.1), %% -%% Copyright 2009-2019 Elsevier Ltd +%% Copyright 2009-2020 Elsevier Ltd %% %% This file is part of the 'Elsarticle Bundle'. %% --------------------------------------------- @@ -13,9 +13,9 @@ %% and version 1.2 or later is part of all distributions of LaTeX %% version 1999/12/01 or later. %% -%% $Id: elsarticle-num-names.bst 163 2019-01-14 09:54:24Z rishi $ +%% $Id: elsarticle-num-names.bst 194 2020-11-23 11:29:27Z rishi $ %% -%% $URL: http://lenova.river-valley.com/svn/elsarticle/trunk/elsarticle-num-names.bst $ +%% $URL: https://lenova.river-valley.com/svn/elsarticle/trunk/elsarticle-num-names.bst $ %% %% @@ -1532,3 +1532,4 @@ EXECUTE {end.bib} %% 30.08.2012 %% a. collaboration added. + diff --git a/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num.bst b/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num.bst index 7c26b989b39..14499bfda7c 100644 --- a/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num.bst +++ b/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num.bst @@ -1,7 +1,7 @@ %% %% This is file `elsarticle-num.bst' (Version 2.1), %% -%% Copyright 2007-2019 Elsevier Ltd +%% Copyright 2007-2020 Elsevier Ltd %% %% This file is part of the 'Elsarticle Bundle'. %% --------------------------------------------- @@ -14,9 +14,9 @@ %% version 1999/12/01 or later. %% %% -%% $Id: elsarticle-num.bst 174 2019-04-05 09:50:32Z rishi $ +%% $Id: elsarticle-num.bst 194 2020-11-23 11:29:27Z rishi $ %% -%% $URL: http://lenova.river-valley.com/svn/elsarticle/trunk/elsarticle-num.bst $ +%% $URL: https://lenova.river-valley.com/svn/elsarticle/trunk/elsarticle-num.bst $ %% %% ---------------------------------------- @@ -1506,3 +1506,4 @@ EXECUTE {end.bib} %% %% End of file `elsarticle-num.bst'. + diff --git a/Master/texmf-dist/doc/latex/elsarticle/README b/Master/texmf-dist/doc/latex/elsarticle/README index cd0929a7d7c..d36127266b3 100644 --- a/Master/texmf-dist/doc/latex/elsarticle/README +++ b/Master/texmf-dist/doc/latex/elsarticle/README @@ -40,7 +40,7 @@ use the makefile. Use the target `all' (eg: make all). The above procedure will create a print version, namely elsdoc.pdf. -Copyright 2007-2019, Elsevier. Bugs, feature requests, suggestions and +Copyright 2007-2020, Elsevier. Bugs, feature requests, suggestions and comments may be mailed to elsarticle@stmdocs.in. elsarticle.cls, related documentation and supporting packages are released under the LATEX Project Public Licence, either version 1.3 or any later diff --git a/Master/texmf-dist/doc/latex/elsarticle/elsarticle-template-harv.tex b/Master/texmf-dist/doc/latex/elsarticle/elsarticle-template-harv.tex index 0b26bd2e8c0..ba637ca2052 100644 --- a/Master/texmf-dist/doc/latex/elsarticle/elsarticle-template-harv.tex +++ b/Master/texmf-dist/doc/latex/elsarticle/elsarticle-template-harv.tex @@ -1,5 +1,5 @@ %% -%% Copyright 2007-2019 Elsevier Ltd +%% Copyright 2007-2020 Elsevier Ltd %% %% This file is part of the 'Elsarticle Bundle'. %% --------------------------------------------- @@ -55,7 +55,7 @@ %% use the tnoteref command within \title for footnotes; %% use the tnotetext command for theassociated footnote; -%% use the fnref command within \author or \address for footnotes; +%% use the fnref command within \author or \affiliation for footnotes; %% use the fntext command for theassociated footnote; %% use the corref command within \author for corresponding author footnotes; %% use the cortext command for theassociated footnote; @@ -68,19 +68,40 @@ %% \ead[url]{home page} %% \fntext[label2]{} %% \cortext[cor1]{} -%% \address{Address\fnref{label3}} +%% \affiliation{organization={}, +%% addressline={}, +%% city={}, +%% postcode={}, +%% state={}, +%% country={}} %% \fntext[label3]{} \title{} %% use optional labels to link authors explicitly to addresses: %% \author[label1,label2]{} -%% \address[label1]{} -%% \address[label2]{} +%% \affiliation[label1]{organization={}, +%% addressline={}, +%% city={}, +%% postcode={}, +%% state={}, +%% country={}} +%% +%% \affiliation[label2]{organization={}, +%% addressline={}, +%% city={}, +%% postcode={}, +%% state={}, +%% country={}} \author{} -\address{} +\affiliation{organization={},%Department and Organization + addressline={}, + city={}, + postcode={}, + state={}, + country={}} \begin{abstract} %% Text of abstract diff --git a/Master/texmf-dist/doc/latex/elsarticle/elsarticle-template-num-names.tex b/Master/texmf-dist/doc/latex/elsarticle/elsarticle-template-num-names.tex index 46898bcb4e4..f4f618b2eae 100644 --- a/Master/texmf-dist/doc/latex/elsarticle/elsarticle-template-num-names.tex +++ b/Master/texmf-dist/doc/latex/elsarticle/elsarticle-template-num-names.tex @@ -1,5 +1,5 @@ %% -%% Copyright 2007-2019 Elsevier Ltd +%% Copyright 2007-2020 Elsevier Ltd %% %% This file is part of the 'Elsarticle Bundle'. %% --------------------------------------------- @@ -68,19 +68,40 @@ %% \ead[url]{home page} %% \fntext[label2]{} %% \cortext[cor1]{} -%% \address{Address\fnref{label3}} +%% \affiliation{organization={}, +%% addressline={}, +%% city={}, +%% postcode={}, +%% state={}, +%% country={}} %% \fntext[label3]{} \title{} %% use optional labels to link authors explicitly to addresses: %% \author[label1,label2]{} -%% \address[label1]{} -%% \address[label2]{} +%% \affiliation[label1]{organization={}, +%% addressline={}, +%% city={}, +%% postcode={}, +%% state={}, +%% country={}} +%% +%% \affiliation[label2]{organization={}, +%% addressline={}, +%% city={}, +%% postcode={}, +%% state={}, +%% country={}} \author{} -\address{} +\affiliation{organization={},%Department and Organization + addressline={}, + city={}, + postcode={}, + state={}, + country={}} \begin{abstract} %% Text of abstract diff --git a/Master/texmf-dist/doc/latex/elsarticle/elsarticle-template-num.tex b/Master/texmf-dist/doc/latex/elsarticle/elsarticle-template-num.tex index af5ce75c33a..6852a7e5c10 100644 --- a/Master/texmf-dist/doc/latex/elsarticle/elsarticle-template-num.tex +++ b/Master/texmf-dist/doc/latex/elsarticle/elsarticle-template-num.tex @@ -1,5 +1,5 @@ %% -%% Copyright 2007-2019 Elsevier Ltd +%% Copyright 2007-2020 Elsevier Ltd %% %% This file is part of the 'Elsarticle Bundle'. %% --------------------------------------------- @@ -21,7 +21,7 @@ %% %% %% -%% $Id: elsarticle-template-num.tex 168 2019-02-25 07:15:41Z apu.v $ +%% $Id: elsarticle-template-num.tex 190 2020-11-23 11:12:32Z rishi $ %% %% \documentclass[preprint,12pt]{elsarticle} @@ -75,19 +75,40 @@ %% \ead[url]{home page} %% \fntext[label2]{} %% \cortext[cor1]{} -%% \address{Address\fnref{label3}} +%% \affiliation{organization={}, +%% addressline={}, +%% city={}, +%% postcode={}, +%% state={}, +%% country={}} %% \fntext[label3]{} \title{} %% use optional labels to link authors explicitly to addresses: %% \author[label1,label2]{} -%% \address[label1]{} -%% \address[label2]{} +%% \affiliation[label1]{organization={}, +%% addressline={}, +%% city={}, +%% postcode={}, +%% state={}, +%% country={}} +%% +%% \affiliation[label2]{organization={}, +%% addressline={}, +%% city={}, +%% postcode={}, +%% state={}, +%% country={}} \author{} -\address{} +\affiliation{organization={},%Department and Organization + addressline={}, + city={}, + postcode={}, + state={}, + country={}} \begin{abstract} %% Text of abstract diff --git a/Master/texmf-dist/doc/latex/elsarticle/elsdoc.pdf b/Master/texmf-dist/doc/latex/elsarticle/elsdoc.pdf Binary files differindex 16698273347..47d7c8d3a2c 100644 --- a/Master/texmf-dist/doc/latex/elsarticle/elsdoc.pdf +++ b/Master/texmf-dist/doc/latex/elsarticle/elsdoc.pdf diff --git a/Master/texmf-dist/doc/latex/elsarticle/elsdoc.tex b/Master/texmf-dist/doc/latex/elsarticle/elsdoc.tex index 0c3e02cb319..e466bdd7fce 100644 --- a/Master/texmf-dist/doc/latex/elsarticle/elsdoc.tex +++ b/Master/texmf-dist/doc/latex/elsarticle/elsdoc.tex @@ -1,5 +1,5 @@ %% -%% Copyright 2007-2019 Elsevier Ltd +%% Copyright 2007-2020 Elsevier Ltd %% %% This file is part of the 'Elsarticle Bundle'. %% --------------------------------------------- @@ -14,7 +14,7 @@ %% The list of all files belonging to the 'Elsarticle Bundle' is %% given in the file `manifest.txt'. %% -%% $Id: elsdoc.tex 160 2019-01-14 09:25:49Z rishi $ +%% $Id: elsdoc.tex 192 2020-11-23 11:14:41Z rishi $ %% \documentclass[a4paper,12pt]{article} @@ -71,7 +71,7 @@ \author{Elsevier Ltd} \contact{elsarticle@stmdocs.in} -\version{3.2} +\version{3.3} \date{\today} \maketitle @@ -278,9 +278,7 @@ An example of coding the first type is provided below. \author[3]{CV Rajagopal\fnref{fn1,fn3}} \ead[url]{www.stmdocs.in} -\end{vquote} -\begin{vquote} \cortext[cor1]{Corresponding author} \fntext[fn1]{This is the first author footnote.} \fntext[fn2]{Another author footnote, this is a very long @@ -289,12 +287,27 @@ An example of coding the first type is provided below. lines of footnote text.} \fntext[fn3]{Yet another author footnote.} - \address[1]{Elsevier B.V., Radarweg 29, 1043 NX Amsterdam, - The Netherlands} - \address[2]{Sayahna Foundations, JWRA 34, Jagathy, - Trivandrum 695014, India} - \address[3]{STM Document Engineering Pvt Ltd., Mepukada, - Malayinkil, Trivandrum 695571, India} + \affiliation[1]{organization={Elsevier B.V.}, + addressline={Radarweg 29}, + postcode={1043 NX}, + city={Amsterdam}, + country={The Netherlands}} + + \affiliation[2]{organization={Sayahna Foundation}, + addressline={JWRA 34, Jagathy}, + city={Trivandrum} + postcode={695014}, + country={India}} +\end{vquote} + +\begin{vquote} + + \affiliation[3]{organization={STM Document Engineering + Pvt Ltd.}, + addressline={Mepukada, Malayinkil}, + city={Trivandrum} + postcode={695571}, + country={India}} \end{vquote} The output of the above \TeX{} source is given in Clips~\ref{clip1} and @@ -312,7 +325,7 @@ Clip~\ref{clip1} and the footer area is given in Clip~\ref{clip2}. \def\rulecolor{orange} Most of the commands such as \verb+\title+, \verb+\author+, -\verb+\address+ are self explanatory. Various components are +\verb+\affiliation+ are self explanatory. Various components are linked to each other by a label--reference mechanism; for instance, title footnote is linked to the title with a footnote mark generated by referring to the \verb+\label+ string of @@ -337,7 +350,7 @@ Given below are the syntax of various note marks and note texts. \noindent where \verb=<label(s)>= can be either one or more comma delimited label strings. The optional arguments to the \verb=\author= command holds the ref label(s) of the address(es) -to which the author is affiliated while each \verb=\address= +to which the author is affiliated while each \verb=\affiliation= command can have an optional argument of a label. In the same manner, \verb=\tnotetext=, \verb=\fntext=, \verb=\cortext= will have optional arguments as their respective labels and note text @@ -350,18 +363,28 @@ of author-affiliation. \author{Jos Migchielsen\corref{cor1}% \fnref{fn1}} \ead{J.Migchielsen@elsevier.com} - \address{Elsevier B.V., Radarweg 29, 1043 NX Amsterdam, - The Netherlands} + \affiliation[1]{organization={Elsevier B.V.}, + addressline={Radarweg 29}, + postcode={1043 NX}, + city={Amsterdam}, + country={The Netherlands}} \author{CV Radhakrishnan\fnref{fn2}} \ead{cvr@sayahna.org} - \address{Sayahna Foundations, JWRA 34, Jagathy, - Trivandrum 695014, India} + \affiliation[2]{organization={Sayahna Foundation}, + addressline={JWRA 34, Jagathy}, + city={Trivandrum} + postcode={695014}, + country={India}} \author{CV Rajagopal\fnref{fn1,fn3}} \ead[url]{www.stmdocs.in} - \address{STM Document Engineering Pvt Ltd., Mepukada, - Malayinkil, Trivandrum 695571, India} + \affiliation[3]{organization={STM Document Engineering + Pvt Ltd.}, + addressline={Mepukada, Malayinkil}, + city={Trivandrum} + postcode={695571}, + country={India}} \end{vquote} \vspace*{-.5pc} @@ -381,7 +404,7 @@ The output of the above \TeX{} source is given in Clip~\ref{clip3}. \src{Header of the title page..} \includeclip{1}{119 563 468 709}{1pseperateaug.pdf}%%{elstest-1p.pdf}%seperate author groups \def\rulecolor{orange} -\pagebreak +%\pagebreak Clip~\ref{clip4} shows the output after giving \verb+doubleblind+ class option. @@ -611,6 +634,7 @@ problem before submission for publication. in different types of final format. This is further discussed in section \ref{sec:final}, \nameref{sec:final}. +\enlargethispage*{\baselineskip} \subsection*{Displayed equations and double column journals} @@ -620,7 +644,21 @@ the formulae are too wide for the line width in print. Here is an example of an equation (see equation 6) which is perfect in a single column preprint format: -\bigskip +In normal course, articles are prepared and submitted in single column +format even if the final printed article will come in a double column +format journal. Here the problem is that when the article is typeset by +the typesetters for paginating and fit within the single column width, +they have to break the lengthy equations and align them properly. Even +if most of the tasks in preparing your proof is automated, the equation +breaking and aligning requires manual judgement, hence this task is manual. +When there comes a manual operation that area is error prone. Author +needs to check that equation pretty well. + +However if authors themselves break the equation to the single column +width typesetters need not want to touch these area and the proof authors +get will be without any errors. + +%\bigskip \setlength\Sep{6pt} \src{See equation (6)} \def\rulecolor{blue!70} @@ -697,7 +735,7 @@ Instruction for using these \verb+.bst+ files can be found at \href{http://support.stmdocs.in/wiki/index.php?title=Model-wise_bibliographic_style_files} {http://support.stmdocs.in} -\section{Graphical abstract and highlights} +\section[Graphical ...]{Graphical abstract and highlights} A template for adding graphical abstract and highlights are available now. This will appear as the first two pages of the PDF before the article content begins. @@ -763,11 +801,15 @@ Model $1+$ and $3+$ will have the same look and feel in the typeset copy when presented in this document. That is also the case with the double column $3+$ and $5+$ journal article pages. The only difference will be wider text width of -higher models. Therefore we will look at the -different portions of a typical single column journal page and -that of a double column article in the final format. +higher models. Here are the specimen single and double column journal +pages. + +%Therefore we will look at the +%different portions of a typical single column journal page and +%that of a double column article in the final format. +\begin{comment} \begin{center} \hypertarget{bsc}{} \hyperlink{sc}{ @@ -780,6 +822,11 @@ that of a double column article in the final format. {\bf [Specimen double column article -- Click here]} } \end{center} +\end{comment} + +\vspace*{-.5pc} + +\enlargethispage*{\baselineskip} \src{}\hypertarget{sc}{} \def\rulecolor{blue!70} @@ -791,5 +838,7 @@ that of a double column article in the final format. \hyperlink{bsc}{\includeclip{1}{27 61 562 758}{elstest-5p.pdf}} \def\rulecolor{orange} +~\hfill $\Box$ + \end{document} diff --git a/Master/texmf-dist/doc/latex/elsarticle/makefile b/Master/texmf-dist/doc/latex/elsarticle/makefile index 89f262a6f2b..7d7a2c930ae 100644 --- a/Master/texmf-dist/doc/latex/elsarticle/makefile +++ b/Master/texmf-dist/doc/latex/elsarticle/makefile @@ -1,4 +1,4 @@ -# $Id: makefile 162 2019-01-14 09:36:11Z rishi $ +# $Id: makefile 193 2020-11-23 11:15:37Z rishi $ file=elsdoc @@ -39,3 +39,4 @@ copy: + diff --git a/Master/texmf-dist/doc/latex/elsarticle/manifest.txt b/Master/texmf-dist/doc/latex/elsarticle/manifest.txt index d104860b23b..5b073e15269 100644 --- a/Master/texmf-dist/doc/latex/elsarticle/manifest.txt +++ b/Master/texmf-dist/doc/latex/elsarticle/manifest.txt @@ -1,4 +1,4 @@ -% Copyright 2007-2019 Elsevier Ltd +% Copyright 2007-2020 Elsevier Ltd % % This file is part of the 'Elsarticle Bundle'. % --------------------------------------------- @@ -76,3 +76,4 @@ Auxiliary packages needed to generate pdf output from elsdoc.tex: rvdtx.sty pdfwidgets.sty + diff --git a/Master/texmf-dist/doc/latex/elsarticle/rvdtx.sty b/Master/texmf-dist/doc/latex/elsarticle/rvdtx.sty index 3f16af71969..b2c55116081 100644 --- a/Master/texmf-dist/doc/latex/elsarticle/rvdtx.sty +++ b/Master/texmf-dist/doc/latex/elsarticle/rvdtx.sty @@ -4,7 +4,7 @@ % % Auxiliary package to format *.dtx documents. % -% Copyright (c) 2008-2019 CV Radhakrishnan <cvr@stmdocs.in>, +% Copyright (c) 2008-2020 CV Radhakrishnan <cvr@stmdocs.in>, % % This file may be distributed and/or modified under the conditions % of the LaTeX Project Public License, either version 1.2 of this @@ -262,7 +262,7 @@ \def\keywords#1{\gdef\@keywords{#1}} \def\@keywords{\LaTeX, \xml} -\long\def\Hrule{\\[-4pt]\hspace*{-3em}% +\long\def\Hrule{\\\hspace*{-3em}% {\color{quicklinkrulecolor}\rule{\linewidth}{.1pt}}\\} \long\def\dtxmarkone[#1][#2]#3#4#5{\def\next{#1}% @@ -271,7 +271,8 @@ \newcounter{dtx} \long\def\dtxmarktwo[#1][#2]#3#4#5{\def\next{#1}% - \stepcounter{dtx}\parbox{.45\linewidth}% +% \stepcounter{dtx}\parbox{.45\linewidth}% + \stepcounter{dtx}\parbox[][11pt][b]{.45\linewidth}% {\ifcase\next\or\Hlink{#4}{#3}\fi}% \ifodd\thedtx\relax\else\Hrule\fi} @@ -294,7 +295,8 @@ \hfill \parbox[c][2in][c]{.35\paperwidth}% {\normalfont\footnotesize\sffamily\color{quicklinkcolor}% - \advance\baselineskip-3pt% +% \advance\baselineskip-3pt% + \advance\baselineskip-5pt% \vspace*{6pt} QUICK LINKS\Hrule \IfFileExists{tmp.out}{\input tmp.out}{}% }\hspace*{5mm}% @@ -307,7 +309,7 @@ {\normalfont\sffamily\footnotesize% \color{botcolor}% \hspace*{5mm}\parbox[c][.5in][c]{.45\paperwidth}% - {\raggedright \textcopyright\ 2019, Elsevier Ltd. + {\raggedright \textcopyright\ \the\year, Elsevier Ltd. Bugs, feature requests, suggestions and comments %\\ shall be mailed to \href{mailto:elsarticle@stmdocs.in} {$<$elsarticle@stmdocs.in$>$}. diff --git a/Master/texmf-dist/source/latex/elsarticle/elsarticle.dtx b/Master/texmf-dist/source/latex/elsarticle/elsarticle.dtx index 187b6d5b0c6..a5a0a0b3b52 100644 --- a/Master/texmf-dist/source/latex/elsarticle/elsarticle.dtx +++ b/Master/texmf-dist/source/latex/elsarticle/elsarticle.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2007-2019 by Elsevier Ltd +% Copyright (C) 2007-2020 by Elsevier Ltd % ----------------------------------------------- % % This file may be distributed and/or modified under the @@ -14,10 +14,10 @@ % version 1999/12/01 or later. % % \fi -% \CheckSum{2634} +% \CheckSum{3243} % -% $Id: elsarticle.dtx 167 2019-02-25 07:12:21Z apu.v $ -% $URL: http://lenova.river-valley.com/svn/elsarticle/trunk/elsarticle.dtx $ +% $Id: elsarticle.dtx 190 2020-11-23 11:12:32Z rishi $ +% $URL: https://lenova.river-valley.com/svn/elsarticle/trunk/elsarticle.dtx $ % \iffalse %<*driver> \documentclass{ltxdoc} @@ -58,6 +58,11 @@ % with amsref.sty, fncylab.sty have been fixed. Some bugs related % to author/affiliation part have been fixed.} % +% +% \changes{v3.3}{2020/11/20}{Defined \string\affiliation command for structured +% address tagging.} +% +% % \GetFileInfo{elsarticle.dtx} % % \DoNotIndex{\newcommand,\newenvironment} @@ -78,8 +83,8 @@ %% %% \def\RCSfile{elsarticle}% - \def\RCSversion{3.2}% - \def\RCSdate{2019/02/25}% + \def\RCSversion{3.3}% + \def\RCSdate{2020/11/20}% \def\@shortjnl{\relax} \def\@journal{Elsevier Ltd} \def\@company{Elsevier Ltd} @@ -94,6 +99,16 @@ \newif\ifnopreprintline \nopreprintlinefalse \newif\ifdoubleblind \doubleblindfalse +\newif\ifuseexplthreefunctions \useexplthreefunctionsfalse + +\IfFileExists{expl3.sty}{% + \global\useexplthreefunctionstrue% + \RequirePackage{expl3}}{} +\ifuseexplthreefunctions\relax% + \IfFileExists{xparse.sty}{\RequirePackage{xparse}}{} + \IfFileExists{etoolbox.sty}{\RequirePackage{etoolbox}}{} +\fi + \def\@blstr{1} \newdimen\@bls \@bls=\baselineskip @@ -339,7 +354,6 @@ \def\elsaddress{} \def\addsep{\par\vskip6pt} -\def\address{\@ifnextchar[{\@@address}{\@address}} \def\@alph#1{% \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or @@ -371,6 +385,322 @@ \newcounter{affn} \renewcommand\theaffn{\alph{affn}} +\ifuseexplthreefunctions\relax% + \ExplSyntaxOn + \def\ca_affitem_postskip{\mbox{~}\unskip\ignorespaces} + %%Author Address + \DeclareDocumentCommand \ca_organization { O{,} m } + { + % #2 #1\mbox{~}\unskip\ignorespaces + \csgappto { ca_affiliation_values } { #2 #1\ca_affitem_postskip } + } + \DeclareDocumentCommand \ca_postal_code { O{,} m } + { + % #2 #1\mbox{~}\unskip\ignorespaces + \csgappto { ca_affiliation_values } { #2 #1\ca_affitem_postskip } + } + \DeclareDocumentCommand \ca_aff_city { O{,} m } + { + % #2 #1\mbox{~}\unskip\ignorespaces + \csgappto { ca_affiliation_values } { #2 #1\ca_affitem_postskip } + } + \DeclareDocumentCommand \ca_address_line { O{,}m } + { + % #2 #1\mbox{~}\unskip\ignorespaces + \csgappto { ca_affiliation_values } { #2 #1\ca_affitem_postskip } + } + \DeclareDocumentCommand \ca_state { O{,} m } + { + % #2 #1\mbox{~}\unskip\ignorespaces + \csgappto { ca_affiliation_values } { #2 #1\ca_affitem_postskip } + } + \DeclareDocumentCommand \ca_country { O{ } m } + { + % #2 #1 + \csgappto { ca_affiliation_values } { #2 #1 } + } + + \DeclareDocumentCommand \ca_stm_organization { O{,} m } + { + #2 #1\ca_affitem_postskip + } + \DeclareDocumentCommand \ca_stm_postal_code { O{,} m } + { + #2 #1\ca_affitem_postskip + } + \DeclareDocumentCommand \ca_stm_aff_city { O{,} m } + { + #2 #1\ca_affitem_postskip + } + \DeclareDocumentCommand \ca_stm_aff_address_line { O{,}m } + { + #2 #1\ca_affitem_postskip + } + \DeclareDocumentCommand \ca_stm_state { O{,} m } + { + #2 #1\ca_affitem_postskip + } + \DeclareDocumentCommand \ca_stm_country { O{ } m } + { + #2 #1 + } + + \keys_define:nn { stm / affiliation } + { + op .tl_set_x:N = \l_organization_punc_tl, + oraganizationsep .tl_set_x:N = \l_organization_punc_tl, + ap .tl_set_x:N = \l_address_line_punc_tl, + addresslinesep .tl_set_x:N = \l_address_line_punc_tl, + cp .tl_set_x:N = \l_city_punc_tl, + citysep .tl_set_x:N = \l_city_punc_tl, + pp .tl_set_x:N = \l_postal_code_punc_tl, + postcodesep .tl_set_x:N = \l_postal_code_punc_tl, + sp .tl_set_x:N = \l_state_punc_tl, + statesep .tl_set_x:N = \l_state_punc_tl, + o .code:n = { \ca_organization[\l_organization_punc_tl]{#1} }, + organization .code:n = { \ca_organization[\l_organization_punc_tl]{#1} }, + a .code:n = { \ca_address_line[\l_address_line_punc_tl]{#1} }, + addressline .code:n = { \ca_address_line[\l_address_line_punc_tl]{#1} }, + c .code:n = { \ca_aff_city[\l_city_punc_tl]{#1} }, + city .code:n = { \ca_aff_city[\l_city_punc_tl]{#1} }, + p .code:n = { \ca_postal_code[\l_postal_code_punc_tl]{#1} }, + postcode .code:n = { \ca_postal_code[\l_postal_code_punc_tl]{#1} }, + s .code:n = { \ca_state[\l_state_punc_tl]{#1} }, + state .code:n = { \ca_state[\l_state_punc_tl]{#1} }, + orp .tl_set_x:N = \l_organization_punc_tl, + adp .tl_set_x:N = \l_address_line_punc_tl, + cip .tl_set_x:N = \l_city_punc_tl, + pcp .tl_set_x:N = \l_postal_code_punc_tl, + stp .tl_set_x:N = \l_state_punc_tl, + cyp .tl_set_x:N = \l_country_punc_tl, + or .code:n = { \ca_organization[\l_organization_punc_tl]{#1} }, + ad .code:n = { \ca_address_line[\l_address_line_punc_tl]{#1} }, + ci .code:n = { \ca_aff_city[\l_city_punc_tl]{#1} }, + pc .code:n = { \ca_postal_code[\l_postal_code_punc_tl]{#1} }, + st .code:n = { \ca_state[\l_state_punc_tl]{#1} }, + cy .code:n = { \ca_country[\l_country_punc_tl]{#1} }, + country .code:n = { \ca_country[\l_country_punc_tl]{#1} }, + unknown .code:n = { + \ifstrempty { #1 } { + \csxappto { ca_affiliation_values } + { {\l_keys_key_tl}~ } + } { + \csxappto { ca_affiliation_values } + { {#1}~ } + } + } + } + + \cs_set:Npn \__reset_affiliation: + { + \tl_gset:Nn \l_organization_punc_tl { , } + \tl_gset:Nn \l_address_line_punc_tl { , } + \tl_gset:Nn \l_city_punc_tl { , } + \tl_gset:Nn \l_postal_code_punc_tl { , } + \tl_gset:Nn \l_state_punc_tl { , } + \tl_gset:Nn \l_country_punc_tl { } + } + + \DeclareDocumentCommand\affiliation{ o m }{ + \__reset_affiliation: + \csgdef { ca_affiliation_values } { } + \IfNoValueTF { #2 } + { } + { + \keys_set:nn { stm / affiliation } { #2 } + } + \csgappto{elsaddress}{ + \def\baselinestretch{1}% + \refstepcounter{affn} + \xdef\@currentlabel{\theaffn} + \IfNoValueTF { #1 } + { } + { \elsLabel{#1} } + \textsuperscript{\theaffn}} + \csxappto{elsaddress}{ + \csuse { ca_affiliation_values } + \par + } + } + \ExplSyntaxOff + \else% + \def\caaffitempostskip{\space} + + \DeclareRobustCommand\caorganization[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\capostalcode[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\caaffcity[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\caaddressline[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\castate[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\cacountry[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\castmorganization[2][,]{% + #2#1\caaffitempostskip% + } + \DeclareRobustCommand\castmpostalcode[2][,]{% + #2#1\caaffitempostskip% + } + \DeclareRobustCommand\castmaffcity[2][,]{% + #2#1\caaffitempostskip% + } + \DeclareRobustCommand\castmaddressline[2][,]{% + #2#1\caaffitempostskip% + } + \DeclareRobustCommand\castmstate[2][,]{% + #2#1\caaffitempostskip% + } + \DeclareRobustCommand\castmcountry[2][,]{% + #2#1\caaffitempostskip% + } + + \define@key{affiliation}{op}{\xdef\@organizationpunc{#1}} + \define@key{affiliation}{orp}{\xdef\@organizationpunc{#1}} + \define@key{affiliation}{organizationsep}{\xdef\@organizationpunc{#1}} + \define@key{affiliation}{ap}{\xdef\@addresslinepunc{#1}} + \define@key{affiliation}{adp}{\xdef\@addresslinepunc{#1}} + \define@key{affiliation}{addresslinesep}{\xdef\@addresslinepunc{#1}} + \define@key{affiliation}{cp}{\xdef\@citypunc{#1}} + \define@key{affiliation}{cip}{\xdef\@citypunc{#1}} + \define@key{affiliation}{cyp}{\xdef\@countrypunc{#1}} + \define@key{affiliation}{citysep}{\xdef\@citypunc{#1}} + \define@key{affiliation}{pp}{\xdef\@postcodepunc{#1}} + \define@key{affiliation}{pop}{\xdef\@postcodepunc{#1}} + \define@key{affiliation}{postcodesep}{\xdef\@postcodepunc{#1}} + \define@key{affiliation}{sp}{\xdef\@statepunc{#1}} + \define@key{affiliation}{stp}{\xdef\@statepunc{#1}} + \define@key{affiliation}{statesep}{\xdef\@statepunc{#1}} + \define@key{affiliation}{countrysep}{\xdef\@countrypunc{#1}} + + \define@key{affiliation}{organization}{% + \caorganization[\@organizationpunc]{#1}} + \define@key{affiliation}{addressline}{% + \caaddressline[\@addresslinepunc]{#1}} + \define@key{affiliation}{city}{% + \caaffcity[\@citypunc]{#1}} + \define@key{affiliation}{postcode}{% + \capostalcode[\@postcodepunc]{#1}} + \define@key{affiliation}{state}{% + \castate[\@statepunc]{#1}} + \define@key{affiliation}{or}{% + \caorganization[\@organizationpunc]{#1}} + \define@key{affiliation}{ad}{% + \caaddressline[\@addresslinepunc]{#1}} + \define@key{affiliation}{ci}{% + \caaffcity[\@citypunc]{#1}} + \define@key{affiliation}{po}{% + \capostalcode[\@postcodepunc]{#1}} + \define@key{affiliation}{st}{% + \castate[\@statepunc]{#1}} + \define@key{affiliation}{o}{% + \caorganization[\@organizationpunc]{#1}} + \define@key{affiliation}{a}{% + \caaddressline[\@addresslinepunc]{#1}} + \define@key{affiliation}{c}{% + \cacity[\@citypunc]{#1}} + \define@key{affiliation}{p}{% + \capostcode[\@postcodepunc]{#1}} + \define@key{affiliation}{s}{% + \castate[\@statepunc]{#1}} + \define@key{affiliation}{cy}{% + \cacountry[\@countrypunc]{#1}} + \define@key{affiliation}{country}{% + \cacountry[\@countrypunc]{#1}} + + + \gdef\@resetaffiliation{% + \gdef\@organizationpunc{,}% + \gdef\@addresslinepunc{,}% + \gdef\@citypunc{,}% + \gdef\@statepunc{,}% + \gdef\@postcodepunc{,}% + \gdef\@countrypunc{}% + } + + \def\affiliation{\@ifnextchar[{\@@affiliation}{\@affiliation}} + + \newcommand*{\newstmrobustcmd}{} + \protected\def\newstmrobustcmd{\@star@or@long\stmetb@new@command} + + \def\stmetb@new@command#1{\@testopt{\stmetb@newcommand#1}0} + + \def\stmetb@newcommand#1[#2]{% + \@ifnextchar[%] + {\stmetb@xargdef#1[#2]} + {\ifx\l@ngrel@x\relax + \let\l@ngrel@x\protected + \else + \protected\def\l@ngrel@x{\protected\long}% + \fi + \@argdef#1[#2]}} + + \long\def\stmetb@xargdef#1[#2][#3]#4{% + \@ifdefinable#1{% + \expandafter\protected + \expandafter\def + \expandafter#1% + \expandafter{% + \expandafter\@testopt + \csname\string#1\endcsname{#3}}% + \expandafter\@yargdef\csname\string#1\endcsname\tw@{#2}{#4}}} + % + \newcommand{\ifstmundef}[1]{% + \ifdefined#1% + \ifx#1\relax + \expandafter\expandafter + \expandafter\@firstoftwo + \else + \expandafter\expandafter + \expandafter\@secondoftwo + \fi + \else + \expandafter\@firstoftwo + \fi} + \newcommand{\stmexpandonce}[1]{% + \unexpanded\expandafter{#1}} + \newstmrobustcmd{\gstmappto}[2]{% + \ifundef{#1} + {\xdef#1{\unexpanded{#2}}} + {\xdef#1{\stmexpandonce#1\unexpanded{#2}}}} + \newstmrobustcmd{\xstmappto}[2]{% + \ifstmundef{#1} + {\xdef#1{#2}} + {\xdef#1{\stmexpandonce#1#2}}} + + + \long\def\@@affiliation[#1]#2{% + \@resetaffiliation% + \gdef\caaffiliationvalues{}% + \elsLabel{#1}% + \setkeys{affiliation}{#2}% + \g@addto@macro\elsaddress{% + \def\baselinestretch{1}% + \refstepcounter{affn}% + \xdef\@currentlabel{\theaffn}% + \elsLabel{#1}% + \textsuperscript{\theaffn}} + \xstmappto\elsaddress{\caaffiliationvalues\par}} + + \long\def\@affiliation#1{% + \@resetaffiliation% + \gdef\caaffiliationvalues{}% + \setkeys{affiliation}{#1}% + \g@addto@macro\elsauthors{% + \def\baselinestretch{1}}% + \xstmappto\elsaddress{\caaffiliationvalues\par}} +\fi + +\def\address{\@ifnextchar[{\@@address}{\@address}} + \long\def\@@address[#1]#2{\g@addto@macro\elsaddress{% \def\baselinestretch{1}% \refstepcounter{affn} diff --git a/Master/texmf-dist/source/latex/elsarticle/elsarticle.ins b/Master/texmf-dist/source/latex/elsarticle/elsarticle.ins index a70fae6161e..53ea4ac19bc 100644 --- a/Master/texmf-dist/source/latex/elsarticle/elsarticle.ins +++ b/Master/texmf-dist/source/latex/elsarticle/elsarticle.ins @@ -3,7 +3,7 @@ %% driver files from the doc files in this package when run through %% LaTeX or TeX. %% -%% Copyright 2007-2019 Elsevier Ltd +%% Copyright 2007-2020 Elsevier Ltd %% %% This file is part of the 'Elsarticle Bundle'. %% --------------------------------------------- @@ -18,7 +18,7 @@ %% The list of all files belonging to the 'Elsarticle Bundle' is %% given in the file 'manifest.txt'. %% -%% $Id: elsarticle.ins 164 2019-01-14 09:57:55Z rishi $ +%% $Id: elsarticle.ins 191 2020-11-23 11:13:24Z rishi $ %% %% \input docstrip.tex @@ -26,7 +26,7 @@ \preamble -Copyright 2007-2019 Elsevier Ltd +Copyright 2007-2020 Elsevier Ltd This file is part of the 'Elsarticle Bundle'. ------------------------------------------- diff --git a/Master/texmf-dist/tex/latex/elsarticle/elsarticle.cls b/Master/texmf-dist/tex/latex/elsarticle/elsarticle.cls index 53a1072651a..cf20bdff618 100644 --- a/Master/texmf-dist/tex/latex/elsarticle/elsarticle.cls +++ b/Master/texmf-dist/tex/latex/elsarticle/elsarticle.cls @@ -6,7 +6,7 @@ %% %% elsarticle.dtx (with options: `class') %% -%% Copyright 2007-2019 Elsevier Ltd +%% Copyright 2007-2020 Elsevier Ltd %% %% This file is part of the 'Elsarticle Bundle'. %% ------------------------------------------- @@ -25,8 +25,8 @@ %% %% \def\RCSfile{elsarticle}% - \def\RCSversion{3.2}% - \def\RCSdate{2019/02/25}% + \def\RCSversion{3.3}% + \def\RCSdate{2020/11/20}% \def\@shortjnl{\relax} \def\@journal{Elsevier Ltd} \def\@company{Elsevier Ltd} @@ -41,6 +41,16 @@ \newif\ifnopreprintline \nopreprintlinefalse \newif\ifdoubleblind \doubleblindfalse +\newif\ifuseexplthreefunctions \useexplthreefunctionsfalse + +\IfFileExists{expl3.sty}{% + \global\useexplthreefunctionstrue% + \RequirePackage{expl3}}{} +\ifuseexplthreefunctions\relax% +\IfFileExists{xparse.sty}{\RequirePackage{xparse}}{} +\IfFileExists{etoolbox.sty}{\RequirePackage{etoolbox}}{} +\fi + \def\@blstr{1} \newdimen\@bls \@bls=\baselineskip @@ -280,7 +290,6 @@ \def\elsaddress{} \def\addsep{\par\vskip6pt} -\def\address{\@ifnextchar[{\@@address}{\@address}} \def\@alph#1{% \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or @@ -312,6 +321,320 @@ \newcounter{affn} \renewcommand\theaffn{\alph{affn}} +\ifuseexplthreefunctions\relax% + \ExplSyntaxOn + \def\ca_affitem_postskip{\mbox{~}\unskip\ignorespaces} + %%Author Address + \DeclareDocumentCommand \ca_organization { O{,} m } + { + % #2 #1\mbox{~}\unskip\ignorespaces + \csgappto { ca_affiliation_values } { #2 #1\ca_affitem_postskip } + } + \DeclareDocumentCommand \ca_postal_code { O{,} m } + { + % #2 #1\mbox{~}\unskip\ignorespaces + \csgappto { ca_affiliation_values } { #2 #1\ca_affitem_postskip } + } + \DeclareDocumentCommand \ca_aff_city { O{,} m } + { + % #2 #1\mbox{~}\unskip\ignorespaces + \csgappto { ca_affiliation_values } { #2 #1\ca_affitem_postskip } + } + \DeclareDocumentCommand \ca_address_line { O{,}m } + { + % #2 #1\mbox{~}\unskip\ignorespaces + \csgappto { ca_affiliation_values } { #2 #1\ca_affitem_postskip } + } + \DeclareDocumentCommand \ca_state { O{,} m } + { + % #2 #1\mbox{~}\unskip\ignorespaces + \csgappto { ca_affiliation_values } { #2 #1\ca_affitem_postskip } + } + \DeclareDocumentCommand \ca_country { O{ } m } + { + % #2 #1 + \csgappto { ca_affiliation_values } { #2 #1 } + } + + \DeclareDocumentCommand \ca_stm_organization { O{,} m } + { + #2 #1\ca_affitem_postskip + } + \DeclareDocumentCommand \ca_stm_postal_code { O{,} m } + { + #2 #1\ca_affitem_postskip + } + \DeclareDocumentCommand \ca_stm_aff_city { O{,} m } + { + #2 #1\ca_affitem_postskip + } + \DeclareDocumentCommand \ca_stm_aff_address_line { O{,}m } + { + #2 #1\ca_affitem_postskip + } + \DeclareDocumentCommand \ca_stm_state { O{,} m } + { + #2 #1\ca_affitem_postskip + } + \DeclareDocumentCommand \ca_stm_country { O{ } m } + { + #2 #1 + } + + \keys_define:nn { stm / affiliation } + { + op .tl_set_x:N = \l_organization_punc_tl, + oraganizationsep .tl_set_x:N = \l_organization_punc_tl, + ap .tl_set_x:N = \l_address_line_punc_tl, + addresslinesep .tl_set_x:N = \l_address_line_punc_tl, + cp .tl_set_x:N = \l_city_punc_tl, + citysep .tl_set_x:N = \l_city_punc_tl, + pp .tl_set_x:N = \l_postal_code_punc_tl, + postcodesep .tl_set_x:N = \l_postal_code_punc_tl, + sp .tl_set_x:N = \l_state_punc_tl, + statesep .tl_set_x:N = \l_state_punc_tl, + o .code:n = { \ca_organization[\l_organization_punc_tl]{#1} }, + organization .code:n = { \ca_organization[\l_organization_punc_tl]{#1} }, + a .code:n = { \ca_address_line[\l_address_line_punc_tl]{#1} }, + addressline .code:n = { \ca_address_line[\l_address_line_punc_tl]{#1} }, + c .code:n = { \ca_aff_city[\l_city_punc_tl]{#1} }, + city .code:n = { \ca_aff_city[\l_city_punc_tl]{#1} }, + p .code:n = { \ca_postal_code[\l_postal_code_punc_tl]{#1} }, + postcode .code:n = { \ca_postal_code[\l_postal_code_punc_tl]{#1} }, + s .code:n = { \ca_state[\l_state_punc_tl]{#1} }, + state .code:n = { \ca_state[\l_state_punc_tl]{#1} }, + orp .tl_set_x:N = \l_organization_punc_tl, + adp .tl_set_x:N = \l_address_line_punc_tl, + cip .tl_set_x:N = \l_city_punc_tl, + pcp .tl_set_x:N = \l_postal_code_punc_tl, + stp .tl_set_x:N = \l_state_punc_tl, + cyp .tl_set_x:N = \l_country_punc_tl, + or .code:n = { \ca_organization[\l_organization_punc_tl]{#1} }, + ad .code:n = { \ca_address_line[\l_address_line_punc_tl]{#1} }, + ci .code:n = { \ca_aff_city[\l_city_punc_tl]{#1} }, + pc .code:n = { \ca_postal_code[\l_postal_code_punc_tl]{#1} }, + st .code:n = { \ca_state[\l_state_punc_tl]{#1} }, + cy .code:n = { \ca_country[\l_country_punc_tl]{#1} }, + country .code:n = { \ca_country[\l_country_punc_tl]{#1} }, + unknown .code:n = { + \ifstrempty { #1 } { + \csxappto { ca_affiliation_values } + { {\l_keys_key_tl}~ } + } { + \csxappto { ca_affiliation_values } + { {#1}~ } + } + } + } + + \cs_set:Npn \__reset_affiliation: + { + \tl_gset:Nn \l_organization_punc_tl { , } + \tl_gset:Nn \l_address_line_punc_tl { , } + \tl_gset:Nn \l_city_punc_tl { , } + \tl_gset:Nn \l_postal_code_punc_tl { , } + \tl_gset:Nn \l_state_punc_tl { , } + \tl_gset:Nn \l_country_punc_tl { } + } + + \DeclareDocumentCommand\affiliation{ o m }{ + \__reset_affiliation: + \csgdef { ca_affiliation_values } { } + \IfNoValueTF { #2 } + { } + { + \keys_set:nn { stm / affiliation } { #2 } + } + \csgappto{elsaddress}{ + \def\baselinestretch{1}% + \refstepcounter{affn} + \xdef\@currentlabel{\theaffn} + \IfNoValueTF { #1 } + { } + { \elsLabel{#1} } + \textsuperscript{\theaffn}} + \csxappto{elsaddress}{ + \csuse { ca_affiliation_values } + \par + } + } + \ExplSyntaxOff + \else% + \def\caaffitempostskip{\space} + + \DeclareRobustCommand\caorganization[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\capostalcode[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\caaffcity[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\caaddressline[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\castate[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\cacountry[2][,]{% + \g@addto@macro\caaffiliationvalues{#2#1\caaffitempostskip}% + } + \DeclareRobustCommand\castmorganization[2][,]{% + #2#1\caaffitempostskip% + } + \DeclareRobustCommand\castmpostalcode[2][,]{% + #2#1\caaffitempostskip% + } + \DeclareRobustCommand\castmaffcity[2][,]{% + #2#1\caaffitempostskip% + } + \DeclareRobustCommand\castmaddressline[2][,]{% + #2#1\caaffitempostskip% + } + \DeclareRobustCommand\castmstate[2][,]{% + #2#1\caaffitempostskip% + } + \DeclareRobustCommand\castmcountry[2][,]{% + #2#1\caaffitempostskip% + } + + \define@key{affiliation}{op}{\xdef\@organizationpunc{#1}} + \define@key{affiliation}{orp}{\xdef\@organizationpunc{#1}} + \define@key{affiliation}{organizationsep}{\xdef\@organizationpunc{#1}} + \define@key{affiliation}{ap}{\xdef\@addresslinepunc{#1}} + \define@key{affiliation}{adp}{\xdef\@addresslinepunc{#1}} + \define@key{affiliation}{addresslinesep}{\xdef\@addresslinepunc{#1}} + \define@key{affiliation}{cp}{\xdef\@citypunc{#1}} + \define@key{affiliation}{cip}{\xdef\@citypunc{#1}} + \define@key{affiliation}{cyp}{\xdef\@countrypunc{#1}} + \define@key{affiliation}{citysep}{\xdef\@citypunc{#1}} + \define@key{affiliation}{pp}{\xdef\@postcodepunc{#1}} + \define@key{affiliation}{pop}{\xdef\@postcodepunc{#1}} + \define@key{affiliation}{postcodesep}{\xdef\@postcodepunc{#1}} + \define@key{affiliation}{sp}{\xdef\@statepunc{#1}} + \define@key{affiliation}{stp}{\xdef\@statepunc{#1}} + \define@key{affiliation}{statesep}{\xdef\@statepunc{#1}} + \define@key{affiliation}{countrysep}{\xdef\@countrypunc{#1}} + + \define@key{affiliation}{organization}{% + \caorganization[\@organizationpunc]{#1}} + \define@key{affiliation}{addressline}{% + \caaddressline[\@addresslinepunc]{#1}} + \define@key{affiliation}{city}{% + \caaffcity[\@citypunc]{#1}} + \define@key{affiliation}{postcode}{% + \capostalcode[\@postcodepunc]{#1}} + \define@key{affiliation}{state}{% + \castate[\@statepunc]{#1}} + \define@key{affiliation}{or}{% + \caorganization[\@organizationpunc]{#1}} + \define@key{affiliation}{ad}{% + \caaddressline[\@addresslinepunc]{#1}} + \define@key{affiliation}{ci}{% + \caaffcity[\@citypunc]{#1}} + \define@key{affiliation}{po}{% + \capostalcode[\@postcodepunc]{#1}} + \define@key{affiliation}{st}{% + \castate[\@statepunc]{#1}} + \define@key{affiliation}{o}{% + \caorganization[\@organizationpunc]{#1}} + \define@key{affiliation}{a}{% + \caaddressline[\@addresslinepunc]{#1}} + \define@key{affiliation}{c}{% + \cacity[\@citypunc]{#1}} + \define@key{affiliation}{p}{% + \capostcode[\@postcodepunc]{#1}} + \define@key{affiliation}{s}{% + \castate[\@statepunc]{#1}} + \define@key{affiliation}{cy}{% + \cacountry[\@countrypunc]{#1}} + \define@key{affiliation}{country}{% + \cacountry[\@countrypunc]{#1}} + + \gdef\@resetaffiliation{% + \gdef\@organizationpunc{,}% + \gdef\@addresslinepunc{,}% + \gdef\@citypunc{,}% + \gdef\@statepunc{,}% + \gdef\@postcodepunc{,}% + \gdef\@countrypunc{}% + } + + \def\affiliation{\@ifnextchar[{\@@affiliation}{\@affiliation}} + + \newcommand*{\newstmrobustcmd}{} + \protected\def\newstmrobustcmd{\@star@or@long\stmetb@new@command} + + \def\stmetb@new@command#1{\@testopt{\stmetb@newcommand#1}0} + + \def\stmetb@newcommand#1[#2]{% + \@ifnextchar[%] + {\stmetb@xargdef#1[#2]} + {\ifx\l@ngrel@x\relax + \let\l@ngrel@x\protected + \else + \protected\def\l@ngrel@x{\protected\long}% + \fi + \@argdef#1[#2]}} + + \long\def\stmetb@xargdef#1[#2][#3]#4{% + \@ifdefinable#1{% + \expandafter\protected + \expandafter\def + \expandafter#1% + \expandafter{% + \expandafter\@testopt + \csname\string#1\endcsname{#3}}% + \expandafter\@yargdef\csname\string#1\endcsname\tw@{#2}{#4}}} + % + \newcommand{\ifstmundef}[1]{% + \ifdefined#1% + \ifx#1\relax + \expandafter\expandafter + \expandafter\@firstoftwo + \else + \expandafter\expandafter + \expandafter\@secondoftwo + \fi + \else + \expandafter\@firstoftwo + \fi} + \newcommand{\stmexpandonce}[1]{% + \unexpanded\expandafter{#1}} + \newstmrobustcmd{\gstmappto}[2]{% + \ifundef{#1} + {\xdef#1{\unexpanded{#2}}} + {\xdef#1{\stmexpandonce#1\unexpanded{#2}}}} + \newstmrobustcmd{\xstmappto}[2]{% + \ifstmundef{#1} + {\xdef#1{#2}} + {\xdef#1{\stmexpandonce#1#2}}} + + \long\def\@@affiliation[#1]#2{% + \@resetaffiliation% + \gdef\caaffiliationvalues{}% + \elsLabel{#1}% + \setkeys{affiliation}{#2}% + \g@addto@macro\elsaddress{% + \def\baselinestretch{1}% + \refstepcounter{affn}% + \xdef\@currentlabel{\theaffn}% + \elsLabel{#1}% + \textsuperscript{\theaffn}} + \xstmappto\elsaddress{\caaffiliationvalues\par}} + + \long\def\@affiliation#1{% + \@resetaffiliation% + \gdef\caaffiliationvalues{}% + \setkeys{affiliation}{#1}% + \g@addto@macro\elsauthors{% + \def\baselinestretch{1}}% + \xstmappto\elsaddress{\caaffiliationvalues\par}} +\fi + +\def\address{\@ifnextchar[{\@@address}{\@address}} + \long\def\@@address[#1]#2{\g@addto@macro\elsaddress{% \def\baselinestretch{1}% \refstepcounter{affn} |