Thanks, Paul. The additions work to number exercises within sections.
I still find one strange thing: I cannot have one exercise directly
following another. Lyx want to make them be one combined exercise. I
found the obvious workabound of putting a standard paragraph in between
with non-breaking space, but that throws off the spacing. I also found
that if I nest each successive problem one more level, I get
consecutively numbered exercises and everything looks fine! I guess
that works as long as I do not want numbered lists within the problems
Isn't there something more direct?
Thanks
Andy Harrington
Paul A. Rubin wrote:
Andrew Harrington wrote:
I am new to Lyx and have no LaTeX experience. I am writing a
sequence of Python tutorials in a book document. I tried switching
from default book to AMS book because it supports numbered exercises
and examples, however in the AMS system, each exercise appears to
generate a new section number. I do not want exercises to alter the
section numbering. I would ideally like exercises to either be
numbered sequentually throughout the whole tutorial, or probably
better, start again from 1 in each chapter or maybe section.
Something viewable easily in LyX would be good, though I am willing
to handle my first ERT's.
Help appreciated.
Thanks,
Andy Harrington
If you put the following in the document preamble, exercises should be
numbered within sections (but I think with the section number included):
\newtheorem{xcc}{Exercise}[section]
\renewcommand{\xca}{\xcc}
/Paul
--
Andrew N. Harrington
Computer Science Department Undergraduate Program Director
Loyola University Chicago http://www.cs.luc.edu/~anh
512B Lewis Towers (office) Office Phone: 312-915-7982
Snail mail to Lewis Towers 416 Dept. Fax: 312-915-7998
820 North Michigan Avenue [EMAIL PROTECTED]
Chicago, Illinois 60611