X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftex2lyx%2FContext.h;h=0ed5f59b2fa315be5be2ab52ec7413f5de46c044;hb=8e72135a3f6a2a3dc043c9a4212e418dfaf12e0d;hp=9fb8ce103fa9a7431e7df8bab533c16e544cae5c;hpb=2b3bd7b5f4a8815427d05c6cc6aaf25b6b8ffba5;p=lyx.git diff --git a/src/tex2lyx/Context.h b/src/tex2lyx/Context.h index 9fb8ce103f..0ed5f59b2f 100644 --- a/src/tex2lyx/Context.h +++ b/src/tex2lyx/Context.h @@ -40,11 +40,13 @@ public: family = "default"; series = "default"; shape = "default"; + language = "english"; } std::string size; std::string family; std::string series; std::string shape; + std::string language; }; @@ -78,8 +80,8 @@ class Context { public: Context(bool need_layout_, TeX2LyXDocClass const & textclass_, - LayoutPtr layout_ = LayoutPtr(), - LayoutPtr parent_layout_= LayoutPtr(), + Layout const * layout_ = 0, + Layout const * parent_layout_= 0, TeXFont font_ = TeXFont()); ~Context(); @@ -111,13 +113,21 @@ public: /// Add extra stuff if not already there void add_extra_stuff(std::string const &); + /*! + * Add paragraph-level extra stuff if not already there. This + * will be reset at the next check_layout() + */ + void add_par_extra_stuff(std::string const &); + /// Do we need to output some \\begin_layout command before the /// next characters? bool need_layout; /// Do we need to output some \\end_layout command bool need_end_layout; - /// We may need to add something after this \\begin_layout command + /// We may need to add something after each \\begin_layout command std::string extra_stuff; + /// We may need to add something after this \\begin_layout command + std::string par_extra_stuff; /// If there has been an \\begin_deeper, we'll need a matching /// \\end_deeper bool need_end_deeper; @@ -142,13 +152,16 @@ public: /// The textclass of the document. Could actually be a global variable TeX2LyXDocClass const & textclass; /// The layout of the current paragraph - LayoutPtr layout; + Layout const * layout; /// The layout of the outer paragraph (for environment layouts) - LayoutPtr parent_layout; + Layout const * parent_layout; /// font attributes of this context TeXFont font; /// font attributes of normal text static TeXFont normalfont; + +private: + void begin_layout(std::ostream & os, Layout const * const & l); };