-
Notifications
You must be signed in to change notification settings - Fork 178
/
ctex002.lvt
70 lines (52 loc) · 1.24 KB
/
ctex002.lvt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
%
% Copyright (C) 2015 Qing Lee
%
%% We use fandol fonts for testing. In pdftex, they can be only used with dvipdfmx
%% driver. Actually, dvipdfmx is preferred and more frequently used in Chinese
%% typesetting with pdftex.
\begingroup
\expandafter\ifx\csname pdfoutput\endcsname\relax
\def\next{}
\else
\expandafter\ifx\csname luatexversion\endcsname\relax
\def\next{\pdfoutput=0\relax}
\PassOptionsToPackage{driver=dvipdfmx}{expl3}
\else
\def\next{}
\fi
\fi
\expandafter\endgroup\next
\documentclass{article}
\input{regression-test}
\AUTHOR{Qing Lee}
% \usepackage[enable-debug]{expl3}
% \ExplSyntaxOn
% \debug_on:n { deprecation }
% \ExplSyntaxOff
\usepackage{xparse}
\usepackage{xtemplate}
\START
\ExplSyntaxOn
%% ctex only supports pdftex, xetex and luatex.
\bool_if:nF
{
\sys_if_engine_pdftex_p:
|| \sys_if_engine_xetex_p:
|| \sys_if_engine_luatex_p:
}
{
\msg_term:n { Not-supported-engine! }
\END
}
\ExplSyntaxOff
\OMIT
% Make sure TU encoding is used by fontspec
\PassOptionsToPackage{tuenc}{fontspec}
%% Using fandol fonts for testing
\usepackage[UTF8, heading, fontset = fandol]{ctex}
\begin{document}
\TIMO
\showoutput
你好,世界!
一二三ABC
\end{document}