problems with indented columnized itemization
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 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? Thanks for your attention, --Stefan
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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Stefan Wachter