* Unexpected behaviour of enumeration in mkiv @ 2013-11-15 16:02 Thomas Möbius 2013-11-18 9:45 ` Wolfgang Schuster 0 siblings, 1 reply; 4+ messages in thread From: Thomas Möbius @ 2013-11-15 16:02 UTC (permalink / raw) To: mailing list for ConTeXt users Hi, please have a look at the minimal example at the bottom. I am typesetting theorems and lemmata which are numbered consecutively within chapters in a book. I used the same code for a document written in mkii, and I thought I could just reuse it in mkiv. Obviously, there is something I am missing. Question: How do I get the same output when compiling the following code with 'context' as when compiled with 'texexec'. When compiled with 'context', the chapter number is missing in the numbering of theorems. Lemmas are not numbered at all. ~~~snip~~~ \setupenumerations [title=yes, style=normal, list=all, before={\blank[big]}, after={\blank[big]}, location=serried, width=broad, distance=0.5em, headstyle=bold, titlestyle=bold, way=bychapter, conversion=numbers] \defineenumeration [theorem] [text=Theorem, listtext={Theorem }] \defineenumeration [lemma] [text=Lemma, listtext={Lemma }, number=theorem] \starttext \chapter{First chapter} \theorem Hello \theorem Hello \lemma Hello \theorem Hello \stoptext ~~~snip~~~ ___________________________________________________________________________________ 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] 4+ messages in thread
* Re: Unexpected behaviour of enumeration in mkiv 2013-11-15 16:02 Unexpected behaviour of enumeration in mkiv Thomas Möbius @ 2013-11-18 9:45 ` Wolfgang Schuster 2013-11-19 14:24 ` Thomas Möbius 0 siblings, 1 reply; 4+ messages in thread From: Wolfgang Schuster @ 2013-11-18 9:45 UTC (permalink / raw) To: mailing list for ConTeXt users Am 15.11.2013 um 17:02 schrieb Thomas Möbius <kontakt@thomasmoebius.de>: > Hi, > > please have a look at the minimal example at the bottom. I am > typesetting theorems and lemmata which are numbered consecutively > within chapters in a book. I used the same code for a document > written in mkii, and I thought I could just reuse it in mkiv. > Obviously, there is something I am missing. Question: How do I get > the same output when compiling the following code with 'context' as > when compiled with 'texexec'. > > When compiled with 'context', the chapter number is missing in the > numbering of theorems. Lemmas are not numbered at all. > > ~~~snip~~~ > \setupenumerations > [title=yes, > style=normal, > list=all, > before={\blank[big]}, > after={\blank[big]}, > location=serried, Change “location=serried” to “alternative=serried”. > width=broad, > distance=0.5em, > headstyle=bold, > titlestyle=bold, > way=bychapter, > conversion=numbers] You have to change “conversion” to “numberconversion” but this isn’t necessary because numbers are the default conversion format. To have chapter numbers as part of the counter add “prefix=yes”. > \defineenumeration > [theorem] > [text=Theorem, listtext={Theorem }] > > \defineenumeration > [lemma] > [text=Lemma, listtext={Lemma }, number=theorem] To use the counter of another enumeration use “counter=theorem”, not “name=theorem”. 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] 4+ messages in thread
* Re: Unexpected behaviour of enumeration in mkiv 2013-11-18 9:45 ` Wolfgang Schuster @ 2013-11-19 14:24 ` Thomas Möbius 2013-11-28 17:06 ` Thomas Möbius 0 siblings, 1 reply; 4+ messages in thread From: Thomas Möbius @ 2013-11-19 14:24 UTC (permalink / raw) To: mailing list for ConTeXt users 2013/11/18 Wolfgang Schuster <schuster.wolfgang@gmail.com>: > > Am 15.11.2013 um 17:02 schrieb Thomas Möbius <kontakt@thomasmoebius.de>: > >> Hi, >> >> please have a look at the minimal example at the bottom. I am >> typesetting theorems and lemmata which are numbered consecutively >> within chapters in a book. I used the same code for a document >> written in mkii, and I thought I could just reuse it in mkiv. >> Obviously, there is something I am missing. Question: How do I get >> the same output when compiling the following code with 'context' as >> when compiled with 'texexec'. >> >> When compiled with 'context', the chapter number is missing in the >> numbering of theorems. Lemmas are not numbered at all. >> >> ~~~snip~~~ >> \setupenumerations >> [title=yes, >> style=normal, >> list=all, >> before={\blank[big]}, >> after={\blank[big]}, >> location=serried, > > Change “location=serried” to “alternative=serried”. > >> width=broad, >> distance=0.5em, >> headstyle=bold, >> titlestyle=bold, >> way=bychapter, >> conversion=numbers] > > You have to change “conversion” to “numberconversion” but this isn’t > necessary because numbers are the default conversion format. > > To have chapter numbers as part of the counter add “prefix=yes”. > >> \defineenumeration >> [theorem] >> [text=Theorem, listtext={Theorem }] >> >> \defineenumeration >> [lemma] >> [text=Lemma, listtext={Lemma }, number=theorem] > > To use the counter of another enumeration use “counter=theorem”, not “name=theorem”. > > Wolfgang Thanks Wolfgang for the quick answer. I changed my code accordingly. The "prefix=yes" option, though, does not entirely do as I expect it. It adds the chapter+section number as a prefix to each theorem (and lemma). As I have "way=bychapter" in my options, though, it doesn't reset after a new section started (which is what I want!). The effect is odd as you can see in the minimal example. I only want to have the chapter number as a prefix. It's probably simple? difficult? Minimal example: ~~~snip~~~ \setupenumerations [title=yes, style=normal, list=all, before={\blank[big]}, after={\blank[big]}, alternative=serried, width=broad, distance=0.5em, headstyle=bold, titlestyle=bold, way=bychapter, prefix=yes] \defineenumeration [theorem] [text=Theorem, listtext={Theorem }] \defineenumeration [lemma] [text=Lemma, listtext={Lemma }, counter=theorem] \starttext \chapter{First chapter} \section{First section} \theorem Hello \theorem Hello \lemma Hello \theorem Hello \section{Second section} \lemma Hello \theorem Hello \chapter{Second chapter} \section{First section} \theorem Hello \lemma Hello \section{Second section} \lemma Hello \theorem Hello \stoptext ~~~snip~~~ ___________________________________________________________________________________ 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] 4+ messages in thread
* Re: Unexpected behaviour of enumeration in mkiv 2013-11-19 14:24 ` Thomas Möbius @ 2013-11-28 17:06 ` Thomas Möbius 0 siblings, 0 replies; 4+ messages in thread From: Thomas Möbius @ 2013-11-28 17:06 UTC (permalink / raw) To: mailing list for ConTeXt users 2013/11/19 Thomas Möbius <kontakt@thomasmoebius.de>: > 2013/11/18 Wolfgang Schuster <schuster.wolfgang@gmail.com>: >> >> Am 15.11.2013 um 17:02 schrieb Thomas Möbius <kontakt@thomasmoebius.de>: >> >>> Hi, >>> >>> please have a look at the minimal example at the bottom. I am >>> typesetting theorems and lemmata which are numbered consecutively >>> within chapters in a book. I used the same code for a document >>> written in mkii, and I thought I could just reuse it in mkiv. >>> Obviously, there is something I am missing. Question: How do I get >>> the same output when compiling the following code with 'context' as >>> when compiled with 'texexec'. >>> >>> When compiled with 'context', the chapter number is missing in the >>> numbering of theorems. Lemmas are not numbered at all. >>> >>> ~~~snip~~~ >>> \setupenumerations >>> [title=yes, >>> style=normal, >>> list=all, >>> before={\blank[big]}, >>> after={\blank[big]}, >>> location=serried, >> >> Change “location=serried” to “alternative=serried”. >> >>> width=broad, >>> distance=0.5em, >>> headstyle=bold, >>> titlestyle=bold, >>> way=bychapter, >>> conversion=numbers] >> >> You have to change “conversion” to “numberconversion” but this isn’t >> necessary because numbers are the default conversion format. >> >> To have chapter numbers as part of the counter add “prefix=yes”. >> >>> \defineenumeration >>> [theorem] >>> [text=Theorem, listtext={Theorem }] >>> >>> \defineenumeration >>> [lemma] >>> [text=Lemma, listtext={Lemma }, number=theorem] >> >> To use the counter of another enumeration use “counter=theorem”, not “name=theorem”. >> >> Wolfgang > > > Thanks Wolfgang for the quick answer. I changed my code accordingly. > The "prefix=yes" option, though, does not entirely do as I expect it. > It adds the chapter+section number as a prefix to each theorem (and > lemma). As I have "way=bychapter" in my options, though, it doesn't > reset after a new section started (which is what I want!). The effect > is odd as you can see in the minimal example. > > I only want to have the chapter number as a prefix. It's probably > simple? difficult? > > Minimal example: > > ~~~snip~~~ > \setupenumerations > [title=yes, > style=normal, > list=all, > before={\blank[big]}, > after={\blank[big]}, > alternative=serried, > width=broad, > distance=0.5em, > headstyle=bold, > titlestyle=bold, > way=bychapter, > prefix=yes] > > \defineenumeration > [theorem] > [text=Theorem, listtext={Theorem }] > > \defineenumeration > [lemma] > [text=Lemma, listtext={Lemma }, counter=theorem] > > \starttext > > \chapter{First chapter} > > \section{First section} > > \theorem Hello > > \theorem Hello > > \lemma Hello > > \theorem Hello > > \section{Second section} > > \lemma Hello > > \theorem Hello > > \chapter{Second chapter} > > \section{First section} > > \theorem Hello > > \lemma Hello > > \section{Second section} > > \lemma Hello > > \theorem Hello > > \stoptext > ~~~snip~~~ To answer my own question, adding way=bychapter, prefixsegments=chapter, did the job! ___________________________________________________________________________________ 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] 4+ messages in thread
end of thread, other threads:[~2013-11-28 17:06 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-11-15 16:02 Unexpected behaviour of enumeration in mkiv Thomas Möbius 2013-11-18 9:45 ` Wolfgang Schuster 2013-11-19 14:24 ` Thomas Möbius 2013-11-28 17:06 ` Thomas Möbius
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).