Skip to content

Commit 9c4257b

Browse files
committed
feat(docs): Beautify document layout
1 parent 45bdb96 commit 9c4257b

3 files changed

Lines changed: 42 additions & 9 deletions

File tree

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
\newgeometry{left=3cm, right=3cm, top=5cm, bottom=3cm}
22
\begin{titlepage}
33
\thispagestyle{empty}
4-
\pagestyle{empty}
54

65
\begin{center}
76
\Huge \textbf{Modern C++ Full-Stack Tutorial}
@@ -16,16 +15,30 @@
1615
\vspace{2cm}
1716

1817
\begin{center}
19-
\Large \textbf{作者: 龙森}
18+
{\Large \textbf{龙森} \quad 著}
2019
\end{center}
2120

2221
\vfill
2322

24-
\begin{center}
25-
\small
26-
\copyright \ 2026 龙森 版权所有 \quad | \quad 占位
27-
\end{center}
23+
\begin{flushleft}
24+
\small \color{gray}
25+
\rule{\textwidth}{0.4pt}
26+
\vspace{0.3cm}
27+
28+
\textbf{版权所有 © 2026 龙森} \\
29+
\textcopyright\ 2026 Long Sen. All rights reserved.
30+
31+
\vspace{0.4cm}
32+
33+
本书内容受著作权法保护。未经出版人书面许可,不得以任何方式(包括但不限于复印、录制或通过任何信息存储和检索系统)复制或传播本书的任何部分。
34+
35+
\vspace{0.4cm}
36+
37+
\textbf{本书版本:} v1.0.0 \\
38+
\textbf{最后更新:} \today \\
39+
\textbf{GitHub:} \texttt{https://github.com/OasisPioneer/Modern-CPP-Full-Stack-Tutorial}
40+
41+
\end{flushleft}
2842

2943
\end{titlepage}
30-
\restoregeometry
31-
\pagestyle{plain}
44+
\restoregeometry

source/conf.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
]
7070

7171
latex_engine = 'xelatex'
72+
latex_use_xindy = True
7273
latex_toplevel_sectioning = 'part'
7374
latex_elements = {
7475
'papersize': 'a4paper',
@@ -86,6 +87,25 @@
8687
\usepackage{graphicx}
8788
\usepackage{eso-pic}
8889
90+
% ===== ===== 设置目录标题 ===== =====
91+
\makeatletter
92+
\renewcommand{\cftchappresnum}{第}
93+
\renewcommand{\cftchapaftersnum}{章}
94+
\setlength{\cftchapnumwidth}{4.5em}
95+
\makeatother
96+
% ===== ===== 设置文档标题 ===== =====
97+
\makeatletter
98+
\renewcommand{\@makechapterhead}[1]{
99+
{\parindent \z@ \centering \normalfont
100+
\ifnum \c@secnumdepth >\m@ne
101+
\Huge\bfseries 第\ \thechapter\ 章\quad #1\par\nobreak
102+
\fi
103+
\interlinepenalty\@M
104+
\vspace*{20pt}
105+
}
106+
}
107+
\makeatother
108+
89109
% \cftsetpnumwidth {1.25cm}\cftsetrmarg{1.5cm}
90110
% \setlength{\cftchapnumwidth}{0.75cm}
91111
% \setlength{\cftsecindent}{\cftchapnumwidth}

source/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
```
77

88
```{toctree}
9-
:maxdepth: 6
9+
:maxdepth: 4
1010
1111
Language Core/index
1212
```

0 commit comments

Comments
 (0)