X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Flayouts%2Ftheorems-without-preamble.inc;h=ad7580bb4a0846cdd8203869f1891fc3ee18fe5b;hb=bab184e49e4420ad5277eacd45f2447727f55bbd;hp=4be9bec6299957b6da7059362a07d4f43bee0f49;hpb=38aacccedf6ed9a9c7b975a77d901995d3ec7af5;p=lyx.git diff --git a/lib/layouts/theorems-without-preamble.inc b/lib/layouts/theorems-without-preamble.inc index 4be9bec629..ad7580bb4a 100644 --- a/lib/layouts/theorems-without-preamble.inc +++ b/lib/layouts/theorems-without-preamble.inc @@ -1,5 +1,5 @@ # This file provides theorem environments without adding preamble code or -# requiring packages. THis is useful for classes that define their own theorems +# requiring packages. This is useful for classes that define their own theorems # like svjour3 or ijmpc. # Author: Uwe Stöhr @@ -16,6 +16,7 @@ # - Problem # - Prob # - Solution +# - Sol # - Exercise # - Remark # - Claim @@ -25,18 +26,25 @@ # - Note -Format 35 +Format 80 +OutlinerName thm "Definitions & Theorems" Counter theorem End Style Theorem - Category Theorem + Category Reasoning Margin First_Dynamic LatexType Environment LatexName theorem NextNoIndent 1 - OptionalArgs 1 + AddToToc thm + IsTocCaption 1 + Argument 1 + LabelString "Name/Title" + Tooltip "Alternative optional name or title" + IsTocCaption 1 + EndArgument LabelSep xx ParIndent MMM ParSkip 0.4 @@ -46,9 +54,9 @@ Style Theorem ParSep 0.3 Align Block AlignPossible Left - LabelType Counter + LabelType Static LabelCounter theorem - LabelString "Theorem \thetheorem" + LabelString "Theorem \thetheorem." Font Shape Italic Size Normal @@ -58,10 +66,10 @@ Style Theorem Series Bold EndFont LangPreamble - \providecommand{\theoremname}{_(Theorem)} + \providecommand{\theoremname}{_(Theorem)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\theoremname}{_(Theorem)}} + \addto\captions$$lang{\renewcommand{\theoremname}{_(Theorem)}} EndBabelPreamble End @@ -72,12 +80,12 @@ Style Corollary CopyStyle Theorem LabelCounter corollary LatexName corollary - LabelString "Corollary \thecorollary" + LabelString "Corollary \thecorollary." LangPreamble - \providecommand{\corollaryname}{_(Corollary)} + \providecommand{\corollaryname}{_(Corollary)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\corollaryname}{_(Corollary)}} + \addto\captions$$lang{\renewcommand{\corollaryname}{_(Corollary)}} EndBabelPreamble End @@ -88,12 +96,12 @@ Style Lemma CopyStyle Theorem LabelCounter lemma LatexName lemma - LabelString "Lemma \thelemma" + LabelString "Lemma \thelemma." LangPreamble - \providecommand{\lemmaname}{_(Lemma)} + \providecommand{\lemmaname}{_(Lemma)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\lemmaname}{_(Lemma)}} + \addto\captions$$lang{\renewcommand{\lemmaname}{_(Lemma)}} EndBabelPreamble End @@ -104,12 +112,12 @@ Style Proposition CopyStyle Theorem LabelCounter proposition LatexName proposition - LabelString "Proposition \theproposition" + LabelString "Proposition \theproposition." LangPreamble - \providecommand{\propositionname}{_(Proposition)} + \providecommand{\propositionname}{_(Proposition)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\propositionname}{_(Proposition)}} + \addto\captions$$lang{\renewcommand{\propositionname}{_(Proposition)}} EndBabelPreamble End @@ -127,12 +135,6 @@ Style Prop LabelFont Series Medium EndFont - LangPreamble - \providecommand{\propname}{_(Prop)} - EndLangPreamble - BabelPreamble - \addto\captions$$lang{\renewcommand{\propname}{_(Prop)}} - EndBabelPreamble End @@ -142,7 +144,7 @@ Style Conjecture CopyStyle Theorem LabelCounter conjecture LatexName conjecture - LabelString "Conjecture \theconjecture" + LabelString "Conjecture \theconjecture." Font Shape Up EndFont @@ -151,10 +153,10 @@ Style Conjecture Shape Italic EndFont LangPreamble - \providecommand{\conjecturename}{_(Conjecture)} + \providecommand{\conjecturename}{_(Conjecture)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\conjecturename}{_(Conjecture)}} + \addto\captions$$lang{\renewcommand{\conjecturename}{_(Conjecture)}} EndBabelPreamble End @@ -167,10 +169,10 @@ Style Fact LatexName fact LabelString "Fact \thefact." LangPreamble - \providecommand{\factname}{_(Fact)} + \providecommand{\factname}{_(Fact)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\factname}{_(Fact)}} + \addto\captions$$lang{\renewcommand{\factname}{_(Fact)}} EndBabelPreamble End @@ -181,7 +183,7 @@ Style Definition CopyStyle Theorem LabelCounter definition LatexName definition - LabelString "Definition \thedefinition" + LabelString "Definition \thedefinition." RefPrefix def Font Shape Up @@ -191,10 +193,10 @@ Style Definition Series Bold EndFont LangPreamble - \providecommand{\definitionname}{_(Definition)} + \providecommand{\definitionname}{_(Definition)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\definitionname}{_(Definition)}} + \addto\captions$$lang{\renewcommand{\definitionname}{_(Definition)}} EndBabelPreamble End @@ -205,13 +207,13 @@ Style Example CopyStyle Conjecture LabelCounter example LatexName example - LabelString "Example \theexample" + LabelString "Example \theexample." RefPrefix exa LangPreamble - \providecommand{\examplename}{_(Example)} + \providecommand{\examplename}{_(Example)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\examplename}{_(Example)}} + \addto\captions$$lang{\renewcommand{\examplename}{_(Example)}} EndBabelPreamble End @@ -223,15 +225,13 @@ Style Problem Category Exercise LabelCounter problem LatexName problem - LabelString "Problem \theproblem" + LabelString "Problem \theproblem." RefPrefix prob - OptionalArgs 1 - RequiredArgs 1 LangPreamble - \providecommand{\problemname}{_(Problem)} + \providecommand{\problemname}{_(Problem)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\problemname}{_(Problem)}} + \addto\captions$$lang{\renewcommand{\problemname}{_(Problem)}} EndBabelPreamble End @@ -239,11 +239,32 @@ End Counter prob Within chapter End +# Prob does not copy a style to avoid preamble code Style Prob - CopyStyle Problem - LabelCounter prob + Category Exercise + LatexType Environment LatexName prob - LabelString "\theprob" + Margin First_Dynamic + LabelType Static + LabelCounter prob + LabelString "\theprob." + RefPrefix pro + NextNoIndent 1 + ResetArgs 1 + LabelSep xx + ParIndent MMM + ParSkip 0.4 + ItemSep 0.2 + TopSep 0.7 + BottomSep 0.7 + ParSep 0.3 + Align Block + AlignPossible Left + LabelFont + Series Bold + EndFont + AddToToc thm + IsTocCaption true End @@ -253,30 +274,44 @@ Style Solution CopyStyle Problem LabelCounter solution LatexName solution - LabelString "Solution \thesolution" - RefPrefix sol + LabelString "Solution \thesolution." + RefPrefix solu LangPreamble - \providecommand{\solutionname}{_(Solution)} + \providecommand{\solutionname}{_(Solution)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\solutionname}{_(Solution)}} + \addto\captions$$lang{\renewcommand{\solutionname}{_(Solution)}} EndBabelPreamble End +Style Sol + CopyStyle Prob + LatexName sol + LabelType Static + LabelString "# [number of Prob]" + Argument 1 + Mandatory 1 + LabelString "Label of Problem" + Tooltip "Label of the corresponding problem" + IsTocCaption true + EndArgument +End + + Counter exercise End Style Exercise CopyStyle Definition LabelCounter exercise LatexName exercise - LabelString "Exercise \theexercise" + LabelString "Exercise \theexercise." RefPrefix exer LangPreamble - \providecommand{\exercisename}{_(Exercise)} + \providecommand{\exercisename}{_(Exercise)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\exercisename}{_(Exercise)}} + \addto\captions$$lang{\renewcommand{\exercisename}{_(Exercise)}} EndBabelPreamble End @@ -287,13 +322,13 @@ Style Remark CopyStyle Conjecture LabelCounter remark LatexName remark - LabelString "Remark \theremark" + LabelString "Remark \theremark." RefPrefix rem LangPreamble - \providecommand{\remarkname}{_(Remark)} + \providecommand{\remarkname}{_(Remark)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\remarkname}{_(Remark)}} + \addto\captions$$lang{\renewcommand{\remarkname}{_(Remark)}} EndBabelPreamble End @@ -303,10 +338,10 @@ Style Claim LatexName claim LabelString "Claim" LangPreamble - \providecommand{\claimname}{_(Claim)} + \providecommand{\claimname}{_(Claim)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\claimname}{_(Claim)}} + \addto\captions$$lang{\renewcommand{\claimname}{_(Claim)}} EndBabelPreamble End @@ -317,13 +352,13 @@ Style Case CopyStyle Remark LabelCounter case LatexName case - LabelString "Case \thecase" + LabelString "Case \thecase." RefPrefix case LangPreamble - \providecommand{\casename}{_(Case)} + \providecommand{\casename}{_(Case)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\casename}{_(Case)}} + \addto\captions$$lang{\renewcommand{\casename}{_(Case)}} EndBabelPreamble End @@ -334,13 +369,13 @@ Style Property CopyStyle Claim LabelCounter property LatexName property - LabelString "Property \theproperty" + LabelString "Property \theproperty." RefPrefix prop LangPreamble - \providecommand{\propertyname}{_(Property)} + \providecommand{\propertyname}{_(Property)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\propertyname}{_(Property)}} + \addto\captions$$lang{\renewcommand{\propertyname}{_(Property)}} EndBabelPreamble End @@ -351,13 +386,13 @@ Style Question CopyStyle Claim LabelCounter question LatexName question - LabelString "Question \thequestion" + LabelString "Question \thequestion." RefPrefix que LangPreamble - \providecommand{\questionname}{_(Question)} + \providecommand{\questionname}{_(Question)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\questionname}{_(Question)}} + \addto\captions$$lang{\renewcommand{\questionname}{_(Question)}} EndBabelPreamble End @@ -368,13 +403,13 @@ Style Note CopyStyle Claim LabelCounter note LatexName note - LabelString "Note \thenote" + LabelString "Note \thenote." RefPrefix note LangPreamble - \providecommand{\notename}{_(Note)} + \providecommand{\notename}{_(Note)} EndLangPreamble BabelPreamble - \addto\captions$$lang{\renewcommand{\notename}{_(Note)}} + \addto\captions$$lang{\renewcommand{\notename}{_(Note)}} EndBabelPreamble End