Am 29.08.2008 um 11:18 schrieb Peter Rolf:

> Steffen Wolfrum schrieb:
>> Hi,
>>
>> sorry for my foggy post last night (02:50h ...)
>>
>> Hopefully this example makes it clearer:
>> --  
>>
>> \starttext
>> \showframe
>>
>> \definehead[EbeneFuenf]    [subsubsubsection]
>> \setupsection[section-6][conversion=characters,previousnumber=yes]
>> \def\FuenfCommand#1{#1.}
>>
>> \def\CurrentEbeneFuenfNumber#1#2%
>> {\hbox to \hsize\bgroup%
>> \tbox{\midaligned 
>> \framed[offset=-0.5pt,frame=on,align=middle,width=0.85\textwidth] 
>> {{\FuenfCommand{\convertnumber{characters} 
>> {\countervalue{@@sesection-6}}}}{\kern0.75em}#2}}%
>>
>> \egroup}
>>
>> \setuphead[EbeneFuenf][command=\CurrentEbeneFuenfNumber]% using this
>> command moves the line 2mm down?!
>>
>
> % insert here
> \showboxes % see differences between \tbox and \hbox
>
>> \EbeneFuenf{Test}
>>
>> \stoptext
>>
>> -- 
>> I wanted to define a command with a fixed width in order to  
>> determine a
>> maximum width for a section.
>> But using this command (i.e. the "framed") also moves the section  
>> down
>> about 2mm!
>>
>> How can this be avoided?
>>
>
> have you tried my solution?


yes, thank you, it just didn't work as expected: there still was a  
small vertical skip.

this (provided by Wolfgang) is what i wanted to achieve:

\def\CurrentEbeneFuenfNumber#1#2%
  {\midaligned{\inframed[width=.85\textwidth,align=middle] 
{#1\kern0.75em#2}}}

thanks again for your efforts,

steffen



___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to