texlive[42249] Master: scanpages (10oct16)

commits+karl at tug.org commits+karl at tug.org
Mon Oct 10 23:15:32 CEST 2016


Revision: 42249
          http://tug.org/svn/texlive?view=revision&revision=42249
Author:   karl
Date:     2016-10-10 23:15:31 +0200 (Mon, 10 Oct 2016)
Log Message:
-----------
scanpages (10oct16)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/scanpages/README
    trunk/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.pdf
    trunk/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.tex
    trunk/Master/texmf-dist/tex/latex/scanpages/scanpages.sty
    trunk/Master/tlpkg/libexec/ctan2tds
    trunk/Master/tlpkg/tlpsrc/scanpages.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/scanpages/pic1.pdf
    trunk/Master/texmf-dist/doc/latex/scanpages/pic2.pdf
    trunk/Master/texmf-dist/fonts/map/dvips/scanpages/
    trunk/Master/texmf-dist/fonts/map/dvips/scanpages/scanpages.map
    trunk/Master/texmf-dist/fonts/tfm/public/scanpages/
    trunk/Master/texmf-dist/fonts/tfm/public/scanpages/scanwipe.tfm
    trunk/Master/texmf-dist/fonts/type1/public/scanpages/
    trunk/Master/texmf-dist/fonts/type1/public/scanpages/scanwipe.pfb
    trunk/Master/texmf-dist/tex/latex/scanpages/uscanwipe.fd

Modified: trunk/Master/texmf-dist/doc/latex/scanpages/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/scanpages/README	2016-10-10 21:14:36 UTC (rev 42248)
+++ trunk/Master/texmf-dist/doc/latex/scanpages/README	2016-10-10 21:15:31 UTC (rev 42249)
@@ -16,8 +16,12 @@
  #
  # This work consists of the files scanpages.sty, replicate.py and replicate.plist.
  
-Version: 1.04, 2016/03/28
+Current version: 1.05, 2016/10/09
 
+Changes in version 1.05
+1. Corrected some misbehaviors in scanpages.sty and some misinformaion in scanpages-doc.
+2. Made a small font with just a square and circular shape to act as eraser-heads---used in new macros \whitesq, \whitecirc.
+
 Changes in version 1.04
 Added options to include the page number from the original scanned document. (Thanks to Gill Williamson for his very useful input on this feature.)
 

Added: trunk/Master/texmf-dist/doc/latex/scanpages/pic1.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/scanpages/pic1.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/scanpages/pic1.pdf	2016-10-10 21:14:36 UTC (rev 42248)
+++ trunk/Master/texmf-dist/doc/latex/scanpages/pic1.pdf	2016-10-10 21:15:31 UTC (rev 42249)

Property changes on: trunk/Master/texmf-dist/doc/latex/scanpages/pic1.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/scanpages/pic2.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/scanpages/pic2.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/scanpages/pic2.pdf	2016-10-10 21:14:36 UTC (rev 42248)
+++ trunk/Master/texmf-dist/doc/latex/scanpages/pic2.pdf	2016-10-10 21:15:31 UTC (rev 42249)

Property changes on: trunk/Master/texmf-dist/doc/latex/scanpages/pic2.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.tex	2016-10-10 21:14:36 UTC (rev 42248)
+++ trunk/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.tex	2016-10-10 21:15:31 UTC (rev 42249)
@@ -1,7 +1,9 @@
+% !TEX TS-program = pdflatex
 \documentclass[11pt]{article}
 \usepackage[margin=1in]{geometry} 
 \usepackage[parfill]{parskip}% Begin paragraphs with an empty line rather than an indent
 \usepackage{graphicx}
+\pdfmapfile{+scanpages.map}
 %SetFonts
 % libertine+newtxmath
 \usepackage[lining]{libertine}
@@ -9,7 +11,7 @@
 \usepackage{textcomp}
 \usepackage[scaled=.85]{beramono}
 \usepackage{amsmath,amsthm}
-\usepackage[libertine,bigdelims]{newtxmath}
+\usepackage[libertine]{newtxmath}
 \usepackage{url}
 \useosf
 \usepackage[supstfm=libertinesups,%
@@ -16,6 +18,7 @@
   supscaled=1.2,%
   raised=-.13em]{superiors}
 %SetFonts
+\usepackage{scanpages}
 \title{The \textsf{Scanpages} Package}
 \author{Michael Sharpe}
 \date{\today}  % Activate to display a given date or no date
@@ -23,9 +26,9 @@
 \begin{document}
 \maketitle
 \section{Briefly}
-This package is intended for production of documents based on scanned material in any format acceptable to \textsf{pdflatex} as a graphic inclusion---eg, {\tt pdf}, {\tt png}, {\tt jpg}. For me, the format has been useful when trying to archive pre-\TeX\ documents without converting them to \LaTeX\ source documents but inputting the scanned pages one by one and adding indexing, hyperlinks, a table of contents (You'll have to do this using \verb|\addcontentsline{toc}...|, and if using \textsf{hyperref}, you may need to add \verb|\phantomsection| immediately before \verb|\addcontentsline|), footnotes, marginal notes and the like. What makes scanned documents bothersome is the irregularities introduced by the scanning process. Pages are sometimes skewed and often offset horizontally and/or  vertically from one another, and extraneous marks will likely appear, so each page may need adjustments. The methods of this package are of two types. First, the package {\tt scanpages.sty} contains macros to make it more convenient to perform those adjustments and add adornments. Second, some kind of script is very useful for making the relevant part of the {\tt tex} source, if you are handling more than a few pages of scanned material. For this, there are two almost equivalent scripts included to automate this process as much as possible, one written in \textsf{python}, the other in \textsf{AppleScript.} (The letter may be installed in \TeX Shop's macro menu for completely self-contained usage.)
+This package is intended for production of documents based on scanned material in any format acceptable to \textsf{pdflatex} as a graphic inclusion---eg, {\tt pdf}, {\tt png}, {\tt jpg}, though {\tt pdf} works best with this package. For me, the format has been useful when trying to archive pre-\TeX\ documents without converting them to \LaTeX\ source documents but inputting the scanned pages one by one and adding indexing, hyperlinks, a table of contents (You'll have to do this using \verb|\addcontentsline{toc}...|, and if using \textsf{hyperref}, you may need to add \verb|\phantomsection| immediately before \verb|\addcontentsline|), footnotes, marginal notes and the like. What makes scanned documents bothersome is the irregularities introduced by the scanning process. Pages are sometimes skewed and often offset horizontally and/or  vertically from one another, and extraneous marks will likely appear, so each page may need adjustments. The methods of this package are of two types. First, the package {\tt scanpages.sty} contains macros to make it more convenient to perform those adjustments and add adornments. Second, some kind of script is very useful for making the relevant part of the {\tt tex} source, if you are handling more than a few pages of scanned material. For this, there are two almost equivalent scripts included to automate this process as much as possible, one written in \textsf{python}, the other in \textsf{AppleScript.} (The letter may be installed in \TeX Shop's macro menu for completely self-contained usage.)
 \section{The \LaTeX\ package}
-Starting with a scanned document, you need to measure four dimensions governed by the region you wish to import, and decide on a magnification factor to apply. The region to import from the scan should ideally be a bit larger (10{\tt pt} is a good starting value) than the area typically containing all the data, and perhaps excluding original page numbers. The four critical dimensions are:
+Starting with a scanned document, you need to measure four dimensions to specify by the region you wish to import, and decide on a magnification factor to apply. The region to import from the scan should ideally be a bit larger (10{\tt pt} is a good starting value) than the area typically containing all the data, and perhaps excluding original page numbers. (The part of the scanned page lying outside the region is cropped.) The four critical dimensions are:
 \begin{itemize}
 \item
 The $x$ and $y$ coordinates {\tt llx, lly} of the lower left corner of the image region (the part you want to  import) relative to the lower left corner of the scanned page;
@@ -44,9 +47,9 @@
 \item {\tt w} defaults to {\tt 400pt}.
 \item {\tt h} defaults to {\tt 600pt}.
 \end{itemize}
-The package creates then a destination box centered horizontally and vertically in the page and runs \verb|\includegraphics| with  appropriate values whenever it sees entries like
+The package creates then a destination box centered horizontally and vertically in the page and runs \verb|\includegraphics| with  appropriate values set for the {\tt viewport} and {\tt crop} whenever it sees entries like
 \begin{verbatim}
-\scanpage[rot=-1,page=1,dx=20,dy=15]{scan-0}
+\scanpage[rot=-1,page=1,dx=20,dy=15]{scan-0} % page= only for pdf files
 %\index{}
 %\put(450,250){Is this assertion correct?}
 \endpicture\endgroup\newpage
@@ -54,10 +57,14 @@
 which it interprets as follows:
 \begin{itemize}
 \item
-{\tt rot} is an angle of rotation (degrees) in the mathematically positive sense (counter-clockwise) about the center. You may find it easier to enter {\tt tanrot=0.175}, the tangent of the rotation angle, as this is more easily estimated from the picture.
-{\tt page=1} selects the first page of the file {\tt scan-0.pdf}. This option may be omitted if the file contains only one page.
-\item {\tt dx} nudges the resulting picture to the right by {\tt 20bp}, and similarly for {\tt dy}. (Actually, {\tt dx} nudges the {\tt viewport} to the left by {\tt 20bp/scale}.) If no unit is provided, {\tt bp} is assumed.
-\item Any material following the \verb|\scanpage| line and before \verb|\endpicture| can be used for index entries, table of contents entries, footnotes and the like. As the action is all taking place within a \LaTeX\ {\tt picture} environment, each visible item must be placed in an instruction of the form
+if {\tt scan-0} is  a blank string, a blank picture is produced, otherwise, if no corresponding graphic file can be found, {\tt graphicx} will stop with an error message;
+\item
+{\tt page=} will be understood only by {\tt.pdf} inclusions;
+\item
+{\tt rot} is an angle of rotation (degrees) in the mathematically positive sense (counter-clockwise) about the center. You may find it easier to enter {\tt tanrot=0.175}, the tangent of the rotation angle, as this is more easily estimated from the picture;
+{\tt page=1} selects the first page of the file {\tt scan-0.pdf}. This option may be omitted if the file contains only one page;
+\item {\tt dx} nudges the resulting picture to the right by {\tt 20bp}, and similarly for {\tt dy}. (Actually, {\tt dx} nudges the {\tt viewport} to the left by {\tt 20bp/scale}.) If no unit is provided, {\tt bp} is assumed;
+\item any material following the \verb|\scanpage| line and before \verb|\endpicture| can be used for index entries, table of contents entries, footnotes, additional graphic inclusions, annotations and the like. As the action is all taking place within a \LaTeX\ {\tt picture} environment, each visible item must be placed in an instruction of the form
 \begin{verbatim}
 \put(x,y){...}
 \end{verbatim}
@@ -69,48 +76,24 @@
 The \verb|\scanpage| macro also accepts three additional options that allow the page number from the original scanned document to be displayed.
 \begin{itemize}
 \item
-\verb|origpgnum=104| sets the current page number from the orginal scanned document to {\tt 104}, and specifies that this number should appear only when the {\tt grid} is in use---that is, except when the option {\tt nogrid} is in force. Unless modified by an option in a  future page, the scanned page number will increment by one and display on all subsequent pages.
+\verb|origpgnum=104| sets the current scanned page number to {\tt 104}, and specifies that this number should appear only when the {\tt grid} is in use---that is, except when the option {\tt nogrid} is in force. Unless modified by an option in a  future page, the scanned page number will increment by one and display on all subsequent pages.
 \item \verb|origindest| specifies that the current scanned page number should be visible in the final document.
 \item \verb|origpgnumoff| prevents the scanned page number from appearing in either the final document or the grid, from this page forward. 
 \item
 The format governing the display of the current scanned page number is set by the macro \verb|\origpgcmd|, whose default value is
 \begin{verbatim}
-\newcommand{\origpgcmd}{\put(400,-30){p.\ $\the\origpgnum$ in orig.}}
+\newcommand{\origpgcmd}{\put(400,-30){\texttt{Orig. page \# \the\origpgnum}}}
 \end{verbatim}
 which specifies that  entries like
 \begin{verbatim}
-p. 104 in orig.
+Orig. page # 104
 \end{verbatim}
-will appear with baseline {\tt 30bp} (about 3/8 in) below the target box and {\tt 400bp} ( about {\tt5.6in}) from its left edge. You may change this  after loading {\tt scanpages} with a similar line like
+will appear with baseline {\tt 30bp} (about 3/8 in) below the target box and {\tt 400bp} ( about {\tt5.6in}) from its left edge. You may change this in your preamble, after loading {\tt scanpages}, with a similar line, like
 \begin{verbatim}
-\renewcommand{\origpgcmd}{\put(250,-30){\color{red}%
-This was p.\ $\the\origpgnum$ in the original}}
+\renewcommand{\origpgcmd}{...}
 \end{verbatim}
-It is important to note that this will have no effect if it is placed within a block of the form
-\begin{verbatim}
-\scanpage[...]{}
 
-\endpicture\endgroup
-\end{verbatim}
-\item \textsc{Example:}
-\begin{verbatim}
-\scanpage[page=1]{scanneddoc.pdf}% no orig page number 
-\endpicture\endgroup\newpage  
-%
-\scanpage[page=2,origpgnum=87,origpgdest]{scanneddoc.pdf}
-% the final doc will show the orig page no 87
-\endpicture\endgroup\newpage  
-%
-\scanpage[page=3]{scanneddoc.pdf}
-% the final doc will show the orig page no 88
-\endpicture\endgroup\newpage  
-%
-\scanpage[page=4,origpgnumoff]{scanneddoc.pdf}
-% the orig page no (89) will not display, but its counter increments
-\endpicture\endgroup\newpage  
-\end{verbatim}
 
-
 \end{itemize}
 
 
@@ -117,11 +100,11 @@
 \subsection{Resetting the initial choices}
 The options you chose when loading the package may be changed in the middle of a document. Just insert
 \begin{verbatim}
-\initviewport{<scale>,<llx>,<lly>,<w>,<h>}
+\initviewport{<scale>}{<llx>}{<lly>}{<w>}{<h>}
 \end{verbatim}
-to change your initial choice of options. Eg,
+to change your initial choice of options. E.g.,
 \begin{verbatim}
-\initviewport{.95,3cm,4cm,8cm,12cm}
+\initviewport{.95}{3cm}{4cm}{8cm}{12cm}
 \end{verbatim}
 will in effect make {\tt scale=.95}, {\tt llx=3cm}, {\tt lly=4cm}, {\tt w=8cm} and {\tt h=12cm}. 
 \section{Making a source entry for each page}
@@ -176,20 +159,16 @@
 \end{verbatim}
 \end{itemize}
 \section{Whiting out scan artifacts}
-Use a white rectangular box to overwrite scan artifacts. The simplest method may  be to use \verb|\rule|, like this:
+Use a white rectangular box to overwrite scan artifacts. The package provides some macros to assist. Both are based on glyphs in a special font included as part of the {\tt scanpages} package, one a square shape and one a circular shape, each 500 units wide and tall, with zero depth and zero side-bearings. (At {\tt 10pt} typesetting, 500 units amounts to {\tt 5pt}.)
 \begin{verbatim}
-\put(150,200){% lower left corner at (150,200)
-{\color{white}\rule{10pt}{5pt}}% solid white rect 10pt wide, 5pt high
-} 
+\whitesq(150,200){5} % height and width scaled by 5
+\whitesq(150,200){5}[2] % height scaled by 5, width by 2
 \end{verbatim}
-For more precise whiteouts which allow you to overwrite existing material, use something like
 \begin{verbatim}
-\setlength{\fboxsep}{1bp} % This line sets the width of border of opaque white
-% around the text in the \colorbox
-\put(.,.){\colorbox{white}{$y=$}} % places $y=$ with an opaque white background
-% 1bp larger than the minimal bounding box for $y=$.
+\whitecirc(150,200){5} % height and width scaled by 5
+\whitecirc(150,200){5}[2] % height scaled by 5, width by 2
 \end{verbatim}
-
+the only difference being in the the shape of the of the  region whited out.
 \section{Differences between the scripts}
 The AppleScript is meant to work within TeXShop after installation in the TeXShop Macros Menu---see instructions below. It works on the selected part of the file, and its output is placed in the same file, which can be part of a larger document. The \textsf{python} script is meant to run from the command line on a file containing just the pattern text, and produces output in the same file, which can then be copied than into your working {\tt.tex} document. Eg, if you copied the script into a directory on your {\tt PATH} and made it executable
 \begin{verbatim}
@@ -200,4 +179,20 @@
 line. (In the examples above, this was always {\tt NNN}.) The \textsf{python} script is case sensitive, but the AppleScript is not---it will act on any variant like {\tt nnn0} or {\tt NnN1} as well.
 \subsection{Installation in TeXShop's Macros Menu}
 Select \TeX Shop's Macros Menu and choose the top item---\textsf{Open Macro Editor ... }. Then, from the same menu, choose the second item---\textsf{Add macros from file ...}---and navigate to {\tt replicate.plist} in this distribution. When you choose that file, the AppleScript will be installed under the name \textsf{Replicate} in the Macros Menu. 
+\section{Example}
+The last page of this document shows the result of using {\tt scanpage} with a blank filename, which does nothing but create a blank picture with a grid, then overwrite a part of the page with a portion of another. The illustration will not show the ({\tt nogrid}) final result.
+\begin{verbatim}
+\newpage
+\initviewport{1}{1in}{1in}{8cm}{12cm}
+\scanpage{}
+%viewport=xl yl xr yr
+\put(100,200){\includegraphics[viewport=165 530 300 700,clip]{pic1}} 
+\endpicture\endgroup\newpage
+\end{verbatim}
+\newpage
+\initviewport{1}{1in}{1in}{8cm}{12cm}
+\scanpage{}
+%viewport=xl yl xr yr
+\put(100,200){\includegraphics[viewport=165 530 300 700,clip]{pic1}} 
+\endpicture\endgroup\newpage
 \end{document}  
\ No newline at end of file

Added: trunk/Master/texmf-dist/fonts/map/dvips/scanpages/scanpages.map
===================================================================
--- trunk/Master/texmf-dist/fonts/map/dvips/scanpages/scanpages.map	                        (rev 0)
+++ trunk/Master/texmf-dist/fonts/map/dvips/scanpages/scanpages.map	2016-10-10 21:15:31 UTC (rev 42249)
@@ -0,0 +1 @@
+scanwipe scanwipe <scanwipe.pfb


Property changes on: trunk/Master/texmf-dist/fonts/map/dvips/scanpages/scanpages.map
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/fonts/tfm/public/scanpages/scanwipe.tfm
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/fonts/tfm/public/scanpages/scanwipe.tfm
===================================================================
--- trunk/Master/texmf-dist/fonts/tfm/public/scanpages/scanwipe.tfm	2016-10-10 21:14:36 UTC (rev 42248)
+++ trunk/Master/texmf-dist/fonts/tfm/public/scanpages/scanwipe.tfm	2016-10-10 21:15:31 UTC (rev 42249)

Property changes on: trunk/Master/texmf-dist/fonts/tfm/public/scanpages/scanwipe.tfm
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/x-tex-tfm
\ No newline at end of property
Added: trunk/Master/texmf-dist/fonts/type1/public/scanpages/scanwipe.pfb
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/fonts/type1/public/scanpages/scanwipe.pfb
===================================================================
--- trunk/Master/texmf-dist/fonts/type1/public/scanpages/scanwipe.pfb	2016-10-10 21:14:36 UTC (rev 42248)
+++ trunk/Master/texmf-dist/fonts/type1/public/scanpages/scanwipe.pfb	2016-10-10 21:15:31 UTC (rev 42249)

Property changes on: trunk/Master/texmf-dist/fonts/type1/public/scanpages/scanwipe.pfb
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/scanpages/scanpages.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/scanpages/scanpages.sty	2016-10-10 21:14:36 UTC (rev 42248)
+++ trunk/Master/texmf-dist/tex/latex/scanpages/scanpages.sty	2016-10-10 21:15:31 UTC (rev 42249)
@@ -2,12 +2,12 @@
 
 % A package to help make a document based on scanned pages.
 %
-% Copyright (c) 2014 by Michael Sharpe, msharpe at ucsd dot edu;
+% Copyright (c) 2014--2016 by Michael Sharpe, msharpe at ucsd dot edu;
 % This is free software, subject to the LATEX Project Public License.
 
-\def\fileversion{1.04}
-\def\filedate{2016/03/28}
-\ProvidesPackage{scanpages.sty}[\filedate\space v\fileversion]
+\def\fileversion{1.05}
+\def\filedate{2016/10/09}
+\ProvidesPackage{scanpages}[\filedate\space v\fileversion]
 
 \message{`scanpages' v\fileversion, \filedate\space Macros to help create documents from scanned pages (msharpe)}
 %
@@ -18,6 +18,7 @@
 \RequirePackage{fp-basic}
 \RequirePackage{graphicx}
 \RequirePackage{etoolbox}
+%\RequirePackage{trace}
 \ifpdf\else
   \@latex at error{Must be processed with pdf[la]tex!}\@eha
 \fi
@@ -42,9 +43,10 @@
     \noexpand\setkeys{scanp}{\CurrentOption}}%
   \x}
 \ProcessOptions*
+\def\bp at ratio{.99264} % factor to multiply num of pt to get num of bp
 
 %new
-\newcommand{\origpgcmd}{\put(\scanp at srcw,-30){p.\ \the\origpgnum\ in orig.}}
+\newcommand{\origpgcmd}{\put(400,-30){p.\ $\the\origpgnum$ in orig.}}
 \newcount\origpgnum %page in original
 \newif\ifscanp at origindest
 \newif\ifscanp at origingrid
@@ -57,7 +59,6 @@
   \dimen0\@picht\advance\dimen0 -#2\unitlength%
   \raise\dimen0\hb at xt@\z@{\kern#1\unitlength #3\hss}
   \ignorespaces}
-\def\bp at ratio{.99264} % factor to multiply num of pt to get num of bp
 \def\unitlength at off{\let\@unitlength\ignorespaces\ignorespaces}
 \def\scanp at setlength#1#2{% if #2 has no dimension, append dimension
   \let\@unitlength\unitlength
@@ -78,7 +79,12 @@
 %
 \def\initviewport#1#2#3#4#5{% srcscale,llx,lly,srcw,srch
 \scanp at pgcnt=\z@
-\FPdiv\scanp at invscale{1.0}{\scanp at srcscale}
+\edef\scanp at srcscale{#1}
+\FPdiv{\scanp at invscale}{1.0}{\scanp at srcscale}
+\edef\scanp at llx{#2}
+\edef\scanp at lly{#3}
+\edef\scanp at srcw{#4}
+\edef\scanp at srch{#5}
 \scanp at setlength{\scanp at swdim}{\scanp at srcw}
 \scanp at setlength{\scanp at shdim}{\scanp at srch}
 \scanp at dwdim=\scanp at srcscale\scanp at swdim
@@ -85,8 +91,8 @@
 \scanp at dhdim=\scanp at srcscale\scanp at shdim
 \scanp at dwdimbp=\bp at ratio\scanp at dwdim
 \scanp at dhdimbp=\bp at ratio\scanp at dhdim
-\scanp at setlength{\scanp at xl}{#2}
-\scanp at setlength{\scanp at yl}{#3}
+\scanp at setlength{\scanp at xl}{\scanp at llx}
+\scanp at setlength{\scanp at yl}{\scanp at lly}
 \scanp at xr=\scanp at xl \advance\scanp at xr\scanp at swdim
 \scanp at yr=\scanp at yl \advance\scanp at yr\scanp at shdim
 \scanp at xindent=\textwidth \scanp at yindent=\textheight
@@ -94,8 +100,20 @@
 \scanp at xindent=0.5\scanp at xindent\scanp at yindent=0.5\scanp at yindent
 \advance\scanp at yindent -14\p@ 
 }
-\initviewport{\scanp at srcscale}{\scanp at llx}{\scanp at lly}{\scanp at srcw}{\scanp at srcw}
+\initviewport{\scanp at srcscale}{\scanp at llx}{\scanp at lly}{\scanp at srcw}{\scanp at srch}
 %
+\def\whitesq(#1)#2{%
+\@ifnextchar[{\whitesq@(#1){#2}}{\whitesq@(#1){#2}[#2]}}
+\long\def\whitesq@(#1)#2[#3]{\put(#1){\scalebox{#2}[#3]{\color{white}{\usefont{U}{scanwipe}{m}{n}\char"00}}}}
+\def\whitecirc(#1)#2{%
+\@ifnextchar[{\whitecirc@(#1){#2}}{\whitecirc@(#1){#2}[#2]}}
+\long\def\whitecirc@(#1)#2[#3]{\put(#1){\scalebox{#2}[#3]{\color{white}{\usefont{U}{scanwipe}{m}{n}\char"01}}}}
+%
+%\newdimen\scanp at whw\newdimen\scanp at whh  %width, height of whiteout
+%\def\whiteout(#1)#2#3{\scanp at setlength{\scanp at whw}{#2}%
+%\scanp at setlength{\scanp at whh}{#3}%
+%\put(#1){\color{white}\fcolorbox{white}{white}{\vrule width \the\scanp at whw height \the\scanp at whh}}}
+
 \define at key{scanpi}{origpgnum}{\global\origpgnum=#1 \global\scanp at origingridtrue}
 \define at boolkey{scanpi}{origindest}[true]{\csname scanp at change#1\endcsname}
 \define at boolkey{scanpi}{origpgnumoff}[true]{\global\scanp at origindestfalse\global\scanp at origingridfalse}
@@ -105,7 +123,7 @@
 \define at key{scanpi}{rot}{\def\scanp at rot{#1}}
 \define at key{scanpi}{tanrot}{\def\scanp at skew{#1}}
 \newdimen\scanp at dxdim\newdimen\scanp at dydim
-
+%
 \def\scanpage{\@ifnextchar[\scanpage at i{\scanpage at i[]}}
 \def\scanpage at i[#1]#2{\advance\scanp at pgcnt\@ne\begingroup\setkeys{scanpi}{#1}%
 \ifscanp at change\global\scanp at origindesttrue %
@@ -120,14 +138,15 @@
 \scanp at xrbp=\bp at ratio\scanp at xr
 \scanp at ylbp=\bp at ratio\scanp at yl
 \scanp at yrbp=\bp at ratio\scanp at yr
+%\ifblank{#2}{\global\scanp at blanktrue}{}
 \edef\scanp at cmd{viewport=\strip at pt\scanp at xlbp\space\strip at pt\scanp at ylbp\space\strip at pt\scanp at xrbp\space\strip at pt\scanp at yrbp, clip]{#2}}
 \ifdefvoid{\scanp at rot}{%
 \ifdefvoid{\scanp at skew}{}{%
- \@dima=\scanp at skew\p@\@dima=57.14\@dima\edef\scanp at cmd{angle=\strip at pt\@dima,origin=c,\scanp at cmd}}}{\edef\scanp at cmd{angle=\scanp at rot,origin=c,\scanp at cmd}}%
+\@dima=\scanp at skew\p@\@dima=57.14\@dima\edef\scanp at cmd{angle=\strip at pt\@dima,origin=c,\scanp at cmd}}}{\edef\scanp at cmd{angle=\scanp at rot,origin=c,\scanp at cmd}}%
 \if\scanp at srcscale\scanp at origscale\else\edef\scanp at cmd{scale=\scanp at srcscale,\scanp at cmd}\fi
 \ifdefvoid{\scanp at page}{}{\edef\scanp at cmd{page=\scanp at page,\scanp at cmd}}
 \edef\scanp at cmd{\noexpand\scanp at head\noexpand\put(0,0){\noexpand\includegraphics[\scanp at cmd}}
-\scanp at cmd % \begingroup, start \picture, \put pdf at (0,0)
+\ifblank{#2}{\scanp at head}{\scanp at cmd} % \begingroup, start \picture, \put pdf at (0,0)
 \ifscanp at origindest\origpgcmd\fi
 \thegrid{\strip at pt\scanp at dwdimbp}{\strip at pt\scanp at dhdimbp}%
 \global\advance\origpgnum\@ne}
@@ -143,7 +162,7 @@
 \foreach\x in {-300,-290,...,550}{%
   \put(\x,-500){\color{red!20}\line(0,1){1500}}%
 }
-\foreach\x in{-400,-350,...,800}{%
+\foreach\x in {-400,-350,...,800}{%
   \put(-400,\x){\color{red!50}\line(1,0){1000}}%
   \put(-20,\x){\x}  
   }

Added: trunk/Master/texmf-dist/tex/latex/scanpages/uscanwipe.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex/scanpages/uscanwipe.fd	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/scanpages/uscanwipe.fd	2016-10-10 21:15:31 UTC (rev 42249)
@@ -0,0 +1,6 @@
+\ProvidesFile{uscanwipe.fd}
+ [ scanwipe (Unknown encoding)]
+\DeclareFontFamily{U}{scanwipe}{}
+\DeclareFontShape{U}{scanwipe}{m}{n}{
+<-> scanwipe.tfm}{}
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/scanpages/uscanwipe.fd
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2016-10-10 21:14:36 UTC (rev 42248)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2016-10-10 21:15:31 UTC (rev 42249)
@@ -981,7 +981,6 @@
  'sagetex',     "die 'skipping, omitted at author request (25 Jan 2010 19:50:16)'",
  'sansmathaccent',      "&MAKEflatten",
  'sansmathfonts',       "&MAKEflatten",
- 'scanpages',		"&MAKEflatten",
  'schedule',            "die 'skipping, noinfo license, too old to matter'",
  'schulschriften',      "&MAKEflatten",
  'scientifixpaper',     "die 'skipping, noinfo license'",

Modified: trunk/Master/tlpkg/tlpsrc/scanpages.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/scanpages.tlpsrc	2016-10-10 21:14:36 UTC (rev 42248)
+++ trunk/Master/tlpkg/tlpsrc/scanpages.tlpsrc	2016-10-10 21:15:31 UTC (rev 42249)
@@ -0,0 +1 @@
+execute addMap scanpages.map



More information about the tex-live-commits mailing list