You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

50 lines
1.9 KiB

---
title: LaTex语法
date: 2021-03-18 09:00:57
updated: 2021-04-25 11:57:28
tags:
categories:
keywords:
description:
top_img:
comments:
cover:
toc:
toc_number:
toc_style_simple:
copyright:
copyright_author:
copyright_author_href:
copyright_url:
copyright_info:
katex: true
highlight_shrink:
aside:
---
# [LaTeX的长度单位](https://www.cnblogs.com/among-the-stars/p/15996636.html)
LaTeX中有多个长度单位,为方便以后查询使用,整理如下:
| 缩写 | 外文全名 | 汉语名称 | 说明 |
| --- | --- | --- | --- |
| pt | point | 点 | = 1/72.27英寸 ≈ 0.35146mm。 |
| pc | pica | 皮卡 | = 12pt ≈ 4.21752mm。 |
| in | inch | 英寸 | = 72.27pt = 25.4mm。 |
| bp | big point | 大点 | = 1/72英寸 ≈ 0.35278mm。 |
| mm | millimeter | 毫米 | = 2.845pt |
| cm | centimeter | 厘米 | = 10mm |
| dd | didot point | 狄多点 | = 1.07pt ≈ 0.37606mm |
| cc | cicero | 西塞罗 | = 12dd ≈ 4.51274mm |
| sp | scaled point | 定标点 | = 1/65536pt |
| ex | | | 大约是当前字体中“x”的高度 |
| em | | | 大约是当前字体中“M”的宽度 |
| mu | | | = 1/18em,其中em取自数学符号系列。 |
介绍:
1、从列表中可以看到这些单位中的ex、em与mu是相对值,都与当前的字体大小有关,用户可以根据实际需要酌情使用。
2、默认单位是英寸,即in。例如在使用tikz绘图时,如果未标明具体单位名称,那就是默认使用英寸。这里还要注意一点,只有在本条命令中都未指明单位名称的情况下才使用默认单位,例如下面的命令:
```latex
\draw (0,5) rectangle (1,5);
\draw (0mm,5) rectangle (1,5);
```
第一行命令因为所有坐标值都未标注单位,所以会使用默认的英寸单位;第二行命令中虽然只有第一个坐标使用了毫米单位,但后面的坐标值都会受此影响而全部使用毫米单位。