1.安装与配置
(1)latex基础环境:
texlive 地址:http://tug.org/texlive/
建议下载完整的DVD镜像,这样安装比较顺畅: http://mirrors.cqu.edu.cn/CTAN/systems/texlive/Images/
下载完成后,使用iso工具打开安装,点击install-tl-advanced.bat:
如果需要有什么修改可以查阅网上其他相关资料,这里不赘述。
安装成功后测试:
C:UsersAdministrator>tex -v
TeX 3.14159265 (TeX Live 2018/W32TeX)
kpathsea version 6.3.0
Copyright 2018 D.E. Knuth.
There is NO warranty. Redistribution of this software is
covered by the terms of both the TeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the TeX source.
Primary author of TeX: D.E. Knuth.
C:UsersAdministrator>latex -v
pdfTeX 3.14159265-2.6-1.40.19 (TeX Live 2018/W32TeX)
kpathsea version 6.3.0
Copyright 2018 Han The Thanh (pdfTeX) et al.
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.34; using libpng 1.6.34
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.00
C:UsersAdministrator>xelatex -v
XeTeX 3.14159265-2.6-0.99999 (TeX Live 2018/W32TeX)
kpathsea version 6.3.0
Copyright 2018 SIL International, Jonathan Kew and Khaled Hosny.
There is NO warranty. Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 61.1; using 61.1
Compiled with zlib version 1.2.11; using 1.2.11
Compiled with FreeType2 version 2.9.0; using 2.9.0
Compiled with Graphite2 version 1.3.11; using 1.3.11
Compiled with HarfBuzz version 1.7.6; using 1.7.6
Compiled with libpng version 1.6.34; using 1.6.34
Compiled with poppler version 0.63.0
Compiled with fontconfig version 2.13.0; using 2.13.0
C:UsersAdministrator>tlmgr update -all
TeX Live 2018 is frozen forever and will no
longer be updated. This happens in preparation for a new release.
编写文章测试:
documentclass{article}
usepackage{ctex}
begin{document}
你好,LaTeX 。
end{document}
编译:
D:personalApproaching mathematicslatex>xelatex test.tex
This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018/W32TeX) (preloaded format=xelatex)
restricted write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
(e:/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(e:/texlive/texmf-dist/tex/latex/base/size10.clo))
...
(e:/texlive/texmf-dist/tex/latex/ctex/config/ctex.cfg)
No file test.aux.
ABD: EverySelectfont initializing macros [1] (./test.aux) )
Output written on test.pdf (1 page).
Transcript written on test.log.
D:personalApproaching mathematicslatex>
(2)安装TeXstudio(latex的集成编辑环境)
下载网站:http://texstudio.sourceforge.net/
安装效果:
简单配置:
更多配置和调整方法可以查询相关网站。
2.LaTeX源文件的基本结构
% 导言区
documentclass{article} % book, report, letter
usepackage{ctex}
title{使用LaTeX 写的第一篇文档}
author{李利}
date{today}
% 正文区(文稿区)
begin{document}
maketitle
这是我使用LaTeX 写的第一篇文档
% 空一行代表分段。
Let $f(x)$ be defined by the formula
$$f(x)=3x^2+x-1$$ which is a polynomial of degree 2.
% 单$符号代表行内公式,$$双$符号表示行间公式
end{document}
编译后的效果: