On 01/11/14 10:59, Marek Stepanek wrote:
>
>
> Hello all!
>
>
> I try to transform this LaTeX (MusiXTEX) snipped ...
Sorry! I found it: a point was missing:
... sprintf("%30.10s",$increment) ->.<- ". Takt"/eg;
But how to align the last 10. Takt with sprintf()?
But I will certainly find out myself very soon.
Happy Halloween to all
marek
#!/usr/bin/perl
use warnings;
use strict;
my $increment = 0;
while (<DATA>) {
if (/\s*\d+\.\sTakt/) {
next if /^\s+$/;
# chomp;
++$increment;
# $increment=sprintf("%40.10s",$increment);
s/^([^%]+)%\s*\d+\.\sTakt$/"$1 %" .
sprintf("%30.10s",$increment) .
". Takt"/eg;
}
print;
}
__DATA__
\NOtes\qu{ABCD}\enotes\barre % 6. Takt
\NOtes\qu{EFGH}\enotes\barre % 7. Takt
\NOtes\ql{IJKL}\enotes\barre % 8. Takt
\NOtes\ql{MNOP}\enotes\barre % 9. Takt
\NOtes\ql{QRST}\enotes\barre % 10. Takt
\setclef1{\treble}\changeclefs%
\NOtes\qu{abcd}\enotes\barre % 1. Takt
\NOtes\qu{efgh}\enotes\barre % 2. Takt
\NOtes\ql{ijkl}\enotes\barre % 3. Takt
\NOtes\ql{mnop}\enotes\barre % 4. Takt
\NOtes\sk\ql{qrst}\enotes\barre %5. Takt
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].