-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchapter.tex.texlive.xml
277 lines (253 loc) · 12 KB
/
chapter.tex.texlive.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<section id="texlive">
<title>texlive - TeX Live: A decent selection of the TeX Live packages</title>
<screen>
sudo apt-get install texlive
</screen>
<section id="xetex">
<title>安装 XeTeX</title>
<para>http://zh.wikipedia.org/wiki/XeTeX</para>
<para>xeTex是与tex平级的,都是排版引擎,而xeLatex和Latex刚分别基于两者的宏包。不同的是xeTex支持Unicode, 可以直接支持中文。</para>
<para>XeLaTeX是使用LaTeX的排版引擎</para>
<section id="xetex.install">
<title>install usage apt-get</title>
<para>http://scripts.sil.org/xetex</para>
<screen>
$ sudo apt-get install texlive-xetex lmodern
$ sudo apt-get install texlive-latex-extra texlive-latex-recommended
</screen>
</section>
</section>
<section id="xelatex">
<title>XeLaTeX</title>
<para>安装XeTeX后现在我们尝试创建一个PDF文档</para>
<para>演示怎么创建文档</para>
<programlisting>
\documentclass[12pt,a4paper]{article}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{WenQuanYi Micro Hei}
\begin{document}
\XeTeX 可以使用系统自带的字体,而不需要再另外生成。
\end{document}
</programlisting>
<para>xelatex a.tex</para>
</section>
<section id="fonts">
<title>安装字体</title>
<para>查看已经安装的字体</para>
<screen>
$ fc-list :lang=zh
/usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf: Droid Sans Fallback:style=Regular
</screen>
<para>安装字体,将字体复制到/usr/share/fonts目录中,然后运行下面的命令。</para>
<screen>
$ sudo mkdir /usr/share/fonts/windows
$ sudo cp /media/Windows/Fonts/{SIM,sim}* /usr/share/fonts/windows/
</screen>
<para>安装免费字体</para>
<screen>
$ sudo apt-get install xfonts-wqy ttf-wqy-microhei ttf-wqy-zenhei
</screen>
<para>更新字体</para>
<screen>
$ sudo mkfontscale
$ sudo mkfontdir
$ sudo fc-cache -fv
</screen>
<para>查看字体</para>
<screen>
$ fc-list :lang=zh
/usr/share/fonts/windows/msyh.ttf: Microsoft YaHei,微软雅黑:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/windows/FZYTK.TTF: FZYaoTi,方正姚体:style=Regular
/usr/share/fonts/windows/STXIHEI.TTF: STXihei,华文细黑:style=Regular
/usr/share/fonts/windows/simhei.ttf: SimHei,黑体:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/truetype/wqy/wqy-microhei.ttc: WenQuanYi Micro Hei,文泉驛微米黑,文泉驿微米黑:style=Regular
/usr/share/fonts/windows/simsun.ttc: NSimSun,新宋体:style=Regular
/usr/share/fonts/windows/simsun.ttc: SimSun,宋体:style=Regular
/usr/share/fonts/X11/misc/wenquanyi_10ptb.pcf: WenQuanYi Bitmap Song:style=Bold
/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc: WenQuanYi Zen Hei,文泉驛正黑,文泉驿正黑:style=Regular
/usr/share/fonts/X11/misc/wenquanyi_12pt.pcf: WenQuanYi Bitmap Song:style=Regular
/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc: WenQuanYi Zen Hei Sharp,文泉驛點陣正黑,文泉驿点阵正黑:style=Regular
/usr/share/fonts/windows/STXINWEI.TTF: STXinwei,华文新魏:style=Regular
/usr/share/fonts/X11/misc/wenquanyi_10pt.pcf: WenQuanYi Bitmap Song:style=Regular
/usr/share/fonts/windows/simkai.ttf: KaiTi,楷体:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/X11/misc/wenquanyi_9pt.pcf: WenQuanYi Bitmap Song:style=Regular
/usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf: Droid Sans Fallback:style=Regular
/usr/share/fonts/X11/misc/wenquanyi_11pt.pcf: WenQuanYi Bitmap Song:style=Regular
/usr/share/fonts/windows/mingliu.ttc: PMingLiU,新細明體:style=Regular
/usr/share/fonts/windows/simfang.ttf: FangSong,仿宋:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/windows/STFANGSO.TTF: STFangsong,华文仿宋:style=Regular
/usr/share/fonts/windows/msjh.ttf: Microsoft JhengHei,微軟正黑體:style=Normal,Regular,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/X11/misc/wenquanyi_9ptb.pcf: WenQuanYi Bitmap Song:style=Bold
/usr/share/fonts/windows/STLITI.TTF: STLiti,华文隶书:style=Regular
/usr/share/fonts/windows/msjhbd.ttf: Microsoft JhengHei,微軟正黑體:style=Negreta,Bold,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia
/usr/share/fonts/windows/STZHONGS.TTF: STZhongsong,华文中宋:style=Regular
/usr/share/fonts/windows/msyhbd.ttf: Microsoft YaHei,微软雅黑:style=Bold,Negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia
/usr/share/fonts/X11/misc/wenquanyi_11ptb.pcf: WenQuanYi Bitmap Song:style=Bold
/usr/share/fonts/windows/FZSTK.TTF: FZShuTi,方正舒体:style=Regular
/usr/share/fonts/windows/STSONG.TTF: STSong,华文宋体:style=Regular
/usr/share/fonts/windows/STXINGKA.TTF: STXingkai,华文行楷:style=Regular
/usr/share/fonts/windows/STHUPO.TTF: STHupo,华文琥珀:style=Regular
/usr/share/fonts/windows/SIMLI.TTF: LiSu,隶书:style=Regular
/usr/share/fonts/windows/kaiu.ttf: DFKai\-SB,標楷體:style=Regular
/usr/share/fonts/windows/ARIALUNI.TTF: Arial Unicode MS:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc: WenQuanYi Zen Hei Mono,文泉驛等寬正黑,文泉驿等宽正黑:style=Regular
/usr/share/fonts/windows/SIMYOU.TTF: YouYuan,幼圆:style=Regular
/usr/share/fonts/truetype/wqy/wqy-microhei.ttc: WenQuanYi Micro Hei Mono,文泉驛等寬微米黑,文泉驿等宽微米黑:style=Regular
/usr/share/fonts/windows/mingliu.ttc: MingLiU_HKSCS,細明體_HKSCS:style=Regular
/usr/share/fonts/windows/STCAIYUN.TTF: STCaiyun,华文彩云:style=Regular
/usr/share/fonts/windows/mingliu.ttc: MingLiU,細明體:style=Regular
/usr/share/fonts/windows/STKAITI.TTF: STKaiti,华文楷体:style=Regular
/usr/share/fonts/X11/misc/wenquanyi_12ptb.pcf: WenQuanYi Bitmap Song:style=Bold
</screen>
<para>测试Unicode文件 xetex.tex</para>
<programlisting>
%!Tex Program = xelatex
\documentclass[a4paper]{article}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{WenQuanYi Micro Hei}
\begin{document}\pagestyle{empty}
\section{Unicode support}
\subsection{English}
All human beings are born free and equal in dignity and rights.
\subsection{Íslenska}
Hver maður er borinn frjáls og jafn öðrum að virðingu og réttindum.
\subsection{Русский}
Все люди рождаются свободными
и равными в своем достоинстве и
правах.
\subsection{Tiếng Việt}
Tất cả mọi người sinh ra đều được tự do và bình đẳng về nhân phẩm và
quyền lợi.
\subsection{简体中文}
每个人生来平等,享有相同的地位和权利。
\subsection{繁體中文}
每個人生來平等,享有相同的地位和權利。
\subsection{日本語}
すべての人間は自由であり、かつ、尊厳と権利とについて平等である。
\section{Legacy syntax}
When he goes---``Hello World!''\\
She replies—“Hello dear!”
\section{Ligatures}
\fontspec[Ligatures={Common, Historical}]{Linux Libertine O Italic}
\fontsize{12pt}{18pt}\selectfont Questo è strano assai!
\section{Numerals}
\fontspec[Numbers={OldStyle}]{Linux Libertine O}Old style: 1234567\\
\fontspec[Numbers={Lining}]{Linux Libertine O}Lining: 1234567
\end{document}
</programlisting>
<para>测试字体</para>
<programlisting>
<![CDATA[
\documentclass[12pt,a4paper]{article}
\usepackage{fontspec,xunicode,xltxtra}
\usepackage{titlesec}
\usepackage[top=1in,bottom=1in,left=1.25in,right=1.25in]{geometry}
\titleformat{\section}{\Large\xbsong}{\thesection}{1em}{}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
\newfontfamily\song{Simsun (Founder Extended)}
\newfontfamily\bwei{FZBeiWeiKaiShu-S19S}
\newfontfamily\zbhei{FZZhanBiHei-M22T}
\newfontfamily\xzt{FZXiaoZhuanTi-S13T}
\newfontfamily\xbsong{FZXiaoBiaoSong-B05}
\newfontfamily\dbsong{FZDaBiaoSong-B06}
\newfontfamily\gulif{FZGuLi-S12T}
\newfontfamily\gulij{FZGuLi-S12S}
\newfontfamily\kai{FZKai-Z03}
\newfontfamily\hei{FZHei-B01}
\newfontfamily\whei{WenQuanYi Zen Hei}
\newfontfamily\fsong{FZFangSong-Z02}
\newfontfamily\lanting{FZLanTingSong}
\newfontfamily\boya{FZBoYaSong}
\newfontfamily\lishu{FZLiShu-S01}
\newfontfamily\lishuII{FZLiShu II-S06}
\newfontfamily\yao{FZYaoTi-M06}
\newfontfamily\zyuan{FZZhunYuan-M02}
\newfontfamily\xhei{FZXiHei I-Z08}
\newfontfamily\xkai{FZXingKai-S04}
\newfontfamily\ssong{FZShuSong-Z01}
\newfontfamily\bsong{FZBaoSong-Z04}
\newfontfamily\nbsong{FZNew BaoSong-Z12}
\newfontfamily\caiyun{FZCaiYun-M09}
\newfontfamily\hanj{FZHanJian-R-GB}
\newfontfamily\songI{FZSongYi-Z13}
\newfontfamily\hcao{FZHuangCao-S09}
\newfontfamily\wbei{FZWeiBei-S03}
\newfontfamily\huali{FZHuaLi-M14}
\setmainfont{FZLanTingSong}
\renewcommand{\baselinestretch}{1.25}
\begin{document}
\title{\whei XeTeX使用小结}
\author{\fsong 何勃亮}
\date{\kai2009年6月21日}
\maketitle
\section{简介}
以前使用CJK进行中文的排版,需要自己生成字体库,近日,出现了XeTeX,可以比较好的解决中文字体问题,不需要额外
生成LaTeX字体库,直接使用计算机系统里的字体。
\section{字体列表}
本文使用了大量本机自带的字体。
\begin{table}[htbp]
\caption{字体列表}
\centering
\begin{tabular}{|l|c|r|}
\hline
\hei 字体 & \hei 命令 & \hei 字体效果 \\
\hline
\kai 宋体 & \verb+\song+ & \song 宋体 \\
\kai 楷体 & \verb+\kai+ & \kai 楷体 \\
\kai 黑体 & \verb+\hei+ & \hei 黑体 \\
\kai 仿宋体 & \verb+\fsong+ & \fsong 仿宋体 \\
\kai 文泉驿黑体 & \verb+\whei+ & \whei 文泉驿黑体 \\
\kai 书宋体 & \verb+\ssong+ & \ssong 书宋体 \\
\kai 报宋体 & \verb+\bsong+ & \bsong 报宋体 \\
\kai 新报宋体 & \verb+\nbsong+ & \nbsong 新报宋体 \\
\kai 兰亭宋体 & \verb+\lanting+ & \lanting 兰亭宋体 \\
\kai 博雅宋体 & \verb+\boya+ & \boya 博雅宋体 \\
\kai 宋体一 & \verb+\songI+ & \songI 宋体一 \\
\kai 隶书 & \verb+\lishu+ & \lishu 隶书 \\
\kai 隶书二 & \verb+\lishuII+ & \lishuII 隶书二 \\
\kai 古隶简体 & \verb+\gulij+ & \gulij 古隶简体 \\
\kai 古隶繁体 & \verb+\gulif+ & \gulif 古隶繁体 \\
\kai 华隶书 & \verb+\huali+ & \huali 华隶书 \\
\kai 小标宋 & \verb+\xbsong+ & \xbsong 小标宋 \\
\kai 大标宋 & \verb+\dbsong+ & \dbsong 大标宋 \\
\kai 小篆体 & \verb+\xzt+ & \xzt 小篆体 \\
\kai 姚体 & \verb+\yao+ & \yao 姚体 \\
\kai 准圆 & \verb+\zyuan+ & \zyuan 准圆 \\
\kai 细黑一 & \verb+\xhei+ & \xhei 细黑一 \\
\kai 行楷书 & \verb+\xkai+ & \xkai 行楷书 \\
\kai 彩云体 & \verb+\caiyun+ & \caiyun 彩云体 \\
\kai 汉简书 & \verb+\hanj+ & \hanj 汉简书 \\
\kai 魏碑体 & \verb+\wbei+ & \wbei 魏碑体 \\
\hline
\end{tabular}
\end{table}
\end{document}
]]>
</programlisting>
<para>xelatex xetex.tex</para>
</section>
<section id="luatex">
<title>LuaTeX</title>
<para>http://www.luatex.org/</para>
<screen>
<![CDATA[
sudo apt-get install texlive-luatex
]]>
</screen>
</section>
<section>
<title>FAQ</title>
<section>
<title>! LaTeX Error: File `fontspec.sty' not found.</title>
<screen>
$ texdoc fontsepc
Sorry, no documentation found for fontsepc.
If you are unsure about the name, try searching CTAN's TeX catalogue at
http://ctan.org/search.html#byDescription.
</screen>
</section>
</section>
</section>