}elsif ( /{even}/ ) {
print TEX "\\ifthenelse{\\isodd{\\thepage}}{}{\\newpage ~}";
}elsif ( /{title:|{t:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
if ( $document_class eq "book" ){
print TEX "$define" unless ( $lyrics );
}
$song_title = $_;
$verbose && print TEX "\\typeout{$_}";
}elsif ( /{subtitle:|{st:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
print TEX "\\index{$_!$song_title}";
print TEX "\\begin{center}$_\\end{center}\n";
}elsif ( /{margin:|{m:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
print TEX "\\marginpar{$_}\n";
}elsif ( /{comment:|{c:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
print TEX "\\textit{$_}\\\\\n" unless ( $lyrics );
}elsif ( /{second:|{2:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
s/\s/$space/g; #Leerzeichen durch feste Leerzeichen ersetzen
print TEX "\\colorbox{second_back}{\\textcolor{second_text}{$_}}\\\\\n" unless ( $lyrics );
}elsif ( /{chapter:/ ) {
$chaptercount++;
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
if ( $document_class eq "book" ) {
print TEX "$define" unless ( $lyrics );
$define = "";
sub newtab {
if ( /{guitartab:/ ) { $guitartab="yes" } else { $guitartab ="no" };
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
s/\]\[/\]~~~\[/g; #fill in fixed spaces between notes
s/\_/~~~/g; #fill in extra space
s/\s/~/g; #replace spaces with fixed spaced
if ( /^{/ ) { # nur Zeilen mit Direktiven bearbeiten
chomp;
if ( /{book_title:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
$title = $_ ;
}elsif ( /{book_author:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
$author = $_ ;
}elsif ( /{book_date:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
$date = $_ ;
}elsif ( /{document_class:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
$document_class = $_ ;
$verbose && print "Document_class: $document_class\n";
if ( $document_class ne "book" && $document_class ne "article" ) {
die "parameter of directive document_class must be \"book\" or \"article\"\n";
}
}elsif ( /{font_size:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
$font_size = $_ ;
}elsif ( /{color_chorus:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
$color_chorus = $_ ;
}elsif ( /{color_bridge:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
$color_bridge = $_ ;
}elsif ( /{color_instr:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
$color_instr = $_ ;
}elsif ( /{color_tab:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
$color_tab = $_ ;
}elsif ( /{color_second:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
$color_second = $_ ;
}elsif ( /{color_second_back:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
$color_second_back = $_ ;
}elsif ( /{geometry:|{g:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
$geometry .= "$_," ;
}elsif ( /{preamble:|{p:/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
$preamble .= "$_\n" ;
}elsif ( /{musixtex}/ ) {
$musixtex = "yes";
}elsif ( /{tabdefs}/ ) {
$tabdefs = "yes";
}elsif ( /{chapter/ ) {
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
$chaptercount++;
push @titlecount, (0);
}elsif ( /{title:|{t:/ ) {
while ( <CHORDPRO> ){
if ( /{include:/ ) { #read only lines with an include directive
chomp; # avoid \n on last field
- s/({.*:)(.+)(})/\2/;
+ s/(\{.*:)(.+)(\})/\2/;
print TMP "#$_\n#\n";
open ( INSERT, '<', "$dirname/$_" ) || die "cannot open include file: $_";