Hide proofs in print

55 views
Skip to first unread message

Federico Galetto

unread,
Jul 5, 2026, 3:31:21 PMJul 5
to PreTeXt support
Hello,

I am writing a set of notes with three publication targets: web, print (as PDF), and a custom "blank notes". The blank notes are like the PDF except I use

<exercise-inline statement="yes" hint="no" answer="no" solution="no" />

in the publication file to hide the solution, which I am going to write in class using a tablet. These blank notes are also going to be handed out to students who can take their own notes to fill out the blank part.

This works well for exercises, but now I would like to achieve the same effect with theorem-like environments (theorem, proposition, corollary). Namely, I am looking for an option to hide the proof in my "blank notes" target with something like:

<theorem proof="no" />

so that students have a blank space to work out proofs in class. To make this more useful, it would be great if there was also a workspace="Xin" option for theorem environments to allow for X inches of blank space when proofs are not printed.

Is there any way to achieve this effect? Thank you.

Mitch Keller

unread,
Jul 5, 2026, 3:49:06 PMJul 5
to pretext...@googlegroups.com
You can accomplish this using versions. How I have done this for slides is written up in this MathTech.org post, and it works just as well for guided notes as I have suggested later on. If you follow my model, you’d put component=“a” on the proofs you don’t want in the blank notes version. I then put in a p with component=“b” and set the workspace when I need to give myself space after something that isn’t an exercise. 

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/c4fd05ff-29d7-42aa-a084-6b803ef0089en%40googlegroups.com.


Oscar Levin

unread,
Jul 5, 2026, 3:54:38 PMJul 5
to pretext...@googlegroups.com
I'll add to Mitch's suggestion that if you put the content inside a worksheet or handout division, you can add workspace to the theorem.  Or the proof.

Federico Galetto

unread,
Jul 5, 2026, 5:18:16 PMJul 5
to PreTeXt support
Thank you both for the quick responses! I will give this a try.

Fred

Federico Galetto

unread,
Jul 5, 2026, 10:42:40 PMJul 5
to PreTeXt support
Okay, following Mitch's suggestion, I put a component="notes" attribute on the proof of the theorem, then added

<version include="" />

to the publication file of my blank notes. This makes the proof disappear from the blank notes. Great!

Next, following Oscar's suggestion, I added workspace="3in" to the theorem to get vertical space, which works well for the blank notes.

However, the workspace="3in" attribute also adds the vertical space to the full print version which already contains the proof.
Is there any way to selectively add workspace only to a certain version?

Thank you!

Mitch Keller

unread,
Jul 5, 2026, 10:54:33 PMJul 5
to pretext...@googlegroups.com
I put an empty paragraph in and put the workspace on that along with an appropriate component (notes?) and set that version in the other publication file. 
-- 
Mitch Keller

On Jul 5, 2026, at 21:42, Federico Galetto <galetto....@gmail.com> wrote:

Okay, following Mitch's suggestion, I put a component="notes" attribute on the proof of the theorem, then added

Federico Galetto

unread,
Jul 6, 2026, 3:32:06 PMJul 6
to PreTeXt support
Wonderful! I did not realize the workspace attribute works with paragraphs too.

Thank you!

Federico Galetto

unread,
Aug 5, 2026, 11:00:22 AM (14 days ago) Aug 5
to PreTeXt support
Hello! I am reviving this discussion to say I landed on the following, which seems to work well:

    <theorem xml:id="thm-test">
        <statement>
            <p>
                Test statement
            </p>
            <p component="blank" workspace="1in"><nbsp/></p>
        </statement>
        <proof component="notes">
            <p>
                Test statement proof
            </p>
        </proof>
    </theorem>

The "blank" version contains empty space for writing proofs in class. The "notes" version contains the proof.

I tried something similar with problems I plan to work out in class using the <example> environment.

    <example>
        <statement>
            <p>
                Sample problem
            </p>
            <p component="blank" workspace="1in"><nbsp/></p>
        </statement>
        <solution component="notes">
            <p>
                Sample problem solution
            </p>
        </solution>
    </example>

The only problem here is that the QED triangle for the example still gets printed out, whereas the QED square for proofs is not printed out (as expected). I included a picture for clarity.

Screenshot From 2026-08-05 10-57-22.png
Is there a way to suppress that triangle?

Thanks,
Fred

Federico Galetto

unread,
Aug 6, 2026, 2:28:41 PM (13 days ago) Aug 6
to PreTeXt support
The following hack makes the triangle disappear: add

<stringparams latex.preamble.late="\renewcommand{\ptxtriangle}{}"/>

to the publication target. There is probably a better solution...

Rob Beezer

unread,
Aug 16, 2026, 5:48:04 PM (3 days ago) Aug 16
to pretext...@googlegroups.com
Dear Mitch,

On 7/5/26 12:48, Mitch Keller wrote:
> You can accomplish this using versions. How I have done this for slides is
> written up in this MathTech.org post <https://mathtech.org/2025/10/27/annotated-
> slides.html>, and it works just as well for guided notes as I have suggested
> later on. If you follow my model, you’d put component=“a” on the proofs you
> don’t want in the blank notes version. I then put in a p with component=“b” and
> set the workspace when I need to give myself space after something that isn’t an
> exercise.
Finally got around to reading this (including a veiled reference to moi - no, I
am not surprised!).

Would this be a useful addition to the examples/case studies at

Subsection 27.2.3: Types of Versions
https://pretextbook.org/doc/guide/html/publisher-versions.html#version-use-cases

If so, might you be encouraged to make a PR to this effect?

Rob
Reply all
Reply to author
Forward
0 new messages