]> git.lyx.org Git - features.git/commitdiff
Load covington later
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 9 Oct 2018 08:42:38 +0000 (10:42 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 12:39:50 +0000 (14:39 +0200)
This solves a loading order conflict with beamer-article.

lib/layouts/linguistics.module
src/BufferParams.cpp
src/LaTeXFeatures.cpp

index c26f7da51b6ff1285d0cf340115552eeed8a6040..10a7fe73a894c37f7bde19c5080ecf6cbb1d3f54 100644 (file)
@@ -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
 
index 31c124132782ee184069db6d976ac731b783491d..9f8e9bc1abd09904f437fc55cfe04bb481ec4546 100644 (file)
@@ -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
index eb31dbab66fcabf739b2f28c1b307ff5f6223415..b4e7453b3bcfe0dc127aa0142be5060a1da1378c 100644 (file)
@@ -971,7 +971,6 @@ char const * simplefeatures[] = {
        // "cancel",
        "ascii",
        "url",
-       "covington",
        "csquotes",
        "enumitem",
        "endnotes",