diff --git a/lib/layouts/svglobal3.layout b/lib/layouts/svglobal3.layout index 0abcd1d31c..b8c09793f4 100644 --- a/lib/layouts/svglobal3.layout +++ b/lib/layouts/svglobal3.layout @@ -82,13 +82,7 @@ InsetLayout Flex:CRSC LabelString "CR Subject Classification" End -Style Problem - RequiredArgs 0 -End - +# this label has no dot at the end Style Solution - RequiredArgs 0 + LabelString "Solution \thesolution" End - - - diff --git a/lib/layouts/svmono.layout b/lib/layouts/svmono.layout index c5468103bf..bf30177337 100644 --- a/lib/layouts/svmono.layout +++ b/lib/layouts/svmono.layout @@ -31,14 +31,6 @@ Style Running_Chapter LabelString "Running Chapter:" End -Style Problem - ObsoletedBy Prob -End - -Style Solution - ObsoletedBy Sol -End - Counter theorem Within chapter End diff --git a/lib/layouts/svmult.layout b/lib/layouts/svmult.layout index f34773a30b..2736dc283d 100644 --- a/lib/layouts/svmult.layout +++ b/lib/layouts/svmult.layout @@ -137,14 +137,6 @@ Style List_of_Contributors Requires ifthen End -#Style Problem -# ObsoletedBy Problem_(theorem-like) -#End - -#Style Solution -# ObsoletedBy Solution_(theorem-like) -#End - #InsetLayout Flex:Inst # Decoration Classic # LabelString "Institute # [deprecated]" diff --git a/lib/layouts/theorems-without-preamble.inc b/lib/layouts/theorems-without-preamble.inc index 4be9bec629..85cf48fc16 100644 --- a/lib/layouts/theorems-without-preamble.inc +++ b/lib/layouts/theorems-without-preamble.inc @@ -16,6 +16,7 @@ # - Problem # - Prob # - Solution +# - Sol # - Exercise # - Remark # - Claim @@ -225,8 +226,6 @@ Style Problem LatexName problem LabelString "Problem \theproblem" RefPrefix prob - OptionalArgs 1 - RequiredArgs 1 LangPreamble \providecommand{\problemname}{_(Problem)} EndLangPreamble @@ -243,7 +242,8 @@ Style Prob CopyStyle Problem LabelCounter prob LatexName prob - LabelString "\theprob" + LabelString "\theprob." + OptionalArgs 0 End @@ -253,7 +253,7 @@ Style Solution CopyStyle Problem LabelCounter solution LatexName solution - LabelString "Solution \thesolution" + LabelString "Solution \thesolution." RefPrefix sol LangPreamble \providecommand{\solutionname}{_(Solution)} @@ -264,6 +264,18 @@ Style Solution End +Counter sol + Within chapter +End +Style Sol + CopyStyle Problem + LabelCounter sol + LatexName sol + LabelString "\thesol" + RequiredArgs 1 +End + + Counter exercise End Style Exercise diff --git a/lib/templates/springer/solutions.lyx b/lib/templates/springer/solutions.lyx index 018b25e02a..acac0f1bab 100644 --- a/lib/templates/springer/solutions.lyx +++ b/lib/templates/springer/solutions.lyx @@ -79,17 +79,17 @@ reference "chap:intro" \end_layout -\begin_layout Solution +\begin_layout Problem \begin_inset Argument status open \begin_layout Plain Layout -probl +Title/Name (optional) \end_layout \end_inset -The solution +The problem \begin_inset Index idx status collapsed @@ -99,7 +99,20 @@ problems \end_inset + is revealed here. +\end_layout +\begin_layout Solution +\begin_inset Argument +status open + +\begin_layout Plain Layout +Title/Name (optional) +\end_layout + +\end_inset + +The solution \begin_inset Index idx status collapsed @@ -110,16 +123,6 @@ solutions \end_inset is revealed here. -\begin_inset Note Note -status open - -\begin_layout Plain Layout -both, the optional argument and a text is mandatory -\end_layout - -\end_inset - - \end_layout \begin_layout --Separator-- @@ -127,15 +130,6 @@ both, the optional argument and a text is mandatory \end_layout \begin_layout Solution -\begin_inset Argument -status open - -\begin_layout Plain Layout -prob2 -\end_layout - -\end_inset - \series bold Problem Heading @@ -151,5 +145,101 @@ Problem Heading (b) The solution of second part is revealed here. \end_layout +\begin_layout Subsection* +Problem with its solution +\begin_inset Note Note +status open + +\begin_layout Plain Layout +For these method use the layouts +\begin_inset Quotes eld +\end_inset + +Prob +\begin_inset Quotes erd +\end_inset + + and +\begin_inset Quotes eld +\end_inset + +Sol +\begin_inset Quotes erd +\end_inset + +. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +Problem: +\end_layout + +\begin_layout Prob +\begin_inset CommandInset label +LatexCommand label +name "prob:Area-of-Circle" + +\end_inset + +Here comes the problem description. + Its label will be referenced in its solution. +\end_layout + +\begin_layout Standard +Solution: +\end_layout + +\begin_layout Sol +\begin_inset Argument +status open + +\begin_layout Plain Layout +prob:Area-of-Circle +\end_layout + +\end_inset + +The solution of the corresponding problem. +\begin_inset Note Note +status open + +\begin_layout Plain Layout +the optional argument is the label of the corresponding problem +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +The number of the problem/solution can also be referenced in the text: +\begin_inset Quotes eld +\end_inset + +As explained in the description of problem +\begin_inset space ~ +\end_inset + + +\begin_inset CommandInset ref +LatexCommand ref +reference "prob:Area-of-Circle" + +\end_inset + +\SpecialChar \ldots{} + +\begin_inset Quotes erd +\end_inset + + +\end_layout + \end_body \end_document