Re: latex syntax coloring

2019-07-06 Thread Edward K. Ream
On Sat, Jul 6, 2019 at 4:35 AM Josef  wrote:

> Thank you for improving this.
> I am waiting to test this, but do not want to do a git pull right now,
> because I see the activepath plugin is currently broken, and I depend on
> that.
>

active_path should work now.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS3Ja%3Ds9wgaBRstxKCppgYOtO0cc%2BdJCuku8TEaA-KYZyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-07-06 Thread Josef
Thank you for improving this.
I am waiting to test this, but do not want to do a git pull right now, 
because I see the activepath plugin is currently broken, and I depend on 
that.
-Josef

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/afbfb2b8-76fe-4378-9f2b-dc7a11062889%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-06-23 Thread Rob
That should work for me as I was using `@language=tex` anyway for all of my 
LaTeX work.

Rob...

On Sunday, June 23, 2019 at 3:03:09 PM UTC-4, Edward K. Ream wrote:
>
> On Tuesday, February 26, 2019 at 9:27:16 AM UTC-6, Josef wrote:
>
> latex syntax coloring colors only some common latex commands, for others 
>> only the first letter is colorized.
>>
>
> Rev 5e467b6 in devel completes #1088 
> . This was 
> surprisingly easy to do, though some choices are debatable.  The highlights:
>
> - Both `@language tex` and `@language latex` use leo/modes/tex.py. This 
> ignores the many special cases in latex.py. I'll retain leo/modes/latex.py 
> in case this choice becomes controversial.
>
> - Only slight changes were needed to tex.py. Similar changes could be 
> added to latex.py.
>
> Let me know how this works for you.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/b8072fef-9428-4e75-b1c0-9e3fb0687cb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-06-23 Thread Edward K. Ream
On Tuesday, February 26, 2019 at 9:27:16 AM UTC-6, Josef wrote:

latex syntax coloring colors only some common latex commands, for others 
> only the first letter is colorized.
>

Rev 5e467b6 in devel completes #1088 
. This was 
surprisingly easy to do, though some choices are debatable.  The highlights:

- Both `@language tex` and `@language latex` use leo/modes/tex.py. This 
ignores the many special cases in latex.py. I'll retain leo/modes/latex.py 
in case this choice becomes controversial.

- Only slight changes were needed to tex.py. Similar changes could be added 
to latex.py.

Let me know how this works for you.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/493f4c47-f351-4f6b-af2f-f2ecf5ca0d7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-03-01 Thread Josef

For me some commands are not highlighted at all, others only the first 
letter, and some completely. Here ist my setup:

Leo 5.8.1-b2 devel, build 20190213233241, Wed Feb 13 23:32:41 PST 2019
Git repo info: branch = devel, commit = 95afe636b5e8
Python 3.7.2, PyQt version 5.11.1
linux


-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-03-01 Thread Josef

Seems like I have trouble posting this, now the 3rd try. For me some 
commands are coloured, some not at all and some only the first letter. Here 
is my setup:

Leo 5.8.1-b2 devel, build 20190213233241, Wed Feb 13 23:32:41 PST 2019
Git repo info: branch = devel, commit = 95afe636b5e8
Python 3.7.2, PyQt version 5.11.1
linux

[image: Screenshot_2019-02-27_10-01-07.png]

- Josef

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-03-01 Thread Josef


[image: Screenshot_2019-02-27_10-01-07.png]


On Wednesday, February 27, 2019 at 10:13:06 AM UTC+1, Josef wrote:
>
>
> I don't seem to be able to respond to your message - all gets deleted when 
> I attach or insert an image.
>
> Leo 5.8.1-b2 devel, build 20190213233241, Wed Feb 13 23:32:41 PST 2019
> Git repo info: branch = devel, commit = 95afe636b5e8
> Python 3.7.2, PyQt version 5.11.1
> linux
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-03-01 Thread Josef

Hi Rob,

it looks different for me. The most common commands are highlighted, some 
(\cbstart) only the first letter, others like \lae not at all:

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-03-01 Thread Josef

4th try to respond to this - my messages get deleted!

This time I try to attach a file, instead of inserting it.

Leo 5.8.1-b2 devel, build 20190213233241, Wed Feb 13 23:32:41 PST 2019
Git repo info: branch = devel, commit = 95afe636b5e8
Python 3.7.2, PyQt version 5.11.1
linux

- Josef

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-02-28 Thread Edward K. Ream
On Wed, Feb 27, 2019 at 8:12 AM Rob  wrote:

> Duh! Just figured it out. `@language latex` and `@language tex` give
> different results.
>

I have just created #1088
 for this.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-02-28 Thread Josef


>
>- However, words after the closing `\` are improperly colorized.
>
>
This needs fixing, because the "closing" "\ "  designates really macro, 
which ends with the blank (and expands to a blank), since latex macros 
gobble up any trailing blank. I have such "\ " (backslash followed by a 
blank) macros all over the text.

- Josef

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-02-28 Thread Josef
Hi Rob,

Thanks for figuring this out. I have always @language latex in my files, 
because that is what gets automatically added by Leo when opening a file 
with a .tex filename extension.

Since latex and tex have the same syntax, I don't see why there should be 
two different syntax coloring rules. There are some tex commands which are 
deemed obsolete in latex, like \em and \bf. It may make sense to color 
these differently in latex, but I fear it would need a latex expert to 
identify these and even then it my be a matter of taste.

In my mind, the most sensible solution would be to use always the tex 
syntax rules and to make @language tex the default when loading .tex (or 
.latex) files.  I am unsure about .bib files. In case one uses biblatex, 
they may contain tex commands, but they would really need a bit a different 
treatment.

- Josef


-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-02-27 Thread Rob
Duh! Just figured it out. `@language latex` and `@language tex` give 
different results.

[image: 190227 LaTeX Syntax2.PNG]
Josef,  In your case, the easy fix is to change your @language to `tex`.

Bigger question to the community; is there any reason why the languages 
`tex` and `latex` should have different syntax coloring rules?

Rob...

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-02-27 Thread Rob
I sorta duplicated your text and get a very different result.

[image: 190227 LaTeX Syntax.PNG]
A few thoughts and questions:

   - Wondering if your environment is significantly different from mine 
   (Win10, Python3, PYQT 5.4.1). Don't know why that matter though.
   - The contstructs \lae\, \cbstart and others that don't work for you, 
   color as expected for me.
   - However, words after the closing `\` are improperly colorized.
   - Regarding that, if you use those to create space between the construct 
   and the next word, another way to do that is \lae{}.
   - Also curious about the \EM/\pfn\ fragment; been around LaTeX for 
   awhile and don't know what that does (not relevant to your original 
   question, however).

Rob...

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-02-27 Thread Josef


[image: screenshot.png]


On Wednesday, February 27, 2019 at 10:13:06 AM UTC+1, Josef wrote:
>
>
> I don't seem to be able to respond to your message - all gets deleted when 
> I attach or insert an image.
>
> Leo 5.8.1-b2 devel, build 20190213233241, Wed Feb 13 23:32:41 PST 2019
> Git repo info: branch = devel, commit = 95afe636b5e8
> Python 3.7.2, PyQt version 5.11.1
> linux
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-02-27 Thread Josef

I don't seem to be able to respond to your message - all gets deleted.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: latex syntax coloring

2019-02-26 Thread Rob
Josef, wonder why my experience is different. I write LaTeX in Leo almost 
every day and have no difficulty with syntax coloring. See screenshot:

[image: 190226 LaTeX Syntax.PNG]

Rob...

On Tuesday, February 26, 2019 at 10:27:16 AM UTC-5, Josef wrote:
>
> latex syntax coloring colors only some common latex commands, for others 
> only the first letter is colorized.
> I realize, that coloring all possible latex commands is impossible, since 
> one can define pretty much anything to be a command in latex,
> but it would be relatively simple to cover anything starting with a 
> backslash and ending before the first special or whitespace character.
> That would cover most user-defined commands also, because it is all one 
> can produce with \newcommand.
>
> - Josef
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.