summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/xetex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-02-12 00:19:25 +0000
committerKarl Berry <karl@freefriends.org>2016-02-12 00:19:25 +0000
commit16f02bbc1863609a1fa114bc9272d6a2a6f2e047 (patch)
treef03209d8a26c52d3a65fd9840d0d021b7c6a6b9a /Master/texmf-dist/doc/xetex
parentd8d0b5b21e8eb9b4970633451dc1e57192d5ab71 (diff)
zhspacing (11feb16)
git-svn-id: svn://tug.org/texlive/trunk@39670 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/xetex')
-rw-r--r--Master/texmf-dist/doc/xetex/zhspacing/README2
-rw-r--r--Master/texmf-dist/doc/xetex/zhspacing/t-zhspacing.tex117
-rw-r--r--Master/texmf-dist/doc/xetex/zhspacing/zhs-man.pdfbin151236 -> 167095 bytes
-rw-r--r--Master/texmf-dist/doc/xetex/zhspacing/zhs-man.tex37
-rw-r--r--Master/texmf-dist/doc/xetex/zhspacing/zhspacing-context-test.tex (renamed from Master/texmf-dist/doc/xetex/zhspacing/test/zhspacing-context-test.tex)0
5 files changed, 140 insertions, 16 deletions
diff --git a/Master/texmf-dist/doc/xetex/zhspacing/README b/Master/texmf-dist/doc/xetex/zhspacing/README
index be0359202ab..b5b4223d953 100644
--- a/Master/texmf-dist/doc/xetex/zhspacing/README
+++ b/Master/texmf-dist/doc/xetex/zhspacing/README
@@ -6,6 +6,6 @@ This package is licensed in LPPL.
If you are interested in the process of development you
may observe
- http://code.google.com/p/ctex-kit/updates/list
+ https://github.com/CTeX-org/ctex-kit/
- Yin Dian (yindian@gmail.com)
diff --git a/Master/texmf-dist/doc/xetex/zhspacing/t-zhspacing.tex b/Master/texmf-dist/doc/xetex/zhspacing/t-zhspacing.tex
new file mode 100644
index 00000000000..ce91f7ab9af
--- /dev/null
+++ b/Master/texmf-dist/doc/xetex/zhspacing/t-zhspacing.tex
@@ -0,0 +1,117 @@
+%D \module
+%D [ file=t-zhspacing,
+%D version=2009.05.11,
+%D title=\CONTEXT\ User Module,
+%D subtitle=Zh-Spacing,
+%D author=Yue Wang,
+%D date=\currentdate,
+%D copyright=Yue Wang
+%D email=yuleopen@gmail.com,
+%D license=BSD]
+
+\writestatus{loading}{Context User Module / Zh-Spacing}
+\unprotect
+
+%D Macro package \type{zhspacing} was written by Yin Dian in order to
+%D typeset Simplified Chinese in \XeTeX. The macro package uses \XeTeX's
+%D inter-char token mechanism in order to support the basic Chinese
+%D typesetting rules. This macro aims to port \type{zhspacing} to Hans
+%D Hagen's \ConTeXt\ format.
+
+%D \ConTeXt\ MKII does not load unicode-letters.tex automatically
+%D when the format is dumped. What's worse, standard \ConTeXt\
+%D distribution does not have unicode-letters.tex included.
+%D So in order to define all the default \XeTeX\ character classes
+%D as in plain \TeX\ and \LaTeX, we striped the related macros
+%D from unicode-letters.tex to \type{zhspacing-unicode}.
+
+
+\def\ID #1 #2 {\set{#1}{#2}{\global\XeTeXcharclass\n=1 \global\catcode\n=11 }}
+\countdef\n=255
+\def\set#1#2#3{\n="#1 \loop #3 \ifnum\n<"#2 \advance\n by 1 \repeat}
+\def\loop#1\repeat{\def\body{#1}\iterate}
+\def\iterate{\body \let\next\iterate \else\let\next\relax\fi \next}
+\let\repeat=\fi \ID 3400 4DB5 \ID 4E00 9FC3 \ID 20000 2A6D6
+
+%D \ConTeXt\ does not have the right catcode for zhspacing.sty defined.
+%D So we should define the catcode correctly in order to load it.
+
+\catcode`\!=12
+\catcode`\@=11
+\catcode`\?=12
+
+
+%D zhspacing uses \TeX\ commands \type{\lq} and \type{\rq} in plain TeX.
+%D However, these are not defined in \ConTeXt. So we define the two macros.
+
+\def\lq{`} \def\rq{'}
+
+%D And now we can load \type{zhspacing.sty} safely.
+
+\input zhspacing.sty
+
+
+%D Last thing: we define the typescript for Adobe Chinese fonts.
+
+\starttypescript [serif] [myzhfont]
+ \definefontsynonym [Serif] [ZhSerif]
+ \definefontsynonym [SerifBold] [ZhSerifBold]
+ \definefontsynonym [SerifItalic] [ZhSerifItalic]
+ \definefontsynonym [SerifBoldItalic] [ZhSerifBoldItalic]
+\stoptypescript
+
+\starttypescript [serif] [myzhfont]
+ \definefontsynonym [ZhSerif] [name:AdobeSongStd-Light]
+ \definefontsynonym [ZhSerifBold] [name:AdobeHeitiStd-Regular]
+ \definefontsynonym [ZhSerifItalic] [name:AdobeKaitiStd-Regular]
+ \definefontsynonym [ZhSerifBoldItalic] [name:AdobeHeitiStd-Regular]
+\stoptypescript
+
+\starttypescript [sans] [myzhfont]
+ \definefontsynonym [Sans] [ZhSans]
+ \definefontsynonym [SansBold] [ZhSansBold]
+ \definefontsynonym [SansItalic] [ZhSansItalic]
+ \definefontsynonym [SansBoldItalic] [ZhSansBoldItalic]
+\stoptypescript
+
+\starttypescript [sans] [myzhfont]
+ \definefontsynonym [ZhSans] [name:AdobeKaitiStd-Regular]
+ \definefontsynonym [ZhSansBold] [name:AdobeHeitiStd-Regular]
+ \definefontsynonym [ZhSansItalic] [name:AdobeKaitiStd-Regular]
+ \definefontsynonym [ZhSansBoldItalic] [name:AdobeHeitiStd-Regular]
+\stoptypescript
+
+\starttypescript [mono] [myzhfont]
+ \definefontsynonym [Mono] [ZhMono]
+ \definefontsynonym [MonoBold] [ZhMonoBold]
+ \definefontsynonym [MonoItalic] [ZhMonoItalic]
+ \definefontsynonym [MonoBoldItalic] [ZhMonoBoldItalic]
+\stoptypescript
+
+\starttypescript [mono] [myzhfont]
+ \definefontsynonym [ZhMono] [name:AdobeFangsongStd-Regular]
+ \definefontsynonym [ZhMonoBold] [name:AdobeHeitiStd-Regular]
+ \definefontsynonym [ZhMonoItalic] [name:AdobeFangsongStd-Regular]
+ \definefontsynonym [ZhMonoBoldItalic] [name:AdobeHeitiStd-Regular]
+\stoptypescript
+
+
+\starttypescript[myzhfont]
+ \definetypeface [myzhfont] [rm] [serif] [myzhfont] [default]
+ \definetypeface [myzhfont] [ss] [sans] [myzhfont] [default]
+ \definetypeface [myzhfont] [tt] [mono] [myzhfont] [default]
+\stoptypescript
+
+\usetypescript[myzhfont]
+
+%D We set all the \type{zhxxxfont} used in \type{zhspacing.sty}.
+
+\zhspacing
+\def\zhongwen{\pushcurrentfont\myzhfont\popcurrentfont}
+\def\zhfont{\zhongwen}
+\def\zhpunctfont{\zhongwen}
+\def\zhcjkextafont{\zhongwen}
+\def\zhcjkextbfont{\zhongwen}
+
+
+\protect \ No newline at end of file
diff --git a/Master/texmf-dist/doc/xetex/zhspacing/zhs-man.pdf b/Master/texmf-dist/doc/xetex/zhspacing/zhs-man.pdf
index 30a336d2ddc..e2539e11888 100644
--- a/Master/texmf-dist/doc/xetex/zhspacing/zhs-man.pdf
+++ b/Master/texmf-dist/doc/xetex/zhspacing/zhs-man.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xetex/zhspacing/zhs-man.tex b/Master/texmf-dist/doc/xetex/zhspacing/zhs-man.tex
index 6959a38d641..e4d16a710e6 100644
--- a/Master/texmf-dist/doc/xetex/zhspacing/zhs-man.tex
+++ b/Master/texmf-dist/doc/xetex/zhspacing/zhs-man.tex
@@ -4,7 +4,10 @@
%\usepackage[margin=1.5in]{geometry}
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
-\usepackage[no-sscript]{xltxtra}
+\usepackage{hologo}
+\def\eTeX{\hologo{eTeX}}
+\def\XeTeX{\hologo{XeTeX}}
+\def\XeLaTeX{\hologo{XeLaTeX}}
\usepackage{zhspacing}
\usepackage[fakebold]{zhfont}
\usepackage[noactive]{zhmath}
@@ -29,7 +32,7 @@
manual\thanks{Revision: \zhspacingrevision.}}
\author{\textsc{Yin} Dian\footnote{Lab.\ of Network Comm. System \&
Control, Univ.\ of Sci.\ \& Tech.\ of China.}}
-\date{2012/03/14}
+\date{2016/02/10}
\maketitle
\tableofcontents
\newpage
@@ -56,7 +59,7 @@ using \XeTeX, the package |zhspacing| is coded, utilizing the new primitive of
\section{Getting Started}
|zhspacing| can be used in both plain \XeTeX\ or \XeLaTeX. The usage is quite
-straightforward. For instance, in plain \XeTeX,
+straightforward. For instance, in plain \XeTeX,
{\emptyskipscheme
\begin{verbatim}
\input zhspacing.sty
@@ -90,11 +93,11 @@ well as math formulas. In fact, all of the following inputs can produce mixed
langauge output with skip automatically inserted between Chinese and English
characters,
\begin{center}
-\emptyskipscheme |中Eng文|,\quad |中 Eng文|,\quad |中Eng 文|\quad and\quad |中 Eng 文|.
+\emptyskipscheme |中Eng文|,\quad |中 Eng文|,\quad |中Eng 文|\quad and\quad |中 Eng 文|.
\end{center}
And their corresponding output is,
\begin{center}
-中Eng文,\quad 中 Eng文,\quad 中Eng 文\quad and\quad 中 Eng 文.
+中Eng文,\quad 中 Eng文,\quad 中Eng 文\quad and\quad 中 Eng 文.
\end{center}
Look close and you'll find, that the first and second input generates exactly
@@ -200,7 +203,7 @@ link}}.}% or Fig.~\ref{fig:kieu}.}
\subsection{More on Fonts}
Sometimes it may be desirable to use different Chinese fonts for different
\NFSS\ font families in \LaTeX. This can be done by changing the definition of
-\cs{zhs@savefont} and \cs{zhfont}, without modifying the |zhspacing| source.
+\cs{zhs@savefont} and \cs{zhfont}, without modifying the |zhspacing| source.
Here is the way to do it.\footnote{See zhfont.sty later for convenient ways.}
\begin{verbatim}
@@ -287,7 +290,7 @@ All of the skip commands above are defined in the pattern \\
\vadjust{}\hfil |\def\skipxxx{\hskip xxxxx}|.
|zhspacing| comes with three pre-defined skip schemes, namely
-\cs{simsunskipscheme}, \cs{emptyskipscheme} and \cs{haltskipscheme}. The
+\cs{simsunskipscheme}, \cs{emptyskipscheme} and \cs{haltskipscheme}. The
first scheme should be suitable for font \fntname{SimSun} and other popular
Chinese fonts used in China, which does not support OpenType features of
|halt|, and needs negative spaces be inserted before opening punctuations and
@@ -300,7 +303,8 @@ customization, of course.
Vertical Chinese can be achieved by adding raw feature |vertical| to the
specified font. An example could be, \hfil
\setbox0=\hbox to 0pt{\vbox{\noindent
-\newfontfamily\zhfont[RawFeature={script=hani:language=CHN:vertical:+vert},
+\newfontlanguage{Chinese}{CHN}
+\newfontfamily\zhfont[Script=CJK,Language=Chinese,Vertical=RotatedGlyphs,
BoldFont=SimHei]{SimSun}
\let\zhpunctfont\zhfont
\haltskipscheme
@@ -312,12 +316,14 @@ specified font. An example could be, \hfil
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{zhspacing}
- \zhspacing
- \begin{document}
+ \newfontlanguage{Chinese}{CHN}
\newfontfamily\zhfont[
- RawFeature={script=hani:language=CHN:vertical:+vert}]{SimSun}
+ Script=CJK, Language=Chinese,
+ Vertical=RotatedGlyphs]{SimSun}
\let\zhpunctfont\zhfont
\haltskipscheme
+ \zhspacing
+ \begin{document}
\rotatebox{-90}{我是中国人,我爱自己的祖国。}
\end{document}
\end{verbatim}
@@ -331,7 +337,7 @@ punctuations using some fonts such as \fntname{KaiTi\_GB2312} etc. I've told
this bug to \name{jjgod} in May, but it seems that he hasn't solved the problem
yet. Moreover, the baseline of vertical Chinese is not correct, so mixed
typesetting of Chinese and English in vertical mode generates ugly results, and
-thus should be avoided.
+thus should be avoided.
\subsection{Compatibility}
Theoretically, |zhspacing| should be compatible with all macro packages, except
those who change the definition of \cs{hskip} and \cs{penalty}, in which case
@@ -391,7 +397,8 @@ You can get latest stable version of |zhspacing| on CTAN.
|zhspacing| was hosted on an open-source project at googlecode. The old project
homepage is \url{http://code.google.com/p/zhspacing/}.
-Now |zhspacing| is part of |ctex-kit| project (\url{http://code.google.com/p/ctex-kit/}). You can get the lastest source via SVN.
+Now |zhspacing| is part of |ctex-kit| project (\url{https://github.com/CTeX-org/ctex-kit/}).
+You can get the lastest source via Git.
\goodbreak
\part{zhfont.sty}
@@ -415,13 +422,13 @@ You can redefine them to customize your fonts.
Simply macro to set \cs{zh\{rm/sf/tt\}font} using \cs{newfontfamily}.
\mymacro\newfontfamilywithslant
-Create a font family with fake slant. Take one argument as the font name.
+Create a font family with fake slant. Take one argument as the font name.
Example: |\newfontfamilywithslant\zhrmfont{SimSun}|
\mymacro\newfontfamilywithslantandbold
Create a font family with fake slant, and specify another font for its
-boldface. Take two arguments as the font name and bold font name.
+boldface. Take two arguments as the font name and bold font name.
Example:\\\quad |\newfontfamilywithslantandbold\zhrmfont{SimSun}{SimHei}|
\section{Examples}
diff --git a/Master/texmf-dist/doc/xetex/zhspacing/test/zhspacing-context-test.tex b/Master/texmf-dist/doc/xetex/zhspacing/zhspacing-context-test.tex
index 1f6c528d25c..1f6c528d25c 100644
--- a/Master/texmf-dist/doc/xetex/zhspacing/test/zhspacing-context-test.tex
+++ b/Master/texmf-dist/doc/xetex/zhspacing/zhspacing-context-test.tex