forked from epoch-lab/cuit-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.mrules
More file actions
268 lines (176 loc) · 8.96 KB
/
.mrules
File metadata and controls
268 lines (176 loc) · 8.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# 中文文案排版指北
统一中文文案、排版的相关用法,降低团队成员之间的沟通成本,增强网站气质。
Other languages:
- [英语](README.en.md)
- [繁体中文](README.md)
- [简体中文](README.zh-Hans.md)
* * *
## 空格
> 「有研究显示,打字的时候不喜欢在中文和英文之间加空格的人,感情路都走得很辛苦,有七成的比例会在 34 岁的时候跟自己不爱的人结婚,而其余三成的人最后只能把遗产留给自己的猫。毕竟爱情跟书写都需要适时地留白。
>
> 与大家共勉之。」——[vinta/paranoid-auto-spacing](https://github.com/vinta/pangu.js)
### 中英文之间需要增加空格
正确:
> 在 LeanCloud 上,数据存储是围绕 `AVObject` 进行的。
错误:
> 在LeanCloud上,数据存储是围绕`AVObject`进行的。
>
> 在 LeanCloud上,数据存储是围绕`AVObject` 进行的。
完整的正确用法:
> 在 LeanCloud 上,数据存储是围绕 `AVObject` 进行的。每个 `AVObject` 都包含了与 JSON 兼容的 key-value 对应的数据。数据是 schema-free 的,你不需要在每个 `AVObject` 上提前指定存在哪些键,只要直接设定对应的 key-value 即可。
例外:「豆瓣FM」等产品名词,按照官方所定义的格式书写。
### 中文与数字之间需要增加空格
正确:
> 今天出去买菜花了 5000 元。
错误:
> 今天出去买菜花了 5000元。
>
> 今天出去买菜花了5000元。
### 数字与单位之间需要增加空格
正确:
> 我家的光纤入屋宽带有 10 Gbps,SSD 一共有 20 TB
错误:
> 我家的光纤入屋宽带有 10Gbps,SSD 一共有 20TB
例外:度数/百分比与数字之间不需要增加空格:
正确:
> 角度为 90° 的角,就是直角。
>
> 新 MacBook Pro 有 15% 的 CPU 性能提升。
错误:
> 角度为 90 ° 的角,就是直角。
>
> 新 MacBook Pro 有 15 % 的 CPU 性能提升。
### 全角标点与其他字符之间不加空格
正确:
> 刚刚买了一部 iPhone,好开心!
错误:
> 刚刚买了一部 iPhone ,好开心!
>
> 刚刚买了一部 iPhone, 好开心!
### 用 `text-spacing` 来挽救?
CSS Text Module Level 4 的 [`text-spacing`](https://www.w3.org/TR/css-text-4/#text-spacing-property) 和 Microsoft 的 [`-ms-text-autospace`](https://msdn.microsoft.com/library/ms531164(v=vs.85).aspx) 可以实现自动为中英文之间增加空白。不过目前并未普及,另外在其他应用场景,例如 macOS、iOS、Windows 等用户界面目前并不存在这个特性,所以请继续保持随手加空格的习惯。
## 标点符号
### 不重复使用标点符号
虽然中国大陆的标点符号用法允许重复使用标点符号,但是这么做会破坏句子的美观性。
正确:
> 德国队竟然战胜了巴西队!
>
> 她竟然对你说「喵」?!
错误:
> 德国队竟然战胜了巴西队!!
>
> 德国队竟然战胜了巴西队!!!!!!!!
>
> 她竟然对你说「喵」??!!
>
> 她竟然对你说「喵」?!?!??!!
## 全角和半角
不明白什么是全角(全形)与半角(半形)符号?请查看维基百科条目『[全角和半角](https://zh.wikipedia.org/wiki/%E5%85%A8%E5%BD%A2%E5%92%8C%E5%8D%8A%E5%BD%A2)』。
### 使用全角中文标点
正确:
> 嗨!你知道嘛?今天前台的小妹跟我说「喵」了哎!
>
> 核磁共振成像(NMRI)是什么原理都不知道?JFGI!
错误:
> 嗨! 你知道嘛? 今天前台的小妹跟我说 "喵" 了哎!
>
> 嗨!你知道嘛?今天前台的小妹跟我说"喵"了哎!
>
> 核磁共振成像 (NMRI) 是什么原理都不知道? JFGI!
>
> 核磁共振成像(NMRI)是什么原理都不知道?JFGI!
例外:中文句子内夹有英文书籍名、报刊名时,不应借用中文书名号,应以英文斜体表示。
### 数字使用半角字符
正确:
> 这个蛋糕只卖 1000 元。
错误:
> 这个蛋糕只卖 1000 元。
例外:在设计稿、宣传海报中如出现极少量数字的情形时,为方便文字对齐,是可以使用全角数字的。
### 遇到完整的英文整句、特殊名词,其内容使用半角标点
正确:
> 乔布斯那句话是怎么说的?「Stay hungry, stay foolish.」
>
> 推荐你阅读 *Hackers & Painters: Big Ideas from the Computer Age*,非常地有趣。
错误:
> 乔布斯那句话是怎么说的?「Stay hungry,stay foolish。」
>
> 推荐你阅读《Hackers&Painters:Big Ideas from the Computer Age》,非常的有趣。
## 名词
### 专有名词使用正确的大小写
大小写相关用法原属于英文书写范畴,不属于本 wiki 讨论内容,在这里只对部分易错用法进行简述。
正确:
> 使用 GitHub 登录
>
> 我们的客户有 GitHub、Foursquare、Microsoft Corporation、Google、Facebook, Inc.。
错误:
> 使用 github 登录
>
> 使用 GITHUB 登录
>
> 使用 Github 登录
>
> 使用 gitHub 登录
>
> 使用 gイんĤЦ8 登录
>
> 我们的客户有 github、foursquare、microsoft corporation、google、facebook, inc.。
>
> 我们的客户有 GITHUB、FOURSQUARE、MICROSOFT CORPORATION、GOOGLE、FACEBOOK, INC.。
>
> 我们的客户有 Github、FourSquare、MicroSoft Corporation、Google、FaceBook, Inc.。
>
> 我们的客户有 gitHub、fourSquare、microSoft Corporation、google、faceBook, Inc.。
>
> 我们的客户有 gイんĤЦ8、キouЯƧquムгє、๓เςг๏ร๏Ŧt ς๏гק๏гคtเ๏ภn、900913、ƒ4ᄃëв๏๏к, IПᄃ.。
注意:当网页中需要配合整体视觉风格而出现全部大写/小写的情形,HTML 中请使用标淮的大小写规范进行书写;并通过 `text-transform: uppercase;`/`text-transform: lowercase;` 对表现形式进行定义。
### 不要使用不地道的缩写
正确:
> 我们需要一位熟悉 TypeScript、HTML5,至少理解一种框架(如 React、Next.js)的前端开发者。
错误:
> 我们需要一位熟悉 Ts、h5,至少理解一种框架(如 RJS、nextjs)的 FED。
## 争议
以下用法略带有个人色彩,即:无论是否遵循下述规则,从语法的角度来讲都是**正确**的。
### 链接之间增加空格
用法:
> 请 [提交一个 issue](#) 并分配给相关同事。
>
> 访问我们网站的最新动态,请 [点击这里](#) 进行订阅!
对比用法:
> 请[提交一个 issue](#)并分配给相关同事。
>
> 访问我们网站的最新动态,请[点击这里](#)进行订阅!
### 简体中文使用直角引号
用法:
> 「老师,『有条不紊』的『紊』是什么意思?」
对比用法:
> “老师,‘有条不紊’的‘紊’是什么意思?”
## 工具
仓库 | 系列 | 语言
--- | ---- | ---
[pangu.js](https://github.com/vinta/pangu.js) | pangu | JavaScript
[pangu-go](https://github.com/vinta/pangu) | pangu | Go
[pangu.java](https://github.com/vinta/pangu.java) | pangu | Java
[pangu.py](https://github.com/vinta/pangu.py) | pangu | Python
[pangu.rb](https://github.com/dlackty/pangu.rb) | pangu | Ruby
[pangu.php](https://github.com/cchlorine/pangu.php) | pangu | PHP
[pangu.vim](https://github.com/hotoo/pangu.vim) | pangu | Vim
[vue-pangu](https://github.com/serkodev/vue-pangu) | pangu | Vue.js (Web Converter)
[intellij-pangu](https://plugins.jetbrains.com/plugin/19665-pangu) | pangu | Intellij Platform Plugin
[autocorrect](https://github.com/huacnlee/autocorrect) | autocorrect | Rust, WASM, CLI tool
[autocorrect-node](https://github.com/huacnlee/autocorrect/tree/main/autocorrect-node) | autocorrect | Node.js
[autocorrect-py](https://github.com/huacnlee/autocorrect/tree/main/autocorrect-py) | autocorrect | Python
[autocorrect-rb](https://github.com/huacnlee/autocorrect/tree/main/autocorrect-rb) | autocorrect | Ruby
[autocorrect-java](https://github.com/huacnlee/autocorrect/tree/main/autocorrect-java) | autocorrect | Java
[autocorrect-go](https://github.com/longbridgeapp/autocorrect) | autocorrect | Go
[autocorrect-php](https://github.com/NauxLiu/auto-correct) | autocorrect | PHP
[autocorrect-vscode](https://marketplace.visualstudio.com/items?itemName=huacnlee.autocorrect) | autocorrect | VS Code Extension
[autocorrect-idea-plugin](https://plugins.jetbrains.com/plugin/20244-autocorrect) | autocorrect | Intellij Platform Plugin
[jxlwqq/chinese-typesetting](https://github.com/jxlwqq/chinese-typesetting) | other | PHP
[sparanoid/space-lover](https://github.com/sparanoid/space-lover) | other | PHP (WordPress)
[sparanoid/grunt-auto-spacing](https://github.com/sparanoid/grunt-auto-spacing) | other | Node.js (Grunt)
[hjiang/scripts/add-space-between-latin-and-cjk](https://github.com/hjiang/scripts/blob/master/add-space-between-latin-and-cjk) | other | Python
[hustcc/hint](https://github.com/hustcc/hint) | other | Python
[n0vad3v/Tekorrect](https://github.com/n0vad3v/Tekorrect) | other | Python
## Forks
衍生项目的用法可能与本项目存在差异。
- [mzlogin/chinese-copywriting-guidelines](https://github.com/mzlogin/chinese-copywriting-guidelines)