Bug 198797 - Bug with syntax coloring with LaTeX command \newenvironment when using math environment
Summary: Bug with syntax coloring with LaTeX command \newenvironment when using math e...
Status: RESOLVED WORKSFORME
Alias: None
Product: kile
Classification: Applications
Component: general (show other bugs)
Version: 2.0.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Michel Ludwig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-03 16:18 UTC by Josip Šumečki
Modified: 2023-01-08 05:16 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josip Šumečki 2009-07-03 16:18:01 UTC
Version:           2.0.3 (using KDE 4.2.4)
Compiler:          gcc (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7) 
OS:                Linux
Installed from:    Fedora RPMs

Only a syntax coloring bug, here is an example:

\newenvironment{rjesenje}[1][Rj]
{
 \begin{flushleft}\fbox{\textit{#1:}}~~~{}\begin{math}
}{
 \end{math}\textit{.}\end{flushleft}
}

(when your editor finds \begin{math}, it contiunes the syntax coloring, as if all after \begin{math} and \end{math} is written in math mode ... in this example "}{" should not be colored as it is in math mode)
Comment 1 Thomas Braun 2009-07-03 18:19:52 UTC
Can you try the most up to date syntax file?
Go to "configure kile"->editor->highlight->download and grab the newest version.
I can't reproduce the bug here.
Comment 2 Josip Šumečki 2009-07-03 18:32:31 UTC
I updated to the latest, as you described and highlight is not good. Let me explain this more clearly:

1. \newenvironment{rjesenje}[1][Rj]
2. {
3.  \begin{flushleft}\fbox{\textit{#1:}}~~~{}\begin{math}
4. }{
5.  \end{math}\textit{.}\end{flushleft}
6. }

Kile colors line 4., as if it is in math mode, but it isn't ... it's the part of \newenvironment command, and it is not really a part of formula inside math mode.
Comment 3 Thomas Braun 2009-07-03 21:54:10 UTC
Okay now I got it. To support this case would require quite some work.
As a short term solution you might try the following:
\newenvironment{rjesenje}[1][Rj]{%
 	\begin{flushleft}\fbox{\textit{#1:}}~~~{} \begin{math}% \KileResetHL
}
{%
	\end{math} % \KileResetHL
	\textit{.}\end{flushleft}
}

This should give the same results but with correct syntax highlightning.
Comment 4 Andrew Crouthamel 2018-11-02 23:07:33 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Andrew Crouthamel 2018-11-16 05:24:24 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version?

Thank you for helping us make KDE software even better for everyone!
Comment 6 Justin Zobel 2022-12-09 22:13:03 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 7 Bug Janitor Service 2022-12-24 05:22:47 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Bug Janitor Service 2023-01-08 05:16:04 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!