You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Calling into question PGML answer LaTeX parsing #1542
It seems to me that any answer rule method should already create properly formatted output for the current display mode, and should not need further processing of math for TeX.
Looking back through git blame it seems that this was added in 2015, but at that time this was only done for array answers (answers inserted with [_]*{...}). In 2018 this processing was extended to all answers.
In my testing, I haven't seen any answers (array or otherwise) where this is actually needed.
So what type of answer is this really needed for? Could the code for those answer types be updated to properly deal with this in a less intrusive way?
The reason that I ask is because I have increasingly seen this causing problems with certain types of answers, and not helping anywhere. There are many types of answers these days that are rather intensive with what the answer rule includes. Those answers could include many things that are improperly processed by the PGML::LaTeX call. The primary issue with with an image object from the plots.pl macro. For example, if the new parserMatchList.pl macro in #1541 has answers that are images created with the plots.pl macro.
The same thing could happen with answers for parserRadioButtons.pl or parserCheckboxList.pl that have images created with the plots.pl macro in them. Note that there are HTML validity issues if this is done at this point. However, I have a branch that I have been waiting to create a pull request of specifically because of this issue in which a new answer formatting option for those macros is added that places the text for a check box or radio button answer outside of the label, thus making it possible for these types of answers to be valid for these macros.
I want to know why the following line of code exists:
The comment for the 2018 commit says
Process LaTeX for all answer blanks, not just array blanks (since things like stretchy braces can be added around answer rules even if not in array form)
so that suggests that some answers are including LaTeX notation for delimiters around answers. Unfortunately, I no longer remember which objects those were. Maybe if an array answer is part of a MultiAnswer or something like that? These may also have been answer checkers that were pre-MathObjects that expected to be inserted into BEGIN_TEX/END_TEXT where \(...\) and \[...\] would produce match output in the proper output format automatically (through EV3P).
Activity
dpvc commentedon Sep 21, 2026
The comment for the 2018 commit says
so that suggests that some answers are including LaTeX notation for delimiters around answers. Unfortunately, I no longer remember which objects those were. Maybe if an array answer is part of a MultiAnswer or something like that? These may also have been answer checkers that were pre-MathObjects that expected to be inserted into
BEGIN_TEX/END_TEXTwhere\(...\)and\[...\]would produce match output in the proper output format automatically (throughEV3P).