[LyX/master] ru/Math: extend autoref fixes to polyglossia

Juergen Spitzmueller <[email protected]>
Newsgroups gmane.editors.lyx.cvs
Message-ID <[email protected]>
commit b7f18fa53ee0f7ce31004a3ffe18ec4027b865b1
Author: Juergen Spitzmueller <[email protected]>
Date:   Sun Mar 15 15:30:10 2026 +0100

    ru/Math: extend autoref fixes to polyglossia
---
 lib/doc/ru/Math.lyx | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/lib/doc/ru/Math.lyx b/lib/doc/ru/Math.lyx
index 207d53e481..059435e6b8 100644
--- a/lib/doc/ru/Math.lyx
+++ b/lib/doc/ru/Math.lyx
@@ -24,14 +24,15 @@
 
 % increase link area for cross-references and autoname them,
 \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
-\@ifpackageloaded{babel}{
- \addto\extrasrussian{%
-  \renewcommand*{\equationautorefname}[1]{}%
-  \renewcommand{\sectionautorefname}{разд.\negthinspace}%
-  \renewcommand{\subsectionautorefname}{разд.\negthinspace}%
-  \renewcommand{\subsubsectionautorefname}{разд.\negthinspace}%
+\AddToHook{begindocument/before}{
+ \HyLang@addto\extrasrussian{%
+  \def\equationautorefname{}%
+  \def\sectionautorefname{разд.\negthinspace}%
+  \def\subsectionautorefname{разд.\negthinspace}%
+  \def\subsubsectionautorefname{разд.\negthinspace}%
+  \def\tableautorefname{табл.\negthinspace}%
  }
-}{}
+}
 
 % don't load packages twice
 % see first footnote in sec. 9.3
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.