After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 691749 - style: latex's Math mode in oblivion is really hard to see
style: latex's Math mode in oblivion is really hard to see
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: General
git master
Other All
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
: 665913 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-01-14 23:52 UTC by Carnë Draug
Modified: 2013-11-28 20:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix on latex style (5.42 KB, patch)
2013-01-16 20:07 UTC, Carnë Draug
none Details | Review
fix oblivion style (912 bytes, patch)
2013-01-16 20:08 UTC, Carnë Draug
none Details | Review

Description Carnë Draug 2013-01-14 23:52:55 UTC
Hi

using the oblivion style of gedit, when editing a latex document, it's really hard to see things in math mode. The purple on top of the grey is quite hard to read, and this is specially true when the math mode is used for only 1 or 2 characters since the rest of the text block is all white characters. An example that shows this is what I'm writing right now

...
where $F$ represents the freely diffusing proteins, $S$ the vacant binding sites,
and $C$ the $FC$ complex when the protein is bound to the binding site while we
try to measure the values of $K_{on}$ and $K_{off}$ . One of the assumptions of
the FRAP models is that the system is in equilibrium when we start the
experiment, and remains so through the whole experiment. This means that
$F$ and $S$ should not change over the time course of the experiment.
...

I agree that colors is a somewhat personal thing and I tried to fix this on my side but I can't see where. These groups on latex.lang all map to latex:display-math which is named "Math Mode" and is mapped to nothing. I tried to grep the styles and lang files for "math mode" but found nothing. Could someone please point me to the right direction where to change this? I can also push a change if you agree.

I would suggest to map it to "def:string" or maybe even "def:special-char" (maybe the latest could be used for the actual special commands to be used inside math mode).

Carnë
Comment 1 Carnë Draug 2013-01-16 20:07:54 UTC
Created attachment 233624 [details] [review]
fix on latex style
Comment 2 Carnë Draug 2013-01-16 20:08:25 UTC
Created attachment 233625 [details] [review]
fix oblivion style

Please see attached patches to do my proposed changes. I have removed those
from the oblivion style and use string or special char for display and inline
math.

The ideas behind the difference is that when uses inline math, it's for a short
equation, sometimes, even just a math symbol on the text. And so gets
highlighted as special char.

When someone uses display math, then it's a much longer thing, most times on
their own line. And so gets hightlighted as string.

I tried to highlight as the actual \begin{displaymath} environment but because
\end is a normal command and gets included inside the maths, the \end is never
caught.

If approved, I can push the changes.
Comment 3 Sébastien Wilmet 2013-05-19 17:56:03 UTC
*** Bug 665913 has been marked as a duplicate of this bug. ***
Comment 4 Sébastien Wilmet 2013-09-28 21:23:18 UTC
The new latex.lang in bug #679748 fixes this issue.