latex 空一行_LaTeX从入门到提高(1)

本文介绍了LaTeX的安装与配置过程,包括如何获取并安装基础环境texlive,以及使用TeXstudio作为集成编辑环境的详细步骤。通过安装TeXstudio进行简单配置,助你快速上手LaTeX源文件的基本结构。
摘要由CSDN通过智能技术生成

1.安装与配置

(1)latex基础环境:

texlive 地址:http://tug.org/texlive/

建议下载完整的DVD镜像,这样安装比较顺畅: http://mirrors.cqu.edu.cn/CTAN/systems/texlive/Images/

下载完成后,使用iso工具打开安装,点击install-tl-advanced.bat:

582c154391a7ed969a2319a4cde66d8d.png

15783c9c75fda2802fd01448fb20cc59.png

如果需要有什么修改可以查阅网上其他相关资料,这里不赘述。
安装成功后测试:

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>

166ff51d2cb89822c7ae25878798948b.png

(2)安装TeXstudio(latex的集成编辑环境)

下载网站:http://texstudio.sourceforge.net/

安装效果:

d4f26e3cea23edce10a3855e2af7931f.png

简单配置:

81e7ab6fe6edee1a390201931cf78082.png

a57c7a37cb7b2139968959cb35ced58f.png

更多配置和调整方法可以查询相关网站。

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}

编译后的效果:

ab24338eff31b19c69cb81bf18db051d.png
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值