- if mod == "theorems-std" or mod == "theorems-ams":
- if is_starred:
- add_to_preamble(document, "\\" + theoremName + "{" + LaTeXName + "}{\\protect\\solutionname}")
- else:
- add_to_preamble(document, "\\" + theoremName + "{" + LaTeXName + "}[thm]{\\protect\\solutionname}")
- if mod == "theorems-bytype" or mod == "theorems-ams-bytype":
- add_to_preamble(document, "\\" + theoremName + "{" + LaTeXName + "}{\\protect\\solutionname}")
+ if is_starred or mod == "theorems-bytype" or mod == "theorems-ams-bytype":
+ add_to_preamble(document, "\\%s{%s}{\\protect\\solutionname}" % \
+ (theoremName, LaTeXName))
+ else: # mod == "theorems-std" or mod == "theorems-ams" and not is_starred
+ add_to_preamble(document, "\\%s{%s}[thm]{\\protect\\solutionname}" % \
+ (theoremName, LaTeXName))
+