I have a list like this: \startitemize[1]\item fish\item eggs\item milk\stopitemize Is there any command in ConTeXt to make this display the items as a comma-separated list, like this: fish, eggs, milk Or a semi-colon-separated list? fish; eggs; milk --Joel
On 2/25/2023 5:01 PM, Joel via ntg-context wrote:
I have a list like this:
\startitemize[1] \item fish \item eggs \item milk \stopitemize
Is there any command in ConTeXt to make this display the items as a comma-separated list, like this:
fish, eggs, milk
Or a semi-colon-separated list?
fish; eggs; milk
it's not that hard to add a few lines to the core to support that, so i'll look into it
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 2/25/2023 5:01 PM, Joel via ntg-context wrote:
I have a list like this:
\startitemize[1] \item fish \item eggs \item milk \stopitemize
Is there any command in ConTeXt to make this display the items as a comma-separated list, like this:
fish, eggs, milk
Or a semi-colon-separated list?
fish; eggs; milk
In the next update you can set a textseparator.
\starttext
\startitemize[none,text][textseparator=;] \item fish \item eggs \item milk \stopitemize
\defineitemgroup [fooditems]
\setupitemgroup [fooditems] [each] [none,text] [textseparator=;]
\blank[2*line]
\startfooditems \item fish \item eggs \item milk \stopfooditems
\stoptext
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
I tested the code and the separator didn’t show up
\mainlanguage[sv]
\setupbodyfont[12pt]
\defineitemgroup [fooditems]
\setupitemgroup [fooditems] [each] [none,text] [textseparator=,]
\starttext
\startfooditems \item fish \item eggs \item milk \stopfooditems
\stoptext
26 feb. 2023 kl. 11:55 skrev Hans Hagen via ntg-context ntg-context@ntg.nl:
On 2/25/2023 5:01 PM, Joel via ntg-context wrote:
I have a list like this: \startitemize[1] \item fish \item eggs \item milk \stopitemize Is there any command in ConTeXt to make this display the items as a comma-separated list, like this: fish, eggs, milk Or a semi-colon-separated list? fish; eggs; milk
In the next update you can set a textseparator.
\starttext
\startitemize[none,text][textseparator=;] \item fish \item eggs \item milk \stopitemize
\defineitemgroup [fooditems]
\setupitemgroup [fooditems] [each] [none,text] [textseparator=;]
\blank[2*line]
\startfooditems \item fish \item eggs \item milk \stopfooditems
\stoptext
Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________
\setupitemgroup [fooditems] [each] [none,text] [textseparator={,}]
Comma is used to separate options; if you don't use braces, it means that the textseparator is set to the empty string.
Massi
Il 27/02/23 12:33, Jan-Erik Hägglöf via ntg-context ha scritto:
I tested the code and the separator didn’t show up
\mainlanguage[sv]
\setupbodyfont[12pt]
\defineitemgroup [fooditems]
\setupitemgroup [fooditems] [each] [none,text] [textseparator=,]
\starttext
\startfooditems \item fish \item eggs \item milk \stopfooditems
\stoptext
26 feb. 2023 kl. 11:55 skrev Hans Hagen via ntg-context <ntg-context@ntg.nl mailto:ntg-context@ntg.nl>:
On 2/25/2023 5:01 PM, Joel via ntg-context wrote:
I have a list like this: \startitemize[1] \item fish \item eggs \item milk \stopitemize Is there any command in ConTeXt to make this display the items as a comma-separated list, like this: fish, eggs, milk Or a semi-colon-separated list? fish; eggs; milk
In the next update you can set a textseparator.
\starttext
\startitemize[none,text][textseparator=;] \item fish \item eggs \item milk \stopitemize
\defineitemgroup [fooditems]
\setupitemgroup [fooditems] [each] [none,text] [textseparator=;]
\blank[2*line]
\startfooditems \item fish \item eggs \item milk \stopfooditems
\stoptext
Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl
http://www.pragma-ade.nl | www.pragma-pod.nl http://www.pragma-pod.nl
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl https://www.pragma-ade.nl / http://context.aanhet.net http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net https://contextgarden.net ___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________
I added the braces but still no difference, still empty between items
Jan-Erik Hägglöf skrantajanneman@gmail.com
ConTeXt ver: 2023.02.23 21:26 LMTX fmt: 2023.2.27 int: english/english
27 feb. 2023 kl. 12:53 skrev mf via ntg-context ntg-context@ntg.nl:
\setupitemgroup [fooditems] [each] [none,text] [textseparator={,}]
Comma is used to separate options; if you don't use braces, it means that the textseparator is set to the empty string.
Massi
Il 27/02/23 12:33, Jan-Erik Hägglöf via ntg-context ha scritto:
I tested the code and the separator didn’t show up \mainlanguage[sv] \setupbodyfont[12pt] \defineitemgroup [fooditems] \setupitemgroup [fooditems] [each] [none,text] [textseparator=,] \starttext \startfooditems \item fish \item eggs \item milk \stopfooditems \stoptext
26 feb. 2023 kl. 11:55 skrev Hans Hagen via ntg-context <ntg-context@ntg.nl mailto:ntg-context@ntg.nl <mailto:ntg-context@ntg.nl mailto:ntg-context@ntg.nl>>:
On 2/25/2023 5:01 PM, Joel via ntg-context wrote:
I have a list like this: \startitemize[1] \item fish \item eggs \item milk \stopitemize Is there any command in ConTeXt to make this display the items as a comma-separated list, like this: fish, eggs, milk Or a semi-colon-separated list? fish; eggs; milk
In the next update you can set a textseparator.
\starttext
\startitemize[none,text][textseparator=;] \item fish \item eggs \item milk \stopitemize
\defineitemgroup [fooditems]
\setupitemgroup [fooditems] [each] [none,text] [textseparator=;]
\blank[2*line]
\startfooditems \item fish \item eggs \item milk \stopfooditems
\stoptext
Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> <http://www.pragma-ade.nl <http://www.pragma-ade.nl/>> | www.pragma-pod.nl <http://www.pragma-pod.nl/><http://www.pragma-pod.nl <http://www.pragma-pod.nl/>>
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl <mailto:ntg-context@ntg.nl mailto:ntg-context@ntg.nl> / https://www.ntg.nl/mailman/listinfo/ntg-context https://www.ntg.nl/mailman/listinfo/ntg-context<https://www.ntg.nl/mailman/listinfo/ntg-context https://www.ntg.nl/mailman/listinfo/ntg-context> webpage : https://www.pragma-ade.nl https://www.pragma-ade.nl/ <https://www.pragma-ade.nl https://www.pragma-ade.nl/> / http://context.aanhet.net http://context.aanhet.net/<http://context.aanhet.net http://context.aanhet.net/> archive : https://bitbucket.org/phg/context-mirror/commits/ https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/ https://bitbucket.org/phg/context-mirror/commits/> wiki : https://contextgarden.net https://contextgarden.net/ <https://contextgarden.net https://contextgarden.net/> ___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl https://www.pragma-ade.nl/ / http://context.aanhet.net http://context.aanhet.net/ archive : https://bitbucket.org/phg/context-mirror/commits/ https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net https://contextgarden.net/ ___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl https://www.pragma-ade.nl/ / http://context.aanhet.net http://context.aanhet.net/ archive : https://bitbucket.org/phg/context-mirror/commits/ https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net https://contextgarden.net/ ___________________________________________________________________________________
Hi,
Indeed you are right. However, Hans said the feature would be added in the next update: so you have to wait a little bit :-)
Best regards: Otared
On 27 Feb 2023, at 12:33, Jan-Erik Hägglöf via ntg-context ntg-context@ntg.nl wrote:
I tested the code and the separator didn’t show up
\mainlanguage[sv]
\setupbodyfont[12pt]
\defineitemgroup [fooditems]
\setupitemgroup [fooditems] [each] [none,text] [textseparator=,]
\starttext
\startfooditems \item fish \item eggs \item milk \stopfooditems
\stoptext <test.log> <test.pdf> <test.tex>
26 feb. 2023 kl. 11:55 skrev Hans Hagen via ntg-context <ntg-context@ntg.nl mailto:ntg-context@ntg.nl>:
On 2/25/2023 5:01 PM, Joel via ntg-context wrote:
I have a list like this: \startitemize[1] \item fish \item eggs \item milk \stopitemize Is there any command in ConTeXt to make this display the items as a comma-separated list, like this: fish, eggs, milk Or a semi-colon-separated list? fish; eggs; milk
In the next update you can set a textseparator.
\starttext
\startitemize[none,text][textseparator=;] \item fish \item eggs \item milk \stopitemize
\defineitemgroup [fooditems]
\setupitemgroup [fooditems] [each] [none,text] [textseparator=;]
\blank[2*line]
\startfooditems \item fish \item eggs \item milk \stopfooditems
\stoptext
Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | www.pragma-pod.nl <http://www.pragma-pod.nl/>
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl https://www.pragma-ade.nl/ / http://context.aanhet.net http://context.aanhet.net/ archive : https://bitbucket.org/phg/context-mirror/commits/ https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net https://contextgarden.net/ ___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________
Otared Kavian e-mail: otared@gmail.com Phone: +33 6 88 26 70 95