Commit 54507e84 authored by liziwl's avatar liziwl
Browse files

增加论文字数统计

parent 041fcb43
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ else
	RM = rm -f
endif

.PHONY: all clean cleanall thesis viewthesis FORCE_MAKE
.PHONY: all clean cleanall thesis viewthesis wordcount FORCE_MAKE

thesis: $(THESIS).pdf

@@ -32,3 +32,11 @@ clean:

cleanall: clean
	-@$(RM) $(THESIS).pdf

wordcount : $(THESIS).tex
	@if grep -v ^% $< | grep -q '\\documentclass\[[^\[]*english'; then \
		texcount $< -inc -char-only | awk '/total/ {getline; print "英文字符数\t\t\t:",$$4}'; \
	else \
		texcount $< -inc -ch-only   | awk '/total/ {getline; print "纯中文字数\t\t\t:",$$4}'; \
	fi
	@texcount $< -inc -chinese | awk '/total/ {getline; print "总字数(英文单词 + 中文字)\t:",$$4}'
 No newline at end of file
+6 −5
Original line number Diff line number Diff line
@@ -18,7 +18,8 @@ Mirrors of SUSTech: https://mirrors.sustech.edu.cn/github-release/SUSTech-CRA/su
* `make all`        生成论文,与 `make thesis` 等效;
* `make clean`      删除示例文件的中间文件(不含 thuthesis-example.pdf);
* `make cleanall`   删除示例文件的中间文件和 thuthesis-example.pdf;
* `make distclean` 删除示例文件和模板的所有中间文件和 PDF。
* `make distclean`  删除示例文件和模板的所有中间文件和 PDF;
* `make wordcount`  论文字数统计。

### 使用 LaTex 在线编辑器
* 使用 [Overleaf](https://www.overleaf.com/)(需要科学上网保证稳定使用),上传 zip 压缩包后,更改编译器为 `XeLaTex`