| 1 |
\NeedsTeXFormat{LaTeX2e}[1994/06/01] |
| 2 |
\ProvidesPackage{shortmathj} |
| 3 |
[2020/03/18 v0.5.0 LaTeX package to shortify names of AMS journals automatically] |
| 4 |
|
| 5 |
\RequirePackage{ifthen} |
| 6 |
\RequirePackage{xstring} |
| 7 |
|
| 8 |
\newcommand{\shortifyAMSjournalname}[1]{% |
| 9 |
\def\shortifiedAMSjournalname{}% |
| 10 |
\edef\givenAMSjournalname{\detokenize{#1}}% |
| 11 |
\StrLeft{\givenAMSjournalname}{1}[\firstletter]% |
| 12 |
%%%{{SHORTMAP |
| 13 |
% The following rows present here only as examples |
| 14 |
% The content of the block is generated automatically |
| 15 |
\ifthenelse{\equal{\firstletter}{\detokenize{D}}}{% |
| 16 |
\ifthenelse{\equal{\givenAMSjournalname}{\detokenize{Discrete \& Computational Geometry}}}{\def\shortifiedAMSjournalname{Discr. Comp. Geom.}}{}% |
| 17 |
\ifthenelse{\equal{\givenAMSjournalname}{\detokenize{Discrete Applied Mathematics}}}{\def\shortifiedAMSjournalname{Discr. Appl. Math.}}{}% |
| 18 |
}{}% |
| 19 |
\ifthenelse{\equal{\firstletter}{\detokenize{B}}}{% |
| 20 |
\ifthenelse{\equal{\givenAMSjournalname}{\detokenize{Bulletin of the American Mathematical Society}}}{\def\shortifiedAMSjournalname{Bull. Amer. Math. Soc.}}{}% |
| 21 |
}{}% |
| 22 |
%%%}}SHORTMAP |
| 23 |
\ifthenelse{\equal{\shortifiedAMSjournalname}{}}{#1}{\shortifiedAMSjournalname{}}% |
| 24 |
} |
| 25 |
|
| 26 |
|
| 27 |
\endinput |