Build target for skeletal notes

25 views
Skip to first unread message

Federico Galetto

unread,
Feb 9, 2026, 7:25:36 PMFeb 9
to PreTeXt support
Hello! After playing around with PreTeXt for a couple of weeks, I am thinking of using it to rewrite notes for one of my courses. Currently, my notes are one giant skeletal worksheet that I can print/distribute as a single PDF or break up into separate files for different chapters.

I looked at the example of skeletal worksheet in the documentation and tried fitting it to my notes. Each worksheet comes with its little print icon to produce a printout, so I could:
- make a worksheet for each section, but that means losing the convenience of printing out a single PDF file and having instead to print out each worksheet individually;
- or make a worksheet for each chapter, but then I lose the ability to further subdivide into sections, since worksheets cannot be further divided with anything other than paragraphs.

Coming from a LaTeX to PDF mindset, here is what comes to my mind. It would be great if there was a build target to create a print version without solutions. Is this an option? Essentially, this would create a PDF via LaTeX in the same way as the default print target, but replace each solution block with empty space (preferably of user-definable length). Of course, I could also build a LaTeX file using the default latex target and edit it manually to convert solution blocks to empty space, but I would have to do that every time I need to make an edit.

I hope this makes sense, and maybe other people can share if this is doable or if they have a different way to achieve this in PreTeXt. Thank you in advance!

Mitch Keller

unread,
Feb 10, 2026, 9:52:46 AMFeb 10
to pretext...@googlegroups.com
Hi Frederico,

You’re on the right track with creating a PDF that has all of your worksheets, and this is all readily supported. You will want a separate publication file for your PDF build target, and in there you can adjust the visibility of the solutions. In the publication file, you are looking for exercise-worksheet and need to change solution="yes" to solution=“no". You control the empty space by putting a workspace attribute on each exercise (or activity or task or whatever you need space after).

If you get stuck, definitely check out a drop-in session for some live help: https://mathtech.org/events/

Mitch

--
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/56699e88-68a1-43ec-93d2-50115618f094n%40googlegroups.com.


Federico Galetto

unread,
Feb 10, 2026, 10:40:51 AMFeb 10
to PreTeXt support
Thank you, Mitch! This is great!

I will give it a try, and follow up here or during a drop-in session if I need help.

Cheers,
Fred

Federico Galetto

unread,
Feb 24, 2026, 8:26:24 AM (13 days ago) Feb 24
to PreTeXt support
Following Mitch's directions, I am expanding on the steps here, in case I need to look them up in the future. Note that I started from a basic book project.
  1. I created a copy of the publication.ptx file in the publication folder. I called it skeleton.ptx but the name does not matter as long as you are consistent in later steps.
  2. In the common tag of the skeleton.ptx file, I uncommented the line with the exercise-worksheet tag. I set hint="no" and solution="no" to match my preferences.
  3. In the latex tag, I uncommented the the line with the <worksheet formatted="yes"/> tag. I do not remember why but I think I needed this for some reason.
  4. In the project.ptx file in the main project folder, I went to the targets tag and added: <target name="skeleton" format="pdf" source="main.ptx" publication="skeleton.ptx" output-dir="print" output-filename="mybook.pdf" latex-engine="pdflatex" deploy-dir="pdf"/>. Attributes can be customized as needed.
After saving all files, I got a new build target called skeleton and choosing that creates a pdf with exercise solutions replaced by empty space.
Reply all
Reply to author
Forward
0 new messages