Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Feb 21 2021 13:41

    mrob95 on master

    Deprecation notice (compare)

  • Feb 21 2021 13:38

    mrob95 on master

    Deprecation notice (compare)

  • Feb 20 2021 20:25

    mrob95 on master

    Update README.md (compare)

  • Feb 02 2021 17:15

    mrob95 on master

    Move logging set up above drago… (compare)

  • Jun 02 2020 19:38
    mrob95 opened #22
  • Jun 02 2020 19:36

    mrob95 on texmaker

    Add basic TeXMaker support (compare)

  • Apr 24 2020 07:18

    mrob95 on master

    Create requirements.txt (compare)

  • Apr 24 2020 07:17

    mrob95 on master

    Create install.bat (compare)

  • Jan 31 2020 21:25

    mrob95 on master

    change to \(\) for inline math,… add equation* and align* update docs and 2 more (compare)

  • Jan 31 2020 21:25
    mrob95 closed #21
  • Jan 31 2020 21:25
    mrob95 commented #21
  • Jan 31 2020 19:03
    annakirkpatrick opened #21
  • Jan 26 2020 14:38

    mrob95 on master

    (compare)

  • Jan 26 2020 14:34

    mrob95 on breathe

    Transition sublime and template Update dependencies Add install script and 2 more (compare)

  • Jan 15 2020 20:50

    mrob95 on master

    Create LICENSE (compare)

  • Nov 17 2019 14:49

    mrob95 on master

    Add core context (compare)

  • Nov 17 2019 14:28

    mrob95 on master

    Add install script (compare)

  • Nov 01 2019 07:33

    mrob95 on master

    Update dependencies (compare)

  • Oct 27 2019 17:56
    mrob95 synchronize #19
  • Oct 27 2019 17:56

    mrob95 on languages

    Improve formatting (compare)

pripri-priya
@pripri-priya
Hi @mrob95, I tried that, and with only the new version of dragonfly installed it produces the following error:
Error loading _mathfly_main from C:\NatLink\mathfly-master_mathfly_main.py
Traceback (most recent call last):
File "C:\NatLink\NatLink\MacroSystem\core\natlinkmain.py", line 331, in loadFile
imp.load_module(modName,fndFile,fndName,fndDesc)
File "C:\NatLink\mathfly-master_mathfly_main.py", line 1, in <module>
from dragonfly import (Function, Grammar, Text, Dictation, Choice, Pause)
File "C:\Python27\lib\site-packages\dragonfly__init.py", line 75, in <module>
from .accessibility import (CursorPosition, TextQuery,
File "C:\Python27\lib\site-packages\dragonfly\accessibility\
init.py", line 4, in <module>
from . import controller
File "C:\Python27\lib\site-packages\dragonfly\accessibility\controller.py", line 8, in <module>
from . import utils
File "C:\Python27\lib\site-packages\dragonfly\accessibility\utils.py", line 9, in <module>
import regex
File "C:\Python27\lib\site-packages\regex\
init__.py", line 1, in <module>
from .regex import *
File "C:\Python27\lib\site-packages\regex\regex.py", line 391, in <module>
import _regex_core
File "C:\Python27\lib\site-packages\regex_regex_core.py", line 21, in <module>
import _regex
ImportError: DLL load failed: %1 is not a valid Win32 application.
Mike Roberts
@mrob95
Are you using the 32-bit version of Python 2.7?
Natlink unfortunately doesn't like the 64-bit version
pripri-priya
@pripri-priya
Uninstalled everything and did a clean install of python 32bit and natlink. It's up and running now, thanks!
Mike Roberts
@mrob95
Good stuff! Let me know if you have any questions. Sorry the install process is so particular, it's on my list of things to try and improve :-)
Alex Boche
@alexboche
@mrob95 What you think about asking the dictation toolbox people if math fly can be added to dictation toolbox?
Mike Roberts
@mrob95
Yeah I'd be open to it, would probably be good to increase visibility
Anna Kirkpatrick
@annakirkpatrick
@alexboche sorry for the major delay in responding to your question. My academic life was kind of thrown into chaos around the beginning of May (having major problems getting along with my PhD advisor), and I sort of withdrew from a lot of outside projects and communities. I think I'm back now. Anyway, yes, when I say that I do programming with my eyes, I am using Optikey. If you're curious, it is another really cool project to check out. I actually designed some custom keyboard layouts specifically for programming that are now included in the project.

@mrob95 I just pulled down the latest version of master, and the latex and latex_maths modules are not loading correctly. I'm seeing error messages

Ignoring rule 'latex'. Failed to load with: 
Duplicate keys! (line 169 column 1 char 5622)
Ignoring rule 'latex_maths'. Failed to load with: 
Duplicate keys! (line 169 column 1 char 5622)

I'm going to go take a look at the file and see if I can identify/fix the problem.

Anna Kirkpatrick
@annakirkpatrick
@mrob95 Please ignore my previous message. This was a problem with my use of git. Basically, I had added the in-line command, and then I merged in the master branch which also had the in-line command. And instead of a merge conflict I just ended up with two copies. Oops!
@mrob95 Would you be willing to include the tex source for the documentation in the repository (or in a parallel documentation repository)? I am working with the latex commands and have already added several common latex commands that were missing. It would be great if I could modify the documentation at the same time, and then send you a pull request with both updated code and documentation.
Mike Roberts
@mrob95
@annakirkpatrick sure! I'll add the tex files to the repo. I finished exams a couple of weeks ago and have just been lazing ever since, need to get back into the rhythm of working on projects
Anna Kirkpatrick
@annakirkpatrick
@mrob95 Sounds good!
Alex Boche
@alexboche
@annakirkpatrick Sorry to hear about those issues with your advisor, that sounds difficult. No worries, there is no rush. I haven't been doing mathematical writing recently, but I'll be starting a PhD program in mathematical economics in a couple months so I'll be writing math by voice regularly for many years to come. Would be interesting to see a video of you coding with your eyes sometime if you have time.
Alex Boche
@alexboche
At some point,it might be worth compiling a set of mathematical vocabulary words.Someone mentioned there is a way to add words en masse using Natlink. not a priority right now just mentioning it to get it into the general consciouusness. Rüdiger's dragonphrases is another product that mightt be useful for this . other engines will bring new possibilities too
Mike Roberts
@mrob95
Good idea, I have kind of started this but only got as far as "heteroscedasticity" and "leptokurtosis". Will add it to mathfly later and then it will just be a case of creating the list in settings.toml.
Anna Kirkpatrick
@annakirkpatrick
@alexboche @mrob95 I have a partial list of math vocabulary words that I used with my previous system for writing math by voice. I will see if I can dig that up.
@mrob95 I wanted to check with you on what I think is an omission from the LaTeX module. I don't see any way to dictate the double backslash ('\\') , beyond the brute force way anyway. I see that you do include the \linebreak command, but it is really more of an advanced command for special purposes or power users. I noticed that one of the templates does include the double backslash in a table so I just wanted to check that I'm not missing something here. Thanks!
Mike Roberts
@mrob95

@annakirkpatrick Sounds good! I have added a list in settings.toml called add_words which should automatically add words to the vocabulary on start-up.

Lack of a double backslash command beyond "backslash backslash" is an omission

Anna Kirkpatrick
@annakirkpatrick
@mrob95 Great! I'll grab the updated version and add the list I currently have. I can also take a look at my existing vocabulary in Dragon (specifically custom words) and pull out the math stuff that I've added over the past 8ish year.
And I'll add a command for double backslash; it gets used a lot!
Mike Roberts
@mrob95

Something like

"line end"  = "\\"

in [commandnoarg]

Should work

Or if you want a carriage return as well:

"line end"  = "\\\n"
Anna Kirkpatrick
@annakirkpatrick
Aren't backslashes escaped in the *.toml files?
Mike Roberts
@mrob95
yes, but one backslash is automatically added for all commands, so we just need one more (I think)
Anna Kirkpatrick
@annakirkpatrick
Yep, that would make sense. I'll test it out and let you know if I run into problems.\
Alex Boche
@alexboche
in might be good to have the add_words vocabulary list be a dictionary that has spoken and written forms. I don't know how that works,I think Natlink has a way. Caspark mentioned this (pseudo-?)code on the Talents slack. Not sure does the spoken forms:
import natlink

def add_words(words):
    for word in words:
        known_word = natlink.getWordInfo(word)
        if known_word is None:
            natlink.addWord(word)
Mike Roberts
@mrob95
Yeah the natlink docs are somewhat cryptic
I'll do some research
Dragon is usually reasonably good though at getting the pronunciation right
Anna Kirkpatrick
@annakirkpatrick
Re: written and spoken forms, my files do include both when the spoken form does not clearly match the written form.
The Dragon gui lets you import a list (plain text file) of words and phrases with written and spoken form specified. They are separated with a backslash. (And hence you can't add anything that itself contains a backslash. Nope, there is not an escape mechanism. I did check.) Just sharing this in case it gives some insight into what natlink is looking for.
Anna Kirkpatrick
@annakirkpatrick
@mrob95 I have implemented the line and command as you suggested, specifically I chose the version with the carriage return as it is common style to include a carriage return in source in this setting. I'm getting the double backslash and carriage return output correctly, but I am also getting a space after the carriage return. Which isn't a huge problem, because LaTeX ignores a lot of the white space details from the source file, but it is annoying if you are trying to keep clean human-readable source . I'm guessing this behavior has to do with inclusion in the section [commandnoarg], as generally putting a space after a command is the desired behavior. Does this may be indicate that the command belongs in another section? Maybe the misc_symbols section? Or is there a better way to handle this?
@mrob95 in the documentation, did you intend to use a long dash for "or" when listing spoken forms? I'm guessing you actually meant |, as that is the character you use in the source. But | needs to be escaped in LaTeX outside of math mode. Since I'm already working on the documentation, I'm happy to fix that issue while I'm at it. Just wanted to be sure I correctly understood your intent before I started making changes.
Anna Kirkpatrick
@annakirkpatrick
@alexboche congratulations on getting accepted your PhD program! At the moment, I'm probably not the right person to tell you how great graduate school can be. (I'm still super frustrated with my advisor, but I am slowly working through it.) I do believe it is a worthwhile endeavor though. If I didn't, I would not still be doing it myself!
If I can remember, I will turn on a screen recorder next time I'm using eye gaze for code on my personal computer. It is pretty cool, and totally different than speech to text.
Alex Boche
@alexboche
thanks!
Mike Roberts
@mrob95
Okay I have added a new [commandmisc] section in latex.toml which allows arbitrary alternating commands with the "insert" prefix. So we can do:
[commandmisc]
"line end"           = ["\\\\", "enter"]
Hope pulling changes isn't causing too much bother
Anna Kirkpatrick
@annakirkpatrick
@mrob95 the [commandmisc] section should be great. Thanks!
And pulling changes is no biggie. I'm pretty comfortable with git and certainly couldn't suggest an easier way.
Mike Roberts
@mrob95

np, if you need more flexibility for commands then dragonfly is not at all hard to learn see e.g.

https://github.com/mrob95/MR-caster/blob/master/caster/apps/chrome.py

Anna Kirkpatrick
@annakirkpatrick
@mrob95 thanks for the link! Once I get the basics of LaTeX dictation down (both adding commands and getting over most of the learning curve), I am thinking about setting up better integration with vim for easier editing. That looks like a really useful example to work from.
@mrob95 I packaged up my changes so far into a pull request. It's only a handful of commands, but they are significant in terms of usability. I'm sure there will be more as I continue working, but you might as well have these for now.
Mike Roberts
@mrob95
And thanks for the PR, looks good. Regarding the docs I'm going to do a cleanup job at some point, I think I noticed that pipe is formatted as a long dash and thought "that will do" ^^. Might even change them from LaTeX to markdown
I get an absurd amount of value out of dragonfly and use it for pretty much everything - text editor commands, programming language commands, math commands, git commands, web browser commands, etc etc
Anna Kirkpatrick
@annakirkpatrick

@mrob95 I'm hoping maybe you've seen this error message before and can point me in the right direction. Here's the sequence of events:

  1. I started up Dragon but natlink didn't start. I did not get the "messages from Natlink" window, and commands like "enable X" were not recognized as commands.
  2. Pulled latest version of mathfly from master, just to be sure. (Couldn't run rebuild command.)
  3. I ran the natlink configuration and reregistered NatLink. Rebooted computer and restarted Dragon.
    Same problem as 1, so I checked my path. Somehow Python 3 had jumped over Python 2 in my path. I fixed that. Rebooted computer. Ran NatLink again being sure I was using Python 2.7. Reboot again.
  4. Now Dragon starts with NatLink, but I am getting a bunch of error messages.
    ```
    Vocola not active
    Ignoring rule 'sublime'. Failed to load with:
    cannot import name ContextAction
    Ignoring rule 'sumatrapdf'. Failed to load with:
    cannot import name ContextAction
    Ignoring rule 'wordpad'. Failed to load with:
    cannot import name ContextAction
    Ignoring rule 'core'. Failed to load with:
    cannot import name ContextAction
    Ignoring rule 'ScientificNotebook55'. Failed to load with:
    cannot import name ContextAction
    Ignoring rule 'LyX'. Failed to load with:
    cannot import name ContextAction
    Ignoring rule 'latex'. Failed to load with:
    cannot import name ContextAction
    Ignoring rule 'latex_maths'. Failed to load with:
    cannot import name ContextAction
    Ignoring rule 'alias'. Failed to load with:
    cannot import name ContextAction
    - Starting Mathfly -
    Say "enable <module name>" to begin, or
    "configure <module name>" to make changes.
    Modules available:
    natlinkmain started from C:\NatLink\NatLink\MacroSystem\core:
    NatLink version: 4.1whiskey3
    DNS version: 13
    Python version: 27
    Windows Version: 10
    User defined macro's (UserDirectory) enabled: C:\Users\Anna\Documents\NatLink\mathfly

```
Any advice?

Mike Roberts
@mrob95
Try running
pip2 install -U dragonfly2
ContextAction is something new which was only added recently to dragonfly
Anna Kirkpatrick
@annakirkpatrick
Thanks! That fixes it.
Alex Boche
@alexboche
@mrob95 @esc123 can you guys explain what you like better about scientific notebook than Lyx?
my experience is mostly with Lyx, but I am also learning regular latex now. considering trying scientific notebook
esc123
@esc123
Jeez it's been so long since I used Lyx now that I can hardly remember why I switched! I recall SN being more convenient for voice rec because it was more streamlined to write multiple lines of Math continuously. Just "math mode" and away you go. I believe in Lyx when you begin a new line you must then specify that you will be writing math in that line. Probably an easy issue to overcome through creating specific commands for such but yeah.