[心得] 在windows使用miktex2.9+texmaker4.1

楼主: tang1019 (燢)   2013-11-10 23:02:23
windows环境下, 中文latex 使用者的福音
1. 先安装 miktex2.9
(http://miktex.org/)
2. 再安装 texmaker 4.1
(http://www.xm1math.net/texmaker/download.html#windows)
例 在texmaker中贴入 mytest.tex
两步即可产生 pdf 文件
\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}
作者: andrew43 (讨厌有好心推文后删文者)   2012-01-10 23:29:00
建议并用xeCJK可以中西文分开设定.
楼主: tang1019 (燢)   2012-01-12 15:52:00
谢谢大大
作者: ashien (思念是一种病...)   2012-01-29 15:07:00
请问是哪个版本的windows?
作者: rogerli   2012-01-29 18:03:00
XP以上版本不都可以用?

Links booklink

Contact Us: admin [ a t ] ucptt.com