From 783e8cfca1f7216ca1a10889772733d0eb8b902f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 12 May 2020 21:21:35 +0000 Subject: anonymous-acm (12may20) git-svn-id: svn://tug.org/texlive/trunk@55121 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/anonymous-acm/anonymous-acm.sty | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/anonymous-acm/anonymous-acm.sty (limited to 'Master/texmf-dist/tex/latex/anonymous-acm') 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}{}{#2}} +\else +\renewcommand{\textanon}[2]{#1} +\fi + +% Anonymous Links +\newcommand{\linkanon}[2]{\href{#1}{#2}} +\ifAnonCondition +\renewcommand{\linkanon}[2]{} +\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 -- cgit v1.2.3