Skip to content

Conversation

@Matistjati
Copy link
Contributor

@Matistjati Matistjati commented Aug 17, 2024

supported for both pdf and html:

  • problem name and id are automatically inserted at the top of the statement. Spec that we automatically prepend it from problem.yaml
  • samples
  • interactive samples
  • {{nextsample}} and {{remainingsamples}}
  • commonmark-style images
  • "common" footnotes. extended commonmark syntax
  • "common" tables. extended commonmark syntax
  • inline and display math with $a+b$ and $$a+b$$

A PR of the spec can be found here Kattis/problem-package-format#386.

todo in follow-up pr:

  • svgs, both for md and html. need to be sanitized
  • better CSS class names for Kattis
  • CSS styling closer to Kattis

not planned to be added in this PR (maybe ever):

  • tex -> html using pandoc (remove plastex)
  • tex -> pdf using pandoc (we will keep using pdflatex for this)
  • pdf images (they look terrible)
  • webp images (poor support)

Copy link
Contributor

@gkreitz gkreitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took another pass over it, as requested. This is getting close to ready for merging. The main problem I see are a couple of places where we need to escape latex characters (the rendering path of markdown -> latex -> pdf that pandoc does is funky...).

Copy link
Contributor

@gkreitz gkreitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, code just had two small things. Tests failing due to UUID should be fixed by #307 merging (and then rebasing on that).

For example problems, I'm ok with merging this as-is, but if so we should do a follow-up soon where we convert the problems to 2023-07.

@@ -0,0 +1,20 @@
Jag tänker på ett hemligt tal mellan $1$ and $100$, kan du gissa vilket?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guess is a legacy problem, which does/should not support markdown. I'd like for our examples to follow the standard.

One way to fix that would be to convert guess and/or oddecho (where you also added a markdown statement) to 2023-07-draft.

@gkreitz gkreitz merged commit 4d49ebe into Kattis:develop May 14, 2025
4 checks passed
@Matistjati Matistjati deleted the pandoc branch May 15, 2025 17:49
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.

2 participants