
如何在使用網格排版時增加 ConTeXT 中標題的行高而不干擾後續行的對齊? (未對準標示為綠色)。
我的程式碼是:
\definefontfeature[default][default][protrusion=quality,expansion=quality,liga=yes,onum=yes]
\setupalign[hanging,tolerant]
\setuppapersize[A5][A5]
\setupinterlinespace[line=16pt]
\setuplayout[
grid=yes,
width=fit,
height=fit,
location=middle,
topspace=0.2in,
bottomspace=0in,
bottom=0.2in,
backspace=0.75in,
cutspace=0.5in,
leftmargin=0.2in,
rightmargin=0.75in,
leftmargindistance=0.1in,
rightmargindistance=0.1in,
header=0.20in,
footer=0.20in,
headerdistance=0.2in,
footerdistance=0.2in
]
\setuppagenumbering[
alternative=doublesided,
location={footer, right, margin},
width=1in,
right={\hfill},
left={\hfill}
]
\setupheads[indentnext=no]
\setupindenting[yes, small]
\setupmargindata[inmargin][location=right, style=small]
\definepagebreak[mychapterpagebreak][yes,header,right]
\setuphead[chapter][
page=mychapterpagebreak,
style=\tfc,
textstyle={\kerncharacters[.5]},
% If I remove \setuplocalinterlinespace here, I get the alignment right.
before={\ \blank[2*big]\setuplocalinterlinespace[line=3.2ex]},
after={\blank[3*big]},
number=no
]
%\showframe
\showgrid
\starttext
\chapter[Incididunt reprehenderit cupidatat adipisicing elit qui sit et deserunt sunt amet irure consectetur labore minim commodo]{Incididunt reprehenderit cupidatat adipisicing elit qui sit et deserunt sunt amet irure consectetur labore minim commodo}
\input khatt-en
\stoptext
答案1
這\setuplocalinterlinespace[line=3.2ex]
似乎是從章節的定義中洩漏出來的。只需使用該interlinespace
選項即可。另外,您必須在 之前開始一個段落\blank[2*big]
,否則您也會破壞垂直間距。
\definefontfeature[default][default][protrusion=quality,expansion=quality,liga=yes,onum=yes]
\setupalign[hanging,tolerant]
\setuppapersize[A5][A5]
\setupinterlinespace[line=16pt]
\setuplayout[
grid=yes,
width=fit,
height=fit,
location=middle,
topspace=0.2in,
bottomspace=0in,
bottom=0.2in,
backspace=0.75in,
cutspace=0.5in,
leftmargin=0.2in,
rightmargin=0.75in,
leftmargindistance=0.1in,
rightmargindistance=0.1in,
header=0.20in,
footer=0.20in,
headerdistance=0.2in,
footerdistance=0.2in
]
\setuppagenumbering[
alternative=doublesided,
location={footer, right, margin},
width=1in,
right={\hfill},
left={\hfill}
]
\setupheads[indentnext=no]
\setupindenting[yes, small]
\setupmargindata[inmargin][location=right, style=small]
\definepagebreak[mychapterpagebreak][yes,header,right]
\setuphead[chapter][
page=mychapterpagebreak,
style=\tfc,
textstyle={\kerncharacters[.5]},
% If I remove \setuplocalinterlinespace here, I get the alignment right.
before={\dontleavehmode\blank[2*big]},
after={\blank[3*big]},
interlinespace=3.2ex,
number=no,
]
%\showframe
\showgrid
\starttext
\startchapter
[title={Incididunt reprehenderit cupidatat adipisicing elit qui sit
et deserunt sunt amet irure consectetur labore minim commodo}]
\input khatt-en
\stopchapter
\stoptext