summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/anonymous-acm/anonymous-acm.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-05-12 21:21:35 +0000
committerKarl Berry <karl@freefriends.org>2020-05-12 21:21:35 +0000
commit783e8cfca1f7216ca1a10889772733d0eb8b902f (patch)
treea7f7b49fdfc4d85d7e2b0565cc1b3c8ec5b4f87e /Master/texmf-dist/tex/latex/anonymous-acm/anonymous-acm.sty
parent4d08481a39441da41683d330890e9f1db1138f90 (diff)
anonymous-acm (12may20)
git-svn-id: svn://tug.org/texlive/trunk@55121 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/anonymous-acm/anonymous-acm.sty')
-rw-r--r--Master/texmf-dist/tex/latex/anonymous-acm/anonymous-acm.sty78
1 files changed, 78 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/anonymous-acm/anonymous-acm.sty b/Master/texmf-dist/tex/latex/anonymous-acm/anonymous-acm.sty
new file mode 100644
index 00000000000..21964043f6f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/anonymous-acm/anonymous-acm.sty
@@ -0,0 +1,78 @@
+%% anonymous-acm.sty
+%% version 1.0 09-May-2020
+%% Maintained by Brett A. Becker: brett.becker@ucd.ie
+
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+
+% This program is distributed in the hope that it will be useful
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+% designed to be used with acmart.cls - required for full functionality
+
+%% Identification
+%% The package identifies itself and the LaTeX version needed
+\ProvidesPackage{anonymous-acm}
+\NeedsTeXFormat{LaTeX2e}
+
+
+% Define anonymous condition
+\newif\ifAnonCondition\AnonConditiontrue
+
+% Declare options
+\DeclareOption{true}{\AnonConditiontrue}
+\DeclareOption{false}{\AnonConditionfalse}
+\DeclareOption*{\PackageWarning{anonymous-acm}{Unknown ‘\CurrentOption’}}
+\ProcessOptions\relax
+
+% Anonymous Authors
+\newcommand{\authoranon}[1]{#1}
+\ifAnonCondition
+\renewcommand{\authoranon}[1]{
+\author{Anonymous Author(s)}
+}
+\else
+\renewcommand{\authoranon}[1]{#1}
+\fi
+
+% Anonymous Arbitrary Text
+\newcommand{\textanon}[2]{#1}
+\ifAnonCondition
+\renewcommand{\textanon}[2]{\ifstrequal{}{#2}{<text removed for peer review>}{#2}}
+\else
+\renewcommand{\textanon}[2]{#1}
+\fi
+
+% Anonymous Links
+\newcommand{\linkanon}[2]{\href{#1}{#2}}
+\ifAnonCondition
+\renewcommand{\linkanon}[2]{<anonymous link>}
+\else
+\renewcommand{\linkanon}[2]{\href{#1}{#2}}
+\fi
+
+\newcommand{\textlinkanon}[2]{\href{#1}{#2}}
+\ifAnonCondition
+\renewcommand{\textlinkanon}[2]{#2}
+\else
+\renewcommand{\textlinkanon}[2]{\href{#1}{#2}}
+\fi
+
+% Anonymous Citations & References
+\newcommand{\citeanon}[2][\ ]{\cite[#1]{#2}}
+\ifAnonCondition
+\renewcommand{\citeanon}[2][\ ]{[anonymous]}
+\else
+\renewcommand{\citeanon}[2][@]{\ifstrequal{@}{#1}{\cite{#2}}{\cite[#1]{#2}}}
+\fi
+
+% Anonymous Acknowledgments
+\ifAnonCondition
+\excludecomment{acks}
+\fi