LyXExcercises numbered by Section

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
petergggg
Posts: 5
Joined: Tue Aug 30, 2011 5:11 pm

Excercises numbered by Section

Post by petergggg »

Hello there

I've only just discovered LyX, so please keep any answers nice and simple.

I'm trying to write an introductory physics tutorial to include numbered exercises/problems, the solutions of which will be at the end of the document. I'm using the 'article' document class, though I'm happy to change that.

The document will include about half a dozen sections, each section probably divided into subsections, subsubsections etc. In each section I'd like to include several exercises/problems for the student to solve. I'd like the exercises to be section numbered only, eg Exercise 1.1, Exercise 1.2, Exercise 1.3 etc (for section 1); Exercise 2.1, Exercise 2.2, Exercise 2.3 etc (for section 2), ie I don't want the exercises to be numbered 1.2.1 referring to the subsections, or 1.2.1.5 referring to the subsubsections. I don't need that degree of complexity.

Is there a straightforward way of doing this? Forgive me if I've missed the blindingly obvious.

Thank you

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Excercises numbered by Section

Post by Stefan Kottwitz »

Hi,

it depends on how you create the exercises/problems. What do you use for it? theorem environments perhaps? This would be a good choice.

The chngcntr package can be used to customize the numbering. Without further details about your document, such as a code example, it's hard to say more.

Stefan
LaTeX.org admin
petergggg
Posts: 5
Joined: Tue Aug 30, 2011 5:11 pm

Re: Excercises numbered by Section

Post by petergggg »

Stefan

I'm struggling here. I've opened the MikTex Package Manager and installed chngcntr plus several other addons that looked interesting. I've restarted Lyx, but I can't see any reference to chngcntr, though I'm not sure I'm looking in the right place. Any suggestions?

Thanks

Peter
Post Reply