]> git.lyx.org Git - features.git/commitdiff
tex2lyx: support for btUnit (multibib)
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 21 Aug 2018 15:18:04 +0000 (17:18 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 12:39:47 +0000 (14:39 +0200)
src/tex2lyx/Preamble.h
src/tex2lyx/TODO.txt
src/tex2lyx/text.cpp

index ebc60c7d6dd3a0ea80315c71925047ce66a8f07a..725bf6740eee030c8bce30416c9b720b50101152 100644 (file)
@@ -82,6 +82,8 @@ public:
        ///
        void citeEngine(std::string const & e) { h_cite_engine = e; }
        ///
+       void multibib(std::string const & s) { h_multibib = s; }
+       ///
        bool titleLayoutFound() const { return title_layout_found; }
        ///
        void titleLayoutFound(bool found) { title_layout_found = found; }
index dfda94001cd8af5086cd326017cd4ab866791cca..b348b29e8e6f6b21dfc6c201aa7c255cf51aef85 100644 (file)
@@ -36,16 +36,12 @@ Format LaTeX feature                        LyX feature
 443    unicode-math.sty                     InsetMath*
 453    automatic stmaryrd loading           \use_package stmaryrd
 457    automatic stackrel loading           \use_package stackrel
-526   Plural and capitalized refstyles      InsetRef
-533   Multibib support
-      \begin{btUnit}...\end{btUnit}        \multibib {none|part|chapter|section|subsection}
-        (if a part, chapter, section etc.
-         follows the \begin...)
-546   Landscape support
-      \begin{landscape}...\end{landscape}  \begin_inset Flex Landscape
-      with longtable content:              <features rotate ="90"...>
-555   V column type (varwidth package)     Automatically detected with newlines, paragraph breaks and environment content in cells of rows
-563   InsetArgument listpreamble:<nr>      All content between \begin{env} and first \item of a list 
+526    Plural and capitalized refstyles     InsetRef
+546    Landscape support
+       \begin{landscape}...\end{landscape}  \begin_inset Flex Landscape (see #11259)
+       with longtable content:              <features rotate ="90"...>
+555    V column type (varwidth package)     Automatically detected with newlines, paragraph breaks and environment content in cells of rows
+563    InsetArgument listpreamble:<nr>      All content between \begin{env} and first \item of a list 
 
 
 
index d242731b79b189657fb5e9d077f7c7352a2a0579..1fbc87eaeded4db33125586fc39c29fa0ee49405 100644 (file)
@@ -1923,6 +1923,24 @@ void parse_environment(Parser & p, ostream & os, bool outer,
                p.skip_spaces();
        }
 
+       else if (name == "btUnit") {
+               string const nt = p.next_next_token().cs();
+               active_environments.push_back("btUnit");
+               if (nt == "part")
+                       preamble.multibib("part");
+               else if (nt == "chapter")
+                       preamble.multibib("chapter");
+               else if (nt == "section")
+                       preamble.multibib("section");
+               else if (nt == "subsection")
+                       preamble.multibib("subsection");
+               else {
+                       parse_unknown_environment(p, name, os, FLAG_END, outer,
+                                                 parent_context);
+                       active_environments.pop_back();
+               }
+       }
+
        else if (name == "framed" || name == "shaded") {
                eat_whitespace(p, os, parent_context, false);
                parse_outer_box(p, os, FLAG_END, outer, parent_context, name, "");