diff --git a/mytoolkit/scaffolds/manual/main.tex b/mytoolkit/scaffolds/manual/main.tex index 454af94..338d00e 100644 --- a/mytoolkit/scaffolds/manual/main.tex +++ b/mytoolkit/scaffolds/manual/main.tex @@ -14,6 +14,7 @@ \usepackage{titlesec} \usepackage{fancyhdr} \usepackage{enumitem} +\usepackage{setspace} \usepackage{hyperref} % ---- fonts (Times New Roman + SimSun/SimHei/KaiTi; ctex default set as fallback) ---- @@ -24,6 +25,14 @@ }{} \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 +% LaTeX uses baseline-to-baseline; 1.2 stretch gives ~1.46em baseline, +% close to Typst leading + cap-height. Parskip adds the remaining gap. +\setstretch{1.2} +\setlength{\parindent}{0pt} +\setlength{\parskip}{0.6em} + % ---- palette (keep in sync with templates/md-to-pdf/manual/template.typ) ---- \definecolor{primary}{HTML}{1F4E79} \definecolor{secondary}{HTML}{2C3E50} @@ -63,8 +72,8 @@ \fancyhead[R]{\fontsize{8}{10}\selectfont\color{light}\rightmark} \fancyfoot[C]{\fontsize{8}{10}\selectfont\color{light}--- \thepage\ ---} -% ---- compact lists ---- -\setlist{nosep, leftmargin=1.8em} +% ---- list spacing (Typst list spacing 0.72em -> itemsep 0.2em on top of line gap) ---- +\setlist{leftmargin=1.8em, itemsep=0.2em, parsep=0pt, topsep=0.4em} % ---- three-line tables: \toprule / \midrule / \bottomrule ---- \arrayrulecolor{ruleblue} @@ -75,6 +84,7 @@ backgroundcolor=\color{codebg}, frame=single, framerule=0.5pt, rulecolor=\color{ruleblue}, framesep=3pt, xleftmargin=2em, + aboveskip=0.8em, belowskip=0.8em, numbers=left, numberstyle=\tiny\color{codenum}, numbersep=8pt, breaklines=true, columns=fullflexible, keepspaces=true, showstringspaces=false,