[latex3-commits] [l3svn] branch master updated: ctex test: using fandol fonts for ctex test

noreply at latex-project.org noreply at latex-project.org
Sat Oct 3 17:24:46 CEST 2015


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

The following commit(s) were added to refs/heads/master by this push:
       new  dc81882   ctex test: using fandol fonts for ctex test
dc81882 is described below

commit dc81882672a1a3f19799f6d1ba234e40b797e380
Author: Qing Lee <sobenlee at gmail.com>
Date:   Sat Oct 3 22:41:58 2015 +0800

    ctex test: using fandol fonts for ctex test
---
 contrib/testfiles/ctex001.lvt |   38 ++++++++++++++++++++++----------------
 support/texlive.sh            |    1 +
 2 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/contrib/testfiles/ctex001.lvt b/contrib/testfiles/ctex001.lvt
index c365416..2782f0d 100644
--- a/contrib/testfiles/ctex001.lvt
+++ b/contrib/testfiles/ctex001.lvt
@@ -2,6 +2,23 @@
 % 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{book}
 \input{regression-test}
 \AUTHOR{Qing Lee}
@@ -14,6 +31,7 @@
 
 \ExplSyntaxOn
 
+%% ctex only supports pdftex, xetex and luatex.
 \bool_if:nF
   {
        \sys_if_engine_pdftex_p:
@@ -27,10 +45,7 @@
 
 %% We omit every message in tex running, but write a marker to .tlg before the final
 %% \@@end to indicate running without any errors since engine option "-halt-on-error"
-%% is active. In pdftex testing, there will be a "Font cyberb75 at 632 not found" error
-%% after \typeout{END-TEST-LOG} due to the lack of actual actual truetype fonts.
-%% \pdfdraftmode is helpless in this case. We can disable \shipout to avoid this error.
-%% But it is not essential in our test.
+%% is active.
 \OMIT
 \AtEndDocument
   {
@@ -43,22 +58,13 @@
 
 %% SVN keyword ID is not expanded by git, so the date of xtemplate is 0000/00/00.
 %% We need to change it to the correct value to make xeCJK happy.
-\ExplSyntaxOn
 \cs_set_eq:cc { ver at xtemplate.sty } { ver at expl3.sty }
-\ExplSyntaxOff
-
-\usepackage[UTF8, heading, fontset = none]{ctex}
 
-%% use lm fonts instead of fandol for testing
-\ExplSyntaxOn
-\sys_if_engine_pdftex:F
-  {
-    \setCJKmainfont { lmroman10-regular.otf }
-    \setCJKsansfont { lmsans10-regular.otf }
-    \setCJKmonofont { lmmono10-regular.otf }
-  }
 \ExplSyntaxOff
 
+%% Using fandol fonts for testing
+\usepackage[UTF8, heading, fontset = fandol]{ctex}
+
 
 \begin{document}
 
diff --git a/support/texlive.sh b/support/texlive.sh
index 2b1c104..9e823a8 100644
--- a/support/texlive.sh
+++ b/support/texlive.sh
@@ -41,6 +41,7 @@ tlmgr install \
   environ       \
   etoolbox      \
   euenc         \
+  fandol        \
   filehook      \
   lm            \
   lm-math       \

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list