看板 LaTeX 關於我們 聯絡資訊
想請問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} -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.168.129.184 ※ 文章網址: https://www.ptt.cc/bbs/LaTeX/M.1465479110.A.82B.html
AndyLee76: 要選xelatex編譯吧 06/09 21:43
s60984: 設定那裡有改成xelatex了 06/09 22:40
andrew43: 你確定你有安裝標楷體嗎? 06/10 01:10
Ice9: 你用到早期的模板了。現在 xelatex 已不需要那兩行。 06/10 05:46
Ice9: 標題OS是指作業系統,不是專指Mac OS X。 06/10 05:48
s60984: 感謝andrew43大大一語道破,重安裝標楷體後就OK了 06/10 10:19
s60984: 也感謝Ice9告知~ 06/11 10:33