General questions

If I want to change symbols

image

It's supported symbol in MathWidget Sample.
But if i want to only "Letters" and "Digits", how do I do?

But i don't know how I create my own resource file...
1 Comment

How to create and use custom ATK Math Grammar:

- Go to the Resource tools webpage https://developer.myscript.com/tools 
- According to the documentation about lexicon, subset knowledge or math grammar, create your own resource file http://doc.myscript.com/Common/DevTools/index.html. In your case, create your custom grammar file (.def) (You can download an example here)


- select 'ATK' and load the file (UTF8 encoded!) then download the generated resource file (.res)

For the MathWidget iOS, you will have to change the math.conf file located in Samples/MathWidgetSample/MathWidgetSample/Resources directory, for instance by adding : 

Bundle-Version: 1.0
Bundle-Name: math
Configuration-Script:
AddResDir ../resources

Name: standard
Type: Math
Configuration-Script:
AddResource math/math-ak.res
AddResource math/math-grm-atk.res

Name: custom
Type: Math
Configuration-Script:
AddResource math/math-ak.res
AddResource math/math-grm-custom.res

Under XCode, you will need to change the project accordingly in the ViewContholler.h:

- (void)configure
{
NSBundle *mainBundle = [NSBundle mainBundle];
NSString *bundlePath = [mainBundle pathForResource:@"resources"
ofType:@"bundle"];
bundlePath = [bundlePath stringByAppendingPathComponent:@"conf/"];

[_mathView addSearchDir:bundlePath];
[_mathView configureWithBundle:@"math" andConfig:@"custom"]; }


Finally, you will be able to see your changes by running your project. Only symbols of your custom grammar will be recognized.

Please let us know if you have any other question.
Best regards

Login or Signup to post a comment