ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Some odd behaviour I noticed in MkIV with respect to enumerations
@ 2012-10-23 15:58 Shane Peelar
  2012-10-23 16:21 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Shane Peelar @ 2012-10-23 15:58 UTC (permalink / raw)
  To: ntg-context


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

Hello everyone,

I was going through a tutorial to learn how to set up theorem-like
environments in ConTeXt:
http://www.ntg.nl/maps/36/09.pdf

and I noticed a few strange behaviours.  I recognize that this tutorial was
written for MkII ConTeXt,
but after consulting the documentation in the latest ConTeXt manual and the
wiki, I have determined
that these features should still work.  I'm looking at the "list"
functionality of enumerations and descriptions.
In MkII, you can do the following:

\defineenumeration[blah][
...
list=listname,
listtext={Text goes here}]

and every time the enumeration is used, it'll be placed in the list you
specify.
The tutorial referenced above uses this to place a list of theorems with
proper naming and numbering,
as well as lemmas and other math things.  In MkIV, I noticed that this
functionality doesn't work, or at least not in the same way.  I was not
able to do:

\placelist[enumeration:listname]

for example.  I was able to do \placelist[blah], however.  After scouring
this mailing list and consulting the source code, I haven't been able to
find anything that would give me this functionality in MkIV.  Was this
intentional, or is there another way to get this functionality back?

The other strangeness I noticed was the "separator" option in
defineenumeration.
Normally one could do:
\defineenumeration[blah2][
...
separator=--]

and things would work as they should, however this doesn't seem to work in
MkIV.  The last piece of functionality I noticed was not being able to set
the number style in defineenumeration (which again works in MkII, tested
this morning), like so:

\defineenumeration[blah3][
numberstyle=bold]

The wiki shows that these options should all be there, and they appear to
be at least referenced in the source code, but I'm not familiar enough with
the codebase to really give a good judgment of that.  I noticed in one file
"strc-des.mkiv" it says in a comment "lists and titles are experimental".
Could anyone please help me out with these features?

Thanks,
Shane Peelar

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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Some odd behaviour I noticed in MkIV with respect to enumerations
  2012-10-23 15:58 Some odd behaviour I noticed in MkIV with respect to enumerations Shane Peelar
@ 2012-10-23 16:21 ` Wolfgang Schuster
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2012-10-23 16:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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


Am 23.10.2012 um 17:58 schrieb Shane Peelar <lookatyouhacker@gmail.com>:

> Hello everyone,
> 
> I was going through a tutorial to learn how to set up theorem-like environments in ConTeXt:
> http://www.ntg.nl/maps/36/09.pdf
> 
> and I noticed a few strange behaviours.  I recognize that this tutorial was written for MkII ConTeXt,
> but after consulting the documentation in the latest ConTeXt manual and the wiki, I have determined
> that these features should still work.  I'm looking at the "list" functionality of enumerations and descriptions.
> In MkII, you can do the following:
> 
> \defineenumeration[blah][
> ...
> list=listname,
> listtext={Text goes here}]
> 
> and every time the enumeration is used, it'll be placed in the list you specify.
> The tutorial referenced above uses this to place a list of theorems with proper naming and numbering,
> as well as lemmas and other math things.  In MkIV, I noticed that this functionality doesn't work, or at least not in the same way.  I was not able to do:
> 
> \placelist[enumeration:listname]
> 
> for example.  I was able to do \placelist[blah], however.  After scouring this mailing list and consulting the source code, I haven't been able to find anything that would give me this functionality in MkIV.  Was this intentional, or is there another way to get this functionality back?
> 
> The other strangeness I noticed was the "separator" option in defineenumeration.
> Normally one could do:
> \defineenumeration[blah2][
> ...
> separator=--]
> 
> and things would work as they should, however this doesn't seem to work in MkIV.  The last piece of functionality I noticed was not being able to set the number style in defineenumeration (which again works in MkII, tested this morning), like so:
> 
> \defineenumeration[blah3][
> numberstyle=bold]
> 
> The wiki shows that these options should all be there, and they appear to be at least referenced in the source code, but I'm not familiar enough with the codebase to really give a good judgment of that.  I noticed in one file "strc-des.mkiv" it says in a comment "lists and titles are experimental".  Could anyone please help me out with these features?

\defineseparatorset[dash][][--]

\defineenumeration
  [test]
  [text=Test,
   headstyle=bolditalic,
   numberseparatorset=dash]

\starttext

\placelist[test]

\starttest[title={Knuth}]
\input knuth
\stoptest

\startsubtest[title={Zapf}]
\input zapf
\stopsubtest

\stoptext

Wolfgang

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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Some odd behaviour I noticed in MkIV with respect to enumerations
  2012-10-23 17:36 ` ntg-context Digest, Vol 100, Issue 63 Shane Peelar
@ 2012-10-23 18:31   ` Wolfgang Schuster
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2012-10-23 18:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 23.10.2012 um 19:36 schrieb Shane Peelar <lookatyouhacker@gmail.com>:

> Hi Wolfgang,
> 
> Thanks for the quick and helpful reply.  Is there also a way to change just the number colour and style in the example you provided?

\defineseparatorset [testseparator] [][–]

\defineprocessor[teststyle][style=bolditalic]
\defineconversionset[testconversion][][teststyle->number]

%\defineprocessor[one][style=italic,color=red]
%\defineprocessor[two][style=normal,color=blue]
%\defineconversionset[testconversion][one->number,two->number][teststyle->number]

\defineenumeration
  [test]
  [text=Test,
   headstyle=bold,
   numberconversionset=testconversion,
   numberseparatorset=testseparator]

\starttext

\placelist[test]

\starttest[title={Knuth}]
\input knuth
\stoptest

\startsubtest[title={Zapf}]
\input zapf
\stopsubtest

\stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2012-10-23 18:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-23 15:58 Some odd behaviour I noticed in MkIV with respect to enumerations Shane Peelar
2012-10-23 16:21 ` Wolfgang Schuster
     [not found] <mailman.619.1351009277.2084.ntg-context@ntg.nl>
2012-10-23 17:36 ` ntg-context Digest, Vol 100, Issue 63 Shane Peelar
2012-10-23 18:31   ` Some odd behaviour I noticed in MkIV with respect to enumerations Wolfgang Schuster

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).