You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure when this started, and not sure why I didn't report this earlier. Open a latex file, and write an unmatched [ (opening square bracket) after a command in math mode, i.e.: $ a \in [0,2\pi) $
Expected behavior: Geany/ctags/IDon'tKnow still knows that we're in math mode, so an opening bracket does not necessarily start an optional argument.
Actual behavior: the opening bracket causes everything after it (including the text after math mode) to be highlighted as a command argument (i.e., bold blue).
Minimal working example (note that pdflatex parses this correctly and produces a pdf as intended):
\documentclass[a4paper,parskip]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb,amsfonts}
\begin{document}
\section{Hello}
We know that $angle(x,p) \in [0,2\pi)$ must hold.
\end{document}
Essentially the newest version:
$ LC_ALL=C geany --version
geany 1.27 (git >= d1fcd9f) (built on 2016-01-03 with GTK 2.24.29, GLib 2.46.2)
The bugtracker does not seem to know this issue already. If this needs forwarding to ctags/scintilla/IDon'tKnow, please do that for me.
Workaround (and probably how latex should be written): use {} to terminate optional-argument parsing for the command, i.e., \in{} [0,2\pi)
The text was updated successfully, but these errors were encountered:
I assume latex itself gets around it because it knows the \in is a no-argument command, but the lexer won't know that, its purely syntax only, so I'm not sure how it can do anything different to what it is doing.
I am not a Latexpurt either, but I think nearly anything can be in the [ of a command, it would be hard to find a suitable heuristic that worked enough of the time to avoid the reverse bug (arguments not highlighted :)
The solution is probably as pointed out on the Scintilla report, add a wordlist that specified no-option commands, but I think there are a lot of them, see here for some (don't forget to follow the links at the bottom for more) including \in.
Since the report is nearly a year old I guess anybody who can do it isn't interested in doing it.
Not sure when this started, and not sure why I didn't report this earlier. Open a latex file, and write an unmatched
[
(opening square bracket) after a command in math mode, i.e.:$ a \in [0,2\pi) $
Expected behavior: Geany/ctags/IDon'tKnow still knows that we're in math mode, so an opening bracket does not necessarily start an optional argument.
Actual behavior: the opening bracket causes everything after it (including the text after math mode) to be highlighted as a command argument (i.e., bold blue).
Minimal working example (note that
pdflatex
parses this correctly and produces a pdf as intended):Essentially the newest version:
The bugtracker does not seem to know this issue already. If this needs forwarding to ctags/scintilla/IDon'tKnow, please do that for me.
Workaround (and probably how latex should be written): use
{}
to terminate optional-argument parsing for the command, i.e.,\in{} [0,2\pi)
The text was updated successfully, but these errors were encountered: