PreTeXt for tests

29 views
Skip to first unread message

Mark Fitch

unread,
Oct 22, 2025, 12:20:50 PMOct 22
to PreTeXt support
What is the preferred practice for constructing tests (paper) using
PreTeXt? Currently I am using <book> and stuffing everything into one
chapter with different sections. In my case individual questions are MOM
exercises (works nicely for generating a key if all MOM questions have a
detailed solution). I have renamed chapter (to essentially hide the the
word "chapter") and inlineexercise (to just "P" so it does not waste
space). Things look okay but not great with this.

What I would like is to remove any labels like "Chapter" and "Section"
which don't make sense on a test, but keep the structure of sections and
subsections which I frequently use to organize questions (particularly
by standard for standards based grading).

For standards based grading I would also like control of pagination for
the purpose of forcing questions for each standard to print on a new
page. This allows me to print one copy and make copies of just enough of
each section for what the students are doing that day (not everyone
works on every standard). Yes, I could do this by making scores of
mini-tests, but then I have to maintain at least a score of tests which
is cumbersome.

This usage (new for me this semester) is motivating me to get working on
a couple of open MOM/PreTeXt features, but those must wait at least
until late February.

Dr. Mark A. Fitch
Professor of Mathematics
Overseer, Associate of Arts/Science

maf...@alaska.edu
SSB 154
University of Alaska Anchorage
3211 Providence Drive, Anchorage, AK 99508

Andrew Scholer

unread,
Oct 23, 2025, 11:11:28 AMOct 23
to pretext...@googlegroups.com
I have been wrestling with the same issues while trying to rewrite some tests into PreTeXt.

PreTeXt is very good at what it was designed to do: take highly structured documents that conform to an expected schema and render them in an opinionated way. 

Unfortunately, that does not describe what you (or I) are trying to do. I may be comfortable with the idea that a benevolent publisher is in charge of the book I am using. I am much less comfortable with a publisher telling me how to format the test I am trying to write. Assessments need to cater more to individual wants/needs. Like your structure based on standards. Or my desire to insert a scoring grid at the bottom of each page that corresponds to a rubric I use for scoring.

I don't know that PreTeXt can or should be modified enough to enable everything we might come up with. There is likely room for improvement without throwing out the existing principles, but it is hard to imagine providing the kind of fine control an instructor wants when they approach authoring an assessment.

If, as instructors, we like using PreTeXt to produce content, but don't love the formatting it spits out, maybe we should view PreTeXt as a tool to generate content used in a document that gets modified by other means.

That is where I have landed. I have an article that consists of a series of worksheets. Each worksheet is a separate document. I render those to HTML output and then use the Print feature on a given worksheet to produce a PDF.

Yes, that is kind of backwards. But I have found the pagination and formatting from that approach works better for my needs than rendering directly to PDF. It also gives me the ability to apply custom CSS to do things like hiding numbers on everything but exercises. If needed, I can even hand-edit the xxx-printable.html file for that document before printing it. Or grab content from it and drop that into some other document.

A more math-focused person might prefer rendering to LaTeX and working from there.

My wild idea for how to support more freeform uses of PreTeXt would be to have an output target or two that format LaTeX and/or HTML in a way that makes it easier to either to get the minimal output (i.e. render a list of questions without much other formatting) and/or insert placeholders or markers that are easy to modify via post processing find/replace.

Andrew Scholer

--
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/b2f7b54d-128d-4aa8-ab98-91646ea95596%40alaska.edu.

Oscar Levin

unread,
Oct 23, 2025, 12:06:09 PMOct 23
to PreTeXt support
I am embarrassed to admit that I am still using LaTeX to typeset my (standards based grading) learning target quizzes, using the exam documentclass (I have a document per learning target and make 4 versions by using \begin{questions}...\end{questions} on new pages).  However, I think I probably could use worksheets and print from HTML (which is what I'm doing for in-class activities and for daily lecture notes, using handout instead of worksheet).  Those give spacing and page-break control, and they print well.  Don't know if MOM problems would look good in that context, but maybe (or maybe it could be done with just a little work).

On my list of things I want to do for worksheets/handouts is enable editable headers and footers (which could be set in the source, or edited in the HTML).  The step after that would be to add a points attribute to an exercise.  Also not too difficult, I think.  Don't know if it is worth creating a scoring section for Andrew; perhaps this could be done just with some custom javascript.  

I'm definitely open to other improvements, but I'm not sure what those would be.   

Rob Beezer

unread,
Oct 23, 2025, 12:52:37 PMOct 23
to pretext...@googlegroups.com
Dear Mark,

I was going to say the "small documents" folks would be interested in this. But
you've heard from their representative. And I was going to say that folks'
ideas about how exams are laid out vary quite a bit. But you are staring to
hear that already, too.

First real experiment I did with XSL was to automate all the routine things I
did on every exam: "Show your work.", a score box in the bottom corner of every
page, squishy-ness parameters for workspace. I used it long after PreTeXt
became functional. Unlike Oscar, I was not embarrassed. I was embarrassed by
the XSL I had written as a learning experience.

Peole have lots of ideas about #exercise. I joke that if I'd known how much
work that was going to be, then maybe I would not have ever started. But I
think exams are even more idiosyncratic.

Do the David Farmer experiment. Ask 10 of your colleagues to send you a typical
exam. How different are they? What is common? Now add colleagues in non-math
disciplines.

> I would also like control of pagination

I think it makes sense, PreTeXt-wide, to have some publisher settings to make
"lower" divisions (#section, #subsection, ...) start on a new page (new recto
page, as well?). Even if CMoS has rules about this (haven't looked).

> remove any labels like "Chapter" and "Section"

I can't recall if the styling infrastructure makes it possible to control these
(I might have made it hard intentionally).

Chapter 41: LaTeX Styles
https://pretextbook.org/doc/guide/html/latex-styles.html#latex-styles

> is motivating me to get working on a couple of open MOM/PreTeXt features

And I think I owe you some discussion about randomization and seeds. You know
where to find me when you are ready.

Rob
Reply all
Reply to author
Forward
0 new messages