summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/bin
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-11-12 00:31:31 +0000
committerKarl Berry <karl@freefriends.org>2010-11-12 00:31:31 +0000
commit70e387eb63ce4723858c48592208e193dec294f3 (patch)
tree61ec42df871a70687151ed4a6d1bc6a5c81dc53c /Master/texmf-dist/source/latex/stex/bin
parent2cee8f6dcf8e9596b5cfe9d1f3e55c61b261a320 (diff)
stex 0.9.3 (11nov10)
git-svn-id: svn://tug.org/texlive/trunk@20410 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/stex/bin')
-rwxr-xr-xMaster/texmf-dist/source/latex/stex/bin/checksum9
-rwxr-xr-xMaster/texmf-dist/source/latex/stex/bin/grep-rerun59
-rwxr-xr-xMaster/texmf-dist/source/latex/stex/bin/sms7
-rwxr-xr-xMaster/texmf-dist/source/latex/stex/bin/stexml2
-rwxr-xr-xMaster/texmf-dist/source/latex/stex/bin/stexmlmod2
5 files changed, 74 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/stex/bin/checksum b/Master/texmf-dist/source/latex/stex/bin/checksum
index 7e521deaa7c..9f0e533a8d4 100755
--- a/Master/texmf-dist/source/latex/stex/bin/checksum
+++ b/Master/texmf-dist/source/latex/stex/bin/checksum
@@ -26,7 +26,10 @@ $path = abs_path($path);
my ($volume,$dir,$file) = File::Spec->splitpath( $path );
my @lines = `cd $dir; pdflatex "\\nonstopmode\\input{$file}"` if ($mode eq "update");
my ($checksum) = map {$_=~/^\* The checksum should be (\d+)!/; $1;} grep ($_ =~ /^\* The checksum should be (\d+)!/,@lines) if @lines;
-
+if (!$checksum) {
+#One more possible error message:
+ ($checksum) = map {$_=~/^! Package doc Error: Checksum not passed \((\d+)<>(\d+)\)\./; $2;} grep ($_ =~ /^! Package doc Error: Checksum not passed \((\d+)<>(\d+)\)\./,@lines) if @lines;
+}
open(IN,"<$path") or die "Cannot open DTX source: $path\n";
@lines = ();
while (<IN>) {
@@ -38,8 +41,8 @@ print OUT join("",@lines);
close(OUT);
######### Subroutines ############
sub update {
- my $checksum=$_[1]||"1";
- $_[0]=~s/\\CheckSum\{\d*\}/\\CheckSum{$checksum}/;
+ my $checksum=$_[1];
+ $_[0]=~s/\\CheckSum\{\d*\}/\\CheckSum{$checksum}/ if $checksum;
$_[0];
}
diff --git a/Master/texmf-dist/source/latex/stex/bin/grep-rerun b/Master/texmf-dist/source/latex/stex/bin/grep-rerun
new file mode 100755
index 00000000000..f73ef082fbb
--- /dev/null
+++ b/Master/texmf-dist/source/latex/stex/bin/grep-rerun
@@ -0,0 +1,59 @@
+#!/usr/bin/perl -w
+#######################################################################################
+# A tool for updating .dtx files with a correspodning checksum counter #
+# Copyright (c) 2010, Deyan Ginev, released under the Gnu General Public License (GPL)#
+# see http://www.gnu.org/copyleft/gpl.html #
+# $URL: https://svn.kwarc.info/repos/stex/trunk/bin/gre-rerun$ #
+#######################################################################################
+
+use strict;
+
+use Getopt::Long;
+use Pod::Usage;
+use File::Spec;
+use Cwd qw(abs_path);
+
+####### start of program #######
+my ($errlog,$pattern)=@ARGV;
+my %rerun_set = ();
+open(IN,"<",$errlog);
+my ($errvol,$errdir)=File::Spec->splitpath($errlog);
+my $currpath=abs_path($errdir);
+while (<IN>) {
+ #Entering, update path
+ if (/^Entering (.+)$/) {
+ $currpath.="/$1";
+ }
+ #Leaving, update path
+ elsif (/^Leaving (.+)$/) {
+ $currpath =~ s/(\/$1)$//;
+ }
+ #Matching error, note source
+ elsif (/$pattern/) {
+ my ($name) = split(/:/,$_);
+ ($name) = split(/\./,$name);
+ $rerun_set{$currpath."/".$name.".tex"}=1;
+ }
+}
+#Perform rerun of affected sources:
+print STDERR scalar(keys %rerun_set)." sources to rerun:\n";
+foreach (sort keys %rerun_set) {
+ my ($vol,$dir,$file) = File::Spec->splitpath( $_ );
+ print STDERR "Trying $_\n";
+ $file=~s/\.tex$/.omdoc/;
+ print STDERR `cd $dir; make $file -B`;
+}
+close(IN);
+
+
+__END__
+
+
+=head1 SYNOPSIS
+
+grep-rerun <errlog filename> <grep pattern>
+
+Purpose:
+ Given an error log file, generated via the sTeX Makefiles, and an error pattern, fetches and reconverts all sources that suffered this error.
+Example:
+ grep-rerun latex.errlog "Fatal:"
diff --git a/Master/texmf-dist/source/latex/stex/bin/sms b/Master/texmf-dist/source/latex/stex/bin/sms
index 4599f3e2763..360be4ea814 100755
--- a/Master/texmf-dist/source/latex/stex/bin/sms
+++ b/Master/texmf-dist/source/latex/stex/bin/sms
@@ -1,14 +1,17 @@
#!/usr/bin/perl -w
#######################################################################################
# A tool for creating STeX Module Signatures (SMS) files. #
-# Copyright (c) 2005, Ioan Sucan, released under the Gnu General Public License (GPL) #
+# Copyright (c) 2005, Ioan Sucan; (c) 2010, Deyan Ginev,
+# released under the Gnu General Public License (GPL) #
# see http://www.gnu.org/copyleft/gpl.html #
# $URL: svn://kwarc.eecs.iu-bremen.de/repos/kwarc/projects/content/bin/sms$ #
# $Date: 2006-10-22 20:01:47 +0200 (Sun, 22 Oct 2006) $ $Rev: 10669 $ #
#######################################################################################
use strict;
-
+use File::Spec::Functions qw(rel2abs);
+use File::Basename;
+use lib dirname(rel2abs($0)); #Assumption: Modparse is in the same folder as the sms binary.
use Getopt::Long;
use Modparse;
use Pod::Usage;
diff --git a/Master/texmf-dist/source/latex/stex/bin/stexml b/Master/texmf-dist/source/latex/stex/bin/stexml
new file mode 100755
index 00000000000..2c0586b9130
--- /dev/null
+++ b/Master/texmf-dist/source/latex/stex/bin/stexml
@@ -0,0 +1,2 @@
+exec latexmlc $1 --path=../../../stex/sty --path=../../../stex/rnc --path=../../../stex/rnc/omdoc --path=../../../stex/sty/modules --path=../../../stex/sty/statements --path=../../../stex/sty/sproof --path=../../../stex/sty/omtext --path=../../../stex/sty/omdoc --path=../../../stex/sty/sref --path=../../../stex/sty/presentation --path=../../../stex/sty/dcm --path=../../../stex/sty/reqdoc --path=../../../stex/sty/metakeys --path=../../../stex/sty/mikoslides --path=../../../stex/sty/problem --path=../../../stex/sty/assignment --path=../../../stex/sty/etc --path=../../../sty --path=../../../sty/ded --path=../../../sty/ed --local --mode=standard --destination=#dir/#name.tex.xml --postdest=#dir/#name.omdoc --log=#dir/#name.ltxlog --post --stylesheet=../../../stex/xsl/omdocpost.xsl \
+ --openmath --pmml \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/stex/bin/stexmlmod b/Master/texmf-dist/source/latex/stex/bin/stexmlmod
new file mode 100755
index 00000000000..55dd1f6ab37
--- /dev/null
+++ b/Master/texmf-dist/source/latex/stex/bin/stexmlmod
@@ -0,0 +1,2 @@
+exec latexmlc --preamble=../../../lib/pre.tex $1 --path=../../../stex/sty --path=../../../stex/rnc --path=../../../stex/rnc/omdoc --path=../../../stex/sty/modules --path=../../../stex/sty/statements --path=../../../stex/sty/sproof --path=../../../stex/sty/omtext --path=../../../stex/sty/omdoc --path=../../../stex/sty/sref --path=../../../stex/sty/presentation --path=../../../stex/sty/dcm --path=../../../stex/sty/reqdoc --path=../../../stex/sty/metakeys --path=../../../stex/sty/mikoslides --path=../../../stex/sty/problem --path=../../../stex/sty/assignment --path=../../../stex/sty/etc --path=../../../sty --path=../../../sty/ded --path=../../../sty/ed --local --mode=fragment --destination=#dir/#name.tex.xml --postdest=#dir/#name.omdoc --log=#dir/#name.ltxlog --post --stylesheet=../../../stex/xsl/omdocpost.xsl \
+ --openmath --pmml