#1676·DeepTutor

[Bug]: Tutor selection fails on complex rendered LaTeX

Author: CharlesHXCreated Sep 30, 2026Updated Sep 30, 2026
Labelsbug

Do you need to file an issue?

  • I have searched the existing issues and this bug is not already filed.
  • I believe this is a legitimate bug, not just a question or feature request.

Describe the bug

The in-chat Tutor ("小老师") selection action fails when selecting certain rendered LaTeX formulas.

Plain-text selections work normally, and very simple formulas such as E=mc^2 may also work. However, selecting a more complex rendered formula causes the Tutor request to fail with:

Selected text was not found in the authoritative source message

This issue appeared after upgrading from DeepTutor 1.6.4 to 1.6.12. Complex formula selections worked in 1.6.4.

Steps to reproduce

  1. Start DeepTutor and open a chat.
  2. Generate a response containing this display-math formula: f(x)=\frac{x^2+1}{\sqrt{1-x}}+\alpha\ln(x)
  3. Select the rendered formula in the assistant's response.
  4. Click the Tutor ("小老师") selection action.
  5. Ask: Please explain this formula.
  6. The request fails with: Selected text was not found in the authoritative source message

Expected Behavior

The Tutor should accept the selected rendered LaTeX formula and explain it, just as it does for normal text selections.

Complex rendered formula selections should work as they did in DeepTutor 1.6.4.

Related Module

Frontend/Web

Configuration Used

Default local DeepTutor setup started with deeptutor start.

Logs and screenshots

Image Screenshot showing the error when selecting a complex rendered LaTeX formula:

Additional Information

  • DeepTutor Version: 1.6.12
  • Operating System: Windows
  • Python Version:
  • Node.js Version:
  • Browser: Microsoft Edge
  • Related Issues: None found

Additional notes:

  • Plain-text selection works correctly.
  • A simple rendered formula such as E=mc^2 can work.
  • The more complex formula in the reproduction steps consistently triggers the error.
  • Complex formula selection previously worked in DeepTutor 1.6.4.