Skip to content

Commit

Permalink
makefile: Update wordcount (sjtug#366)
Browse files Browse the repository at this point in the history
Signed-off-by: Ce Gao <[email protected]>
  • Loading branch information
gaocegege authored Sep 28, 2018
1 parent 6ebf7fd commit a16a583
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ view : $(THESIS).pdf
open $<

wordcount:
@texcount $(THESIS).tex -inc | awk '/total/ {getline; print "词数  :",$$4}'
@texcount $(THESIS).tex -inc -char | awk '/total/ {getline; print "字符数 :",$$4}'
@texcount $(THESIS).tex -inc -ch-only | awk '/total/ {getline; print "中文字数:",$$4}'
@texcount $(THESIS).tex -inc -ch-only | awk '/total/ {getline; print "纯中文字数\t\t\t:",$$4}'
@texcount $(THESIS).tex -inc -chinese | awk '/total/ {getline; print "总字数(英文单词 + 中文字)\t:",$$4}'

clean :
-@latexmk -c -silent 2> /dev/null
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@ make clean

### 查看字数统计

通过以下指令,可以查看目前的字数(可只关注词数一项)
通过以下指令,可以查看目前的字数:

```bash
make wordcount
```

目前会统计两种字数:纯中文字数与总字数(英文单词 + 中文字)。其中纯中文字数只统计中文字,如英语单词,数字等都不予计入。总字数统计英文单词,以及中文字的总和,其中一个单词视为一个字。

## 反馈问题

如果在使用上有任何问题,建议先阅读[常见问题与建议](https://github.com/sjtug/SJTUThesis/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98%E4%B8%8E%E5%BB%BA%E8%AE%AE)。如果这些不能解决你的问题,建议以如下的顺序反馈使用过程中的问题:
Expand Down

0 comments on commit a16a583

Please sign in to comment.