latex_protect.py 448 B

123456789101112131415
  1. from evaluator import *
  2. DESCRIPTION = "Test if a model can fix a latex newline error in a caption"
  3. TAGS = ['explain']
  4. question = r"""
  5. In latex when I force a newline in a caption with \\ it gives an error saying \Hy@tempa has an extra } runaway argument?
  6. """
  7. # \newline doesn't work the same I need \\
  8. TestLatexNewline = question >> LLMRun() >> SubstringEvaluator("\\protect")
  9. if __name__ == "__main__":
  10. print(run_test(TestLatexNewline))