[NTG-context] width=local broken?

Hans Hagen pragma at wxs.nl
Tue Mar 12 11:52:31 CET 2013


On 3/12/2013 1:32 AM, reviczky at caesar.elte.hu wrote:
> Hi,
>
> I'm trying to use "width=local" in an enumartion, but the width is the
> same for hsize, broad and local.
>
> Example from the wiki
> (http://wiki.contextgarden.net/Framed#Width_broad_and_local):
> \setuppapersize[A5]
> \setuppapersize[A7,landscape][A7,landscape]
> \setupbodyfont[8pt,ss]
> \setupcolors[state=start]
> \setupframed[framecolor=blue]
> \showframe
> \starttext
> \framed[width=\hsize,align=middle]{width=hsize}
> \startitemize
> \setlocalhsize
> \item \framed[width=\hsize,align=middle]     {width=hsize}
> \item \framed[width=broad,align=middle]     {width=broad}
> \item \framed[width=local,align=middle]     {width=local}
> \stopitemize
> \stoptext
>
> Compare the above example with the picture from the wiki.
>
> Did something changed around "local"?

tricky ... you can play with (in pack-rul.mkiv) a changed order:

    % 2013/03/12: a change of order (sizes before align
    \csname\??framedoffsetalternative
      \ifcsname\??framedoffsetalternative\localoffset\endcsname
        \localoffset
      \else
        \s!unknown
      \fi
    \endcsname
    \csname\??framedwidthalternative
      \ifcsname\??framedwidthalternative\localwidth\endcsname
        \localwidth
      \else
        \s!unknown
      \fi
    \endcsname
    \csname\??framedheightalternative
      \ifcsname\??framedheightalternative\localheight\endcsname
        \localheight
      \else
        \s!unknown
      \fi
    \endcsname
    %
    \forgetall % should happen after \localwidth but before align
    %
    \ifx\localformat\empty
      \setfalse\c_framed_has_format
    \else
      \settrue\c_framed_has_format
      \dosetraggedcommand\localformat % not that fast
    \fi

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list