commit fdea9eb790b02046088cbd838af70b3cd741a792
Author: Juergen Spitzmueller <[email protected]>
Date: Tue Apr 1 09:29:27 2025 +0200
Output something sensible for prettyref with multiple labels
---
src/insets/InsetRef.cpp | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp
index f363f57d25..02daa51053 100644
--- a/src/insets/InsetRef.cpp
+++ b/src/insets/InsetRef.cpp
@@ -321,6 +321,7 @@ void InsetRef::latex(otexstream & os, OutputParams const &
rp) const
if (rp.inulemcmd > 0)
os << "\\mbox{";
+ bool first = true;
if (buffer().masterParams().xref_package == "refstyle" && cmd ==
"eqref") {
// we advertise this as printing "(n)", so we'll do that, at
least
// for refstyle, since refstlye's own \eqref prints, by default,
@@ -335,7 +336,10 @@ void InsetRef::latex(otexstream & os, OutputParams const &
rp) const
docstring prefix;
docstring const fcmd =
getFormattedCmd(data, label, prefix,
buffer().masterParams().xref_package, use_caps, useRange());
- os << fcmd;
+ if (!first && buffer().masterParams().xref_package ==
"prettyref")
+ os << from_ascii("\\ref");
+ else
+ os << fcmd;
if ((use_cleveref || use_zref) && use_nolink)
os << "*";
if (buffer().masterParams().xref_package == "refstyle" &&
use_plural)
@@ -355,11 +359,12 @@ void InsetRef::latex(otexstream & os, OutputParams const
& rp) const
if (!opts.empty())
os << "[" << opts << "]";
}
- bool first = true;
os << "{";
for (auto const & l : label) {
if (!first) {
- if (useRange())
+ if (buffer().masterParams().xref_package ==
"prettyref")
+ os << "}, \\ref{";
+ else if (useRange())
os << "}{";
else
os << ",";
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs