Hey list, I'd like an itemized list using the following format... Article I ... Article II ... Article III ... ...and so on. I've tried defining the behaviour with... \defineenumeration[article] [location=top, text=Article, between=\blank, before=\blank, after=\blank] \setupenumerations[article][R] ...but the problem is that after a list of items provided with matching \startarticle \stoparticle pairs, the last count persists to the next list of items which should start at 'I' again. I am assuming I am not doing this correctly and would appreciate any suggestions. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
On Sun, 4 Mar 2012, Kip Warner wrote:
Hey list,
I'd like an itemized list using the following format...
Article I ... Article II ... Article III ...
...and so on. I've tried defining the behaviour with...
\defineenumeration[article] [location=top, text=Article, between=\blank, before=\blank, after=\blank] \setupenumerations[article][R]
...but the problem is that after a list of items provided with matching \startarticle \stoparticle pairs, the last count persists to the next list of items which should start at 'I' again. I am assuming I am not doing this correctly and would appreciate any suggestions.
Use itemgroup rather than enumerations. Aditya
On Sun, 2012-03-04 at 23:26 -0500, Aditya Mahajan wrote:
On Sun, 4 Mar 2012, Kip Warner wrote:
Hey list,
I'd like an itemized list using the following format...
Article I ... Article II ... Article III ...
...and so on. I've tried defining the behaviour with...
\defineenumeration[article] [location=top, text=Article, between=\blank, before=\blank, after=\blank] \setupenumerations[article][R]
...but the problem is that after a list of items provided with matching \startarticle \stoparticle pairs, the last count persists to the next list of items which should start at 'I' again. I am assuming I am not doing this correctly and would appreciate any suggestions.
Use itemgroup rather than enumerations.
Thanks Aditya, but could you give me an example of how to do this? As usual, I am not able to take much away from the ConTeXt wiki. Sorry. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
On Mon, 5 Mar 2012, Kip Warner wrote:
On Sun, 2012-03-04 at 23:26 -0500, Aditya Mahajan wrote:
On Sun, 4 Mar 2012, Kip Warner wrote:
Hey list,
I'd like an itemized list using the following format...
Article I ... Article II ... Article III ...
...and so on. I've tried defining the behaviour with...
\defineenumeration[article] [location=top, text=Article, between=\blank, before=\blank, after=\blank] \setupenumerations[article][R]
...but the problem is that after a list of items provided with matching \startarticle \stoparticle pairs, the last count persists to the next list of items which should start at 'I' again. I am assuming I am not doing this correctly and would appreciate any suggestions.
Use itemgroup rather than enumerations.
Thanks Aditya, but could you give me an example of how to do this? As usual, I am not able to take much away from the ConTeXt wiki. Sorry.
\defineitemgroup[article] \setupitemgroup [article] [ left={Article }, stopper=, symbol=R, before=\blank, after=\blank, distance=0.5em, ] \setupitemgroup [article] [broad,fit] \starttext \startarticle \item First article \item Second article \stoparticle Again \startarticle \item First article \item Second article \stoparticle \stoptext Aditya
On Mon, 2012-03-05 at 22:10 -0500, Aditya Mahajan wrote: Thanks Aditya. A couple questions for you.
\defineitemgroup[article]
\setupitemgroup [article] [ left={Article }, stopper=, symbol=R, before=\blank, after=\blank, distance=0.5em, ]
\setupitemgroup [article] [broad,fit]
Why is another \setupitemgroup being used here when broad,fit could have been merged with its previous one that both affected the article itemgroup?
\starttext
\startarticle \item First article \item Second article \stoparticle
Again
How do I add an extra line after the header? I tried adding another \blank to the after parameter of \setupitemgroup, but it didn't seem to use it.
\startarticle \item First article \item Second article \stoparticle \stoptext
Aditya
Lastly, how do I change the text colour of the item header? I tried the following to no avail, \setuphead [article] [color=colour_head] -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
On Mon, 5 Mar 2012, Kip Warner wrote:
On Mon, 2012-03-05 at 22:10 -0500, Aditya Mahajan wrote:
Thanks Aditya. A couple questions for you.
\defineitemgroup[article]
\setupitemgroup [article] [ left={Article }, stopper=, symbol=R, before=\blank, after=\blank, distance=0.5em, ]
\setupitemgroup [article] [broad,fit]
Why is another \setupitemgroup being used here when broad,fit could have been merged with its previous one that both affected the article itemgroup?
Thats how itemgroup are configured. You cannot mix assignments (key=value) with options.
\starttext
\startarticle \item First article \item Second article \stoparticle
Again
How do I add an extra line after the header?
You can use \setupitemgroup [article] [command=\blank] (in this case you can remove the second configuration (the one with broad, fit) or explicitly set width=0).
I tried adding another \blank to the after parameter of \setupitemgroup, but it didn't seem to use it.
\startarticle \item First article \item Second article \stoparticle \stoptext
Aditya
Lastly, how do I change the text colour of the item header? I tried the following to no avail,
\setuphead [article] [color=colour_head]
Why do you expect \setuphead to change the way itemgroups behave? Use \setupitemgroup [article] [color=...] Aditya
On Mon, 2012-03-05 at 22:44 -0500, Aditya Mahajan wrote:
Thats how itemgroup are configured. You cannot mix assignments (key=value) with options.
I don't follow. What is the difference between this, \setupitemgroup [article] [ left={Article }, stopper=, symbol=R, before=\blank, after=\blank, distance=0.5em, ] \setupitemgroup [article] [broad,fit] , and this? \setupitemgroup [article] [ left={Article }, stopper=, symbol=R, before=\blank, after=\blank, distance=0.5em, broad, fit ]
You can use
\setupitemgroup [article] [command=\blank]
That worked. Thanks.
Why do you expect \setuphead to change the way itemgroups behave?
Because I can't make any sense of the thousands of pages of ConTeXt documentation scattered everywhere with little apparent rhyme or reason to its usage and with everything other than whatever it is that I seem to need present in them.
Use
\setupitemgroup [article] [color=...]
I tried that and it did nothing. \definecolor[colour_text][r=0.754,g=0.516,b=0.324] \setupitemgroup [article] [color=colour_text] -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
On Mon, 5 Mar 2012, Kip Warner wrote:
On Mon, 2012-03-05 at 22:44 -0500, Aditya Mahajan wrote:
Thats how itemgroup are configured. You cannot mix assignments (key=value) with options.
I don't follow. What is the difference between this,
\setupitemgroup [article] [ left={Article }, stopper=, symbol=R, before=\blank, after=\blank, distance=0.5em, ] \setupitemgroup [article] [broad,fit]
, and this?
\setupitemgroup [article] [ left={Article }, stopper=, symbol=R, before=\blank, after=\blank, distance=0.5em, broad, fit ]
ConTeXt checks if the argument of \setupitemgroup has an assignment (key=value), then it calls a version of \setparameters; otherwise it calls a version of \processcommalist. So, if you use assignments and options in the same command, the options get ignored. All ConTeXt commands behave like this.
You can use
\setupitemgroup [article] [command=\blank]
That worked. Thanks.
Why do you expect \setuphead to change the way itemgroups behave?
Because I can't make any sense of the thousands of pages of ConTeXt documentation scattered everywhere with little apparent rhyme or reason to its usage and with everything other than whatever it is that I seem to need present in them.
If you define a command using \define<...>, then you configure it using \setup<....>. Other than a few exceptions, that's how it is.
Use
\setupitemgroup [article] [color=...]
I tried that and it did nothing.
\definecolor[colour_text][r=0.754,g=0.516,b=0.324] \setupitemgroup [article] [color=colour_text]
Minimal example? Aditya
On Tue, 2012-03-06 at 00:22 -0500, Aditya Mahajan wrote:
ConTeXt checks if the argument of \setupitemgroup has an assignment (key=value), then it calls a version of \setparameters; otherwise it calls a version of \processcommalist. So, if you use assignments and options in the same command, the options get ignored.
All ConTeXt commands behave like this.
That's probably buried deep in the documentation somewhere and in that sense it's my fault. But at the same time, that's got to be the most counterintuitive syntax of any language I've ever used.
\definecolor[colour_text][r=0.754,g=0.516,b=0.324] \setupitemgroup [article] [color=colour_text]
Minimal example?
Aditya
It's ok, I found the problem. The code works, but I was setting the wrong color value ;) -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
On Mon, 2012-03-05 at 22:10 -0500, Aditya Mahajan wrote:
\starttext
\startarticle \item First article \item Second article \stoparticle
Again
Another thing I just noticed is that using \startarticle[start=20] before an item block doesn't always begin counting at that. On some blocks it starts where it should at 'start', and other times it ignores it and starts from 1 again.
\startarticle \item First article \item Second article \stoparticle \stoptext
Aditya
-- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
participants (2)
-
Aditya Mahajan
-
Kip Warner