Re: [文件]Debian 下安裝 CJK-LaTeX 紀錄

看板LaTeX (論文排版)作者時間18年前 (2006/10/12 14:32), 編輯推噓1(102)
留言3則, 1人參與, 最新討論串1/2 (看更多)
※ 引述《yenlung (yenlung)》之銘言: > 在 Debian 下安裝 CJK-LaTeX 看來和一般 Linux 沒有什麼差別。但是 > 在安裝字型時我碰到了一點點小小的差異, 所以記錄下來以供參考。我 > 們假設要安裝給全部的人使用, 所以下面的指令要用 root 去下, 或是 > 每個指令前加 sudo。 > [*] 安裝 tetex 系統 > apt-get install tetex-bin tetex-base > 我不太確定是不是非要 tetex-base 不可, 不過好像大家都這樣做。 > apt-get install tetex-extra > 這不知是做什麼的 extra, 反正沒事裝一下。 > apt-get install tetex-doc > 這是文件檔, 強烈建議要裝。 > [*] 安裝 CJK-LaTeX > apt-get install cjk-latex > 就是裝 CJK-LaTeX。 > apt-get install tfm-arphic-bkai00mp tfm-arphic-bsmi00lp > 安裝文鼎的兩套 Big5 字型, 使用時是叫 ming 和 kai。 > 至此, 你已經有了基本的 Big5 版的 CJK-LaTeX 系統。可以試試編譯。 > [*] 安裝 dvipdfmx > apt-get install dvipdfmx > 安裝 dvipdfmx, 在產生中文 pdf 檔可以有更多設定的自由。 > 為了讓中文順利運作, 打開 > /etc/texmf/texmf.d/50dvipdfmx.cnf > 去掉第二行的註解。 > [*] 安裝 unicode 字型示範 > 這裡有五套從 cwTeX 字型轉給 CJK-LaTeX 用的 Type 1 字型 (這是果正 > 兄轉的嗎?): > http://cle.linux.org.tw/fonts/cwttf/type1/ > 這有兩套, 一般我們就用 baseline 那套字。在 baseline 裡一共有五套 > 字型, 每套字型都有 Big5 版和 unicode 版, unicode 版就是結尾有 u > 的字型, 比方說 cwmu, cwku, ... 等等。 > 每套字型裡都有 .afm, .tfm, .enc ... 等等字型相關的檔案, 我們要做 > 的就是把這些檔案放到正確的地方。在 Debian 裡, 一般本機共用的 > texmf 是在 > /usr/local/share/texmf > 為了方便說明, 下面的 > $TEXMF=/usr/local/share/texmf > 我們以 cwmu 字型為例, 請把對應的檔案一一拷貝到合適的位置: > [1] .afm 結尾 --> $TEXMF/fonts/afm/CJK/cwmu/ > [2] .tfm 結尾 --> $TEXMF/fonts/tfm/CJK/cwmu/ > [3] .pfb 結尾 --> $TEXMF/fonts/type1/CJK/cwmu/ > [4] .enc 結尾 --> $TEXMF/fonts/enc/CJK/cwmu/ > [5] .fd 結尾 --> $TEXMF/tex/latex/CJK/UTF8/ > [6] .map 結尾 --> $TEXMF/dvips/CJK/ > 這個 map 檔放置位置我覺得有點奇怪, 一般似乎應該是放到 > $TEXMF/fonts/map/dvips/CJK/ > 但是放到那 Debian 找不到。裝好字型後我們要告訴 Debian 我們字型裝 > 好了。我們做一個字型列表, > 建立 /etc/texmf/updmap.d/10local-foo.cfg > Map cwmu.map > Map cwku.map > Map cwfsu.map > Map cwhbu.map > Map cwyu.map > 這個字型列表位置是固定的 /etc/texmf/updmap.d/, 不過名稱應該自己 > 定, 只要檔案是以 .cfg 結尾即可。 > (有些系統可用 updmap --enable Map cwmu.map 等等, 但 Debian 不用 > 此法) > texhash > 讓 TeX 系統找得到我們安裝的字型 > update-updmap > 把字型表 (10local-foo.cfg) 加進來 > updmap > 真正的更新, 產生欠缺的字型 map > 這一般系統好像要用 updmap-sys, 不過至少在我的 Debian 上是沒有 > updmap-sys, 而是用 root 權限下 updmap。 > 做完以後, 就有五套 unicode 字型: cwmu, cwku, cwfsu, cwhbu, cwyu > 。一般來說相當夠用了。 首先謝謝你的 note 讓我順利安裝 cjk-latex 在 ubuntu 6.06 LTS - Dapper Drake 在 ubuntu 上 安裝上目前使用 big5 有問題 目前還沒找到原因 安裝 utf8 部份 五個字型 測試 cwmu cwku 目前簡單使用沒問題 在 ubuntu 上建議以 root 執行 updmap 應該執行 updmap-sys 底下是 logs 提供給大家參考 root@nlp4:/usr/share/texmf/fonts/type1/CJK/cwmu# updmap Warning: updmap is being run as root; updmap-sys should probably be used instead. If this is done by a Debian package upon installation, upgrade, or removal, please file a bug against that package. -- ※ Origin: SayYA 資訊站 <bbs.sayya.org> ◆ From: nlp4.et.ntust.edu.tw

10/13 14:50, , 1F
我也發現 Ubuntu 在 root 應使用 updmap-sys, 事實上這
10/13 14:50, 1F

10/13 14:51, , 2F
應該是比較正確的做法。只是在我的 Debian 上, 沒有
10/13 14:51, 2F

10/13 14:52, , 3F
updmap-sys
10/13 14:52, 3F
文章代碼(AID): #15BU5c00 (LaTeX)
文章代碼(AID): #15BU5c00 (LaTeX)