Skip to content

Commit 62fbb7c

Browse files
committed
feat(docs): Optimize document structure and add title page
1 parent 60c19d6 commit 62fbb7c

3 files changed

Lines changed: 49 additions & 8 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
\newgeometry{margin=0pt}
2+
\begin{titlepage}
3+
\thispagestyle{empty}
4+
\centering
5+
\includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{Cover.png}
6+
\end{titlepage}
7+
\restoregeometry
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
\newgeometry{left=3cm, right=3cm, top=5cm, bottom=3cm}
2+
\begin{titlepage}
3+
\thispagestyle{empty}
4+
\pagestyle{empty}
5+
6+
\begin{center}
7+
\Huge \textbf{Modern C++ Full-Stack Tutorial}
8+
\end{center}
9+
10+
\vspace{0.5cm}
11+
12+
\begin{center}
13+
\Huge \textbf{现代 C++ 全栈开发教程}
14+
\end{center}
15+
16+
\vspace{2cm}
17+
18+
\begin{center}
19+
\Large \textbf{作者: 龙森}
20+
\end{center}
21+
22+
\vfill
23+
24+
\begin{center}
25+
\small
26+
\copyright \ 2026 龙森 版权所有 \quad | \quad 占位
27+
\end{center}
28+
29+
\end{titlepage}
30+
\restoregeometry
31+
\pagestyle{plain}

source/conf.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
'sphinxcontrib.mermaid',
2020
'sphinx_copybutton',
2121
]
22+
2223
source_suffix = {
2324
'.rst': 'restructuredtext',
2425
'.txt': 'markdown',
@@ -54,12 +55,18 @@
5455
},
5556
],
5657
}
58+
5759
html_static_path = ['_static']
5860
html_css_files = [
5961
'content.css',
6062
]
6163

62-
latex_additional_files = ['_static/Cover.png']
64+
latex_additional_files = [
65+
'_static/Cover.png',
66+
'_templates/CoverPage.tex.txt',
67+
'_templates/TitlePage.tex.txt',
68+
]
69+
6370
latex_engine = 'xelatex'
6471
latex_elements = {
6572
'papersize': 'a4paper',
@@ -82,17 +89,13 @@
8289
\usepackage{eso-pic}
8390
''',
8491
'maketitle': r'''
85-
\newgeometry{margin=0pt}
86-
\begin{titlepage}
87-
\thispagestyle{empty}
88-
\centering
89-
\includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{Cover.png}
90-
\end{titlepage}
91-
\restoregeometry
92+
\input{CoverPage.tex.txt}
93+
\input{TitlePage.tex.txt}
9294
''',
9395
'sphinxsetup': 'TitleColor=DarkGoldenrod',
9496
'fncychap': r'\usepackage[Bjornstrup]{fncychap}',
9597
'printindex': r'\footnotesize\raggedright\printindex',
9698
'extraclassoptions': 'openany,oneside',
9799
}
100+
98101
latex_show_urls = 'footnote'

0 commit comments

Comments
 (0)