-----BEGIN PGP SIGNED MESSAGE----- On Mittwoch, 12. Februar 2003 10:21, Angus Leeming wrote: ... > > $ ./trial ' - 3.5 cM' ' + 4,5 Cm ' ' + 4.5 \columnWidth ' > ' - 3.5 cM' becomes '-3.5cm' > ' + 4,5 Cm ' becomes '+4.5cm' > ' + 4.5 \columnWidth ' becomes '+4.5\columnWidth'
You may miss '.3 cm' > sub regularizeLatexLength { > my $LatexLength = shift; > > # '4,5cm', '4.5 Cm' and '4.5 cM' are all valid LaTeX. > # Turn them into a common, standard form. > # First, deal with '- 5,5 ' as '-5.5' > $LatexLength =~ s/^\s*([+-]?)\s*(\d+)[.,]?(\d*)\s*/$1$2.$3/; maybe here $LatexLength =~ s/^\s*([+-]?)\s*(\d*)[.,]?(\d*)\s*/$1$2.$3/; Kornel - -- Kornel Benko [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.8 iQCVAwUBPkofP7ewfbDGmeqhAQEsowP/XecndM1TUIEO6ptN0EiDtKgshCepkp1m OCKqfb6nckrJnyhRew9YYWkFvWhX8lFcjDXY3CywYZmlLNkDgqe83KwzNF5lw2Qg yi/OFhG0hWJC8DExzg9GatDso4Nk95XlXKQgegzl8VGKGJEfjDw1ORV5m4ld0N9V uhnHZMkHwy8= =h8qP -----END PGP SIGNATURE-----