Bug 428262 - Problem in Syntax Highlighting LaTeX
Summary: Problem in Syntax Highlighting LaTeX
Status: REPORTED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (other bugs)
Version First Reported In: 5.75.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-26 08:56 UTC by Christian Saemann
Modified: 2025-06-01 16:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
rendered with ksyntaxhighlighter 5.245.0 (40.06 KB, image/png)
2025-06-01 16:05 UTC, Jonathan Poelen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Saemann 2020-10-26 08:56:52 UTC
Syntax highlighting is in math mode after \end{equation} when using resizebox in equation.

STEPS TO REPRODUCE
1. Enter the following lines somewhere in a LaTeX file
\begin{equation}
    \resizebox{\hsize}{!}{
        $\begin{pmatrix}
            3
        \end{pmatrix}$}~.
\end{equation}
Hello

2. The editor highlighting is that of math mode after this, i.e. "Hello" is highlighted as math.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.20.1
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Comment 1 Jonathan Poelen 2025-06-01 16:03:12 UTC
There have been many changes since 2020, and the behavior is no longer the same as originally indicated. "Hello" is displayed correctly in "Normal Text", but the 2 "$" are displayed in "Error". It remains to be seen whether this causes another problem.
Comment 2 Jonathan Poelen 2025-06-01 16:05:22 UTC
Created attachment 181956 [details]
rendered with ksyntaxhighlighter 5.245.0