Skip to main content
Logo image

PreTeXt Showcase

Section 2 Environments

This section will demonstrate some of the “environments” available in PreTeXt. In addition to cataloging the options an author has to break up content, this will be a nice place to play with various styles that are under development.
Maybe a better way to describe what this section will do is by specifying our objectives. Luckily there is an environment for that.

Subsection 2.1 Traditional Structure

Many mathematics papers and textbook chapters are organized in the traditional definition-lemma-proof-theorem-proof format. Depending on how friendly the paper is, or who the intended audience is, there might be quite a bit of exposition surrounding these elements. This subsection is intended to be an illustration of this structure.
We begin with some basic definitions. Depending on the narrative style of your text, you might want to define terms in the middle of paragraphs. We might call this an inline definition, which can be accomplished using the <term> tag.
More formal texts will likely want numbered definitions.

Definition 2.1.

A numbered definition is a definition that gets a number. Note that we should still put the term being defined in <term> tags.
One advantage to having numbered definitions (see Definition 2.1) is that you can refer to them, just like we just did. We can also refer to titled definitions (see Definition 2.2).

Definition 2.2. Titled definitions.

When a definition is a numbered definition that also gets a title, we call it a titled definition.
At this point it might be useful to give a few examples of the terms defined by your definitions. Of course here the definitions are examples of definitions, so instead will illustrate our point with an example of an example.

Example 2.3.

This example is an example of an example that stands alone. It does not have a question in it, so it does not need a solution.
Of course examples can consist of more than one paragraph, as this is also an example of. In fact, we could put an ordered list of things that could go in an example:
  1. There could just be a paragraph or two.
  2. There could be a list of examples.
  3. All of the above.
While on this topic, it is worth mentioning that many authors choose to include examples of problems that can be solved. This suggests that part of an example is the solution. For example:

Example 2.4.

How do you include an example that has a solution, and maybe also a hint?
Hint.
Make sure you put the “question” is the <statement>.
Solution.
As mentioned in the hint, you must structure the example as a statement, followed by a hint, answer, and/or solution.
This example is not an example of an example that has a separate answer, but of course you could have an answer as well.

Example 2.5. Examples with titles.

Can examples have titles?
Answer.
Yes.
Returning to our main goal of establishing new mathematical theory, we might next state an axiom or two (especially if we are named Euclid). In PreTeXt the environments for axioms are not “definition-like” (the only definition-like environment is a definition). There are quite a few “axiom-like” environments.
Once you have defined your terms and stated your axioms, you will likely want to prove something. Perhaps you will start with a lemma or two, use them to prove a theorem, followed by a few corollaries. If you are not as confident in the importance of your results, you might call them propositions or just facts.
The lemma above did not have a proof, since it’s proof is obvious.

Proof.

This is clear, as it follows from the proof of Lemma 2.8.
Using the two lemmas above, we arrive at the following:
There is no reason you need to prove a theorem right away. You can always have some text, like this paragraph, before the proof. You could even have an example of how a theorem could be applied before pulling the reader back in for the eagerly awaited proof.

Example 2.10.

This is an example of how you might interject an example before completing a proof. As such it is put between the statement of the theorem and its proof.
Note that if you don’t give a proof a title, it will get titled “proof” automatically. It makes sense to put a custom title in this case since you are referring to a proof of the a theorem that was stated without proof earlier.

Proof of Theorem 2.9.

Let \(P\) be as described in the theorem. By the lemmas, \(P\) is true.
Therefore, \(P\text{.}\)
Lemmas, theorems, and corollaries naturally go together. There are other theorem-like environments that you might view as parallel to these. Here is an example.
If students are reading your textbook, it might be time to collect the main points that you have made for your students and put them in a box. You could also put your result in the box and let your student roam free. The following is an <assemblage>.

Types of environments.

PreTeXt allows for a variety of environments:
  • Definitions
  • Theorem-like environments
  • Assemblages, to assemble or summarize important connected ideas.
Your paper will likely have lots of remarks about its content as the connecting text between theorems, as this section exemplifies. However, it might also be useful to highlight important remarks, or to set off remarks that do not otherwise fit into the main flow of the text.

Remark 2.13.

Resist the temptation to use assemblages just because they give you the desired styling.
If your remark is far removed from your main content, you might make it as an aside.

Note 2.14.

Another environment like a remark is a note. Other “remark-like” environments are <convention>, <observation>, <warning>, and <insight>.
No self-respecting paper on self-reference would be complete without some open questions. You might make some conjectures, which are axiom-like environments in PreTeXt.
You might also present a question for your readers. The <question> and <problem> environments might be appropriate, although note that these are example-like, as they can receive hints, answers, and solutions.

Question 2.16.

What’s the difference between an example and a question or problem?
Solution.
Basically, it’s just the name of the environment. Practically, the different environments might have pedagogical uses, and potentially they could be styled differently.

Problem 2.17.

As a final example, we present a renamed environment. In PreTeXt, one of the theorem-like environments is fact. But perhaps you would rather use “Self Evident Fact” as your environment name. The following is coded as <fact>, but using <rename> in <docinfo> we can get the following
In addition to <example>, PreTeXt provides two more “example-like” environments: question and problem.

Subsection 2.2 Inquiry Based Structure

Another way you might structure a chapter is to give students more opportunities to actively engage in the material. You might give a long list of definitions, and then a list of theorems to prove. That would look a lot like the previous section (perhaps with fewer paragraphs between elements).
Alternatively, you can mix inquiry based learning (IBL) structure into a more traditionally formatted section using appropriate environments. You might start a section with an <activity>, for example.

Activity 2.1.

Make a list of all the project-like environments, such as this activity.
You might want to break down the activity into smaller tasks, which can be done by specifying each <task>, as in the following project.

Project 2.2.

First you give an introduction to the project to tie the tasks together. Then:
(a)
Specify the first task.
(b)
Should the second task have a hint?
Hint.
It could.
(c)
Can tasks, or stand alone projects, have answers or solutions?
Answer.
Yes. They can have both.
Solution.
Yes, they can. Depending on how the publisher chooses to produce your book, these could be hidden completely, moved to the back of the book, or displayed as knowls.
You might end the project with a conclusion.
Of course you might still have definitions, theorems, and examples in a document like this.

Definition 2.19.

A definition is illustrative if it serves the purpose of illustrating something.
And then you might have an example.

Example 2.20.

Should an example always follow a definition?
Solution.
No, but it could.
Examples are a good way to ask students to think about a problem but provide a solution right away. To encourage students to think about a problem more before giving the solution, you could use an exercise. In PreTeXt, exercises that occur inside a section, along with other content, are called “checkpoints”, even though they are coded simply as <exercise>

Checkpoint 2.21.

Write an exercise inside a section to show what they look like.
Answer.
Done.
Of course, in this style of document, collecting important ideas is especially important.

Components of good IBL writing.

Texts that support inquiry based learning should contain lots of opportunities for students to engage with the material, but can still be friendly and help students along their journey of discovery.