OSDN Git Service

Include Chinese testing files (test-zh-maqiyuan.*) by MaQiYuan.
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Tue, 10 Jan 2012 13:20:53 +0000 (22:20 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Tue, 10 Jan 2012 13:20:53 +0000 (22:20 +0900)
.gitignore [new file with mode: 0644]
test/zh/jfm-quanjiao.lua [moved from test/jfm-quanjiao.lua with 100% similarity]
test/zh/test-zh-maqiyuan.pdf [new file with mode: 0644]
test/zh/test-zh-maqiyuan.tex [new file with mode: 0644]
test/zh/testyato-zh.pdf [moved from test/testyato-zh.pdf with 100% similarity]
test/zh/testyato-zh.tex [moved from test/testyato-zh.tex with 100% similarity]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..cacbd70
--- /dev/null
@@ -0,0 +1,7 @@
+*.log
+*.aux
+*.toc
+*.out
+*.tmp
+*~
+
diff --git a/test/zh/test-zh-maqiyuan.pdf b/test/zh/test-zh-maqiyuan.pdf
new file mode 100644 (file)
index 0000000..dc5eea0
Binary files /dev/null and b/test/zh/test-zh-maqiyuan.pdf differ
diff --git a/test/zh/test-zh-maqiyuan.tex b/test/zh/test-zh-maqiyuan.tex
new file mode 100644 (file)
index 0000000..0750cef
--- /dev/null
@@ -0,0 +1,87 @@
+%% Created by MaQiYuan(1113706230@qq.com, ClerkMa@gmail.com)\r
+% This a test file which using LuaTeX-ja to typeset Chinese.\r
+% 本文是使用 LuaTeX-ja 来排版中文。\r
+% As peoples knows that the Japanese is similar to Chinese. And the typography of both languages is highly similar too.\r
+% 如人所周知,日文和中文极为相似。此两者的排版也是高度相似的。\r
+% In this test file, part of codes can patching to your '.tex' file to typeset Chinese very well.\r
+% 本文档中的部分代码可以添加到你的“.tex”文档中来排印中文。\r
+% This file do not using 'luatexja-fontspec'. And in the futrue, when have fixed the bug in 'xunicode.sty', the 'luatexja-fontspec' is the simplest and recommended way to typeset Chinese.% 本文未使用“luatexja-fontspec”。在将来,“xunicode.sty”中的 bug 修复之后,使用“luatexja-fontspec”是最简单而且最有效的方法。\r
+\documentclass{article}\r
+\usepackage{luatexja}\r
+% We need set a new encoding in NFSS for Chinese: ZH (stand for "zhongwen hengban"). \r
+% 我们需要重新定义一个 NFSS 中的编码来代表中文,ZH,是“中文横板”的缩写。\r
+\DeclareYokoKanjiEncoding{ZH}{}{}\r
+\DeclareKanjiEncodingDefaults{}{}\r
+\DeclareErrorKanjiFont{ZH}{song}{m}{n}{10}\r
+\DeclareKanjiSubstitution{ZH}{song}{m}{n}\r
+%\r
+\newcommand\songdefault{song}\r
+\newcommand\heidefault{hei}\r
+\renewcommand\kanjiencodingdefault{ZH}\r
+\renewcommand\kanjifamilydefault{\songdefault}\r
+\renewcommand\kanjiseriesdefault{\mddefault}\r
+\renewcommand\kanjishapedefault{\updefault}\r
+% There are two fonts usually using in Chinese typograph: 'song' style and 'hei' style. You can adding some font like 'kai' style, 'fangsong' style etc.\r
+% 此处设定了中文排版中的两种常用字体:宋体和黑体。你可以填入其他的字体,比如楷体和仿宋体。\r
+% The pTeX have using 9.62216pt's Japanese font to acompany with 10pt's Latin font. And so is in LuaTeX-ja. But this is not a must when using Chinese font.\r
+% pTeX 中使用 9.62216pt 大小的中文字体来配合西文字体使用。LuaTeX-ja 中也是如此。但是使用中文字体时,此项非必需。\r
+% There are two Adobe's font: 'AdobeSongStd-Light' and 'AdobeHeitiStd-Regular'. You also can using the 'SimSun' and 'SimHei' if your platform is Windows.\r
+% 此处使用两款 Adobe 字体:“AdobeSongStd-Light”和“AdobeHeitiStd-Regular”。如果你的平台是 Windows,你也可使用“中易宋体”和“中易黑体”。\r
+\DeclareKanjiFamily{ZH}{song}{}\r
+\DeclareFontShape{ZH}{song}{m}{n}{<->name:AdobeSongStd-Light:jfm=jis}{}\r
+\DeclareFontShape{ZH}{song}{bx}{n}{<->ssub*hei/m/n}{}\r
+\DeclareKanjiFamily{ZH}{hei}{}\r
+\DeclareFontShape{ZH}{hei}{m}{n}{<->name:AdobeHeitiStd-Regular:jfm=jis}{}\r
+%\r
+\fontencoding{ZH}\selectfont\r
+\DeclareTextFontCommand{\textsong}{\songfamily}\r
+\DeclareTextFontCommand{\texthei}{\heifamily}\r
+\DeclareOldFontCommand{\song}{\normalfont\songfamily}{}\r
+\DeclareOldFontCommand{\hei}{\normalfont\heifamily}{}\r
+% There is the setting of math typestting.\r
+%此处为数学排版设定。\r
+\DeclareSymbolFont{songti}{ZH}{song}{m}{n}\r
+\jfam\symsongti\r
+\SetSymbolFont{songti}{bold}{ZH}{hei}{m}{n}\r
+\DeclareSymbolFontAlphabet{\mathsong}{songti}\r
+\DeclareMathAlphabet{\mathhei}{ZH}{hei}{m}{n}\r
+% Redefine the fontfamily.\r
+% 重新定义字体族。\r
+\makeatletter\r
+\DeclareRobustCommand\songfamily{\not@math@alphabet\songfamily\mathsong\kanjifamily\songdefault\selectfont}\r
+\DeclareRobustCommand\heifamily{\not@math@alphabet\heifamily\mathhei\kanjifamily\heidefault\selectfont}\r
+\DeclareRobustCommand\rmfamily{\not@math@alphabet\rmfamily\mathrm\romanfamily\rmdefault\kanjifamily\songdefault\selectfont}\r
+\DeclareRobustCommand\sffamily{\not@math@alphabet\sffamily\mathsf\romanfamily\sfdefault\kanjifamily\heidefault\selectfont}\r
+\makeatother\r
+\begin{document}\r
+\section{字体变换}\r
+\r
+\verb!{\song 你好!}! → 你好!\hskip 4\zw\verb!{\hei 你好!}! → {\hei 你好!}\r
+\section{一个简单的积分公式}\r
+$$     \int\frac{\mathrm{d}x}{x (ax + b)} = - \frac{1}{bx} + \frac{a}{b^2}\ln\biggl|\frac{ax + b}{x}\biggr| + C        $$\r
+\section{一首诗}\r
+\begin{center}\r
+\sf 將進酒\r
+\end{center}\r
+君不見,黃河之水天上來,奔流到海不復回!君不見,高堂明鏡悲白髮,朝如青絲暮成雪!人生得意須盡歡,莫使金樽空對月。天生我材必有用,千金散盡還復來。烹羊宰牛且為樂,會須一飲三百杯。\r
+岑夫子,丹丘生。進酒君莫停。與君歌一曲,請君為我傾耳聽。鐘鼓饌玉不足貴,但願長醉不用醒。古來聖賢皆寂寞,惟有飲者留其名。陳王昔時宴平樂,斗酒十千恣歡謔。主人何為言少錢?\r
+徑須沽酒對君酌。五花馬,千金裘。呼兒將出換美酒,與爾同銷萬古愁。\r
+\section{关于汉字数字}\r
+\verb!\kansuji 1995年! → \kansuji 1995年\r
+\section{苏州码子}\r
+\def\suzhoumazi#1{%\r
+\begingroup%\r
+\ltjsetparameter{kansujichar={0,`〇}}%\r
+\ltjsetparameter{kansujichar={1,`〡}}%\r
+\ltjsetparameter{kansujichar={2,`〢}}%\r
+\ltjsetparameter{kansujichar={3,`〣}}%\r
+\ltjsetparameter{kansujichar={4,`〤}}%\r
+\ltjsetparameter{kansujichar={5,`〥}}%\r
+\ltjsetparameter{kansujichar={6,`〦}}%\r
+\ltjsetparameter{kansujichar={7,`〧}}%\r
+\ltjsetparameter{kansujichar={8,`〨}}%\r
+\ltjsetparameter{kansujichar={9,`〩}}%\r
+\kansuji #1%\r
+\endgroup}\r
+\fbox{\vbox{\hbox{\suzhoumazi{402}二}\hbox{拾元}}}\r
+\end{document}
\ No newline at end of file
similarity index 100%
rename from test/testyato-zh.pdf
rename to test/zh/testyato-zh.pdf
similarity index 100%
rename from test/testyato-zh.tex
rename to test/zh/testyato-zh.tex