% This is needed for translations
\\usepackage{xeCJK}
\\setCJKmainfont{Noto Sans CJK SC}
+ \\setCJKsansfont{Noto Sans CJK SC}
+ \\setCJKmonofont{Noto Sans Mono CJK SC}
+ % CJK Language-specific font choices
+ \\newCJKfontfamily[SCmain]\\scmain{Noto Sans CJK SC}
+ \\newCJKfontfamily[SCsans]\\scsans{Noto Sans CJK SC}
+ \\newCJKfontfamily[SCmono]\\scmono{Noto Sans Mono CJK SC}
+ \\newCJKfontfamily[TCmain]\\tcmain{Noto Sans CJK TC}
+ \\newCJKfontfamily[TCsans]\\tcsans{Noto Sans CJK TC}
+ \\newCJKfontfamily[TCmono]\\tcmono{Noto Sans Mono CJK TC}
+ \\newCJKfontfamily[KRmain]\\krmain{Noto Sans CJK KR}
+ \\newCJKfontfamily[KRsans]\\krsans{Noto Sans CJK KR}
+ \\newCJKfontfamily[KRmono]\\krmono{Noto Sans Mono CJK KR}
+ \\newCJKfontfamily[JPmain]\\jpmain{Noto Sans CJK JP}
+ \\newCJKfontfamily[JPsans]\\jpsans{Noto Sans CJK JP}
+ \\newCJKfontfamily[JPmono]\\jpmono{Noto Sans Mono CJK JP}
% Define custom macros to on/off CJK
\\newcommand{\\kerneldocCJKon}{\\makexeCJKactive}
\\newcommand{\\kerneldocCJKoff}{\\makexeCJKinactive}
- % To customize \sphinxtableofcontents
+ \\newcommand{\\kerneldocBeginSC}{%
+ \\begingroup%
+ \\scmain%
+ }
+ \\newcommand{\\kerneldocEndSC}{\\endgroup}
+ \\newcommand{\\kerneldocBeginTC}{%
+ \\begingroup%
+ \\tcmain%
+ \\renewcommand{\\CJKsfdefault}{TCsans}%
+ \\renewcommand{\\CJKttdefault}{TCmono}%
+ }
+ \\newcommand{\\kerneldocEndTC}{\\endgroup}
+ \\newcommand{\\kerneldocBeginKR}{%
+ \\begingroup%
+ \\krmain%
+ \\renewcommand{\\CJKsfdefault}{KRsans}%
+ \\renewcommand{\\CJKttdefault}{KRmono}%
+ }
+ \\newcommand{\\kerneldocEndKR}{\\endgroup}
+ \\newcommand{\\kerneldocBeginJP}{%
+ \\begingroup%
+ \\jpmain%
+ \\renewcommand{\\CJKsfdefault}{JPsans}%
+ \\renewcommand{\\CJKttdefault}{JPmono}%
+ }
+ \\newcommand{\\kerneldocEndJP}{\\endgroup}
+ % To customize \\sphinxtableofcontents
\\usepackage{etoolbox}
% Inactivate CJK after tableofcontents
\\apptocmd{\\sphinxtableofcontents}{\\kerneldocCJKoff}{}{}
% Custom macros to on/off CJK (Dummy)
\\newcommand{\\kerneldocCJKon}{}
\\newcommand{\\kerneldocCJKoff}{}
+ \\newcommand{\\kerneldocBeginSC}{}
+ \\newcommand{\\kerneldocEndSC}{}
+ \\newcommand{\\kerneldocBeginTC}{}
+ \\newcommand{\\kerneldocEndTC}{}
+ \\newcommand{\\kerneldocBeginKR}{}
+ \\newcommand{\\kerneldocEndKR}{}
+ \\newcommand{\\kerneldocBeginSC}{}
+ \\newcommand{\\kerneldocEndKR}{}
}
'''