8000 Polished doc · hexinzhe/leetcode@cede46b · GitHub
[go: up one dir, main page]

Skip to content

Commit cede46b

Browse files
committed
Polished doc
1 parent f2ff6d7 commit cede46b

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

C++/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#C++版
2-
-----------------
1+
# C++版
32

43
## 编译
54

6-
docker pull soulmachine/texlive
7-
docker run -it --rm -v $(pwd):/data -w /data soulmachine/texlive xelatex -interaction=nonstopmode leetcode-cpp.tex
5+
```bash
6+
docker run -it --rm -v $(pwd):/project -w /project soulmachine/texlive xelatex -interaction=nonstopmode leetcode-cpp.tex
7+
````

README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,22 @@ C++ 文件夹下是C++版,内容一模一样,代码是用C++写的。
1212

1313
Java 文件夹下是Java版,目前正在编写中,由于拖延症,不知道猴年马月能完成。
1414

15-
## 如何编译
15+
## 如何编译PDF
1616

17-
本项目已经配置好了devcontainer, 用 vscode 打开项目根目录,选择 `"Reopen in devcontainer"`,就会在容器中打开本项目,该容器安装了 Tex Live 2022 以及所需要的10个字体。
18-
19-
点击vscode左下角的齿轮图标,选择 `Command Palette`,输入`tasks`, 选择 `Run Task`, 选择 `leetcode-C++`,即可启动编译。
20-
21-
你也可以直接使用命令行编译:
17+
### 命令行编译
2218

2319
```bash
24-
xelatex -synctex=1 -interaction=nonstopmode leetcode-cpp.tex
20+
docker run -it --rm -v $(pwd)/C++:/project -w /project soulmachine/texlive xelatex -interaction=nonstopmode leetcode-cpp.tex
2521
```
2622

23+
### vscode下编译
24+
25+
本项目已经配置好了vscode devcontainer, 可以在 Windows, Linux 和 macOS 三大平台上编译。
26+
27+
用 vscode 打开本项目,选择右下角弹出的 `"Reopen in Container"`,就会在容器中打开本项目,该容器安装了 Tex Live 2022 以及所需要的10个字体。
28+
29+
点击vscode左下角的齿轮图标,选择 `Command Palette`,输入`tasks`, 选择 `Run Task`, 选择 `leetcode-C++`,即可启动编译。
30+
2731
## LaTeX模板
2832

2933
本书使用的是陈硕开源的[模板](https://github.com/chenshuo/typeset)。这个模板制作精良,感谢陈硕 :)
@@ -32,11 +36,7 @@ xelatex -synctex=1 -interaction=nonstopmode leetcode-cpp.tex
3236

3337
也可以参考 [Dockerfile](https://github.com/soulmachine/docker-images/blob/master/texlive/Dockerfile) 去学习如何安装所有字体。
3438

35-
## 如何贡献代码
36-
37-
编译通过后,就具备了完整的LaTeX编译环境了。
38-
39-
本书模板已经写好了,基本上不需要很多LaTeX知识就可以动手了。
39+
## 贡献代码
4040

4141
欢迎给本书添加内容或纠正错误,在自己本地编译成PDF,预览没问题后,就可以发pull request过来了。
4242

0 commit comments

Comments
 (0)
0