From b5b1d5bd1048cf6f00ad54f33d7d254619ddc308 Mon Sep 17 00:00:00 2001 From: TANAKA Takuji Date: Sat, 9 Feb 2019 23:54:39 +0900 Subject: [PATCH] Add test sample for new era (#13) --- japanese-otf-uptex/test/uplatex/era.tex | 100 ++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 japanese-otf-uptex/test/uplatex/era.tex diff --git a/japanese-otf-uptex/test/uplatex/era.tex b/japanese-otf-uptex/test/uplatex/era.tex new file mode 100644 index 0000000..025f2ee --- /dev/null +++ b/japanese-otf-uptex/test/uplatex/era.tex @@ -0,0 +1,100 @@ +% -*- coding: utf-8 -*- + +%%%%%%%% +% ①,②,③,④ のどれかを実行すればよい。 +% ① platex, 新元号なし +% $ platex era.tex +% ② uplatex, 新元号なし +% $ uplatex era.tex +% ③ platex, 新元号あり +% $ platex "\def\era{true}\input" era.tex +% ④ uplatex, 新元号あり +% $ uplatex "\def\era{true}\input" era.tex +%%%%%% + +\newif\ifuptexmode\uptexmodefalse +\ifnum\jis"2121="3000 \uptexmodetrue\fi + +\makeatletter + +\def\@opt@{multi} +\def\@default{default} + +\ifx\option\@undefined + \def\option{default} +\fi +\ifx\option\@default +\else + \edef\@opt@{\option,\@opt@} +\fi + +\ifx\class\@undefined + \ifuptexmode + \def\engine{upLaTeX} + \else + \def\engine{pLaTeX} + \fi +\fi + +\newif\ifnewera\newerafalse +\ifx\era\@undefined + \edef\era{なし} +\else + \neweratrue + \edef\era{あり} +\fi +\typeout{## 新元号:\era ##} + +\documentclass[a4paper,draft,autodetect-engine]{jsarticle} + +\usepackage{plext} +\usepackage[\@opt@]{otf} + +\makeatother +\edef\bs{$\backslash$\kern0em} + +\begin{document} +\parindent0pt + +エンジン:\texttt{\engine}\\ +オプション:\texttt{\option}\\ +新元号:\era + +\vskip1zh + +\bs{}ajLig: \ajLig{明治}\ajLig{大正}\ajLig{昭和}\ajLig{平成}\ifnewera\ajLig{新元号}\fi + +\bs{}UTF: \UTF{337E}\UTF{337D}\UTF{337C}\UTF{337B}\ifnewera\UTF{32FF}\fi + +\bs{}CID: \CID{7621}\CID{7622}\CID{7623}\CID{8323}\ifnewera\CID{23058}\fi + +\ifuptexmode + +UTF-8: ㍾㍽㍼㍻\ifnewera ㋿\fi + +\bs{}kchar: \kchar"337E\kchar"337D\kchar"337C\kchar"337B\ifnewera\kchar"32FF\fi + +\fi + +\vskip1zh + +\parbox{25.0zw}{ + +\bs{}ajLig: \ajLig{明治}\ajLig{大正}\ajLig{昭和}\ajLig{平成}\ifnewera\ajLig{新元号}\fi + +\bs{}UTF: \UTF{337E}\UTF{337D}\UTF{337C}\UTF{337B}\ifnewera\UTF{32FF}\fi + +\bs{}CID: \CID{12041}\CID{12042}\CID{12043}\CID{12044}\ifnewera\CID{23059}\fi + +\ifuptexmode + +UTF-8: ㍾㍽㍼㍻\ifnewera ㋿\fi + +\bs{}kchar: \kchar"337E\kchar"337D\kchar"337C\kchar"337B\ifnewera\kchar"32FF\fi + +\fi + +} + +\end{document} +