Off indenting of blocks problems

13 views
Skip to first unread message

Charilaos Skiadas

unread,
Jan 6, 2026, 12:33:54 PM (7 days ago) Jan 6
to prete...@googlegroups.com
Maybe this is on our radar already, but in case it isn’t (or in case I’m misinterpreting things), it seems to me that there might be something off with how
spacing is decided when there are some block problems involved (which tend to be a bit on the wide side I guess is the problem). The code is from here:
And you can see it visually running at:

you can see the 2.2.2 problem (and another block problem further down) are not lined up with everything else.

Is this a problem in my source code? unavoidable? bug in our CSS?


PastedGraphic-1.png

Charilaos Skiadas
Department of Mathematics
Hanover College


Andrew Scholer

unread,
Jan 6, 2026, 1:03:15 PM (7 days ago) Jan 6
to prete...@googlegroups.com
Those exercises both include Parsons problems. For select types of exercises that need/appreciate extra horizontal space, there is CSS to expand the exercise block. Crack them open and you will see those exercises are wider than the other ones.

The exercise block includes the title. Hence it shifting over.

I agree that aligning those would be nice. But the structure of the html, conditional nature of the situation, and handling it for all possible screen sizes will be some work.

Aligning those knowl titles would take some kind of left margin or other positioning to move them to the right the same amount that their container expands past the normal content boundary to the left.

The file https://github.com/PreTeXtBook/pretext/blob/master/css/components/helpers/_expandable.scss has the "expanding" logic. Which elements to apply that to are controlled by themes. For Salem/Denver, this is an example of the rule that is saying "make exercises wide if they have something that wants to take up more space":
https://github.com/PreTeXtBook/pretext/blob/a17cfda7a7389c2b27836654a23b28eddb62e99b/css/targets/html/salem/_rs-widen.scss#L48

If you want to take it on, great. If not, feel free to make an issue for it.

Andrew

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/1B14DD43-CAD2-45AA-91B5-6DC573E94248%40gmail.com.

Geoffrey Cox

unread,
Jan 6, 2026, 2:15:06 PM (7 days ago) Jan 6
to PreTeXt development
I'll go ahead and add my two cents since I was having the same issue, and couldn't bear looking at the misaligned exercises. 

I resolved it by adding custom CSS to override the runestone container's `max-width` (see below). This works for me since I don't plan on using Parsons' questions for any problems that exceed the default width of my theme.  I considered opening a PR, but I assumed there were good reasons for Runestone to support wider elements.

Here is the override I used. It's minimal, and I have been very happy with its results. The only drawback is that you have to craft your questions to be pretty narrow since there are two columns.

```
.ptx-runestone-container {
  /* Never wider than its parent, and also respect the global hard cap */
  --max-width: min(100%, 900px) !important;
  max-width: var(--max-width) !important;
}
```
Good Luck!


Reply all
Reply to author
Forward
0 new messages