summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/censor
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-11-15 22:21:25 +0000
committerKarl Berry <karl@freefriends.org>2018-11-15 22:21:25 +0000
commit0b4ca5651a82505c8ca208424642dfa9fdcd3464 (patch)
treec0ec6c07c9b3b19e47a4ef2b6d48ae2f56cebe98 /Master/texmf-dist/doc/latex/censor
parente63759bc8ac77f2a41375c1f4b0ad538d4da86b0 (diff)
censor (15nov18)
git-svn-id: svn://tug.org/texlive/trunk@49168 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/censor')
-rw-r--r--Master/texmf-dist/doc/latex/censor/censor.pdfbin190376 -> 201874 bytes
-rw-r--r--Master/texmf-dist/doc/latex/censor/censor.tex48
2 files changed, 46 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/latex/censor/censor.pdf b/Master/texmf-dist/doc/latex/censor/censor.pdf
index 807fa99be10..6a85c480ddf 100644
--- a/Master/texmf-dist/doc/latex/censor/censor.pdf
+++ b/Master/texmf-dist/doc/latex/censor/censor.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/censor/censor.tex b/Master/texmf-dist/doc/latex/censor/censor.tex
index b8425a92d34..1348942afa7 100644
--- a/Master/texmf-dist/doc/latex/censor/censor.tex
+++ b/Master/texmf-dist/doc/latex/censor/censor.tex
@@ -1,9 +1,12 @@
\documentclass{article}
-\usepackage{segletes}
+\usepackage{verbatimbox,xcolor}
\usepackage{censor}
\parindent 0in
\parskip 1em
+\makeatletter
+\long\def\bl@t#1#2{\ifx\bpar#2\par\else\ifx.#2\censordot\else\censor{#2}\fi\fi#1}
+\makeatother
\begin{document}
@@ -549,7 +552,7 @@ have periods appear in the censored output, the definition
can be redefined as a blank space, as a null character, or something
else, at the users' discretion.
-\section{Summary \& Miscellany}
+\section{Usage Summary}
The complete set of commands available to the \textsf{censor} package,
to bring about text redaction, are:\\
@@ -589,6 +592,10 @@ Censoring may be dynamically turned off and on in a document with the
use of the \verb|\StopCensoring| and \verb|\RestartCensoring| commands,
respectively. The default is censoring `on.'
+\subsection{\textit{Caveat Emptor}}
+
+Here is some added information that users of the package should know.
+
I have found that, in certain cases (for example, with captions created
using the \textsf{boxhandler} package), the censorbox command needs to
be protected by way of \verb|\protect\censorbox{...}|.
@@ -607,6 +614,43 @@ such that subsequent reference is done indirectly:\\
justification, because censored words are never hyphenated across line
boundaries, whereas the original text may have been.)
+Because the censor algorithm's
+ digest one token at a time, you have to be careful if
+ macros appear in the arguments to a \verb|\censor|,
+ \verb|\blackout|, or \verb|\xblackout|.
+In particular, you have to locate the macro \textit{and its arguments}
+ in a group, for example,
+ \verb|\blackout{In equation {\ref{eq:A}},| \verb|you will see...}|.
+The extra braces around \verb|\ref| and its argument are required
+ so that the censoring algorithm does not try to absorb the macro
+ without also absorbing its argument(s).
+
+Users have asked for color support in the package.
+I do not wish to hardwire color into the package---however,
+ if the \textsf{xcolor} package is loaded,
+ the following preamble definition will force censoring to be
+ in the selected color (in this example, red):
+
+\verb| \def\censorcolor{red}|\\
+\verb| \let\svcensorrule\censorrule|\\
+\verb| \renewcommand\censorrule[1]{%|\\
+\verb| \textcolor{\censorcolor}{\svcensorrule{#1}}}|
+
+Let's see if it works:
+
+{\let\svcensorrule\censorrule
+\renewcommand\censorrule[1]{\textcolor{red}{\svcensorrule{#1}}}
+\addtolength\leftskip{2.3em}
+Is this blacked out text censored in red?\\
+\blackout{Is this blacked out text censored in red?}\par}
+
+This technique can be used at the user's discretion to provide color
+ censoring.
+The value of \verb|\censorcolor| can be redefined on the fly to change
+ the color of the censoring.
+
+\section{Source Code}
+
The source code for \textsf{censor} is so short as to be included below:
\verbatiminput{censor.sty}