删除章节开头的标题行(上下文)

删除章节开头的标题行(上下文)

我想删除仅标题行, 和仅适用于章节开头但保留章节标题。我知道这不常见。有没有什么方法可以自动完成?

\setupheader
  [text]
  [before={\startframed[frame=off,bottomframe=on,framecolor=blue,]},
   after={\stopframed},
  ]
\setupheadertexts[Text left][Text right]
 
 
\starttext


%\setupheader
%  [text]
%  [before=,
%   after=,
%  ]
\chapter{asdf}

\page
%\setupheader
%  [text]
%  [before={\startframed[frame=off,bottomframe=on,framecolor=blue,]},
%   after={\stopframed},
%  ]
\section{asdf}

\stoptext

答案1

肮脏的伎俩利用子页码

%For testing only
%\setuppapersize[A6]
\setupsubpagenumber[way=bychapter,state=start]
\startsetups zza
\doifelse{\the\numexpr\subpageno\relax}{1}{\startframed[frame=off]}{\startframed[frame=off,bottomframe=on,framecolor=blue,]}
\stopsetups
\setupheader
  [text]
  [before=\setup{zza},
   after=\stopframed,
  ]
\setupheadertexts[Text left][Text right] 
\starttext
\chapter{Dari balgeun bam...}
\dorecurse{3}{\samplefile{knuth}}
\chapter{Siltago malhae...}
\dorecurse{3}{\samplefile{tufte}}
\stoptext

在此处输入图片描述

相关内容