Hi,

I use the following code to make a class material.

When I use \startcolumns … \stopcolumns, the vertical space between  section 
title and subsection title so big. 

1. Is there a way to reduce the vertical space between them?
2. Is there a way to make section command simpler?

Thank you for reading.

Best regards,

Dalyoung

\startbuffer[styleOutline]

\startuseMPgraphic{outlineT}
   draw lmt_outline [
       text      = \MPvar{tt},
       kind      = "both",
       width     = OverlayWidth,
       align     = "middle",
       fillcolor = "gray",
       rulethickness = 1pt,
       drawcolor = "dBlue"
   ] ;
\stopuseMPgraphic

\define[1]\outlineTitle{\useMPgraphic{outlineT}{tt="#1"}}

\setuphead[chapter,title]
[textcommand=\outlineTitle,
 textstyle=\BigFontThree,
 numberstyle=\BigFontThree,
 numbercommand=\outlineTitle,
 align=middle,%flushright,
 number=yes]

\define[2]\SectionCommand%
  {\framed
     [frame=off,
      width=\textwidth,
      align={right},
      background=color,
      backgroundcolor=lightgray]
     {\hbox to.011\textwidth{}\hbox to.05\textwidth{\strut#1}\quad
      \vtop{\hsize\dimexpr\hsize-.061\textwidth-1em\relax\begstrut#2
\endstrut}}}

\setuphead[section][command=\SectionCommand,numbercolor=, style=\ss\bf]
\setuphead[subsection][command=,style=\ss\bf]%%%%%%%%%
\stopbuffer

\getbuffer[styleOutline]
\showframe
\starttext
\startcolumns
\section{First}

\subsection{firstsub}
  \dorecurse{3}{\samplefile{knuth}}

\section{Second}

\subsection{secondsub}
  \dorecurse{3}{\samplefile{ward}}

\stopcolumns
\stoptext

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to