diff options
author | Karl Berry <karl@freefriends.org> | 2013-06-25 22:57:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-06-25 22:57:38 +0000 |
commit | 0a65f76266ebf273e6277efbdfbd62f0240c123f (patch) | |
tree | 9785fe505c271725f21391878bdf179a0481bf8a /Master | |
parent | 9fdac4f2d07b457ea0e9d036623028657fd34cc7 (diff) |
censor (25jun13)
git-svn-id: svn://tug.org/texlive/trunk@30940 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/censor/README | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/censor/censor.pdf | bin | 186982 -> 189491 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/censor/censor.tex | 32 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/censor/censor.sty | 33 |
4 files changed, 56 insertions, 18 deletions
diff --git a/Master/texmf-dist/doc/latex/censor/README b/Master/texmf-dist/doc/latex/censor/README index 414d772f144..e3107c94233 100644 --- a/Master/texmf-dist/doc/latex/censor/README +++ b/Master/texmf-dist/doc/latex/censor/README @@ -1,4 +1,4 @@ -CENSOR +The censor package This package provides simple tools for creating redacted documents with blacked-out text. It's tools are useful both for creating documents in @@ -7,8 +7,7 @@ environment) as well as in an unrestricted environment (for eventual transfer and completion in the restricted environment). As of V2.0, the ability to blackout larger blocks of text is available, -up to a whole paragraph simply, and even across paragraph boundaries -(with a small modification required to your text). +up to a whole paragraph simply, and even across paragraph boundaries. V2.1 tries to minimize formatting discrepancies (i.e., text spacing) between the redacted and unredacted versions of the document. @@ -20,3 +19,7 @@ etc. V3.1 gives unrestricted use of \par in arguments to \blackout. Also, \xblackout introduced to give interword blacking not offered by \blackout. + +V3.2 allows control over the characteristics (depth and height) of the +censor blackout rule. It also gives additional control on how to handle +the censoring of periods. diff --git a/Master/texmf-dist/doc/latex/censor/censor.pdf b/Master/texmf-dist/doc/latex/censor/censor.pdf Binary files differindex 0e6b1081145..e846a0a2578 100644 --- a/Master/texmf-dist/doc/latex/censor/censor.pdf +++ b/Master/texmf-dist/doc/latex/censor/censor.pdf diff --git a/Master/texmf-dist/doc/latex/censor/censor.tex b/Master/texmf-dist/doc/latex/censor/censor.tex index 09870223b16..50ee40bfc31 100644 --- a/Master/texmf-dist/doc/latex/censor/censor.tex +++ b/Master/texmf-dist/doc/latex/censor/censor.tex @@ -13,8 +13,8 @@ \small \rule{0in}{1em}Tools for Producing Redacted Documents\\ \large \rule{0in}{2em} Steven B. Segletes\\ steven.b.segletes.civ@mail.mil\\ -\rule{0em}{2em}2013/05/02\\ -v3.10 +\rule{0em}{2em}\today\\ +v\censorversionnumber \end{center} \section{Introduction} @@ -525,7 +525,30 @@ It is not envisioned that the \verb|\blackout| or \verb|\xblackout| commands, discussed in the prior section, are used in this mode, where the source file is in an unsecure environment. -\clearpage +\section{Censor Marks} + +The censor (blacking) mark is a \verb|\rule| which has a depth +\(-\)0.3ex (\textit{i.e.}, below the baseline), and a height of 2.1ex, +by default. The characteristics of that rule may be changed by setting +the following two lengths. + +\itshape +\verb| \censorruledepth=|length\\ +\verb| \censorruleheight=|length +\upshape + +In addition, it was mentioned that periods are not censored, so as to +preserve the ability of \LaTeX{} to produce censored output of +\textit{identical} spacing to the uncensored output. If, however, the +preservation of space is not essential, and the user does not wish to +have periods appear in the censored output, the definition +\verb|\censordot|, by default + +\verb| \def\censordot{.}| + +can be redefined as a blank space, as a null character, or something +else, at the users' discretion. + \section{Summary \& Miscellany} The complete set of commands available to the \textsf{censor} package, @@ -542,6 +565,9 @@ height mult.\tt\}\{\it depth mult.\tt\}\\ only\upshape)\\ \verb| \StopCensoring|\\ \verb| \RestartCensoring|\\ +\verb| \censorruledepth=|\it length\\ +\verb| \censorruleheight=|length\\ +\verb| \def\censordot{.| \upshape or \it character\tt\}\\ ~\\} The star ({\tt*}) version of the commands is envisioned when the source document is being created in an unsecure environment, whereas, the diff --git a/Master/texmf-dist/tex/latex/censor/censor.sty b/Master/texmf-dist/tex/latex/censor/censor.sty index 1170c2238b0..9caeae26cf8 100644 --- a/Master/texmf-dist/tex/latex/censor/censor.sty +++ b/Master/texmf-dist/tex/latex/censor/censor.sty @@ -1,9 +1,9 @@ % censor.sty +\def\censorversionnumber{3.20} \ProvidesPackage{censor} -[2013/05/02 v3.10 +[2013/06/24 \censorversionnumber Provides capability for redaction of sensitive information] -%% Copyright 2009, 2012, 2013 Steven B. Segletes % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -26,13 +26,22 @@ % 3.00 - \censorbox introduced to handle figures, tables, etc. % 3.10 - Made \blackout work with \par in argument. Introduced % \xblackout +% 3.20 - Specify depth/height of censor rule. Introduced \def\censordot{} \usepackage{pbox} \usepackage{ifnextok} +\newlength\censorruledepth +\newlength\censorruleheight + +\censorruledepth=-0.3ex% -0.3ex DEFAULT +\censorruleheight=2.1ex% 2.1ex DEFAULT +\def\censordot{.}% versus \def\censordot{ }% + +\newcommand\censorrule[1]{\protect\rule[\censorruledepth]{#1}{\censorruleheight}} + \newcommand\censor{\@ifstar{\@cenlen}{\@cenword}} - \newcommand\@cenlen[1]{\protect\rule[-.3ex]{#1 ex}{2.1ex}} - \newcommand\@cenword[1]{% - \protect\rule[-.3ex]{\widthofpbox{#1}}{2.1ex}} + \newcommand\@cenlen[1]{\censorrule{#1 ex}} + \newcommand\@cenword[1]{\censorrule{\widthofpbox{#1}}} \newcommand\un@censor{\@ifstar{\un@cenlen}{\un@cenword}} \newcommand\un@cenlen[1]{\protect\underline{\hspace{#1 ex}}} @@ -60,7 +69,7 @@ % \def\bl@t#1#2{\censor{#2}#1} % V2.10 DEFINITION (MADE \long IN V3.1): -\long\def\bl@t#1#2{\if\bpar#2\par\else\if.#2#2\else\censor{#2}\fi\fi#1} +\long\def\bl@t#1#2{\if\bpar#2\par\else\if.#2\censordot\else\censor{#2}\fi\fi#1} %\def\bpar{_} %V3.00 DEFINITION \let\bpar\par %AS OF V3.1, CAN HANDLE \par @@ -84,11 +93,11 @@ \newlength\rletterlap\setlength\rletterlap{0.55ex} \newlength\afterspacelap\setlength\afterspacelap{0.0ex} -\def\@periodrlap{\rlap{\rule[-.3ex]{\periodrlap}{2.1ex}}} -\def\@afterperiodlap{\llap{\rule[-.3ex]{\afterperiodlap}{2.1ex}}} -\def\@lletterlap{\llap{\rule[-.3ex]{\lletterlap}{2.1ex}}} -\def\@rletterlap{\rlap{\rule[-.3ex]{\rletterlap}{2.1ex}}} -\def\@afterspacelap{\llap{\rule[-.3ex]{\afterspacelap}{2.1ex}}} +\def\@periodrlap{\rlap{\censorrule{\periodrlap}}} +\def\@afterperiodlap{\llap{\censorrule{\afterperiodlap}}} +\def\@lletterlap{\llap{\censorrule{\lletterlap}}} +\def\@rletterlap{\rlap{\censorrule{\rletterlap}}} +\def\@afterspacelap{\llap{\censorrule{\afterspacelap}}} \long\def\xbl@t#1#2{% \if\par#2% @@ -100,7 +109,7 @@ \if.#2% \def\@justperiod{T}% \@periodrlap% - #2% + \censordot% \else% \if F\@justpar% \if T\@justperiod% |