commit 698a83609eafb7037dcd349effbe6c70e2281378
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Wed Aug 27 11:56:02 2025 +0200

    Amend 441d67a2880
---
 src/LaTeXFeatures.cpp | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index 4b2e776d71..8f51ad9815 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -2358,8 +2358,8 @@ docstring const LaTeXFeatures::getThmI18nDefs(Layout 
const & lay) const
 
 docstring const LaTeXFeatures::getXRefI18nDefs(Layout const & lay) const
 {
+       odocstringstream ods;
        if (params_.xref_package == "prettyref-l7n" && isRequired("prettyref")) 
{
-               odocstringstream ods;
                if (lay.refprefix == "part")
                        ods << "\\newrefformat{" << lay.refprefix << 
"}{_(Part)~\\ref{#1}}\n";
                else if (lay.refprefix == "cha")
@@ -2374,28 +2374,26 @@ docstring const LaTeXFeatures::getXRefI18nDefs(Layout 
const & lay) const
                        ods << 
"\\newrefformat{enu}{_(Item[[enumerate]])~\\ref{#1}}\n";
                if (!ods.str().empty())
                        return ods.str();
-       } else if (params_.xref_package == "refstyle" && 
isRequired("refstyle:algref")) {
+       }
+       if (params_.xref_package == "refstyle" && 
isRequired("refstyle:algref")) {
                docstring const tn = from_ascii("Algorithm");
                docstring const tnp = from_ascii("Algorithms");
-               odocstringstream ods;
                docstring const prfxname = from_ascii("alg");
                ods << "\\def\\RS" << prfxname << "txt{_(" << lowercase(tn) << 
")~}\n"
                    << "\\def\\RS" << prfxname << "stxt{_(" << lowercase(tnp) 
<< ")~}\n"
                    << "\\def\\RS" << capitalize(prfxname) << "txt{_(" << tn << 
")~}\n"
                    << "\\def\\RS" << capitalize(prfxname) << "stxt{_(" << tnp 
<< ")~}\n";
-               return ods.str();
-       } else if (params_.xref_package == "refstyle" && 
isRequired("refstyle:enuref")) {
+       }
+       if (params_.xref_package == "refstyle" && 
isRequired("refstyle:enuref")) {
                docstring const tn = from_ascii("Item[[enumerate]]");
                docstring const tnp = from_ascii("Items[[enumerate]]");
-               odocstringstream ods;
                docstring const prfxname = from_ascii("enu");
                ods << "\\def\\RS" << prfxname << "txt{_(" << lowercase(tn) << 
")~}\n"
                    << "\\def\\RS" << prfxname << "stxt{_(" << lowercase(tnp) 
<< ")~}\n"
                    << "\\def\\RS" << capitalize(prfxname) << "txt{_(" << tn << 
")~}\n"
                    << "\\def\\RS" << capitalize(prfxname) << "stxt{_(" << tnp 
<< ")~}\n";
-               return ods.str();
        }
-       return docstring();
+       return ods.str();
 }
 
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to