Skip to content
Snippets Groups Projects
Commit c762daea authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Fix templates for multi-score editions

parent 91186811
No related branches found
No related tags found
No related merge requests found
......@@ -3,11 +3,11 @@
\input{TeX_<< basename >>_Settings.itex}
\hypersetup{
pdftitle={\scoreTitle, \<< scoretype >>ScoreType},
pdftitle={\scoreTitle, \<< scoretype >><$ if is_instrument $>Name<$ else $>ScoreType<$ endif $>},
}
\scoretype{\<< scoretype >>ScoreType}
\scorenumber{\scoreNumber\<< scoretype >>ScoreNumber}
\scoretype{\<< scoretype >><$ if is_instrument $>Name<$ else $>ScoreType<$ endif $>}
\scorenumber{\scoreNumber\<< scoretype >><$ if not is_instrument $>Score<$ endif $>Number}
% \ismn{......}
\begin{document}
......@@ -20,12 +20,12 @@
<$ endif -$>
<$ if not w.noTOC -$>
\phantomsection
\addcontentsline{toc}{section}{\<< scoretype >>ScoreType}
\addcontentsline{toc}{section}{\<< scoretype >><$ if is_instrument $>Name<$ else $>ScoreType<$ endif $>}
<$ endif -$>
\includescore{Score_<< scoretype >>}
\includescore{<$ if is_instrument $>Instrument<$ else $>Score<$ endif $>_<< scoretype >>}
<$ endfor $>
<$ if createCriticalComments is sameas true -$>
<$ if (createCriticalComments is sameas true) and (is_instrument is not sameas true) -$>
\cleardoublepage
\backmatter
\appendix
......
......@@ -439,8 +439,11 @@ def generate_tex_files (settings, lily_files):
instruments_scores.append (score_settings);
for p in score_settings.get ("scores", []):
score_map[p] = score_map.get (p, []) + [score_settings];
for i in tex_settings.get ("instruments", []):
if i in tex_settings.get ("instrumentalscores", []):
score_map[i] = score_map.get (i, []) + [score_settings];
tex_settings["works"] = instruments_scores;
tex_include_templates = settings.get_template_names("TeX_*.itex");
for t in tex_include_templates:
base = re.sub( r'TeX_(.*)\.itex', r'\1', t);
......@@ -450,11 +453,16 @@ def generate_tex_files (settings, lily_files):
this_settings = copy.deepcopy (tex_settings);
this_settings["scoretype"] = score;
this_settings["scores"] = parts;
#this_settings["scorebasetype"] = "Score";
#this_settings["scorenamebase"] = "ScoreType";
tmpopts = this_settings.get ("tex_options", [])
tmpopts.append (tex_options_map.get (this_settings["scoretype"], ""))
this_settings["tex_options"] = tmpopts
if "createCriticalComments" not in tex_settings:
this_settings["createCriticalComments"] = score not in no_criticalcomments_scores;
this_settings["is_instrument"] = score in tex_settings.get ("instruments", []);
#this_settings["scorebasetype"] = "Instrument";
#this_settings["scorenamebase"] = "Name";
tex_files.append (write_texscore_file (settings, this_settings, "TeX_Score.tex", score))
this_settings = copy.deepcopy (tex_settings);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment