diff options
author | Karl Berry <karl@freefriends.org> | 2014-04-28 21:51:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-04-28 21:51:56 +0000 |
commit | c7f6b488255524d08fa08d46b801f39bfc25ad84 (patch) | |
tree | ec36575a0545fb574da6957e7e802576804e64fb /Master/texmf-dist/doc/latex/scanpages/replicate.py | |
parent | 95b0a9a7bb820384823756857933ba28501c1f31 (diff) |
scanpages (28apr14)
git-svn-id: svn://tug.org/texlive/trunk@33732 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/scanpages/replicate.py')
-rwxr-xr-x | Master/texmf-dist/doc/latex/scanpages/replicate.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Master/texmf-dist/doc/latex/scanpages/replicate.py b/Master/texmf-dist/doc/latex/scanpages/replicate.py index 99f0395da35..57a59782a75 100755 --- a/Master/texmf-dist/doc/latex/scanpages/replicate.py +++ b/Master/texmf-dist/doc/latex/scanpages/replicate.py @@ -6,7 +6,8 @@ import sys filename=sys.argv[1] with open(filename,'r') as f: - s=f.read() + tmp=f.read().splitlines() +s='\n'.join(tmp) tmp=s.split("%Repetitions=") if len(tmp) != 2: print "Bailing! The file does not contain exactly one '%Repetitions='" @@ -106,8 +107,8 @@ for p in range(numrep): newbody=newbody.replace(root+vlst[k],v) viniti[k] =int(viniti[k]) + vinci[k] repl.append(newbody) - + with open(filename,'w') as f: for j in range(len(repl)): - f.write(repl[j]+'\n') + f.write(repl[j]+'\n\n') |