summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-12-01 22:47:43 +0000
committerKarl Berry <karl@freefriends.org>2018-12-01 22:47:43 +0000
commitd2e8f53cdae6de5f7ae5dca67ef39847fd96d88d (patch)
treeca6085c7514613daf47360be16fd580f01aedff4 /Master
parent33a1fed6bf16c61516dd7ef7ecc7598f30ccd689 (diff)
zhlineskip (1dec18)
git-svn-id: svn://tug.org/texlive/trunk@49296 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/zhlineskip/CJKmetrics.pdfbin5004 -> 5043 bytes
-rw-r--r--Master/texmf-dist/doc/latex/zhlineskip/Latinmetrics.pdfbin7513 -> 7522 bytes
-rw-r--r--Master/texmf-dist/doc/latex/zhlineskip/README.md8
-rw-r--r--Master/texmf-dist/doc/latex/zhlineskip/zhlineskip-man.pdfbin225273 -> 213958 bytes
-rw-r--r--Master/texmf-dist/doc/latex/zhlineskip/zhlineskip-man.tex226
-rw-r--r--Master/texmf-dist/tex/latex/zhlineskip/zhlineskip.sty10
6 files changed, 132 insertions, 112 deletions
diff --git a/Master/texmf-dist/doc/latex/zhlineskip/CJKmetrics.pdf b/Master/texmf-dist/doc/latex/zhlineskip/CJKmetrics.pdf
index d7205eeeef7..7b0d83b7851 100644
--- a/Master/texmf-dist/doc/latex/zhlineskip/CJKmetrics.pdf
+++ b/Master/texmf-dist/doc/latex/zhlineskip/CJKmetrics.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/zhlineskip/Latinmetrics.pdf b/Master/texmf-dist/doc/latex/zhlineskip/Latinmetrics.pdf
index 06a0f27da35..afe910542ed 100644
--- a/Master/texmf-dist/doc/latex/zhlineskip/Latinmetrics.pdf
+++ b/Master/texmf-dist/doc/latex/zhlineskip/Latinmetrics.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/zhlineskip/README.md b/Master/texmf-dist/doc/latex/zhlineskip/README.md
index cd3ddfd4959..af89b6f66ea 100644
--- a/Master/texmf-dist/doc/latex/zhlineskip/README.md
+++ b/Master/texmf-dist/doc/latex/zhlineskip/README.md
@@ -1,4 +1,4 @@
-zhlineskip
+zhlineskip
==========
`zhlineskip` is a package for typesetting CJK documents. This package allows users
@@ -28,11 +28,11 @@ Copyright and Licence
Copyright (C) 2018 by Ruixi Zhang <ruixizhang42@gmail.com>
This work may be distributed and/or modified under the
- conditions of the LaTeX Project Public License, either version 1.3
+ conditions of the LaTeX Project Public License, either version 1.3c
of this license or (at your option) any later version.
The latest version of this license is in
- http://www.latex-project.org/lppl.txt
- and version 1.3 or later is part of all distributions of LaTeX
+ https://www.latex-project.org/lppl.txt
+ and version 1.3c or later is part of all distributions of LaTeX
version 2005/12/01 or later.
This work has the LPPL maintenance status `maintained'.
diff --git a/Master/texmf-dist/doc/latex/zhlineskip/zhlineskip-man.pdf b/Master/texmf-dist/doc/latex/zhlineskip/zhlineskip-man.pdf
index 19a5b927b99..cafc5c4a075 100644
--- a/Master/texmf-dist/doc/latex/zhlineskip/zhlineskip-man.pdf
+++ b/Master/texmf-dist/doc/latex/zhlineskip/zhlineskip-man.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/zhlineskip/zhlineskip-man.tex b/Master/texmf-dist/doc/latex/zhlineskip/zhlineskip-man.tex
index c31d1f1305a..07ac6e8a00d 100644
--- a/Master/texmf-dist/doc/latex/zhlineskip/zhlineskip-man.tex
+++ b/Master/texmf-dist/doc/latex/zhlineskip/zhlineskip-man.tex
@@ -1,16 +1,20 @@
% !TeX program = XeLaTeX
+% !TeX encoding = UTF-8 Unicode
%
% 为了得到最佳的排版结果,可以考虑安装免费的思源宋体、思源黑体与 Fandol 字库
-% 思源字库可以前往 https://www.google.com/get/noto/help/cjk/ 下载
-% 请安装 Language-specific OpenType/CFF (OTF) 的简体中文 SC 版本
-% Fandol 字库可以通过发行版 TeX Live 或 MiKTeX 安装
-% 如果已经安装了思源、Fandol 字库,请在导言区取消注释 9 处代码
+% - 思源字库可以前往
+% https://github.com/adobe-fonts/source-han-serif/tree/release
+% https://github.com/adobe-fonts/source-han-sans/tree/release
+% 下载,请安装 Language-specific OTFs 的简体中文版本
+% - Fandol 字库可以通过发行版 TeX Live 或 MiKTeX 安装
%
-\documentclass[
- zihao=5,
-% 如果已经安装了思源、Fandol 字库,请取消注释下面一行代码
-% fontset=none,
- no-math,a4paper]{ctexart}
+% 如果已经安装了思源、Fandol 字库,请在导言区启用 \SourceHanSCandFandoltrue
+%
+\documentclass[zihao=5,no-math,a4paper]{ctexart}
+\newif\ifSourceHanSCandFandol
+\SourceHanSCandFandolfalse
+% 如果已经安装了思源、Fandol 字库,请启用 \SourceHanSCandFandoltrue
+%\SourceHanSCandFandoltrue
\frenchspacing
\ctexset{
section={
@@ -28,83 +32,90 @@
}%
}
\usepackage{mathtools}
-\setmainfont{TeX Gyre Pagella}[
-% 如果已经安装了思源、Fandol 字库,请取消注释下面两行代码
-% Scale=1.0534682080924855,
-% WordSpace={0.8984910836762689,1.2030178326474623,0.6954732510288066},
- SmallCapsFeatures={LetterSpace=5}
-]
-\setsansfont{TeX Gyre Heros}[
-% 如果已经安装了思源、Fandol 字库,请取消注释下面两行代码
-% Scale=1.0054869684499314,
-% WordSpace={0.7887463562574224,1.4225072874851551,0.3662390687722673}
-]
-% 如果已经安装了思源、Fandol 字库,请取消注释下面设置西文等宽字体的四行代码
-%\setmonofont{Noto Sans Mono CJK SC}[
-% BoldFont=Noto Sans Mono CJK SC Bold,
-% CharacterWidth=Half
-%]
\usepackage[math-style=ISO]{unicode-math}
-\setmathfont{TeX Gyre Pagella Math}[
-% 如果已经安装了思源、Fandol 字库,请取消注释下面一行代码
-% Scale=1.0534682080924855
-]
-% 如果已经安装了思源、Fandol 字库,请取消注释下面设置中文字体的 35 行代码
-%\setCJKmainfont{Noto Serif CJK SC}[
-% SizeFeatures={
-% {Size=-9,Font=Noto Serif CJK SC Medium},
-% {Size=9-}},
-% ItalicFont=FandolKai-Regular,
-% ItalicFeatures={FakeBold=1},
-% BoldFont=Noto Serif CJK SC Bold,
-% BoldItalicFont=FandolKai-Regular,
-% BoldItalicFeatures={FakeBold=3},
-% CharacterWidth=Full
-%]
-%\usepackage{etoolbox}
-%\makeatletter
-%\newcommand*\original@CJKsymbol{}
-%\newcommand*\original@CJKpunctsymbol{}
-%\let\original@CJKsymbol\CJKsymbol
-%\let\original@CJKpunctsymbol\CJKpunctsymbol
-%\newcommand*\raise@Fandol@CJK[1]{\raise0.08\ccwd\hbox{#1}}
-%\appto\itshape{%
-% \let\CJKsymbol\raise@Fandol@CJK
-% \let\CJKpunctsymbol\raise@Fandol@CJK
-%}
-%\appto\upshape{%
-% \let\CJKsymbol\original@CJKsymbol
-% \let\CJKpunctsymbol\original@CJKpunctsymbol
-%}
-%\makeatother
-%\setCJKsansfont{Noto Sans CJK SC}[
-% BoldFont=Noto Sans CJK SC Bold,
-% CharacterWidth=Full
-%]
-%\setCJKmonofont{Noto Sans Mono CJK SC}[
-% BoldFont=Noto Sans Mono CJK SC Bold,
-% CharacterWidth=Full
-%]
+\ifSourceHanSCandFandol
+ \setmainfont{TeX Gyre Pagella}[
+ Scale=1.0534682080924855,
+ WordSpace={0.8984910836762689,1.2030178326474623,0.6954732510288066},
+ SmallCapsFeatures={LetterSpace=5}
+ ]
+ \setsansfont{TeX Gyre Heros}[
+ Scale=1.0068587105624143,
+ WordSpace={0.7863093721208319,1.4273812557583361,0.3589281163624958}
+ ]
+ \setmonofont{Source Han Sans SC}[
+ BoldFont=Source Han Sans SC Bold,
+ CharacterWidth=Half
+ ]
+ \setmathfont{TeX Gyre Pagella Math}[
+ Scale=1.0534682080924855
+ ]
+ \setCJKmainfont{Source Han Serif SC Medium}[
+ ItalicFont=FandolKai-Regular,
+ ItalicFeatures={FakeBold=1},
+ BoldFont=Source Han Serif SC Bold,
+ BoldItalicFont=FandolKai-Regular,
+ BoldItalicFeatures={FakeBold=3},
+ CharacterWidth=Full
+ ]
+ \usepackage{etoolbox}
+ \makeatletter
+ \newcommand*\original@CJKsymbol{}
+ \newcommand*\original@CJKpunctsymbol{}
+ \let\original@CJKsymbol\CJKsymbol
+ \let\original@CJKpunctsymbol\CJKpunctsymbol
+ \newcommand*\raise@Fandol@CJK[1]{\raise0.08\ccwd\hbox{#1}}
+ \appto\itshape{%
+ \let\CJKsymbol\raise@Fandol@CJK
+ \let\CJKpunctsymbol\raise@Fandol@CJK
+ }
+ \appto\upshape{%
+ \let\CJKsymbol\original@CJKsymbol
+ \let\CJKpunctsymbol\original@CJKpunctsymbol
+ }
+ \makeatother
+ \setCJKsansfont{Source Han Sans SC}[
+ BoldFont=Source Han Sans SC Bold,
+ CharacterWidth=Full
+ ]
+ \setCJKmonofont{Source Han Sans SC}[
+ BoldFont=Source Han Sans SC Bold,
+ CharacterWidth=Full
+ ]
+\else
+ \setmainfont{TeX Gyre Pagella}[
+ SmallCapsFeatures={LetterSpace=5}
+ ]
+ \setsansfont{TeX Gyre Heros}
+ \setmathfont{TeX Gyre Pagella Math}
+\fi
\usepackage{zhlineskip}
\SetTextEnvironmentSinglespace{1.05}
\SetMathEnvironmentSinglespace{1.05}
-% 如果已经安装了思源、Fandol 字库,请取消注释下面两行代码
-%\SetTextEnvironmentSinglespace{1.106}
-%\SetMathEnvironmentSinglespace{1.106}
+\ifSourceHanSCandFandol
+ \SetTextEnvironmentSinglespace{1.106}
+ \SetMathEnvironmentSinglespace{1.106}
+\fi
\usepackage{caption}
-\DeclareCaptionLabelSeparator{zhcolon}{~:}
+\DeclareCaptionLabelSeparator{zhcolon}{~:}% U+FF1A, Fullwidth Colon
\captionsetup{labelsep=zhcolon,format=hang}
\usepackage{enumitem}
\setlist{
listparindent=\parindent,parsep=\parskip
}
-\setlist[itemize,1]{
- itemsep=0pt,
- label=·,
-% 如果已经安装了思源、Fandol 字库,请取消注释下面一行代码
-% label=・,
- leftmargin=\parindent,labelsep=0pt,labelwidth=0.5\parindent
-}
+\ifSourceHanSCandFandol
+ \setlist[itemize,1]{
+ itemsep=0pt,
+ label=・,% U+30FB, Katakana Middle Dot
+ leftmargin=\parindent,labelsep=0pt,labelwidth=0.5\parindent
+ }
+\else
+ \setlist[itemize,1]{
+ itemsep=0pt,
+ label=·,% U+00B7, Middle Dot
+ leftmargin=\parindent,labelsep=0pt,labelwidth=0.5\parindent
+ }
+\fi
\setlist[description,1]{
font=\mdseries,
leftmargin=\parindent,labelsep=0.5\parindent
@@ -122,21 +133,21 @@
\usepackage[width=378bp]{geometry}
\makeatletter
-% 如果已经安装了思源、Fandol 字库,请取消注释下面从 \ExplSyntaxOn
-% 到 \ExplSyntaxOff 之间的 11 行代码
-\ExplSyntaxOn
-%\xeCJK_new_class:n { PoZheHao }
-%\__xeCJK_save_CJK_class:n { PoZheHao }
-%\xeCJK_declare_char_class:nn { PoZheHao } { "2014 }
-%\seq_map_inline:Nn \g__xeCJK_class_seq
-% {
-% \str_if_eq:nnF {#1} { PoZheHao }
-% {
-% \xeCJK_copy_inter_class_toks:nnnn { PoZheHao } {#1} { FullRight } {#1}
-% \xeCJK_copy_inter_class_toks:nnnn {#1} { PoZheHao } {#1} { FullRight }
-% }
-% }
-\ExplSyntaxOff
+\ifSourceHanSCandFandol
+ \ExplSyntaxOn
+ \xeCJK_new_class:n { PoZheHao }
+ \__xeCJK_save_CJK_class:n { PoZheHao }
+ \seq_map_inline:Nn \g__xeCJK_class_seq
+ {
+ \str_if_eq:nnF {#1} { PoZheHao }
+ {
+ \xeCJK_copy_inter_class_toks:nnnn { PoZheHao } {#1} { FullRight } {#1}
+ \xeCJK_copy_inter_class_toks:nnnn {#1} { PoZheHao } {#1} { FullRight }
+ }
+ }
+ \xeCJK_declare_char_class:nn { PoZheHao } { "2014 , "2015 }
+ \ExplSyntaxOff
+\fi
% From `doc.dtx'
\ifx\l@nohyphenation\undefined
\newlanguage\l@nohyphenation
@@ -196,9 +207,9 @@
\newcommand*\myemail{ruixizhang42@gmail.com}
\makeatother
-\title{\vspace*{-18bp}\pkg{zhlineskip} 宏包}
+\title{\vspace*{-26bp}\pkg{zhlineskip} 宏包}
\author{张瑞熹\thanks{\href{mailto:\myemail}{\nolinkurl{\myemail}}。}}
-\date{2018/10/28\hskip\ccwd\relax v1.0c}
+\date{2018/11/30\hskip\ccwd\relax v1.0d}
\begin{document}
@@ -216,9 +227,7 @@ $1.5$ 至 $1.67$ 之间),以及脚注行距相比于脚注字号的倍数。
\subsection{宏包依赖}
-本宏包是在 \CTeX\ 宏集大环境下设计出来的,目的是要分开处理中文与数学的行距。
-如果你并没用 \CTeX\ 的文档类,那么不建议使用本宏包。\pkg{zhlineskip} 依赖于
-下面这些宏包:
+本宏包是针对中日韩文的横排文档设计出来的,它依赖于下面这些宏包:
\begin{itemize}
\item \packagedependency{kvoptions}
为用户提供载入本宏包的键值选项。
@@ -336,8 +345,8 @@ a_{m1} & a_{m2} & \dotsc & a_{mn}
综上所述,在进行中西文混排时,最好能够区分中文与西文的行距。在使用 \pkg{zhlineskip}
时,就可以分开处理中文文本与数学公式的行距。用户甚至还能分别指定正文行距与脚注
-行距,实现灵活的排版。同时,\pkg{zhlineskip} 宏包能够恢复各种“多行”数学环境
-(包括矩阵、分类、多行公式推导等等)的行距,使数学行距符合西文行距的规范。
+行距,实现灵活的排版。同时,\pkg{zhlineskip} 宏包能恢复各种“多行”数学环境
+(包括矩阵、分类、多行公式推导等等)的行距,使数学公式的行距符合西文行距的规范。
最后,\pkg{zhlineskip} 宏包还支持用户在一定范围内按 Microsoft Word 的
“多倍行距”进行排版\footnote{本宏包默认假定“被要求”用的字体是中易系列字体,
@@ -355,7 +364,8 @@ Microsoft Word 排的行距相同。硬要用 \TeX\ 模仿 Microsoft Word 是没
与行距,例如字号 $12$~磅、行距 $22$~磅。对于一般的用户,指定目标行距相比字号的
倍数即可——\pkg{zhlineskip} 宏包可以自动提取基础行距(即 \TeX\ 中的单倍行距)
相比字号的倍数(详见表~\ref{tab:default-leading-ratio}),再通过用户指定的
-倍数来计算所需的行伸展因子。
+倍数来计算所需的行伸展因子。因此,不论是中日韩文还是西文的横排文档,都是可以使用
+本宏包的。本宏包的缺省设置更适合中日韩文文档。
\begin{table}[h]
\centering
\caption[基础行距倍数]{\cls{ctexart} 与 \cls{article} 各个文档类选项
@@ -561,9 +571,10 @@ Microsoft Word 排的行距相同。硬要用 \TeX\ 模仿 Microsoft Word 是没
\subsection{Microsoft Word 中的“单倍行距”}
\label{sec:MS-Word}
-Microsoft Word 中“单倍行距”的设置,其行距值相比字号的倍数严重依赖于字体。
-表~\ref{tab:word-line-height} 列出几种常用字体对应的倍数。正是因为“单倍
-行距”本身随着字体而变化,所以请尽量避免使用“多倍行距”的概念!
+Microsoft Word 中“单倍行距”的设置,其行距值相比字号的倍数严重依赖于字体,
+甚至还可能因为操作系统的不同而迥然不同。表~\ref{tab:word-line-height} 列出
+几种常见字体对应的单倍行距倍数。正是因为“单倍行距”本身随字体、操作系统而变化,
+所以请尽量避免使用“多倍行距”的概念!
\begin{table}[h]
\centering
\caption[单倍行距倍数]{在 Microsoft Word 中设置“单倍行距”后,实际的行距
@@ -576,8 +587,15 @@ Microsoft Word 中“单倍行距”的设置,其行距值相比字号的倍
\fontandsinglespaceratio{Arial}{2355/2048=1.14990234375} \\
\fontandsinglespaceratio{Times New Roman}{2355/2048=1.14990234375} \\
\fontandsinglespaceratio{中易系列字体}{\phantom0332/256\phantom0=1.296875} \\
-\fontandsinglespaceratio{思源宋体}{1869/1000=1.869} \\
-\fontandsinglespaceratio{思源黑体}{1924/1000=1.924} \\
+\fontandsinglespaceratio{华文中宋(Windows)}{1479/1000=1.479} \\
+\fontandsinglespaceratio{微软雅黑 Light(Windows)}{3400/2048=1.66015625} \\
+\fontandsinglespaceratio{微软雅黑 Regular/Bold}{3513/2048=1.71533203125} \\
+\fontandsinglespaceratio{华文中宋(macOS)}{1723/1000=1.723} \\
+\fontandsinglespaceratio{微软雅黑 Light(macOS)}{3542/2048=1.7294921875} \\
+\fontandsinglespaceratio{苹方(macOS)}{1820/1000=1.82} \\
+\fontandsinglespaceratio{思源宋体~1.001}{1869/1000=1.869} \\
+\fontandsinglespaceratio{思源黑体~2.000}{1882/1000=1.882} \\
+\fontandsinglespaceratio{思源黑体~1.004}{1924/1000=1.924} \\
\bottomrule
\end{tabular}
\end{table}
diff --git a/Master/texmf-dist/tex/latex/zhlineskip/zhlineskip.sty b/Master/texmf-dist/tex/latex/zhlineskip/zhlineskip.sty
index 3d2686eeb2d..1acb4ce4c61 100644
--- a/Master/texmf-dist/tex/latex/zhlineskip/zhlineskip.sty
+++ b/Master/texmf-dist/tex/latex/zhlineskip/zhlineskip.sty
@@ -2,11 +2,11 @@
% Copyright (C) 2018 by Ruixi Zhang <ruixizhang42@gmail.com>
%
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
@@ -23,7 +23,7 @@
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zhlineskip}[%
- 2018/10/28 v1.0c Line spacing for CJK documents]
+ 2018/11/30 v1.0d Line spacing for CJK documents]
\RequirePackage{kvoptions}
\RequirePackage{xintexpr}
@@ -191,6 +191,8 @@
\RestoreMathEnvironmentLeading{rgathered}
\else
\PackageWarningNoLine{\@currname}{%
+ mathtools is NOT loaded by zhlineskip\MessageBreak
+ Some of its features may not be available\MessageBreak
Leading in multi-line math will be stretched%
}%
\newcommand*\SetMathEnvironmentSinglespace[1]{%