LaTeX软件的使用

原文见 http://blog.sina.com.cn/s/blog_90444ed201016iq6.html

1.LaTeX软件的安装和使用

2.文档

\documentclass{article}                      
\begin{document}
hello, world

\end{document}

3. 标题、作者和注释
\documentclass{article}

\author{My Name}

\title{The Title}

\begin{document}

\maketitle

hello, world % This is comment

\end{document}


4. 章节和段落

\documentclass{article}

\title{Hello World}

\begin{document}

\maketitle

\section{Hello China} China is in EastAsia.

\subsection{Hello Beijing} Beijing is thecapital of China.

\subsubsection{Hello Dongcheng District}

\paragraph{Tian'anmen Square}is in thecenter of Beijing

\subparagraph{Chairman Mao} is in thecenter of Tian'anmen Square

\subsection{Hello Guangzhou}

\paragraph{Sun Yat-sen University} is thebest university in Guangzhou.

\end{document}

5,加入目录

在section之前加入一行 \tableofcontents  (便实现了添加目录的功能)

  

6. LaTeX中换行,有两种方法:

1.    空一行

2.    换行处敲入 \\

比如

\documentclass{article}

\begin{document}

Beijingis

thecapital

of China.

New Yorkis

thecapital

ofAmerica.

Amsterdamis \\ the capital \\

ofNetherlands.

\end{document}

7. 插入图片

先搜索到一个将图片转成eps文件的软件,将图片保存为一个名字如figure1.eps。

\documentclass{article}

\usepackage{graphicx}

\begin{document}

\includegraphics[width=4.00in,height=3.00in]{figure1.eps}

\end{document}

8. 中文支持

打开WinEdt,建立一个新文档

\documentclass{ctexart}

\begin{document}

你好,世界

\end{document}

9. 调用宏包

通常在\documentclass之后,在\begin{document}之前,将文章所需要涉及的宏包都罗列上。

编辑数学公式的宏包:\usepackage{amsmath}和 \usepackage{amssymb}

编辑数学定理和证明过程的宏包:\usepackage{amsthm}

插入图片的宏包:\usepackage{graphicx}

复杂表格的宏包:\usepackage{multirow}

10. 模板

模板就是在\documentclass{}后面的大括号里的内容。

在这一份教程中,我们使用的是LaTeX默认自带的模板article,以及中文模板ctexart。

一个模板可以规定,section、subsection、paragraph等不同层级用什么字体什么字号怎么对齐。当然模板里还包含一些自定义的口令,以及页眉页脚页边距一类的页面设置,具体修改与配置可以上网搜索。

11. 参考文献和制作幻灯片

对这两个功能有需求的LaTeX user,可以去google一下或查阅其他厚教程

提供两个搜索关键词,参考文献可以搜bibtex,制作幻灯片可以搜beamer。

猜你喜欢

转载自blog.csdn.net/qq_35240555/article/details/80299735
今日推荐