--- markup/2004/tex/pretex.pl 2004/06/13 03:53:35 1.1 +++ markup/2004/tex/pretex.pl 2004/12/11 08:33:57 1.3 @@ -1,10 +1,13 @@ #!/usr/bin/perl use strict; use Encode; +my $opt = {}; sub c{ $_ = shift; + s/\\preprocess{([^{}=\s]+)(?:\s*=\s*([^{}=\s]*))?}/$opt->{$1}=defined$2?$2:1;''/ge; s/\x{3001}/, /g; s/\x{3002}/. /g; + s/\$/\\\$/g if $opt->{'Perl-mode'}; s{\\sourcecode\s*(?:\[([^\[\]]*)\]\s*)?{([^{}]+)}}{ my %opt = map {$_->[1] = 1 unless defined $_->[1]; @$_} map {[split /\s*=\s*/, $_, 2]} split /\s*,\s*/, $1; @@ -13,6 +16,7 @@ my $source = ''; my $line = 1; for (<$file>) { + s/\x0C//g; s/\t/ /g and warn "$0: $filename\[$line]: TAB found"; $source .= sprintf '%3d %s', $line++, $_; } @@ -72,4 +76,4 @@ =cut -# $Date: 2004/06/13 03:53:35 $ +# $Date: 2004/12/11 08:33:57 $