style(scaffolds/manual): align vertical rhythm with Typst md-to-pdf/manual template
- Add setspace and set \setstretch{1.2} to match Typst leading 0.76em
(baseline-to-baseline ~1.46em for 10pt text).
- Set \parindent=0pt and \parskip=0.6em so paragraph breaks match
Typst paragraph spacing 1.08em.
- Replace nosep lists with itemsep=0.2em / topsep=0.4em to match
Typst list spacing 0.72em.
- Add aboveskip/belowskip=0.8em around code listings for consistent
block separation.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user