summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/bin/old/symdef
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/stex/bin/old/symdef')
-rwxr-xr-xMaster/texmf-dist/source/latex/stex/bin/old/symdef46
1 files changed, 46 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/stex/bin/old/symdef b/Master/texmf-dist/source/latex/stex/bin/old/symdef
new file mode 100755
index 00000000000..b5c789a1c72
--- /dev/null
+++ b/Master/texmf-dist/source/latex/stex/bin/old/symdef
@@ -0,0 +1,46 @@
+#!/usr/bin/perl -w
+
+use strict;
+use Getopt::Long;
+use Pod::Usage;
+
+my $output = "-";
+my $input = "-";
+
+GetOptions("output=s",\$output);
+
+$input = $ARGV[0] if @ARGV;
+
+open(FIN,$input) or die "Can't open input file.";
+open(FOUT,">$output");
+
+my $line;
+
+while ($line=<FIN>){
+ if ($line !~ m/symdef/ && $line !~ m/elldef/ && $line !~ m/abbrdef/){
+ print FOUT $line;
+ next;
+ }
+ if ($line =~ m/\}\[\d,/){
+ print FOUT $line;
+ next;
+ }
+
+ if ($line =~ m/\\(sym|abbr|ell)def\{\\([^\}]+)\}\[(\d)\]([^\n\%]+)(.*)/){
+ print FOUT "\\$1def{\\$2}[$3,name=$2]$4$5\n";
+ } else {
+ if ($line =~ m/\\(sym|ell|abbr)def\{\\([^\}]+)\}([^\n\%]+)(.*)/){
+ print FOUT "\\$1def{\\$2}[0,name=$2]$3$4\n";
+ }
+ }
+}
+
+close(FIN);
+close(FOUT);
+
+
+__END__
+
+=head1 SYNOPSIS
+
+symdef [--output=outputfile] [texfile]