Vertical space between section and subsection.
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
Am 18.12.24 um 00:25 schrieb Jeong Dal via ntg-context:
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?
Be aware that columns are operating in grid mode. That means that all lines are typeset on the next available line of the body text grid, you can visualize it with \showgrid. You can adapt the interlinespacing of bigger fonts (subtitles) to that of the grid using \setupbodyfontenvironment. More details on grid snapping are, well, in the details (details.pdf manual). Hraban
Dear Hraban, Thank you for reply. I read details.pdf. However, it is not easy for me to understand. And, my trial of some command is not working. I need more study to know correctly. Best regards, Dalyoung
2024. 12. 18. 오후 5:04, Henning Hraban Ramm
작성: Am 18.12.24 um 00:25 schrieb Jeong Dal via ntg-context:
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?
Be aware that columns are operating in grid mode. That means that all lines are typeset on the next available line of the body text grid, you can visualize it with \showgrid.
You can adapt the interlinespacing of bigger fonts (subtitles) to that of the grid using \setupbodyfontenvironment.
More details on grid snapping are, well, in the details (details.pdf manual).
Hraban ___________________________________________________________________________________ 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 ___________________________________________________________________________________
Am 18.12.24 um 12:13 schrieb Jeong Dal via ntg-context:
I read details.pdf. However, it is not easy for me to understand.
Yes, it is quite advanced; I don’t claim to understand all of it. But I guess several hints in that manual might apply to your problem.
And, my trial of some command is not working.
Please report.
I need more study to know correctly.
Good luck! Hraban
participants (2)
-
Henning Hraban Ramm
-
Jeong Dal