看板 LaTeX 關於我們 聯絡資訊
\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) <mathfeel@gmail.com> Primary key fingerprint: 9607 7903 1D12 F060 AD76 3705 5CE2 0A3E 9CB5 B35A -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 71.136.56.177