From 00ee54e6949505cbda7f6a287d2f69f1a6b37a86 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Tue, 9 Oct 2018 10:42:38 +0200 Subject: [PATCH] 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 c26f7da51b..10a7fe73a8 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 31c1241327..9f8e9bc1ab 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 eb31dbab66..b4e7453b3b 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -971,7 +971,6 @@ char const * simplefeatures[] = { // "cancel", "ascii", "url", - "covington", "csquotes", "enumitem", "endnotes",