[LyX/2.3.x] Only load subscript package with LaTeX < 2005/12/01 (#12387)

Richard Kimberly Heck rikiheck at lyx.org
Wed Nov 23 01:28:17 UTC 2022


commit e9a5dd741e9bc348443c9144a996333038a674b4
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Thu Oct 13 16:05:03 2022 +0200

    Only load subscript package with LaTeX < 2005/12/01 (#12387)
    
    (cherry picked from commit d4d4654d6325e92aff96523b64e1d403655a71cc)
---
 lib/chkconfig.ltx     |    2 ++
 src/LaTeXFeatures.cpp |    3 ++-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx
index 305045f..84d31d0 100644
--- a/lib/chkconfig.ltx
+++ b/lib/chkconfig.ltx
@@ -219,6 +219,8 @@
 \AddVariable{fmtversion}{\fmtversion}
 
 %%% Crucial versions
+% This one introduces \textsubscript
+\TestLaTeXVersion{2005/12/01}
 % This one introduces path encoding changes
 \TestLaTeXVersion{2019/10/01}
 
diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index fd820eb..fa095c0 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -1372,7 +1372,8 @@ string const LaTeXFeatures::getPackages() const
 	}
 
 	// fixltx2e provides subscript
-	if (mustProvide("subscript") && !isRequired("fixltx2e"))
+	if (mustProvide("subscript") && !isRequired("fixltx2e")
+	    && !isAvailable("LaTeX-2005/12/01"))
 		packages << "\\usepackage{subscript}\n";
 
 	// footmisc must be loaded after setspace


More information about the lyx-cvs mailing list