#!/usr/bin/perl -i -p

if ($doit && /\{section/) {
   s/\[0\]/[1]/;
   s/\{\}/{section*.1}/;
}

if (/\{section\*\.1\}/) {
   $doit=1;
}

if (/chapter\.1/) {
   $doit=0;
}
