[問題] OS下中文編譯問題

作者: s60984 (Angus)   2016-06-09 21:31:45
想請問MacTex+Texmaker後
我使用以下範例進行編譯
結果只有英文成功,但中文沒出現
請問該如何修正
感謝~~
\documentclass{article}
\usepackage{fontspec} %加這個就可以設定字體
\usepackage{xeCJK} %讓中英文字體分開設置
\setCJKmainfont{標楷體} %設定中文為系統上的字型,而英文不去更動,使用原TeX字型
\XeTeXlinebreaklocale "zh" %這兩行一定要加,中文才能自動換行
\XeTeXlinebreakskip = 0pt plus 1pt %這兩行一定要加,中文才能自動換行
\title{我是標題標題標題}
\author{我是作者}
\date{} %不要日期
\begin{document}
\maketitle
中文測試中文測試中文測試中文測試中文測試中文測試,中文測試中文測試,中文
測試中文測試中文測試中文測試中文測試中文測試,中文測試中文測試。中英文可以連打。
English Test. 插入中文字,看看如何? This is a simple template for a
XeLaTeX document using the article class, with the fontspec package to
easily select fonts.
\end{document}
作者: AndyLee76 (AndyLee)   2016-06-09 21:43:00
要選xelatex編譯吧
作者: s60984 (Angus)   2016-06-09 22:40:00
設定那裡有改成xelatex了
作者: andrew43 (討厭有好心推文後刪文者)   2016-06-10 01:10:00
你確定你有安裝標楷體嗎?
作者: Ice9 (又到了屬於我的季節)   2016-06-10 05:46:00
你用到早期的模板了。現在 xelatex 已不需要那兩行。標題OS是指作業系統,不是專指Mac OS X。
作者: s60984 (Angus)   2016-06-10 10:19:00
感謝andrew43大大一語道破,重安裝標楷體後就OK了

Links booklink

Contact Us: admin [ a t ] ucptt.com