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? same answer :) the \tbox does exactly what it should do (see p.85, context manual). use a \hbox instead and the text is (nearly, exactly?) on the same vertical position as plain text. but this highly depends on the offset of \framed. btw: you need the outer \hbox for the right total width and the inner \framed for the frame and alignment. why the \tbox or any additional box? best wishes, peter > 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 ___________________________________________________________________________________