作者mathfeel (mathfeel)
看板LaTeX
标题Re: [问题] 可以用otf字体吗?
时间Sun Apr 1 12:43:08 2007
\documentclass{article}
\usepackage{fontspec}
\usepackage{xltxtra}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
\setmainfont[BoldFont={cwTeXHeiBold},
ItalicFont={cwTeXFangSong},
Mapping=tex-text]{cwTeXMing}
\begin{document}
\section*{将进酒}
君不见 黄河之水天上来 奔流到海不复回\\
君不见 高堂明镜悲白发 朝如青丝暮成雪
\end{codument}
结果一样:
$ xelatex sample-utf8.tex
This is XeTeX, Version 3.141592-2.2-0.995 (Web2C 7.5.5)
entering extended mode
(./sample-utf8.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman,
b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto,
e
stonian, finnish, greek, icelandic, irish, italian, latin, norsk, polish,
portu
ges, romanian, slovak, slovene, spanish, swedish, turkish, ukrainian,
nohyphena
tion, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size12.clo))
(/usr/share/texmf/tex/xelatex/fontspec/fontspec.sty
(/usr/share/texmf/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texmf/tex/latex/tools/calc.sty)
(/usr/share/texmf/tex/xelatex/xkeyval/xkeyval.sty
(/usr/share/texmf/tex/xelatex/xkeyval/xkeyval.tex
(/usr/share/texmf/tex/xelatex/xkeyval/keyval.tex)))
fontspec.cfg loaded.
(/usr/share/texmf/tex/xelatex/fontspec/fontspec.cfg))
(/usr/share/texmf/tex/xelatex/xltxtra.sty
(/usr/share/texmf/tex/latex/graphics/graphicx.sty
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/share/texmf/tex/xelatex/graphics/graphics.cfg)
(/usr/share/texmf/tex/xelatex/graphics/xetex.def)))
(/usr/share/texmf/tex/xelatex/xunicode.sty)
(/usr/share/texmf/tex/latex/etex/etex.sty)
(/usr/share/texmf/tex/latex/base/fixltx2e.sty)
LaTeX Warning: You have requested, on input line 100, version
`2006/03/24' of package fixltx2e,
but only version
`2004/02/13 v1.1h fixes to LaTeX'
is available.
) (./sample-utf8.aux) [1] (./sample-utf8.aux) )
stdin -> sample-utf8.pdf
[1
** NOTICE: This document contains a `Preview & Print only' licensed font **
Output written on sample-utf8.pdf (1 page).
Transcript written on sample-utf8.log.
出来的pdf档还是0 byte.
我把里面所有中文改成英文,结果一样。
--
pub 2048R/9CB5B35A 2/20/2006 Matthew Zhang (gmail key) <
[email protected]>
Primary key fingerprint: 9607 7903 1D12 F060 AD76 3705 5CE2 0A3E 9CB5 B35A
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 71.136.56.177