Am Dienstag, den 21.08.2018, 17:23 +0200 schrieb Juergen Spitzmueller: > commit 0ae68ae828cd8d3589c7aa4bd2ef958aa38182b4 > Author: Juergen Spitzmueller <[email protected]> > Date: Tue Aug 21 17:18:04 2018 +0200 > > tex2lyx: support for btUnit (multibib) > --- > src/tex2lyx/Preamble.h | 2 ++ > src/tex2lyx/TODO.txt | 16 ++++++---------- > src/tex2lyx/text.cpp | 18 ++++++++++++++++++ > 3 files changed, 26 insertions(+), 10 deletions(-)
OK for 2.3.2 (with 5c97424a72d9d and 68d48b0015065f3)?
Jürgen
>
> diff --git a/src/tex2lyx/Preamble.h b/src/tex2lyx/Preamble.h
> index ebc60c7..725bf67 100644
> --- a/src/tex2lyx/Preamble.h
> +++ b/src/tex2lyx/Preamble.h
> @@ -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;
> }
> diff --git a/src/tex2lyx/TODO.txt b/src/tex2lyx/TODO.txt
> index dfda940..b348b29 100644
> --- a/src/tex2lyx/TODO.txt
> +++ b/src/tex2lyx/TODO.txt
> @@ -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
>
>
>
> diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
> index d242731..1fbc87e 100644
> --- a/src/tex2lyx/text.cpp
> +++ b/src/tex2lyx/text.cpp
> @@ -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, "");
signature.asc
Description: This is a digitally signed message part
