]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/Context.h
Format and reversion code for new counter inset.
[lyx.git] / src / tex2lyx / Context.h
index 4e0c75695c677cebe28ee8d82992e7c055eb04c8..2d5315b5dff7dc4a1af0540bfa101e8a0dca8211 100644 (file)
@@ -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;
 };
 
 
@@ -80,7 +82,7 @@ public:
                TeX2LyXDocClass const & textclass_,
                Layout const * layout_ = 0,
                Layout const * parent_layout_= 0,
-               TeXFont font_ = TeXFont());
+               TeXFont const & font_ = normalfont);
        ~Context();
 
        /// Output a \\begin_layout if requested
@@ -111,13 +113,27 @@ 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;
+       /// We may need to add something at the beginning of a list.
+       std::string list_extra_stuff;
+       /// Stuff between list begin and first item
+       std::string list_preamble;
+       /// A LaTeXParam to be ignored in parsing.
+       std::string latexparam;
        /// If there has been an \\begin_deeper, we'll need a matching
        /// \\end_deeper
        bool need_end_deeper;
@@ -125,6 +141,10 @@ public:
        /// for each paragraph, otherwise this has to be a deeper
        /// paragraph.
        bool has_item;
+       /// If we are in an itemize-like environment, this marks
+       /// the text before the first \item. Typically, list
+       /// parameters (such as lengths) are adjusted here.
+       bool in_list_preamble;
        /// we are handling a standard paragraph in an itemize-like
        /// environment
        bool deeper_paragraph;
@@ -136,6 +156,8 @@ public:
         * would not work.
         */
        bool new_layout_allowed;
+       /// May -- be converted to endash and --- to emdash?
+       bool merging_hyphens_allowed;
        /// Did we output anything yet in any context?
        static bool empty;
 
@@ -149,6 +171,11 @@ public:
        TeXFont font;
        /// font attributes of normal text
        static TeXFont normalfont;
+       /// Table rotation angle
+       int tablerotation;
+
+private:
+       void begin_layout(std::ostream & os, Layout const * const & l);
 };