「LaTex」- 快速开始(学习笔记)


通过参考 Learn LaTeX in 30 minutes – Overleaf, Online LaTeX Editor 页面,我们对 LaTex 展开快速学习。



使用纯文本编辑器可以完成 LaTeX 编写,但是工具让我们更加高效、准确:
1)使用 Overleaf 在线编辑查看;
2)Visual Studio Code + LaTeX Workshop;(我们正在使用的工具)

编写简单的 LaTeX 文档

% 指定文档类型,除了 article 还有 book、report 等等

% 文档开始,以 \end{document} 结束
% This is known as the body of the document.
First document. This is a simple example, with no
extra parameters or packages included.

% This is a commnet.

稍微复杂的 LaTex 文档

% 定义字体大小与纸张大小
\documentclass[12pt, letterpaper]{article}
\usepackage[utf8]{inputenc} % 指定文档编码

% 为文档添加标题
\title{First document}
\author{Hubert Farnsworth \thanks{funded by the Overleaf team}}
\date{February 2014}


% 使标题能够显示出来

% 这是一行普通的文本
We have now added a title, author and date to our first \LaTeX{} document!

% 为字体设置特殊样式
Some of the \textbf{greatest} % bold
discoveries in \underline{science} % italics
were made by \textbf{\textit{accident}}. % Underline

% \emph 的命令取决与上下文:在正常情况下,会将字体倾斜;在斜体中,会将字体变正常
Some of the greatest \emph{discoveries}
in science
were made by accident.

\textit{Some of the greatest \emph{discoveries}
in science
were made by accident.}

\textbf{Some of the greatest \emph{discoveries}
in science
were made by accident.}

% Unordered lists
  \item The individual entries are indicated with a black dot, a so-called bullet.
  \item The text in the entries may be of any length.

% Ordered lists
  \item This is the first entry in our list
  \item The list numbers increase with each entry we add



\usepackage{graphicx} % 引入 graphicx 包
\graphicspath{ {images/} } % 指定图片搜索路径

The universe is immense and it seems to be homogeneous,
in a large scale, everywhere we look at.

\includegraphics{universe} % 使用图片(可以省略扩展名,LaTeX 会自动搜索)

There's a picture of a galaxy above


rotating – How to rotate text inline? – TeX – LaTeX Stack Exchange

\usepackage{graphicx} % 需要引入该包



Commenting in Latex – texblog
Page size and margins – Overleaf, Online LaTeX Editor