On 07/08/2012 03:05 PM, Mehrdad Oveisi wrote:
Hello,
How can I restate a theorem in different parts of a document?
I prefer that the entire theorem text is duplicated, but I can live
with a solution that only repeats the theorem number and I copy and
paste the theorem text.
Also, the more LyX-compatible the solution is, the better!
One example for repeating theorems can be found on page 6 of Thmtools
Users’ Guide:
http://mirror.its.dal.ca/ctan/macros/latex/exptl/thmtools/thmtools.pdf
They define a "restatable" environment, and I am not sure how easy it
is to use this in LyX. Is it?
You can use anything of course via ERT. A quick look at this makes me
think it won't be trivial to get native LyX support for it. You could
certainly define a Restatable layout style, but you'd have to have some
required arguments and perhaps also an optional argument. Something like:
Style Restatable
CopyStyle theorem
LatexName restatable
RequiredArgs 2
OptionalArgs 1
Preamble
\usepackage{thmtools}
EndPreamble
End
will probably get you close. But even if that worked, the command to
print the theorem depends upon what name you choose for it, and that
will have to be ERT.
Richard