Latex 结构
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\begin{document}
We have seen that to typeset something in \LaTeX, we type in the
text to be typeset together with some \LaTeX\ commands.
Words must be separated by spaces (does not matter how many)
and lines maybe broken arbitrarily.
The end of a paragraph is specified by a \emph{blank line}
in the input. In other words, whenever you want to start a new
paragraph, just leave a blank line and proceed.
\end{document}
documentclass[]{}
指明当前文章的类型,类型主要有article,book等- 所有的主体内容都需要写在
\begin{document}
,end{document}
之间
所有的 \begin{name}
, \end{name}
之间为Latex 结构,其中是名为name的环境,如\begin{document}
, end{document}
之间即为document环境。
技巧:
- \noindent : 去掉首行缩进
- \ : 空格
- \lq : 左引号 \rq : 右引号
Latex 10个保留关键字: \
,%
,~
,#
,$
,^
,&
,_
,{
,}
输出保留关键字:
整理一下Latex距离单位:
表格来自https://blog.csdn.net/robert_chen1988/article/details/52739825
单位 | 名称 | 说明 |
---|---|---|
mm | 毫米 | 1 mm = 2.845 pt |
pt | 点 | 1 pt = 0.351 mm |
bp | 大点 | 1 bp = 0.353 mm > 1 pt |
dd | 迪多 | 1 dd = 0.376 mm = 1.07 pt |
pc | 排卡 | 1 pc = 4.218 mm = 12 pt |
sp | 定标点 | 65536 sp = 1 pt |
cm | 厘米 | 1 cm= 10 mm= 28.453 pt |
cc | 西塞罗 | 1 cc= 4.513 mm= 12 dd = 12.84 pt |
in | 英寸 | 1 in = 25.4 mm = 72.27 pt |
ex | ex | 1 ex = 当前字体尺寸中 x 的高度 |
em | em | 1 em = 当前字体尺寸中 M 的宽度 |