# - Example
# - Problem
# - Exercise
+# - Solution
# - Remark
# - Claim
# - Case (by inclusion)
End
Counter exercise
End
+Counter solution
+End
Counter remark
End
Counter claim
End
+Style Solution
+ CopyStyle Definition
+ LatexName sol
+ LabelString "Solution \thesolution."
+ Preamble
+ \theoremstyle{definition}
+ \newtheorem{sol}{\protect\solutionname}
+ EndPreamble
+ Requires amsthm
+ LangPreamble
+ \providecommand{\solutionname}{_(Solution)}
+ EndLangPreamble
+ BabelPreamble
+ \addto\captions$$lang{\renewcommand{\solutionname}{_(Solution)}}
+ EndBabelPreamble
+ LabelCounter solution
+End
+
+
Style Remark
CopyStyle Theorem
LatexName rem
# - Example
# - Problem
# - Exercise
+# - Solution
# - Remark
# - Claim
# - Proof
End
+Style Solution
+ CopyStyle Definition
+ LatexName sol
+ LabelString "Solution \thetheorem."
+ Preamble
+ \theoremstyle{definition}
+ \newtheorem{sol}[thm]{\protect\solutionname}
+ EndPreamble
+ LangPreamble
+ \providecommand{\solutionname}{_(Solution)}
+ EndLangPreamble
+ BabelPreamble
+ \addto\captions$$lang{\renewcommand{\solutionname}{_(Solution)}}
+ EndBabelPreamble
+End
+
+
Style Remark
CopyStyle Theorem
DependsOn Theorem
# - Example
# - Problem
# - Exercise
+# - Solution
# - Remark
# - Claim
# - Proof
End
+Style Solution*
+ CopyStyle Definition*
+ LatexName sol*
+ LabelString "Solution."
+ Preamble
+ \theoremstyle{definition}
+ \newtheorem*{sol*}{\protect\solutionname}
+ EndPreamble
+ LangPreamble
+ \providecommand{\solutionname}{_(Solution)}
+ EndLangPreamble
+ BabelPreamble
+ \addto\captions$$lang{\renewcommand{\solutionname}{_(Solution)}}
+ EndBabelPreamble
+End
+
+
Style Remark*
CopyStyle Theorem*
LatexName rem*
have_mod = False
mods = document.get_module_list()
for mod in mods:
- if mod == "theorems-std" or mod == "theorems-bytype":
+ if mod == "theorems-std" or mod == "theorems-bytype" \
+ or mod == "theorems-ams" or mod == "theorems-ams-bytype":
have_mod = True
continue
if not have_mod:
document.body[j : j + 1] = put_cmd_in_ert("\\end{sol}") + ["\\end_layout"]
document.body[i : i + 1] = ["\\begin_layout Standard", ""] + begcmd
add_to_preamble(document, "\\providecommand{\solutionname}{Solution}")
- if mod == "theorems-std":
+ if mod == "theorems-std" or mod == "theorems-ams":
add_to_preamble(document, "\\theoremstyle{plain}\n" \
"\\newtheorem{sol}[thm]{\\protect\\solutionname}")
- if mod == "theorems-bytype":
+ if mod == "theorems-bytype" or mod == "theorems-ams-bytype":
add_to_preamble(document, "\\theoremstyle{definition}\n" \
"\\newtheorem{sol}{\\protect\\solutionname}")
i = j