Skip to main content

Section 15.5 Project-Like Elements

There are four tags that PreTeXt considers to be “project-like”. They are <activity>, <exploration>, <investigation>, <project>. We will focus on <project> here. These four tags allow a general, freeform structure similar to the unstructured <example> in Listing 15.2.1; a structure analogous to that of the structured <example> in Listing 15.2.3; and the highly-structured <introduction>, <task>, <conclusion> model shown in Listing 15.5.1.
Listing 15.5.1. A project
<!--********************************************************************
Copyright (C) 2019-2026  Robert A. Beezer

This file is part of PreTeXt.

PreTeXt is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 or version 3 of the
License (at your option).

PreTeXt is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with PreTeXt.  If not, see <http://www.gnu.org/licenses/>.
*****************************************************************-->

<project>
  <title>A structured project</title>
  <introduction>
    <p>
      Here is where we describe what the reader will accomplish in the project.
    </p>
  </introduction>

  <task>
    <statement>
      <p>
        The first step to do.
      </p>
    </statement>
    <hint>
      <p>
        A little hint.
      </p>
    </hint>
    <answer>
      <p>
        Just the answer.
      </p>
    </answer>
    <solution>
      <p>
        All the glorious details about how to do the first step.
      </p>
    </solution>
  </task>

  <task>
    <statement>
      <p>
        The second step to do.
        We'll be lazy and just include an answer.
      </p>
    </statement>
    <answer>
      <p>
        Just the answer.
      </p>
    </answer>
  </task>

  <conclusion>
    <p>
      A little wrap up.
    </p>
  </conclusion>

</project>
The code in Listing 15.5.1 produces the following output:

Project 15.5.2. A structured project.

Here is where we describe what the reader will accomplish in the project.

(a)

The first step to do.
Hint.
A little hint.
Answer.
Just the answer.
Solution.
All the glorious details about how to do the first step.

(b)

The second step to do. We’ll be lazy and just include an answer.
Answer.
Just the answer.
A little wrap up.