Hello, does ConTeXt have something which is halfway between itemizations and descriptions? I have a small set of properties that should be enumerated together. Right now I'm doing it by defining a \description and then doing \desc{something} stuff \par \desc{something else} other stuff \par etc However, this is an overall cumbersome syntax, especially for the result I would like to obtain. using \startitemize ...\stopitemize with \sym{something} \sym{something else} comes *very* close to what I would like but I can't seem to find a way to prevent the \sym text to wade into the actualt text of the description. Suggestions? -- Giuseppe "Oblomov" Bilotta
Giuseppe Bilotta wrote:
Hello,
does ConTeXt have something which is halfway between itemizations and descriptions? I have a small set of properties that should be enumerated together. Right now I'm doing it by defining a \description and then doing
\desc{something} stuff \par \desc{something else} other stuff \par etc
\startdesc {something} .... \stopdesc is an alternative syntax
However, this is an overall cumbersome syntax, especially for the result I would like to obtain.
using \startitemize ...\stopitemize with \sym{something} \sym{something else} comes *very* close to what I would like but I can't seem to find a way to prevent the \sym text to wade into the actualt text of the description.
Suggestions?
you want more space for the sym? \startitemize[5*broad] \item {word} .... \item {another} .... \stopitemize (if needed, you can define an itemgroup with a default wider left margin) Hans
Wednesday, November 23, 2005 Hans Hagen wrote:
Giuseppe Bilotta wrote:
Hello,
does ConTeXt have something which is halfway between itemizations and descriptions? I have a small set of properties that should be enumerated together. Right now I'm doing it by defining a \description and then doing
\desc{something} stuff \par \desc{something else} other stuff \par etc
\startdesc {something} .... \stopdesc
is an alternative syntax
Yeah, I know, but it's still clumsy.
However, this is an overall cumbersome syntax, especially for the result I would like to obtain.
using \startitemize ...\stopitemize with \sym{something} \sym{something else} comes *very* close to what I would like but I can't seem to find a way to prevent the \sym text to wade into the actualt text of the description.
Suggestions?
you want more space for the sym?
\startitemize[5*broad] \item {word} .... \item {another} .... \stopitemize
(if needed, you can define an itemgroup with a default wider left margin)
No please this is horrible. I would like the item/desc/head to 'run in' the text. I guess I'll have to use the \startdesc stuff :\ -- Giuseppe "Oblomov" Bilotta
Wednesday, November 23, 2005 Giuseppe Bilotta wrote:
Wednesday, November 23, 2005 Hans Hagen wrote:
you want more space for the sym?
\startitemize[5*broad] \item {word} .... \item {another} .... \stopitemize
(if needed, you can define an itemgroup with a default wider left margin)
No please this is horrible. I would like the item/desc/head to 'run in' the text. I guess I'll have to use the \startdesc stuff :\
To be precise: the effect I'm looking for is one which could be obtained by \head commands in \start/\stopitemize, if we could have the heads run-in with the text. -- Giuseppe "Oblomov" Bilotta
Hi, Something like this? (PS. I cannot send mail to your address, it bounces, do you have an alternative one?) Hans \unprotect \def\v!txt{txt} \appendtoks \letvalue\v!txt \itemgrouptext \to \itemgroupcommands \setfalse\txtlistitem \def\itemgrouptext#1% {\def\symsymbol{\doitemattributes\itemlevel\c!headstyle\c!headcolor{#1}}% \symbolitemtrue \settrue\txtlistitem \itemgroupitem} \def\redostartitemgroup[#1][#2]% {\setfalse\inlinelistitem % new, no indent (leftskip) \setfalse\concatnextitem % new, concat \setfalse\txtlistitem \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]% \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}% \let\listitem\empty % ** start value \doifelsenothing{#1} % iffirstargument {\edef\@@opsymbol{\getitemparameter\itemlevel\c!symbol}% \letgvalueempty{\@@globalitemsymbol\itemlevel}% \global\letitemparameter\itemlevel\v!continue\empty \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]\docommando}% \ifx\listitem\empty \setitemmark\@@opsymbol % ** default value \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} \def\dolistitem % evt aantal items opslaan per niveau, scheelt zoeken {\iftextitems % begin of item \else \par \fi \ignorespaces \increment\noflistelements \ifnum\itemcolumndepth=\zerocount \ifoptimizeitems \ifnum\noflistelements=\plusone % tgv bv kolommen/nesting \findtwopassdata\s!list{\noflists:}% % wordt soms de volgorde \fi % verstoord, vandaar \find \iftwopassdatafound \ifcase0\twopassdata\relax \twopassdatafoundfalse \fi \fi \iftwopassdatafound \ifnum\twopassdata=3 \ifnum\noflistelements>1 \doitembreak\itemnobreak \fi \else\ifnum\twopassdata>3 \ifnum\noflistelements=2 \ifitemintro \doitembreak\nobreak \else \doitembreak\itemnobreak \fi \else\ifnum\twopassdata=\noflistelements\relax \doitembreak\itemnobreak \else\ifnum\noflistelements>2 \doitembreak\itembreak \else \ifitemintro\else\doitembreak\itembreak\fi \fi\fi\fi \fi\fi \fi \fi\fi \noindent \setbox8\hbox {\ifheaditem \ifsymbolitem \symsymbol \else \doitemattributes\itemlevel\c!headstyle\c!headcolor{\listitem}% \fi \else \ifsymbolitem \symsymbol % no attributes, why? \else \doitemattributes\itemlevel\c!style\c!color{\listitem}% \fi \fi}% \doifsomething\somdestination {\setbox8\hbox{\goto{\box8}[\somdestination]}}% \globallet\somdestination\empty \dimen2=\getitemparameter\itemlevel\c!width\relax \ht8=\strutheight \dp8=\strutdepth \checkforrepeatedlistitem \ifdim\dimen2<\zeropoint\relax \llap{\ifsubitem\llap{+}\fi\box8\hskip\leftmargindistance}% \else \ifdim\dimen2=\zeropoint\relax \calculatelistwidth1{\dimen0}% \else \calculatelistwidth\itemlevel{\dimen0}% \fi \iftextitems \hbox{\ifsubitem+\fi\box8\hskip\fontdimen2\font}\nobreak \else\ifconditional\inlinelistitem \hbox to \dimen0{\ifsubitem\llap{+}\fi\box8\hfill}% \else\ifconditional\txtlistitem \scratchdimen\wd8 \llap{\hbox to \dimen0{\ifsubitem\llap{+}\fi\box8\hfill}}% \hskip\scratchdimen % \hskip-\dimen0 this makes them touch \else \llap{\hbox to \dimen0{\ifsubitem\llap{+}\fi\box8\hfill}}% \fi\fi\fi \fi \forceunexpanded % needed for m conversion (\os) / i need to look into this \setevalue{\@@currentitemsymbol\itemlevel}% {\getvalue{\@@localitemsymbol\itemlevel}}% still problems with \uchar ? \resetunexpanded \headitemfalse \subitemfalse \symbolitemfalse \EveryPar{\ignorespaces}% \ignorespaces} \protect \starttext \input tufte \defineitemgroup[gbitemize] \setupitemgroup[gbitemize][each][headstyle=bold] \startgbitemize \txt{italian} some italians like this kind of cross||breed between an itemize and a description \txt{sicilians} i wonder how many sicilian mathematicians do a thesis on the math involved in predicting the next big bang of the vulcano \stopgbitemize \input tufte \stoptext
Thursday, November 24, 2005 Hans Hagen wrote:
Hi,
Something like this?
Yes, that's a good start :) however, I would leave the option to have both the symbol and the text, exactly as if it was run-in \head (i.e. with the actual item test following the \head text on the same line). However, you ma want to have this as an option to \head ... maybe it can already be achieved with an appropriate afterhead?
(PS. I cannot send mail to your address, it bounces, do you have an alternative one?)
Hm, which address is bouncing? bigfoot is long dead, use the one I'm sending this from. -- Giuseppe "Oblomov" Bilotta
Giuseppe Bilotta wrote:
Yes, that's a good start :) however, I would leave the option to have both the symbol and the text, exactly as if it was run-in \head (i.e. with the actual item test following the \head text on the same line). However, you ma want to have this as an option to \head ... maybe it can already be achieved with an appropriate afterhead?
so you want 1. somethingbold whatever text follows in running font 2. somethingelsebold whatever othertext follows in running font Hans
Hans Hagen wrote:
Giuseppe Bilotta wrote:
Yes, that's a good start :) however, I would leave the option to have both the symbol and the text, exactly as if it was run-in \head (i.e. with the actual item test following the \head text on the same line). However, you ma want to have this as an option to \head ... maybe it can already be achieved with an appropriate afterhead?
so you want
1. somethingbold whatever text follows in running font
2. somethingelsebold whatever othertext follows in running font
That would be quite simple, like so: \def\itemplus{\dosingleempty\doitemplus} \def\doitemplus[#1]#2{\item[#1] {\bf #2}} Right? Taco
Thursday, November 24, 2005 Taco Hoekwater wrote:
Hans Hagen wrote:
Giuseppe Bilotta wrote:
Yes, that's a good start :) however, I would leave the option to have both the symbol and the text, exactly as if it was run-in \head (i.e. with the actual item test following the \head text on the same line). However, you ma want to have this as an option to \head ... maybe it can already be achieved with an appropriate afterhead?
so you want
1. somethingbold whatever text follows in running font
2. somethingelsebold whatever othertext follows in running font
That would be quite simple, like so:
\def\itemplus{\dosingleempty\doitemplus} \def\doitemplus[#1]#2{\item[#1] {\bf #2}}
For example (where \bf is \someconfigurablecommand). However, I find it really 'funny' that there are n different methods to create items in an enumeration ... should these be rather enumeration options, so that you can use the same source code and just chang the stuff in \setup/\staritemize to achieve the different effects? This is why I was thinking of using \head, still, for example. -- Giuseppe "Oblomov" Bilotta
Giuseppe Bilotta wrote:
However, I find it really 'funny' that there are n different methods to create items in an enumeration ... should these be rather enumeration options, so that you can use the same source code and just chang the stuff in \setup/\staritemize to achieve the different effects?
This is why I was thinking of using \head, still, for example.
Ah, I see. So instead of just the \setupitemize[symbol=] have something more like \setupitemize[textcommand=, numbercommand=, command=] as for heads and such? Taco
Thursday, November 24, 2005 Taco Hoekwater wrote:
Giuseppe Bilotta wrote:
However, I find it really 'funny' that there are n different methods to create items in an enumeration ... should these be rather enumeration options, so that you can use the same source code and just chang the stuff in \setup/\staritemize to achieve the different effects?
This is why I was thinking of using \head, still, for example.
Ah, I see. So instead of just the
\setupitemize[symbol=]
have something more like
\setupitemize[textcommand=, numbercommand=, command=]
as for heads and such?
Or maybe something as simple as texthead=yes :) -- Giuseppe "Oblomov" Bilotta
Thursday, November 24, 2005 Taco Hoekwater wrote:
Giuseppe Bilotta wrote:
However, I find it really 'funny' that there are n different methods to create items in an enumeration ... should these be rather enumeration options, so that you can use the same source code and just chang the stuff in \setup/\staritemize to achieve the different effects?
This is why I was thinking of using \head, still, for example.
Giuseppe Bilotta wrote: this is a variant of taco's posted solution: \unprotect \def\complexdoitemgroupitem[#1]% too many historical \ignorespaces {\ifconditional\textlistitem % begin of item \else \par \fi \ignorespaces \ifconditional\concatnextitem % new, concat \doitembreak\nobreak % new, concat \fi % new, concat \doadvanceitem \ifnum\itemcolumndepth=0\relax\ifnum\noflistelements>0\relax \doitembreak\nobreak \fi\fi \ifconditional\firstlistitem \setfalse\firstlistitem \begingroup \ifcase\itemlevel \or % 1 \ifnum\itemcolumndepth=0\relax \ifconditional\introlistitem\doitembreak\nobreak\fi \getitemparameter1\c!before \ifconditional\introlistitem\doitembreak\nobreak\fi \fi \else % 2 en hoger \ifconditional\paragraphlistitem \else \let\previtemlevel\itemlevel \decrement\previtemlevel \ifcase\autoitemgroupspacing\relax % nieuw \getitemparameter\itemlevel\c!before \or \doifelsenothing{\getitemparameter\itemlevel\c!before} {\getitemparameter\itemlevel\c!before} {\getitemparameter\previtemlevel\c!inbetween}% \else \getitemparameter\previtemlevel\c!inbetween % == itemlevel-1 \fi \fi \fi \else \getitemparameter\itemlevel\c!inbetween \fi \ifconditional\concatnextitem % new, concat \vskip-\lastskip % new, concat \vskip-\lineheight % new, concat \nobreak % new, concat \fi % new, concat \ignorespaces \dolistitem \ifconditional\packlistitem \setupwhitespace[\v!none]% \fi \getitemparameter\itemlevel\c!inner \marsymbol \let\marsymbol\relax \doifsomething{#1} {\doifnot\itemreference\unknownitemreference {\bgroup \protectconversion \rawreference\s!lst{#1}\itemreference \egroup}}% \strut % added 11-08-99 \setfalse\concatnextitem % new, concat \hskip\itemsignal % new, concat \getitemparameter\itemlevel\c!command} \def\defaultitemcommand {\EveryPar{\ignorespaces}% \ignorespaces} \def\doinitializeitemgrouplevel#1% {\copyparameters [\??op\currentitemgroup#1][\??oo] [\c!width,\c!factor,\c!distance,\c!align,\c!option, \c!style,\c!marstyle,\c!symstyle,\c!headstyle, \c!color,\c!marcolor,\c!symcolor,\c!headcolor, \c!beforehead,\c!afterhead,\c!before,\c!inbetween,\c!after, \c!stopper,\c!placestopper,\c!indenting, \c!n,\c!inner,\c!symbol,\c!margin,\c!items, \c!leftmargin,\c!rightmargin,\c!indentnext, \c!command, \c!start,\c!lefttext,\c!righttext]} % test this: saves hash entries and is also faster % % \let\doinitializeitemgrouplevel\gobbleoneargument \def\getitemparameter#1#2% {\executeifdefined{\??op\currentitemgroup#1#2}% {\executeifdefined{\??op\currentitemgroup #2}% {\executeifdefined{\??oo #2}}}} \setupitemgroups[\c!command=\defaultitemcommand] \starttext \def\MyItemCommand#1{{\bf#1}\quad} \setupitemgroup[itemize][command=\MyItemCommand] \startitemize \item {test} is this okay? \item {test} is this okay? \item {test} is this okay? \stopitemize \stoptext so, this way you can hook in a command that is executed after the symbol placement Hans
Thursday, November 24, 2005 Hans Hagen wrote:
this is a variant of taco's posted solution:
[snip]
so, this way you can hook in a command that is executed after the symbol placement
I like it! (Ok, I won't use it this time because in the mean time I reworked the text to use \head, with the benefit of some extra lines which in a PhD thesis are always welcome :)) -- Giuseppe "Oblomov" Bilotta
Giuseppe Bilotta wrote:
Thursday, November 24, 2005 Hans Hagen wrote:
this is a variant of taco's posted solution:
[snip]
so, this way you can hook in a command that is executed after the symbol placement
I like it! (Ok, I won't use it this time because in the mean time I reworked the text to use \head, with the benefit of some extra lines which in a PhD thesis are always welcome :))
anyway, i posted an update at: www.pragma-ade.com/temp/cont-tmf.zip this one has - the interline patch - the itemize extensions - vit's columnset mark stuff (yet imperfect but ..) it's in /temp because i want it tested first -) Hans
Thursday, November 24, 2005 Hans Hagen wrote:
Giuseppe Bilotta wrote:
Thursday, November 24, 2005 Hans Hagen wrote:
this is a variant of taco's posted solution:
[snip]
so, this way you can hook in a command that is executed after the symbol placement
I like it! (Ok, I won't use it this time because in the mean time I reworked the text to use \head, with the benefit of some extra lines which in a PhD thesis are always welcome :))
anyway, i posted an update at:
www.pragma-ade.com/temp/cont-tmf.zip
this one has
- the interline patch - the itemize extensions - vit's columnset mark stuff (yet imperfect but ..)
it's in /temp because i want it tested first -)
Will I ever be able to thank you enough? :) Setting up the interline space works, thank you very much. (A minor nitpick: AFAIK standard typographical rules require footnotes to be single-spaced even when the text is doublespaced. Can we have an interlinespace= option for footnotes (and all other forms of non-mainline text)? Also, while the lists are not double-spaced (good!) the index (register) is. I think it shouldn't be.) (Also: for miktex you should set UseEnginePath to *false*; and kpsewhich does not use --engine= under miktex, at all.) I think that to rollout my thesis the only thing that needs a fix is the (local) \placecontent not working when resetnumber=no (see appropriate email) -- Giuseppe "Oblomov" Bilotta
Giuseppe Bilotta wrote:
(PS. I cannot send mail to your address, it bounces, do you have an alternative one?)
Hm, which address is bouncing? bigfoot is long dead, use the one I'm sending this from.
I get:
When trying to deliver your message, the mail server at controller-1 encountered
problems with the following addresses:
For
Thursday, November 24, 2005 Hans Hagen wrote:
Giuseppe Bilotta wrote:
(PS. I cannot send mail to your address, it bounces, do you have an alternative one?)
Hm, which address is bouncing? bigfoot is long dead, use the one I'm sending this from.
I get:
When trying to deliver your message, the mail server at controller-1 encountered problems with the following addresses:
For
, Site (iol.it/193.70.193.95) said: 504 <controller-1>: Helo command rejected: need fully-qualified hostname
Looks like your sending program or ISP doesn't provide a fully qualified hostname, but rather something like hagen@locahost or something. -- Giuseppe "Oblomov" Bilotta
participants (3)
-
Giuseppe Bilotta
-
Hans Hagen
-
Taco Hoekwater