Re: [NTG-context] Define exercise captions
![](https://secure.gravatar.com/avatar/30ef4fea8acc9a4c7a392675260cfcb9.jpg?s=120&d=mm&r=g)
Hello,
I need to define a Exercise command that will enumerate exercises and provide
captions.
For example,
\exercise{Conversion from hex to dec}
should produce
Exercise 1.1. Conversion from hex to dec.
What is the best way to achieve that? Use \definehead or another command?
\defineenumeration[exercise][title=yes,way=bysection]
Thank you Aditya, but the result is rather shoking ) Please, try \starttext \defineenumeration[exercise][title=yes, text=Вправа, way=bysection, width=broad] \exercise{Розрахунок кривої, яка з'єднує три точки на площині} \stoptext The "Вправа" is putted twice, next time inside some strange brackets. The text gets out of the page. How to setup so that numeration will be done by subsection (1.1, 1.2, etc.)? Reards, Vyatcheslav
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Sun, 1 Nov 2009, Vyatcheslav Yatskovsky wrote:
I need to define a Exercise command that will enumerate exercises and
Hello, provide
captions.
For example,
\exercise{Conversion from hex to dec}
should produce
Exercise 1.1. Conversion from hex to dec.
What is the best way to achieve that? Use \definehead or another command?
\defineenumeration[exercise][title=yes,way=bysection]
Thank you Aditya, but the result is rather shoking ) Please, try
\starttext \defineenumeration[exercise][title=yes, text=Вправа, way=bysection, width=broad]
\exercise{Розрахунок кривої, яка з'єднує три точки на площині} \stoptext
The "Вправа" is putted twice, next time inside some strange brackets. The text gets out of the page.
Looks like a bug in mkiv. Hans, text need to be handled differently in descriptions and enumerations.
How to setup so that numeration will be done by subsection (1.1, 1.2, etc.)?
prefix=yes, Aditya
participants (2)
-
Aditya Mahajan
-
Vyatcheslav Yatskovsky