diff --git a/mytoolkit/scaffolds/manual/main.tex b/mytoolkit/scaffolds/manual/main.tex index 41b7398..40adcb0 100644 --- a/mytoolkit/scaffolds/manual/main.tex +++ b/mytoolkit/scaffolds/manual/main.tex @@ -18,13 +18,13 @@ \usepackage{caption} \usepackage{hyperref} -% ---- fonts (Times New Roman + SimSun/SimHei/KaiTi; ctex default set as fallback) ---- -\IfFontExistsTF{Times New Roman}{\setmainfont{Times New Roman}}{} +% ---- fonts: TeX Gyre Termes + SimSun/SimHei (fallback ctex auto) ---- +\xeCJKsetup{CJKecglue = \hspace{0.3em}} +\usepackage{tgtermes} \IfFontExistsTF{SimSun}{% \setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun}% \setCJKsansfont[BoldFont={SimHei}]{SimHei}% }{} -\IfFontExistsTF{Courier New}{\setmonofont{Courier New}}{\setmonofont{Menlo}} % ---- vertical rhythm (keep in sync with Typst md-to-pdf/manual template) ---- % Typst: leading 0.76em, paragraph spacing 1.08em @@ -117,16 +117,16 @@ \begin{document} -% ---- cover page ---- +% ---- cover page (vertically centered) ---- \begin{titlepage} + \vspace*{\fill} \centering - \vspace*{2cm} {\fontsize{28}{34}\selectfont\bfseries\color{primary} Phynexis Python API 参考手册\par} \vspace{0.8cm} {\fontsize{16}{20}\selectfont\color{accent} 技术与使用文档\par} \vspace{2cm} {\fontsize{12}{16}\selectfont\color{light} 2026 年 7 月\par} - \vfill + \vspace*{\fill} \end{titlepage} \tableofcontents diff --git a/mytoolkit/templates/md-to-pdf/default/template.typ b/mytoolkit/templates/md-to-pdf/default/template.typ index e73af18..ecaf334 100644 --- a/mytoolkit/templates/md-to-pdf/default/template.typ +++ b/mytoolkit/templates/md-to-pdf/default/template.typ @@ -7,8 +7,8 @@ #let cover-page(title, subtitle, date) = { page(margin: (top: 3cm, bottom: 3cm, left: 3cm, right: 3cm))[ - #align(center + horizon)[ - #v(2cm) + #v(1fr) + #align(center)[ #text(size: 28pt, weight: "bold", fill: primary, title) #if subtitle != none { v(0.8cm) @@ -19,6 +19,7 @@ text(size: 12pt, fill: light, date) } ] + #v(1fr) ] } diff --git a/mytoolkit/templates/md-to-pdf/manual/template.typ b/mytoolkit/templates/md-to-pdf/manual/template.typ index 2e5c135..740c451 100644 --- a/mytoolkit/templates/md-to-pdf/manual/template.typ +++ b/mytoolkit/templates/md-to-pdf/manual/template.typ @@ -16,8 +16,8 @@ #let cover-page(title, subtitle, date) = { page(margin: (top: 3cm, bottom: 3cm, left: 3cm, right: 3cm))[ - #align(center + horizon)[ - #v(2cm) + #v(1fr) + #align(center)[ #text(size: 28pt, weight: "bold", fill: primary, title) #if subtitle != none { v(0.8cm) @@ -28,6 +28,7 @@ text(size: 12pt, fill: light, date) } ] + #v(1fr) ] } diff --git a/mytoolkit/templates/md-to-pdf/textbook/template.typ b/mytoolkit/templates/md-to-pdf/textbook/template.typ index e2e7bba..ad71255 100644 --- a/mytoolkit/templates/md-to-pdf/textbook/template.typ +++ b/mytoolkit/templates/md-to-pdf/textbook/template.typ @@ -95,8 +95,8 @@ #let cover-page(title, subtitle, date) = { page(margin: (top: 3cm, bottom: 3cm, left: 3cm, right: 3cm))[ - #align(center + horizon)[ - #v(2cm) + #v(1fr) + #align(center)[ #text(size: 28pt, weight: "bold", fill: primary, title) #if subtitle != none { v(0.8cm) @@ -107,6 +107,7 @@ text(size: 12pt, fill: light, date) } ] + #v(1fr) ] }