diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-09 03:00:43 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-09 03:00:43 +0000 |
commit | cb5ec966f1a3e9b26dcd7fc1b13998e03581b8fd (patch) | |
tree | 5808cf29f3f394729731e7ce4d2e04d27c58b076 /macros/latex/contrib/tagging/tagging.sty | |
parent | dce09de80c37afccb6addb25d0c7d40367059ece (diff) |
CTAN sync 201909090300
Diffstat (limited to 'macros/latex/contrib/tagging/tagging.sty')
-rw-r--r-- | macros/latex/contrib/tagging/tagging.sty | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/macros/latex/contrib/tagging/tagging.sty b/macros/latex/contrib/tagging/tagging.sty index c947639043..5f8c4b994c 100644 --- a/macros/latex/contrib/tagging/tagging.sty +++ b/macros/latex/contrib/tagging/tagging.sty @@ -15,38 +15,45 @@ % This work consists of these files: % tagging.sty, tagging.tex, and tagging.pdf % -------------------------------------------------------------- -\ProvidesPackage{tagging}[2011/08/04] +\ProvidesPackage{tagging}[2019/09/07 v1.1] \RequirePackage{etoolbox,verbatim} + + \newcommand{\taggedy}{\relax} \newcommand{\taggedn}{\relax} +\newcomment{tagged@ignore} \newcommand\usetag[1]{% \def\do##1{\csdef{tagged@##1}{}}% \docsvlist{#1}}% \newcommand\droptag[1]{% \def\do##1{\csundef{tagged@##1}{}}% \docsvlist{#1}}% + + \newenvironment{taggedblock}[1]% {\def\do##1{% \ifcsname tagged@##1\endcsname% - \let\comment\relax% - \let\endcomment\relax% + \let\tagged@ignore\relax% + \let\endtagged@ignore\relax% \fi}% \docsvlist{#1}% - \comment}% - {\endcomment\leavevmode}% + \tagged@ignore\ignorespaces}% FMi + {\endtagged@ignore\ignorespacesafterend}% FMi \newenvironment{untaggedblock}[1]{% - \csdef{@tagged@flag}{} + \csdef{@tagged@flag}{}% FMi \def\do##1{% \ifcsname tagged@##1\endcsname% \csundef{@tagged@flag}{} \fi}% \docsvlist{#1}% \ifcsname @tagged@flag\endcsname% - \let\comment\relax% - \let\endcomment\relax% + \let\tagged@ignore\relax% + \let\endtagged@ignore\relax% \fi% - \comment}% - {\endcomment\leavevmode}% + \tagged@ignore\ignorespaces}% FMi + {\endtagged@ignore\ignorespacesafterend}% FMi + + \newcommand{\iftagged}[3]% {\renewcommand{\taggedy}{#2}% \renewcommand{\taggedn}{#3}% @@ -57,3 +64,7 @@ }% \newcommand{\tagged}[2]{\iftagged{#1}{#2}{}} \newcommand{\untagged}[2]{\iftagged{#1}{}{#2}} + +%FMi Allow tags to be activated as package options +\DeclareOption*{\usetag{\CurrentOption}} +\ProcessOptions |