Wikipedia:WikiProject Chemistry/Structure drawing workgroup/Mysid's script: Difference between revisions

Content deleted Content added
does not depend on imagemagick any more
JaGa (talk | contribs)
fix bug - matrix() calls outside of defs block were slipping through
Line 13:
 
while (<INPUT>) {
#Skip over lines containing the matrix() function. Rounding
#I must skip over "defs" blocks, because they have objects with relative
#throws off the positioning of elements.
#dimensions. TODO:This is nasty code. I'm sure there's a better way to do
#this.if (/matrix/) {
if (/defs/) {
print OUTPUT $_;
my $line = $_;
while (!($line =~ /\/defs/)){
$line = <INPUT>;
print OUTPUT $line;
}
next;
}