{-# LANGUAGE OverloadedStrings #-}-- | Package for theorem environments.moduleText.LaTeX.Packages.AMSThm(-- * AMSThm packageamsthm-- * AMSThm functions,newtheorem,theorem,proof,qedhere,TheoremStyle(..),theoremstyle)whereimportText.LaTeX.Base.SyntaximportText.LaTeX.Base.ClassimportText.LaTeX.Base.RenderimportText.LaTeX.Base.Types-- | AMSThm package.-- Example:---- > usepackage [] amsthmamsthm::PackageNameamsthm="amsthm"-- | Create a new 'theorem' environment type.-- Arguments are environment name (this will be the argument-- when using the 'theorem' function) and the displayed title.---- For example:---- > newtheorem "prop" "Proposition"---- > theorem "prop" "This is it."newtheorem::LaTeXCl=>String->l->lnewtheoremstr=liftL$\l->TeXComm"newtheorem"[FixArg$fromStringstr,FixArgl]theorem::LaTeXCl=>String->l->ltheoremstr=liftL$TeXEnvstr[]-- | The 'proof' environment. The first optional argument-- is used to put a custom title to the proof.proof::LaTeXCl=>Maybel->l->lproofNothing=liftL$TeXEnv"proof"[]proof(Justn)=liftL2(\n->TeXEnv"proof"[OptArgn])n-- | Insert the /QED/ symbol.qedhere::LaTeXCl=>lqedhere=comm0"qedhere"dataTheoremStyle=Plain|Definition|Remark|CustomThmStyleStringderivingShowinstanceRenderTheoremStylewhererenderPlain="plain"renderDefinition="definition"renderRemark="remark"render(CustomThmStylestr)=fromStringstr-- | Set the theorem style. Call this function in the preamble.theoremstyle::LaTeXCl=>TheoremStyle->ltheoremstylethmsty=fromLaTeX$TeXComm"theoremstyle"[FixArg$TeXRaw$renderthmsty]