made section templates more flexible

This commit is contained in:
leopoldfajtak
2024-12-05 10:35:07 +01:00
parent 12dc7edf0e
commit 6938f650fd
13 changed files with 62 additions and 124 deletions
+9 -10
View File
@@ -71,9 +71,9 @@ RawFeature = {+ss06}
\begin{document}
\section*{[% title %]}
\begin{centering}
[% subtitle %]
\end{centering}
\vfill
[% parts %]
[% USE song_choices = datafile("${config_dir}/song_choices.csv", delim= '|') %]
[% IF parts == 0 -%]
@@ -81,14 +81,13 @@ parts = ensemble
[% END -%]
[% FOREACH song = song_choices %]
\newpage
[% template = song.template == '' ? "song_template.tt" : song.template -%]
[% INCLUDE "$template"
[% 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" : ''
directory = song.variables ? "${library_dir}/${song.variables}" : ''
%]
[% END %]
assignments = song.assignments_directory ? "${library_dir}/${song.assignments_directory}/assignments.tt" : ''
directory = song.assignments_directory ? "${library_dir}/${song.assignments_directory}" : ''
overrides = song.overrides;
-%]
[% END; -%]
\end{document}