Open godmar opened 9 years ago
The problem format has support for annotations (see http://problemarchive.org/wiki/index.php/Problem_Format#Annotations), but none of them seem to address exactly what you're looking for (i.e. text that makes it into the problem statement).
It does seem that if a sample input has a .desc file, that could conceivably be put in the problem description (since the case, being a sample, is known). However, the .desc file is explicitly described as privileged (judge-only) information in the problem format. I would argue that nothing about the sample cases are privileged. So maybe this could be used for what you are suggesting.
Agreed. One issue to note is whether LaTeX is allowed or not in the file, perhaps could have two suffixes .desc.txt and .desc.tex or similar.
I'd prefer to keep the already defined .desc and add an optional .desc.tex. That makes it simpler for systems that don't support LaTeX (e.g. Kattis or DOMjudge when importing a problem) to know which file to look for, and doesn't change the standard, only extend it.
Agree that it should be a new file. Not sure if desc.tex
is the right suffix. Usually it will be an explanation of a test case, rather than a description. But .explanation.tex
feels a bit long-winded...
@jsannemo @simonlindholm How do we handle this at PO? Do we just avoid it? Do we need a fix for this?
We usually have a \section*{Sample explanations}
at the bottom of the problem statement, saying things like "In the first sample, ...". I think it works fine, though it might encourage us write more sample explanations if it was a more integrated part of the problem format.
@mzuenni
At GCPC we added a command to problemset.cls
whose content is typeset after the automatically included samples (I also implemented something similar for BAPCtools).
However, my preferred way to handle this would be a command like \includeSamplesHere
which can be used at any point to typeset the samples (and if it is never called will automatically be executed at the end).
@mzuenni note that this is specifically about interleaving samples with explanations, so that you could have
<sample 1>
<explanation 1>
<sample 2>
<explanation 2>
...
Currently I don't see a super nice way of doing this. Maybe we can add \sample1
, \sample2
, ... that can be used from problem.en.tex
to render samples?
Ah, well in that case I would prefer \sample{<filebasename>}
and maybe an additional \allSamples
.
This should at the very least support Markdown too.
Other than that I (unfortunately) think this is the best way out. At least I don't see a nicer way (the sample/1.explanation.tex I don't like: it's more important to put it together with the rest of the statement).
A number of problems has commentary related to sample test cases. I don't see support for that in the Kattis problem format. Work-around is to add a section to problem.tex, but that will be typeset above, rather than below, the sample test cases.
Possible solutions: