/[suikacvs]/markup/2004/tex/pretex.pl
Suika

Diff of /markup/2004/tex/pretex.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by wakaba, Sun Jun 13 03:53:35 2004 UTC revision 1.2 by wakaba, Sat Jul 31 07:39:00 2004 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl  #!/usr/bin/perl
2  use strict;  use strict;
3  use Encode;  use Encode;
4    my $opt = {};
5  sub c{  sub c{
6    $_ = shift;    $_ = shift;
7      s/\\preprocess{([^{}=\s]+)(?:\s*=\s*([^{}=\s]*))?}/$opt->{$1}=defined$2?$2:1;''/ge;
8    s/\x{3001}/, /g;    s/\x{3001}/, /g;
9    s/\x{3002}/. /g;    s/\x{3002}/. /g;
10      s/\$/\\\$/g if $opt->{'Perl-mode'};
11    s{\\sourcecode\s*(?:\[([^\[\]]*)\]\s*)?{([^{}]+)}}{    s{\\sourcecode\s*(?:\[([^\[\]]*)\]\s*)?{([^{}]+)}}{
12      my %opt = map {$_->[1] = 1 unless defined $_->[1]; @$_}      my %opt = map {$_->[1] = 1 unless defined $_->[1]; @$_}
13                map {[split /\s*=\s*/, $_, 2]} split /\s*,\s*/, $1;                map {[split /\s*=\s*/, $_, 2]} split /\s*,\s*/, $1;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24