diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/scanpages/scanpages-doc.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/scanpages/scanpages-doc.tex | 61 |
1 files changed, 58 insertions, 3 deletions
diff --git a/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.tex b/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.tex index 709b7f7be22..7618b31a5bd 100644 --- a/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.tex +++ b/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.tex @@ -2,7 +2,6 @@ \usepackage[margin=1in]{geometry} \usepackage[parfill]{parskip}% Begin paragraphs with an empty line rather than an indent \usepackage{graphicx} -\usepackage{amssymb}% do not use with mtpro2 except lite version %SetFonts % libertine+newtxmath \usepackage[lining]{libertine} @@ -55,8 +54,8 @@ The package creates then a destination box centered horizontally and vertically 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, 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 is the file contains only one page. +{\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 \begin{verbatim} @@ -66,6 +65,55 @@ where {\tt x} and {\tt y} are the purely numeric coordinates with implied unit { \end{itemize} The page it produces contains, in addition to the scan material and other embellishments, a superimposed grid with unit {\tt 1bp} and a black box marking the edge of outline of the destination box. After all adjustments are complete, the grid may be suppressed by adding the option {\tt nogrid} to the package option list. +\subsection{Options to include the original page numbers} +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. +\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.}} +\end{verbatim} +which specifies that entries like +\begin{verbatim} +p. 104 in orig. +\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 +\begin{verbatim} +\renewcommand{\origpgcmd}{\put(250,-30){\color{red}% +This was p.\ $\the\origpgnum$ in the original}} +\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} + + \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} @@ -134,6 +182,13 @@ Use a white rectangular box to overwrite scan artifacts. The simplest method may {\color{white}\rule{10pt}{5pt}}% solid white rect 10pt wide, 5pt high } \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=$. +\end{verbatim} \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 |