From 695a2f60611a97240108f1b90942db770c62ebb7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 7 Sep 2015 22:26:05 +0000 Subject: proofread (7sep15) git-svn-id: svn://tug.org/texlive/trunk@38319 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/proofread/proofread.sty | 157 +++++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/proofread/proofread.sty (limited to 'Master/texmf-dist/tex/latex/proofread') diff --git a/Master/texmf-dist/tex/latex/proofread/proofread.sty b/Master/texmf-dist/tex/latex/proofread/proofread.sty new file mode 100644 index 00000000000..0246719cc8a --- /dev/null +++ b/Master/texmf-dist/tex/latex/proofread/proofread.sty @@ -0,0 +1,157 @@ +%% +%% This is file `proofread.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% proofread.dtx (with options: `package') +%% ---------:| --------------------------------------------------------------- +%% proofread:| Commands for inserting annotations +%% Author:| Wybo Dekker +%% E-mail:| wybo@dekkerdocumenten.nl +%% License:| Released under the LaTeX Project Public License v1.3c or later +%% See:| http://www.latex-project.org/lppl.txt +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{proofread} + [2015/09/06 v1.00 Commands for inserting annotations] + +\RequirePackage{soul} +\RequirePackage{tikz} +\RequirePackage{etoolbox} +\usetikzlibrary{calc} +\usetikzlibrary{decorations.pathmorphing} + +\newcommand{\PR@defhiliter}[3][]{% + \tikzset{every hiliter/.style={color=#2, fill opacity=#3, #1}}% +} + +\PR@defhiliter{yellow}{.25} + +\newcommand{\PR@hilite@Dohilite}{ + \fill [ decoration = {random steps, amplitude=1pt, segment length=15pt} + , outer sep = -15pt, inner sep = 0pt, decorate + , every hiliter, this hiliter ] + ($(begin hilite)+(0,8pt)$) rectangle ($(end hilite)+(0,-3pt)$) ; +} + +\newcommand{\PR@hilite@Beginhilite}{ + \coordinate (begin hilite) at (0,0) ; +} + +\newcommand{\PR@hilite@Endhilite}{ + \coordinate (end hilite) at (0,0) ; +} + +\newdimen\PR@hilite@previous +\newdimen\PR@hilite@current + +\DeclareRobustCommand*\hilite[1][]{% + \tikzset{this hiliter/.style={#1}}% + \SOUL@setup + % + \def\SOUL@preamble{% + \begin{tikzpicture}[overlay, remember picture] + \PR@hilite@Beginhilite + \PR@hilite@Endhilite + \end{tikzpicture}% + }% + % + \def\SOUL@postamble{% + \begin{tikzpicture}[overlay, remember picture] + \PR@hilite@Endhilite + \PR@hilite@Dohilite + \end{tikzpicture}% + }% + % + \def\SOUL@everyhyphen{% + \discretionary{% + \SOUL@setkern\SOUL@hyphkern + \SOUL@sethyphenchar + \tikz[overlay, remember picture] \PR@hilite@Endhilite ;% + }{% + }{% + \SOUL@setkern\SOUL@charkern + }% + }% + % + \def\SOUL@everyexhyphen##1{% + \SOUL@setkern\SOUL@hyphkern + \hbox{##1}% + \discretionary{% + \tikz[overlay, remember picture] \PR@hilite@Endhilite ;% + }{% + }{% + \SOUL@setkern\SOUL@charkern + }% + }% + % + \def\SOUL@everysyllable{% + \begin{tikzpicture}[overlay, remember picture] + \path let \p0 = (begin hilite), \p1 = (0,0) in \pgfextra + \global\PR@hilite@previous=\y0 + \global\PR@hilite@current =\y1 + \endpgfextra (0,0) ; + \ifdim\PR@hilite@current < \PR@hilite@previous + \PR@hilite@Dohilite + \PR@hilite@Beginhilite + \fi + \end{tikzpicture}% + \the\SOUL@syllable + \tikz[overlay, remember picture] \PR@hilite@Endhilite ;% + }% + \SOUL@ +} +\AtEndPreamble{\marginparpush2pt} +\ifdef{\marginparmargin}{\marginparmargin{outer}}{} +\newbox\PR@soulbox +\newcount\PR@markerno\PR@markerno=1 +\newcommand{\com}[1]{% + \marginpar{% + \footnotesize% + \the\PR@markerno:#1% + }% + \advance\PR@markerno1% +} +\newcommand{\del}[1]{% + \com{delete}% + \sbox\PR@soulbox{\st{#1}}% + \hilite[red]{{\usebox\PR@soulbox}}% + \bgroup\egroup% +} +\newcommand{\yel}[2][\mbox{}]{% + \com{#1}% + \hilite[yellow]{#2}% + \bgroup\egroup% +} +\newcommand{\add}[1]{% + \com{add}% + \hilite[green,draw=blue]{#1}% + \bgroup\egroup% +} +\newcommand{\rep}[2]{% + \com{was:#1}% + \hilite[blue]{#2}% + \bgroup\egroup% +} +%% +%% Copyright (C) 2015 by Wybo Dekker +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License (LPPL), either +%% version 1.3c of this license or (at your option) any later +%% version. The latest version of this license is in the file: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% This work is "maintained" (as per LPPL maintenance status) by +%% Wybo Dekker. +%% +%% This work consists of the file proofread.dtx and a Makefile. +%% Running "make" generates the derived files README, proofread.pdf and +%% proofread.sty. +%% Running "make inst" installs the files in the user's TeX tree. +%% Running "make install" installs the files in the local TeX tree. +%% +%% +%% End of file `proofread.sty'. -- cgit v1.2.3