ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* smaller inter line space for headings (on a grid)
@ 2009-12-30 16:13 Andreas Harder
  0 siblings, 0 replies; only message in thread
From: Andreas Harder @ 2009-12-30 16:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 497 bytes --]

Hi all,

I have three questions:

1) Is there a convenient way to reduce the inter line space for an head on a grid? First I tried \setuphead[section][style={\ssb\setupinterlinespace[line=1ex]}]—no effect. Finally I defined three commands to get it work. Perhaps someone knows a better way.

2) In a manual I found an example \setuphead[section][grid={line,-5pt}], but it doesn’t seem to work. Is it outdated? Is there an MkIV alternative?

3) Is there a MkIV pendant for \showgridboxes?

[-- Attachment #2: test-head-interlinespace.tex --]
[-- Type: application/octet-stream, Size: 893 bytes --]


\setuplayout[grid=yes]

\setupframed[offset=none,align=right]

\def\mySecTxtCmd#1%
  {\framed
    [width=\dimexpr\textwidth-2em\relax,location=top]
    {\switchtointerlinespace[line=1ex,distance=0pt]#1\endgraf}}

\def\mySecNumCmd#1%
  {\framed[width=2em,location=high]{#1}}

\def\mySecCmd#1#2%
  {\framed
    [framecolor=blue,offset=overlay,align=top]
    {\mySecNumCmd{#1}\mySecTxtCmd{#2}}}


\setuphead
  [section]
  [% style={\ssb\setupinterlinespace[line=1ex]}, % -> wrong effect!
   style=\ssb,
   numberwidth=2em,
   command=\mySecCmd,
   numbercommand=\mySecNumCmd,
   textcommand=\mySecTxtCmd]

\setuphead
  [subsection]
  [textcommand=,
   numbercommand=,
   command=\normalplacehead,
   grid={line,-5pt}] % -> no effect!


\starttext \showgrid
\section{\input tufte}
\input tufte \par
\subsection{Test}
\stoptext

%%% Local Variables: 
%%% mode: context
%%% TeX-master: t
%%% End: 

[-- Attachment #3: Type: text/plain, Size: 32 bytes --]



Thank you in advance

	Andreas

[-- Attachment #4: Type: text/plain, Size: 486 bytes --]

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-30 16:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-30 16:13 smaller inter line space for headings (on a grid) Andreas Harder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).