% \iffalse meta-comment % % File: lxgw.dtx % ----------------------------------------------------------------------- % Runtime: Copyright (C) 2025 by Mingyu Xia * % * % Fonts: Copyright (C) 2021-2025 by LXGW * % * % This work may be distributed and/or modified under the conditions * % of the SIL Open Font License (OFL) version 1.1. * % The latest version of this license is in * % * % https://openfontlicense.org * % * % This work has the OFL maintenance status `maintained'. * % * % The Current Maintainer of this work on CTAN is Mingyu Xia. * % * % The Current Maintainer of this font family is LXGW. * % * % This work consists of the files lxgw.dtx, * % lxgw.ins, * % the derived files ctex-fontset-lxgw.def, * % ctex-zhmap-lxgw.tex, * % ctexpunct-lxgw.spa, * % the font files LXGWWenKaiLite-Regular.ttf, * % LXGWWenKaiLite-Medium.ttf, * % LXGWWenKaiGBLite-Regular.ttf, * % LXGWWenKaiGBLite-Medium.ttf, * % LXGWMarkerGothic-Regular.ttf, * % LXGWXiaolai-Regular.ttf, * % LXGWYozai-Regular.ttf, * % LXGWYozai-Medium.ttf, * % the documentation files lxgw.pdf, * % and README.md. * % ----------------------------------------------------------------------- % % Any modification of this file should ensure that the copyright and % license information is placed in the derived files. % % ----------------------------------------------------------------------- % %<*internal> \iffalse % % %<*readme> [![CTAN Version](https://img.shields.io/ctan/v/lxgw-fonts)](https://ctan.org/pkg/lxgw-fonts) [![GitHub Last Commit](https://img.shields.io/github/last-commit/myhsia/LXGW-CTAN)](https://github.com/myhsia/LXGW-CTAN/commits) [![GitHub Repo stars](https://img.shields.io/github/stars/myhsia/LXGW-CTAN)](https://github.com/myhsia/LXGW-CTAN) The `LXGW` Font Family ====================== The `LXGW` Font Family provides an open-source CJK font family with a comprehensive character set for Chinese (Simplified/Traditional), Cantonese, and Japanese. A `fontset` configuration of this font family for the `ctex-kit` is also provided in this package. Issues ------ The issue tracker for `LXGW` is currently located [on GitHub](https://github.com/myhsia/LXGW-CTAN). Copyright and License --------------------- Runtime: Copyright (C) 2025 by Mingyu Xia Fonts: Copyright (C) 2021-2025 by LXGW This work may be distributed and/or modified under the conditions of the SIL Open Font License (OFL) version 1.1. The latest version of this license is in https://openfontlicense.org This work has the OFL maintenance status `maintained'. The Current Maintainer of this work on CTAN is Mingyu Xia. The Current Maintainer of this font family is LXGW. % % %<*internal> \fi % % %<*driver> \documentclass{l3doc} \usepackage[mono = false, osf]{libertine} \usepackage[punct = plain, fontset = lxgw, scheme = plain]{ctex} \defaultfontfeatures{Extension = .ttf, Scale = .95} \usepackage{tikz, framed} \ExplSyntaxOn \makeatletter \dim_set:Nn \FrameSep {2pt} \tex_tracinglostchars:D = 0 \tex_XeTeXcharclass:D "2370 = 1 \DeclareDocumentCommand \key { s m } { \IfBooleanTF {#1} { \color_select:n { red } #2 ~ } { \seq_set_from_clist:Nn \l_tmpa_seq {#2} \seq_set_map:NNn \l_tmpb_seq \l_tmpa_seq { \color_group_begin: \color_select:n { red } \exp_not:n { ##1 } \color_group_end: } \seq_use:Nn \l_tmpb_seq { ,~ } \:=\: } } \DeclareCommandCopy \val \meta \newlist{keyval}{itemize}{10} \setlist[keyval]{leftmargin = 0pt, labelsep = 0pt} \def \HoLogo@LXGW#1{^^A \tex_XeTeXcharclass:D "004C = 1^^A L \tex_XeTeXcharclass:D "0058 = 1^^A X \tex_XeTeXcharclass:D "0047 = 1^^A G \tex_XeTeXcharclass:D "0057 = 1^^A W LX\kern-.05emG\kern-.05emW} \makeatother \ExplSyntaxOff \begin{document} \DocInput{\jobname.dtx} \end{document} % % \fi % % \makeatletter % \title{The \hologo{LXGW} Font Family\thanks{^^A % \url{https://github.com/lxgw}, % \url{https://github.com/myhsia/LXGW-CTAN} % }\texorpdfstring{\enspace \textbar \enspace\parbox{4em}{^^A % \songti % \scalebox{\fpeval{4/7}}{落霞与孤鹜齐飞}\\[-.75em] % \scalebox{\fpeval{4/7}}{秋水共长天一色}^^A % }}{}^^A % } % % \author{^^A % Maintainer: \hologo{LXGW} (落霞孤鹜), % Administrator: Mingyu Xia (夏明宇)\thanks{\texttt{^^A % \href{mailto:xiamingyu@westlake.edu.cn}{xiamingyu@westlake.edu.cn}^^A % }} % } % % \date{Released 2025-12-06\quad \texttt{v1.521F}} % % \def\Copyright{^^A % \begin{center} % \setlength \fboxrule {1.2pt} \fbox{\setlength \fboxrule {.6pt}^^A % \fbox{\parbox {.8\linewidth} {^^A % This package packs a selection of open-source fonts from the % \href{https://github.com/lxgw/LxgwWenKai-Lite} % {\songti 霞鹜文楷\textsuperscript{轻便版}}, % \href{https://github.com/lxgw/LxgwWenKaiGB-Lite} % {\CJKfontspec{LXGWWenKaiGBLite-Regular}\selectfont % 霞鹜文楷\ 国标\textsuperscript{轻便版}}, % \href{https://github.com/lxgw/LxgwMarkerGothic} % {\heiti 霞鹜漫黑}, % \href{https://github.com/lxgw/kose-font} % {\fangsong 小赖字体}, and % \href{https://github.com/lxgw/yozai-font} % {\kaishu 悠哉字体}, % which are released into public domain by % \href{https://lxgw.github.io/}{\hologo{LXGW}} since 2021. % They are licensed under the % \href{https://ctan.org/license/ofl}{SIL Open Font License (OFL)}. % }}} % \end{center}} % \def\@thanks{\Copyright} % % \maketitle % \tikz[remember picture, overlay] % \node [ rotate = -10, font = \songti, % scale = 50, opacity = .1 ] at % ([shift = {(10 * \f@size \p@, 8 * \f@size \p@)}] % current page.south west) {鹜}; % \makeatother % % \begin{documentation} % % \begin{abstract} % The \hologo{LXGW} Font Family provides an open-source CJK font family with a % comprehensive character set for Chinese (Simplified/Traditional), Cantonese, % and Japanese. A |fontset| configuration of this font family for the % \pkg{ctex-kit} is also provided in this package. % \end{abstract} % % \section{Usage} % % Users are allowed to use the friendly interface: % the |fontset| key in the \pkg{ctex} package % \begin{quote} % |\usepackage[fontset = lxgw]{ctex}| % \end{quote} % or the \cls{ctex} classes % \begin{quote} % |\documentclass[fontset = lxgw]{ctex|^^A % \meta{art\textup\textbar book\textup\textbar rep\textup\textbar beamer}|}| % \end{quote} % with \hologo{XeLaTeX}, \hologo{LuaLaTeX}, and \hologo{upLaTeX} supported. % Since the unusually long mapping time of |zhmap|, \hologo{pdfLaTeX} is not % supported temporarily. % Additionally, the following four commands are provided for convenience. % \begin{function}{\songti, \heiti, \fangsong, \kaishu} \footnotesize % \begin{syntax} % \songti 宋体 (|CJKmainfont|):^^A % \file{LXGWWenKaiGBLite-Regular.ttf}, \file{LXGWWenKaiGBLite-Medium.ttf}.\\ % \heiti 黑体 (|CJKsansfont|):^^A % \file{LXGWMarkerGothic-Regular.ttf} (with |AutoFakeBold| option).\\ % \fangsong 仿宋 (|CJKmonofont|):^^A % \file{LXGWXiaolai-Regular.ttf}.\\ % \kaishu 楷书 (itshape of |CJKmainfont|):^^A % \file{LXGWYozai-Regular.ttf}, \file{LXGWYozai-Medium.ttf}. % \end{syntax} % \end{function} % \NB{tag}{cmt} % \begin{NOTE}{tag} % \end{NOTE} % Note that the names of the four control sequences make no sense here, % just to keep the same naming habit of \pkg{ctex-kit}. % % The implementation of this user-friendly interface is included in % \ref{subsec:fontset}, \ref{subsec:spa}, and~\ref{subsec:zhmap}. % % \section{Font Demos} % % The following lists the Chinese/English name, filename, and demos of the % fonts: Cantonese, Japanese, Chinese (Simplified/Traditional) % versions of ``\textbf{I Can Eat Glass}'', missing % character markers are provided with punctuation compression disabled and % fulfilling line. % \def\0{^^A % \makebox[\linewidth][s]{^^A % 我可以食玻璃,\textbf{佢傷唔到我㗎。}^^A % 私はガラスを食べられます。\textbf{それは私を傷つけません。}}\\ % \makebox[\linewidth][s]{^^A % 我能吞下玻璃而不伤身体。\textbf{我能吞下玻璃而不伤身体。}^^A % 我能吞下玻璃而不傷身體。^^^^2370^^^^2370^^^^2370^^A % }^^A % } % \begin{keyval} % \item[\key*{\songti 霞鹜文楷 (\pkg{LXGW WenKai})}] % \file{LXGWWenKaiLite-Regular.ttf}, \file{LXGWWenKaiLite-Medium.ttf} % \begin{framed} % \songti\0 % \end{framed} % \item[\key*{\CJKfontspec[BoldFont = LXGWWenKaiGBLite-Medium]^^A % {LXGWWenKaiGBLite-Regular}\selectfont % 霞鹜文楷\textsubscript{\textbf{国标}} % (\pkg{LXGW WenKai\textsubscript{\textbf{GB}}})}] % \file{LXGWWenKaiGBLite-Regular.ttf}, % \file{LXGWWenKaiGBLite-Medium.ttf} % \begin{framed} % \CJKfontspec[BoldFont = LXGWWenKaiGBLite-Medium]^^A % {LXGWWenKaiGBLite-Regular}\selectfont\0 % \end{framed} % \item[\key*{\heiti 霞鹜漫黑 (\pkg{LXGW Marker Gothic})}] % \file{LXGWMarkerGothic-Regular.ttf} % \begin{framed} % \heiti\0 % \end{framed} % \item[\key*{\fangsong 小赖字体 (\pkg{Xiaolai Font})}] % \file{LXGWXiaolai-Regular.ttf} % \begin{framed} % \fangsong\0 % \end{framed} % \item[\key*{\kaishu 悠哉字体 (\pkg{Yozai Font})}] % \file{LXGWYozai-Regular.ttf}, \file{LXGWYozai-Medium.ttf} % \begin{framed} % \kaishu\0 % \end{framed} % \end{keyval} % % \end{documentation} % \clearpage \appendix % \begin{implementation} % % \section{The Source Code} % % \subsection{The \texttt{ctex-fontset-lxgw.def} file}\label{subsec:fontset} % % Start the optionlist |fontset| for l3docstrip. % \begin{macrocode} %<*fontset> % \end{macrocode} % Declare the \pkg{ctex-kit} font configuration file with date, version, and % description. % \begin{macrocode} \ProvidesExplFile{ctex-fontset-lxgw.def} {2025-12-06} {1.521F} {lxgw fontset configuration for ctex-kit} % \end{macrocode} % Load CJK font family, interface provided by \pkg{ctex-kit}. % \begin{macrocode} \ctex_fontset_case:nnnn % \end{macrocode} % The \hologo{pdfTeX} (generate PDF directly) branch is no longer supported for % the \pkg{LXGW} font family. Here will raise a % \underline{|fontset-unavailable|} error. % \begin{macrocode} { \ctex_fontset_error:n { lxgw } } { % \end{macrocode} % The \hologo{pdfTeX} (generate DVI) branch.\par\noindent % Load the \file{.spa} file for the \pkg{CJKpunct} package. % \begin{macrocode} \ctex_file_input:n { ctexpunct-lxgw.spa } % \end{macrocode} % Case choice controlled by the |zhmap| key of \pkg{ctex-kit}. % \begin{macrocode} \ctex_zhmap_case:nnn % \end{macrocode} % \begin{arguments} % \item Content of this argument will be outputted to the input stream when % |zhmap = zhmCJK| % \begin{verbatim}[commandchars = \\\{\}] % \color{gray}\cs{cs_gset_eq:NN} \cs{ctex_zhmap_case:nnn} \cs{use_i:nnn} % \end{verbatim} % The \hologo{LXGW} font family uses the default |unicode| cmap. % \begin{macrocode} { \setCJKmainfont { LXGWWenKaiLite-Regular.ttf } [ BoldFont = LXGWWenKaiLite-Medium.ttf, ItalicFont = LXGWYozai-Regular.ttf, ] \setCJKsansfont { LXGWMarkerGothic-Regular.ttf } [ AutoFakeBold ] \setCJKmonofont { LXGWXiaolai-Regular.ttf } [ AutoFakeBold ] \setCJKfamilyfont { zhsong } { LXGWWenKaiLite-Regular.ttf } [ BoldFont = LXGWWenKaiLite-Medium.ttf ] \setCJKfamilyfont { zhhei } { LXGWMarkerGothic-Regular.ttf } [ AutoFakeBold ] \setCJKfamilyfont { zhfs } { LXGWXiaolai-Regular.ttf } [ AutoFakeBold ] \setCJKfamilyfont { zhkai } { LXGWYozai-Regular.ttf } [ BoldFont = LXGWYozai-Medium.ttf ] % \end{macrocode} % Configure the usages of the edge information of the defined CJK families. % \begin{macrocode} \ctex_punct_set:n { lxgw } \ctex_punct_map_family:nn { \CJKrmdefault } { zhsong } \ctex_punct_map_family:nn { \CJKsfdefault } { zhhei } \ctex_punct_map_family:nn { \CJKttdefault } { zhfs } \ctex_punct_map_bfseries:nn { \CJKrmdefault, zhsong } { zhsongb } \ctex_punct_map_bfseries:nn { \CJKsfdefault, zhhei } { zhheib } \ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai } } % \end{macrocode} % \item Content of this argument will be outputted to the input stream when % |zhmap = true| % \begin{verbatim}[commandchars = \\\{\}] % \color{gray}\cs{cs_gset_eq:NN} \cs{ctex_zhmap_case:nnn} \cs{use_ii:nnn} % \end{verbatim} % Load the mapping file \file{ctex-zhmap-lxgw.tex} for \pkg{zhmatrices} and % set \cs{CJKrmdefault}, \cs{CJKsfdefault}, \cs{CJKttdefault} respectively. % \begin{macrocode} { \ctex_load_zhmap:nnnn { rm } { zhhei } { zhfs } { lxgw } % \end{macrocode} % Configure the usages of the edge information of \cs{CJKrmdefault}. % \begin{macrocode} \ctex_punct_set:n { lxgw } \ctex_punct_map_family:nn { \CJKrmdefault } { zhsong } \ctex_punct_map_bfseries:nn { \CJKrmdefault } { zhhei } \ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai } } % \end{macrocode} % \item Content of this argument will be outputted to the input stream when % |zhmap = false| % \begin{verbatim}[commandchars = \\\{\}] % \color{gray}\cs{cs_gset_eq:NN} \cs{ctex_zhmap_case:nnn} \cs{use_iii:nnn} % \end{verbatim} % Here will raise a \underline{|fontset-unavailable|} error. % \begin{macrocode} { \ctex_fontset_error:n { lxgw } } } % \end{macrocode} % \end{arguments} % The \hologo{upTeX} branch.\par\noindent % Configure the basic font mapping for \hologo{upTeX}. Due to the definition in % \pkg{zhmetrics-uptex}, configure % \begin{multicols}{3} % \begin{enumerate} % \item |upshape| of serif font. % \item |bfseries| of serif font. % \item |itshape| of serif font. % \item |upshape| of sans font. % \item |bfseries| of sans font. % \item |upshape| of mono font. % \end{enumerate} % \end{multicols} % \begin{macrocode} { \ctex_set_upmap_unicode:nnn { upserif } { LXGWWenKaiLite-Regular.ttf } { LXGWWenKaiLite-Medium.ttf } \ctex_set_upmap_unicode:nnn { upsans } { LXGWMarkerGothic-Regular.ttf } { } \ctex_set_upmap_unicode:nnn { upmono } { LXGWXiaolai-Regular.ttf } { } \ctex_set_upmap_unicode:nnn { upserifit } { LXGWYozai-Regular.ttf } { } % \end{macrocode} % Config the \textsf{NFSS} font families |zhsong|, |zhhei|, |zhfs|, and % |zhkai| to the \textsf{JFM} name in normal type and bold type. % Leave empty for those font families with no bold version. % \begin{macrocode} \ctex_set_upfamily:nnn { zhsong } { upzhserif } { upzhserifb } \ctex_set_upfamily:nnn { zhhei } { upzhsans } { } \ctex_set_upfamily:nnn { zhfs } { upzhmono } { } \ctex_set_upfamily:nnn { zhkai } { upzhserifit } { upzhserifitb } } % \end{macrocode} % The \hologo{XeTeX}/\hologo{LuaTeX} branch. % \begin{macrocode} { \setCJKmainfont { LXGWWenKaiLite-Regular } [ Extension = .ttf, BoldFont = LXGWWenKaiLite-Medium, ItalicFont = LXGWYozai-Regular ] \setCJKsansfont { LXGWMarkerGothic-Regular } [ Extension = .ttf, AutoFakeBold ] \setCJKmonofont { LXGWXiaolai-Regular } [ Extension = .ttf, AutoFakeBold ] \setCJKfamilyfont { zhsong } { LXGWWenKaiLite-Regular } [ Extension = .ttf, BoldFont = LXGWWenKaiLite-Medium ] \setCJKfamilyfont { zhhei } { LXGWMarkerGothic-Regular } [ Extension = .ttf, AutoFakeBold ] \setCJKfamilyfont { zhfs } { LXGWXiaolai-Regular } [ Extension = .ttf, AutoFakeBold ] \setCJKfamilyfont { zhkai } { LXGWYozai-Regular } [ Extension = .ttf, BoldFont = LXGWYozai-Medium ] } % \end{macrocode} % \begin{macro}{\songti, \heiti, \fangsong, \kaishu} % Shortcuts that same as those in the \pkg{ctex-kit}. % \begin{macrocode} \NewDocumentCommand \songti { } { \CJKfamily { zhsong } } \NewDocumentCommand \heiti { } { \CJKfamily { zhhei } } \NewDocumentCommand \fangsong { } { \CJKfamily { zhfs } } \NewDocumentCommand \kaishu { } { \CJKfamily { zhkai } } % \end{macrocode} % \end{macro} % End the optionlist |fontset| for l3docstrip. % \begin{macrocode} % % \end{macrocode} % % \subsection{The \texttt{ctexpunct-lxgw.spa} file}\label{subsec:spa} % % To make the |.spa| file, run the following script: \file{ctex-spa-make.tex} % \begin{verbatim} % \input ctex-spa-macro % % \MAKESPA {ctexpunct-lxgw.spa} % { % {lxgwzhsong} {LXGWWenKaiLite-Regular} , % {lxgwzhsongb} {LXGWWenKaiLite-Medium} , % {lxgwgbzhsong} {LXGWWenKaiGBLite-Regular} , % {lxgwgbzhsongb} {LXGWWenKaiGBLite-Medium} , % {lxgwzhhei} {LXGWMarkerGothic-Regular} , % {lxgwzhfs} {LXGWXiaolai-Regular} , % {lxgwzhkai} {LXGWYozai-Regular} , % {lxgwzhkaib} {LXGWYozai-Medium} , % } % \primitive\end % \end{verbatim} % by executing the following line in the terminal % \begin{verbatim} % xetex ctex-spa-make % \end{verbatim} % The \file{.spa} file of the corresponding font will be used % for the \pkg{CJKpunct} package to achieve the punctuation compression, % which can ensure the best typeset effect (under the \hologo{pdfTeX} engine). % \iffalse % \begin{macrocode} %<*spa> \ctexspadef{lxgwzhsong}{12,11,6,4,72,6,68,5,72,6,71,7,72,6,68,7,66,5,52,5,70,-1,72,4,0,0,12,12,7,71,8,65,10,77,12,76,20,70,18,70,17,72,7,50,12,12,6,72,7,71,6,72,7,68,5,66,5,52,-1,70,4,72,11,12,4,6,6,72,5,68,,,} \ctexspadef{lxgwzhsongb}{12,10,5,4,72,5,68,4,72,6,70,6,71,6,67,6,66,5,51,4,70,-3,72,2,-0,-0,11,11,6,70,7,64,10,76,12,76,19,69,17,69,17,72,6,49,12,12,6,72,6,70,6,71,6,67,5,66,4,51,-3,70,2,72,10,11,4,5,5,72,4,68,,,} \ctexspadef{lxgwgbzhsong}{12,11,6,4,72,6,68,5,72,6,71,7,72,6,68,7,66,5,52,5,70,-1,72,4,0,0,12,12,7,71,8,65,10,77,12,76,20,70,18,70,17,72,7,50,12,12,6,72,7,71,6,72,7,68,5,66,5,52,-1,70,4,72,11,12,4,6,6,72,5,68,,,} \ctexspadef{lxgwgbzhsongb}{12,10,5,4,72,5,68,4,72,6,70,6,71,6,67,6,66,5,51,4,70,-3,72,2,-0,-0,11,11,6,70,7,64,10,76,12,76,19,69,17,69,17,72,6,49,12,12,6,72,6,70,6,71,6,67,5,66,4,51,-3,70,2,72,10,11,4,5,5,72,4,68,,,} \ctexspadef{lxgwzhhei}{11,8,11,8,65,10,54,6,70,7,61,12,73,7,63,7,63,7,43,7,54,4,73,5,0,0,19,18,7,64,8,57,12,77,11,78,11,78,11,78,18,73,10,45,11,11,7,69,12,61,7,73,7,63,7,63,7,43,4,54,5,73,8,11,8,11,10,65,6,54,,,} \ctexspadef{lxgwzhfs}{71,12,59,6,62,7,56,4,58,11,66,9,65,8,62,10,61,10,54,4,61,4,59,6,0,0,9,12,12,68,4,65,8,78,42,43,43,43,42,43,42,42,31,32,10,8,4,66,8,67,6,67,9,66,10,59,7,52,6,60,6,59,11,70,6,56,6,62,5,52,,,} \ctexspadef{lxgwzhkai}{70,13,57,6,69,5,54,3,70,3,72,3,65,3,63,10,69,2,54,1,59,4,62,6,-2,-2,9,10,12,64,6,67,11,74,13,74,44,44,43,42,45,43,25,26,7,8,3,70,3,72,2,66,10,63,2,70,2,53,4,60,6,62,11,72,6,58,4,69,3,54,,,} \ctexspadef{lxgwzhkaib}{70,12,56,5,68,4,53,2,69,2,72,3,65,3,62,9,69,1,53,0,59,3,61,6,-3,-3,8,10,12,63,5,67,10,73,12,74,43,44,43,41,44,42,24,25,7,7,2,70,3,71,2,65,10,62,1,70,2,52,3,59,6,61,10,72,6,57,4,68,2,54,,,} % % \end{macrocode} % \fi % % \subsection{The \texttt{ctex-zhmap-lxgw.tex} file}\label{subsec:zhmap} % % Start the optionlist |zhmap| for l3docstrip. % \begin{macrocode} %<*zhmap> % \end{macrocode} % Forked from the |zhmap| optionlist of \file{ctex.dtx}\footnote{^^A % \url{https://github.com/CTeX-org/ctex-kit/blob/master/ctex/ctex.dtx}}. % % \begin{macrocode} \begingroup\catcode61\catcode48\catcode32=10\relax% \catcode 35=6 % # \catcode 45=12 % - \catcode123=1 % { \catcode125=2 % } \toks0{\endlinechar=\the\endlinechar\relax}% \toks2{\endlinechar=-1 }% \def\x#1 #2 {% \toks0\expandafter{\the\toks0 \catcode#1=\the\catcode#1\relax}% \toks2\expandafter{\the\toks2 \catcode#1=#2 }}% \x 13 5 % carriage return \x 32 10 % space \x 35 6 % # \x 40 12 % ( \x 41 12 % ) \x 45 12 % - \x 46 12 % . \x 47 12 % / \x 58 12 % : \x 60 12 % < \x 61 12 % = \x 64 11 % @ \x 91 12 % [ \x 93 12 % ] \x 123 1 % { \x 125 2 % } \edef\x#1{\endgroup% \edef\noexpand#1{% \the\toks0 % \let\noexpand\noexpand\noexpand#1% \noexpand\noexpand\noexpand\undefined% \noexpand\noexpand\noexpand\endinput}% \the\toks2}% \expandafter\x\csname ctex@zhmap@endinput\endcsname \begingroup\expandafter\endgroup \expandafter\let\csname ifzhmappdf\expandafter\endcsname\csname \expandafter\ifx\csname ifctexpdf\endcsname\relax \expandafter\ifx\csname pdfoutput\endcsname\relax iffalse\else\ifnum\pdfoutput < 1 iffalse\else iftrue\fi\fi \else ifctexpdf\fi \endcsname \begingroup \expandafter\ifx\csname ProvidesFile\endcsname\relax \long\def\x#1\ProvidesFile#2[#3]{% #1% \immediate\write-1{File: #2 #3}% \expandafter\xdef\csname ver@#2\endcsname{#3}} \expandafter\x% \fi \endgroup % \end{macrocode} % Provides the identification information of the font mapping file. % \begin{macrocode} \ProvidesFile{ctex-zhmap-lxgw.tex}% [2025-12-06 v1.521F lxgw font map loader for DVIPDFMx (CTEX)] % \end{macrocode} % The font mapping configurations. % \begin{macrocode} \ifzhmappdf \iffalse \pdfmapline{=gbk@UGBK@ % \end{macrocode} % \end{implementation}