[問題] 關於 XeLaTex 編譯錯誤(已解決)

看板LaTeX (論文排版)作者 (新世界)時間14年前 (2011/03/30 10:08), 編輯推噓3(304)
留言7則, 5人參與, 最新討論串1/1
最近想試試看 Xelatex, 爬了版上的文和拜了估狗神,似乎大部分不用做什麼設定就 可以編譯了 = =? 在下參考版上某位的範例: % --- Xelatex code start --- \documentclass{article} \usepackage{fontspec} %加這個就可以設定字體 \setmainfont{微軟正黑體} %直接設定Windows中的字型,名字要打的\ 一模一樣才行。 \XeTeXlinebreaklocale "zh" %這兩行一定要加,中文才能自動換行 \XeTeXlinebreakskip = 0pt plus 1pt %這兩行是texWorks範例中所缺少的。 %加了這四行後,就可以隨意的打中文, %接下來的跟一般的LeTeX都一樣 \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} % --- xelatex code end --- 但我在 win 7 用 MikTex 2.9 內鍵的 TeXworks 裡面的 XeLaTex 去編,卻不能編, 以下是錯誤碼: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! This is a LaTeX bug: check coding! ! ! Command name `\font_set:Nnn' already defined! Current meaning: ! \protected\long macro:#1#2#3->\tex_font:D #1=#2 at #3\scan_stop: ! ! See the LaTeX3 documentation for further information. ! For immediate help type H <return>. !............................................... l.602 \cs_new:Npn \font_set:Nnn #1#2#3 { ? --- 不知道是怎麼情況 = =" 要怎麼解決?謝謝! -- -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.115.25.216

03/30 11:59, , 1F
看起來像是字體的問題 可以考慮打開Word直接複製看看
03/30 11:59, 1F

03/30 13:08, , 2F
之前2.8升2.9的時候有遇到,所以我又重灌2.8了
03/30 13:08, 2F

03/30 13:59, , 3F
我的 Miktex2.9+win7 正常。
03/30 13:59, 3F

03/30 21:14, , 4F
2.9版我學校電腦正常,家裡遇到一樣的問題...(皆win7)
03/30 21:14, 4F

03/30 21:45, , 5F
後來安裝fontspec套件後就ok了~
03/30 21:45, 5F

03/31 11:07, , 6F
解決了 感謝各位!更新 fontspec 就可以了
03/31 11:07, 6F

03/31 11:09, , 7F
或改用 2.8 也可以
03/31 11:09, 7F
文章代碼(AID): #1Daf2ea5 (LaTeX)
文章代碼(AID): #1Daf2ea5 (LaTeX)