Skip to content

Commit 3b259ac

Browse files
mzuenniniemela
authored andcommitted
add constants command for latex
1 parent ab09455 commit 3b259ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/2023-07-draft.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,13 +392,13 @@ where `name` is one of the names defined in `constants`.
392392
Tags {% raw %}`{{xyz}}`{% endraw %} containing a name that is not defined are not modified but may be warned for.
393393
394394
All constant sequences in the following files will be replaced by the value of the corresponding constant:
395-
- problem statements
396395
- input and output validators
397396
- included code
398397
- example submissions
399398
- `testdata.yaml`
400399
401400
Constant sequences are **not** replaced in test data files or in `problem.yaml` itself.
401+
Note that constants are also available in the problem statements via the dedicated command `\constant{name}`.
402402
403403
## Problem Statements
404404
@@ -448,6 +448,7 @@ It shall also provide the following commands:
448448
It is an error to use `\nextsample` when there are no remaining sample test cases.
449449
- `\remainingsamples`, tells the judge system to include all sample test cases that have not previously been included by `\nextsample`.
450450
It is allowed to use `\remainingsamples` even if there are no remaining sample test cases, which will simply include nothing.
451+
- `\constant{name}` evaluates to the value of the corresponding constant, see [constants](#constants).
451452
452453
Arbitrary LaTeX is not guaranteed to render correctly by HTML-based judging systems.
453454
However, judging systems must make a best effort to correctly render **at minimum** the following LaTeX subset when displaying a LaTeX problem statement:

0 commit comments

Comments
 (0)