[LyX/master] Do not defined \cyr... macros for TeX font LuaTeX

Juergen Spitzmueller <[email protected]>
Newsgroups gmane.editors.lyx.cvs
Message-ID <[email protected]>
commit 340a7f3ebd8735634844a0a9243409b8707691e2
Author: Juergen Spitzmueller <[email protected]>
Date:   Mon Mar 16 08:27:50 2026 +0100

    Do not defined \cyr... macros for TeX font LuaTeX
---
 lib/doc/UserGuide.lyx                             | 3 +--
 lib/doc/de/UserGuide.lyx                          | 3 +--
 lib/doc/es/UserGuide.lyx                          | 3 +--
 lib/doc/fr/UserGuide.lyx                          | 3 +--
 lib/doc/ru/Additional.lyx                         | 3 +--
 lib/doc/ru/EmbeddedObjects.lyx                    | 3 +--
 lib/doc/ru/Math.lyx                               | 7 ++++---
 lib/doc/ru/Shortcuts.lyx                          | 3 +--
 lib/doc/ru/UserGuide.lyx                          | 5 ++++-
 lib/examples/ru/Graphics_and_Insets/XY-Figure.lyx | 3 +--
 lib/examples/ru/Graphics_and_Insets/XY-Pic.lyx    | 3 +--
 lib/examples/ru/Modules/Fancy_Colored_Boxes.lyx   | 3 +--
 12 files changed, 18 insertions(+), 24 deletions(-)

diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx
index f3c0edaab1..6ed4fff6e1 100644
--- a/lib/doc/UserGuide.lyx
+++ b/lib/doc/UserGuide.lyx
@@ -47,8 +47,7 @@
 %\let\OrgIndex\index 
 %\renewcommand*{\index}[1]{\OrgIndex{#1}}
 
-\usepackage{iftex}
-\iftutex
+\ifdefined\DeclareUnicodeCharacter\else
   % latinmodern (used with non-TeX fonts) does not feature Japanese
   % quotations marks, so we fake them.
   \usepackage{stmaryrd}
diff --git a/lib/doc/de/UserGuide.lyx b/lib/doc/de/UserGuide.lyx
index 4b424b4e14..9ff98f0425 100644
--- a/lib/doc/de/UserGuide.lyx
+++ b/lib/doc/de/UserGuide.lyx
@@ -51,8 +51,7 @@
 %\let\OrgIndex\index 
 %\renewcommand*{\index}[1]{\OrgIndex{#1}}
 
-\usepackage{iftex}
-\iftutex
+\ifdefined\DeclareUnicodeCharacter\else
   % latinmodern (mit Nicht-TeX-Schriften) unterstützt keine
   % Japanischen Anführungszeichen, also bauen wir sie nach.
   \usepackage{stmaryrd}
diff --git a/lib/doc/es/UserGuide.lyx b/lib/doc/es/UserGuide.lyx
index 4713cf2220..cd9b78defe 100644
--- a/lib/doc/es/UserGuide.lyx
+++ b/lib/doc/es/UserGuide.lyx
@@ -47,8 +47,7 @@
 %\let\OrgIndex\index 
 %\renewcommand*{\index}[1]{\OrgIndex{#1}}
 
-\usepackage{iftex}
-\iftutex
+\ifdefined\DeclareUnicodeCharacter\else
   % latinmodern (used with non-TeX fonts) does not feature Japanese
   % quotations marks, so we fake them.
   \usepackage{stmaryrd}
diff --git a/lib/doc/fr/UserGuide.lyx b/lib/doc/fr/UserGuide.lyx
index 80243a9382..563a990b20 100644
--- a/lib/doc/fr/UserGuide.lyx
+++ b/lib/doc/fr/UserGuide.lyx
@@ -61,8 +61,7 @@
 
 \AtBeginDocument{\addto\captionsfrench{\def\nomname{Glossaire}}}
 
-\usepackage{iftex}
-\iftutex
+\ifdefined\DeclareUnicodeCharacter\else
   % latinmodern (used with non-TeX fonts) does not feature Japanese
   % quotations marks, so we fake them.
   \usepackage{stmaryrd}
diff --git a/lib/doc/ru/Additional.lyx b/lib/doc/ru/Additional.lyx
index 77c296ffa5..cb03ee9277 100644
--- a/lib/doc/ru/Additional.lyx
+++ b/lib/doc/ru/Additional.lyx
@@ -40,8 +40,7 @@
 \addtokomafont{disposition}{\rmfamily}
 \addtokomafont{descriptionlabel}{\rmfamily}
 
-\usepackage{iftex}
-\iftutex
+\ifdefined\DeclareUnicodeCharacter\else
   % convert \cyr... and \CYR... to Unicode
   % these are used by varioref
   % (https://github.com/latex3/latex2e/issues/2020)
diff --git a/lib/doc/ru/EmbeddedObjects.lyx b/lib/doc/ru/EmbeddedObjects.lyx
index 788a83248e..e9099eab45 100644
--- a/lib/doc/ru/EmbeddedObjects.lyx
+++ b/lib/doc/ru/EmbeddedObjects.lyx
@@ -164,8 +164,7 @@
 \addtokomafont{disposition}{\rmfamily}
 \addtokomafont{descriptionlabel}{\rmfamily}
 
-\usepackage{iftex}
-\iftutex
+\ifdefined\DeclareUnicodeCharacter\else
   % convert \cyr... and \CYR... to Unicode
   % these are used by varioref
   % (https://github.com/latex3/latex2e/issues/2020)
diff --git a/lib/doc/ru/Math.lyx b/lib/doc/ru/Math.lyx
index 56c1492e53..2523376747 100644
--- a/lib/doc/ru/Math.lyx
+++ b/lib/doc/ru/Math.lyx
@@ -137,8 +137,7 @@
 \addtokomafont{disposition}{\rmfamily}
 \addtokomafont{descriptionlabel}{\rmfamily}
 
-\usepackage{iftex}
-\iftutex
+\ifdefined\DeclareUnicodeCharacter\else
   % convert \cyr... and \CYR... to Unicode
   % these are used by varioref
   % (https://github.com/latex3/latex2e/issues/2020)
@@ -156,11 +155,13 @@
   \file_input:n { t2aenc.dfu }
   \group_end:
   \ExplSyntaxOff
+\fi
+\@ifpackageloaded{fontspec}{
   % latinmodern (used with non-TeX fonts) does not have a combining cedilla
   % fake it (https://tex.stackexchange.com/a/164270/19291)
   \def\c#1{{\setbox0=\hbox{#1}\ifdim\ht0=1ex \accent184 #1%
     \else\ooalign{\unhbox0\crcr\hidewidth\char184\hidewidth}\fi}}
-\fi
+}{}
 \end_preamble
 \options bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
 \use_default_options false
diff --git a/lib/doc/ru/Shortcuts.lyx b/lib/doc/ru/Shortcuts.lyx
index da125bd715..5cbb0c44a8 100644
--- a/lib/doc/ru/Shortcuts.lyx
+++ b/lib/doc/ru/Shortcuts.lyx
@@ -9,8 +9,7 @@
 % Use serif font
 \addtokomafont{disposition}{\rmfamily}
 
-\usepackage{iftex}
-\iftutex
+\ifdefined\DeclareUnicodeCharacter\else
   % convert \cyr... and \CYR... to Unicode
   % these are used by varioref
   % (https://github.com/latex3/latex2e/issues/2020)
diff --git a/lib/doc/ru/UserGuide.lyx b/lib/doc/ru/UserGuide.lyx
index 24611e816a..da53b30b6c 100644
--- a/lib/doc/ru/UserGuide.lyx
+++ b/lib/doc/ru/UserGuide.lyx
@@ -55,7 +55,7 @@
 \addtokomafont{descriptionlabel}{\rmfamily}
 
 \usepackage{iftex}
-\iftutex
+\@ifpackageloaded{fontspec}{
   % latinmodern (used with non-TeX fonts) does not feature Japanese
   % quotations marks, so we fake them.
   \usepackage{stmaryrd}
@@ -72,6 +72,9 @@
   \DeclareUnicodeCharacter{300B}{\ensuremath{\rangle\kern-2.5pt\rangle}}
   \DeclareUnicodeCharacter{3008}{\ensuremath{\langle}}
   \DeclareUnicodeCharacter{3009}{\ensuremath{\rangle}}
+}{
+}
+\ifdefined\DeclareUnicodeCharacter\else
   % convert \cyr... and \CYR... to Unicode
   % these are used by varioref
   % (https://github.com/latex3/latex2e/issues/2020)
diff --git a/lib/examples/ru/Graphics_and_Insets/XY-Figure.lyx b/lib/examples/ru/Graphics_and_Insets/XY-Figure.lyx
index 8c73cee9be..441d751526 100644
--- a/lib/examples/ru/Graphics_and_Insets/XY-Figure.lyx
+++ b/lib/examples/ru/Graphics_and_Insets/XY-Figure.lyx
@@ -6,8 +6,7 @@
 \origin /systemlyxdir/examples/ru/Graphics_and_Insets/
 \textclass article
 \begin_preamble
-\usepackage{iftex}
-\iftutex
+\ifdefined\DeclareUnicodeCharacter\else
   % convert \cyr... and \CYR... to Unicode
   % these are used by varioref
   % (https://github.com/latex3/latex2e/issues/2020)
diff --git a/lib/examples/ru/Graphics_and_Insets/XY-Pic.lyx b/lib/examples/ru/Graphics_and_Insets/XY-Pic.lyx
index 7fb4133598..812d9be8e4 100644
--- a/lib/examples/ru/Graphics_and_Insets/XY-Pic.lyx
+++ b/lib/examples/ru/Graphics_and_Insets/XY-Pic.lyx
@@ -40,8 +40,7 @@
 \addtokomafont{disposition}{\rmfamily}
 \addtokomafont{descriptionlabel}{\rmfamily}
 
-\usepackage{iftex}
-\iftutex
+\ifdefined\DeclareUnicodeCharacter\else
   % convert \cyr... and \CYR... to Unicode
   % these are used by varioref
   % (https://github.com/latex3/latex2e/issues/2020)
diff --git a/lib/examples/ru/Modules/Fancy_Colored_Boxes.lyx b/lib/examples/ru/Modules/Fancy_Colored_Boxes.lyx
index cff46c5203..b6cee9c68f 100644
--- a/lib/examples/ru/Modules/Fancy_Colored_Boxes.lyx
+++ b/lib/examples/ru/Modules/Fancy_Colored_Boxes.lyx
@@ -22,8 +22,7 @@
 \addtokomafont{disposition}{\rmfamily}
 \addtokomafont{descriptionlabel}{\rmfamily}
 
-\usepackage{iftex}
-\iftutex
+\ifdefined\DeclareUnicodeCharacter\else
   % convert \cyr... and \CYR... to Unicode
   % these are used by varioref
   % (https://github.com/latex3/latex2e/issues/2020)
-- 
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.