commit 00ee54e6949505cbda7f6a287d2f69f1a6b37a86
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Tue Oct 9 10:42:38 2018 +0200

    Load covington later
    
    This solves a loading order conflict with beamer-article.
---
 lib/layouts/linguistics.module |   38 ++++++++++++++++++++++----------------
 src/BufferParams.cpp           |    4 ++++
 src/LaTeXFeatures.cpp          |    1 -
 3 files changed, 26 insertions(+), 17 deletions(-)

diff --git a/lib/layouts/linguistics.module b/lib/layouts/linguistics.module
index c26f7da..10a7fe7 100644
--- a/lib/layouts/linguistics.module
+++ b/lib/layouts/linguistics.module
@@ -55,9 +55,11 @@ Style Numbered_Example_(multiline)
        Preamble
        % Backwards compatibility with covington < 1.1
        % This code can be removed eventually
-       \@ifundefined{covexample}{%
-           \newenvironment{covexample}{\begin{example}}{\end{example}}%
-       }{}
+       \AtBeginDocument{%
+               \@ifundefined{covexample}{%
+                   \newenvironment{covexample}{\begin{example}}{\end{example}}%
+               }{}
+       }
        EndPreamble
        Category              Linguistics
 End
@@ -88,9 +90,11 @@ Style Numbered_Examples_(consecutive)
        Preamble
        % Backwards compatibility with covington < 1.1
        % This code can be removed eventually
-       \@ifundefined{covexamples}{%
-           \newenvironment{covexamples}{\begin{examples}}{\end{examples}}%
-       }{}
+       \AtBeginDocument{%
+               \@ifundefined{covexamples}{%
+                   
\newenvironment{covexamples}{\begin{examples}}{\end{examples}}%
+               }{}
+       }
        EndPreamble
 End
 
@@ -105,16 +109,18 @@ Style Subexample
        Preamble
                % Backwards compatibility with covington < 1.6
                % This code can be removed eventually
-               \@ifundefined{covsubexamples}{%
-                       \newenvironment{covsubexamples}{%
-                               \addtolength{\examplenumbersep}{-0.5em}%
-                               \begin{covexample}%
-                               \begin{enumerate}
-                               \renewcommand\theenumi{\alph{enumi}}
-                               \renewcommand\labelenumi{(\theenumi)}
-                               \renewcommand\p@enumi{\theequation\,}}%
-                       {\end{enumerate}\end{covexample}}
-               }{}
+               \AtBeginDocument{%
+                       \@ifundefined{covsubexamples}{%
+                               \newenvironment{covsubexamples}{%
+                                       \addtolength{\examplenumbersep}{-0.5em}%
+                                       \begin{covexample}%
+                                       \begin{enumerate}
+                                       \renewcommand\theenumi{\alph{enumi}}
+                                       \renewcommand\labelenumi{(\theenumi)}
+                                       \renewcommand\p@enumi{\theequation\,}}%
+                               {\end{enumerate}\end{covexample}}
+                       }{}
+               }
        EndPreamble
 End
 
diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index 31c1241..9f8e9bc 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -2303,6 +2303,10 @@ bool BufferParams::writeLaTeX(otexstream & os, 
LaTeXFeatures & features,
                os << "\\usepackage{xunicode}\n";
        }
 
+       // covington must be loaded after beamerarticle
+       if (features.isRequired("covington"))
+           os << "\\usepackage{covington}\n";
+
        // Polyglossia must be loaded last ...
        if (use_polyglossia) {
                // call the package
diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index eb31dba..b4e7453 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -971,7 +971,6 @@ char const * simplefeatures[] = {
        // "cancel",
        "ascii",
        "url",
-       "covington",
        "csquotes",
        "enumitem",
        "endnotes",

Reply via email to