texlive[52057] Master/texmf-dist: tagging (8sep19)

commits+karl at tug.org commits+karl at tug.org
Sun Sep 8 23:02:49 CEST 2019


Revision: 52057
          http://tug.org/svn/texlive?view=revision&revision=52057
Author:   karl
Date:     2019-09-08 23:02:49 +0200 (Sun, 08 Sep 2019)
Log Message:
-----------
tagging (8sep19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/tagging/README
    trunk/Master/texmf-dist/doc/latex/tagging/tagging.pdf
    trunk/Master/texmf-dist/doc/latex/tagging/tagging.tex
    trunk/Master/texmf-dist/tex/latex/tagging/tagging.sty

Modified: trunk/Master/texmf-dist/doc/latex/tagging/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagging/README	2019-09-08 21:02:37 UTC (rev 52056)
+++ trunk/Master/texmf-dist/doc/latex/tagging/README	2019-09-08 21:02:49 UTC (rev 52057)
@@ -1,12 +1,18 @@
     The `tagging' package provides document configuration by 
 including or omitting tagged input.
 
-	tagging is licenced under the LPPL. For more details, 
-please see the accompanying manual: taggingmanual.pdf.	
+    tagging is licenced under the LPPL. For more details, 
+please see the accompanying manual: tagging.pdf.
 
 Change History
 ~~~~~~~~~~~~~~
 
+2019-09-07    Kindly provided and inspired by Frank Mittelbach:
+
+	Bug fixes
+	Removed interference with comment environment (from verbatim package)
+	Allow initial active tag list to be passed as package options
+
 2011-08-22    Initial release, providing:
 
     \tagged{list}{y}             Conditional inclusion

Modified: trunk/Master/texmf-dist/doc/latex/tagging/tagging.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/tagging/tagging.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tagging/tagging.tex	2019-09-08 21:02:37 UTC (rev 52056)
+++ trunk/Master/texmf-dist/doc/latex/tagging/tagging.tex	2019-09-08 21:02:49 UTC (rev 52057)
@@ -1,5 +1,5 @@
-% taggingmanual.tex
-% Copyright 2011 Brent Longborough
+% tagging.tex
+% Copyright 2019 Brent Longborough
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either version 1.3
@@ -36,10 +36,11 @@
 \pagestyle{ruled}
 \settocdepth{section}
 \setsecnumdepth{none}
-\newcommand{\tpfname}{\textsf{tagging.sty}}
-\newcommand{\tpname}{\textsf{\itshape tagging}}
-\newcommand{\gitVtag}{\space1.0}
-\newcommand{\gitVtagn}{\space1.0}
+\newcommand{\tpn}{tagging}
+\newcommand{\tpfname}{\textsf{\tpn.sty}}
+\newcommand{\tpname}{\textsf{\itshape \tpn}}
+\newcommand{\gitVtag}{\space1.1}
+\newcommand{\gitVtagn}{\space1.1}
 % -----------------------------------------------------
 \usepackage[%
 	bookmarksnumbered,
@@ -59,7 +60,7 @@
 	\Large A package for document configuration
 	}
 \author{Brent Longborough}
-\date{28th August, 2011}
+\date{7th September, 2019}
 \maketitle
 
 {\centering
@@ -84,8 +85,11 @@
 to produce more than one result at different places
 in a single document.
 
-To use \tpname, just include a standard \verb!\usepackage{tagging}!
-in your document preamble; there are no package options.
+To use \tpname, just include a standard
+\verb!\usepackage{tagging}!  in your document preamble; there
+are no package options which alter its intrinsic behaviour,
+although later you will see how any options you may give are
+subverted.
 
 With \tpname, you mark up parts of your
 \LaTeX source code with \textit{tags} --- labels which
@@ -92,9 +96,7 @@
 make some kind of sense for you in relation to
 the document you are writing.
 
-For example, imagine you are writing a car owners' manual.\footnote{%
-OK, I know Peugeot don't do this,
-but imagine a top-end luxury car manufacturer.}
+For example, imagine you are writing a car owners' manual.
 The car can have optional features, such as automatic transmission
 or a navigation system, and can be powered by diesel or petrol.
 
@@ -225,6 +227,15 @@
 \subsection{{\ttfamily\textbackslash usetag\{{\itshape<taglist>}\}}}
 This command activates \emph{all} the tags in \texttt{\itshape<taglist>}.
 % - - - - - - - - - - - - - - - - - - - - - - - - - - -
+\subsection{{\ttfamily\textbackslash usepackage[{\itshape<taglist>}]\{\tpn\}}}
+If you wish, you may activate one or more tags, once, in your
+document preamble by passing a taglist as options when you call
+the package. 
+\emph{All} the tags in \texttt{\itshape<taglist>} are activated.
+Any tags activated this way can still be deactivated and
+reactivated as many times as you may need in the body of the
+document.
+% - - - - - - - - - - - - - - - - - - - - - - - - - - -
 \subsection{{\ttfamily\textbackslash droptag\{{\itshape<taglist>}\}}}
 This command deactivates \emph{all} the tags in \texttt{\itshape<taglist>}.
 \tpname\ is too simple to include a command 
@@ -318,20 +329,25 @@
 \href{http://www.ctan.org/tex-archive/macros/latex/contrib/etoolbox}{etoolbox}
 and of
 \href{http://www.ctan.org/pkg/verbatim}{verbatim}, currently maintained by
-Rainer Schöpf, both of which are required for \tpname to work.
+Rainer Schöpf, both of which are required for \tpname\ to work.
 
-The \href{http://tex.stackexchange.com}{\TeX.SE community}
-has been a constant source of help, inspiration, and amazement.
+I am most grateful to Frank Mittelbach, who intervened to fix my
+dodgy code and to provide the ability to activate tags as
+package options, thereby directly inspiring v1.1.
 
-Of course, we all stand on the shoulders of giants: Donald Knuth,
-and then too many others to name.
+The \href{http://tex.stackexchange.com}{\TeX.SE community} has
+been a constant source of help, inspiration, and amazement.
 
+Of course, we all stand on the shoulders of giants: Donald
+Knuth, and then too many others to name.
+
 Thank you all. Any failings that remain are entirely
 ``an ill-favoured thing, sir, but mine own''.
 
 % - - - - - - - - - - - - - - - - - - - - - - - - - - -
+\clearpage
 \section{Copyright \& licence}
-Copyright \copyright\ 2011, Brent Longborough.
+Copyright \copyright\ 2019, Brent Longborough.
 
 This work --- \tpname\ --- may be distributed and/or modified under the
 conditions of the LaTeX Project Public License: either version 1.3
@@ -345,8 +361,8 @@
 This work has the LPPL maintenance status `maintained';
 the Current Maintainer of this work is Brent Longborough.
 
-This work consists of the files tagging.sty, taggingtest.tex, 
-taggingmanual.tex, and taggingmanual.pdf
+This work consists of the files 
+tagging.sty, tagging.tex, and tagging.pdf
 
 % - - - - - - - - - - - - - - - - - - - - - - - - - - -
 \section{From the author}
@@ -358,7 +374,7 @@
 However, I'll be very happy to receive your comments by email.\\[\baselineskip]
 Enjoy!\\
 Brent Longborough\\[\baselineskip]
-\textsf{brent+tagging (at) longborough (dot) org}\\
+\textsf{brent+ctan (at) llwyd-consulting (dot) cymru}\\
 and at \href{http://tex.stackexchange.com/users/344/brent-longborough}{\TeX.SE}
 % -----------------------------------------------------
 \end{document}

Modified: trunk/Master/texmf-dist/tex/latex/tagging/tagging.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tagging/tagging.sty	2019-09-08 21:02:37 UTC (rev 52056)
+++ trunk/Master/texmf-dist/tex/latex/tagging/tagging.sty	2019-09-08 21:02:49 UTC (rev 52057)
@@ -15,10 +15,13 @@
 % 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 at ignore}
 \newcommand\usetag[1]{%
   \def\do##1{\csdef{tagged@##1}{}}%
   \docsvlist{#1}}%
@@ -25,17 +28,19 @@
 \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 at ignore\relax%
+        \let\endtagged at ignore\relax%
     \fi}%
     \docsvlist{#1}%
-    \comment}%
-    {\endcomment\leavevmode}%
+    \tagged at ignore\ignorespaces}% FMi
+    {\endtagged at ignore\ignorespacesafterend}% FMi
 \newenvironment{untaggedblock}[1]{%
-    \csdef{@tagged at flag}{}
+    \csdef{@tagged at flag}{}% FMi
     \def\do##1{%
         \ifcsname tagged@##1\endcsname%
             \csundef{@tagged at flag}{}
@@ -42,11 +47,13 @@
         \fi}%
     \docsvlist{#1}%
     \ifcsname @tagged at flag\endcsname%
-        \let\comment\relax%
-        \let\endcomment\relax%
+        \let\tagged at ignore\relax%
+        \let\endtagged at ignore\relax%
     \fi%
-    \comment}%
-    {\endcomment\leavevmode}%
+    \tagged at ignore\ignorespaces}% FMi
+    {\endtagged at 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



More information about the tex-live-commits mailing list