Skip to content

Commit 7c88f42

Browse files
committed
update: build english pdf
1 parent 14a24de commit 7c88f42

17 files changed

+22
-27
lines changed

book/en-us/01-intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Chapter 01Towards Modern C++
2+
title: "Chapter 01: Towards Modern C++"
33
type: book-en-us
44
order: 1
55
---
@@ -12,7 +12,7 @@ order: 1
1212
and always use the `-std=c++2a` compilation flag in your code.
1313

1414
```bash
15-
$ clang++ -v
15+
> clang++ -v
1616
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
1717
Target: x86_64-apple-darwin18.6.0
1818
Thread model: posix

book/en-us/02-usability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Chapter 02Language Usability Enhancements
2+
title: "Chapter 02: Language Usability Enhancements"
33
type: book-en-us
44
order: 2
55
---

book/en-us/03-runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Chapter 03Language Runtime Enhancements
2+
title: "Chapter 03: Language Runtime Enhancements"
33
type: book-en-us
44
order: 3
55
---

book/en-us/04-containers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Chapter 04 Sandard LibraryContainers
2+
title: "Chapter 04 Sandard Library: Containers"
33
type: book-en-us
44
order: 4
55
---

book/en-us/05-pointers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Chapter 05 Sandard LibraryPointers
2+
title: "Chapter 05 Sandard Library: Pointers"
33
type: book-en-us
44
order: 5
55
---

book/en-us/06-regex.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Chapter 06 Sandard LibraryRegular Expression
2+
title: "Chapter 06 Sandard Library: Regular Expression"
33
type: book-en-us
44
order: 6
55
---

book/en-us/07-thread.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Chapter 07 Sandard LibraryThreads and Concurrency
2+
title: "Chapter 07 Sandard Library: Threads and Concurrency"
33
type: book-en-us
44
order: 7
55
---

book/en-us/08-filesystem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Chapter 08 Sandard LibraryFile System
2+
title: "Chapter 08 Sandard Library: File System"
33
type: book-en-us
44
order: 8
55
---

book/en-us/10-cpp20.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Chapter 10 OutlookIntroduction of C++20
2+
title: "Chapter 10 Outlook: Introduction of C++20"
33
type: book-en-us
44
order: 10
55
---

book/en-us/appendix1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Appendix 1Further Study Materials
2+
title: "Appendix 1: Further Study Materials"
33
type: book-en-us
44
order: 11
55
---
66

7-
# Appendix 1Further Study Materials
7+
# Appendix 1: Further Study Materials
88

99
First of all, congratulations 🎉 on reading this book! I hope this book has raised your interest in modern C++.
1010

book/en-us/appendix2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Appendix 2Modern C++ Best Practices
2+
title: "Appendix 2: Modern C++ Best Practices"
33
type: book-en-us
44
order: 12
55
---
66

7-
# Appendix 2Modern C++ Best Practices
7+
# Appendix 2: Modern C++ Best Practices
88

99
In this appendix we will briefly talk about the best practices of modern C++. In general, the author's thoughts on C++'s best practices are mainly absorbed from [Effective Modern C++](https://www.amazon.com/dp/1491903996/ref=cm_sw_em_r_mt_dp_U_-ZgjDb81ERBNP) and [C++ Style Guide](https://google.github.io/styleguide/cppguide.html). In this appendix, we will briefly discuss and use the actual examples to illustrate the methods, and introduce some of **the author's personal**, **non-common**, **non-sensible** best practices, and how to ensure the overall quality of the code.
1010

book/zh-cn/01-intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ order: 1
1111
**编译环境**:本书将使用 `clang++` 作为唯一使用的编译器,同时总是在代码中使用 `-std=c++2a` 编译标志。
1212

1313
```bash
14-
$ clang++ -v
14+
> clang++ -v
1515
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
1616
Target: x86_64-apple-darwin18.6.0
1717
Thread model: posix

book/zh-cn/02-usability.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -963,8 +963,6 @@ std::cout << new_enum::value3 << std::endl
963963
964964
2. 尝试用[折叠表达式](#折叠表达式)实现用于计算均值的函数,传入允许任意参数。
965965
966-
3. ​
967-
968966
> 参考答案[见此](../exercises/2)。
969967
970968
[返回目录](./toc.md) | [上一章](./01-intro.md) | [下一章 运行时强化](./03-runtime.md)

pdf/en-us/aggregator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
chapters = ['00-preface.md', '01-intro.md', '02-usability.md', '03-runtime.md', '04-containers.md', '05-pointers.md', '06-regex.md', '07-thread.md', '08-filesystem.md', '09-others.md', '10-cpp20.md', 'appendix1.md', 'appendix2.md']
77

8-
ignores = ['TOC', 'Return to TOC', 'License', 'license']
8+
ignores = ['TOC', 'Table of Content', 'License', 'license']
99

1010

1111
with open('modern-cpp-tutorial.md', 'w') as outfile:

pdf/en-us/meta/template.tex

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
\usepackage{amssymb,amsmath}
1616
\usepackage{ifxetex,ifluatex}
1717

18-
\linespread{1.2}\selectfont % 行距
19-
%\XeTeXlinebreaklocale "zh" % 针对中文自动换行
20-
%\XeTeXlinebreakskip = 0pt plus 1pt % 字与字之间加入 0pt 至 1pt 的间距,确保左右对齐
21-
%\parindent 0em % 段落缩进
22-
%\setlength{\parskip}{20pt} % 段落间距
18+
\linespread{1.2}\selectfont
2319
\ifxetex
2420
\usepackage{xltxtra,xunicode}
2521
\fi
@@ -140,22 +136,23 @@
140136
\author{$for(author)$$author$$sep$ \and $endfor$}
141137
\date{$date$}
142138

143-
%%%% 段落首行缩进两个字 %%%%
144139
\makeatletter
145140
\let\@afterindentfalse\@afterindenttrue
146141
\@afterindenttrue
147142
\makeatother
148-
\setlength{\parindent}{2em} %中文缩进两个汉字位
143+
\setlength{\parindent}{2em}
149144

150-
%%%% 下面的命令设置行间距与段落间距 %%%%
151145
\linespread{1.4}
152146
\setlength{\parskip}{1ex}
153147
\setlength{\parskip}{0.5\baselineskip}
154148

149+
\input{revision}
150+
% fix build, see https://github.com/laboon/ebook/issues/139#issuecomment-408696480
155151

152+
\newcommand{\passthrough}[1]{\lstset{mathescape=false}#1\lstset{mathescape=true}}
156153
\begin{document}
157154

158-
\newcommand{\tightlist}{%
155+
\newcommand{\tightlist}{
159156
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
160157

161158
\thispagestyle{plain}

pdf/en-us/modern-cpp-tutorial.pdf

131 KB
Binary file not shown.

pdf/zh-cn/modern-cpp-tutorial.pdf

-240 KB
Binary file not shown.

0 commit comments

Comments
 (0)