On 07/28/2012 07:02 PM, chi pro wrote:
Well that revealed my ignorance. I would like to add a new "heading"
called "Implication" that Lyx is then supposed to number for me, just
like Propositions, Lemmas, etc.
Hope this helps.
You need to create some new layout. If this is something you think you
will use again in another paper, then put it into a module of your own.
If not, if it's just a one-off sort of thing, then you can put it into
Local Layout, under Document>Settings. You can read about layout and
modules and such in Chapter 5 of the Customization manual.
In this case, though, we can just crib off what's already in LyX. In the
theorems.inc file, we have, e.g.:
Style Fact
CopyStyle Theorem
DependsOn Theorem
LatexName fact
LabelString "Fact \thetheorem."
Preamble
\theoremstyle{plain}
\newtheorem{fact}[thm]{\protect\factname}
EndPreamble
LangPreamble
\providecommand{\factname}{_(Fact)}
EndLangPreamble
BabelPreamble
\addto\captions$$lang{\renewcommand{\factname}{_(Fact)}}
EndBabelPreamble
End
We can just copy it over change the obvious parts to make it an
"Implication", leaving out the translation-related stuff (which won't do
anything for you).
So the module might look like this:
#\DeclareLyXModule{New Theorem Styles}
#DescriptionBegin
#Defines some additional theorem-like environments, including Implication.
#DescriptionEnd
#Requries: theorems-ams | theorems-std
#Category: theorems
# Author: Richard Heck <[email protected]>
Format 35
Style Implication
CopyStyle Theorem
DependsOn Theorem
LatexName fact
LabelString "Implication \thetheorem."
Preamble
\theoremstyle{plain}
\newtheorem{implic}[thm]{Implication}
EndPreamble
End
Put that in a file newtheorems.module, save it in your local LyX user
directory, reconfigure LyX, and you should see the module as one of your
choices.
Richard