fixed indents

This commit is contained in:
2024-11-24 12:09:53 +01:00
parent fe5ba3a18f
commit 930123771c
6 changed files with 70 additions and 61 deletions
+6 -2
View File
@@ -1,11 +1,15 @@
docker = podman
build_dir = build
template_dir = templates
config_dir = config
docker = podman
library_dir = library
propers_dir = propers
template_dir = templates
tex_deps = $(template_dir)/*.tt $(library_dir)/*/*/*.tt $(propers_dir)/*.tt $(config_dir)/song_choices.csv $(config_dir)/qr_codes.csv $(config_dir)/variables.tt
.PHONY: all
all: leadsheet_collection.pdf choir_scores.pdf print_a3.pdf clean_intermediate #print_a4.pdf
%.pdf: build
$(MAKE) -C $(build_dir) $@
songsheet.tex: $(template_dir)/songsheet.tt $(tex_deps) $(template_dir)/header.tt $(template_dir)/head.tt $(template_dir)/footer.tt
%.tex: build
$(MAKE) -C $(template_dir) $@
clean_intermediate:
+1 -1
View File
@@ -2,7 +2,7 @@ build_dir = ../build
library_dir = ../library
propers_dir = ../propers
config_dir = ../config
tex_deps = *.tt $(library_dir)/*/*/*.tt $(config_dir)/song_choices.csv $(propers_dir)/*.tt
tex_deps = *.tt $(library_dir)/*/*/*.tt $(propers_dir)/*.tt $(config_dir)/song_choices.csv $(config_dir)/variables.tt
songsheet.tex: songsheet.tt $(tex_deps) header.tt head.tt footer.tt
tpage $< > $(build_dir)/$@
musician_scores.tex: musician_scores.tt $(tex_deps)
+8 -8
View File
@@ -77,17 +77,17 @@ RawFeature = {+ss06}
[% USE song_choices = datafile("${config_dir}/song_choices.csv", delim= '|') %]
[% IF parts == 0 -%]
parts = ensemble
parts = ensemble
[% END -%]
[% FOREACH song = song_choices %]
\newpage
[% template = song.template == '' ? "song_template.tt" : song.template -%]
[% INCLUDE "$template"
purpose = song.purpose
title = song.title
content = song.content
variables = song.variables ? "${song.variables}/assignments.tt" : ''
%]
[% template = song.template == '' ? "song_template.tt" : song.template -%]
[% INCLUDE "$template"
purpose = song.purpose
title = song.title
content = song.content
variables = song.variables ? "${library_dir}/${song.variables}/assignments.tt" : ''
%]
[% END %]
\end{document}
+47 -43
View File
@@ -4,51 +4,55 @@
END;
-%]
\song{[% purpose_print ? purpose_print : purpose %]}{[% song_title -%]}{
[% before_song -%]
\begin{samepage}
[% IF scores -%]
[% IF scores.gregorian AND (gregorian OR NOT scores.congregation) -%]
[% IF NOT gregorian -%]
\textbf{\LARGE{Activate gregorian}}
[% ELSE -%]
\gregorioscore{gregorio_scores/[% scores.gregorian %]}
[% END -%]
[% ELSE -%]
\lilypondfile{[% IF parts;
IF parts == 'band';
IF scores.leadsheet;
GET "${library_dir}/${scores.leadsheet}";
[% before_song -%]
\begin{samepage}
[% IF scores;
IF scores.gregorian AND (gregorian OR NOT scores.congregation);
IF NOT gregorian;
GET "\\textbf{\\LARGE{Activate gregorian}}\n";
ELSE;
GET "${library_dir}/${scores.SATB}";
GET "\\gregorioscore{gregorio_scores/${scores.gregorian}}\n";
END;
ELSIF parts == 'SATB';
IF scores.SATB;
GET "${library_dir}/${scores.SATB}";
ELSE;
GET "${library_dir}/${scores.leadsheet}";
ELSE;
GET '\lilypondfile{';
IF parts;
IF parts == 'band';
IF scores.leadsheet;
GET "${library_dir}/${scores.leadsheet}";
ELSE;
GET "${library_dir}/${scores.SATB}";
END;
ELSIF parts == 'SATB';
IF scores.SATB;
GET "${library_dir}/${scores.SATB}";
ELSE;
GET "${library_dir}/${scores.leadsheet}";
END;
END;
ELSE;
GET "${library_dir}/${scores.congregation}";
END;
ELSE;
GET "${library_dir}/${scores.congregation}";
END; %]}
[% END -%]
[% ELSIF lyrics -%]
[% lyrics %]
[% END -%]
[% IF credits -%]
\leavevmode\\*
[% FOREACH key = credits.keys -%]
\[% key %]{[% credits.$key %]}
[% END -%]
[% END -%]
\end{samepage}
[% content -%]
[% IF (meditation && meditations) || (parts && meditation) -%]
\leavevmode\par\smallskip
[% meditation %]
[% END -%]
[% IF after_song -%]
\leavevmode\par\smallskip
[% after_song %]
[% END -%]
GET "}\n";
END;
ELSIF lyrics;
GET lyrics;
END; %]
[% IF credits -%]
\leavevmode\\*
[% FOREACH key = credits.keys;
# Workaround because PERL keeps resolving \\$ to $
s = "\\ ${key}{${credits.$key}}\n";
GET s.replace('(\W) ', '$1');
END; -%]
[% END -%]
\end{samepage}
[% content -%]
[% IF (meditation && meditations) || (parts && meditation) -%]
\leavevmode\par\smallskip
[% meditation %]
[% END -%]
[% IF after_song -%]
\leavevmode\par\smallskip
[% after_song %]
[% END -%]
}
+6 -6
View File
@@ -7,12 +7,12 @@
[% USE song_choices = datafile("${config_dir}/song_choices.csv", delim= '|') %]
[% FOREACH song = song_choices %]
[% template = song.template == '' ? "song_template.tt" : song.template -%]
[% INCLUDE "$template"
purpose = song.purpose
content = song.content
variables = song.variables ? "${song.variables}/assignments.tt" : ''
%]
[% template = song.template == '' ? "song_template.tt" : song.template -%]
[% INCLUDE "$template"
purpose = song.purpose
content = song.content
variables = song.variables ? "${library_dir}/${song.variables}/assignments.tt" : ''
%]
[% END %]
[% INCLUDE footer.tt %]
+2 -1
View File
@@ -10,9 +10,10 @@
meditations = 0
config_dir = '../config'
library_dir = '../library'
propers_dir = '../propers/'
-%]
[% PROCESS "${config_dir}/variables.tt";
IF proper != '';
PROCESS "propers/${proper}.tt";
PROCESS "${propers_dir}/${proper}.tt";
END;
-%]