Files
ai-agent-book/book-ta/tamil-fonts.tex
T
liqiang b119135836
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
2026-08-20 13:12:50 +00:00

22 lines
1.3 KiB
TeX
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
% ===== Tamil script support for the Tamil edition =====
% Included AFTER preamble.tex (see build_pdf.sh). ElegantBook has no Tamil
% language option, so the class runs in `lang=en` (English theorem names,
% "Chapter"/"Contents" labels). Tamil rendering is purely a font concern:
% the body/heading Latin fonts do not cover the Tamil block (U+0B80U+0BFF),
% and Noto Serif Tamil does not cover Latin — so we keep the book's default
% Latin/CJK/symbol fonts and route ONLY Tamil codepoints to Noto Serif Tamil.
%
% ucharclasses inserts the begin/end code at every entry/exit of a Tamil run.
% Wrapping in \begingroup…\endgroup means the exact surrounding style (bold in
% headings, monospace in code) is restored for whatever follows a Tamil run.
% Script=Tamil is REQUIRED: without it XeTeX applies default (Latin) shaping and
% the complex-script reordering (pre-base vowels ெ/ே/ை, two-part vowels ொ/ோ/ௌ,
% consonant conjuncts) is skipped, producing scrambled output.
\usepackage{ucharclasses}
\IfFontExistsTF{Noto Serif Tamil}{%
\newfontfamily\tamilfont{Noto Serif Tamil}[Script=Tamil,Language=Tamil]%
\setTransitionsFor{Tamil}{\begingroup\tamilfont}{\endgroup}%
}{%
\PackageWarning{tamil-fonts}{Noto Serif Tamil not found; Tamil text will not render.}%
}