]> git.lyx.org Git - lyx.git/commitdiff
Adapt inset info to new version check
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 19 Dec 2022 16:42:49 +0000 (17:42 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 19 Dec 2022 16:42:49 +0000 (17:42 +0100)
lib/doc/LaTeXConfig.lyx
src/insets/InsetInfo.cpp

index 99621cb74ee6085856f71636ce9b8748fd629b53..83e651cce9f9d6fbe6614a40c51f3d7af1b32284 100644 (file)
@@ -1,5 +1,5 @@
 #LyX 2.4 created this file. For more info see https://www.lyx.org/
-\lyxformat 612
+\lyxformat 613
 \begin_document
 \begin_header
 \save_transient_properties true
@@ -5845,7 +5845,7 @@ babel
  
 \begin_inset Info
 type  "package"
-arg   "babel-2017/11/03"
+arg   "babel 20171103"
 \end_inset
 
 ),
index ed2566eadb0c6785e7552d1782c0b036c0976c52..46d656c817c9ad9d78a221f321867717e368c566 100644 (file)
@@ -986,7 +986,19 @@ void InsetInfo::build()
                if (initialized_)
                        break;
                // check in packages.lst
-               if (LaTeXFeatures::isAvailable(params_.name)) {
+               bool available;
+               // we also allow version check with version separated by blank
+               if (contains(params_.name, ' ')) {
+                       string name;
+                       string const version = split(params_.name, name, ' ');
+                       int const y = convert<int>(version.substr(0,4));
+                       int const m = convert<int>(version.substr(4,2));
+                       int const d = convert<int>(version.substr(6,2));
+                       available = LaTeXFeatures::isAvailableAtLeastFrom(name, y, m, d);
+               } else
+                       available = LaTeXFeatures::isAvailable(params_.name);
+
+               if (available) {
                        gui = _("yes");
                        info(from_ascii("yes"), params_.lang);
                } else {