From f5ce4bbb6fad2b72e169c97ca2b8d8d50da4fee1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Sun, 10 Jul 2011 05:16:27 +0000 Subject: [PATCH] - Springer layouts: add style "Sol" and fix layout of problem/solutions.lyx - solutions.lyx: detailed description git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39269 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/layouts/svglobal3.layout | 10 +- lib/layouts/svmono.layout | 8 -- lib/layouts/svmult.layout | 8 -- lib/layouts/theorems-without-preamble.inc | 20 +++- lib/templates/springer/solutions.lyx | 118 +++++++++++++++++++--- 5 files changed, 122 insertions(+), 42 deletions(-) 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,11 +123,51 @@ solutions \end_inset is revealed here. +\end_layout + +\begin_layout --Separator-- + +\end_layout + +\begin_layout Solution + +\series bold +Problem Heading +\series default + +\begin_inset Newline newline +\end_inset + +(a) The solution of first part is revealed here. +\begin_inset Newline newline +\end_inset + +(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 -both, the optional argument and a text is mandatory +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 @@ -122,33 +175,70 @@ both, the optional argument and a text is mandatory \end_layout -\begin_layout --Separator-- +\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 Solution +\begin_layout Standard +Solution: +\end_layout + +\begin_layout Sol \begin_inset Argument status open \begin_layout Plain Layout -prob2 +prob:Area-of-Circle \end_layout \end_inset +The solution of the corresponding problem. +\begin_inset Note Note +status open -\series bold -Problem Heading -\series default +\begin_layout Plain Layout +the optional argument is the label of the corresponding problem +\end_layout -\begin_inset Newline newline \end_inset -(a) The solution of first part is revealed here. -\begin_inset Newline newline + +\end_layout + +\begin_layout Standard +The number of the problem/solution can also be referenced in the text: +\begin_inset Quotes eld \end_inset -(b) The solution of second part is revealed here. +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 -- 2.39.2