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

Template: Create instruments tex file only if we have any instruments

parent c2e905b1
Branches
No related tags found
No related merge requests found
...@@ -478,14 +478,19 @@ def generate_tex_files (settings, lily_files): ...@@ -478,14 +478,19 @@ def generate_tex_files (settings, lily_files):
#this_settings["scorenamebase"] = "Name"; #this_settings["scorenamebase"] = "Name";
tex_files.append (write_texscore_file (settings, this_settings, "TeX_Score.tex", score)) tex_files.append (write_texscore_file (settings, this_settings, "TeX_Score.tex", score))
this_settings = copy.deepcopy (tex_settings);
this_settings["scoretype"] = "InstrumentalParts"; # Create the tex instruments file only if we have instruments!
tmpopts = this_settings.get ("tex_options", []) if set(this_settings["instruments"]) != set(this_settings["noscore_instruments"]):
tmpopts.append (tex_options_map.get (this_settings["scoretype"], "")) this_settings = copy.deepcopy (tex_settings);
this_settings["tex_options"] = tmpopts this_settings["scoretype"] = "InstrumentalParts";
if "createCriticalComments" not in tex_settings: tmpopts = this_settings.get ("tex_options", [])
this_settings["createCriticalComments"] = score not in no_criticalcomments_scores; tmpopts.append (tex_options_map.get (this_settings["scoretype"], ""))
tex_files.append (write_texscore_file (settings, this_settings, "TeX_Instruments.tex", "Instruments")) this_settings["tex_options"] = tmpopts
if "createCriticalComments" not in tex_settings:
this_settings["createCriticalComments"] = score not in no_criticalcomments_scores;
tex_files.append (write_texscore_file (settings, this_settings, "TeX_Instruments.tex", "Instruments"))
else:
print " No separate instrumental scores, not creating instruments tex file."
return [tex_files, tex_includes]; return [tex_files, tex_includes];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment