首页
随机
最近更改
特殊页面
社群首页
参数设置
关于WHY42
免责声明
WHY42
搜索
用户菜单
登录
欢迎来到Riguz的小站!这是一个私人wiki,用来记录一些我的笔记。
查看“︁LaTEX:环境安装”︁的源代码
←
LaTEX:环境安装
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
参考[[http://blog.sina.com.cn/s/blog_90444ed201016iq6.html 这里]] =环境准备= ==安装== 首先安装[[http://www.ctex.org/ CeTex]]。有Basic和Full两种可选,理论上选择Basic后,如果用到缺失的内容也会自动更新到,这是我猜的,所以我选择的是Full的包。 安装完成后,打开WinEdt,这是一个收费软件,但是有特别的注册机(不推荐使用,支持正版),也可以试用30天。 ==Hello World== 新建一个文档,保存为hello.tex,内容如下: <source lang="lisp"> \documentclass{article} \begin{document} hello, world \end{document} </source> 然后在工具栏上选择LaTex或者PdfLaTex(在垃圾桶右边), [[Image:WinEdt_Menu.png]] 再点这个按钮生成。如果没问题,会有以下输出: <pre> Command Line: pdflatex.exe --interaction=errorstopmode --synctex=1 "hello.tex" ... _____________________________________________________________________ PDFLaTeX Compilation Report (Pages: 1) Errors: 0 Warnings: 0 Bad Boxes: 0 _____________________________________________________________________ </pre> 然后点击放大镜按钮可以打开生成的dvi文件,或者到hello.tex所在的目录下,可以看到hello.pdf。 =基本语法= ==标题、作者和注释== <source lang="lisp"> \documentclass{article} \author{Riguz} \title{Welcome to Earth!} % This is title \begin{document} \maketitle hello, world % This is comment \end{document} </source> 输出如下: [[Image:CeTex_Title.png]] ==中文支持== 只需要把开头的\documentclass{atricle}换成\documentclass{ctexart}就可以了。 <source lang="lisp"> \documentclass{ctexart} \begin{document} 你好,我是Riguz! \end{document} </source> 注意可以保存为UTF-8(不带BOM头),WinEdt没找到在哪设置编码,我用Notepad++处理。另一种复杂一点的办法是使用CJK包,如下: <source lang="lisp" highlight="2,4,6"> \documentclass{article} \usepackage{CJK} \begin{document} \begin{CJK*}{GBK}{song} 我是汉子!Haha! \end{CJK*} \end{document} </source> ==章节和段落== ==目录== ==数学公式== ==图片== ==表格== [[Category:Programe]]
返回
LaTEX:环境安装
。