]> 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)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 13 Oct 2018 07:49:10 +0000 (09:49 +0200)
This solves a loading order conflict with beamer-article.

(cherry picked from commit 00ee54e6949505cbda7f6a287d2f69f1a6b37a86)

lib/layouts/linguistics.module
src/BufferParams.cpp
src/LaTeXFeatures.cpp
status.23x

index 9e52b95b9c3b6be9f884a775715d50b190adce72..bf6e042c912a7ba57a0a615b03a287b3e6d4fe12 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
@@ -78,9 +80,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
 
@@ -95,16 +99,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 da35db18473666fd2e2e3a6944cec4cc7e17b0b8..a2ff315ed0ae58c1c328e91c4396c74eb5a167db 100644 (file)
@@ -2308,6 +2308,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 f325d9447b6d3b07844b650b756c9af525583b56..7256002d3068831e8e05509a555757801ebeb7dc 100644 (file)
@@ -964,7 +964,6 @@ char const * simplefeatures[] = {
        // "cancel",
        "ascii",
        "url",
-       "covington",
        "csquotes",
        "enumitem",
        "endnotes",
index a10b9834e1de8f44af94f4ad5bca27b1da41058a..dcee94718cdcaf73ea8bb22d9477e59d75e45a0f 100644 (file)
@@ -136,6 +136,8 @@ What's new
 - Add "hyperref-driver=dvips" option to the extra flags of the
   latex->dvi converter (bug 11332).
 
+- Fix loading order conflict with beamer-article and covington.
+
 
 
 * USER INTERFACE