commit b5aaa6fab0043ed0514bfa48ad25ed4a1579e04f
Author: Richard Kimberly Heck <[email protected]>
Date:   Thu Oct 2 13:34:25 2025 -0400

    Do not try to write refstyle prefix if we do not know the prefix.
    
    Otherwise, compilation fails.
---
 src/LaTeXFeatures.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index 26a1dc0f96..2d498f2b55 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -2079,6 +2079,10 @@ string const LaTeXFeatures::getThmExtraDefinitions() 
const
                }
                // and refstyle
                else if (!thm.counter.empty() && params_.xref_package == 
"refstyle" && isRequired("refstyle")) {
+                       if (thm.refprefix.empty()) {
+                               LYXERR0("Unable to write refstyle definition 
for `" << thm.name << "'.");
+                               continue;
+                       }
                        tmp << "\\newref{" << thm.refprefix << "}{\n"
                            << "        name      = \\RS" << thm.name << 
"txt,\n"
                            << "        names     = \\RS" << thm.name << 
"stxt,\n"
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to