Latex Learning——2 基本结构

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环境。

技巧:

  1. \noindent : 去掉首行缩进
  2. \ : 空格
  3. \lq : 左引号 \rq : 右引号

Latex 10个保留关键字: \,%,~,#,$,^,&,_,{,}
输出保留关键字:
在这里插入图片描述

整理一下Latex距离单位:
表格来自https://blog.csdn.net/robert_chen1988/article/details/52739825

单位名称说明
mm毫米1 mm = 2.845 pt
pt1 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
exex1 ex = 当前字体尺寸中 x 的高度
emem1 em = 当前字体尺寸中 M 的宽度
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值