[NTG-context] \placeregister[index][compress=yes] BROKEN ??

Taco Hoekwater taco at elvenkind.com
Tue Jan 29 17:45:37 CET 2008


Steffen Wolfrum wrote:
> In context version 20070417 it works. The next one (2007-07-24) fails.

And here is a document-level patch (mkii mode) that fixes it.
I leave it up to Hans to formalize this properly.

\unprotect

% The standard \mkloadregister takes one 1 argument, not enough
% because the before and after placeregister commands are then
% not executed. Xtended definition:
\def\mkloadregisterX#1#2#3%
   {\doutilities{#1}{\registerparameter\c!file}{#1}{#2}{#3}}

\def\doplaceregister[#1][#2]%
   {\iffirstargument
      \begingroup
      \edef\currentregister{#1}%
      \setupregister[\currentregister][#2]%
      \doifelse{\registerparameter\c!compress}\v!yes % new
         {\chardef\collapseregisterpages\plusone}
         {\chardef\collapseregisterpages\zerocount}%
      \raggedright
      \startcolumns
        [\c!n=\registerparameter\c!n,
         \c!balance=\registerparameter\c!balance,
         \c!align=\registerparameter\c!align]%
      \dontcomplain
      \startpacked[\v!blank]%
      \mkloadregisterX % TH this does it
         \currentregister\dobeforeplaceregister\doafterplaceregister
      \stoppacked
      \stopcolumns
      \endgroup
    \fi}
\protect


Best wishes,
Taco


More information about the ntg-context mailing list