Chapter numbering, example numbering, theorem numbering

Hi, what I’m trying to get in a book about school physics, in an automated fashion, is the following:

  1. Chapter Title
    Example 1.1: Example Title
    Example body
    Theorem 1.1: Theorem title
    Theorem body
    Example 1.2: Example Title
    Example body

  2. Chapter Title
    Example 2.1: Example Title
    Example body
    Theorem 2.1: Theorem title
    Theorem body
    Example 2.2: Example Title
    Example body

any suggestions?

This is an already complex specification. You need chapter numbering (easy) and several independent lists interacting with chapter numbering.

The key to success is a consistent use of styles, fields and number ranges (the latter will number your independent lists, making them suitable to be collected automatically in a table of examples, theorems, …).

Chapter (and other divisions) numbering is controlled by Tools>Chapter Numbering.

The chapter is internally captured and made available for other “sequencers” and field insertions. A field contains dynamic data which is inserted upon request into your text. Use a field to number your examples and theorems.

To create “Example 1.1”, type "Example " then Insert>Field>More Fields.

  1. Go to Variables tab
  2. Click on Number range in Type
  3. If Example already exists in Select, click on it; otherwise enter “Example” (without quotes) in the Name entry box
  4. Choose the display Format
  5. To add the chapter number, select the appropriate Level from the drop-down menu in Numbering by Chapter
  6. Press Insert
  7. You can insert other fields if needed
  8. Press Close to exit the dialog

Do the same for theorems with a dedicated number range.

1 Like

Your answer is excellent!

My next question is to sugest an example on how to use the style hierarchy for making a style like (or maybe more sophisticate).

EXAMPLE 1.1: Title of example
Question Text
SOLUTION: Solution Text
End of Example

This site is a Question & Answers one. For community benefit, each post must address a single topic (question). So, please, ask a separate question with an appropriate title. Be more descriptive in the details. In Writer, style hierarchy has a specific meaning because styles can inherit from each other, providing a very versatile management of a graphical charter (note this is not an obvious and immediate task for a newbie because you must organise very rigorously your style tree). I don’t think this is your question goal.

Don’t forget to tag my answer as the solution for others’ benefit.

1 Like

I mean exactly that. Is it possible to answer.

I dont know how to make a new tag like “styling-theorems”.