summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/shortmathj/shortmathj.template.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-03-19 03:01:18 +0000
committerNorbert Preining <norbert@preining.info>2020-03-19 03:01:18 +0000
commitc8b8ea37fe9cd71b53223dff23f291b2f158fc0f (patch)
tree4b91fec7c54c33edfbd023be9ccbdac673504483 /macros/latex/contrib/shortmathj/shortmathj.template.sty
parent701be49cc7a592cc192c0f28e45a763a4c745282 (diff)
CTAN sync 202003190301
Diffstat (limited to 'macros/latex/contrib/shortmathj/shortmathj.template.sty')
-rw-r--r--macros/latex/contrib/shortmathj/shortmathj.template.sty27
1 files changed, 27 insertions, 0 deletions
diff --git a/macros/latex/contrib/shortmathj/shortmathj.template.sty b/macros/latex/contrib/shortmathj/shortmathj.template.sty
new file mode 100644
index 0000000000..c5f0279f01
--- /dev/null
+++ b/macros/latex/contrib/shortmathj/shortmathj.template.sty
@@ -0,0 +1,27 @@
+\NeedsTeXFormat{LaTeX2e}[1994/06/01]
+\ProvidesPackage{shortmathj}
+ [2020/03/18 v0.5.0 LaTeX package to shortify names of AMS journals automatically]
+
+\RequirePackage{ifthen}
+\RequirePackage{xstring}
+
+\newcommand{\shortifyAMSjournalname}[1]{%
+\def\shortifiedAMSjournalname{}%
+\edef\givenAMSjournalname{\detokenize{#1}}%
+\StrLeft{\givenAMSjournalname}{1}[\firstletter]%
+%%%{{SHORTMAP
+% The following rows present here only as examples
+% The content of the block is generated automatically
+\ifthenelse{\equal{\firstletter}{\detokenize{D}}}{%
+\ifthenelse{\equal{\givenAMSjournalname}{\detokenize{Discrete \& Computational Geometry}}}{\def\shortifiedAMSjournalname{Discr. Comp. Geom.}}{}%
+\ifthenelse{\equal{\givenAMSjournalname}{\detokenize{Discrete Applied Mathematics}}}{\def\shortifiedAMSjournalname{Discr. Appl. Math.}}{}%
+}{}%
+\ifthenelse{\equal{\firstletter}{\detokenize{B}}}{%
+\ifthenelse{\equal{\givenAMSjournalname}{\detokenize{Bulletin of the American Mathematical Society}}}{\def\shortifiedAMSjournalname{Bull. Amer. Math. Soc.}}{}%
+}{}%
+%%%}}SHORTMAP
+\ifthenelse{\equal{\shortifiedAMSjournalname}{}}{#1}{\shortifiedAMSjournalname{}}%
+}
+
+
+\endinput