Skip to content

Set max-width in problem2html css - #493

Merged
gkreitz merged 1 commit into
Kattis:masterfrom
Matistjati:maxwidth-html
Sep 28, 2026
Merged

gkreitz merged 1 commit into
Kattis:masterfrom
Matistjati:maxwidth-html

Conversation

@Matistjati

Copy link
Copy Markdown
Contributor

In my experience, people don't really use problem2html because it looks very different from Kattis because we have no max-width set. This becomes especially bad if you have a wide monitor.

bild

So let's set some max-width. As far as I'm aware, the only two CCS that use poblemtools and render to HTML are Kattis and omogenjudge, both of which set a max-width similar to LaTeX. So let's render something closer to what you actually get.

bild

@Tagl

Tagl commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

I would like to note however that the width on Kattis is smaller than what you get in the PDF. It is in fact very very small.
You can see an example here: https://open.kattis.com/problems/dialhomedevice
The table fits in the PDF but doesn't on the web.

@Matistjati

Copy link
Copy Markdown
Contributor Author

I've tried to mimic Kattis as well as possible with the width. Actually catching your specific instance is kinda hard, unfortunately. From some local testing, we would need to mimic Kattis down to the font, which feels excessive.
However, maybe we should consider creating a card-like background as Kattis does.

@Tagl

Tagl commented Sep 28, 2026 via email

Copy link
Copy Markdown
Contributor

@gkreitz
gkreitz merged commit 639a5c5 into Kattis:master Sep 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants