update: build english pdf

This commit is contained in:
Changkun Ou
2019-07-09 14:06:11 +02:00
parent 14a24de242
commit 7c88f422ab
17 changed files with 5884 additions and 5360 deletions

View File

@@ -1,5 +1,5 @@
---
title: Chapter 01Towards Modern C++
title: "Chapter 01: Towards Modern C++"
type: book-en-us
order: 1
---
@@ -12,7 +12,7 @@ order: 1
and always use the `-std=c++2a` compilation flag in your code.
```bash
$ clang++ -v
> clang++ -v
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix

View File

@@ -1,5 +1,5 @@
---
title: Chapter 02Language Usability Enhancements
title: "Chapter 02: Language Usability Enhancements"
type: book-en-us
order: 2
---

View File

@@ -1,5 +1,5 @@
---
title: Chapter 03Language Runtime Enhancements
title: "Chapter 03: Language Runtime Enhancements"
type: book-en-us
order: 3
---

View File

@@ -1,5 +1,5 @@
---
title: Chapter 04 Sandard LibraryContainers
title: "Chapter 04 Sandard Library: Containers"
type: book-en-us
order: 4
---

View File

@@ -1,5 +1,5 @@
---
title: Chapter 05 Sandard LibraryPointers
title: "Chapter 05 Sandard Library: Pointers"
type: book-en-us
order: 5
---

View File

@@ -1,5 +1,5 @@
---
title: Chapter 06 Sandard LibraryRegular Expression
title: "Chapter 06 Sandard Library: Regular Expression"
type: book-en-us
order: 6
---

View File

@@ -1,5 +1,5 @@
---
title: Chapter 07 Sandard LibraryThreads and Concurrency
title: "Chapter 07 Sandard Library: Threads and Concurrency"
type: book-en-us
order: 7
---

View File

@@ -1,5 +1,5 @@
---
title: Chapter 08 Sandard LibraryFile System
title: "Chapter 08 Sandard Library: File System"
type: book-en-us
order: 8
---

View File

@@ -1,5 +1,5 @@
---
title: Chapter 10 OutlookIntroduction of C++20
title: "Chapter 10 Outlook: Introduction of C++20"
type: book-en-us
order: 10
---

View File

@@ -1,10 +1,10 @@
---
title: Appendix 1Further Study Materials
title: "Appendix 1: Further Study Materials"
type: book-en-us
order: 11
---
# Appendix 1Further Study Materials
# Appendix 1: Further Study Materials
First of all, congratulations 🎉 on reading this book! I hope this book has raised your interest in modern C++.

View File

@@ -1,10 +1,10 @@
---
title: Appendix 2Modern C++ Best Practices
title: "Appendix 2: Modern C++ Best Practices"
type: book-en-us
order: 12
---
# Appendix 2Modern C++ Best Practices
# Appendix 2: Modern C++ Best Practices
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.

View File

@@ -11,7 +11,7 @@ order: 1
**编译环境**:本书将使用 `clang++` 作为唯一使用的编译器,同时总是在代码中使用 `-std=c++2a` 编译标志。
```bash
$ clang++ -v
> clang++ -v
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix

View File

@@ -963,8 +963,6 @@ std::cout << new_enum::value3 << std::endl
2. 尝试用[折叠表达式](#折叠表达式)实现用于计算均值的函数,传入允许任意参数。
3.
> 参考答案[见此](../exercises/2)。
[返回目录](./toc.md) | [上一章](./01-intro.md) | [下一章 运行时强化](./03-runtime.md)

View File

@@ -5,7 +5,7 @@ import os
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']
ignores = ['TOC', 'Return to TOC', 'License', 'license']
ignores = ['TOC', 'Table of Content', 'License', 'license']
with open('modern-cpp-tutorial.md', 'w') as outfile:

View File

@@ -15,11 +15,7 @@
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\linespread{1.2}\selectfont % 行距
%\XeTeXlinebreaklocale "zh" % 针对中文自动换行
%\XeTeXlinebreakskip = 0pt plus 1pt % 字与字之间加入 0pt 至 1pt 的间距,确保左右对齐
%\parindent 0em % 段落缩进
%\setlength{\parskip}{20pt} % 段落间距
\linespread{1.2}\selectfont
\ifxetex
\usepackage{xltxtra,xunicode}
\fi
@@ -140,22 +136,23 @@ $endif$
\author{$for(author)$$author$$sep$ \and $endfor$}
\date{$date$}
%%%% 段落首行缩进两个字 %%%%
\makeatletter
\let\@afterindentfalse\@afterindenttrue
\@afterindenttrue
\makeatother
\setlength{\parindent}{2em} %中文缩进两个汉字位
\setlength{\parindent}{2em}
%%%% 下面的命令设置行间距与段落间距 %%%%
\linespread{1.4}
\setlength{\parskip}{1ex}
\setlength{\parskip}{0.5\baselineskip}
\input{revision}
% fix build, see https://github.com/laboon/ebook/issues/139#issuecomment-408696480
\newcommand{\passthrough}[1]{\lstset{mathescape=false}#1\lstset{mathescape=true}}
\begin{document}
\newcommand{\tightlist}{%
\newcommand{\tightlist}{
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\thispagestyle{plain}

File diff suppressed because one or more lines are too long

Binary file not shown.