Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem statements needs to be better specified #31

Closed
niemela opened this issue Jul 21, 2023 · 6 comments · Fixed by #120
Closed

Problem statements needs to be better specified #31

niemela opened this issue Jul 21, 2023 · 6 comments · Fixed by #120

Comments

@niemela
Copy link
Member

niemela commented Jul 21, 2023

What exact LaTeX environment can/must be assumed.

@niemela
Copy link
Member Author

niemela commented Jul 21, 2023

@austrin Could you help with this one?

@jsannemo
Copy link
Contributor

I think we should define a "HTML-friendly" subset, that implmentations must promise to be able to convert to HTML.

It should still be allowed to go outside of this subset. A CCS for example compile that LaTeX using a provided problem class name, and instead host a PDF upon installation.

@evouga
Copy link
Contributor

evouga commented Jul 22, 2023

This seems incredibly daunting... a starting point might be the subset supported by mathjax, which is quite extensive.

In fact maybe the reasonable path here is to pick the same subset as a common TeX Javascript display engine like mathjax (which strongly encourages, but doesn't formally require, a CCS to use that engine).

@niemela
Copy link
Member Author

niemela commented Jul 22, 2023

This is what Polygon supports: https://polygon.codeforces.com/docs/statements-tex-manual

@niemela
Copy link
Member Author

niemela commented Jul 22, 2023

In addition to what Polygon supports we should probably support:

\begin{figure}
\begin{verbatim}
\begin{quote}
\begin{array}
\begin{minipage}
\begin{wrapfigure}
\section
\textwidth
\ldots
\noindent

@RagnarGrootKoerkamp
Copy link
Contributor

This is the class file we use for BAPC
https://github.com/RagnarGrootKoerkamp/BAPCtools/blob/master/latex/bapc.cls
Apart from that, we only have a light wrapper around problems
https://github.com/RagnarGrootKoerkamp/BAPCtools/blob/master/latex/problem.tex

Note that we also inject \problemlabel and \problemauthor that are mostly used in solution slides rather than statements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants