commit ab343337b8b82b8e9d68031a5fbfa81da757a2a1
Author: Juergen Spitzmueller <[email protected]>
Date: Sat Feb 22 08:37:25 2025 +0100
GuiBibitem: hide year in numeric natbib mode
(cherry picked from commit 04a9748e7ecd9518298594c98dd8200aae9cc0f3)
---
src/frontends/qt/GuiBibitem.cpp | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/frontends/qt/GuiBibitem.cpp b/src/frontends/qt/GuiBibitem.cpp
index ccbbf95b20..a832375cb6 100644
--- a/src/frontends/qt/GuiBibitem.cpp
+++ b/src/frontends/qt/GuiBibitem.cpp
@@ -53,14 +53,19 @@ void GuiBibitem::paramsToDialog(Inset const * inset)
literalCB->setChecked(params["literal"] == "true");
QString const label = toqstr(params["label"]);
if (inset->buffer().masterParams().citeEngine() == "natbib") {
- yearED->setHidden(false);
- yearLA->setHidden(false);
+ bool const numeric =
inset->buffer().masterParams().citeEngineType() == ENGINE_TYPE_NUMERICAL;
+ yearED->setHidden(numeric);
+ yearLA->setHidden(numeric);
allAuthorsED->setHidden(false);
allAuthorsLA->setHidden(false);
labelLA->setText(qt_("Author &Names:"));
labelLA->setMaximumWidth(labelLA->sizeHint().width());
- labelED->setToolTip(qt_("Insert the author name(s) for the
author-year reference here. "
- "If you use an abbreviated list (with
`et al.'), the full list can go below."));
+ if (numeric)
+ labelED->setToolTip(qt_("Insert the author name(s) for
the author-number reference here. "
+ "If you use an abbreviated list
(with `et al.'), the full list can go below."));
+ else
+ labelED->setToolTip(qt_("Insert the author name(s) for
the author-year reference here. "
+ "If you use an abbreviated list
(with `et al.'), the full list can go below."));
allAuthorsLA->setText(qt_("A&ll Author Names:"));
allAuthorsLA->setMaximumWidth(allAuthorsLA->sizeHint().width());
literalCB->setToolTip(qt_("Pass content of the `Author', `Year'
and `All Authors' fields literally to LaTeX. "
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs