commit 08b22fab62c8305ed099d0f07a61770032d21cd0
Author: Juergen Spitzmueller <[email protected]>
Date: Mon Jan 5 11:59:16 2026 +0100
Fix thai with LuaTeX and TeX fonts
This is arguably a corner case, but still ...
Candiodate for 2.5.x.
---
lib/languages | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/lib/languages b/lib/languages
index 266b3d55a1..91cc0b5406 100644
--- a/lib/languages
+++ b/lib/languages
@@ -2303,12 +2303,12 @@ Language thai
\catcode\@tempcnta=13
\advance\@tempcnta\@ne
}%
- % Restore \coyright definition corrupted by lthenc.def
+ % Restore \copyright definition corrupted by lthenc.def
\DeclareRobustCommand{\copyright}{%
\ifmmode{\nfss@text{\textcopyright}}\else\textcopyright\fi}
\DeclareTextSymbol{\textcopyright}{LTH}{8}
%
- % set up Thai fonts as substitue for the default families
+ % set up Thai fonts as substitute for the default families
% The 'substitutefont' package is obsolete now, since commands
% from the LaTeX kernel can be used instead. See here:
% https://ctan.org/pkg/substitutefont
@@ -2324,6 +2324,18 @@ Language thai
\substitutefont{LTH}{\sfdefault}{garuda}
\substitutefont{LTH}{\ttdefault}{ttypist}
}
+ % The following is needed with LuaTeX and TeX fonts
+ % as babel does not load thai.ldf in this case,
+ % where this is normally defined:
+ \AtBeginDocument{%
+ \@ifpackageloaded{luainputenc}{%
+ \DeclareRobustCommand{\thaitext}{%
+ \fontencoding{LTH}\selectfont%
+ \def\encodingdefault{LTH}}
+ \addto\extrasthai{\thaitext}
+ \addto\noextrasthai{\latintext}
+ }{}
+ }
EndPostBabelPreamble
End
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs