ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* custom itemize
@ 2006-08-04 14:14 Renaud AUBIN
  2006-08-04 14:55 ` Taco Hoekwater
  0 siblings, 1 reply; 4+ messages in thread
From: Renaud AUBIN @ 2006-08-04 14:14 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 807 bytes --]


Hi all,

Some times ago, Taco helps me to define a custom itemize:
\setbox0=\hbox{--~}
\def\indenteddash#1{\hskip\parindent--~}
\definesymbol[indentdash][\indenteddash]
\setupitemize[each][indentdash,packed,joinedup,intext][indentnext=yes,width=\dimexpr
\parindent + \wd0 \relax]

The result of, for example:
\startitemize
\item first paragraph ... with a lot of text (multiline),
\item second paragraph ... with a lot of text (multiline).
\stopitemize

is:
     -- first paragraph ..
.... with a lot of text (multiline),
     -- second paragraph ..
.... with a lot of text (multiline).

Now, I would a new custom itemize with numbered items:

     1. first paragraph ..
.... with a lot of text (multiline),
     2. second paragraph ..
.... with a lot of text (multiline).

How to do that ?

TIA


Renaud


[-- Attachment #1.2: Type: text/html, Size: 1562 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: custom itemize
  2006-08-04 14:14 custom itemize Renaud AUBIN
@ 2006-08-04 14:55 ` Taco Hoekwater
  2006-08-04 15:48   ` Renaud AUBIN
  0 siblings, 1 reply; 4+ messages in thread
From: Taco Hoekwater @ 2006-08-04 14:55 UTC (permalink / raw)




Renaud AUBIN wrote:
> 
> Hi all,
> 
> Some times ago, Taco helps me to define a custom itemize:
> \setbox0=\hbox{--~}
> \def\indenteddash#1{\hskip\parindent--~}
> \definesymbol[indentdash][\indenteddash]
> \setupitemize[each][indentdash,packed,joinedup,intext][indentnext=yes,width=\dimexpr 
> \parindent + \wd0 \relax]

> Now, I would a new custom itemize with numbered items:
> 
>      1. first paragraph ..
> .... with a lot of text (multiline),
>      2. second paragraph ..
> .... with a lot of text (multiline).
> 
> How to do that ?

  \setbox0=\hbox{0.~}
  \def\indenteddash#1{\hskip\parindent #1.~}
  \defineconversion[indentdash][\indenteddash]
  \setup... % as before

Taco

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: custom itemize
  2006-08-04 14:55 ` Taco Hoekwater
@ 2006-08-04 15:48   ` Renaud AUBIN
  2006-08-07 17:16     ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: Renaud AUBIN @ 2006-08-04 15:48 UTC (permalink / raw)



% frenchitemize
\setbox0=\hbox{--~}
\def\indenteddash#1{\hskip\parindent--~}
\definesymbol[indentdash][\indenteddash]
\def\startfrenchitemize{\startitemize[indentdash,packed,joinedup,intext][indentnext=yes,width=\dimexpr
\parindent + \wd0 \relax]}
\def\stopfrenchitemize{\stopitemize}

% frenchenumerate
\setbox1=\hbox{0.~}
\def\indentedfrenchnumber#1{\hskip\parindent#1.~}
\defineconversion[frenchnumber][\indentedfrenchnumber]
\def\startfrenchenumerate{\startitemize[frenchnumber,packed,joinedup,intext][stopper={},indentnext=yes,width=\dimexpr
\parindent + \wd1 \relax]}
\def\stopfrenchenumerate{\stopitemize}

% default behavior of itemize (frenchitemize)
\setupitemize[each][indentdash,packed,joinedup,intext][indentnext=yes,width=\dimexpr
\parindent + \wd0 \relax]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: custom itemize
  2006-08-04 15:48   ` Renaud AUBIN
@ 2006-08-07 17:16     ` Aditya Mahajan
  0 siblings, 0 replies; 4+ messages in thread
From: Aditya Mahajan @ 2006-08-07 17:16 UTC (permalink / raw)


On Fri, 4 Aug 2006, Renaud AUBIN wrote:

>
> % frenchitemize
> \setbox0=\hbox{--~}
> \def\indenteddash#1{\hskip\parindent--~}
> \definesymbol[indentdash][\indenteddash]
> \def\startfrenchitemize{\startitemize[indentdash,packed,joinedup,intext][indentnext=yes,width=\dimexpr
> \parindent + \wd0 \relax]}
> \def\stopfrenchitemize{\stopitemize}
>
> % frenchenumerate
> \setbox1=\hbox{0.~}
> \def\indentedfrenchnumber#1{\hskip\parindent#1.~}
> \defineconversion[frenchnumber][\indentedfrenchnumber]
> \def\startfrenchenumerate{\startitemize[frenchnumber,packed,joinedup,intext][stopper={},indentnext=yes,width=\dimexpr
> \parindent + \wd1 \relax]}
> \def\stopfrenchenumerate{\stopitemize}

There is \setupitemgroup and \defineitemgroup for this kind of things. 
So you can do

\defineitemgroup[frenchitemize]
\setupitemgroup[frenchitemize]
                [each]
                [indentdash,packed,joinedup,intext]
                [indentnext=yes,width=\dimexpr \parindent + \wd0 \relax]

etc.

Aditya

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-08-07 17:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-04 14:14 custom itemize Renaud AUBIN
2006-08-04 14:55 ` Taco Hoekwater
2006-08-04 15:48   ` Renaud AUBIN
2006-08-07 17:16     ` Aditya Mahajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).