diff options
author | Karl Berry <karl@freefriends.org> | 2019-09-08 21:02:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-09-08 21:02:49 +0000 |
commit | 89a6e81f8434659f93dc4a8c439254074aa8e91a (patch) | |
tree | ae2849556f28bbdc248888d9c82bbda870510b48 /Master/texmf-dist/tex | |
parent | f7eebe5d798ebeb8717724b7f331e7d8894c2abf (diff) |
tagging (8sep19)
git-svn-id: svn://tug.org/texlive/trunk@52057 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/tagging/tagging.sty | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/tagging/tagging.sty b/Master/texmf-dist/tex/latex/tagging/tagging.sty index c9476390437..5f8c4b994cd 100644 --- a/Master/texmf-dist/tex/latex/tagging/tagging.sty +++ b/Master/texmf-dist/tex/latex/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 |