summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-01-15 00:14:04 +0000
committerKarl Berry <karl@freefriends.org>2014-01-15 00:14:04 +0000
commit0205ea8e96cc89410eca08f0fb67509bfd00db2d (patch)
treea6cd32eb0546d07782855b03a600ae58dc77514a
parenta1bebe4817cfc2ea7fd563563dd19d8701e09407 (diff)
scanpages
git-svn-id: svn://tug.org/texlive/trunk@32673 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/scanpages/README4
-rw-r--r--Master/texmf-dist/doc/latex/scanpages/replicate.plist24
-rw-r--r--Master/texmf-dist/doc/latex/scanpages/scanpages-doc.pdfbin50282 -> 50347 bytes
-rw-r--r--Master/texmf-dist/doc/latex/scanpages/scanpages-doc.tex3
-rw-r--r--Master/texmf-dist/tex/latex/scanpages/scanpages.sty4
5 files changed, 22 insertions, 13 deletions
diff --git a/Master/texmf-dist/doc/latex/scanpages/README b/Master/texmf-dist/doc/latex/scanpages/README
index 646d9946451..5ae9426e0d3 100644
--- a/Master/texmf-dist/doc/latex/scanpages/README
+++ b/Master/texmf-dist/doc/latex/scanpages/README
@@ -16,6 +16,8 @@ LaTeX package scanpages
#
# This work consists of the files scanpages.sty, replicate.py and replicate.plist.
-Version: 1.0
+Version: 1.01
+Changes in version 1.01
+AppleScript modified to remove dependence on external library TSLib. It is now self-contained.
The sty file package contains macros to assist in embellishing a scanned document from the pre-TeX era, correcting positioning, adding footnotes, hyperlinks, indexing and so on. The script files provide ways to reduce the labor in preparing a .tex file with the required flexibility. For details, consult scanpages-doc.pdf.
diff --git a/Master/texmf-dist/doc/latex/scanpages/replicate.plist b/Master/texmf-dist/doc/latex/scanpages/replicate.plist
index e4a09ea1772..dea502e0e06 100644
--- a/Master/texmf-dist/doc/latex/scanpages/replicate.plist
+++ b/Master/texmf-dist/doc/latex/scanpages/replicate.plist
@@ -15,11 +15,10 @@
--This allows replication of a commented block of text as many times as specified, substituting
--values for 'variables' in the process
-set TSLibAlias to alias ((path to home folder as string) &amp; "Library:TeXShop:Scripts:TSLib.scpt")
-set TSLib to (load script TSLibAlias)
+property trimitems : {" ", tab, ASCII character 10}
+
set lf to (ASCII character 10)
tell application "TeXShop" to set s to content of selection of document 1
-set AppleScript's text item delimiters to {""}
set oldtid to AppleScript's text item delimiters
set AppleScript's text item delimiters to "%Repetitions="
@@ -45,11 +44,9 @@ end if
set ss to (item 2 of tmp)
set AppleScript's text item delimiters to {lf}
set tmp2 to (text items of ss)
---display dialog "tmp2=" &amp; (tmp2 as text)
set AppleScript's text item delimiters to oldtid
set vbllst to (item 1 of tmp2) --like {nnn,0:1+1,1:3+-2}
---tell TSLib to set trimitems to {" ", tab, "{", "}"}
-tell TSLib to set vbllst2 to trim(vbllst)
+set vbllst2 to trim(vbllst)
set vbllst3 to (text 2 thru -2 of vbllst2)
set AppleScript's text item delimiters to {" , ", " ,", " ,", ","}
set vbles to (text items of vbllst3) -- line {nnn,0:1+1,1:3+-2}
@@ -97,7 +94,6 @@ repeat with j from 2 to n
end repeat
set AppleScript's text item delimiters to oldtid
---set v to (vlst as text)
set viniti to {}
set vinci to {}
set kk to (count of vinit)
@@ -130,11 +126,9 @@ end repeat
set AppleScript's text item delimiters to {lf}
set body to (tmp2 as text)
set AppleScript's text item delimiters to oldtid
---Start new method
set repl to {s}
set newbody to body
repeat with p from 1 to numrep
- --copy tmp to newtmp
set newbody to body
repeat with k from 1 to kk
set v to ""
@@ -181,6 +175,18 @@ to switchText of t from s to r
set text item delimiters to d
t
end switchText
+
+on trim(someText)
+ repeat until first character of someText is not in trimitems
+ set someText to text 2 thru -1 of someText
+ end repeat
+
+ repeat until last character of someText is not in trimitems
+ set someText to text 1 thru -2 of someText
+ end repeat
+ return someText
+end trim
+
</string>
<key>name</key>
<string>Replicate</string>
diff --git a/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.pdf b/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.pdf
index 99e46610243..3d7487e303b 100644
--- a/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.pdf
+++ b/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.tex b/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.tex
index 1438d9527bc..7563f11a066 100644
--- a/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.tex
+++ b/Master/texmf-dist/doc/latex/scanpages/scanpages-doc.tex
@@ -11,6 +11,7 @@
\usepackage[scaled=.85]{beramono}
\usepackage{amsmath,amsthm}
\usepackage[libertine,bigdelims]{newtxmath}
+\usepackage{url}
\useosf
\usepackage[supstfm=libertinesups,%
supscaled=1.2,%
@@ -141,5 +142,5 @@ would read input from and write output to {\tt myfile.txt}. (The script has been
The two scripts give the same output provided you use variable names that are identical in case to those the one in the \verb|%Variables=|
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.
+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.
\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/scanpages/scanpages.sty b/Master/texmf-dist/tex/latex/scanpages/scanpages.sty
index 2e4dd3833f2..3747250e5e9 100644
--- a/Master/texmf-dist/tex/latex/scanpages/scanpages.sty
+++ b/Master/texmf-dist/tex/latex/scanpages/scanpages.sty
@@ -5,8 +5,8 @@
% Copyright (c) 2014 by Michael Sharpe, msharpe at ucsd dot edu;
% This is free software, subject to the LATEX Project Public License.
-\def\fileversion{1.00}
-\def\filedate{2014/01/06}
+\def\fileversion{1.01}
+\def\filedate{2014/01/08}
\ProvidesPackage{scanpages.sty}[\filedate\space v\fileversion]
\message{`scanpages' v\fileversion, \filedate\space Macros to help create documents from scanned pages(msharpe)}