Latex使用教程
  • 简单介绍
  • 安装使用
  • 数学公式
    • 符号
    • 希腊字母
    • 下标和上标
  • 化学公式
Powered by GitBook
On this page
  • 在线Latex编辑器
  • 简单的案例

安装使用

Latex安装可以通过官网获取安装包,但大部分只会用到Latex生成数学公式,然后插入到Word文档里面,或者Markdown编辑器里面。因此这里推荐在线的Latex编辑器,用于功能测试。

Previous简单介绍Next数学公式

Last updated 2 years ago

在线Latex编辑器

Wikibook有推荐几款在线的编辑器,对于个人用户是免费的。

简单的案例

通过在线Latex编辑器Overleaf创建一个项目,然后输入以下指令。

\documentclass{article}
\begin{document}
First document. This is a simple example, with no 
extra parameters or packages included.
\end{document}

编辑好之后点击编译,输出结果如下图:

可以注意到:

  • \documentclass{}, \begin{}这样带有\的为Latex指令。

  • 设置文档类后,内容写在 \begin{document} 和 \end{document} 标记之间。

以上全是最简单的Latex文本结构,\documentclass{article}, \begin{document} 和 \end{document}这三个指令/标签缺一不可。

\documentclass{article}为文件类型。如果要编辑中文的文档,文件类型要改为\documentclass{ctexart}。(Comprehensive TeX Archive Network)提供了所有的文件类型。

CTAN
Authorea
CoCalc
Overleaf