GNOME Bugzilla – Bug 691749
style: latex's Math mode in oblivion is really hard to see
Last modified: 2013-11-28 20:12:48 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ë
Created attachment 233624 [details] [review] fix on latex style
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.
*** Bug 665913 has been marked as a duplicate of this bug. ***
The new latex.lang in bug #679748 fixes this issue.
Fixed in https://git.gnome.org/browse/gtksourceview/commit/?id=cb534ab107daad98b74edab83bf807cfd38cc8e2