From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/16660 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: problems with indented columnized itemization Date: Fri, 15 Oct 2004 11:18:26 +0200 Sender: ntg-context-bounces@ntg.nl Message-ID: <416F95E2.2060002@wxs.nl> References: <416D586D.400@gmx.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1097831925 19088 80.91.229.6 (15 Oct 2004 09:18:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Oct 2004 09:18:45 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 15 11:18:31 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CIOEJ-0004AA-00 for ; Fri, 15 Oct 2004 11:18:31 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E886912789; Fri, 15 Oct 2004 11:18:30 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00950-07; Fri, 15 Oct 2004 11:18:28 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A376F1276B; Fri, 15 Oct 2004 11:18:28 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0C3AF1276B for ; Fri, 15 Oct 2004 11:18:28 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00994-09 for ; Fri, 15 Oct 2004 11:18:27 +0200 (CEST) Original-Received: from mailrelay02.solcon.nl (unknown [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id 0A0B9126F8 for ; Fri, 15 Oct 2004 11:18:27 +0200 (CEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay02.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id i9F9IPi3007983 for ; Fri, 15 Oct 2004 11:18:25 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 82FE52EB43; Fri, 15 Oct 2004 11:18:26 +0200 (CEST) Original-Received: from [10.100.1.191] (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id 0E01617865 for ; Fri, 15 Oct 2004 09:18:25 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <416D586D.400@gmx.de> X-Virus-Scanned: ClamAV 0.80rc3/509/Wed Sep 29 11:09:42 2004 clamav-milter version 0.80c on mailrelay02 X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:16660 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:16660 Stefan Wachter wrote: > Hi all, > > I try to generate the following output: > > Some Label * item 1 * item 2 * item 3 > * item 4 * item 4 * item 5 > > i.e. I want to have a label followed by an itemization that is set in > columns. > > I tried several things but did not succeede > > 1. Variant - a tabulate environment > > \starttabulate[|l|p|] > \NC > \inframed[width=\LabelWidth,align=left]{Teilnehmer}\hskip\SepWidth > \NC > \startitemize[columns,three] > \item Bauherr > \item Architekt > \item Bauleiter > \stopitemize > \NC\NR > \stoptabulate this is beyond the tabulate handler; i guess i can implement support for that but it's not that trivial (using simplecolumns and collecting lines and such) > There the following problems: a) the itemization introduces an > additional empty line and b) the [columns,three] parameter is not > considered. > > 2. Variant - using a narrower > > \startnarrower[left] > \startitemize[columns,three] > \item Bauherr > \item Architekt > \item Bauleiter > \stopitemize > \stopnarrower > > The problem with this variant is that the coluns do not respect the > right margin, i.e. the items reach beyond the paper. > > > Has anyone a solution for this problem? see end of mail; the third one only works with the patched macro: \unprotect \def\redostartitemgroup[#1][#2]% {\setfalse\inlinelistitem % new, no indent (leftskip) \setfalse\concatnextitem % new, concat \ifhmode \ifconditional\autoconcatnextitem % new, concat \ifdim\lastskip=\itemsignal % new, concat \settrue\concatnextitem % new, concat \fi % new, concat \fi % new, concat \iftextitems\else\doifnotinset\v!text{#1}\par\fi % suboptimal \fi \begingroup \ifnum\itemlevel=\plusone % NIEUW \doadaptleftskip {\getitemparameter1\c!margin}% \doadaptleftskip {\getitemparameter1\c!leftmargin}% \doadaptrightskip{\getitemparameter1\c!rightmargin}% \fi \dosetraggedcommand{\getitemparameter\itemlevel\c!align}\raggedcommand \doifsomething{\getitemparameter\itemlevel\c!indenting} {% is \expanded needed? \expanded{\setupindenting[\getitemparameter\itemlevel\c!indenting]}}% \doifinset\v!columns{#1}% {\ifinsidecolumns\else\ifnum\itemcolumndepth=\zerocount \globallet\itemcolumndepth\itemlevel \getitemparameter\itemlevel\c!before \processfirstactioninset [#1] [ \v!one=>\!!counta1\relax, \v!two=>\!!counta2\relax, \v!three=>\!!counta3\relax, \v!four=>\!!counta4\relax, \v!five=>\!!counta5\relax, \s!unknown=>\@EA\!!counta\getitemparameter\itemlevel\c!n]% % new % \edef\columneditemleftskip{\the\leftskip}% % \def\postprocesscolumnbox##1% % {\scratchdimen\columneditemleftskip % \divide\scratchdimen \nofcolumns % \hbox{\hskip\columneditemleftskip\hbox{\box##1}}}% % \scratchdimen-\columneditemleftskip % \multiply\scratchdimen \nofcolumns % \advance\scratchdimen \columneditemleftskip % \advance\scratchdimen \hsize % \edef\columntextwidth{\the\scratchdimen}% % \leftskip\zeropoint % so far \startcolumns [\c!n=\!!counta, % netter \??op\itemlevel\c!n \c!height=, \c!rule=\v!off, \c!balance=\v!yes, \c!align=\v!no]% \fi\fi}% \doifinsetelse\v!intro{#1}\itemintrotrue\itemintrofalse \doglobal\increment\noflists \let\currentlist\noflists \newcounter\noflistelements \headitemfalse \subitemfalse \symbolitemfalse \let\marsymbol\relax \globallet\somdestination\empty \let\symsymbol\empty \the\itemgroupcommands \setitemlevel{#1}% %\getitemparameter\itemlevel\empty \let\listitem\empty % ** start value \doifelsenothing{#1} % iffirstargument {\edef\@@opsymbol{\getitemparameter\itemlevel\c!symbol}% \letgvalueempty{\@@globalitemsymbol\itemlevel}% \global\letitemparameter\itemlevel\v!continue\empty % \setitemmark\@@opsymbol % ** default value \dosetupitemgroupvariable[\itemlevel][#2]} {\dosetupitemgroupconstant[\itemlevel][#1]% \dosetupitemgroupvariable[\itemlevel][#2]% \doifinsetelse\v!continue{#1}% {\edef\@@opsymbol{\noexpand\getvalue{\@@globalitemsymbol\itemlevel}}% \getitemparameter\itemlevel\v!continue} {\edef\@@opsymbol{\noexpand\getitemparameter{\itemlevel}{\c!symbol}}% \global\setitemparameter\itemlevel\v!continue {\dosetupitemgroupconstant[\itemlevel][#1]% \dosetupitemgroupvariable[\itemlevel][#2]}}% \def\docommando##1% \setitemmark resets \docommando {\doifnot{##1}{0}{\setitemmark{##1}}}% % \processcommalist[#1,\@@opsymbol]\docommando \processcommalist[#1]\docommando}% \ifx\listitem\empty \setitemmark\@@opsymbol \ifx\listitem\empty \edef\currentitemsymbol{\itemlevel}% \fi \fi \ifautoitemintro\ifnum\prevgraf<3 \itemintrotrue \fi\fi \ifparagraphitems \ifnum\itemlevel>\plusone \letitemparameter\itemlevel\c!inbetween\empty \fi \else\ifpackeditems \letitemparameter\itemlevel\c!inbetween\empty \fi\fi \calculatelistwidth\itemlevel{\dimen0}% \ifdim\dimen0>\zeropoint\relax \ifconditional\inlinelistitem\else \advance\leftskip \dimen0\relax \fi \fi} \protect \starttext \setupbodyfont[small] \showframe \startnarrower[left] \startcolumns[n=3] \startitemize \item \input ward \item \input ward \item \input ward \stopitemize \stopcolumns \stopnarrower \blank \startnarrower[left] \startitemize[columns,three] \item \input ward \item \input ward \item \input ward \stopitemize \stopnarrower \blank \setupitemize[leftmargin=1.5em] \startitemize[columns,three] \item \input ward \item \input ward \item \input ward \stopitemize \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------