From: André Pönitz Date: Thu, 13 Mar 2003 11:42:12 +0000 (+0000) Subject: read them back... X-Git-Tag: 1.6.10~17245 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=872de8b1de15c2b9f0e5f16f2456be615cd014d5;p=lyx.git read them back... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6484 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/factory.C b/src/factory.C index 6fbcb377b7..3c2a1d52d9 100644 --- a/src/factory.C +++ b/src/factory.C @@ -331,6 +331,9 @@ Inset * readInset(LyXLex & lex, Buffer const & buf) } else if (tmptok == "Include") { InsetCommandParams p("Include"); inset = new InsetInclude(p, buf); + } else if (tmptok == "Environment") { + lex.next(); + inset = new InsetEnvironment(buf.params, lex.getString()); } else if (tmptok == "ERT") { inset = new InsetERT(buf.params); } else if (tmptok == "Tabular") { diff --git a/src/insets/insetenv.C b/src/insets/insetenv.C index b17fe08c2e..a81cc7d4da 100644 --- a/src/insets/insetenv.C +++ b/src/insets/insetenv.C @@ -35,6 +35,8 @@ InsetEnvironment::InsetEnvironment //LyXLayout_ptr const & layout = tc.getEnv(name); //header_ = layout->latexheader; //footer_ = layout->latexfooter; + header_ = "\\begin{" + name + "}"; + footer_ = "\\end{" + name + "}"; } @@ -51,7 +53,7 @@ Inset * InsetEnvironment::clone(Buffer const &, bool same_id) const void InsetEnvironment::write(Buffer const * buf, ostream & os) const { - os << "Environment " << getInsetName() << "\"\n"; + os << "Environment " << getInsetName() << "\n"; InsetCollapsable::write(buf, os); } diff --git a/src/insets/insetminipage.h b/src/insets/insetminipage.h index d4f544a4d5..18237157ec 100644 --- a/src/insets/insetminipage.h +++ b/src/insets/insetminipage.h @@ -10,8 +10,8 @@ * Full author contact details are available in file CREDITS */ -#ifndef InsetMinipage_H -#define InsetMinipage_H +#ifndef INSETMINIPAGE_H +#define INSETMINIPAGE_H #include "insetcollapsable.h"