ConTeXT 中的标题高度和网格

ConTeXT 中的标题高度和网格

如何在使用网格排版的同时增加 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

在此处输入图片描述

相关内容