I want to use NWX for working with linguistic transcripts. Therefore I need to add line numbers to some bigger text.
I modified the line numbering script that way, that it adds zeros in front of the line number, so that the line numbers have all the same length.
The new macro looks like this:
Code: Select all
#Nisus Macro Block
#source clipboard
#destination clipboard
#before execution
#Copy
#after execution
#Paste
#End Nisus Macro Block
my $count = 1;
while (my $line = <>) {
if ($count < 10)
{
print "000$count\t$line";
$count++;
}
elsif ($count < 100)
{
print "00$count\t$line";
$count++;
}
elsif ($count < 1000)
{
print "0$count\t$line";
$count++;
}
else
{ print "$count\t$line";
$count++;
}
}
I need to get all lines numbered. I have to get the sot wrapped text hard wrapped somehow. Does anyone know if and how that's possible.
Moreover the macro does kill the styling of the text alltogether, changing it to the appearance of the first word in the text. So here's my second question: How can you keep the appearence (e.g. font color and weight) of the text intact?
I would be glad if you could help me out.[/b][/code]