-
Notifications
You must be signed in to change notification settings - Fork 23
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
Warn if \problemtitle differs from problem.settings.name[language] #326
Comments
Sounds reasonable to add a warning/log for this indeed. I think the most common usecase for this is when the latex name includes additional markup that we don't want to expose in the yaml. But it's probably fine to just warn for these cases anyway since accidental mismatches are worse than a few extra warnings. |
We could also check if the expected string is a substring of the actual string... That would reduce the number of warnings but would also suppress the warning for some types of typos. |
Can you give an example? I would understand whitespace normalisation (because LaTeX is lenient about that). |
It would not warn for markup like this: |
Ah, that kind of substring. Now it makes sense. |
Minimal solution is now a concrete pull request, please comment there. |
When
problem.en.tex
contains\problemname{Hello Gaia!}
but
problem.yaml
containsthere currently is no warning. BAPC instead expects the author to write
but there can be reasons to avoid that macro, typically due to other tooling. (In particular, it is one of the few details that prevents a BAPC-compatible problem package from being
problemtools/verifyproblem
-ed.)There is extensive parsing of TeX-code already being done in
bt constraints
, but the above check could be done quite easily and catch 99% of cases.A more aggressive solution would be to actually edit
problem.en.tex
afterbt new_problem
andbt rename_problem
.The text was updated successfully, but these errors were encountered: