commit 557adebcc1e2726b2ce6788ae577d6d5569bc36a
Author: Juergen Spitzmueller <[email protected]>
Date:   Mon Jun 29 09:00:28 2020 +0200

    Honor "provides parskip 1"
---
 src/BufferParams.cpp |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index 776c5c9..1b13074 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -2006,27 +2006,33 @@ bool BufferParams::writeLaTeX(otexstream & os, 
LaTeXFeatures & features,
                string psopt;
                switch (getDefSkip().kind()) {
                case VSpace::SMALLSKIP:
-                       psopt = "[skip=\\smallskipamount]";
+                       psopt = "\\smallskipamount";
                        break;
                case VSpace::MEDSKIP:
-                       psopt = "[skip=\\medskipamount]";
+                       psopt = "\\medskipamount";
                        break;
                case VSpace::BIGSKIP:
-                       psopt = "[skip=\\bigskipamount]";
+                       psopt = "\\bigskipamount";
                        break;
                case VSpace::HALFLINE:
+                       // default (no option)
                        break;
                case VSpace::FULLLINE:
-                       psopt = "[skip=\\baselineskip]";
+                       psopt = "\\baselineskip";
                        break;
                case VSpace::LENGTH:
-                       psopt = "[skip={" + 
getDefSkip().length().asLatexString() + "}]";
+                       psopt = getDefSkip().length().asLatexString();
                        break;
                default:
                        break;
                }
-               if (features.isAvailable("parskip"))
+               if (!features.isProvided("parskip")) {
+                       if (!psopt.empty())
+                               psopt = "[skip=" + psopt + "]";
                        os << "\\usepackage" + psopt + "{parskip}\n";
+               } else {
+                       os << "\\setlength{\\parskip}{" + psopt + "}\n";
+               }
        } else {
                // when separation by indentation
                // only output something when a width is given
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to