{"id":1666,"date":"2012-05-01T09:29:31","date_gmt":"2012-05-01T01:29:31","guid":{"rendered":"http:\/\/vanabel.sinaapp.com\/?p=1666"},"modified":"2012-05-01T09:29:31","modified_gmt":"2012-05-01T01:29:31","slug":"%e8%bd%ac%e8%bd%bd-latex-cjk-%e5%88%b0%e5%ba%95%e5%b9%b2%e4%ba%86%e4%bb%80%e4%b9%88","status":"publish","type":"post","link":"https:\/\/lttt.vanabel.cn\/?p=1666","title":{"rendered":"[\u8f6c\u8f7d]LaTeX + CJK \u5230\u5e95\u5e72\u4e86\u4ec0\u4e48?"},"content":{"rendered":"<p><a href=\"http:\/\/www.magiclinux.org\/node\/251\" target=\"_blank\">\u539f\u6587\u94fe\u63a5<\/a><\/p>\n<p>\u5f88\u591a\u4eba\u88ab LaTeX \u7684\u5404\u79cd\u6587\u4ef6\uff0c\u5b57\u4f53\u641e\u7684\u5934\u660f\u8111\u80c0 (\u6211\u5c31\u66fe\u7ecf\u662f\u5176\u4e2d\u4e00\u4e2a). \u5176\u5b9e <strong>LaTeX+CJK<\/strong> \u5904\u7406\u6c49\u5b57\u7684\u8fc7\u7a0b\u5f88\u7b80\u5355\u3002\u662f\u8fd9\u6837\u7684\uff1a<\/p>\n<p>\u9996\u5148\u4f60\u7f16\u8f91\u4e86\u4e00\u4e2a\u6587\u4ef6 example.tex\uff0c\u91cc\u9762\u6709\u5982\u4e0b\u5185\u5bb9\uff1a<!--more--><\/p>\n<pre lang=\"latex\" colla=\"+\">\n\\documentclass{article}\n\\usepackage{CJK}\n\\begin{CJK}{GBK}{song}\n\\begin{document}\n\u60a8\n\\end{CJK}\n\\end{document}\n<\/pre>\n<p>\u7528\u6237\u5728\u547d\u4ee4\u884c\u6572\u5165 <strong>latex example.tex<\/strong>. \u4e00\u4e2a\u8ddf &#8220;tex&#8221; \u4e00\u6a21\u4e00\u6837\u53ea\u4e0d\u8fc7\u53eb\u505a &#8220;latex&#8221;\u7684\u7a0b\u5e8f\u542f\u52a8\u4e86\u3002\u5b83\u5176\u5b9e\u5c31\u662f TeX, LaTeX \u548c TeX \u5176\u5b9e\u662f\u540c\u4e00\u4e2a\u7a0b\u5e8f\u3002\u5728\u6709\u4e9b\u7cfb\u7edf\u4e0b latex \u662f\u4e00\u4e2a\u811a\u672c\uff0c\u91cc\u9762\u53ea\u6709\u51e0\u884c\u5b57\u3002\u6bd4\u5982\u6211\u7684 Linux \u7248\u672c\u5c31\u662f\u8fd9\u6837\uff1a<\/p>\n<pre lang=\"winbatch\" colla=\"+\">\n#!\/bin\/sh\ntest -f \"`kpsewhich latex.fmt`\" || fmtutil --byfmt latex\nexec tex -fmt=latex \"$@\"\n<\/pre>\n<p>TeX \u53d1\u73b0\u81ea\u5df1\u662f\u7528\u53eb\u505a &#8220;latex&#8221; \u7684\u547d\u4ee4\u542f\u52a8\u7684\u3002\u6216\u8005\u811a\u672c\u91cc\u660e\u663e\u6307\u660e\u4e86\u9700\u8981&#8221;latex&#8221;\u683c\u5f0f\uff0c\u5b83\u5c31\u53bb\u8bfb\u5165\u4e00\u4e2a\u5b8f\u5305\u53eb\u505a <strong>latex.fmt<\/strong>. \u8fd9\u4e2a\u6587\u4ef6\u4e00\u822c\u5728 <strong>$TEXMF\/web2c<\/strong>. \u4ee5\u540e\u6211\u4eec\u5c31\u8fdb\u5165\u4e86 LaTeX \u7684\u4e16\u754c\uff0c\u770b\u5230\u4e86\uff1fLaTeX \u53ea\u662f TeX \u7684\u4e00\u79cd\u7279\u6b8a\u60c5\u51b5(\u4e00\u79cd\u201c\u683c\u5f0f\u201d)\u3002\u6240\u4ee5\u5982\u679c\u4f60\u80fd\u660e\u767d TeX, LaTeX \u7ed9\u4f60\u7684\u5f88\u591a\u6761\u6761\u6846\u6846\u4f60\u90fd\u53ef\u4ee5\u4e0d\u9075\u5b88\u3002<br \/>\nLaTeX \u53d1\u73b0\u7528\u6237\u4f7f\u7528\u4e86 <strong>CJK<\/strong> \u5b8f\u5305\uff0c\u5728 <strong>\\begin{CJK}{GBK}{song}<\/strong> \u65f6\uff0cCJK \u5b8f\u5305\u628a\u4ece\u73b0\u5728\u5f00\u59cb\u4e00\u76f4\u5230 <strong>\\end{CJK}<\/strong> \u7684\u5185\u5bb9\u91cc\u7684\u4e2d\u6587\u90fd\u53d8\u6210\u4e86\u4e00\u4e9b\u5947\u602a\u7684TeX\u547d\u4ee4\u3002\u8fd9\u4e9b\u547d\u4ee4\u6839\u636e\u4e0d\u540c\u7684\u6c49\u5b57\u8f6c\u6362\u4e0d\u540c\u7684\u5b57\u4f53\u3002\u5b83\u53d1\u73b0\u201c\u60a8\u201d\uff0c\u5b83\u5c31\u4f1a\u628a\u5b57\u4f53\u8bbe\u7f6e\u4e3a gbksong51, \u7136\u540e\u53d6\u91cc\u9762\u7684\u7b2c115\u4e2a\u5b57\u7b26\u3002<\/p>\n<p>\u4e3a\u4e86\u8fbe\u5230\u8fd9\u4e2a\u76ee\u7684\uff0c\u5b83\u628a\u6211\u4eec\u7684\u6c49\u5b57\u201c\u60a8\u201d\u53d8\u6210\u4e86 &#8220;<strong>\\C19\/song\/m\/n\/10\/51 s<\/strong>&#8220;, <strong>\\C19\/song\/m\/n\/10\/51<\/strong> \u8868\u793a\u7528 GBK \u7f16\u7801 (C19) \u7684 song \u4f53\uff0c\u7c97\u7ec6\u4e3a medium(m), \u800c\u4e0d\u662f bold, \u5f62\u72b6\u4e3aupright(n), \u800c\u4e0d\u662f italic, \u5927\u5c0f\u662f 10pt, \u5b50\u96c6\u53f7\u7801 51. \u8fd9\u4e2a\u63cf\u8ff0\u4f1a\u88ab C19song.fd \u8fd9\u4e2a\u5b57\u4f53\u63cf\u8ff0\u6587\u4ef6\u6620\u5c04\u4e3a gbksong51. \u56e0\u4e3a C19song.fd \u91cc\u6709\u8fd9\u6837\u4e00\u884c\uff1a<\/p>\n<pre lang=\"latex\" colla=\"+\">\n\\DeclareFontShape{C19}{song}{m}{n}{< -> CJK * gbksong}{}\n<\/pre>\n<p>\u6240\u4ee5 &#8220;\\C19\/song\/m\/n\/10\/51&#8221; \u8fd9\u4e2a\u547d\u4ee4\u5c31\u4f1a\u628a\u5b57\u4f53\u8bbe\u7f6e\u4e3a &#8220;gbksong51 at 10pt&#8221;(TeX\u672f\u8bed). \u540e\u9762\u63a5\u7740\u4e00\u4e2a&#8221;s&#8221;, &#8220;s&#8221; \u7684 ASCII \u7801\u662f 115, \u6b63\u597d\u662f \u201c\u60a8\u201d \u5728\u8fd9\u4e2a\u5b50\u96c6\u4e2d\u7684\u7d22\u5f15\u53f7\u3002<\/p>\n<p>LaTeX \u7ee7\u7eed\u5904\u7406\u6587\u6863\u7684\u5176\u5b83\u90e8\u5206\uff0c\u5c31\u8c61\u5904\u7406\u5176\u5b83\u4efb\u4f55\u82f1\u8bed\u6587\u4ef6\u4e00\u6837\u2026\u2026\u6700\u540e\u751f\u6210\u4e86 dvi \u6587\u4ef6\u3002<br \/>\n\u7528\u6237\u7528 dvips \u751f\u6210 PostScript \u6587\u4ef6\u3002 dvips \u627e\u5230 config.ps \u914d\u7f6e\uff0c\u8bfb\u53d6\u91cc\u9762\u7684\u5b57\u4f53\u6620\u5c04\u6587\u4ef6\u5217\u8868\uff0c\u5217\u8868\u91cc\u6709\u4e00\u4e2a\u6587\u4ef6\u53eb\u505a cjk.map, \u5b83\u5c31\u53bb\u8bfb\u53d6 cjk.map. cjk.map \u6307\u51fa\uff1agbksong51 \u8fd9\u4e2a\u5b57\u4f53\u7684\u56fe\u50cf (glyph) \u5e94\u8be5\u4eceType1\u5b57\u4f53\u6587\u4ef6 gbksong51.pfb \u91cc\u5f97\u5230\u2026\u2026 dvips \u628a\u8fd9\u4e9b\u4fe1\u606f\u5b58\u5230\u4e00\u5f20\u8868\u91cc\u5907\u7528\u3002<\/p>\n<p>dvips \u5f00\u59cb\u8bfb\u53d6 dvi \u6587\u4ef6\uff0c\u53d1\u73b0\u91cc\u9762\u8981\u6c42\u4f7f\u7528 gbksong51 \u8fd9\u4e2a\u5b57\u4f53\uff0c\u5e76\u4e14\u8f93\u51fa\u4e00\u4e2a &#8220;s&#8221; \u5bf9\u5e94\u7684\u5b57\u7b26\u3002\u5b83\u5c31\u4e0b\u8f7d(download,PostScript\u672f\u8bed) gbksong51.pfb \u5230\u751f\u6210\u7684 PostScript \u6587\u4ef6 example.ps, \u7136\u540e\u5728\u5408\u9002\u7684\u4f4d\u7f6e\u653e\u4e0a\u5bf9\u201c\u60a8\u201d\u7d22\u5f15: s. \u73b0\u5728\u4f60\u7528\u4e00\u4e2a\u6587\u672c\u7f16\u8f91\u5668\uff0c\u6bd4\u5982 VIM, \u6253\u5f00 example.ps \u5c31\u53ef\u4ee5\u770b\u5230\u91cc\u9762\u6709\u5982\u4e0b\u5185\u5bb9\uff1a<\/p>\n<pre lang=\"div\" colla=\"+\">\n%%BeginFont: SimSun51\n%!FontType1-1.0: SimSun 2.10\n%%Creator: ttf2pfb, $Id: ttf2pfb.c,v 1.2 2002\/07\/27 12:58:58 wy Exp $\n%%CreationDate: Sun Jul 28 17:44:29 2002\n%%VMusage: 030000 030000\n...............\n%%Page: 1 1\nTeXDict begin 1 0 bop 639 523 a Fb(s)1926 8991 y Fa(1)p\neop end\n%%Trailer\n....\n<\/pre>\n<p>\u800c\u4f60\u7528 gsview \u6253\u5f00\u6587\u4ef6\u5c31\u770b\u5230\u4e86\u201c\u60a8\u201d\u3002\u53d1\u73b0\u6ca1\u6709\uff1f&#8221;SimSun51&#8243; \u5c31\u662f\u63d2\u5165Type1\u5b57\u4f53\u7684\u5f00\u59cb\u5904, \u800c&#8221;(s)&#8221; \u5c31\u662f\u8bf4\u201c\u8f93\u51fa\u5b57\u7b26\u4e32s\u201d\u3002\u8fd9\u4e2a\u5b57\u4f53\u91cc\u7684&#8221;s&#8221;\u770b\u8d77\u6765\u5c31\u662f\u201c\u60a8\u201d\u3002\u800c\u90a3\u4e2aSimSun51\uff0c\u5c31\u662f\u6240\u8c13\u7684 PostScript \u5b57\u4f53\u540d\u5b57\u3002\u4f60\u7684\u6587\u6863\u5c31\u662f\u8fd9\u6837\u751f\u6210\u7684\u3002<\/p>\n<p>\u4ece\u8fd9\u4e2a\u5206\u6790\u4f60\u53ef\u4ee5\u770b\u51fa\uff0cTeX \u5728\u672c\u8d28\u4e0a\u5904\u7406\u6c49\u5b57\u662f\u6ca1\u6709\u4efb\u4f55\u95ee\u9898\u7684\uff0c\u56e0\u4e3a\u7ecf\u8fc7 CJK \u7684\u8f6c\u5316\uff0c\u6c49\u5b57\u88ab\u8f6c\u6210\u4e86\u548c\u82f1\u6587\u5b57\u7b26\u4e00\u6837\u7684\u201c\u76d2\u5b50\u201d\u3002\u6211\u4eec\u53ea\u8981\u6309\u7167 TeX \u7684\u89c4\u5219\u6765\u5904\u7406\u8fd9\u4e9b\u76d2\u5b50\u5c31\u53ef\u4ee5\u5b9e\u73b0\u4e0e\u82f1\u6587\u5b8c\u5168\u540c\u6837\u7684\u529f\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u94fe\u63a5 \u5f88\u591a\u4eba\u88ab LaTeX \u7684\u5404\u79cd\u6587\u4ef6\uff0c\u5b57\u4f53\u641e\u7684\u5934\u660f\u8111\u80c0 (\u6211\u5c31\u66fe\u7ecf\u662f\u5176\u4e2d\u4e00 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/lttt.vanabel.cn\/?p=1666\"> <span class=\"screen-reader-text\">[\u8f6c\u8f7d]LaTeX + CJK \u5230\u5e95\u5e72\u4e86\u4ec0\u4e48?<\/span> \u9605\u8bfb\u66f4\u591a &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[257,532,83,741,434],"class_list":["post-1666","post","type-post","status-publish","format-standard","hentry","category-latex","tag-cjk","tag-latex-2","tag-83","tag-741","tag-434"],"_links":{"self":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/1666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1666"}],"version-history":[{"count":0,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/1666\/revisions"}],"wp:attachment":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}